diff --git a/build/urpflanze-light.js b/build/urpflanze-light.js index 1d32aad..d80877b 100644 --- a/build/urpflanze-light.js +++ b/build/urpflanze-light.js @@ -4714,9 +4714,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ "author": () => /* binding */ author, /* harmony export */ "license": () => /* binding */ license /* harmony export */ }); -var version = '%VERSION%'; +var version = '0.3.3'; var author = 'Gennaro Bosone '; -var license = '%LICENSE%'; +var license = 'GPL-3.0-or-later'; //# sourceMappingURL=meta.js.map diff --git a/build/urpflanze-light.js.map b/build/urpflanze-light.js.map index 1c36f31..1baf804 100644 --- a/build/urpflanze-light.js.map +++ b/build/urpflanze-light.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://Urpflanze/webpack/universalModuleDefinition","webpack://Urpflanze/./dist/Color.js","webpack://Urpflanze/./dist/Utilites.js","webpack://Urpflanze/./dist/core/Group.js","webpack://Urpflanze/./dist/core/Scene.js","webpack://Urpflanze/./dist/core/SceneChild.js","webpack://Urpflanze/./dist/core/math/Vec2.js","webpack://Urpflanze/./dist/core/math/bounding.js","webpack://Urpflanze/./dist/core/math/gl-matrix-extensions.js","webpack://Urpflanze/./dist/core/math/index.js","webpack://Urpflanze/./dist/core/shapes/Shape.js","webpack://Urpflanze/./dist/core/shapes/ShapeBase.js","webpack://Urpflanze/./dist/core/shapes/ShapeBuffer.js","webpack://Urpflanze/./dist/core/shapes/ShapeLoop.js","webpack://Urpflanze/./dist/core/shapes/ShapePrimitive.js","webpack://Urpflanze/./dist/core/shapes/ShapeRecursive.js","webpack://Urpflanze/./dist/core/shapes/primitives/Circle.js","webpack://Urpflanze/./dist/core/shapes/primitives/Line.js","webpack://Urpflanze/./dist/core/shapes/primitives/Lissajous.js","webpack://Urpflanze/./dist/core/shapes/primitives/Polygon.js","webpack://Urpflanze/./dist/core/shapes/primitives/Rect.js","webpack://Urpflanze/./dist/core/shapes/primitives/Rose.js","webpack://Urpflanze/./dist/core/shapes/primitives/Spiral.js","webpack://Urpflanze/./dist/core/shapes/primitives/SuperShape.js","webpack://Urpflanze/./dist/core/shapes/primitives/Triangle.js","webpack://Urpflanze/./dist/core/types/scene-child.js","webpack://Urpflanze/./dist/core/types/shape-base.js","webpack://Urpflanze/./dist/index-light.js","webpack://Urpflanze/./dist/meta.js","webpack://Urpflanze/./dist/services/animation/Animation.js","webpack://Urpflanze/./dist/services/animation/Easings.js","webpack://Urpflanze/./dist/services/animation/Simple.js","webpack://Urpflanze/./dist/services/drawers/Drawer.js","webpack://Urpflanze/./dist/services/drawers/drawer-canvas/DrawerCanvas.js","webpack://Urpflanze/./dist/services/drawers/drawer-canvas/FrameBuffer.js","webpack://Urpflanze/./dist/services/events/Emitter.js","webpack://Urpflanze/./dist/services/scene-utilities/SceneChildUtilitiesData.js","webpack://Urpflanze/./dist/services/scene-utilities/SceneUtilities.js","webpack://Urpflanze/./dist/services/scene-utilities/SceneUtilitiesExtended.js","webpack://Urpflanze/./dist/services/timeline/Timeline.js","webpack://Urpflanze/./node_modules/gl-matrix/esm/common.js","webpack://Urpflanze/./node_modules/gl-matrix/esm/mat4.js","webpack://Urpflanze/./node_modules/gl-matrix/esm/vec2.js","webpack://Urpflanze/./node_modules/gl-matrix/esm/vec3.js","webpack://Urpflanze/./node_modules/simplex-noise/simplex-noise.js","webpack://Urpflanze/./node_modules/uuid/dist/esm-browser/regex.js","webpack://Urpflanze/./node_modules/uuid/dist/esm-browser/rng.js","webpack://Urpflanze/./node_modules/uuid/dist/esm-browser/stringify.js","webpack://Urpflanze/./node_modules/uuid/dist/esm-browser/v1.js","webpack://Urpflanze/./node_modules/uuid/dist/esm-browser/validate.js","webpack://Urpflanze/webpack/bootstrap","webpack://Urpflanze/webpack/runtime/compat get default export","webpack://Urpflanze/webpack/runtime/define property getters","webpack://Urpflanze/webpack/runtime/hasOwnProperty shorthand","webpack://Urpflanze/webpack/runtime/make namespace object","webpack://Urpflanze/webpack/startup"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;;;;;;;;;;;;ACVA;AACA;AACA,0CAA0C,IAAI;AAC9C;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,IAAI;AAC9C;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,6BAA6B,IAAI;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,yBAAyB;AACtC;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5KA,CAAyC;AAC+B;AACxE;AACiC;AACjC;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA,+BAA+B,iBAAiB,EAAE;AAClD,+BAA+B,iBAAiB,EAAE;AAClD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACO;AACP;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sDAAY;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP,0BAA0B,iBAAiB;AAC3C,uBAAuB,OAAO;AAC9B,uBAAuB,OAAO;AAC9B,uBAAuB,OAAO;AAC9B;AACA,2BAA2B,sDAAY;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,KAAK;AAChB,aAAa;AACb;AACO;AACP,sCAAsC,2BAA2B;AACjE,2BAA2B,2EAAsB;AACjD,2BAA2B,iDAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,KAAK;AAChB,aAAa;AACb;AACO;AACP,sCAAsC,2BAA2B;AACjE,2BAA2B,2EAAsB;AACjD,2BAA2B,iDAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,KAAK;AAChB,aAAa;AACb;AACO;AACP,sCAAsC,2BAA2B;AACjE,2BAA2B,2EAAsB;AACjD,2BAA2B,iDAAe;AAC1C;AACA;AACA,sBAAsB,iDAAe;AACrC,eAAe,+CAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,WAAW;AACzB,gBAAgB;AAChB;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,WAAW;AACzB,gBAAgB;AAChB;AACA;AACA;AACA;AACA,IAAI;AACJ,oC;;;;;;;;;;;;;;;;;;;;;;;ACtRA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AAC2B;AACU;AACK;AACJ;AACvC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB,aAAa;AAChD;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,mFAAmF,qBAAqB,EAAE;AAC1G;AACA,4BAA4B,8DAAwB;AACpD;AACA;AACA;AACA,2CAA2C,SAAS;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,0BAA0B,EAAE;AACxE;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,yBAAyB;AACxC;AACA;AACA;AACA,2CAA2C,2BAA2B;AACtE,+CAA+C,0EAA0E,EAAE;AAC3H;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,uBAAuB,yDAAc;AACrC;AACA,mDAAmD,2CAA2C,EAAE;AAChG,uDAAuD,SAAS;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA;AACA,uCAAuC,uBAAuB;AAC9D,6CAA6C,4BAA4B;AACzE,+CAA+C,+CAA+C,EAAE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;AACA,mDAAmD,kCAAkC,EAAE;AACvF;AACA;AACA,+CAA+C,iCAAiC,EAAE;AAClF;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA,+CAA+C,uCAAuC,EAAE;AACxF;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA,wDAAwD,kDAAkD,EAAE,0BAA0B,cAAc,EAAE;AACtJ;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,kCAAkC,yBAAyB,EAAE;AAC7D,kCAAkC,wBAAwB,EAAE;AAC5D,iEAAiE,mCAAmC,EAAE;AACtG;AACA;AACA;AACA,6DAA6D,SAAS;AACtE;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAsB;AACrC;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,yDAAyD,gCAAgC,EAAE,uBAAuB,wBAAwB,EAAE;AAC5I;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D;AACA;AACA;AACA,+CAA+C,8BAA8B,EAAE;AAC/E;AACA;AACA,CAAC,CAAC,gDAAU;AACZ,iEAAe,KAAK,EAAC;AACrB,iC;;;;;;;;;;;;;;;;;;;;;;ACnVA,CAAsC;AACV;AACO;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA,qDAAqD,4CAA4C,EAAE;AACnG;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D;AACA;AACA;AACA,qDAAqD,oCAAoC,EAAE;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC,eAAe,OAAO;AACtB;AACA;AACA;AACA,uBAAuB;AACvB,8CAA8C,6CAA6C;AAC3F,sCAAsC;AACtC;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,qBAAqB,EAAE;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,0BAA0B,EAAE;AACxE;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,iBAAiB;AACjB;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA,6DAA6D,2CAAK;AAClE;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,WAAW;AAC1B,eAAe,4BAA4B;AAC3C,iBAAiB;AACjB;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA,+BAA+B,gDAAU;AACzC;AACA;AACA,mCAAmC,kDAAK;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,2CAAK;AAChE;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,qBAAqB;AACpC;AACA;AACA;AACA,+BAA+B,gDAAU;AACzC;AACA;AACA,mCAAmC,kDAAK;AACxC;AACA;AACA;AACA,2DAA2D,2CAAK;AAChE;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA,kCAAkC,2CAAK;AACvC;AACA;AACA,aAAa;AACb;AACA,uCAAuC,kDAAK;AAC5C;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,KAAK,EAAC;AACrB,iC;;;;;;;;;;;;;;;;;;;ACxUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC,eAAe,yBAAyB;AACxC,eAAe,EAAE;AACjB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,CAAC;AACD,iEAAe,UAAU,EAAC;AAC1B,sC;;;;;;;;;;;;;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA,+BAA+B,6CAA6C,EAAE;AAC9E;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA,0BAA0B,kCAAkC,EAAE;AAC9D;AACA;AACA;AACA,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA,4BAA4B,mCAAmC,EAAE;AACjE;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,gBAAgB;AAChB;AACA,8BAA8B,0CAA0C,EAAE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAe,IAAI,EAAC;AACpB,gC;;;;;;;;;;;;;;;;;;;ACnNA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,EAAE,EAAE;AACT;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,iEAAe,QAAQ,EAAC;AACxB,oC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5EA,CAAqC;AAC9B;AACA;AACA;AACA;AACP,yDAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,mCAAmC,mBAAmB;AACtD;AACA;AACA;AACA;AACA;AACA,gD;;;;;;;;;;;;;;;;;;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,8BAA8B,qCAAqC;AAC1E;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,iC;;;;;;;;;;;;;;;;;;;;;;AC7BA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACoC;AACG;AACV;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc,aAAa;AAC1C;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,sCAAsC,gDAAU;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,YAAY;AAC3B,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,SAAS;AACrE,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD,eAAe,mBAAmB;AAClC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,8DAAwB;AAClD;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,KAAK,EAAC;AACrB,iC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzOA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC6C;AAC6H;AACnI;AACc;AACrB;AACF;AACU;AACD;AACvC,gBAAgB,6CAAW;AAC3B,sBAAsB,6CAAW;AACjC,wBAAwB,6CAAW;AACnC,uBAAuB,6CAAW;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB,aAAa;AAChD;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC,eAAe,yBAAyB;AACxC,eAAe,EAAE;AACjB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,EAAE;AACjB,eAAe,QAAQ;AACvB;AACA;AACA;AACA,uCAAuC,uBAAuB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA,uCAAuC,uBAAuB;AAC9D,6CAA6C,4BAA4B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,yBAAyB;AACxC;AACA;AACA;AACA,2CAA2C,2BAA2B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,sEAAsB,GAAG,oEAAoB;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iDAAe;AAC1C;AACA;AACA;AACA,0CAA0C,2CAA2C;AACrF,8CAA8C,2CAA2C;AACzF;AACA;AACA,sDAAsD,oEAAoB,IAAI,sCAAG;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,8DAAW,yCAAyC,iEAAc;AACrG;AACA,gCAAgC,8DAAW,sCAAsC,gEAAa;AAC9F,oCAAoC,8DAAW,0CAA0C,iEAAc;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,gDAAK;AAC3C,4CAA4C,8DAAW,kDAAkD,iEAAc;AACvH,0CAA0C,8DAAW,gDAAgD,iEAAc;AACnH;AACA;AACA,6BAA6B,oEAAoB;AACjD,qCAAqC,iDAAe;AACpD,4BAA4B,8CAAY,iBAAiB,iEAAc;AACvE;AACA,6BAA6B,sEAAsB;AACnD,qCAAqC,iDAAe;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+CAAa;AACrC,4CAA4C,gDAAc;AAC1D;AACA,4BAA4B,gDAAc;AAC1C;AACA,4BAA4B,gEAAa;AACzC,4BAA4B,+CAAa;AACzC;AACA,yCAAyC,8CAAY;AACrD,yCAAyC,8CAAY;AACrD,yCAAyC,8CAAY;AACrD;AACA,4BAA4B,4CAAU;AACtC;AACA,4BAA4B,gDAAc,mCAAmC,4CAAU;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kDAAgB;AAC5C;AACA;AACA;AACA;AACA,wBAAwB,+CAAa;AACrC,wBAAwB,gDAAc;AACtC;AACA,4BAA4B,gDAAc;AAC1C;AACA,+CAA+C,oEAAoB;AACnE,4BAA4B,8CAAY;AACxC;AACA,oBAAoB,yDAAc;AAClC;AACA,6CAA6C,4BAA4B;AACzE;AACA;AACA;AACA,8CAA8C,wDAAa;AAC3D,8CAA8C,wDAAa;AAC3D;AACA,4BAA4B,oDAAkB;AAC9C;AACA;AACA,sDAAsD,0CAAQ;AAC9D,gCAAgC,oDAAkB;AAClD,gCAAgC,4CAAU;AAC1C,sDAAsD,0CAAQ;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oDAAkB;AAC9C;AACA;AACA;AACA;AACA,wBAAwB,uDAAY;AACpC;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAa;AACrB;AACA,yDAAyD,SAAS;AAClE;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE,GAAG;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA,mEAAmE,SAAS;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,gBAAgB,EAAE,GAAG;AACrB;AACA;AACA;AACA;AACA,kBAAkB,oEAAoB;AACtC,kBAAkB,gCAAgC;AAClD,kBAAkB,gCAAgC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA,KAAK,EAAE;AACP;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,4BAA4B,OAAO,oEAAoB,YAAY,0CAA0C,uFAAuF,GAAG;AACvP;AACA,CAAC,CAAC,gDAAU;AACZ,iEAAe,SAAS,EAAC;AACzB,qC;;;;;;;;;;;;;;;;;;;;;;AC3fA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACuC;AACM;AACiB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB,aAAa;AACjD;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,wFAAwF,6EAA8B;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA,uCAAuC,uBAAuB;AAC9D,6CAA6C,4BAA4B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,4EAA6B;AAC1E,cAAc,gEAA0B;AACxC;AACA;AACA,iDAAiD,SAAS;AAC1D;AACA;AACA,YAAY,uDAAY;AACxB;AACA,QAAQ,wDAAa;AACrB;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,+BAA+B,WAAW;AAC1C;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,oDAAc;AAChB,iEAAe,WAAW,EAAC;AAC3B,uC;;;;;;;;;;;;;;;;;;;;;;;;AClKA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC+D;AACvB;AACV;AACgB;AACV;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB,aAAa;AAC/C,eAAe,QAAQ;AACvB;AACA;AACA,kCAAkC,eAAe;AACjD,4CAA4C,4BAA4B;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sCAAG;AACxB,qBAAqB,sCAAG;AACxB,qCAAqC,eAAe,EAAE;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,2DAA2D,SAAS;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA,uCAAuC,uBAAuB;AAC9D,6CAA6C,4BAA4B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB,eAAe,EAAE;AACjB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA,qDAAqD;AACrD,sDAAsD,QAAQ;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,qEAA+B;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,4EAA6B;AACvE;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uDAAY;AAC5B;AACA;AACA;AACA,YAAY,wDAAa;AACzB;AACA;AACA;AACA;AACA;AACA,yBAAyB,gEAA0B;AACnD,YAAY,yDAAc;AAC1B,2BAA2B,kBAAkB;AAC7C;AACA;AACA,gBAAgB,uDAAY;AAC5B;AACA,YAAY,wDAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,+BAA+B,WAAW;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,oDAAc;AAChB,iEAAe,SAAS,EAAC;AACzB,qC;;;;;;;;;;;;;;;;;;;;;;;AC1QA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACmC;AAC6H;AAC5G;AACb;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB,aAAa;AACpD;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA,mDAAmD,yDAAc;AACjE;AACA;AACA;AACA;AACA;AACA,sBAAsB,8DAAW;AACjC;AACA,qFAAqF,4EAA6B;AAClH;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAAW;AAC1B;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,YAAY;AAC3B,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B,iBAAiB;AACjB;AACA;AACA;AACA;AACA,uBAAuB,yDAAc;AACrC;AACA,4CAA4C,SAAS;AACrD,YAAY,uDAAY;AACxB;AACA,QAAQ,wDAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA,qBAAqB,4EAA6B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,4EAA6B;AAClD;AACA;AACA,iCAAiC,8EAA+B;AAChE,iCAAiC,8EAA+B;AAChE,2CAA2C,SAAS;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,cAAc,EAAC;AAC9B,0C;;;;;;;;;;;;;;;;;;;;;AClNA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACwC;AACZ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB,aAAa;AACpD;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,yDAAc;AACjE;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA,uCAAuC,uBAAuB;AAC9D,6CAA6C,4BAA4B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,yBAAyB;AACxC;AACA;AACA;AACA,wCAAwC,wDAAkB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qDAAqD;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,6BAA6B;AACpD;AACA;AACA,YAAY,uDAAY;AACxB;AACA,sCAAsC,+BAA+B;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yIAAyI,6DAA6D;AACtM;AACA;AACA;AACA;AACA,4BAA4B,uEAAuE;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,SAAS;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA,oBAAoB,uDAAY;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,YAAY;AAC3B,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,gCAAgC;AACnH,gDAAgD;AAChD;AACA;AACA;AACA;AACA,4BAA4B,8DAA8D;AAC1F;AACA,+DAA+D,iBAAiB,wCAAwC;AACxH;AACA,sBAAsB,4DAAsB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF;AACjF;AACA,kBAAkB,EAAE;AACpB;AACA,+BAA+B,gBAAgB;AAC/C;AACA,mEAAmE,SAAS;AAC5E;AACA,+FAA+F,gCAAgC;AAC/H,4DAA4D;AAC5D;AACA;AACA;AACA;AACA,wCAAwC,wDAAwD;AAChG;AACA;AACA,2EAA2E,iBAAiB,wCAAwC;AACpI;AACA,kCAAkC,4DAAsB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE,GAAG;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gCAAgC;AACpD;AACA;AACA;AACA,CAAC,CAAC,2CAAK;AACP,iEAAe,cAAc,EAAC;AAC9B,0C;;;;;;;;;;;;;;;;;;;;;;AC/UA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACgC;AACI;AAC6B;AAClE;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB,aAAa;AAC9C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA,6BAA6B,4EAA6B;AAC1D;AACA;AACA;AACA,iBAAiB,sCAAG;AACpB;AACA;AACA,6EAA6E,oDAAc;AAC3F,aAAa;AACb,oDAAoD,mFAAmF,EAAE;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,MAAM,EAAC;AACtB,kC;;;;;;;;;;;;;;;;;;;;;ACrDA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACiE;AACzB;AACzC;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB,aAAa;AAC9C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,6BAA6B,4EAA6B;AAC1D;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,iDAAW;AACb,iEAAe,IAAI,EAAC;AACpB,gC;;;;;;;;;;;;;;;;;;;;;;AC1CA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACgC;AACI;AAC6B;AAClE;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB,aAAa;AAC/C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,6BAA6B,4EAA6B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,sCAAG;AACpB;AACA;AACA;AACA,uCAAuC,oDAAc;AACrD;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,SAAS,EAAC;AACzB,qC;;;;;;;;;;;;;;;;;;;;;;ACvEA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACoC;AAC6B;AACjC;AACjC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA,wFAAwF,4EAA6B;AACrH;AACA;AACA;AACA;AACA,iBAAiB,sCAAG;AACpB;AACA,uBAAuB,sCAAG;AAC1B,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,OAAO,EAAC;AACvB,mC;;;;;;;;;;;;;;;;;;;;;ACpDA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACiE;AACzB;AACzC;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB,aAAa;AAC9C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,6BAA6B,4EAA6B;AAC1D;AACA;AACA;AACA;AACA,CAAC,CAAC,iDAAW;AACb,iEAAe,IAAI,EAAC;AACpB,gC;;;;;;;;;;;;;;;;;;;;;;ACzCA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACoC;AAC6B;AACjC;AACjC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc,aAAa;AAC1C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA,wFAAwF,6EAA8B;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sCAAG;AAC1B,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,mBAAmB,sCAAG;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,IAAI,EAAC;AACpB,gC;;;;;;;;;;;;;;;;;;;;;;ACzFA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACoC;AAC6B;AACjC;AACjC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe,aAAa;AAC3C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA,wFAAwF,4EAA6B;AACrH;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,QAAQ,sCAAG,+CAA+C,EAAE;AACzG;AACA,uBAAuB,sCAAG;AAC1B;AACA,aAAa;AACb;AACA;AACA,0BAA0B,sCAAG;AAC7B;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oCAAoC;AACtD,kBAAkB,EAAE;AACpB;AACA;AACA;AACA,yCAAyC,eAAe;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA,yCAAyC,wBAAwB;AACjE;AACA,yCAAyC,iCAAiC;AAC1E;AACA,yCAAyC,8BAA8B;AACvE;AACA,yCAAyC,6CAA6C;AACtF;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,MAAM,EAAC;AACtB,kC;;;;;;;;;;;;;;;;;;;;;;AC9HA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACoC;AAC6B;AACjC;AACjC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB,aAAa;AAChD;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA,wFAAwF,6EAA8B;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,sCAAG;AACpB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,UAAU,EAAC;AAC1B,sC;;;;;;;;;;;;;;;;;;;;;AC/EA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACiE;AACzB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB,aAAa;AAC9C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,6BAA6B,4EAA6B;AAC1D;AACA;AACA;AACA;AACA,CAAC,CAAC,iDAAW;AACb,iEAAe,QAAQ,EAAC;AACxB,oC;;;;;;;;;;;;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0CAA0C;AAC3C,uC;;;;;;;;;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4DAA4D;AAC7D,sC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5BA;AACA;AACA;AACkD;AAClD;AACqC;AACrC,yDAA2B;AAC3B;AACA;AACA;AACgD;AACU;AACV;AAChD;AACyE;AACV;AACI;AACZ;AACkB;AACT;AACQ;AACR;AACM;AACF;AACJ;AACI;AACM;AACE;AAC5E;AAC8J;AAC3G;AACP;AAC5C;AACA;AACA;AACwF;AACrB;AACD;AAClE,uC;;;;;;;;;;;;;;;;;;;;;;;ACtCA;AACA;AACA;AACoC;AACpC,gC;;;;;;;;;;;;;;;;;;;;;;ACJA,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC8B;AACiD;AAChC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD,uCAAuC,gGAA0C;AACjF,qCAAqC,gGAA0C;AAC/E,uBAAuB,oDAAc;AACrC;AACA;AACA;AACA,0EAA0E,0BAA0B,yCAAS;AAC7G;AACA;AACA;AACA,4BAA4B,QAAQ;AACpC;AACA;AACA,KAAK;AACL;AACA,iEAAe,SAAS,EAAC;AACzB,qC;;;;;;;;;;;;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA,mDAAmD,wCAAwC,EAAE;AAC7F;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,iEAAe,OAAO,EAAC;AACvB,mC;;;;;;;;;;;;;;;;;;;;;;AC3bA,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACoE;AAC3B;AACT;AAChC;AACA;AACA;AACA;AACA;AACA,iDAAiD,0CAA0C,WAAW,iCAAiC;AACvI,KAAK;AACL;AACA,iDAAiD,yCAAyC,WAAW,4BAA4B;AACjI,KAAK;AACL;AACA,iDAAiD,yCAAyC,WAAW,iBAAiB;AACtH,KAAK;AACL;AACA;AACA;AACA;AACA,kCAAkC,kDAAO;AACzC;AACA,gCAAgC,kDAAO;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,yBAAyB,4DAAoB;AAC7C,uBAAuB,4DAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,gCAAgC,UAAU;AAC1C;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,6CAAO;AACjC;AACA;AACA;AACA;AACA;AACA,sBAAsB,6CAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,6CAAO;AACjC,0BAA0B,6CAAO;AACjC;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,6CAAO;AACzC;AACA;AACA;AACA;AACA;AACA,+DAA+D,6CAAO;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAe,MAAM,EAAC;AACtB,kC;;;;;;;;;;;;;;;;;;;;;;;;;ACxJA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACqC;AACO;AACmB;AACvB;AACC;AACF;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD,+BAA+B,mBAAmB;AAClD;AACA,6BAA6B,uDAAQ;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE,GAAG;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE,GAAG;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qDAAU;AACtB;AACA;AACA;AACA;AACA,4BAA4B,4EAAsB;AAClD,yBAAyB;AACzB;AACA;AACA;AACA;AACA,4BAA4B,kFAA4B;AACxD,yBAAyB;AACzB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC,eAAe,EAAE;AACjB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,SAAS;AACxB,eAAe,2BAA2B,sBAAsB,UAAU;AAC1E;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,gDAAI;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB,eAAe,OAAO;AACtB,gBAAgB,EAAE,GAAG;AACrB;AACA;AACA;AACA,yBAAyB,kDAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,oDAAO;AACT,iEAAe,MAAM,EAAC;AACtB,kC;;;;;;;;;;;;;;;;;;;;;;;AChTA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC+B;AACS;AACA;AACG;AAC3C;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iDAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA,eAAe,oDAAoD;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,iCAAiC;AACjC;AACA,yBAAyB,qBAAqB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,4BAA4B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,wBAAwB,8GAA8G;AACtL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gBAAgB,uDAAiB;AACjC;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,8CAAG;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,iCAAiC;AACjC,6BAA6B;AAC7B;AACA;AACA,wCAAwC,gEAA0B;AAClE;AACA;AACA;AACA,uCAAuC,wBAAwB;AAC/D;AACA;AACA;AACA,oCAAoC,gEAA0B;AAC9D;AACA,0CAA0C,gEAA0B;AACpE,yCAAyC,gEAA0B;AACnE,4CAA4C,gEAA0B;AACtE,4CAA4C,gEAA0B;AACtE;AACA;AACA;AACA;AACA,mCAAmC,gEAA0B;AAC7D;AACA;AACA,4CAA4C,0DAAoB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gEAA0B;AAC/D,wCAAwC,gEAA0B;AAClE;AACA;AACA,4CAA4C,0DAAoB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,gEAA0B;AACrE,0CAA0C,gEAA0B;AACpE,2CAA2C,gEAA0B;AACrE,iDAAiD,gEAA0B;AAC3E,6CAA6C,gEAA0B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,aAAa;AACb;AACA,uBAAuB,8CAAG;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA,YAAY,4DAAY;AACxB,YAAY,4DAAY;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,4CAAM;AACR,iEAAe,YAAY,EAAC;AAC5B,wC;;;;;;;;;;;;;;;;;;;ACvdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,WAAW,EAAE;AACvE;AACA;AACA,CAAC;AACD,iEAAe,WAAW,EAAC;AAC3B,uC;;;;;;;;;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,6CAA6C;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,8CAA8C;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,6BAA6B;AAC5C;AACA;AACA;AACA;AACA,2DAA2D,SAAS;AACpE;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,OAAO,EAAC;AACvB,mC;;;;;;;;;;;;;;;;;;;;;ACzDA,CAAyD;AACc;AACvE;AACA,KAAK,qBAAqB,iFAA6B,EAAE;AACzD,KAAK,sBAAsB,kFAA8B,EAAE;AAC3D,KAAK,uBAAuB,mFAA+B,EAAE;AAC7D,KAAK,qBAAqB,iFAA6B,EAAE;AACzD;AACA;AACA,KAAK,0BAA0B,mFAAsB,EAAE;AACvD,KAAK,uBAAuB,gFAAmB,EAAE;AACjD,KAAK,2BAA2B,oFAAuB,EAAE;AACzD,KAAK,uBAAuB,gFAAmB,EAAE;AACjD,KAAK,4BAA4B,qFAAwB,EAAE;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,iBAAiB,mFAAsB;AACvC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,iEAAe,uBAAuB,EAAC;AACvC,mD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxkBA,sBAAsB,SAAI,IAAI,SAAI;AAClC,iDAAiD,QAAQ;AACzD,wCAAwC,QAAQ;AAChD,wDAAwD,QAAQ;AAChE;AACA;AACA;AACoC;AACW;AAC/C;AACqD;AACQ;AACR;AACM;AACF;AACJ;AACI;AACM;AACE;AACrB;AACkB;AACA;AACV;AACI;AACnB;AACA;AACe;AACL;AACiB;AACF;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,iEAAI;AACtB,sBAAsB,qEAAQ;AAC9B,kBAAkB,iEAAI;AACtB,qBAAqB,oEAAO;AAC5B,oBAAoB,mEAAM;AAC1B,kBAAkB,iEAAI;AACtB,oBAAoB,mEAAM;AAC1B,uBAAuB,sEAAS;AAChC,wBAAwB,uEAAU;AAClC,mBAAmB,iDAAK;AACxB,mBAAmB,wDAAK;AACxB,4BAA4B,iEAAc;AAC1C,uBAAuB,4DAAS;AAChC,yBAAyB,8DAAW;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC,eAAe,6BAA6B;AAC5C,eAAe,MAAM;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qDAAU;AACtC,6DAA6D,8CAA8C,EAAE;AAC7G;AACA;AACA;AACA;AACA;AACA,yCAAyC,8CAAM;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA,oDAAoD,0CAA0C,yEAAkC,mDAAmD;AACnL;AACA;AACA;AACA,qBAAqB,iFAAiF;AACtG;AACA;AACA;AACA,mEAAmE,4BAA4B,EAAE;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,QAAQ,sDAAU;AAClB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,MAAM;AACrB,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA,kCAAkC,4DAAS;AAC3C;AACA;AACA;AACA,kCAAkC,8DAAW;AAC7C;AACA;AACA,kCAAkC,iEAAc;AAChD;AACA;AACA;AACA;AACA,kCAAkC,4DAAS;AAC3C;AACA;AACA,kCAAkC,4DAAS;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA,sCAAsC,iDAAK;AAC3C;AACA;AACA;AACA,iBAAiB;AACjB;AACA,2CAA2C,wDAAK,sBAAsB,wDAAK;AAC3E;AACA;AACA;AACA,2CAA2C,8DAAW,sBAAsB,8DAAW;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,sBAAsB;AACrC,eAAe,wBAAwB;AACvC,eAAe,MAAM;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,8BAA8B,iDAAK,sBAAsB,iDAAK;AAC9D;AACA;AACA;AACA,mCAAmC,wDAAK;AACxC;AACA;AACA;AACA;AACA,6CAA6C,4DAAS;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,iDAAK;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,WAAW;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,iDAAK;AACrC;AACA,qCAAqC,wDAAK;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,kCAAkC,iDAAK;AACvC;AACA,qCAAqC,wDAAK;AAC1C;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD,uCAAuC,iEAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,QAAQ,sDAAU;AAClB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW;AAC7B,kBAAkB,4BAA4B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,qCAAqC,iDAAK;AAC1C;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,qCAAqC,wDAAK;AAC1C;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,qCAAqC,8DAAW;AAChD;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,qCAAqC,iEAAc;AACnD;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,qCAAqC,4DAAS;AAC9C;AACA;AACA;AACA,gBAAgB,8DAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,4BAA4B;AAC3C,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA,+BAA+B,UAAU;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,4DAAS,IAAI,wEAAiC;AACpF;AACA;AACA,2CAA2C,yEAAkC;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6EAAsC;AAClD;AACA,qCAAqC,2EAA0B;AAC/D;AACA;AACA;AACA,YAAY,4FAAqD;AACjE,YAAY,iFAA0C;AACtD;AACA,qCAAqC,iFAA0C;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,yBAAyB;AACxC,eAAe,EAAE;AACjB,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C;AACA;AACA;AACA;AACA,gBAAgB,6EAAsC;AACtD;AACA,yCAAyC,2EAA0B;AACnE;AACA;AACA;AACA,gBAAgB,4FAAqD;AACrE,gBAAgB,iFAA0C;AAC1D;AACA,yCAAyC,iFAA0C;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,4DAAS,IAAI,kFAA2C;AAC9F;AACA,4CAA4C,mFAA4C;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,4DAAS;AACnD;AACA;AACA;AACA,0CAA0C,4DAAS;AACnD;AACA;AACA;AACA,0CAA0C,iEAAc;AACxD;AACA;AACA;AACA,0CAA0C,iEAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,oBAAoB,EAAC;AACpC,0C;;;;;;;;;;;;;;;;;;;;;ACjlBA,CAAsD;AACU;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,uBAAuB,IAAI,2BAA2B,KAAK,2BAA2B;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,6DAAuB,0BAA0B,6DAAuB;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,6DAAuB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oDAAS,YAAY,oDAAS;AAC9D;AACA,2BAA2B,oDAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,6DAAuB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oDAAS,YAAY,oDAAS;AAC9D;AACA,2BAA2B,oDAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,+BAA+B;AAC5E,yDAAyD,uCAAuC;AAChG;AACA,CAAC;AACD,iEAAe,sBAAsB,EAAC;AACtC,kD;;;;;;;;;;;;;;;;;;;;;;AChLA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACuC;AACC;AACH;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,kCAAkC,kBAAkB;AACpD,mCAAmC,gBAAgB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,8CAAG;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA,2BAA2B,aAAa;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA,gBAAgB,gDAAI;AACpB;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,6BAA6B,gDAAI;AACjC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,eAAe,gDAAI;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,oDAAO;AACT,iEAAe,QAAQ,EAAC;AACxB,oC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5SA;AACA;AACA;AACA;AACA;AACO;AACA;AACA;AACP;AACA;AACA;AACA,WAAW,2CAA2C;AACtD;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjDA,CAAwC;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;;AAEnC,MAAM,kDAAmB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY,+CAAgB;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEA,YAAY,+CAAgB;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,MAAM;AACjB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,cAAc;AACzB,aAAa,KAAK;AAClB;;AAEO;AACP,wBAAwB,kDAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;;AAExD;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,KAAK;AACjB,YAAY,aAAa;AACzB,YAAY,KAAK;AACjB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,KAAK;AACjB,YAAY,aAAa;AACzB,YAAY,KAAK;AACjB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,YAAY,KAAK;AACjB;;AAEO;AACP,oBAAoB,kDAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,MAAM;AACjB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,MAAM;AACjB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB;AACA,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,+CAAgB,+BAA+B,+CAAgB,+BAA+B,+CAAgB;AAC/I;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,uEAAuE,+CAAgB,yEAAyE,+CAAgB,yEAAyE,+CAAgB,yEAAyE,+CAAgB,yEAAyE,+CAAgB,yEAAyE,+CAAgB;AAC/zC;AACA;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO,mB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrxDP,CAAwC;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;;AAEnC,MAAM,kDAAmB;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,UAAU,8CAAe;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,cAAc;AACzB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;;AAE5C;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA,8BAA8B,+CAAgB,qEAAqE,+CAAgB;AACnI;AACA;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC,G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/mBD,CAAwC;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;;AAEnC,MAAM,kDAAmB;AACzB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,UAAU,8CAAe;AACzB,UAAU,8CAAe;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,aAAa;;AAEb;AACA;AACA,qBAAqB;;AAErB;AACA;AACA,qDAAqD;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,aAAa;;AAEb;AACA;AACA,qBAAqB;;AAErB;AACA;AACA,qDAAqD;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,aAAa;;AAEb;AACA;AACA,qBAAqB;;AAErB;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB;AACxN;AACA;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC,G;;;;;;;;;;;;;AClxBD;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,qBAAqB;AACrB;AACA,wBAAwB;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,kCAAkC;AAClC;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA,6BAA6B;AAC7B;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,mCAAmC;AACnC,qBAAqB;AACrB;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,yBAAyB;AACzB,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,gDAAgD;AAChD;AACA;;AAEA;AACA,MAAM,IAA2C,EAAE,mCAAO,YAAY,qBAAqB;AAAA,kGAAC;AAC5F;AACA,MAAM,IAA8B,EAAE,oBAAoB;AAC1D;AACA,OAAO,EAAsE;AAC7E;AACA,MAAM,IAA6B;AACnC;AACA;;AAEA,CAAC;;;;;;;;;;;;;;;;;;;;ACxdD,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC,E;;;;;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;;AAEA;AACA,C;;;;;;;;;;;;;;;;;;;;ACbA,CAAqC;AACrC;AACA;AACA;AACA;;AAEA;;AAEA,eAAe,SAAS;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA,ygBAAygB;AACzgB;AACA;AACA;AACA;;AAEA,OAAO,qDAAQ;AACf;AACA;;AAEA;AACA;;AAEA,iEAAe,SAAS,E;;;;;;;;;;;;;;;;;;;;;AC7BxB,CAA2B;AACY;AACvC;AACA;AACA;;AAEA;;AAEA,cAAc;;;AAGd;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA;;AAEA;AACA,sDAAsD,4CAAG;;AAEzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA,uEAAuE;AACvE;;AAEA,2EAA2E;;AAE3E,6DAA6D;;AAE7D;AACA;AACA,GAAG;AACH;;;AAGA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;;AAEA;AACA;AACA,uBAAuB;;AAEvB,0BAA0B;;AAE1B;AACA;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA,sBAAsB;;AAEtB,mCAAmC;;AAEnC,6BAA6B;;AAE7B,iCAAiC;;AAEjC,2BAA2B;;AAE3B,iBAAiB,OAAO;AACxB;AACA;;AAEA,gBAAgB,sDAAS;AACzB;;AAEA,iEAAe,EAAE,E;;;;;;;;;;;;;;;;;;;;AC9FjB,CAA+B;;AAE/B;AACA,qCAAqC,mDAAU;AAC/C;;AAEA,iEAAe,QAAQ,E;;;;;;UCNvB;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCrBA;WACA;WACA;WACA;WACA;WACA,gCAAgC,YAAY;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,wCAAwC,yCAAyC;WACjF;WACA;WACA,E;;;;;WCPA,sF;;;;;WCAA;WACA;WACA;WACA,sDAAsD,kBAAkB;WACxE;WACA,+CAA+C,cAAc;WAC7D,E;;;;UCNA;UACA;UACA;UACA","file":"urpflanze-light.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Urpflanze\"] = factory();\n\telse\n\t\troot[\"Urpflanze\"] = factory();\n})(window, function() {\nreturn ","/**\n * Convert color to IConvertedColor\n * Supported format: 'hsla?' 'rgba?' 'hex{3,8}' number (0xFFFFFF[FF])\n *\n * @internal\n * @ignore\n * @param {(string | number)} color\n * @returns {(IConvertedColor | undefined)}\n */\nexport function parseColorAndConvert(color) {\n var parsed = parseColor(color);\n if (parsed) {\n if (parsed.type === 'hsl') {\n var _a = hslToRgb(parsed.a, parsed.b, parsed.c), r = _a[0], g = _a[1], b = _a[2];\n return {\n r: r,\n g: g,\n b: b,\n h: parsed.a,\n s: parsed.b,\n l: parsed.c,\n alpha: parsed.alpha,\n };\n }\n else {\n var _b = rgbToHsl(parsed.a, parsed.b, parsed.c), h = _b[0], s = _b[1], l = _b[2];\n return {\n h: h,\n s: s,\n l: l,\n r: parsed.a,\n g: parsed.b,\n b: parsed.c,\n alpha: parsed.alpha,\n };\n }\n }\n}\n/**\n * Convert color to IColor\n * Supported format: 'hsla?' 'rgba?' 'hex{3,8}' number (0xFFFFFF[FF])\n *\n * @internal\n * @ignore\n * @param {(string | number)} color\n * @returns {(IColor | undefined)}\n */\nexport function parseColor(color) {\n if (typeof color === 'number') {\n if (color > 0xffffff) {\n return {\n type: 'rgb',\n a: (color >> 24) & 255,\n b: (color >> 16) & 255,\n c: (color >> 8) & 255,\n alpha: (color & 255) / 255,\n };\n }\n else {\n return { type: 'rgb', a: (color >> 16) & 255, b: (color >> 8) & 255, c: color & 255, alpha: 1 };\n }\n }\n color = color.replace(/\\s/g, '');\n var match = /^#([0-9a-f]{3,8})$/i.exec(color);\n if (match) {\n var hex = match[1];\n if (hex.length === 3) {\n return {\n type: 'rgb',\n a: parseInt(hex[0] + hex[0], 16),\n b: parseInt(hex[1] + hex[1], 16),\n c: parseInt(hex[2] + hex[2], 16),\n alpha: 1,\n };\n }\n else {\n return {\n type: 'rgb',\n a: parseInt(hex[0] + hex[1], 16),\n b: parseInt(hex[2] + hex[3], 16),\n c: parseInt(hex[4] + hex[5], 16),\n alpha: hex.length > 6 ? parseInt(hex.substring(6), 16) / 255 : 1,\n };\n }\n }\n match = /^((hsl|rgb)a?)\\((\\d+),(\\d+)%?,(\\d+)%?,?(.+)?\\)$/i.exec(color);\n if (match) {\n var _a = match, type = _a[2], a = _a[3], b = _a[4], c = _a[5], alpha = _a[6];\n return {\n type: type,\n a: +a,\n b: +b,\n c: +c,\n alpha: alpha ? +alpha : 1,\n };\n }\n}\n/**\n * Convert hsl color to rgb\n *\n * @internal\n * @ignore\n * @param {number} h\n * @param {number} s\n * @param {number} l\n * @returns {[number, number, number]}\n */\nexport function hslToRgb(h, s, l) {\n h /= 360;\n s /= 100;\n l /= 100;\n var r, g, b;\n if (s == 0) {\n r = g = b = l; // achromatic\n }\n else {\n var hue2rgb = function (p, q, t) {\n t += t < 0 ? 1 : t > 1 ? -1 : 0;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n };\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n return [(0.5 + r * 255) << 0, (0.5 + g * 255) << 0, (0.5 + b * 255) << 0];\n}\n/**\n * Convert rbg to hsl\n *\n * @internal\n * @ignore\n * @param {number} r\n * @param {number} g\n * @param {number} b\n * @returns {[number, number, number]} (0-360, 0-100, 0-100)\n */\nexport function rgbToHsl(r, g, b) {\n r /= 255;\n g /= 255;\n b /= 255;\n var max = Math.max(r, g, b), min = Math.min(r, g, b);\n var h, s;\n var l = (max + min) / 2;\n if (max == min) {\n h = s = 0; // achromatic\n }\n else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h = h / 6;\n }\n return [(0.5 + h * 360) << 0, (0.5 + s * 100) << 0, (0.5 + l * 100) << 0];\n}\n//# sourceMappingURL=Color.js.map","import SimplexNoise from 'simplex-noise';\nimport { ERepetitionType, IRepetition } from \"./core/types/scene-child\";\n// import SceneChild from '@core/SceneChild'\nimport { vec2 } from 'gl-matrix';\n// import Scene from '@core/Scene'\n/**\n * @ignore\n */\nexport var parseFunction = {\n suffix: '$fn:',\n parse: function (data) {\n return typeof data === 'function' && data.name !== 'SimpleAnimation' ? parseFunction.suffix + data.toString() : data;\n },\n unparse: function (data) {\n return typeof data === 'string' && data.indexOf(parseFunction.suffix) === 0\n ? eval(data.substr(parseFunction.suffix.length))\n : data;\n },\n};\n/**\n * Create Cancellable Promise\n *\n * @ignore\n * @template T\n * @param {Promise} promise\n * @returns {ICancelablePromise}\n */\nexport function cancelablePromise(promise) {\n var resolved = false;\n var canceled = false;\n var wrappedPromise = new Promise(function (resolve, reject) {\n promise\n .then(function (val) {\n resolved = true;\n canceled ? reject('canceled') : resolve(val);\n })\n .catch(function (error) {\n resolved = true;\n canceled ? reject('canceled') : reject(error);\n });\n });\n return {\n promise: wrappedPromise,\n resolved: function () { return resolved; },\n canceled: function () { return canceled; },\n cancel: function () {\n canceled = true;\n },\n };\n}\n// isDef: (object: any): boolean => typeof object !== 'undefined' && object !== null,\n/**\n * Get current timestamp in milliseconds\n *\n * @ignore\n * @returns {number}\n */\nexport function now() {\n return performance.now();\n}\n// aOr: (...args: Array): any => {\n// \tfor (let i = 0; i < args.length; i++) if (Utilities.isDef(args[i])) return args[i]\n// },\n/**\n * Convert number from radians to degrees\n *\n * @category Utilities\n *\n * @example\n * ```javascript\n * Urpflanze.toDegrees(Math.PI) // 180\n * ```\n *\n * @param {number} radians\n * @returns {number}\n */\nexport function toDegrees(radians) {\n return (radians * 180) / Math.PI;\n}\n/**\n * Convert angle from degrees to radians\n * @example\n * ```javascript\n * Urpflanze.toRadians(180) // 3.141592653589793\n * ```\n *\n * @category Utilities\n * @param {number} degrees\n * @returns {number}\n */\nexport function toRadians(degrees) {\n return (degrees * Math.PI) / 180;\n}\n// perf: (name: string, callback: any, log: boolean = false): number => {\n// \tconst t1 = now()\n// \tcallback()\n// \tconst t2 = now()\n// \tlog && console.log('perf ' + name + ': ' + (t2 - t1))\n// \treturn t2 - t1\n// }\n/**\n * Force value to array\n *\n * @ignore\n * @param {(number | Array)} t\n * @returns {Array}\n */\nexport function toArray(t) {\n return Array.isArray(t) ? t : [t, t];\n}\n/**\n * Linear interpolation from `a` when `i` as 0 an `b` when `i' as 1\n *\n * @category Utilities\n * @param {number} a\n * @param {number} b\n * @param {number} i\n * @returns {number}\n */\nexport function lerp(a, b, i) {\n return (1 - i) * a + i * b;\n}\n/**\n * Return number between min and max\n *\n * @category Utilities\n * @example\n * ```javascript\n * Urpflanze.clamp(0, 1, 1.2) // 1\n * Urpflanze.clamp(0, 1, -2) // 0\n * ```\n * @param {number} min\n * @param {number} max\n * @param {number} value\n * @returns {number}\n */\nexport function clamp(min, max, value) {\n return value <= min ? min : value >= max ? max : value;\n}\n/**\n * Map number between refMin e refMax from min and max\n *\n * @category Utilities\n *\n * @example\n * ```javascript\n * Urpflanze.relativeClamp(0, 1, 0.5, 100, 200) // 150\n * ```\n *\n * @param {number} refMin\n * @param {number} refMax\n * @param {number} value\n * @param {number} toMin\n * @param {number} toMax\n * @returns {number}\n */\nexport function relativeClamp(refMin, refMax, value, toMin, toMax) {\n return clamp(toMin, toMax, ((value - refMin) / (refMax - refMin)) * (toMax - toMin) + toMin);\n}\n/**\n * @internal\n * @ignore\n */\nvar noises = {\n random: new SimplexNoise(Math.random),\n};\n/**\n * SimplexNoise\n * Use 'random' as seed property for random seed.\n * Return value between -1 and 1\n *\n * @category Utilities\n *\n * @param {string} [seed='random']\n * @param {number} [x=0]\n * @param {number} [y=0]\n * @param {number} [z=0]\n * @returns {number}\n */\nexport function noise(seed, x, y, z) {\n if (seed === void 0) { seed = 'random'; }\n if (x === void 0) { x = 0; }\n if (y === void 0) { y = 0; }\n if (z === void 0) { z = 0; }\n if (typeof noises[seed] === 'undefined') {\n noises[seed] = new SimplexNoise(seed);\n }\n return noises[seed].noise3D(x, y, z);\n}\n/**\n * Return angle (atan) from offset (or center) for matrix repetition.\n * Offset is array between [-1, -1] and [1, 1].\n * The return value is between -Math.PI / 2 and Math.PI / 2\n *\n * @category Utilities\n *\n * @param {IRepetition} repetition\n * @param {vec2} offsetFromCenter\n * @returns {number}\n */\nexport function angleFromRepetition(repetition, offsetFromCenter) {\n if (offsetFromCenter === void 0) { offsetFromCenter = [0, 0]; }\n if (repetition.type == ERepetitionType.Matrix) {\n var centerMatrix = vec2.fromValues((repetition.col.count - 1) / 2, (repetition.row.count - 1) / 2);\n centerMatrix[0] += centerMatrix[0] * offsetFromCenter[0];\n centerMatrix[1] += centerMatrix[1] * offsetFromCenter[1];\n var x = repetition.col.index - 1 - centerMatrix[0];\n var y = repetition.row.index - 1 - centerMatrix[1];\n return x === 0 ? 0 : Math.atan(y / x);\n }\n return (repetition.angle - Math.PI) / 2;\n}\n/**\n * Return angle (atan2, 4 quadrants) from offset (or center) for matrix repetition.\n * Offset is array between [-1, -1] and [1, 1].\n * The return value is between -Math.PI an Math.PI\n *\n * @category Utilities\n *\n * @param {IRepetition} repetition\n * @param {vec2} offsetFromCenter\n * @returns {number}\n */\nexport function angle2FromRepetition(repetition, offsetFromCenter) {\n if (offsetFromCenter === void 0) { offsetFromCenter = [0, 0]; }\n if (repetition.type == ERepetitionType.Matrix) {\n var centerMatrix = vec2.fromValues((repetition.col.count - 1) / 2, (repetition.row.count - 1) / 2);\n centerMatrix[0] += centerMatrix[0] * offsetFromCenter[0];\n centerMatrix[1] += centerMatrix[1] * offsetFromCenter[1];\n var x = repetition.col.index - 1 - centerMatrix[0];\n var y = repetition.col.index - 1 - centerMatrix[1];\n return x === 0 ? 0 : Math.atan2(y, x);\n }\n return repetition.angle - Math.PI;\n}\n/**\n * Return distance from offset (or center) for matrix repetition.\n * The return value is between 0 and 1\n *\n * @category Utilities\n *\n * @param {IRepetition} repetition\n * @param {vec2} offsetFromCenter offset relative to distance prop\n * @returns {number}\n */\nexport function distanceFromRepetition(repetition, offsetFromCenter) {\n if (offsetFromCenter === void 0) { offsetFromCenter = [0, 0]; }\n if (repetition.type == ERepetitionType.Matrix) {\n var centerMatrix = vec2.fromValues(0.5, 0.5);\n centerMatrix[0] += centerMatrix[0] * offsetFromCenter[0];\n centerMatrix[1] += centerMatrix[1] * offsetFromCenter[1];\n var current = vec2.fromValues(repetition.col.offset - 0.5 / repetition.col.count, repetition.row.offset - 0.5 / repetition.row.count);\n return vec2.distance(current, centerMatrix);\n }\n return 1;\n}\n// /**\n// * Get value percentage of scene width.\n// *\n// * @param {number} percentage\n// * @param {SceneChild} sceneChild\n// * @returns {number}\n// */\n// percW: (percentage: number, sceneChild: SceneChild | Scene): number => {\n// \tif (sceneChild instanceof Scene) return (sceneChild.width * percentage) / 100\n// \treturn sceneChild && sceneChild.scene ? (sceneChild.scene.width * percentage) / 100 : percentage\n// },\n// /**\n// * Get value percentage of scene height.\n// *\n// * @param {number} percentage\n// * @param {SceneChild} sceneChild\n// * @returns {number}\n// */\n// percH: (percentage: number, sceneChild: SceneChild | Scene): number => {\n// \tif (sceneChild instanceof Scene) return (sceneChild.height * percentage) / 100\n// \treturn sceneChild && sceneChild.scene ? (sceneChild.scene.height * percentage) / 100 : percentage\n// },\n//# sourceMappingURL=Utilites.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport Scene from \"./Scene\";\nimport SceneChild from \"./SceneChild\";\nimport ShapeBase from \"./shapes/ShapeBase\";\nimport Bounding from \"./math/bounding\";\n/**\n * A SceneChild container, propagates properties to children\n *\n * @order 3\n * @category Core.Scene\n * @extends {SceneChild}\n * @example\n * ```javascript\n * // Group example\n *\n * const rect = new Urpflanze.Rect({\n * \tdistance: 100 // <- if a property is set the group will not overwrite it\n * })\n * const group = new Urpflanze.Group({\n * \trepetitions: 3,\n * \tdistance: 200\n * })\n *\n * group.add(rect)\n * group.add(new Urpflanze.Triangle())\n * ```\n * @class Group\n */\nvar Group = /** @class */ (function (_super) {\n __extends(Group, _super);\n /**\n * Creates an instance of Group\n *\n * @param {ISceneChildSettings} [settings={}]\n * @memberof Group\n */\n function Group(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = 'Group';\n _this = _super.call(this, settings) || this;\n _this.children = [];\n ['id', 'name', 'data', 'order', 'type'].forEach(function (prop) {\n if (prop in settings)\n delete settings[prop];\n });\n _this.props = settings;\n return _this;\n }\n /**\n * Check group has static children\n *\n * @returns {boolean}\n * @memberof Group\n */\n Group.prototype.isStatic = function () {\n var children = this.children;\n for (var i = 0, len = children.length; i < len; i++)\n if (!children[i].isStatic())\n return false;\n return true;\n };\n /**\n * Check group has static children indexed\n *\n * @returns {boolean}\n * @memberof Group\n */\n Group.prototype.isStaticIndexed = function () {\n var children = this.children;\n for (var i = 0, len = children.length; i < len; i++)\n if (!children[i].isStaticIndexed())\n return false;\n return true;\n };\n /**\n * Add item to Group\n *\n * @param {Array} items\n * @memberof Group\n */\n Group.prototype.add = function () {\n var _this = this;\n var items = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n items[_i] = arguments[_i];\n }\n var _loop_1 = function (i, len) {\n var item = items[i];\n var rawItemProps = item.getProps();\n Object.keys(this_1.props).forEach(function (propKey) {\n if (typeof rawItemProps[propKey] === 'undefined')\n item.setProp(propKey, _this.props[propKey]);\n });\n item.order =\n typeof item.order !== 'undefined'\n ? item.order\n : this_1.children.length > 0\n ? Math.max.apply(this_1, this_1.children.map(function (e) { return e.order || 0; })) + 1\n : 0;\n this_1.scene && Scene.propagateToChilden(item, this_1.scene);\n this_1.children.push(item);\n };\n var this_1 = this;\n for (var i = 0, len = items.length; i < len; i++) {\n _loop_1(i, len);\n }\n this.sortChildren();\n };\n /**\n * Sort children\n *\n * @memberof Group\n */\n Group.prototype.sortChildren = function () {\n this.children.sort(function (a, b) { return a.order - b.order; });\n this.children = this.children.map(function (child, index) {\n child.order = index;\n return child;\n });\n this.clearBuffer(true);\n };\n /**\n * Return shape children\n *\n * @returns {Array}\n * @memberof Group\n */\n Group.prototype.getChildren = function () {\n return this.children;\n };\n /**\n * Find scene child from id or name\n *\n * @param {number | string} idOrName\n * @returns {(SceneChild | null)}\n * @memberof Group\n */\n Group.prototype.find = function (idOrName) {\n if (this.id === idOrName || this.name === idOrName)\n return this;\n var children = this.getChildren();\n for (var i = 0, len = children.length; i < len; i++) {\n var result = children[i].find(idOrName);\n if (result !== null)\n return result;\n }\n return null;\n };\n /**\n * Get item from group\n *\n * @param {number} index\n * @returns {(SceneChild | null)}\n * @memberof Group\n */\n Group.prototype.get = function (index) {\n return index >= 0 && index < this.children.length ? this.children[index] : null;\n };\n /**\n * Remove item from group\n *\n * @param {number} index\n * @returns {(false | Array)}\n * @memberof Group\n */\n Group.prototype.remove = function (index) {\n if (index >= 0 && index < this.children.length) {\n var removed = this.children.splice(index, 1);\n this.clearBuffer(true);\n return removed;\n }\n return false;\n };\n /**\n * Remove from id\n *\n * @param {number} id\n * @memberof Scene\n */\n Group.prototype.removeFromId = function (id) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i].id == id) {\n this.children.splice(i, 1);\n return this.clearBuffer(true);\n }\n }\n };\n /**\n * Generate children buffers\n *\n * @param {number} generateId\n * @param {boolean} [bDirectSceneChild=false]\n * @param {ISceneChildPropArguments} [parentPropArguments]\n * @memberof Group\n */\n Group.prototype.generate = function (generateId, bDirectSceneChild, parentPropArguments) {\n if (bDirectSceneChild === void 0) { bDirectSceneChild = false; }\n this.children.forEach(function (item) { return item.generate(generateId, bDirectSceneChild, parentPropArguments); });\n };\n /**\n * Sum the children bounding\n *\n * @return {IShapeBounding}\n */\n Group.prototype.getBounding = function () {\n var boundings = [];\n var bounding = Bounding.empty();\n if (this.children.length > 0) {\n this.children.forEach(function (item) { return boundings.push(item.getBounding()); });\n for (var i = 0, len = this.children.length; i < len; i++) {\n bounding.x = bounding.x > boundings[i].x ? boundings[i].x : bounding.x;\n bounding.y = bounding.y > boundings[i].y ? boundings[i].y : bounding.y;\n bounding.width = bounding.width < boundings[i].width ? boundings[i].width : bounding.width;\n bounding.height = bounding.height < boundings[i].height ? boundings[i].height : bounding.height;\n }\n bounding.cx = bounding.x + bounding.width / 2;\n bounding.cy = bounding.y + bounding.height / 2;\n }\n return bounding;\n };\n /**\n * Chear children buffer\n *\n * @param {boolean} [bClearIndexed=false]\n * @param {boolean} [bPropagateToParents=false]\n * @memberof Group\n */\n Group.prototype.clearBuffer = function (bClearIndexed, bPropagateToParents) {\n if (bClearIndexed === void 0) { bClearIndexed = false; }\n if (bPropagateToParents === void 0) { bPropagateToParents = true; }\n this.children.forEach(function (item) { return item.clearBuffer(bClearIndexed, false); });\n if (this.scene && bPropagateToParents) {\n var parents = this.scene.getParentsOfSceneChild(this);\n parents.length > 0 && parents[parents.length - 1].clearBuffer(bClearIndexed, bPropagateToParents /* true */);\n }\n // if (bPropagateToParents && this.scene)\n // {\n // const parents = this.scene.getParentsOfSceneChild(this)\n // parents.length > 0 && parents[parents.length - 1].clearBuffer(bClearIndexed, true, false)\n // }\n // if (bPropagateToChildren)\n // {\n // this.children.forEach(sceneChild => sceneChild.clearBuffer(bClearIndexed, false, true))\n // }\n };\n /**\n * Set a single or multiple props\n *\n * @abstract\n * @param {(keyof ISceneChildProps | ISceneChildProps)} key\n * @param {*} [value]\n * @memberof SceneChild\n */\n Group.prototype.setProp = function (key, value) {\n var _this = this;\n if (typeof key === 'object')\n Object.keys(key).forEach(function (k) { return (_this.props[k] = key[k]); });\n else\n this.props[key] = value;\n this.children.forEach(function (item) { return item.setProp(key, value); });\n };\n /**\n * Set a single or multiple props\n *\n * @param {(keyof ISceneChildProps | ISceneChildProps)} key\n * @param {*} [value]\n * @memberof ShapeBase\n */\n Group.prototype.setPropUnsafe = function (key, value) {\n _super.prototype.setPropUnsafe.call(this, key, value);\n this.children.forEach(function (item) { return item.setPropUnsafe(key, value); });\n };\n /**\n * Return length of buffer\n *\n * @param {ISceneChildPropArguments} propArguments\n * @returns {number}\n * @memberof Group\n */\n Group.prototype.getBufferLength = function (propArguments) {\n return this.children.map(function (sceneChild) { return sceneChild.getBufferLength(propArguments); }).reduce(function (p, c) { return p + c; }, 0);\n };\n /**\n * return a single buffer binded from children\n *\n * @returns {Float32Array}\n * @memberof Group\n */\n Group.prototype.getBuffer = function () {\n var buffers = this.children\n .map(function (item) { return item.getBuffer(); })\n .filter(function (b) { return b !== undefined; });\n var size = buffers.reduce(function (currLength, buffer) { return currLength + buffer.length; }, 0);\n if (size > 0) {\n var result = new Float32Array(size);\n result.set(buffers[0], 0);\n for (var i = 1, offset = 0, len = buffers.length; i < len; i++) {\n offset += buffers[i - 1].length;\n result.set(buffers[i], offset);\n }\n return result;\n }\n return ShapeBase.EMPTY_BUFFER;\n };\n /**\n * return a single buffer binded from children\n *\n * @returns {(Array | undefined)}\n * @memberof Group\n */\n Group.prototype.getIndexedBuffer = function () {\n var indexed = this.children.map(function (item) { return item.getIndexedBuffer(); }).filter(function (b) { return b !== undefined; });\n return [].concat.apply([], indexed);\n };\n /**\n * Call strem on children\n *\n * @param {(streamArguments: IStreamArguments) => void} callback\n * @memberof Group\n */\n Group.prototype.stream = function (callback) {\n this.children.forEach(function (item) { return item.stream(callback); });\n };\n return Group;\n}(SceneChild));\nexport default Group;\n//# sourceMappingURL=Group.js.map","import SceneChild from \"./SceneChild\";\nimport Group from \"./Group\";\nimport Shape from \"./shapes/Shape\";\n/**\n * Container for all SceneChild.\n * The main purpose is to manage the drawing order and update the child buffers\n *\n * @order 1\n * @category Core.Scene\n * @class Scene\n */\nvar Scene = /** @class */ (function () {\n /**\n * Creates an instance of Scene.\n * You can see the default values in the property definitions\n */\n function Scene(settings) {\n if (settings === void 0) { settings = {}; }\n /**\n * Logical number, the drawer will take care of defining the unit of measure\n */\n this.width = 400;\n /**\n * Logical number, the drawer will take care of defining the unit of measure\n */\n this.height = 400;\n /**\n * Default background color (black)\n */\n this.background = 'hsla(0, 0%, 0%, 1)';\n /**\n * Default ScenePrimitive stroke color (white)\n */\n this.color = 'hsla(0, 0%, 100%, 1)';\n /**\n * Current time\n */\n this.currentTime = 0;\n if (typeof settings.width !== 'undefined')\n this.width = settings.width;\n if (typeof settings.height !== 'undefined')\n this.height = settings.height;\n if (typeof settings.background !== 'undefined')\n this.background = settings.background;\n if (typeof settings.color !== 'undefined')\n this.color = settings.color;\n this.children = [];\n this.center = [this.width / 2, this.height / 2];\n }\n /**\n * Return width percentage\n *\n * @param {number} [percentage=100]\n * @returns {number}\n */\n Scene.prototype.getWidth = function (percentage) {\n if (percentage === void 0) { percentage = 100; }\n return (this.width * percentage) / 100;\n };\n /**\n * Return height percentage\n *\n * @param {number} [percentage=100]\n * @returns {number}\n */\n Scene.prototype.getHeight = function (percentage) {\n if (percentage === void 0) { percentage = 100; }\n return (this.height * percentage) / 100;\n };\n /**\n * Resize the scene size\n *\n * @param {number} width\n * @param {number} [height=width]\n * @memberof Scene\n */\n Scene.prototype.resize = function (width, height) {\n if (height === void 0) { height = width; }\n this.width = width;\n this.height = height;\n this.center = [this.width / 2, this.height / 2];\n this.children.forEach(function (sceneChild) { return sceneChild.clearBuffer(true, false); });\n };\n /**\n * Update all children, generate a streamable buffer for drawing\n *\n * @param {number} [atTime] time in ms\n * @memberof Scene\n */\n Scene.prototype.update = function (atTime) {\n this.currentTime = atTime;\n for (var i = 0, len = this.children.length; i < len; i++) {\n this.children[i].generate(this.currentTime, true);\n }\n };\n /**\n * Traverse the child buffer and use it with callback\n *\n * @param {(streamArguments: IStreamArguments) => void} callback\n * @memberof Scene\n */\n Scene.prototype.stream = function (callback) {\n this.children.forEach(function (sceneChild) { return sceneChild.stream(callback); });\n };\n /*\n |--------------------------------------------------------------------------\n | SceneChild\n |--------------------------------------------------------------------------\n */\n /**\n * Return a list of children\n *\n * @returns {Array}\n * @memberof Scene\n */\n Scene.prototype.getChildren = function () {\n return this.children;\n };\n /**\n * Add SceneChild to Scene, pass `order` as last parameter for drawing priorities\n *\n * @param {Array} items\n * @param {number} [order]\n * @memberof Scene\n */\n Scene.prototype.add = function () {\n var items = []; /**, order: number */\n for (var _i = 0 /**, order: number */; _i < arguments.length /**, order: number */; _i++ /**, order: number */) {\n items[_i] = arguments[_i]; /**, order: number */\n }\n var order = typeof items[items.length - 1] === 'number' ? items[items.length - 1] : undefined;\n var len = items.length - (typeof order === 'undefined' ? 0 : 1);\n for (var i = 0; i < len; i++) {\n var item = items[i];\n item.order =\n typeof order !== 'undefined'\n ? order + i\n : typeof item.order !== 'undefined'\n ? item.order\n : this.children.length > 0\n ? Math.max.apply(this, this.children.map(function (e) { return e.order || 0; })) + 1\n : 0;\n Scene.propagateToChilden(item, this);\n this.children.push(item);\n item.clearBuffer(true, false);\n }\n this.sortChildren();\n };\n /**\n * Sort children by order\n *\n * @memberof Scene\n */\n Scene.prototype.sortChildren = function () {\n this.children.sort(function (a, b) { return a.order - b.order; });\n this.children = this.children.map(function (child, index) {\n child.order = index;\n return child;\n });\n };\n /**\n * Find sceneChild from id or name in the whole scene\n *\n * @param {string | number} idOrName\n * @returns {(SceneChild | null)}\n * @memberof Scene\n */\n Scene.prototype.find = function (idOrName) {\n var children = this.getChildren();\n for (var i = 0, len = children.length; i < len; i++) {\n var result = children[i].find(idOrName);\n if (result !== null)\n return result;\n }\n return null;\n };\n /**\n * Get shape by index\n *\n * @param {number} index\n * @returns {(SceneChild | null)}\n * @memberof Scene\n */\n Scene.prototype.get = function (index) {\n return index >= 0 && index < this.children.length ? this.children[index] : null;\n };\n /**\n * Remove a shape by index\n *\n * @param {number} index\n * @memberof Scene\n */\n Scene.prototype.remove = function (index) {\n index >= 0 && index < this.children.length && this.children.splice(index, 1);\n };\n /**\n * Removes all children\n *\n * @memberof Scene\n */\n Scene.prototype.removeChildren = function () {\n this.children = [];\n };\n /**\n * Remove sceneChild by id or name\n *\n * @param {number | number} idOrName\n * @memberof Scene\n */\n Scene.prototype.removeFromId = function (idOrName) {\n for (var i = 0, len = this.children.length; i < len; i++)\n if (this.children[i].id === idOrName || this.children[i].name === idOrName) {\n this.children.splice(i, 1);\n return;\n }\n };\n /**\n * Return true if sceneChild is direct children\n *\n * @param {SceneChild} sceneChild\n * @returns {boolean}\n * @memberof Scene\n */\n Scene.prototype.isFirstLevelChild = function (sceneChild) {\n for (var i = 0, len = this.children.length; i < len; i++)\n if (this.children[i].id === sceneChild.id)\n return true;\n var parents = this.getParentsOfSceneChild(sceneChild);\n return parents.length === 1 && parents[0] instanceof Group;\n };\n /**\n * Returns the list of sceneChild hierarchy starting from the scene\n *\n * @param {SceneChild} sceneChild\n * @returns {Array}\n * @memberof Scene\n */\n Scene.prototype.getParentsOfSceneChild = function (sceneChild) {\n var result = Scene.getParentsOfSceneChild(this, sceneChild);\n if (result) {\n result.splice(0, 1);\n return result;\n }\n return [];\n };\n /**\n * Returns the list of sceneChild hierarchy starting from the scene\n *\n * @static\n * @param {(Scene | SceneChild)} current\n * @param {SceneChild} sceneChild\n * @param {(Array)} [parents=[]]\n * @returns {(Array | null)}\n * @memberof Scene\n */\n Scene.getParentsOfSceneChild = function (current, sceneChild, parents) {\n if (parents === void 0) { parents = []; }\n var result;\n if (current instanceof SceneChild) {\n if (current.id == sceneChild.id)\n return parents;\n if (current instanceof Shape && current.shape) {\n var tmpParents = parents.slice();\n tmpParents.push(current);\n if ((result = Scene.getParentsOfSceneChild(current.shape, sceneChild, tmpParents)))\n return result;\n }\n }\n if (current instanceof Scene || current instanceof Group) {\n var children = current.getChildren();\n parents.push(current);\n for (var i = 0, len = children.length; i < len; i++) {\n var child = children[i];\n if ((result = Scene.getParentsOfSceneChild(child, sceneChild, parents)))\n return result;\n }\n parents.pop();\n }\n return null;\n };\n /**\n * Walk through the scene\n *\n * @static\n * @param {SceneChild} callbackk\n * @param {(Scene | SceneChild)} current\n * @memberof Scene\n */\n Scene.walk = function (callback, current) {\n if (current instanceof SceneChild) {\n if (callback(current) === false)\n return false;\n if (current instanceof Shape && current.shape)\n if (Scene.walk(callback, current.shape) === false)\n return false;\n }\n if (current instanceof Scene || current instanceof Group) {\n var children = current.getChildren();\n for (var i = 0, len = children.length; i < len; i++) {\n var child = children[i];\n if (Scene.walk(callback, child) === false)\n return false;\n }\n }\n };\n /**\n * Propagate scene to sceneChild (and children)\n *\n * @static\n * @param {SceneChild} sceneChild\n * @param {Scene} scene\n * @memberof Scene\n */\n Scene.propagateToChilden = function (sceneChild, scene) {\n sceneChild.scene = scene;\n if (sceneChild instanceof Group) {\n sceneChild.getChildren().forEach(function (item) {\n Scene.propagateToChilden(item, scene);\n });\n }\n else if (sceneChild instanceof Shape && sceneChild.shape) {\n sceneChild.shape.scene = scene;\n Scene.propagateToChilden(sceneChild.shape, scene);\n }\n };\n return Scene;\n}());\nexport default Scene;\n//# sourceMappingURL=Scene.js.map","/**\n * Autoincrement sceneChild default id\n *\n * @internal\n * @ignore\n */\nvar __id = 0;\n/**\n * The element to be added into a scene.\n * Preserve props, drawing order, generate and return buffers.\n * The only implementations of this class are Group and ShapeBase\n *\n * @abstract\n * @category Core.Abstract\n * @order 2\n * @class SceneChild\n */\nvar SceneChild = /** @class */ (function () {\n /**\n * Creates an instance of SceneChild.\n * Base values will be assigned in case they are not passed\n *\n * @param {ISceneChildSettings} settings\n */\n function SceneChild(settings) {\n var _a;\n this.id = (_a = settings.id) !== null && _a !== void 0 ? _a : ++__id;\n this.type = settings.type || 'SceneChild';\n this.name = settings.name || this.type + '_' + this.id;\n this.data = settings.data || {};\n this.props = {};\n }\n /**\n * Find this or form or children.\n * Overridden by classes that extend it\n *\n * @param {string | number} idOrName\n * @returns {(SceneChild | null)}\n */\n SceneChild.prototype.find = function (idOrName) {\n if (this.id === idOrName || this.name === idOrName)\n return this;\n return null;\n };\n /**\n * Return the sceneChild properties\n *\n * @returns {ISceneChildProps}\n */\n SceneChild.prototype.getProps = function () {\n return this.props;\n };\n /**\n * Return a sceneChild prop or default value\n *\n * @param {keyof ISceneChildProps} key\n * @param {ISceneChildPropArguments} [propArguments]\n * @param {*} [defaultValue]\n * @returns {*}\n */\n SceneChild.prototype.getProp = function (key, propArguments, defaultValue) {\n var _a;\n return ((_a = this.props[key]) !== null && _a !== void 0 ? _a : defaultValue);\n };\n /**\n * Set a single or multiple props\n *\n * @param {(keyof ISceneChildProps | ISceneChildProps)} key\n * @param {*} [value]\n */\n SceneChild.prototype.setPropUnsafe = function (key, value) {\n var _this = this;\n if (typeof key == 'string')\n this.props[key] = value;\n else\n Object.keys(key).forEach(function (k) {\n return (_this.props[k] = key[k]);\n });\n };\n return SceneChild;\n}());\nexport default SceneChild;\n//# sourceMappingURL=SceneChild.js.map","/**\n * Temporany matrix\n *\n * @internal\n * @ignore\n */\nvar MATRIX = new Array(4);\n/**\n * Vec2 operation\n *\n * @category Core.Utilities\n */\nvar Vec2 = {\n /**\n * Create new vertex\n *\n * @param {Array | number} [x=0]\n * @param {number} [y]\n * @returns {Array}\n */\n create: function (x, y) {\n if (x === void 0) { x = 0; }\n var out = new Array(2);\n if (typeof x === 'number') {\n out[0] = x;\n out[1] = y !== null && y !== void 0 ? y : x;\n }\n else {\n out[0] = x[0];\n out[1] = x[1];\n }\n return out;\n },\n normalize: function (v) {\n var len = Vec2.length(v);\n return len !== 0 ? [v[0] / len, v[1] / len] : [0, 0];\n },\n /**\n * Distance between two points\n *\n * @param {Array} a\n * @param {Array} b\n * @returns {number}\n */\n distance: function (a, b) { return Math.hypot(b[0] - a[0], b[1] - a[1]); },\n /**\n * dot product\n *\n * @param {Array} a\n * @param {Array} b\n * @returns {number}\n */\n dot: function (a, b) { return a[0] * b[0] + a[1] * b[1]; },\n /**\n * length of point\n *\n * @param {Array} vec\n * @returns {number}\n */\n length: function (vec) { return Math.hypot(vec[0], vec[1]); },\n /**\n * angle between two point\n *\n * @param {Array} a\n * @param {Array} b\n * @returns {number}\n */\n angle: function (a, b) {\n a = Vec2.normalize(a);\n b = Vec2.normalize(b);\n return Math.acos(Vec2.dot(a, b));\n },\n /**\n * skewX point\n *\n * @param {Array} vec\n * @param {number} m\n */\n skewX: function (vec, m) {\n vec[0] += Math.tan(m) * vec[1];\n },\n /**\n * skewY point\n *\n * @param {Array} vec\n * @param {number} m\n */\n skewY: function (vec, m) {\n vec[1] += Math.tan(m) * vec[0];\n },\n /**\n * squeezeX point\n *\n * @param {Array} vec\n * @param {number} m\n */\n squeezeX: function (vec, m) {\n vec[1] += vec[1] * (vec[0] * -m);\n },\n /**\n * squeezeY point\n *\n * @param {Array} vec\n * @param {number} m\n */\n squeezeY: function (vec, m) {\n vec[0] += vec[0] * (vec[1] * m);\n },\n /**\n * Rotate point\n *\n * @param {Array} vec\n * @param {Array} MATRIX\n * @param {Array} fromPoint\n * @internal\n */\n rotate: function (vec, MATRIX, fromPoint) {\n var p0 = vec[0] - fromPoint[0];\n var p1 = vec[1] - fromPoint[1];\n vec[0] = p0 * MATRIX[0] + p1 * MATRIX[1] + fromPoint[0];\n vec[1] = p0 * MATRIX[2] + p1 * MATRIX[3] + fromPoint[1];\n },\n /**\n * RotateX point\n *\n * @param {Array} vec\n * @param {Array} fromPoint\n * @param {number} rad\n */\n rotateX: function (vec, fromPoint, rad) {\n MATRIX[0] = 1;\n MATRIX[1] = 0;\n MATRIX[2] = 0;\n MATRIX[3] = Math.cos(rad);\n Vec2.rotate(vec, MATRIX, fromPoint);\n },\n /**\n * RotateY point\n *\n * @param {Array} vec\n * @param {Array} fromPoint\n * @param {number} rad\n */\n rotateY: function (vec, fromPoint, rad) {\n MATRIX[0] = Math.cos(rad);\n MATRIX[1] = 0;\n MATRIX[2] = 0;\n MATRIX[3] = 1;\n Vec2.rotate(vec, MATRIX, fromPoint);\n },\n /**\n * RotateZ point\n *\n * @param {Array} vec\n * @param {Array} fromPoint\n * @param {number} rad\n */\n rotateZ: function (vec, fromPoint, rad) {\n MATRIX[0] = Math.cos(rad);\n MATRIX[1] = -Math.sin(rad);\n MATRIX[2] = Math.sin(rad);\n MATRIX[3] = Math.cos(rad);\n Vec2.rotate(vec, MATRIX, fromPoint);\n },\n /**\n * Translate vertex\n *\n * @param {Array} vec\n * @param {Array} to\n */\n translate: function (vec, to) {\n vec[0] += to[0];\n vec[1] += to[1];\n },\n /**\n * Scale vertex\n *\n * @param {Array} vec\n * @param {Array} to\n */\n scale: function (vec, to) {\n vec[0] *= to[0];\n vec[1] *= to[1];\n },\n /**\n * Scale vertex\n *\n * @param {Array} vec\n * @param {Array} to\n */\n divide: function (vec, to) {\n vec[0] /= to[0];\n vec[1] /= to[1];\n },\n /**\n * Vec to string\n *\n * @param {Array} vec\n * @return {string}\n */\n toString: function (vec) { return \"x: \" + vec[0] + \", y: \" + vec[1]; },\n /**\n * Vertex [0, 0]\n */\n ZERO: Array.from([0, 0]),\n /**\n * Vertex [1, 1]\n */\n ONE: Array.from([1, 1]),\n};\nexport default Vec2;\n//# sourceMappingURL=Vec2.js.map","/**\n * @internal\n * @ignore\n */\nvar Bounding = {\n empty: function () { return ({\n cx: 0,\n cy: 0,\n x: -1,\n y: -1,\n width: 2,\n height: 2,\n }); },\n clear: function (tmpBounding) {\n tmpBounding[0] = undefined;\n tmpBounding[1] = undefined;\n tmpBounding[2] = undefined;\n tmpBounding[3] = undefined;\n },\n add: function (tmpBounding, x, y) {\n if (typeof tmpBounding[0] === 'undefined' || x < tmpBounding[0])\n tmpBounding[0] = x;\n if (typeof tmpBounding[2] === 'undefined' || x > tmpBounding[2])\n tmpBounding[2] = x;\n if (typeof tmpBounding[1] === 'undefined' || y < tmpBounding[1])\n tmpBounding[1] = y;\n if (typeof tmpBounding[3] === 'undefined' || y > tmpBounding[3])\n tmpBounding[3] = y;\n },\n sum: function (dest, bounding) {\n if (typeof bounding[0] !== 'undefined' &&\n typeof bounding[1] !== 'undefined' &&\n typeof bounding[2] !== 'undefined' &&\n typeof bounding[3] !== 'undefined') {\n if (typeof dest[0] === 'undefined' ||\n typeof dest[1] === 'undefined' ||\n typeof dest[2] === 'undefined' ||\n typeof dest[3] === 'undefined') {\n dest[0] = bounding[0];\n dest[1] = bounding[1];\n dest[2] = bounding[2];\n dest[3] = bounding[3];\n }\n else {\n if (dest[0] < bounding[0])\n dest[0] = bounding[0];\n if (dest[2] > bounding[2])\n dest[2] = bounding[2];\n if (dest[1] < bounding[1])\n dest[1] = bounding[1];\n if (dest[3] > bounding[3])\n dest[3] = bounding[3];\n }\n }\n else {\n console.warn('[Urplfanze:Bounding] cannot sum bounding');\n }\n },\n bind: function (bounding, tmpBounding) {\n if (typeof tmpBounding[0] !== 'undefined' &&\n typeof tmpBounding[1] !== 'undefined' &&\n typeof tmpBounding[2] !== 'undefined' &&\n typeof tmpBounding[3] !== 'undefined') {\n bounding.x = tmpBounding[0];\n bounding.y = tmpBounding[1];\n bounding.width = tmpBounding[2] - tmpBounding[0];\n bounding.height = tmpBounding[3] - tmpBounding[1];\n bounding.cx = bounding.x + bounding.width / 2;\n bounding.cy = bounding.y + bounding.height / 2;\n }\n else {\n console.warn('[Urplfanze:Bounding] cannot bind bounding');\n }\n },\n};\nexport default Bounding;\n//# sourceMappingURL=bounding.js.map","import { glMatrix } from 'gl-matrix';\nexport var VEC3_ZERO = [0, 0, 0];\nexport var VEC3_ONE = [1, 1, 1];\nexport var VEC2_ZERO = [0, 0];\nexport var VEC2_ONE = [1, 1];\nglMatrix.setMatrixArrayType(Array);\n/**\n * Skew matrix\n *\n * @internal\n * @ignore\n */\nexport function fromSkew(out, skew) {\n out[0] = 1;\n out[1] = Math.tan(skew[1]);\n out[2] = 0;\n out[3] = 0;\n out[4] = Math.tan(skew[0]);\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * number to vec 2\n *\n * @internal\n * @ignore\n */\nexport function toVec2(x) {\n if (Array.isArray(x))\n return [x[0], x[1]];\n return [x, x];\n}\n/**\n * number to vec 3\n *\n * @internal\n * @ignore\n */\nexport function toVec3(x, defaultZValue) {\n if (defaultZValue === void 0) { defaultZValue = 0; }\n if (Array.isArray(x)) {\n return [x[0], x[1], defaultZValue];\n }\n return [x, x, defaultZValue];\n}\n//# sourceMappingURL=gl-matrix-extensions.js.map","/**\n * Return logarith value and base\n *\n * @category Core.Utilities\n *\n * @param n number\n * @param base number\n */\nexport var log = function (n, base) { return Math.log(n) / Math.log(base); };\n/**\n * @category Core.Utilities\n */\nexport var PI2 = Math.PI * 2;\n/**\n * @category Core.Utilities\n */\nexport var PHI = (1 + Math.sqrt(5)) / 2;\n/**\n * Return a positive module of positive or negative value\n *\n * @category Core.Utilities\n *\n * @param value number\n * @param base number\n */\nexport var pmod = function (value, base) {\n var result = value % base;\n return result < 0 ? result + base : result;\n};\n//# sourceMappingURL=index.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport ShapeBase from \"./ShapeBase\";\nimport SceneChild from \"../SceneChild\";\nimport Scene from \"../Scene\";\n/**\n * Container of ShapeBase or Group, it applies transformations on each repetition\n *\n * @category Core.Shapes\n */\nvar Shape = /** @class */ (function (_super) {\n __extends(Shape, _super);\n /**\n * Creates an instance of Shape.\n *\n * @param {ShapeSettings} [settings={}]\n */\n function Shape(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = settings.type || 'Shape';\n _this = _super.call(this, settings) || this;\n if (settings.shape instanceof SceneChild) {\n _this.shape = settings.shape;\n }\n else {\n console.warn(\"[Urpflanze:Shape] requires the 'shape' property to be instance of SceneChild,\\nYou passed:\", settings.shape);\n }\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n /**\n * Check if shape is static\n *\n * @returns {boolean}\n */\n Shape.prototype.isStatic = function () {\n return _super.prototype.isStatic.call(this) && (this.shape ? this.shape.isStatic() : true);\n };\n /**\n * Check if shape has static index\n *\n * @returns {boolean}\n */\n Shape.prototype.isStaticIndexed = function () {\n return _super.prototype.isStaticIndexed.call(this) && (this.shape ? this.shape.isStaticIndexed() : true);\n };\n /**\n * Find shape by id or name\n *\n * @param {number | string} idOrName\n * @returns {(SceneChild | null)}\n */\n Shape.prototype.find = function (idOrName) {\n if (this.id === idOrName || this.name === idOrName)\n return this;\n if (this.shape)\n return this.shape.find(idOrName);\n return null;\n };\n /**\n * Return length of buffer\n *\n * @param {ISceneChildPropArguments} propArguments\n * @returns {number}\n */\n Shape.prototype.getBufferLength = function (propArguments) {\n if (this.bStatic && this.buffer && this.buffer.length > 0)\n return this.buffer.length;\n var childBufferLength = this.shape ? this.shape.getBufferLength(propArguments) : 0;\n return childBufferLength * this.getRepetitionCount();\n };\n /**\n * Return a buffer of children shape or loop generated buffer\n *\n * @protected\n * @param {number} generateId\n * @param {ISceneChildPropArguments} propArguments\n * @returns {Float32Array}\n */\n Shape.prototype.generateBuffer = function (generateId, propArguments) {\n if (this.shape) {\n this.shape.generate(generateId, false, propArguments);\n return this.shape.getBuffer() || Shape.EMPTY_BUFFER;\n }\n return Shape.EMPTY_BUFFER;\n };\n /**\n * Return bounding\n *\n * @param {boolean} bDirectSceneChild\n * @returns {IShapeBounding}\n */\n Shape.prototype.getShapeBounding = function () {\n if (this.shape) {\n return this.shape.getBounding();\n }\n return this.bounding; // empty bounding defined in ShapeBase\n };\n /**\n * Add to indexed buffer\n *\n * @protected\n * @param {number} frameLength\n * @param {IRepetition} repetition\n * @returns {number} nextIndex\n */\n Shape.prototype.addIndex = function (frameLength, repetition, recursion\n // singleRepetitionBounding: IShapeBounding\n ) {\n if (this.shape) {\n var childIndexedBuffer = this.shape.getIndexedBuffer() || [];\n var parent_1 = {\n shape: this,\n frameLength: frameLength,\n // singleRepetitionBounding,\n repetition: {\n type: repetition.type,\n angle: repetition.angle,\n index: repetition.index,\n count: repetition.count,\n offset: repetition.offset,\n row: {\n index: repetition.row.index,\n count: repetition.row.count,\n offset: repetition.row.offset,\n },\n col: {\n index: repetition.col.index,\n count: repetition.col.count,\n offset: repetition.col.offset,\n },\n },\n };\n if (typeof recursion !== 'undefined') {\n parent_1.recursion = {\n index: recursion.index,\n offset: recursion.offset,\n count: recursion.offset,\n level: recursion.level,\n };\n }\n for (var i = 0, len = childIndexedBuffer.length; i < len; i++) {\n var currentIndexed = __assign({}, childIndexedBuffer[i]);\n currentIndexed.parent = currentIndexed.parent ? Shape.setIndexedParent(currentIndexed.parent, parent_1) : parent_1;\n this.indexedBuffer.push(currentIndexed);\n }\n }\n };\n /**\n * Set parent of indexed\n *\n * @static\n * @param {(IBufferIndex | IParentBufferIndex)} current\n * @param {IParentBufferIndex} parent\n * @returns {(IBufferIndex | IParentBufferIndex)}\n */\n Shape.setIndexedParent = function (current, parent) {\n var index = {\n shape: current.shape,\n // singleRepetitionBounding: current.singleRepetitionBounding,\n repetition: {\n type: current.repetition.type,\n angle: current.repetition.angle,\n index: current.repetition.index,\n count: current.repetition.count,\n offset: current.repetition.offset,\n row: {\n index: current.repetition.row.index,\n count: current.repetition.row.count,\n offset: current.repetition.row.offset,\n },\n col: {\n index: current.repetition.col.index,\n count: current.repetition.col.count,\n offset: current.repetition.col.offset,\n },\n },\n frameLength: current.frameLength,\n };\n if (typeof current.recursion !== 'undefined') {\n index.recursion = {\n index: current.recursion.index,\n offset: current.recursion.offset,\n count: current.recursion.offset,\n level: current.recursion.level,\n };\n }\n index.parent = current.parent ? Shape.setIndexedParent(current.parent, parent) : parent;\n return index;\n };\n /**\n * Set shape\n *\n * @param {(SceneChild | undefined)} [shape]\n */\n Shape.prototype.setShape = function (shape) {\n if (typeof shape === 'undefined') {\n this.shape = undefined;\n this.clearBuffer(true, true);\n }\n else {\n this.scene && Scene.propagateToChilden(shape, this.scene);\n this.shape = shape;\n this.shape.clearBuffer(true, true);\n }\n };\n return Shape;\n}(ShapeBase));\nexport default Shape;\n//# sourceMappingURL=Shape.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { mat4, vec2, vec3 } from 'gl-matrix';\nimport { ERepetitionType, IRepetition, IBaseRepetition, ISceneChildPropArguments, ISceneChildProps, IStreamArguments, IRecursionRepetition, } from \"../types/scene-child\";\nimport { clamp } from \"../../Utilites\";\nimport * as glme from \"../math/gl-matrix-extensions\";\nimport Vec2 from \"../math/Vec2\";\nimport { PI2 } from \"../math\";\nimport Bounding from \"../math/bounding\";\nimport SceneChild from \"../SceneChild\";\nvar tmpMatrix = mat4.create();\nvar transformMatrix = mat4.create();\nvar perspectiveMatrix = mat4.create();\nvar repetitionMatrix = mat4.create();\n/**\n * Main class for shape generation\n *\n * @category Core.Abstract\n * @abstract\n * @class ShapeBase\n * @order 4\n * @extends {SceneChild}\n */\nvar ShapeBase = /** @class */ (function (_super) {\n __extends(ShapeBase, _super);\n /**\n * Creates an instance of ShapeBase\n *\n * @param {ISceneChildSettings} [settings={}]\n */\n function ShapeBase(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = _super.call(this, settings) || this;\n /**\n * Shape generation id\n * used for prevent buffer calculation\n *\n * @internal\n * @ignore\n */\n _this.generateId = -1;\n /**\n * Flag used to determine if indexedBuffer has been generated\n *\n * @internal\n * @ignore\n */\n _this.bIndexed = false;\n /**\n * Array used for index a vertex buffer\n * only for first level scene children\n *\n * @internal\n * @ignore\n */\n _this.indexedBuffer = [];\n /**\n * The bounding inside the scene\n *\n * @type {IShapeBounding}\n */\n _this.bounding = {\n cx: 0,\n cy: 0,\n x: -1,\n y: -1,\n width: 2,\n height: 2,\n };\n _this.props = {\n distance: settings.distance,\n repetitions: settings.repetitions,\n rotateX: settings.rotateX,\n rotateY: settings.rotateY,\n rotateZ: settings.rotateZ,\n skewX: settings.skewX,\n skewY: settings.skewY,\n squeezeX: settings.squeezeX,\n squeezeY: settings.squeezeY,\n displace: settings.displace,\n translate: settings.translate,\n scale: settings.scale,\n transformOrigin: settings.transformOrigin,\n perspective: settings.perspective,\n perspectiveOrigin: settings.perspectiveOrigin,\n };\n _this.bUseParent = !!settings.bUseParent;\n _this.bUseRecursion = !!settings.bUseRecursion;\n _this.vertexCallback = settings.vertexCallback;\n return _this;\n }\n /**\n * Check if the shape should be generated every time\n *\n * @returns {boolean}\n */\n ShapeBase.prototype.isStatic = function () {\n var props = this.props;\n return (typeof props.distance !== 'function' &&\n typeof props.repetitions !== 'function' &&\n typeof props.rotateX !== 'function' &&\n typeof props.rotateY !== 'function' &&\n typeof props.rotateZ !== 'function' &&\n typeof props.displace !== 'function' &&\n typeof props.skewX !== 'function' &&\n typeof props.skewY !== 'function' &&\n typeof props.squeezeX !== 'function' &&\n typeof props.squeezeY !== 'function' &&\n typeof props.translate !== 'function' &&\n typeof props.scale !== 'function' &&\n typeof props.transformOrigin !== 'function');\n };\n /**\n * Check if the indexedBuffer array needs to be recreated every time,\n * this can happen when a shape generates an array of vertices different in length at each repetition\n *\n * @returns {boolean}\n */\n ShapeBase.prototype.isStaticIndexed = function () {\n return typeof this.props.repetitions !== 'function';\n };\n /**\n * Return a prop value\n *\n * @param {keyof ISceneChildProps} key\n * @param {ISceneChildPropArguments} [propArguments]\n * @param {*} [defaultValue]\n * @returns {*}\n */\n ShapeBase.prototype.getProp = function (key, propArguments, defaultValue) {\n var attribute = this.props[key];\n if (typeof attribute === 'function') {\n attribute = attribute(propArguments);\n }\n return typeof attribute === 'undefined' || Number.isNaN(attribute) ? defaultValue : attribute;\n };\n /**\n * Set a single or multiple props\n *\n * @param {(keyof ISceneChildProps | ISceneChildProps)} key\n * @param {*} [value]\n * @param {boolean} [bClearIndexed=false]\n */\n ShapeBase.prototype.setProp = function (key, value, bClearIndexed) {\n var _this = this;\n if (bClearIndexed === void 0) { bClearIndexed = false; }\n if (typeof key == 'string') {\n bClearIndexed = bClearIndexed || key == 'repetitions';\n this.props[key] = value;\n }\n else {\n bClearIndexed = bClearIndexed || 'repetitions' in key;\n Object.keys(key).forEach(function (k) {\n return (_this.props[k] = key[k]);\n });\n }\n this.clearBuffer(bClearIndexed, true);\n };\n /**\n * Unset buffer\n *\n * @param {boolean} [bClearIndexed=false]\n * @param {boolean} [bPropagateToParents=false]\n * @param {boolean} [bPropagateToChildren=false]\n */\n ShapeBase.prototype.clearBuffer = function (bClearIndexed, bPropagateToParents) {\n if (bClearIndexed === void 0) { bClearIndexed = false; }\n if (bPropagateToParents === void 0) { bPropagateToParents = true; }\n this.buffer = undefined;\n if (bClearIndexed) {\n this.bIndexed = false;\n this.indexedBuffer = [];\n }\n this.bStatic = this.isStatic();\n this.bStaticIndexed = this.isStaticIndexed();\n if (bPropagateToParents && this.scene && !this.scene.isFirstLevelChild(this)) {\n var parents = this.scene.getParentsOfSceneChild(this);\n parents.length > 0 && parents[parents.length - 1].clearBuffer(bClearIndexed, bPropagateToParents /* true */);\n }\n };\n /**\n * Update the vertex array if the shape is not static and update the indexedBuffer if it is also not static\n *\n * @param {number} generateId generation id\n * @param {boolean} [bDirectSceneChild=false] adjust shape of center of scene\n * @param {ISceneChildPropArguments} [parentPropArguments]\n */\n ShapeBase.prototype.generate = function (generateId, bDirectSceneChild, parentPropArguments) {\n var _a, _b;\n if (bDirectSceneChild === void 0) { bDirectSceneChild = false; }\n if (this.buffer && (this.bStatic || (generateId === this.generateId && !this.bUseParent && !this.bUseRecursion))) {\n return;\n }\n this.generateId = generateId;\n if (!this.bStaticIndexed || !this.bIndexed)\n this.indexedBuffer = [];\n var propArguments = ShapeBase.getEmptyPropArguments(this, parentPropArguments);\n var repetition = propArguments.repetition;\n var repetitions = this.getProp('repetitions', propArguments, 1);\n var repetitionType = Array.isArray(repetitions) ? ERepetitionType.Matrix : ERepetitionType.Ring;\n var repetitionCount = Array.isArray(repetitions)\n ? repetitions[0] * ((_a = repetitions[1]) !== null && _a !== void 0 ? _a : repetitions[0])\n : repetitions;\n var repetitionRowCount = Array.isArray(repetitions) ? repetitions[0] : repetitionCount;\n var repetitionColCount = Array.isArray(repetitions) ? (_b = repetitions[1]) !== null && _b !== void 0 ? _b : repetitions[0] : 1;\n var rowRepetition = repetition.row;\n rowRepetition.count = repetitionRowCount;\n var colRepetition = repetition.col;\n colRepetition.count = repetitionColCount;\n repetition.count = repetitionCount;\n repetition.col.count = repetitionColCount;\n repetition.row.count = repetitionRowCount;\n repetition.type = repetitionType;\n var totalBufferLength = 0;\n var buffers = [];\n var currentIndex = 0;\n var centerMatrix = vec2.fromValues((repetitionColCount - 1) / 2, (repetitionRowCount - 1) / 2);\n var sceneCenter = this.scene ? [this.scene.center[0], this.scene.center[1], 0] : [0, 0, 0];\n var tmpTotalShapeBounding = [undefined, undefined, undefined, undefined];\n var tmpSingleRepetitionBounding = [undefined, undefined, undefined, undefined];\n for (var currentRowRepetition = 0; currentRowRepetition < repetitionRowCount; currentRowRepetition++) {\n for (var currentColRepetition = 0; currentColRepetition < repetitionColCount; currentColRepetition++, currentIndex++) {\n repetition.index = currentIndex + 1;\n repetition.offset = repetitionCount > 1 ? currentIndex / (repetitionCount - 1) : 1;\n repetition.angle = repetitionType === ERepetitionType.Ring ? (PI2 / repetitionCount) * currentIndex : 0;\n colRepetition.index = currentColRepetition + 1;\n colRepetition.offset = repetitionColCount > 1 ? currentColRepetition / (repetitionColCount - 1) : 1;\n rowRepetition.index = currentRowRepetition + 1;\n rowRepetition.offset = repetitionRowCount > 1 ? currentRowRepetition / (repetitionRowCount - 1) : 1;\n // Generate primitives buffer recursively\n var buffer = this.generateBuffer(generateId, propArguments);\n var bufferLength = buffer.length;\n var bounding = this.getShapeBounding();\n buffers[currentIndex] = new Float32Array(bufferLength);\n totalBufferLength += bufferLength;\n {\n var distance = glme.toVec2(this.getProp('distance', propArguments, glme.VEC2_ZERO));\n var displace = this.getProp('displace', propArguments, 0);\n var scale = glme.toVec3(this.getProp('scale', propArguments, glme.VEC2_ONE), 1);\n var translate = glme.toVec3(this.getProp('translate', propArguments, glme.VEC2_ZERO), 0);\n var skewX = this.getProp('skewX', propArguments, 0);\n var skewY = this.getProp('skewY', propArguments, 0);\n var squeezeX = this.getProp('squeezeX', propArguments, 0);\n var squeezeY = this.getProp('squeezeY', propArguments, 0);\n var rotateX = this.getProp('rotateX', propArguments, 0);\n var rotateY = this.getProp('rotateY', propArguments, 0);\n var rotateZ = this.getProp('rotateZ', propArguments, 0);\n var perspective = clamp(0, 1, this.getProp('perspective', propArguments, 0));\n var perspectiveOrigin = glme.toVec3(this.getProp('perspectiveOrigin', propArguments, glme.VEC2_ZERO), 0);\n var transformOrigin = glme.toVec3(this.getProp('transformOrigin', propArguments, glme.VEC2_ZERO), 0);\n var offset = void 0;\n switch (repetitionType) {\n case ERepetitionType.Ring:\n offset = vec3.fromValues(distance[0], 0, 0);\n vec3.rotateZ(offset, offset, glme.VEC3_ZERO, repetition.angle + displace);\n break;\n case ERepetitionType.Matrix:\n offset = vec3.fromValues(distance[1] * (currentColRepetition - centerMatrix[0]), distance[0] * (currentRowRepetition - centerMatrix[1]), 0);\n break;\n }\n var perspectiveSize = perspective > 0 ? Math.max(bounding.width, bounding.height) / 2 : 1;\n var perspectiveValue = perspective > 0 ? perspectiveSize + (1 - perspective) * (perspectiveSize * 10) : 0;\n var bTransformOrigin = perspective !== 0 || transformOrigin[0] !== 0 || transformOrigin[1] !== 0;\n var bPerspectiveOrigin = perspectiveOrigin[0] !== 0 || perspectiveOrigin[1] !== 0;\n if (bTransformOrigin) {\n transformOrigin[0] *= bounding.width / 2;\n transformOrigin[1] *= bounding.height / 2;\n transformOrigin[2] = perspectiveValue;\n }\n /**\n * Create Matrices\n */\n {\n /**\n * Create Transformation matrix\n */\n mat4.identity(transformMatrix);\n bTransformOrigin && mat4.translate(transformMatrix, transformMatrix, transformOrigin);\n if (translate[0] !== 0 || translate[1] !== 0)\n mat4.translate(transformMatrix, transformMatrix, translate);\n if (skewX !== 0 || skewY !== 0) {\n glme.fromSkew(tmpMatrix, [skewX, skewY]);\n mat4.multiply(transformMatrix, transformMatrix, tmpMatrix);\n }\n rotateX !== 0 && mat4.rotateX(transformMatrix, transformMatrix, rotateX);\n rotateY !== 0 && mat4.rotateY(transformMatrix, transformMatrix, rotateY);\n rotateZ !== 0 && mat4.rotateZ(transformMatrix, transformMatrix, rotateZ);\n if (scale[0] !== 1 || scale[1] !== 1)\n mat4.scale(transformMatrix, transformMatrix, scale);\n bTransformOrigin &&\n mat4.translate(transformMatrix, transformMatrix, vec3.scale(transformOrigin, transformOrigin, -1));\n /**\n * Create Perspective matrix\n */\n if (perspectiveValue > 0) {\n if (bPerspectiveOrigin) {\n perspectiveOrigin[0] *= bounding.width / 2;\n perspectiveOrigin[1] *= bounding.height / 2;\n perspectiveOrigin[2] = 0;\n }\n mat4.perspective(perspectiveMatrix, -Math.PI / 2, 1, 0, Infinity);\n }\n /**\n * Create Repetition matrix\n */\n mat4.identity(repetitionMatrix);\n mat4.translate(repetitionMatrix, repetitionMatrix, offset);\n if (bDirectSceneChild) {\n mat4.translate(repetitionMatrix, repetitionMatrix, sceneCenter);\n }\n if (repetitionType === ERepetitionType.Ring)\n mat4.rotateZ(repetitionMatrix, repetitionMatrix, repetition.angle + displace);\n }\n Bounding.clear(tmpSingleRepetitionBounding);\n // Apply matrices on vertex\n for (var bufferIndex = 0; bufferIndex < bufferLength; bufferIndex += 2) {\n var vertex = [buffer[bufferIndex], buffer[bufferIndex + 1], perspectiveValue];\n {\n // Apply squeeze, can be insert into transformMatrix?\n squeezeX !== 0 && Vec2.squeezeX(vertex, squeezeX);\n squeezeY !== 0 && Vec2.squeezeY(vertex, squeezeY);\n // Apply transforms\n vec3.transformMat4(vertex, vertex, transformMatrix);\n // Apply perspective\n if (perspectiveValue > 0) {\n bPerspectiveOrigin && vec3.add(vertex, vertex, perspectiveOrigin);\n vec3.transformMat4(vertex, vertex, perspectiveMatrix);\n vec3.scale(vertex, vertex, perspectiveValue);\n bPerspectiveOrigin && vec3.sub(vertex, vertex, perspectiveOrigin);\n }\n // custom vertex manipulation\n if (this.vertexCallback) {\n var index = bufferIndex / 2;\n var count = bufferLength / 2;\n var vertexRepetition = {\n index: index + 1,\n count: count,\n offset: count > 1 ? index / (count - 1) : 1,\n };\n this.vertexCallback(vertex, vertexRepetition, propArguments);\n }\n // final, apply repetition matrix\n vec3.transformMat4(vertex, vertex, repetitionMatrix);\n }\n buffers[currentIndex][bufferIndex] = vertex[0];\n buffers[currentIndex][bufferIndex + 1] = vertex[1];\n // Bounding.add(tmpSingleRepetitionBounding, vertex[0], vertex[1])\n Bounding.add(tmpTotalShapeBounding, vertex[0], vertex[1]);\n }\n }\n // Bounding.sum(tmpTotalShapeBounding, tmpSingleRepetitionBounding)\n // After buffer creation, add a frame into indexedBuffer if not static or update bounding\n // const singleRepetitionBounding = { cx: 0, cy: 0, x: -1, y: -1, width: 2, height: 2 }\n // Bounding.bind(singleRepetitionBounding, tmpSingleRepetitionBounding)\n if (!this.bStaticIndexed || !this.bIndexed) {\n this.addIndex(bufferLength, repetition);\n }\n }\n }\n Bounding.bind(this.bounding, tmpTotalShapeBounding);\n this.buffer = new Float32Array(totalBufferLength);\n for (var i = 0, offset = 0, len = buffers.length; i < len; offset += buffers[i].length, i++)\n this.buffer.set(buffers[i], offset);\n this.bIndexed = true;\n };\n /**\n * Return current shape (whit repetions) bounding\n *\n * @return {*} {IShapeBounding}\n */\n ShapeBase.prototype.getBounding = function () {\n return this.bounding;\n };\n /**\n * Get number of repetitions\n *\n * @returns {number}\n */\n ShapeBase.prototype.getRepetitionCount = function () {\n var _a;\n var repetitions = this.getProp('repetitions', undefined, 1);\n return Array.isArray(repetitions) ? repetitions[0] * ((_a = repetitions[1]) !== null && _a !== void 0 ? _a : repetitions[0]) : repetitions;\n };\n /**\n * Return buffer\n *\n * @returns {(Float32Array | undefined)}\n */\n ShapeBase.prototype.getBuffer = function () {\n return this.buffer;\n };\n /**\n * Return indexed buffer\n *\n * @returns {(Array | undefined)}\n */\n ShapeBase.prototype.getIndexedBuffer = function () {\n return this.indexedBuffer;\n };\n /**\n * Return number of encapsulation\n *\n * @param {IBufferIndex} index\n * @returns {number}\n */\n ShapeBase.getIndexParentLevel = function (index) {\n if (typeof index.parent === 'undefined')\n return 0;\n var currentParent = index.parent;\n var currentParentLevel = 1;\n while (typeof currentParent.parent !== 'undefined') {\n currentParentLevel++;\n currentParent = currentParent.parent;\n }\n return currentParentLevel;\n };\n /**\n * Stream buffer\n *\n * @param {(TStreamCallback} callback\n */\n ShapeBase.prototype.stream = function (callback) {\n if (this.buffer && this.indexedBuffer) {\n for (var i = 0, j = 0, len = this.indexedBuffer.length; i < len; i++) {\n var currentIndexing = this.indexedBuffer[i];\n callback({\n buffer: this.buffer,\n frameLength: currentIndexing.frameLength,\n frameBufferIndex: j,\n currentIndexing: currentIndexing,\n currentShapeIndex: i,\n totalShapes: len,\n });\n j += currentIndexing.frameLength;\n }\n }\n };\n /**\n * Return empty propArguments\n *\n * @static\n * @param {ShapeBase} shape\n * @return {*} {ISceneChildPropArguments}\n */\n ShapeBase.getEmptyPropArguments = function (shape, parentPropArguments) {\n // prettier-ignore\n var repetition = {\n type: ERepetitionType.Ring, angle: 0, index: 1, offset: 1, count: 1,\n row: { index: 1, offset: 1, count: 1 },\n col: { index: 1, offset: 1, count: 1 },\n };\n return {\n repetition: repetition,\n shape: shape,\n parent: parentPropArguments,\n };\n };\n /**\n * Empty buffer\n *\n * @internal\n * @ignore\n */\n ShapeBase.EMPTY_BUFFER = new Float32Array(0);\n /**\n * Empty BaseRepetition\n *\n * @internal\n * @ignore\n */\n ShapeBase.getEmptySimpleRepetition = function () { return ({\n index: 1,\n offset: 1,\n count: 1,\n }); };\n /**\n * Empty Repetition\n *\n * @internal\n * @ignore\n */\n ShapeBase.getEmptyRepetition = function () { return (__assign(__assign({ type: ERepetitionType.Ring, angle: 0 }, ShapeBase.getEmptySimpleRepetition()), { row: ShapeBase.getEmptySimpleRepetition(), col: ShapeBase.getEmptySimpleRepetition() })); };\n return ShapeBase;\n}(SceneChild));\nexport default ShapeBase;\n//# sourceMappingURL=ShapeBase.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport Bounding from \"../math/bounding\";\nimport ShapePrimitive from \"./ShapePrimitive\";\nimport { EShapePrimitiveAdaptMode } from \"../types/shape-base\";\n/**\n * @category Core.Shapes\n */\nvar ShapeBuffer = /** @class */ (function (_super) {\n __extends(ShapeBuffer, _super);\n /**\n * Creates an instance of ShapeBuffer.\n *\n * @param {IShapeBufferSettings} [settings={}]\n */\n function ShapeBuffer(settings) {\n if (settings === void 0) { settings = {}; }\n var _a;\n var _this = this;\n settings.type = settings.type || 'ShapeBuffer';\n settings.adaptMode = (_a = settings.adaptMode) !== null && _a !== void 0 ? _a : EShapePrimitiveAdaptMode.Scale;\n _this = _super.call(this, settings) || this;\n if (typeof settings.shape === 'undefined') {\n console.warn('[Urpflanze:ShapeBuffer] ShapeBuffer require a buffer passed from `shape` property');\n _this.shape = ShapeBuffer.EMPTY_BUFFER;\n }\n else\n _this.shape = Float32Array.from(settings.shape);\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n /**\n * Unset buffer\n *\n * @param {boolean} [bClearIndexed=false]\n * @param {boolean} [bPropagateToParents=false]\n */\n ShapeBuffer.prototype.clearBuffer = function (bClearIndexed, bPropagateToParents) {\n if (bClearIndexed === void 0) { bClearIndexed = false; }\n if (bPropagateToParents === void 0) { bPropagateToParents = true; }\n _super.prototype.clearBuffer.call(this, bClearIndexed, bPropagateToParents);\n this.shapeBuffer = undefined;\n // this.shapeBuffer = ShapeBuffer.buffer2Dto3D(this.shapeBuffer)\n };\n /**\n * Apply sideLength on .shape buffer and calculate bounding\n *\n * @protected\n */\n ShapeBuffer.prototype.bindBuffer = function (propArguments) {\n var sideLength = this.getRepetitionSideLength(propArguments);\n var shapeBuffer = this.adaptMode !== EShapePrimitiveAdaptMode.None\n ? ShapePrimitive.adaptBuffer(this.shape, this.adaptMode)\n : Float32Array.from(this.shape);\n var tmpBounding = [undefined, undefined, undefined, undefined];\n for (var i = 0, len = shapeBuffer.length; i < len; i += 2) {\n shapeBuffer[i] *= sideLength[0];\n shapeBuffer[i + 1] *= sideLength[1];\n Bounding.add(tmpBounding, shapeBuffer[i], shapeBuffer[i + 1]);\n }\n Bounding.bind(this.currentGenerationPrimitiveBounding, tmpBounding);\n this.shapeBuffer = shapeBuffer;\n };\n /**\n * Return length of buffer\n *\n * @param {ISceneChildPropArguments} propArguments\n * @returns {number}\n */\n ShapeBuffer.prototype.getBufferLength = function (propArguments) {\n if (this.buffer && this.buffer.length > 0)\n return this.buffer.length;\n return this.shape.length * this.getRepetitionCount();\n };\n /**\n * Return a buffer of children shape or loop generated buffer\n *\n * @protected\n * @param {number} generateId\n * @param {ISceneChildPropArguments} propArguments\n * @returns {Float32Array}\n */\n ShapeBuffer.prototype.generateBuffer = function (generateId, propArguments) {\n if (typeof this.shapeBuffer === 'undefined' || typeof this.props.sideLength === 'function') {\n this.bindBuffer(propArguments);\n }\n return this.shapeBuffer;\n };\n /**\n * Set shape\n *\n * @param {(Float32Array)} [shape]\n */\n ShapeBuffer.prototype.setShape = function (shape) {\n this.shape = shape;\n this.clearBuffer(true);\n };\n /**\n * Subdivide buffer n times\n *\n * @param {number} [level=1]\n */\n ShapeBuffer.prototype.subdivide = function (level) {\n if (level === void 0) { level = 1; }\n var subdivided = this.shape;\n if (subdivided && subdivided.length > 0) {\n for (var i = 0; i < level; i++)\n subdivided = ShapeBuffer.subdivide(subdivided, this.bClosed);\n this.setShape(subdivided);\n }\n };\n /**\n * Subdivide buffer\n *\n * @static\n * @param {Float32Array} shape\n * @param {boolean} [bClosed=true]\n * @returns {(Float32Array)}\n */\n ShapeBuffer.subdivide = function (shape, bClosed) {\n if (bClosed === void 0) { bClosed = true; }\n var shapeLength = shape.length;\n var subdivided = new Float32Array(shapeLength * 2 - (bClosed ? 0 : 2));\n for (var i = 0; i < shapeLength; i += 2) {\n if (i === 0) {\n subdivided[0] = shape[0];\n subdivided[1] = shape[1];\n }\n else {\n var px = shape[i - 2];\n var py = shape[i - 1];\n var x = shape[i];\n var y = shape[i + 1];\n var nx = (x + px) / 2;\n var ny = (y + py) / 2;\n subdivided[(i - 1) * 2] = nx;\n subdivided[(i - 1) * 2 + 1] = ny;\n subdivided[i * 2] = x;\n subdivided[i * 2 + 1] = y;\n }\n }\n if (bClosed) {\n subdivided[(shapeLength - 1) * 2] = (shape[0] + shape[shapeLength - 2]) / 2;\n subdivided[(shapeLength - 1) * 2 + 1] = (shape[1] + shape[shapeLength - 1]) / 2;\n }\n return subdivided;\n };\n return ShapeBuffer;\n}(ShapePrimitive));\nexport default ShapeBuffer;\n//# sourceMappingURL=ShapeBuffer.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { EShapePrimitiveAdaptMode } from \"../types/shape-base\";\nimport Bounding from \"../math/bounding\";\nimport { PI2 } from \"../math\";\nimport ShapePrimitive from \"./ShapePrimitive\";\nimport ShapeBase from \"./ShapeBase\";\n/**\n * Shape Loop\n *\n * @category Core.Shapes\n * @public\n * @class ShapeLoop\n * @extends {ShapePrimitive}\n */\nvar ShapeLoop = /** @class */ (function (_super) {\n __extends(ShapeLoop, _super);\n /**\n * Creates an instance of ShapeLoop.\n *\n * @param {IShapeLoopSettings} [settings={}]\n * @param {boolean} [bPreventGeneration=false]\n */\n function ShapeLoop(settings, bPreventGeneration) {\n if (settings === void 0) { settings = {}; }\n if (bPreventGeneration === void 0) { bPreventGeneration = false; }\n var _this = this;\n settings.type = settings.type || 'ShapeLoop';\n _this = _super.call(this, settings) || this;\n _this.loopDependencies = (settings.loopDependencies || []).concat('sideLength');\n _this.props.loop = settings.loop;\n if (!bPreventGeneration) {\n _this.loop = {\n start: 0,\n end: PI2,\n inc: PI2 / 10,\n vertex: function () { return [0, 0]; },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n }\n return _this;\n }\n /**\n * Check if currentOrSingleLoopBuffer is static\n *\n * @returns {boolean}\n */\n ShapeLoop.prototype.isStaticLoop = function () {\n if (this.loopDependencies.includes('propArguments'))\n return false;\n for (var i = 0, len = this.loopDependencies.length; i < len; i++)\n if (typeof this.props[this.loopDependencies[i]] === 'function')\n return false;\n return true;\n };\n /**\n * Check if shape is static\n *\n * @returns {boolean}\n */\n ShapeLoop.prototype.isStatic = function () {\n return this.bStaticLoop && _super.prototype.isStatic.call(this);\n };\n /**\n * Check if shape has static indexed\n *\n * @returns {boolean}\n */\n ShapeLoop.prototype.isStaticIndexed = function () {\n return this.bStaticLoop && _super.prototype.isStaticIndexed.call(this);\n };\n /**\n * Unset buffer\n *\n * @param {boolean} [bClearIndexed=false]\n * @param {boolean} [bPropagateToParents=false]\n */\n ShapeLoop.prototype.clearBuffer = function (bClearIndexed, bPropagateToParents) {\n if (bClearIndexed === void 0) { bClearIndexed = false; }\n if (bPropagateToParents === void 0) { bPropagateToParents = true; }\n this.bStaticLoop = this.isStaticLoop();\n if (bClearIndexed) {\n this.currentOrSingleLoopBuffer = undefined;\n }\n _super.prototype.clearBuffer.call(this, bClearIndexed, bPropagateToParents);\n };\n /**\n * Set single or multiple props\n *\n * @param {(K)} key\n * @param {*} [value]\n * @param {boolean} [bClearIndexed=false]\n */\n ShapeLoop.prototype.setProp = function (key, value) {\n var _a;\n var bClearIndexed = false;\n var keys = typeof key === 'string' ? (_a = {}, _a[key] = value, _a) : key;\n for (var i = this.loopDependencies.length - 1; i >= 0; i--) {\n if (this.loopDependencies[i] in keys) {\n // this.props.loop = undefined\n bClearIndexed = true;\n break;\n }\n }\n if ('loop' in keys) {\n keys.loop = __assign(__assign({}, this.props.loop), keys.loop);\n bClearIndexed = true;\n }\n _super.prototype.setProp.call(this, keys, value, bClearIndexed);\n };\n /**\n * Return length of buffer\n *\n * @param {ISceneChildPropArguments} [propArguments]\n * @returns {number}\n */\n ShapeLoop.prototype.getBufferLength = function (propArguments) {\n if (this.bStatic && typeof this.buffer !== 'undefined')\n return this.buffer.length;\n if (this.bStaticLoop && typeof this.currentOrSingleLoopBuffer !== 'undefined')\n return this.currentOrSingleLoopBuffer.length * this.getRepetitionCount();\n var count = this.getLoop(propArguments || ShapeBase.getEmptyPropArguments(this)).count;\n return this.getRepetitionCount() * count * 2;\n };\n /**\n * Return a buffer of children shape or loop generated buffer\n *\n * @protected\n * @param {number} generateId\n * @param {ISceneChildPropArguments} propArguments\n * @returns {Float32Array}\n */\n ShapeLoop.prototype.generateBuffer = function (generateId, propArguments) {\n if (!this.bStaticLoop)\n return this.generateLoopBuffer(propArguments);\n if (typeof this.props.sideLength === 'function' || typeof this.currentOrSingleLoopBuffer === 'undefined')\n this.currentOrSingleLoopBuffer = this.generateLoopBuffer(propArguments);\n return this.currentOrSingleLoopBuffer;\n };\n /**\n * Generate loop buffer\n *\n * @protected\n * @param {ISceneChildPropArguments} propArguments\n * @returns {Float32Array}\n */\n ShapeLoop.prototype.generateLoopBuffer = function (propArguments) {\n var _a = this.getLoop(propArguments), start = _a.start, inc = _a.inc, end = _a.end, count = _a.count;\n var sideLength = this.getRepetitionSideLength(propArguments);\n var getVertex = (this.props.loop && this.props.loop.vertex\n ? this.props.loop.vertex\n : this.loop.vertex);\n var shapeLoop = {\n index: 0,\n offset: 0,\n angle: 0,\n count: count,\n };\n var vertexLength = shapeLoop.count;\n var bufferLength = vertexLength * 2;\n var currentOrSingleLoopBuffer = new Float32Array(bufferLength);\n var bNoAdapt = this.adaptMode === EShapePrimitiveAdaptMode.None;\n var tmpBounding = [undefined, undefined, undefined, undefined];\n for (var i = 0, j = 0; i < vertexLength; i++, j += 2) {\n var angle = start + inc * i;\n var offset = shapeLoop.count > 1 ? i / (shapeLoop.count - 1) : 1;\n // const angle = (end - start) * offset + start\n shapeLoop.angle = angle;\n shapeLoop.index = i + 1;\n shapeLoop.offset = offset;\n var vertex = Float32Array.from(getVertex(shapeLoop, propArguments));\n currentOrSingleLoopBuffer[j] = vertex[0];\n currentOrSingleLoopBuffer[j + 1] = vertex[1];\n if (bNoAdapt) {\n currentOrSingleLoopBuffer[j] *= sideLength[0];\n currentOrSingleLoopBuffer[j + 1] *= sideLength[1];\n Bounding.add(tmpBounding, currentOrSingleLoopBuffer[j], currentOrSingleLoopBuffer[j + 1]);\n }\n }\n if (bNoAdapt) {\n Bounding.bind(this.currentGenerationPrimitiveBounding, tmpBounding);\n }\n else {\n /**\n * Adapt and apply side length\n */\n var buffer = ShapePrimitive.adaptBuffer(currentOrSingleLoopBuffer, this.adaptMode);\n Bounding.clear(tmpBounding);\n for (var i = 0; i < bufferLength; i += 2) {\n buffer[i] = buffer[i] * sideLength[0];\n buffer[i + 1] = buffer[i + 1] * sideLength[1];\n Bounding.add(tmpBounding, buffer[i], buffer[i + 1]);\n }\n Bounding.bind(this.currentGenerationPrimitiveBounding, tmpBounding);\n return buffer;\n }\n return currentOrSingleLoopBuffer;\n };\n /**\n * Return information about a client loop gnerator\n *\n * @public\n * @param {ISceneChildPropArguments} propArguments\n * @returns {ShapeLoopInformation}\n */\n ShapeLoop.prototype.getLoop = function (propArguments) {\n var _a, _b, _c, _d, _e, _f;\n var start = (_b = (_a = this.props.loop) === null || _a === void 0 ? void 0 : _a.start) !== null && _b !== void 0 ? _b : this.loop.start;\n var end = (_d = (_c = this.props.loop) === null || _c === void 0 ? void 0 : _c.end) !== null && _d !== void 0 ? _d : this.loop.end;\n var inc = (_f = (_e = this.props.loop) === null || _e === void 0 ? void 0 : _e.inc) !== null && _f !== void 0 ? _f : this.loop.inc;\n start = (typeof start === 'function' ? start(propArguments) : start);\n end = (typeof end === 'function' ? end(propArguments) : end);\n inc = (typeof inc === 'function' ? inc(propArguments) : inc);\n var count = Math.ceil((end - start) / inc);\n return { start: start, end: end, inc: inc, count: count <= 0 ? 0 : count };\n };\n /**\n * Subdivide loop n times\n *\n * @param {number} [level=1]\n */\n ShapeLoop.prototype.subdivide = function (level) {\n if (level === void 0) { level = 1; }\n var currentLoop = this.props.loop || this.loop;\n // TODO: subdivide function?\n if (typeof currentLoop.inc === 'number') {\n currentLoop.inc = (currentLoop.inc || 1) / Math.pow(2, level);\n this.setProp('loop', currentLoop);\n }\n };\n /**\n * Set shape from loop generator\n *\n * @param {(IShapeLoopGenerator)} [shape]\n */\n ShapeLoop.prototype.setShape = function (loop) {\n this.setProp('loop', loop);\n };\n ShapeLoop.PId2 = Math.PI / 2;\n return ShapeLoop;\n}(ShapePrimitive));\nexport default ShapeLoop;\n//# sourceMappingURL=ShapeLoop.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport ShapeBase from \"./ShapeBase\";\nimport { EShapePrimitiveAdaptMode, IBufferIndex, IParentBufferIndex, IShapeBounding, IShapePrimitiveProps, IShapePrimitiveSettings, } from \"../types/shape-base\";\nimport * as glme from \"../math/gl-matrix-extensions\";\nimport Bounding from \"../math/bounding\";\n/**\n * @category Core.Abstract\n */\nvar ShapePrimitive = /** @class */ (function (_super) {\n __extends(ShapePrimitive, _super);\n /**\n * Creates an instance of ShapePrimitive.\n *\n * @param {IShapePrimitiveSettings} [settings={}]\n */\n function ShapePrimitive(settings) {\n if (settings === void 0) { settings = {}; }\n var _a, _b;\n var _this = _super.call(this, settings) || this;\n /**\n * Contain the bounding of the last generated buffer\n *\n * @type {IShapeBounding}\n */\n _this.currentGenerationPrimitiveBounding = Bounding.empty();\n _this.props.sideLength =\n typeof settings.sideLength === 'undefined'\n ? undefined\n : typeof settings.sideLength === 'function'\n ? settings.sideLength\n : glme.toVec2(settings.sideLength);\n _this.style = settings.style || {};\n _this.adaptMode = (_a = settings.adaptMode) !== null && _a !== void 0 ? _a : EShapePrimitiveAdaptMode.None;\n _this.bClosed = (_b = settings.bClosed) !== null && _b !== void 0 ? _b : true;\n return _this;\n }\n /**\n * Check if shape is static\n *\n * @returns {boolean}\n * @memberof ShapePrimitive\n */\n ShapePrimitive.prototype.isStatic = function () {\n return typeof this.props.sideLength !== 'function' && _super.prototype.isStatic.call(this);\n };\n ShapePrimitive.prototype.getRepetitionSideLength = function (propArguments) {\n if (this.bStatic) {\n // not set default value into constructor because it can be overridden by group\n if (typeof this.props.sideLength === 'undefined') {\n this.props.sideLength = [50, 50];\n }\n else if (typeof this.props.sideLength === 'number') {\n this.props.sideLength = [this.props.sideLength, this.props.sideLength];\n }\n return this.props.sideLength;\n }\n return glme.toVec2(this.getProp('sideLength', propArguments, [50, 50]));\n };\n /**\n * Return a bounding of generated buffer if is direct scene child\n *\n * @returns {IShapeBounding}\n * @memberof ShapePrimitive\n */\n ShapePrimitive.prototype.getShapeBounding = function () {\n return this.currentGenerationPrimitiveBounding;\n };\n /**\n * Add this to indexedBuffer\n *\n * @protected\n * @param {number} frameLength\n * @param {IRepetition} repetition\n * @returns {number} nextIndex\n */\n ShapePrimitive.prototype.addIndex = function (frameLength, repetition, recursion\n // singleRepetitionBounding: IShapeBounding\n ) {\n var index = {\n shape: this,\n frameLength: frameLength,\n // singleRepetitionBounding,\n repetition: {\n type: repetition.type,\n angle: repetition.angle,\n index: repetition.index,\n count: repetition.count,\n offset: repetition.offset,\n row: {\n index: repetition.row.index,\n count: repetition.row.count,\n offset: repetition.row.offset,\n },\n col: {\n index: repetition.col.index,\n count: repetition.col.count,\n offset: repetition.col.offset,\n },\n },\n };\n if (typeof recursion !== 'undefined') {\n index.recursion = {\n index: recursion.index,\n offset: recursion.offset,\n count: recursion.offset,\n level: recursion.level,\n };\n }\n this.indexedBuffer.push(index);\n };\n /**\n * Return bClosed\n *\n * @returns {boolean}\n * @memberof ShapePrimitive\n */\n ShapePrimitive.prototype.isClosed = function () {\n return this.bClosed;\n };\n /**\n * Set bClosed\n *\n * @param {boolean} bClosed\n * @memberof ShapePrimitive\n */\n ShapePrimitive.prototype.setClosed = function (bClosed) {\n this.bClosed = bClosed;\n };\n /**\n * Return adaptMode\n *\n * @returns {EShapePrimitiveAdaptMode}\n * @memberof ShapeBase\n */\n ShapePrimitive.prototype.getAdaptMode = function () {\n return this.adaptMode;\n };\n /**\n * Set adaptMode\n *\n * @param {EShapePrimitiveAdaptMode} bAdapted\n * @memberof ShapeBase\n */\n ShapePrimitive.prototype.adapt = function (adaptMode) {\n this.adaptMode = adaptMode;\n this.clearBuffer(true);\n };\n /**\n * Get buffer bounding\n *\n * @static\n * @param {Float32Array} buffer\n * @returns {IShapeBounding}\n * @memberof ShapePrimitive\n */\n ShapePrimitive.getBounding = function (buffer, bounding) {\n if (typeof bounding === 'undefined')\n bounding = Bounding.empty();\n var tmp_bounding = [undefined, undefined, undefined, undefined];\n for (var i = 0, len = buffer.length; i < len; i += 2) {\n Bounding.add(tmp_bounding, buffer[i], buffer[i + 1]);\n }\n Bounding.bind(bounding, tmp_bounding);\n return bounding;\n };\n /**\n * Return adapted buffer between [-1,-1] and [1,1]\n *\n * @public\n * @static\n * @param {Float32Array} input\n * @param {EShapePrimitiveAdaptMode} mode\n * @returns {Float32Array}\n * @memberof ShapePrimitive\n */\n ShapePrimitive.adaptBuffer = function (input, mode, rect) {\n if (mode === EShapePrimitiveAdaptMode.None)\n return Float32Array.from(input);\n var output = new Float32Array(input.length);\n if (!rect) {\n rect = ShapePrimitive.getBounding(input);\n }\n var scale = rect.width >= 2 ||\n rect.height >= 2 ||\n (mode >= EShapePrimitiveAdaptMode.Fill && (rect.width < 2 || rect.height < 2))\n ? 2 / Math.max(rect.width, rect.height)\n : 1;\n var translateX = mode >= EShapePrimitiveAdaptMode.Center ? rect.cx : 0;\n var translateY = mode >= EShapePrimitiveAdaptMode.Center ? rect.cy : 0;\n for (var i = 0, len = input.length; i < len; i += 2) {\n output[i] = (input[i] - translateX) * scale;\n output[i + 1] = (input[i + 1] - translateY) * scale;\n }\n return output;\n };\n return ShapePrimitive;\n}(ShapeBase));\nexport default ShapePrimitive;\n//# sourceMappingURL=ShapePrimitive.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport Bounding from \"../math/bounding\";\nimport Shape from \"./Shape\";\n/**\n * @category Core.Shapes\n */\nvar ShapeRecursive = /** @class */ (function (_super) {\n __extends(ShapeRecursive, _super);\n /**\n * Creates an instance of ShapeRecursive.\n *\n * @param {IShapeRecursiveSettings} [settings={}]\n */\n function ShapeRecursive(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = settings.type || 'ShapeRecursive';\n _this = _super.call(this, settings) || this;\n _this.props.recursions = settings.recursions || 1;\n _this.props.recursionScale = settings.recursionScale || 2;\n _this.props.recursionVertex = settings.recursionVertex || 0;\n // this.bInner = settings.bInner ?? false\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n _this.currentGenerationRecursiveBounding = Bounding.empty();\n return _this;\n }\n /**\n * Unset buffer\n *\n * @param {boolean} [bClearIndexed=false]\n * @param {boolean} [bPropagateToParents=false]\n * @param {boolean} [bPropagateToChildren=false]\n */\n ShapeRecursive.prototype.clearBuffer = function (bClearIndexed, bPropagateToParents) {\n if (bClearIndexed === void 0) { bClearIndexed = false; }\n if (bPropagateToParents === void 0) { bPropagateToParents = true; }\n if (bClearIndexed) {\n this.shapeRecursiveBuffer = undefined;\n }\n _super.prototype.clearBuffer.call(this, bClearIndexed, bPropagateToParents);\n };\n // /**\n // * Set type of recursion\n // *\n // * @param {boolean} inner\n // */\n // public setRecursionnInner(inner: boolean): void {\n // \tthis.bInner = inner\n // \tthis.clearBuffer(true)\n // }\n /**\n *\n * @returns {boolean}\n */\n ShapeRecursive.prototype.isStatic = function () {\n return (typeof this.props.recursions !== 'function' &&\n typeof this.props.recursionScale !== 'function' &&\n typeof this.props.recursionVertex !== 'function' &&\n _super.prototype.isStatic.call(this));\n };\n /**\n *\n * @returns {boolean}\n */\n ShapeRecursive.prototype.isStaticIndexed = function () {\n return typeof this.props.recursions !== 'function' && _super.prototype.isStaticIndexed.call(this);\n };\n /**\n * Return a buffer of children shape with recursion\n *\n * @protected\n * @param {number} generateId\n * @param {ISceneChildPropArguments} propArguments\n * @returns {Float32Array}\n */\n ShapeRecursive.prototype.generateBuffer = function (generateId, propArguments) {\n if (!this.isStatic() || typeof this.shapeRecursiveBuffer === 'undefined') {\n this.bindBuffer(generateId, propArguments);\n }\n return this.shapeRecursiveBuffer;\n };\n /**\n * Generate Recoursive shape buffer\n *\n * @protected\n * @param {number} generateId\n * @param {ISceneChildPropArguments} propArguments\n */\n ShapeRecursive.prototype.bindBuffer = function (generateId, propArguments) {\n if (typeof this.shape === 'undefined') {\n this.shapeRecursiveBuffer = Shape.EMPTY_BUFFER;\n return;\n }\n var recursions = Math.floor(this.getProp('recursions', propArguments, 1));\n var recursionVertex = Math.floor(this.getProp('recursionVertex', propArguments, 0));\n var recursionScale = this.getProp('recursionScale', propArguments, 2);\n var currentRecursionRepetition = {\n index: 1,\n offset: 1,\n count: 1,\n level: { index: 1, offset: recursions > 1 ? 0 : 1, count: 1 },\n };\n if (recursions <= 1) {\n var buffer = this.generateShapeBuffer(propArguments, generateId, currentRecursionRepetition);\n this.currentGenerationRecursiveBounding = this.shape.getBounding();\n this.shapeRecursiveBuffer = buffer;\n return;\n }\n var shapeBuffer = this.generateShapeBuffer(propArguments, generateId, currentRecursionRepetition);\n var storedRecursion = [currentRecursionRepetition];\n var paretRecursionIndex = 0, added = 1;\n var tmpBounding = [undefined, undefined, undefined, undefined];\n var singleShapeBufferLength = shapeBuffer.length;\n var realVertexCount = singleShapeBufferLength / 2;\n var singleShapeVertexCount = recursionVertex <= 0 ? realVertexCount : Math.min(recursionVertex, realVertexCount);\n var recursionOffsetMultiplier = recursionVertex === 0 ? 1 : realVertexCount / Math.min(recursionVertex, realVertexCount);\n var recusiveShapeBuffer = new Float32Array(ShapeRecursive.summmation(recursions, singleShapeVertexCount) * singleShapeBufferLength);\n for (var i = 0; i < singleShapeBufferLength; i += 2) {\n recusiveShapeBuffer[i] = shapeBuffer[i];\n recusiveShapeBuffer[i + 1] = shapeBuffer[i + 1];\n Bounding.add(tmpBounding, recusiveShapeBuffer[i], recusiveShapeBuffer[i + 1]);\n }\n for (var currentRecursion = 1; currentRecursion < recursions; currentRecursion++) {\n var level_offset = recursions > 1 ? currentRecursion / (recursions - 1) : 1;\n var currentRecursionVertexCount = ShapeRecursive.summmation(currentRecursion, singleShapeVertexCount);\n var recursionBufferStartIndex = currentRecursionVertexCount * singleShapeBufferLength;\n var parentRecursion = currentRecursion - 1;\n var parentRecursionBufferStartIndex = parentRecursion === 0\n ? 0\n : ShapeRecursive.summmation(parentRecursion, singleShapeVertexCount) * singleShapeBufferLength;\n for (var currentShapeRecursionRepetition = 0, totalRecursionRepetitions = Math.pow(singleShapeVertexCount, currentRecursion); currentShapeRecursionRepetition < totalRecursionRepetitions; currentShapeRecursionRepetition++, added++) {\n currentRecursionRepetition = {\n index: currentShapeRecursionRepetition + 1,\n offset: totalRecursionRepetitions > 1 ? currentShapeRecursionRepetition / (totalRecursionRepetitions - 1) : 1,\n count: totalRecursionRepetitions,\n level: { index: currentRecursion + 1, offset: level_offset, count: recursions },\n parent: storedRecursion[paretRecursionIndex],\n };\n shapeBuffer = this.generateShapeBuffer(propArguments, generateId, currentRecursionRepetition);\n storedRecursion.push(currentRecursionRepetition);\n var shapeVertexBufferIndex = recursionBufferStartIndex + currentShapeRecursionRepetition * singleShapeBufferLength;\n // const centerVertexIndex = parentRecursionBufferStartIndex + currentShapeRecursionRepetition * 2\n var centerVertexIndex = Math.floor(parentRecursionBufferStartIndex + currentShapeRecursionRepetition * 2 * recursionOffsetMultiplier);\n centerVertexIndex = centerVertexIndex % 2 === 0 ? centerVertexIndex : centerVertexIndex + 1;\n var centerX = recusiveShapeBuffer[centerVertexIndex];\n var centerY = recusiveShapeBuffer[centerVertexIndex + 1];\n for (var i = 0, len = singleShapeBufferLength; i < len; i += 2) {\n // if (this.bInner) {\n // \tconst parentCurrentVertex =\n // \t\tparentRecursionBufferStartIndex +\n // \t\tMath.floor(currentShapeRecursionRepetition / singleShapeVertexCount) *\n // \t\t\tsingleShapeVertexCount *\n // \t\t\trecursionOffsetMultiplier *\n // \t\t\t2\n // \tconst parentX = recusiveShapeBuffer[parentCurrentVertex + i]\n // \tconst parentY = recusiveShapeBuffer[parentCurrentVertex + i + 1]\n // \trecusiveShapeBuffer[shapeVertexBufferIndex + i] = (centerX - parentX) / recursionScale + parentX\n // \trecusiveShapeBuffer[shapeVertexBufferIndex + i + 1] = (centerY - parentY) / recursionScale + parentY\n // const parentX = shapeBuffer[i] / recursionScale ** currentRecursion\n // const parentY = shapeBuffer[i + 1] / recursionScale ** currentRecursion\n // recusiveShapeBuffer[shapeVertexBufferIndex + i] = (centerX - parentX) / recursionScale + parentX\n // recusiveShapeBuffer[shapeVertexBufferIndex + i + 1] = (centerY - parentY) / recursionScale + parentY\n // } else {\n var parentXScaled = shapeBuffer[i] / Math.pow(recursionScale, currentRecursion);\n var parentYScaled = shapeBuffer[i + 1] / Math.pow(recursionScale, currentRecursion);\n recusiveShapeBuffer[shapeVertexBufferIndex + i] = centerX + parentXScaled;\n recusiveShapeBuffer[shapeVertexBufferIndex + i + 1] = centerY + parentYScaled;\n // }\n Bounding.add(tmpBounding, recusiveShapeBuffer[shapeVertexBufferIndex + i], recusiveShapeBuffer[shapeVertexBufferIndex + i + 1]);\n }\n if (added % singleShapeVertexCount === 0) {\n paretRecursionIndex += 1;\n }\n }\n }\n Bounding.bind(this.currentGenerationRecursiveBounding, tmpBounding);\n this.shapeRecursiveBuffer = recusiveShapeBuffer;\n };\n ShapeRecursive.prototype.generateShapeBuffer = function (propArguments, generateId, recursionRepetition) {\n propArguments.recursion = recursionRepetition;\n return _super.prototype.generateBuffer.call(this, generateId, propArguments);\n };\n /**\n * Add this to indexedBuffer\n *\n * @protected\n * @param {number} frameLength\n * @param {IRepetition} repetition\n * @returns {number} nextIndex\n */\n ShapeRecursive.prototype.addIndex = function (frameLength, repetition, recursion\n // singleRepetitionBounding: IShapeBounding\n ) {\n if (this.shape) {\n var propArguments = { repetition: repetition, shape: this };\n var recursions = Math.floor(this.getProp('recursions', propArguments, 1));\n var recursionVertex = Math.floor(this.getProp('recursionVertex', propArguments, 0));\n // const realFrameLength = ShapeRecursive.summmation(recursions, this.shape.getBufferLength() / 2)\n var bufferIndex = {\n shape: this,\n frameLength: frameLength,\n // singleRepetitionBounding,\n repetition: {\n type: repetition.type,\n angle: repetition.angle,\n index: repetition.index,\n count: repetition.count,\n offset: repetition.offset,\n row: {\n index: repetition.row.index,\n count: repetition.row.count,\n offset: repetition.row.offset,\n },\n col: {\n index: repetition.col.index,\n count: repetition.col.count,\n offset: repetition.col.offset,\n },\n },\n };\n if (typeof recursion !== 'undefined') {\n bufferIndex.recursion = {\n index: recursion.index,\n offset: recursion.offset,\n count: recursion.offset,\n level: recursion.level,\n };\n }\n var childIndexedBuffer = this.shape.getIndexedBuffer() || [];\n for (var childIndexed = 0, childIndexedLen = childIndexedBuffer.length; childIndexed < childIndexedLen; childIndexed++) {\n var currentIndexed = __assign({}, childIndexedBuffer[childIndexed]);\n var currentRecursionRepetition = {\n index: 1,\n offset: 1,\n count: 1,\n level: { index: 1, offset: recursions > 1 ? 0 : 1, count: recursions },\n };\n var recursionBufferIndex = __assign(__assign({}, bufferIndex), { recursion: currentRecursionRepetition });\n currentIndexed.parent = currentIndexed.parent\n ? Shape.setIndexedParent(currentIndexed.parent, recursionBufferIndex)\n : recursionBufferIndex;\n this.indexedBuffer.push(currentIndexed);\n }\n if (recursions > 1) {\n var realVertexCount = this.shape.getBufferLength(propArguments) / 2;\n var vertexCount = recursionVertex <= 0 ? realVertexCount : Math.min(recursionVertex, realVertexCount);\n var storedRecursion = this.indexedBuffer.map(function (indexed) { return [\n indexed.parent.recursion,\n ]; });\n var paretRecursionIndex = 0, added = 1;\n for (var i = 1; i < recursions; i++) {\n var level_offset = recursions > 1 ? i / (recursions - 1) : 1;\n for (var j = 0, len = Math.pow(vertexCount, i); j < len; j++, added++) {\n var recursionOffset = len > 1 ? j / (len - 1) : 1;\n for (var childIndexed = 0, childIndexedLen = childIndexedBuffer.length; childIndexed < childIndexedLen; childIndexed++) {\n var currentIndexed = __assign({}, childIndexedBuffer[childIndexed]);\n var currentRecursionRepetition = {\n index: j + 1,\n offset: recursionOffset,\n count: len,\n level: { index: i + 1, offset: level_offset, count: recursions },\n parent: storedRecursion[childIndexed][paretRecursionIndex],\n };\n var recursionBufferIndex = __assign(__assign({}, bufferIndex), { recursion: currentRecursionRepetition });\n currentIndexed.parent = currentIndexed.parent\n ? Shape.setIndexedParent(currentIndexed.parent, recursionBufferIndex)\n : recursionBufferIndex;\n this.indexedBuffer.push(currentIndexed);\n storedRecursion[childIndexed].push(currentRecursionRepetition);\n if (added % vertexCount === 0) {\n paretRecursionIndex += 1;\n }\n }\n }\n }\n }\n }\n };\n /**\n * Retturn summation value\n *\n * @static\n * @param {number} recursion\n * @param {number} vertexCount\n * @returns {number}\n */\n ShapeRecursive.summmation = function (recursion, vertexCount) {\n if (recursion === 1)\n return 1;\n var result = 1;\n for (var i = 1; i < recursion; i++)\n result += Math.pow(vertexCount, i);\n return result;\n };\n /**\n * Empty recursion repetition\n *\n * @static\n * @return {*} {IRecursionRepetition}\n */\n ShapeRecursive.getEmptyRecursion = function () {\n return {\n index: 1,\n offset: 1,\n count: 1,\n level: { index: 1, offset: 1, count: 1 },\n };\n };\n return ShapeRecursive;\n}(Shape));\nexport default ShapeRecursive;\n//# sourceMappingURL=ShapeRecursive.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PI2 } from \"../../math\";\nimport ShapeLoop from \"../ShapeLoop\";\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\n/**\n *\n * @category Core.Primitives\n * @class Circle\n * @extends {ShapeLoop}\n */\nvar Circle = /** @class */ (function (_super) {\n __extends(Circle, _super);\n /**\n * Creates an instance of Circle.\n *\n * @param {ShapeLoopSettings} [settings={}]\n * @memberof Circle\n */\n function Circle(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = 'Circle';\n settings.adaptMode = EShapePrimitiveAdaptMode.None;\n _this = _super.call(this, settings, true) || this;\n _this.loop = {\n start: 0,\n end: PI2,\n inc: function (propArguments) {\n var sideLength = _this.getRepetitionSideLength(propArguments);\n return (1 / Math.pow(sideLength[0] * sideLength[1], 0.25)) * ShapeLoop.PId2;\n },\n vertex: function (shapeLoopRepetition) { return [Math.cos(shapeLoopRepetition.angle), Math.sin(shapeLoopRepetition.angle)]; },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n return Circle;\n}(ShapeLoop));\nexport default Circle;\n//# sourceMappingURL=Circle.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport ShapeBuffer from \"../ShapeBuffer\";\n/**\n *\n * @category Core.Primitives\n * @class Line\n * @extends {ShapeBuffer}\n */\nvar Line = /** @class */ (function (_super) {\n __extends(Line, _super);\n /**\n * Creates an instance of Line.\n *\n * @param {ShapeBaseSettings} [settings={}]\n * @memberof Line\n */\n function Line(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = 'Line';\n settings.shape = [-1, 0, 1, 0];\n settings.adaptMode = EShapePrimitiveAdaptMode.None;\n settings.bClosed = false;\n _this = _super.call(this, settings) || this;\n return _this;\n }\n return Line;\n}(ShapeBuffer));\nexport default Line;\n//# sourceMappingURL=Line.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PI2 } from \"../../math\";\nimport ShapeLoop from \"../ShapeLoop\";\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\n/**\n * Lissajous shape\n *\n * @category Core.Primitives\n * @class Lissajous\n * @extends {ShapeLoop}\n */\nvar Lissajous = /** @class */ (function (_super) {\n __extends(Lissajous, _super);\n /**\n * Creates an instance of Lissajous.\n *\n * @param {ILissajousSettings} [settings={}]\n * @memberof Lissajous\n */\n function Lissajous(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = 'Lissajous';\n settings.loopDependencies = (settings.loopDependencies || []).concat(['wx', 'wy', 'wz']);\n settings.adaptMode = EShapePrimitiveAdaptMode.None;\n _this = _super.call(this, settings, true) || this;\n _this.props.wx = settings.wx || 1;\n _this.props.wy = settings.wy || 2;\n _this.props.wz = settings.wz || 0;\n _this.loop = {\n start: 0,\n end: PI2,\n inc: function (propArguments) {\n var wx = _this.getProp('wx', propArguments);\n var wy = _this.getProp('wy', propArguments);\n var ratio = wx == wy ? ShapeLoop.PId2 : 0.5 - Math.min(49, wx + wy) * 0.01;\n var sideLength = _this.getRepetitionSideLength(propArguments);\n return (1 / Math.pow(sideLength[0] * sideLength[1], 0.25)) * ratio;\n },\n vertex: function (shapeLoopRepetition) {\n return _this.wx === _this.wy\n ? [Math.cos(shapeLoopRepetition.angle + _this.wz), Math.sin(shapeLoopRepetition.angle)]\n : [Math.cos(_this.wx * shapeLoopRepetition.angle + _this.wz), Math.sin(_this.wy * shapeLoopRepetition.angle)];\n },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n Lissajous.prototype.generateLoopBuffer = function (propArguments) {\n this.wx = this.getProp('wx', propArguments, 1);\n this.wy = this.getProp('wy', propArguments, 2);\n this.wz = this.getProp('wz', propArguments, 2);\n return _super.prototype.generateLoopBuffer.call(this, propArguments);\n };\n return Lissajous;\n}(ShapeLoop));\nexport default Lissajous;\n//# sourceMappingURL=Lissajous.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport ShapeLoop from \"../ShapeLoop\";\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport { PI2 } from \"../../math\";\n/**\n * Polygon shape\n *\n * @category Core.Primitives\n * @class Polygon\n * @extends {ShapeLoop}\n */\nvar Polygon = /** @class */ (function (_super) {\n __extends(Polygon, _super);\n function Polygon(settings) {\n if (settings === void 0) { settings = {}; }\n var _a;\n var _this = this;\n settings.type = settings.type || 'Polygon';\n settings.loopDependencies = (settings.loopDependencies || []).concat(['sideNumber']);\n settings.adaptMode = (_a = settings.adaptMode) !== null && _a !== void 0 ? _a : EShapePrimitiveAdaptMode.None;\n _this = _super.call(this, settings, true) || this;\n _this.props.sideNumber = settings.sideNumber;\n _this.loop = {\n start: 0,\n end: PI2,\n inc: function (propArguments) {\n return PI2 / _this.getProp('sideNumber', propArguments, 5);\n },\n vertex: function (shapeLoopRepetition) {\n return [Math.cos(shapeLoopRepetition.angle), Math.sin(shapeLoopRepetition.angle)];\n },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n return Polygon;\n}(ShapeLoop));\nexport default Polygon;\n//# sourceMappingURL=Polygon.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport ShapeBuffer from \"../ShapeBuffer\";\n/**\n *\n * @category Core.Primitives\n * @class Rect\n * @extends {ShapeBuffer}\n */\nvar Rect = /** @class */ (function (_super) {\n __extends(Rect, _super);\n /**\n * Creates an instance of Rect.\n *\n * @param {ShapeBaseSettings} [settings={}]\n * @memberof Rect\n */\n function Rect(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = 'Rect';\n settings.shape = [-1, -1, 1, -1, 1, 1, -1, 1];\n settings.adaptMode = EShapePrimitiveAdaptMode.None;\n _this = _super.call(this, settings) || this;\n return _this;\n }\n return Rect;\n}(ShapeBuffer));\nexport default Rect;\n//# sourceMappingURL=Rect.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport ShapeLoop from \"../ShapeLoop\";\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport { PI2 } from \"../../math\";\n/**\n * Rose shape\n *\n * @category Core.Primitives\n * @class Rose\n * @extends {ShapeLoop}\n */\nvar Rose = /** @class */ (function (_super) {\n __extends(Rose, _super);\n /**\n * Creates an instance of Rose.\n *\n * @param {IRoseSettings} [settings={}]\n * @memberof Rose\n */\n function Rose(settings) {\n if (settings === void 0) { settings = {}; }\n var _a, _b, _c;\n var _this = this;\n settings.type = 'Rose';\n settings.loopDependencies = (settings.loopDependencies || []).concat(['n', 'd']);\n settings.adaptMode = (_a = settings.adaptMode) !== null && _a !== void 0 ? _a : EShapePrimitiveAdaptMode.Scale;\n _this = _super.call(this, settings, true) || this;\n _this.props.n = (_b = settings.n) !== null && _b !== void 0 ? _b : 1;\n _this.props.d = (_c = settings.d) !== null && _c !== void 0 ? _c : 2;\n _this.loop = {\n start: 0,\n end: function (propArguments) {\n return Rose.getFinalAngleFromK(_this.getProp('n', propArguments), _this.getProp('d', propArguments));\n },\n inc: function (propArguments) {\n var n = _this.getProp('n', propArguments);\n var d = _this.getProp('d', propArguments);\n var sideLength = _this.getRepetitionSideLength(propArguments);\n var sides = Math.pow(sideLength[0] * sideLength[1], 0.45);\n var k = d < n ? n / d : 1.5;\n return PI2 / (sides * k);\n },\n vertex: function (shapeLoopRepetition) {\n var f = Math.cos(_this.k * shapeLoopRepetition.angle);\n return [f * Math.cos(shapeLoopRepetition.angle), f * Math.sin(shapeLoopRepetition.angle)];\n },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n Rose.prototype.generateLoopBuffer = function (propArguments) {\n this.k = this.getProp('n', propArguments) / this.getProp('d', propArguments);\n return _super.prototype.generateLoopBuffer.call(this, propArguments);\n };\n /**\n * Return end angle of rose\n *\n * @static\n * @param {number} n\n * @param {number} d\n * @returns {number}\n * @memberof Rose\n */\n Rose.getFinalAngleFromK = function (n, d) {\n if (n == d)\n return PI2;\n var k = n / d;\n var p = n * d;\n if (!Number.isInteger(k) && k % 0.5 == 0)\n return 4 * Math.PI;\n return Math.PI * d * (p % 2 == 0 ? 2 : 1);\n };\n return Rose;\n}(ShapeLoop));\nexport default Rose;\n//# sourceMappingURL=Rose.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport ShapeLoop from \"../ShapeLoop\";\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport { PI2 } from \"../../math\";\n/**\n * Spiral shape\n *\n * @category Core.Primitives\n * @class Spiral\n * @extends {ShapeLoop}\n */\nvar Spiral = /** @class */ (function (_super) {\n __extends(Spiral, _super);\n /**\n * Creates an instance of Spiral.\n *\n * @param {SpiralSettings} [settings={}]\n * @memberof Spiral\n */\n function Spiral(settings) {\n if (settings === void 0) { settings = {}; }\n var _a, _b, _c, _d;\n var _this = this;\n settings.type = 'Spiral';\n settings.bClosed = false;\n settings.adaptMode = (_a = settings.adaptMode) !== null && _a !== void 0 ? _a : EShapePrimitiveAdaptMode.None;\n settings.loopDependencies = (settings.loopDependencies || []).concat(['twists', 'twistsStart', 'spiral']);\n _this = _super.call(this, settings, true) || this;\n _this.props.spiral = (_b = settings.spiral) !== null && _b !== void 0 ? _b : Spiral.types.ARCHIMEDE;\n _this.props.twists = (_c = settings.twists) !== null && _c !== void 0 ? _c : 2;\n _this.props.twistsStart = (_d = settings.twistsStart) !== null && _d !== void 0 ? _d : 0;\n _this.loop = {\n start: function (propArguments) { return PI2 * _this.getProp('twistsStart', propArguments); },\n end: function (propArguments) {\n return PI2 *\n (_this.getProp('twistsStart', propArguments) + _this.getProp('twists', propArguments));\n },\n inc: function (propArguments) {\n var twists = _this.getProp('twists', propArguments);\n var rep = PI2 * twists;\n var sideLength = _this.getRepetitionSideLength(propArguments);\n var radius = 4 + Math.sqrt(sideLength[0] * sideLength[1]);\n return rep / (radius * twists);\n },\n vertex: function (shapeLoopRepetition) {\n var r = _this.r(shapeLoopRepetition.angle);\n return [r * Math.cos(shapeLoopRepetition.angle), r * Math.sin(shapeLoopRepetition.angle)];\n },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n Spiral.prototype.generateLoopBuffer = function (propArguments) {\n this.spiral = this.getProp('spiral', propArguments);\n this.r = Spiral.getRFromTSpiralType(this.spiral);\n return _super.prototype.generateLoopBuffer.call(this, propArguments);\n };\n // /**\n // * Set single or multiple props\n // *\n // * @param {(keyof ISpiralProps | ISpiralProps)} key\n // * @param {*} [value]\n // * @memberof Spiral\n // */\n // public setProp(key: keyof ISpiralProps | ISpiralProps, value?: any): void {\n // \tkey = typeof key === 'string' ? { [key]: value } : key\n // \tif (('twists' in key || 'twistsStart' in key) && this.props.loop) {\n // \t\tthis.props.loop.start = undefined\n // \t\tthis.props.loop.end = undefined\n // \t}\n // \tsuper.setProp(key as keyof IShapeLoopProps, value)\n // }\n /**\n * Point position and scale factor for spiral types\n *\n * @static\n * @param {TSpiralType} spiral\n * @returns {number}\n * @memberof Spiral\n */\n Spiral.getRFromTSpiralType = function (spiral) {\n switch (spiral) {\n case Spiral.types.ARCHIMEDE:\n return function (angle) { return angle / 10; };\n case Spiral.types.HYPERBOLIC:\n return function (angle) { return (1 / angle) * 3; };\n case Spiral.types.FERMAT:\n return function (angle) { return Math.pow(angle, 0.5) / 3; };\n case Spiral.types.LITUUS:\n return function (angle) { return Math.pow(angle, -0.5); };\n case Spiral.types.LOGARITHMIC:\n return function (angle) { return Math.pow(Math.E, (angle * 0.2)) / 10; };\n }\n return function (angle) { return angle; };\n };\n /**\n * Spural types\n *\n * @static\n * @type {{ [name in TSpiralType]: TSpiralType }}\n * @memberof Spiral\n */\n Spiral.types = {\n ARCHIMEDE: 'ARCHIMEDE',\n HYPERBOLIC: 'HYPERBOLIC',\n FERMAT: 'FERMAT',\n LITUUS: 'LITUUS',\n LOGARITHMIC: 'LOGARITHMIC',\n };\n return Spiral;\n}(ShapeLoop));\nexport default Spiral;\n//# sourceMappingURL=Spiral.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport ShapeLoop from \"../ShapeLoop\";\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport { PI2 } from \"../../math\";\n/**\n * ShperShape\n *\n * @category Core.Primitives\n * @class SuperShape\n * @extends {ShapeLoop}\n */\nvar SuperShape = /** @class */ (function (_super) {\n __extends(SuperShape, _super);\n /**\n * Creates an instance of SuperShape.\n *\n * @param {ISuperShapeSettings} [settings={}]\n * @memberof SuperShape\n */\n function SuperShape(settings) {\n if (settings === void 0) { settings = {}; }\n var _a, _b, _c, _d, _e, _f, _g;\n var _this = this;\n settings.type = 'SuperShape';\n settings.loopDependencies = (settings.loopDependencies || []).concat(['a', 'b', 'm', 'n1', 'n2', 'n3']);\n settings.adaptMode = (_a = settings.adaptMode) !== null && _a !== void 0 ? _a : EShapePrimitiveAdaptMode.Scale;\n _this = _super.call(this, settings, true) || this;\n _this.props.a = (_b = settings.a) !== null && _b !== void 0 ? _b : 1;\n _this.props.b = (_c = settings.b) !== null && _c !== void 0 ? _c : 1;\n _this.props.m = (_d = settings.m) !== null && _d !== void 0 ? _d : 6;\n _this.props.n1 = (_e = settings.n1) !== null && _e !== void 0 ? _e : 1;\n _this.props.n2 = (_f = settings.n2) !== null && _f !== void 0 ? _f : 1;\n _this.props.n3 = (_g = settings.n3) !== null && _g !== void 0 ? _g : 1;\n _this.loop = {\n start: 0,\n end: PI2,\n inc: function (propArguments) {\n var sideLength = _this.getRepetitionSideLength(propArguments);\n return Math.PI / Math.pow(sideLength[0] * sideLength[1], 0.5);\n },\n vertex: function (shapeLoopRepetition) {\n var angle = shapeLoopRepetition.angle;\n var m = (_this.m * angle) / 4;\n var a = Math.pow(Math.abs(Math.cos(m) / _this.a), _this.n2);\n var b = Math.pow(Math.abs(Math.sin(m) / _this.b), _this.n3);\n var raux = Math.pow((a + b), (1 / _this.n1));\n var r = raux === 0 ? 1 : 1 / raux;\n return [r * Math.cos(angle), r * Math.sin(angle)];\n },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n SuperShape.prototype.generateLoopBuffer = function (propArguments) {\n this.a = this.getProp('a', propArguments);\n this.b = this.getProp('b', propArguments);\n this.m = this.getProp('m', propArguments);\n this.n1 = this.getProp('n1', propArguments);\n this.n2 = this.getProp('n2', propArguments);\n this.n3 = this.getProp('n3', propArguments);\n return _super.prototype.generateLoopBuffer.call(this, propArguments);\n };\n return SuperShape;\n}(ShapeLoop));\nexport default SuperShape;\n//# sourceMappingURL=SuperShape.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport ShapeBuffer from \"../ShapeBuffer\";\n/**\n * Triangle ShapeBuffer\n *\n * @category Core.Primitives\n */\nvar Triangle = /** @class */ (function (_super) {\n __extends(Triangle, _super);\n /**\n * Creates an instance of Triangleeee.\n *\n * @param {ShapeBaseSettings} [settings={}]\n * @memberof Triangle\n */\n function Triangle(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = 'Triangle';\n settings.shape = [-1, -1, 1, 0, -1, 1];\n settings.adaptMode = EShapePrimitiveAdaptMode.None;\n _this = _super.call(this, settings) || this;\n return _this;\n }\n return Triangle;\n}(ShapeBuffer));\nexport default Triangle;\n//# sourceMappingURL=Triangle.js.map","/**\n * Repetition type enumerator.\n *\n * @category Core.Enums\n * @internal\n */\nexport var ERepetitionType;\n(function (ERepetitionType) {\n /**\n * Defines the type of repetition of the shape,\n * in a circular way starting from the center of the scene\n * @order 1\n */\n ERepetitionType[ERepetitionType[\"Ring\"] = 1] = \"Ring\";\n /**\n * Defines the type of repetition of the shape,\n * on a nxm grid starting from the center of the scene\n * @order 2\n */\n ERepetitionType[ERepetitionType[\"Matrix\"] = 2] = \"Matrix\";\n})(ERepetitionType || (ERepetitionType = {}));\n//# sourceMappingURL=scene-child.js.map","/**\n *\n *\n * @category Core.Enums\n */\nexport var EShapePrimitiveAdaptMode;\n(function (EShapePrimitiveAdaptMode) {\n /**\n * The buffer is not changed\n * @order 1\n */\n EShapePrimitiveAdaptMode[EShapePrimitiveAdaptMode[\"None\"] = 0] = \"None\";\n /**\n * The buffer is scaled in a range between [-1, -1] and [1,1]\n * @order 2\n */\n EShapePrimitiveAdaptMode[EShapePrimitiveAdaptMode[\"Scale\"] = 2] = \"Scale\";\n /**\n * The buffer is scaled in a range between [-1, -1] and [1,1] and is centered\n * @order 3\n */\n EShapePrimitiveAdaptMode[EShapePrimitiveAdaptMode[\"Center\"] = 4] = \"Center\";\n /**\n * The buffer is adapted centrally and expanded in a range between [-1, -1] and [1,1]\n * @order 4\n */\n EShapePrimitiveAdaptMode[EShapePrimitiveAdaptMode[\"Fill\"] = 8] = \"Fill\";\n})(EShapePrimitiveAdaptMode || (EShapePrimitiveAdaptMode = {}));\n//# sourceMappingURL=shape-base.js.map","/**\n * Meta\n */\nexport { version, author, license } from \"./meta\";\n// Set glMatrixArrayType\nimport { glMatrix } from 'gl-matrix';\nglMatrix.setMatrixArrayType(Array);\n/**\n * Core\n */\nexport { default as Scene } from \"./core/Scene\";\nexport { default as SceneChild } from \"./core/SceneChild\";\nexport { default as Group } from \"./core/Group\";\n// Shapes\nexport { default as ShapePrimitive } from \"./core/shapes/ShapePrimitive\";\nexport { default as ShapeLoop } from \"./core/shapes/ShapeLoop\";\nexport { default as ShapeBuffer } from \"./core/shapes/ShapeBuffer\";\nexport { default as Shape } from \"./core/shapes/Shape\";\nexport { default as ShapeRecursive } from \"./core/shapes/ShapeRecursive\";\nexport { default as Line } from \"./core/shapes/primitives/Line\";\nexport { default as Triangle } from \"./core/shapes/primitives/Triangle\";\nexport { default as Rect } from \"./core/shapes/primitives/Rect\";\nexport { default as Polygon } from \"./core/shapes/primitives/Polygon\";\nexport { default as Circle } from \"./core/shapes/primitives/Circle\";\nexport { default as Rose } from \"./core/shapes/primitives/Rose\";\nexport { default as Spiral } from \"./core/shapes/primitives/Spiral\";\nexport { default as Lissajous } from \"./core/shapes/primitives/Lissajous\";\nexport { default as SuperShape } from \"./core/shapes/primitives/SuperShape\";\n// Utilities\nexport { lerp, clamp, relativeClamp, toDegrees, toRadians, now, noise, angleFromRepetition, angle2FromRepetition, distanceFromRepetition, } from \"./Utilites\";\nexport { default as Vec2 } from \"./core/math/Vec2\";\nexport { PHI, PI2, log } from \"./core/math\";\n/**\n * Services\n */\nexport { default as DrawerCanvas } from \"./services/drawers/drawer-canvas/DrawerCanvas\";\nexport { default as Animation } from \"./services/animation/Simple\";\nexport { default as Easings } from \"./services/animation/Easings\";\n//# sourceMappingURL=index-light.js.map","var version = '%VERSION%';\nvar author = 'Gennaro Bosone ';\nvar license = '%LICENSE%';\nexport { version, author, license };\n//# sourceMappingURL=meta.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport Simple from \"./Simple\";\nimport SceneUtilitiesExtended from \"../scene-utilities/SceneUtilitiesExtended\";\nimport * as Urpflanze from \"../../index-light\";\n/**\n * @ignore\n * @internal\n * @category Services.Animation\n */\nvar Animation = {\n composeAnimation: function (scene, prop_name, animation) {\n switch (animation.type) {\n case 'simple': {\n var simpleAnimation = __assign({}, animation.value);\n simpleAnimation.from = SceneUtilitiesExtended.getTransformedValue(scene, prop_name, simpleAnimation.from);\n simpleAnimation.to = SceneUtilitiesExtended.getTransformedValue(scene, prop_name, simpleAnimation.to);\n return Simple.compose(simpleAnimation);\n }\n case 'raw': {\n var rawValue = animation.value;\n return new Function('Urpflanze', 'scene', \"\\\"use strict\\\"; return \" + rawValue.raw)(Urpflanze, scene);\n }\n // case 'random': {\n // const randomValue = SetProp.getRandomFunctionForProp(prop_name)\n // return ({ shape }) => randomValue(shape.rand())\n // }\n }\n },\n};\nexport default Animation;\n//# sourceMappingURL=Animation.js.map","/**\n * Easing functions\n *\n * @category Services.Animation\n */\nvar Easings = {\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n linear: function (time, start, end, duration) { return (end * time) / duration + start; },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duratte duration\n * @returns {number}\n */\n quadraticIn: function (time, start, end, duratte) {\n time /= duratte;\n return end * time * time + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quadraticOut: function (time, start, end, duration) {\n time /= duration;\n return -end * time * (time - 2) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quadraticInOut: function (time, start, end, duration) {\n time /= duration / 2;\n if (time < 1)\n return (end / 2) * time * time + start;\n time--;\n return (-end / 2) * (time * (time - 2) - 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n cubicIn: function (time, start, end, duration) {\n time /= duration;\n return end * time * time * time + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n cubicOut: function (time, start, end, duration) {\n time /= duration;\n time--;\n return end * (time * time * time + 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n cubicInOut: function (time, start, end, duration) {\n time /= duration / 2;\n if (time < 1)\n return (end / 2) * time * time * time + start;\n time -= 2;\n return (end / 2) * (time * time * time + 2) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quarticIn: function (time, start, end, duration) {\n time /= duration;\n return end * time * time * time * time + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quarticOut: function (time, start, end, duration) {\n time /= duration;\n time--;\n return -end * (time * time * time * time - 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quarticInOut: function (time, start, end, duration) {\n time /= duration / 2;\n if (time < 1)\n return (end / 2) * time * time * time * time + start;\n time -= 2;\n return (-end / 2) * (time * time * time * time - 2) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quinticIn: function (time, start, end, duration) {\n time /= duration;\n return end * time * time * time * time * time + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quinticOut: function (time, start, end, duration) {\n time /= duration;\n time--;\n return end * (time * time * time * time * time + 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quinticInOut: function (time, start, end, duration) {\n time /= duration / 2;\n if (time < 1)\n return (end / 2) * time * time * time * time * time + start;\n time -= 2;\n return (end / 2) * (time * time * time * time * time + 2) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n sinusoidalIn: function (time, start, end, duration) {\n return -end * Math.cos((time / duration) * (Math.PI / 2)) + end + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n sinusoidalOut: function (time, start, end, duration) {\n return end * Math.sin((time / duration) * (Math.PI / 2)) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n sinusoidalInOut: function (time, start, end, duration) {\n return (-end / 2) * (Math.cos((Math.PI * time) / duration) - 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n exponentialIn: function (time, start, end, duration) {\n return end * Math.pow(2, 10 * (time / duration - 1)) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n exponentialOut: function (time, start, end, duration) {\n return end * (-Math.pow(2, (-10 * time) / duration) + 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n exponentialInOut: function (time, start, end, duration) {\n time /= duration / 2;\n if (time < 1)\n return (end / 2) * Math.pow(2, 10 * (time - 1)) + start;\n time--;\n return (end / 2) * (-Math.pow(2, -10 * time) + 2) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n circularIn: function (time, start, end, duration) {\n time /= duration;\n return -end * (Math.sqrt(1 - time * time) - 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n circularOut: function (time, start, end, duration) {\n time /= duration;\n time--;\n return end * Math.sqrt(1 - time * time) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n circularInOut: function (time, start, end, duration) {\n time /= duration / 2;\n if (time < 1)\n return (-end / 2) * (Math.sqrt(1 - time * time) - 1) + start;\n time -= 2;\n return (end / 2) * (Math.sqrt(1 - time * time) + 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @param {number} a amplitude (optional)\n * @param {number} p period (optional)\n * @return {number}\n */\n elasticIn: function (time, start, end, duration, a, p) {\n if (time == 0) {\n return start;\n }\n if ((time /= duration) == 1) {\n return start + end;\n }\n if (!p) {\n p = duration * 0.3;\n }\n var s = 0;\n if (!a || a < Math.abs(end)) {\n a = end;\n s = p / 4;\n }\n else {\n s = (p / (2 * Math.PI)) * Math.asin(end / a);\n }\n return -(a * Math.pow(2, 10 * (time -= 1)) * Math.sin(((time * duration - s) * (2 * Math.PI)) / p)) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @param {number} a amplitude (optional)\n * @param {number} p period (optional)\n * @return {number}\n */\n elasticOut: function (time, start, end, duration, a, p) {\n if (time == 0) {\n return start;\n }\n if ((time /= duration) == 1) {\n return start + end;\n }\n if (!p) {\n p = duration * 0.3;\n }\n var s = 0;\n if (!a || a < Math.abs(end)) {\n a = end;\n s = p / 4;\n }\n else {\n s = (p / (2 * Math.PI)) * Math.asin(end / a);\n }\n return a * Math.pow(2, -10 * time) * Math.sin(((time * duration - s) * (2 * Math.PI)) / p) + end + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @param {number} a amplitude (optional)\n * @param {number} p period (optional)\n * @return {number}\n */\n elasticInOut: function (time, start, end, duration, a, p) {\n if (time == 0) {\n return start;\n }\n if ((time /= duration / 2) == 2) {\n return start + end;\n }\n if (!p) {\n p = duration * (0.3 * 1.5);\n }\n var s = 0;\n if (!a || a < Math.abs(end)) {\n a = end;\n s = p / 4;\n }\n else {\n s = (p / (2 * Math.PI)) * Math.asin(end / a);\n }\n if (time < 1) {\n return -0.5 * (a * Math.pow(2, 10 * (time -= 1)) * Math.sin(((time * duration - s) * (2 * Math.PI)) / p)) + start;\n }\n return (a * Math.pow(2, -10 * (time -= 1)) * Math.sin(((time * duration - s) * (2 * Math.PI)) / p) * 0.5 + end + start);\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @param {number} s overshoot (optional)\n * @return {number}\n */\n backIn: function (time, start, end, duration, s) {\n if (typeof s == 'undefined') {\n s = 1.70158;\n }\n return end * (time /= duration) * time * ((s + 1) * time - s) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @param {number} s overshoot (optional)\n * @return {number}\n */\n backOut: function (time, start, end, duration, s) {\n if (typeof s == 'undefined') {\n s = 1.70158;\n }\n return end * ((time = time / duration - 1) * time * ((s + 1) * time + s) + 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @param {number} s overshoot (optional)\n * @return {number}\n */\n backInOut: function (time, start, end, duration, s) {\n if (typeof s == 'undefined') {\n s = 1.70158;\n }\n if ((time /= duration / 2) < 1) {\n return (end / 2) * (time * time * (((s *= 1.525) + 1) * time - s)) + start;\n }\n return (end / 2) * ((time -= 2) * time * (((s *= 1.525) + 1) * time + s) + 2) + start;\n },\n /**\n * @param {number} t current time\n * @param {number} b start value\n * @param {number} c end value\n * @param {number} d duration\n * @return {number}\n */\n bounceIn: function (time, start, end, duration) {\n return end - Easings.bounceOut(duration - time, 0, end, duration) + start;\n },\n /**\n * @param {number} t current time\n * @param {number} b start value\n * @param {number} c end value\n * @param {number} d duration\n * @return {number}\n */\n bounceOut: function (time, start, end, duration) {\n if ((time /= duration) < 1 / 2.75) {\n return end * (7.5625 * time * time) + start;\n }\n else if (time < 2 / 2.75) {\n return end * (7.5625 * (time -= 1.5 / 2.75) * time + 0.75) + start;\n }\n else if (time < 2.5 / 2.75) {\n return end * (7.5625 * (time -= 2.25 / 2.75) * time + 0.9375) + start;\n }\n return end * (7.5625 * (time -= 2.625 / 2.75) * time + 0.984375) + start;\n },\n /**\n *\n *\n * @param {number} time\n * @param {number} start\n * @param {number} end\n * @param {number} duration\n * @returns\n */\n bounceInOut: function (time, start, end, duration) {\n if (time < duration / 2) {\n return Easings.bounceIn(time * 2, 0, end, duration) * 0.5 + start;\n }\n return Easings.bounceOut(time * 2 - duration, 0, end, duration) * 0.5 + end * 0.5 + start;\n },\n};\nexport default Easings;\n//# sourceMappingURL=Easings.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { parseColorAndConvert, IConvertedColor } from \"../../Color\";\nimport { toArray } from \"../../Utilites\";\nimport Easings from \"./Easings\";\n/**\n * @category Services.Animation\n */\nvar Simple = {\n loop: function (props) {\n return Simple.compose(__assign(__assign({ mode: 'sinusoidal', modeFunction: 'cos' }, props), { type: 'loop', delay: undefined }));\n },\n uncontrolledLoop: function (props) {\n return Simple.compose(__assign(__assign({ mode: 'easing', modeFunction: 'linear' }, props), { type: 'uncontrolled-loop' }));\n },\n static: function (props) {\n return Simple.compose(__assign(__assign({ mode: 'easing', modeFunction: 'linear' }, props), { type: 'static' }));\n },\n compose: function (simpleAnimation) {\n if (typeof simpleAnimation.from !== 'string' && typeof simpleAnimation.to !== 'string') {\n var bArray = Array.isArray(simpleAnimation.from) || Array.isArray(simpleAnimation.to);\n //@ts-ignore\n var from_1 = bArray ? toArray(simpleAnimation.from) : simpleAnimation.from;\n //@ts-ignore\n var to_1 = bArray ? toArray(simpleAnimation.to) : simpleAnimation.to;\n var vCallback_1 = bArray\n ? function (current_index, v) {\n var a = (simpleAnimation.invertOdd && current_index % 2 == 1 ? to_1 : from_1);\n var b = (simpleAnimation.invertOdd && current_index % 2 == 1 ? from_1 : to_1);\n return simpleAnimation.typeValue === 'int'\n ? [Math.round(a[0] + v * (b[0] - a[0])), Math.round(a[1] + v * (b[1] - a[1]))]\n : [a[0] + v * (b[0] - a[0]), a[1] + v * (b[1] - a[1])];\n }\n : function (current_index, v) {\n var a = (simpleAnimation.invertOdd && current_index % 2 == 1 ? to_1 : from_1);\n var b = (simpleAnimation.invertOdd && current_index % 2 == 1 ? from_1 : to_1);\n return simpleAnimation.typeValue === 'int' ? Math.round(a + v * (b - a)) : a + v * (b - a);\n };\n return createSimpleAnimationCallback(simpleAnimation, function (props, v) {\n return vCallback_1(props.repetition.index, v);\n });\n }\n else {\n var from_2 = parseColorAndConvert(simpleAnimation.from);\n var to_2 = parseColorAndConvert(simpleAnimation.to);\n var vCallback_2 = simpleAnimation.colorTransitionMode == 'hue' ? interpolateColorHSL : interpolateColorRGB;\n if (typeof from_2 !== 'undefined' && typeof to_2 !== 'undefined') {\n return createSimpleAnimationCallback(simpleAnimation, function (props, v) {\n var a = simpleAnimation.invertOdd && props.repetition.index % 2 == 1 ? to_2 : from_2;\n var b = simpleAnimation.invertOdd && props.repetition.index % 2 == 1 ? from_2 : to_2;\n return vCallback_2(a, b, v);\n });\n }\n return function () { return 0; };\n }\n },\n};\nfunction createSimpleAnimationCallback(animation, value) {\n var _a = animation, duration = _a.duration, type = _a.type, mode = _a.mode, modeFunction = _a.modeFunction, delay = _a.delay;\n if (type === 'static') {\n if (delay && delay > 0)\n return function SimpleAnimation(props) {\n var _a, _b, _c;\n return value(props, (((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0) <= delay\n ? 0\n : (((_b = props.shape.scene) === null || _b === void 0 ? void 0 : _b.currentTime) || 0) - delay >= duration\n ? 1\n : Easings[modeFunction]((((_c = props.shape.scene) === null || _c === void 0 ? void 0 : _c.currentTime) || 0) - delay, 0, 1, duration));\n };\n else\n return function SimpleAnimation(props) {\n var _a, _b;\n return value(props, (((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0) <= duration\n ? Easings[modeFunction](((_b = props.shape.scene) === null || _b === void 0 ? void 0 : _b.currentTime) || 0, 0, 1 - 0, duration)\n : 1);\n };\n }\n else {\n if (type === 'loop') {\n if (mode == 'sinusoidal') {\n return function SimpleAnimation(props) {\n var _a;\n var frequency = ((((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0 || 0) * 2 * Math.PI) / duration;\n return value(props, 0.5 + Math[modeFunction](frequency) * 0.5);\n };\n } /* easing */\n else {\n return function SimpleAnimation(props) {\n var _a;\n var d2 = duration / 2;\n var t = (((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0) % duration;\n return value(props, t <= d2\n ? Easings[modeFunction](t, 0, 1, d2)\n : Easings[modeFunction](d2 - (t - d2), 0, 1, d2));\n };\n }\n } // uncontrolled-loop\n else {\n if (mode == 'sinusoidal') {\n return function SimpleAnimation(props) {\n var _a;\n var time = (((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0) % (duration + delay);\n time = time <= delay ? 0 : time - delay;\n var frequency = ((time || 0) * 2 * Math.PI) / duration;\n return value(props, 0.5 + Math[modeFunction](frequency) * 0.5);\n };\n }\n else {\n if (delay && delay > 0)\n return function SimpleAnimation(props) {\n var _a;\n var time = (((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0) % (duration + delay);\n return value(props, time <= delay\n ? 0\n : time - delay >= duration\n ? 1\n : Easings[modeFunction](time - delay, 0, 1, duration));\n };\n else\n return function SimpleAnimation(props) {\n var _a;\n var time = (((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0) % duration;\n return value(props, time <= duration ? Easings[modeFunction](time, 0, 1 - 0, duration) : 1);\n };\n }\n }\n }\n}\nfunction interpolateColorRGB(start, end, v) {\n var r = start.r + v * (end.r - start.r);\n var g = start.g + v * (end.g - start.g);\n var b = start.b + v * (end.b - start.b);\n var alpha = start.alpha + v * (end.alpha - start.alpha);\n return \"rgba(\" + Math.floor(r) + \",\" + Math.floor(g) + \",\" + Math.floor(b) + \",\" + alpha + \")\";\n}\nfunction interpolateColorHSL(start, end, v) {\n var h = start.h + v * (end.h - start.h);\n var s = start.s + v * (end.s - start.s);\n var l = start.l + v * (end.l - start.l);\n var alpha = start.alpha + v * (end.alpha - start.alpha);\n return \"hsla(\" + h + \",\" + s + \"%,\" + l + \"%,\" + alpha + \")\";\n}\nexport default Simple;\n//# sourceMappingURL=Simple.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport Scene from \"../../core/Scene\";\nimport Timeline from \"../timeline/Timeline\";\nimport SceneUtilities from \"../scene-utilities/SceneUtilities\";\nimport Emitter from \"../events/Emitter\";\nimport { parseColor } from \"../../Color\";\nimport { pmod } from \"../../core/math\";\n/**\n * Abstract Drawer\n *\n * @category Services.Drawer\n * @abstract\n * @class Drawer\n * @extends {Emitter}\n * @template IADrawerOptions\n * @template IDrawerEvents\n */\nvar Drawer = /** @class */ (function (_super) {\n __extends(Drawer, _super);\n function Drawer(scene, ratio, duration, framerate) {\n if (scene === void 0) { scene = undefined; }\n if (ratio === void 0) { ratio = undefined; }\n var _this = _super.call(this) || this;\n _this.timeline = new Timeline(duration, framerate);\n _this.ratio = ratio || (scene && scene.width && scene.height ? scene.width / scene.height : 1);\n if (scene) {\n var size = Math.max(scene.width, scene.height);\n var width = _this.ratio >= 1 ? size : size * _this.ratio;\n var height = _this.ratio >= 1 ? size / _this.ratio : size;\n scene.resize(width, height);\n _this.setScene(scene);\n }\n _this.draw_id = null;\n _this.redraw_id = null;\n _this.animation_id = null;\n _this.draw = _this.draw.bind(_this);\n _this.animate = _this.animate.bind(_this);\n _this.startAnimation = _this.startAnimation.bind(_this);\n return _this;\n }\n /**\n * Set scene\n *\n * @param {Scene} scene\n */\n Drawer.prototype.setScene = function (scene) {\n this.scene = scene;\n // if (!this.resolution && this.scene.width) this.resolution = this.scene.width\n };\n /**\n * Return scene\n *\n * @return {*} {Scene}\n */\n Drawer.prototype.getScene = function () {\n return this.scene;\n };\n /**\n * Return timeline\n *\n * @return {*} {Timeline}\n */\n Drawer.prototype.getTimeline = function () {\n return this.timeline;\n };\n /**\n * Resize scene and canvas\n *\n * @param {number} width\n * @param {number} height\n * @param {number} [ratio]\n */\n Drawer.prototype.resize = function (width, height, ratio) {\n var _this = this;\n ratio = ratio || this.ratio || width / height;\n var size = Math.max(width, height);\n width = ratio >= 1 ? size : size * ratio;\n height = ratio >= 1 ? size / ratio : size;\n this.ratio = ratio;\n if (this.scene) {\n this.scene.resize(width, height);\n Scene.walk(function (sceneChild) {\n if (sceneChild.data) {\n if (sceneChild.data.props) {\n var props_1 = sceneChild.data.props;\n Object.keys(props_1).forEach(function (name) {\n SceneUtilities.setProp(sceneChild, name, props_1[name], _this.scene);\n });\n }\n if (sceneChild.data.style) {\n var style_1 = sceneChild.data.style;\n Object.keys(style_1).forEach(function (name) {\n SceneUtilities.setDrawerProp(sceneChild, name, style_1[name], _this.scene);\n });\n }\n }\n }, this.scene);\n }\n };\n /**\n * Resize by ratio\n *\n */\n Drawer.prototype.setRatio = function (ratio) {\n if (this.scene) {\n this.resize(this.scene.width, this.scene.height, ratio);\n }\n };\n /**\n * Return drawer ratio\n */\n Drawer.prototype.getRatio = function () {\n return this.ratio;\n };\n /**\n * Set draw option\n *\n * @template K\n * @param {(K | IADrawerOptions)} name\n */\n Drawer.prototype.setOption = function (name, value) {\n if (typeof name == 'object') {\n var keys = Object.keys(name);\n for (var i = 0, len = keys.length; i < len; i++) {\n this.drawerOptions[keys[i]] = name[keys[i]];\n }\n }\n else {\n this.drawerOptions[name] = value;\n }\n };\n /**\n * Return option valie or default\n *\n * @template K\n * @param {K} name\n * @param {IADrawerOptions[K]} defaultValue\n */\n Drawer.prototype.getOption = function (name, defaultValue) {\n var _a;\n return (_a = this.drawerOptions[name]) !== null && _a !== void 0 ? _a : defaultValue;\n };\n /**\n * Return all options\n */\n Drawer.prototype.getOptions = function () {\n return this.drawerOptions;\n };\n /**\n * Internal tick animation\n */\n Drawer.prototype.animate = function (timestamp) {\n if (this.timeline.bSequenceStarted()) {\n this.animation_id = requestAnimationFrame(this.animate);\n if (this.timeline.tick(timestamp))\n this.draw();\n }\n };\n /**\n * Start animation drawing\n */\n Drawer.prototype.startAnimation = function () {\n this.stopAnimation();\n this.timeline.start();\n this.animation_id = requestAnimationFrame(this.animate);\n };\n /**\n * Stop animation drawing\n */\n Drawer.prototype.stopAnimation = function () {\n this.timeline.stop();\n if (this.animation_id)\n cancelAnimationFrame(this.animation_id);\n };\n /**\n * Pause animation drawing\n */\n Drawer.prototype.pauseAnimation = function () {\n this.timeline.pause();\n if (this.animation_id)\n cancelAnimationFrame(this.animation_id);\n };\n /**\n * Play animation drawing\n */\n Drawer.prototype.playAnimation = function () {\n this.timeline.start();\n requestAnimationFrame(this.animate);\n };\n /**\n * Redraw\n *\n * @returns {void}\n * @memberof DrawerCanvas\n */\n Drawer.prototype.redraw = function () {\n if (!this.timeline.bSequenceStarted()) {\n this.draw_id && cancelAnimationFrame(this.draw_id);\n if (typeof this.drawerOptions.ghosts === undefined || this.drawerOptions.ghosts === 0)\n this.timeline.stop();\n this.draw_id = requestAnimationFrame(this.draw);\n }\n else if (typeof this.drawerOptions.ghosts === undefined || this.drawerOptions.ghosts === 0) {\n this.stopAnimation();\n this.redraw_id && cancelAnimationFrame(this.redraw_id);\n this.redraw_id = requestAnimationFrame(this.startAnimation);\n }\n };\n /**\n * Return a style value\n *\n * @static\n * @template T\n * @param {ShapePrimitive} shape\n * @param {keyof T} key\n * @param {IDrawerPropArguments} propArguments\n * @param {*} [defaultValue]\n * @returns {*}\n */\n Drawer.getStreamDrawerProp = function (shape, key, propArguments, defaultValue) {\n var attribute = shape.style[key];\n if (typeof attribute === 'function') {\n attribute = attribute(propArguments);\n }\n return attribute !== null && attribute !== void 0 ? attribute : defaultValue;\n };\n /**\n * Each ghosts index and create drawerOptions to pass at the draw method\n *\n * @static\n * @template T\n * @param {T} drawerOptions\n * @param {Timeline} timeline\n * @param {((ghostDrawerOptions: T & { ghostIndex?: number }) => any)} ghostCallback\n */\n Drawer.eachGhosts = function (drawerOptions, timeline, ghostCallback) {\n if (drawerOptions.ghosts) {\n var ghostDrawerOptions = __assign({}, drawerOptions);\n var drawAtTime = timeline.getTime();\n var sequenceDuration = timeline.getDuration();\n var ghostRepetition = {\n offset: 0,\n index: 0,\n count: drawerOptions.ghosts,\n };\n for (var i = 1; i <= drawerOptions.ghosts; i++) {\n ghostRepetition.index = i;\n ghostRepetition.offset = ghostRepetition.index / ghostRepetition.count;\n var ghostTime = drawAtTime -\n (drawerOptions.ghostSkipFunction\n ? drawerOptions.ghostSkipFunction(ghostRepetition, drawAtTime)\n : i * drawerOptions.ghostSkipTime);\n ghostDrawerOptions.ghostIndex = i;\n ghostDrawerOptions.time = pmod(ghostTime, sequenceDuration);\n ghostCallback(ghostDrawerOptions);\n }\n }\n };\n /**\n * Create color based on ghostMultiplier\n *\n * @static\n * @param {any} color\n * @param {number} ghostMultiplier\n * @return {*} {(string | undefined)}\n */\n Drawer.ghostifyColor = function (color, ghostMultiplier) {\n if (typeof color === 'string' || typeof color === 'number') {\n var parsed = parseColor(color);\n if (parsed) {\n var ghostAlpha = parsed.alpha * ghostMultiplier;\n return parsed.type === 'rgb'\n ? \"rgba(\" + parsed.a + \",\" + parsed.b + \",\" + parsed.c + \",\" + ghostAlpha + \")\"\n : \"hsla(\" + parsed.a + \",\" + parsed.b + \"%,\" + parsed.c + \"%,\" + ghostAlpha + \")\";\n }\n }\n return color;\n };\n return Drawer;\n}(Emitter));\nexport default Drawer;\n//# sourceMappingURL=Drawer.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport Drawer from \"../Drawer\";\nimport FrameBuffer from \"./FrameBuffer\";\nimport { now } from \"../../../Utilites\";\nimport Vec2 from \"../../../core/math/Vec2\";\n/**\n *\n * @category Services.Drawer\n * @extends {Emitter}\n */\nvar DrawerCanvas = /** @class */ (function (_super) {\n __extends(DrawerCanvas, _super);\n function DrawerCanvas(scene, canvasOrContainer, drawerOptions, ratio, duration, framerate, bBuffering) {\n if (ratio === void 0) { ratio = undefined; }\n if (bBuffering === void 0) { bBuffering = false; }\n var _a, _b, _c, _d, _e;\n var _this = _super.call(this, scene, ratio, duration, framerate) || this;\n _this.bBuffering = false;\n _this.drawerOptions = {};\n _this.drawerOptions.clear = (_a = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.clear) !== null && _a !== void 0 ? _a : true;\n _this.drawerOptions.time = (_b = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.time) !== null && _b !== void 0 ? _b : 0;\n _this.drawerOptions.simmetricLines = (_c = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.simmetricLines) !== null && _c !== void 0 ? _c : 0;\n _this.drawerOptions.noBackground = (_d = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.noBackground) !== null && _d !== void 0 ? _d : false;\n _this.drawerOptions.ghosts = (drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.ghosts) || 0;\n _this.drawerOptions.ghostAlpha = (drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.ghostAlpha) === false ? false : true;\n _this.drawerOptions.ghostSkipTime = (_e = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.ghostSkipTime) !== null && _e !== void 0 ? _e : 30;\n _this.drawerOptions.ghostSkipFunction = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.ghostSkipFunction;\n _this.drawerOptions.backgroundImage = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.backgroundImage;\n _this.drawerOptions.backgroundImageFit = (drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.backgroundImageFit) || 'cover';\n _this.bBuffering = bBuffering;\n _this.buffer = new FrameBuffer();\n if ((typeof HTMLCanvasElement !== 'undefined' && canvasOrContainer instanceof HTMLCanvasElement) ||\n (typeof OffscreenCanvas !== 'undefined' && canvasOrContainer instanceof OffscreenCanvas)) {\n var canvas = canvasOrContainer;\n _this.setCanvas(canvas);\n }\n else if (canvasOrContainer) {\n var canvas = document.createElement('canvas');\n var container = canvasOrContainer;\n container.appendChild(canvas);\n _this.setCanvas(canvas);\n }\n return _this;\n }\n DrawerCanvas.prototype.setBuffering = function (bBuffering) {\n this.bBuffering = bBuffering;\n this.flushBuffer();\n };\n DrawerCanvas.prototype.getBBuffering = function () {\n return this.bBuffering;\n };\n /**\n * Set scene\n *\n * @param {Scene} scene\n * @memberof CanvasDrawer\n */\n DrawerCanvas.prototype.setScene = function (scene) {\n _super.prototype.setScene.call(this, scene);\n if (this.canvas) {\n this.setCanvas(this.canvas); // and flush\n }\n };\n /**\n * Set the canvas or append to container\n *\n * @param {(HTMLElement | HTMLCanvasElement | OffscreenCanvas)} canvasOrContainer\n * @memberof CanvasDrawer\n */\n DrawerCanvas.prototype.setCanvas = function (canvasOrContainer) {\n var canvas;\n if (typeof HTMLElement !== 'undefined' && canvasOrContainer instanceof HTMLElement) {\n if (typeof HTMLCanvasElement !== 'undefined' && canvasOrContainer instanceof HTMLCanvasElement) {\n canvas = canvasOrContainer;\n }\n else {\n canvas = (this.canvas || document.createElement('canvas'));\n while (canvasOrContainer.lastChild)\n canvasOrContainer.removeChild(canvasOrContainer.lastChild);\n canvasOrContainer.appendChild(canvas);\n }\n }\n else {\n canvas = canvasOrContainer;\n }\n this.canvas = canvas;\n this.context = this.canvas.getContext('2d', {\n alpha: true,\n desynchronized: this.bBuffering !== true,\n });\n if (this.scene) {\n this.resize(this.scene.width, this.scene.height); // and flush\n }\n };\n /**\n * Return canvas element\n *\n * @returns {(HTMLCanvasElement | OffscreenCanvas)}\n * @memberof DrawerCanvas\n */\n DrawerCanvas.prototype.getCanvas = function () {\n return this.canvas;\n };\n /**\n * Return canvas context\n *\n * @returns {(CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D | null)}\n * @memberof DrawerCanvas\n */\n DrawerCanvas.prototype.getContext = function () {\n return this.context;\n };\n /**\n * Resize scene and canvas\n *\n * @param {number} width\n * @param {number} height\n * @param {number} [ratio]\n * @memberof DrawerCanvas\n */\n DrawerCanvas.prototype.resize = function (width, height, ratio) {\n _super.prototype.resize.call(this, width, height, ratio);\n if (this.canvas && this.scene) {\n this.canvas.width = this.scene.width;\n this.canvas.height = this.scene.height;\n if (typeof HTMLCanvasElement !== 'undefined' && this.canvas instanceof HTMLCanvasElement) {\n this.canvas.style.width = this.scene.width + 'px';\n this.canvas.style.height = this.scene.height + 'px';\n }\n }\n this.flushBuffer();\n this.dispatch('drawer-canvas:resize');\n this.redraw();\n };\n DrawerCanvas.prototype.flushBuffer = function () {\n if (this.bBuffering) {\n this.buffer.flush();\n this.dispatch('drawer-canvas:buffer_flush');\n }\n };\n DrawerCanvas.prototype.getStoredFrames = function () {\n if (this.bBuffering) {\n return this.buffer.getStoredFrames();\n }\n return [];\n };\n /**\n * Set draw option\n *\n * @template K\n * @param {(K | IDrawerOptions)} name\n * @param {Required[K]} [value]\n * @memberof CanvasDrawer\n */\n DrawerCanvas.prototype.setOption = function (name, value) {\n _super.prototype.setOption.call(this, name, value);\n this.flushBuffer();\n };\n // public preload(): Promise {\n // \tif (this.bBuffering && this.scene) {\n // \t\treturn new Promise((resolve, reject) => {\n // \t\t\tthis.flushBuffer()\n // \t\t\tconst sequence = this.timeline.getSequence()\n // \t\t\tlet canvas: HTMLCanvasElement | OffscreenCanvas\n // \t\t\tif (typeof OffscreenCanvas !== 'undefined') canvas = new OffscreenCanvas(this.scene.width, this.scene.height)\n // \t\t\telse {\n // \t\t\t\tcanvas = document.createElement('canvas')\n // \t\t\t\tcanvas.width = this.scene.width\n // \t\t\t\tcanvas.height = this.scene.height\n // \t\t\t}\n // \t\t\tconst context: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D | null = canvas.getContext('2d', {\n // \t\t\t\talpha: true,\n // \t\t\t\tdesynchronized: false,\n // \t\t\t})\n // \t\t\tif (!context) reject('Create context error')\n // \t\t\tconst drawerOptions = { ...this.drawerOptions }\n // \t\t\tconst sequenceEndTime = this.timeline.getSequenceEndTime()\n // \t\t\tfor (let i = 0; i < sequence.frames; i++) {\n // \t\t\t\t// requestAnimationFrame(() => {\n // \t\t\t\tconst time = this.timeline.getFrameTime(i)\n // \t\t\t\tdrawerOptions.clear = this.drawerOptions.clear || i === 0\n // \t\t\t\tdrawerOptions.time = time\n // \t\t\t\tDrawerCanvas.draw(this.scene, context, drawerOptions, this.resolution)\n // \t\t\t\tif (drawerOptions.ghosts) {\n // \t\t\t\t\tfor (let gi = 1; gi <= drawerOptions.ghosts; gi++) {\n // \t\t\t\t\t\tconst ghostTime =\n // \t\t\t\t\t\t\ttime -\n // \t\t\t\t\t\t\t(drawerOptions.ghostSkipFunction\n // \t\t\t\t\t\t\t\t? drawerOptions.ghostSkipFunction(gi)\n // \t\t\t\t\t\t\t\t: gi * (drawerOptions.ghostSkipTime ?? 30))\n // \t\t\t\t\t\tdrawerOptions.clear = false\n // \t\t\t\t\t\tdrawerOptions.ghostIndex = gi\n // \t\t\t\t\t\tdrawerOptions.time =\n // \t\t\t\t\t\t\tghostTime < 0\n // \t\t\t\t\t\t\t\t? ghostTime + sequenceEndTime\n // \t\t\t\t\t\t\t\t: ghostTime > sequenceEndTime\n // \t\t\t\t\t\t\t\t? ghostTime % sequenceEndTime\n // \t\t\t\t\t\t\t\t: ghostTime\n // \t\t\t\t\t\tDrawerCanvas.draw(this.scene, context, drawerOptions, this.resolution)\n // \t\t\t\t\t}\n // \t\t\t\t}\n // \t\t\t\tthis.buffer.push(i, context as CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D)\n // \t\t\t\t// })\n // \t\t\t}\n // \t\t\tresolve(true)\n // \t\t})\n // \t} else {\n // \t\treturn Promise.reject()\n // \t}\n // }\n /**\n * Draw current scene\n *\n * @returns {number}\n * @memberof DrawerCanvas\n */\n DrawerCanvas.prototype.draw = function () {\n var _this = this;\n var _a;\n if (typeof this.scene === 'undefined')\n return -1;\n var draw_time = 0;\n var timeline = this.timeline;\n var drawAtTime = timeline.getTime();\n var drawerOptions = __assign(__assign({}, this.drawerOptions), { ghostIndex: undefined, clear: this.drawerOptions.clear || timeline.getCurrentFrame() <= 1, time: drawAtTime });\n var currentFrame = timeline.getFrameAtTime(drawAtTime);\n this.dispatch('drawer-canvas:before_draw', {\n currentFrame: currentFrame,\n currentTime: drawAtTime,\n });\n if (this.bBuffering && this.buffer.exist(currentFrame)) {\n (_a = this.context) === null || _a === void 0 ? void 0 : _a.putImageData(this.buffer.get(currentFrame), 0, 0);\n }\n else {\n if (drawerOptions.ghosts) {\n Drawer.eachGhosts(drawerOptions, timeline, function (ghostDrawerOptions) {\n ghostDrawerOptions.clear = drawerOptions.clear && ghostDrawerOptions.ghostIndex === 1;\n draw_time += _this.applyDraw(ghostDrawerOptions);\n });\n drawerOptions.clear = false;\n }\n draw_time += this.applyDraw(drawerOptions);\n if (this.bBuffering && this.context) {\n this.buffer.push(currentFrame, this.context);\n if (this.buffer.count() >= this.timeline.getFramesCount()) {\n this.dispatch('drawer-canvas:buffer_loaded');\n }\n }\n }\n return draw_time;\n };\n /**\n * Redraw\n *\n * @returns {void}\n * @memberof DrawerCanvas\n */\n DrawerCanvas.prototype.redraw = function () {\n if (!this.timeline.bSequenceStarted()) {\n this.draw_id && cancelAnimationFrame(this.draw_id);\n !this.drawerOptions.clear &&\n (typeof this.drawerOptions.ghosts === undefined || this.drawerOptions.ghosts === 0) &&\n this.timeline.stop();\n this.draw_id = requestAnimationFrame(this.draw);\n }\n else if (!this.drawerOptions.clear &&\n (typeof this.drawerOptions.ghosts === undefined || this.drawerOptions.ghosts === 0)) {\n this.stopAnimation();\n this.redraw_id && cancelAnimationFrame(this.redraw_id);\n this.redraw_id = requestAnimationFrame(this.startAnimation);\n }\n };\n DrawerCanvas.prototype.applyDraw = function (options) {\n var _a, _b;\n var start_time = now();\n var scene = this.scene;\n var context = this.context;\n context.globalCompositeOperation = 'source-over';\n var time = (_a = options.time) !== null && _a !== void 0 ? _a : 0;\n var simmetricLines = (_b = options.simmetricLines) !== null && _b !== void 0 ? _b : 0;\n var clear = options.clear;\n var noBackground = options.noBackground;\n var backgroundImage = options.backgroundImage;\n var bGhost = typeof options.ghosts !== 'undefined' &&\n options.ghosts > 0 &&\n typeof options.ghostIndex !== 'undefined' &&\n options.ghostIndex > 0;\n var ghostMultiplier = bGhost ? 1 - options.ghostIndex / (options.ghosts + 0.5) : 0;\n var ghostAlpha = options.ghostAlpha === true;\n var width = scene.width;\n var height = scene.height;\n var ratio = width / height;\n if (clear) {\n if (noBackground) {\n context.clearRect(0, 0, width, height);\n }\n else {\n context.fillStyle = scene.background;\n context.fillRect(0, 0, width, height);\n if (backgroundImage) {\n var sourceWidth = backgroundImage instanceof SVGImageElement ? backgroundImage.width.baseVal.value : backgroundImage.width;\n var sourceHeight = backgroundImage instanceof SVGImageElement ? backgroundImage.height.baseVal.value : backgroundImage.height;\n var sourceRatio = sourceWidth / sourceHeight;\n var x = 0, y = 0, bgWidth = width, bgHeight = height;\n if (sourceRatio !== ratio) {\n if (options.backgroundImageFit === 'contain') {\n bgWidth = ratio > sourceRatio ? (sourceWidth * height) / sourceHeight : width;\n bgHeight = ratio > sourceRatio ? height : (sourceHeight * width) / sourceWidth;\n }\n else {\n bgWidth = ratio < sourceRatio ? (sourceWidth * height) / sourceHeight : width;\n bgHeight = ratio < sourceRatio ? height : (sourceHeight * width) / sourceWidth;\n }\n x = (width - bgWidth) / 2;\n y = (height - bgHeight) / 2;\n }\n context.drawImage(backgroundImage, x, y, bgWidth, bgHeight);\n }\n }\n if (simmetricLines > 0) {\n DrawerCanvas.drawSimmetricLines(context, simmetricLines, width, height, scene.color);\n }\n }\n {\n var logFillColorWarn_1 = false;\n var logStrokeColorWarn_1 = false;\n scene.currentTime = time;\n scene.getChildren().forEach(function (sceneChild) {\n if (!sceneChild.data ||\n (!(sceneChild.data.visible === false) && !(bGhost && sceneChild.data.disableGhost === true))) {\n sceneChild.generate(time, true);\n context.save();\n sceneChild.stream(function (stream) {\n var currentIndex = stream.currentIndexing;\n var shape = currentIndex.shape;\n var propArguments = {\n canvasContext: context,\n shape: shape,\n // singleRepetitionBounding: currentIndex.singleRepetitionBounding,\n repetition: {\n type: currentIndex.repetition.type,\n angle: currentIndex.repetition.angle,\n index: currentIndex.repetition.index,\n count: currentIndex.repetition.count,\n offset: currentIndex.repetition.offset,\n row: {\n index: currentIndex.repetition.row.index,\n count: currentIndex.repetition.row.count,\n offset: currentIndex.repetition.row.offset,\n },\n col: {\n index: currentIndex.repetition.col.index,\n count: currentIndex.repetition.col.count,\n offset: currentIndex.repetition.col.offset,\n },\n },\n parent: currentIndex.parent,\n };\n var composite = Drawer.getStreamDrawerProp(shape, 'composite', propArguments, 'source-over');\n context.globalCompositeOperation = composite;\n context.beginPath();\n context.moveTo(stream.buffer[stream.frameBufferIndex], stream.buffer[stream.frameBufferIndex + 1]);\n for (var i = 2; i < stream.frameLength; i += 2) {\n context.lineTo(stream.buffer[stream.frameBufferIndex + i], stream.buffer[stream.frameBufferIndex + i + 1]);\n }\n currentIndex.shape.isClosed() && context.closePath();\n var alpha = Drawer.getStreamDrawerProp(shape, 'opacity', propArguments, 1);\n context.globalAlpha = alpha;\n var shadowColor = Drawer.getStreamDrawerProp(shape, 'shadowColor', propArguments);\n var shadowBlur = Drawer.getStreamDrawerProp(shape, 'shadowBlur', propArguments);\n var shadowOffsetX = Drawer.getStreamDrawerProp(shape, 'shadowOffsetX', propArguments);\n var shadowOffsetY = Drawer.getStreamDrawerProp(shape, 'shadowOffsetY', propArguments);\n context.shadowColor = shadowColor;\n context.shadowBlur = shadowBlur;\n shadowOffsetX && (context.shadowOffsetX = shadowOffsetX);\n shadowOffsetY && (context.shadowOffsetY = shadowOffsetY);\n var fill = Drawer.getStreamDrawerProp(shape, 'fill', propArguments);\n if (typeof fill !== 'undefined') {\n if (bGhost && ghostAlpha) {\n var color = Drawer.ghostifyColor(fill, ghostMultiplier);\n if (color) {\n fill = color;\n }\n else if (!logFillColorWarn_1) {\n console.warn(\"[Urpflanze:DrawerCanvas] Unable ghost fill color '\" + fill + \"',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tplease enter a rgba or hsla color\");\n logFillColorWarn_1 = true;\n }\n }\n context.fillStyle = fill;\n context.fill();\n }\n var stroke = Drawer.getStreamDrawerProp(shape, 'stroke', propArguments, typeof fill === 'undefined' ? scene.color : undefined);\n var lineWidth = Drawer.getStreamDrawerProp(shape, 'lineWidth', propArguments, 1);\n if (stroke) {\n if (bGhost && ghostAlpha) {\n var color = Drawer.ghostifyColor(stroke, ghostMultiplier);\n if (color) {\n stroke = color;\n }\n else if (!logStrokeColorWarn_1) {\n console.warn(\"[Urpflanze:DrawerCanvas] Unable ghost stroke color '\" + stroke + \"',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tplease enter a rgba or hsla color\");\n logStrokeColorWarn_1 = true;\n }\n lineWidth *= ghostMultiplier;\n }\n var lineJoin = Drawer.getStreamDrawerProp(shape, 'lineJoin', propArguments);\n var lineCap = Drawer.getStreamDrawerProp(shape, 'lineCap', propArguments);\n var lineDash = Drawer.getStreamDrawerProp(shape, 'lineDash', propArguments);\n var lineDashOffset = Drawer.getStreamDrawerProp(shape, 'lineDashOffset', propArguments);\n var miterLimit = Drawer.getStreamDrawerProp(shape, 'miterLimit', propArguments);\n context.setLineDash.call(context, lineDash || []);\n context.lineJoin = lineJoin;\n context.lineCap = lineCap;\n context.lineDashOffset = lineDashOffset;\n context.miterLimit = miterLimit;\n context.lineWidth = lineWidth;\n context.strokeStyle = stroke;\n context.stroke();\n }\n });\n context.restore();\n }\n });\n }\n var end_time = now();\n return end_time - start_time;\n };\n DrawerCanvas.drawSimmetricLines = function (context, simmetricLines, width, height, color) {\n var offset = Math.PI / simmetricLines;\n var size = Math.max(width, height);\n var center = [size / 2, size / 2];\n for (var i = 0; i < simmetricLines; i++) {\n var a = [-size, -size];\n var b = [size * 2, size * 2];\n var rotate = i * offset + Math.PI / 4;\n Vec2.rotateZ(a, center, rotate);\n Vec2.rotateZ(b, center, rotate);\n context.beginPath();\n context.strokeStyle = color;\n context.lineWidth = 1;\n context.moveTo(a[0], a[1]);\n context.lineTo(b[0], b[1]);\n context.stroke();\n }\n };\n return DrawerCanvas;\n}(Drawer));\nexport default DrawerCanvas;\n//# sourceMappingURL=DrawerCanvas.js.map","/**\n *\n * @category Services.Drawer\n * @class FrameBuffer\n */\nvar FrameBuffer = /** @class */ (function () {\n function FrameBuffer() {\n this.frames = {};\n }\n FrameBuffer.prototype.exist = function (frameNumber) {\n return typeof this.frames[frameNumber] !== 'undefined';\n };\n FrameBuffer.prototype.get = function (frameNumber) {\n return this.exist(frameNumber) ? this.frames[frameNumber] : null;\n };\n FrameBuffer.prototype.count = function () {\n return Object.keys(this.frames).length;\n };\n FrameBuffer.prototype.push = function (frameNumber, context) {\n this.frames[frameNumber] = context.getImageData(0, 0, context.canvas.width, context.canvas.height);\n };\n FrameBuffer.prototype.flush = function () {\n this.frames = {};\n };\n FrameBuffer.prototype.getStoredFrames = function () {\n return Object.keys(this.frames).map(function (e) { return +e; });\n };\n return FrameBuffer;\n}());\nexport default FrameBuffer;\n//# sourceMappingURL=FrameBuffer.js.map","/**\n * Class used for emit and dispatch events\n *\n * @category Services.Emitter\n * @abstract\n * @class Emitter\n * @template EventTypes\n */\nvar Emitter = /** @class */ (function () {\n function Emitter() {\n this.callbacks = {};\n }\n /**\n * Attach callback at event\n *\n * @param {keyof EventTypes} e\n * @param {(value: EventTypes[keyof EventTypes]) => any} callback\n * @memberof Emitter\n */\n Emitter.prototype.attach = function (e, callback) {\n if (!(e in this.callbacks)) {\n this.callbacks[e] = [];\n }\n this.callbacks[e].push(callback);\n };\n /**\n * Remove callbach listener at event\n *\n * @param {keyof EventTypes} e\n * @param {(value: EventTypes[keyof EventTypes]) => void} callback\n * @memberof Emitter\n */\n Emitter.prototype.detach = function (e, callback) {\n if (e in this.callbacks) {\n var index = this.callbacks[e].indexOf(callback);\n if (index >= 0) {\n this.callbacks[e].splice(index, 1);\n }\n }\n };\n /**\n * Dispatch event\n *\n * @param {keyof EventTypes} e\n * @param {EventTypes[keyof EventTypes]} [params]\n * @memberof Emitter\n */\n Emitter.prototype.dispatch = function (e, params) {\n if (e in this.callbacks) {\n for (var i = 0, len = this.callbacks[e].length; i < len; i++)\n if (this.callbacks[e][i](params) === false)\n break;\n }\n };\n return Emitter;\n}());\nexport default Emitter;\n//# sourceMappingURL=Emitter.js.map","import Spiral from \"../../core/shapes/primitives/Spiral\";\nimport { EShapePrimitiveAdaptMode } from \"../../core/types/shape-base\";\nvar OptionShapePrimitiveAdaptMode = [\n { key: 'None', value: EShapePrimitiveAdaptMode.None },\n { key: 'Scale', value: EShapePrimitiveAdaptMode.Scale },\n { key: 'Center', value: EShapePrimitiveAdaptMode.Center },\n { key: 'Fill', value: EShapePrimitiveAdaptMode.Fill },\n];\nvar OptionSpiralType = [\n { key: 'ARCHIMEDE', value: Spiral.types.ARCHIMEDE },\n { key: 'FERMAT', value: Spiral.types.FERMAT },\n { key: 'HYPERBOLIC', value: Spiral.types.HYPERBOLIC },\n { key: 'LITUUS', value: Spiral.types.LITUUS },\n { key: 'LOGARITHMIC', value: Spiral.types.LOGARITHMIC },\n];\n/**\n * @category Services.Scene Utilities\n */\nvar SceneChildUtilitiesData = {\n repetitions: {\n animable: true,\n name: 'repetitions',\n label: 'Repetitions',\n type: 'range',\n min: 1,\n max: 200,\n step: 1,\n default: 1,\n default_animate: 20,\n canBArray: true,\n transformation: 'none',\n dataType: 'props',\n type_value: 'int',\n },\n distance: {\n animable: true,\n name: 'distance',\n label: 'Distance',\n type: 'range',\n min: -100,\n max: 100,\n step: 0.1,\n default: 0,\n canBArray: true,\n default_animate: 25,\n transformation: 'scene-size-percentage',\n dataType: 'props',\n },\n displace: {\n animable: true,\n name: 'displace',\n label: 'Displace',\n type: 'range',\n min: -360,\n max: 360,\n step: 1,\n default: 0,\n default_animate: 360,\n transformation: 'angle',\n dataType: 'props',\n },\n squeezeX: {\n animable: true,\n name: 'squeezeX',\n label: 'SqueezeX',\n type: 'range',\n min: -0.2,\n max: 0.2,\n step: 0.01,\n default: 0,\n default_animate: 0.1,\n transformation: 'scene-size-percentage-inverse',\n dataType: 'props',\n },\n squeezeY: {\n animable: true,\n name: 'squeezeY',\n label: 'SqueezeY',\n type: 'range',\n min: -0.2,\n max: 0.2,\n step: 0.01,\n default: 0,\n default_animate: 0.1,\n transformation: 'scene-size-percentage-inverse',\n dataType: 'props',\n },\n rotateX: {\n animable: true,\n name: 'rotateX',\n label: 'RotateX',\n type: 'range',\n min: -360,\n max: 360,\n step: 1,\n default: 0,\n default_animate: 360,\n transformation: 'angle',\n dataType: 'props',\n },\n rotateY: {\n animable: true,\n name: 'rotateY',\n label: 'RotateY',\n type: 'range',\n min: -360,\n max: 360,\n step: 1,\n default: 0,\n default_animate: 360,\n transformation: 'angle',\n dataType: 'props',\n },\n rotateZ: {\n animable: true,\n name: 'rotateZ',\n label: 'RotateZ',\n type: 'range',\n min: -360,\n max: 360,\n step: 1,\n default: 0,\n default_animate: 360,\n transformation: 'angle',\n dataType: 'props',\n },\n skewX: {\n animable: true,\n name: 'skewX',\n label: 'SkewX',\n type: 'range',\n min: -90,\n max: 90,\n step: 1,\n default: 0,\n default_animate: 1,\n transformation: 'angle',\n dataType: 'props',\n },\n skewY: {\n animable: true,\n name: 'skewY',\n label: 'SkewY',\n type: 'range',\n min: -90,\n max: 90,\n step: 1,\n default: 0,\n default_animate: 1,\n transformation: 'angle',\n dataType: 'props',\n },\n translate: {\n animable: true,\n name: 'translate',\n label: 'Translate',\n type: 'multiple-range',\n min: -100,\n max: 100,\n step: 0.1,\n default: 0,\n default_animate: 0,\n initialArray: true,\n transformation: 'scene-size-percentage',\n dataType: 'props',\n },\n scale: {\n animable: true,\n name: 'scale',\n label: 'Scale',\n type: 'multiple-range',\n min: -5,\n max: 5,\n step: 0.01,\n default: 1,\n default_animate: 3,\n transformation: 'none',\n dataType: 'props',\n },\n transformOrigin: {\n animable: true,\n name: 'transformOrigin',\n label: 'Transform Origin',\n type: 'multiple-range',\n min: -1,\n max: 1,\n step: 0.01,\n default: [0, 0],\n default_animate: [-1, 1],\n initialArray: true,\n transformation: 'none',\n dataType: 'props',\n },\n perspective: {\n animable: true,\n name: 'perspective',\n label: 'Perspective',\n type: 'range',\n min: 0,\n max: 1,\n step: 0.01,\n default: 0,\n default_animate: 0.8,\n transformation: 'none',\n dataType: 'props',\n },\n perspectiveOrigin: {\n animable: true,\n name: 'perspectiveOrigin',\n label: 'Perspective Origin',\n type: 'multiple-range',\n min: -1,\n max: 1,\n step: 0.01,\n default: [0, 0],\n default_animate: [-1, 1],\n initialArray: true,\n transformation: 'none',\n dataType: 'props',\n },\n // primitive style\n fill: {\n animable: true,\n name: 'fill',\n label: 'Fill',\n type: 'color',\n default: '#000',\n default_animate: '#fff',\n transformation: 'none',\n dataType: 'drawer',\n },\n stroke: {\n animable: true,\n name: 'stroke',\n label: 'Stroke',\n type: 'color',\n default: '#fff',\n default_animate: '#000',\n transformation: 'none',\n dataType: 'drawer',\n },\n lineWidth: {\n animable: true,\n name: 'lineWidth',\n label: 'Stroke weight',\n type: 'slider',\n min: 0,\n max: 30,\n step: 0.01,\n default: 0.1,\n default_animate: 3,\n transformation: 'scene-size-percentage',\n dataType: 'drawer',\n },\n bClosed: {\n name: 'bClosed',\n label: 'Closed',\n type: 'checkbox',\n default: undefined,\n transformation: 'none',\n dataType: 'settings',\n },\n bUseParent: {\n name: 'bUseParent',\n label: 'Use parent repetition',\n type: 'checkbox',\n default: false,\n transformation: 'none',\n dataType: 'settings',\n },\n bUseRecursion: {\n name: 'bUseRecursion',\n label: 'Use recursion repetition',\n type: 'checkbox',\n default: false,\n transformation: 'none',\n dataType: 'settings',\n },\n vertexCallback: {\n name: 'vertexCallback',\n label: 'vertexCallback',\n type: 'function',\n default: undefined,\n transformation: 'none',\n dataType: 'settings',\n },\n adaptMode: {\n name: 'adaptMode',\n label: 'Adapt',\n type: 'radio',\n options: OptionShapePrimitiveAdaptMode,\n default: undefined,\n transformation: 'none',\n dataType: 'settings',\n },\n // recursion\n recursions: {\n animable: true,\n name: 'recursion',\n label: 'Recursion',\n type: 'range',\n min: 1,\n max: 8,\n step: 1,\n default: 1,\n default_animate: 2,\n transformation: 'none',\n dataType: 'props',\n type_value: 'int',\n },\n recursionScale: {\n animable: true,\n name: 'recursionScale',\n label: 'Recursion Scale',\n type: 'range',\n min: 0.1,\n max: 5,\n step: 0.01,\n default: 1,\n default_animate: 2,\n transformation: 'none',\n dataType: 'props',\n },\n recursionVertex: {\n animable: true,\n name: 'recursionVertex',\n label: 'Recursion Vertex',\n type: 'range',\n min: 1,\n max: 100,\n step: 1,\n default: 10,\n default_animate: 20,\n transformation: 'none',\n dataType: 'props',\n type_value: 'int',\n },\n // primitive\n sideLength: {\n animable: true,\n name: 'sideLength',\n label: 'Side Length',\n type: 'multiple-range',\n min: 0.01,\n max: 100,\n step: 0.1,\n default: 10,\n default_animate: 20,\n transformation: 'scene-size-percentage',\n dataType: 'props',\n },\n // polygon\n sideNumber: {\n animable: true,\n name: 'sideNumber',\n label: 'Side Number',\n type: 'range',\n min: 1,\n max: 20,\n step: 1,\n default: 5,\n default_animate: 2,\n transformation: 'none',\n dataType: 'props',\n },\n // rose\n n: {\n animable: true,\n name: 'n',\n label: 'n',\n type: 'range',\n min: 1,\n max: 10,\n step: 1,\n default: 1,\n default_animate: 3,\n transformation: 'none',\n dataType: 'props',\n },\n d: {\n animable: true,\n name: 'd',\n label: 'd',\n type: 'range',\n min: 1,\n max: 10,\n step: 1,\n default: 2,\n default_animate: 4,\n transformation: 'none',\n dataType: 'props',\n },\n // lissajous\n wx: {\n animable: true,\n name: 'wx',\n label: 'wx',\n type: 'range',\n min: 1,\n max: 10,\n step: 1,\n default: 1,\n default_animate: 3,\n transformation: 'none',\n dataType: 'props',\n },\n wy: {\n animable: true,\n name: 'wy',\n label: 'wy',\n type: 'range',\n min: 1,\n max: 10,\n step: 1,\n default: 2,\n default_animate: 4,\n transformation: 'none',\n dataType: 'props',\n },\n wz: {\n animable: true,\n name: 'wz',\n label: 'wz',\n type: 'range',\n min: -360,\n max: 360,\n step: 1,\n default: 0,\n default_animate: 360,\n transformation: 'angle',\n dataType: 'props',\n },\n // spiral\n twists: {\n animable: true,\n name: 'twists',\n label: 'Twists',\n type: 'range',\n min: 1,\n max: 60,\n step: 0.1,\n default: 1,\n default_animate: 3,\n transformation: 'none',\n dataType: 'props',\n },\n twistsStart: {\n animable: true,\n name: 'twists_start',\n label: 'Twists start',\n type: 'range',\n min: 0,\n max: 60,\n step: 0.1,\n default: 0,\n default_animate: 1,\n transformation: 'none',\n dataType: 'props',\n },\n spiral: {\n name: 'spiral',\n label: 'Spiral type',\n type: 'select',\n options: OptionSpiralType,\n default: Spiral.types.ARCHIMEDE,\n transformation: 'none',\n dataType: 'props',\n },\n // supershape\n a: {\n animable: true,\n name: 'a',\n label: 'A',\n type: 'range',\n min: -5,\n max: 5,\n step: 0.1,\n default: 1,\n default_animate: 0.1,\n transformation: 'none',\n dataType: 'props',\n },\n b: {\n animable: true,\n name: 'b',\n label: 'B',\n type: 'range',\n min: -5,\n max: 5,\n step: 0.1,\n default: 1,\n default_animate: 0.1,\n transformation: 'none',\n dataType: 'props',\n },\n m: {\n animable: true,\n name: 'm',\n label: 'm',\n type: 'range',\n min: 1,\n max: 20,\n step: 1,\n default: 1,\n default_animate: 6,\n transformation: 'none',\n dataType: 'props',\n type_value: 'int',\n },\n n1: {\n animable: true,\n name: 'n1',\n label: 'n1',\n type: 'range',\n min: -3,\n max: 3,\n step: 0.01,\n default: 1,\n default_animate: 0.1,\n transformation: 'none',\n dataType: 'props',\n },\n n2: {\n animable: true,\n name: 'n2',\n label: 'n2',\n type: 'range',\n min: -3,\n max: 3,\n step: 0.01,\n default: 1,\n default_animate: 0.1,\n transformation: 'none',\n dataType: 'props',\n },\n n3: {\n animable: true,\n name: 'n3',\n label: 'n3',\n type: 'range',\n min: -3,\n max: 3,\n step: 0.01,\n default: 1,\n default_animate: 0.1,\n transformation: 'none',\n dataType: 'props',\n },\n // loop\n 'loop.start': {\n name: 'loop.start',\n label: 'start',\n type: 'range',\n default: undefined,\n min: 0,\n max: 100,\n step: 0.01,\n transformation: 'none',\n dataType: 'props',\n },\n 'loop.end': {\n name: 'loop.end',\n label: 'end',\n type: 'range',\n default: undefined,\n min: 0,\n max: 100,\n step: 0.01,\n transformation: 'none',\n dataType: 'props',\n },\n 'loop.inc': {\n name: 'loop.inc',\n label: 'inc',\n type: 'range',\n default: undefined,\n min: 0.01,\n max: 100,\n step: 0.01,\n transformation: 'none',\n dataType: 'props',\n },\n};\nexport default SceneChildUtilitiesData;\n//# sourceMappingURL=SceneChildUtilitiesData.js.map","var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nimport { v1 as uuidv1 } from 'uuid';\nimport SceneChild from \"../../core/SceneChild\";\n// Shapes\nimport Line from \"../../core/shapes/primitives/Line\";\nimport Triangle from \"../../core/shapes/primitives/Triangle\";\nimport Rect from \"../../core/shapes/primitives/Rect\";\nimport Polygon from \"../../core/shapes/primitives/Polygon\";\nimport Circle from \"../../core/shapes/primitives/Circle\";\nimport Rose from \"../../core/shapes/primitives/Rose\";\nimport Spiral from \"../../core/shapes/primitives/Spiral\";\nimport Lissajous from \"../../core/shapes/primitives/Lissajous\";\nimport SuperShape from \"../../core/shapes/primitives/SuperShape\";\nimport Shape from \"../../core/shapes/Shape\";\nimport ShapeRecursive from \"../../core/shapes/ShapeRecursive\";\nimport ShapePrimitive from \"../../core/shapes/ShapePrimitive\";\nimport ShapeLoop from \"../../core/shapes/ShapeLoop\";\nimport ShapeBuffer from \"../../core/shapes/ShapeBuffer\";\nimport Scene from \"../../core/Scene\";\nimport Group from \"../../core/Group\";\nimport ShapeBase from \"../../core/shapes/ShapeBase\";\nimport Animation from \"../animation/Animation\";\nimport SceneChildUtilitiesData from \"./SceneChildUtilitiesData\";\nimport SceneUtilitiesExtended from \"./SceneUtilitiesExtended\";\n/**\n *\n * @category Services.Scene Utilities\n * @class SceneUtilities\n */\nvar SceneUtilities = /** @class */ (function () {\n function SceneUtilities() {\n this.registeredSceneChilds = {};\n this.registeredSceneChilds = {\n Line: Line,\n Triangle: Triangle,\n Rect: Rect,\n Polygon: Polygon,\n Circle: Circle,\n Rose: Rose,\n Spiral: Spiral,\n Lissajous: Lissajous,\n SuperShape: SuperShape,\n Group: Group,\n Shape: Shape,\n ShapeRecursive: ShapeRecursive,\n ShapeLoop: ShapeLoop,\n ShapeBuffer: ShapeBuffer,\n };\n }\n //#region Register scene child\n /**\n * Return a list of name of registered sceneChild\n *\n * @returns {Array}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getRegistered = function () {\n return Object.keys(this.registeredSceneChilds);\n };\n /**\n * Register scene child for fast creation\n *\n * @param {string} type\n * @param {SceneChildInstance} ref\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.register = function (type, ref) {\n if (!(type in this.registeredSceneChilds)) {\n this.registeredSceneChilds[type] = ref;\n }\n else {\n console.warn(\"SceneUtilities: SceneChild \\\"\" + type + \"\\\" is already registered\");\n }\n };\n /**\n * unregister scene child\n *\n * @param {string} type\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.unregister = function (type) {\n if (type in this.registeredSceneChilds) {\n delete this.registeredSceneChilds[type];\n }\n else {\n console.warn(\"SceneUtilities: SceneChild \\\"\" + type + \"\\\" is not registered\");\n }\n };\n //#endregion\n //#region Scene manipulation\n /**\n * Logic creation of a SceneChild\n * Since scene is not passed, name are set if they are present in args or type\n *\n *\n * @param {(string | SceneChild)} item\n * @param {TSceneChildUtilitiesSettings} [setting]\n * @param {Scene} [scene]\n * @returns {(SceneChild | null)}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.create = function (item, settings, scene) {\n var _this = this;\n var _a;\n scene = scene ? scene : typeof item !== 'string' ? item.scene : undefined;\n if (item instanceof SceneChild) {\n this.getChildren(item).forEach(function (child) { return _this.create(child, undefined, scene); });\n return item;\n }\n if (item in this.registeredSceneChilds) {\n if (!settings)\n settings = {};\n settings.id = settings.id || uuidv1();\n if (!settings.name && scene)\n settings.name = item + '_' + (this.getCountSceneChildOfType(scene, item) + 1);\n if (!settings.data)\n settings.data = {};\n if (!('props' in settings.data))\n settings.data.props = {};\n if (!('style' in settings.data))\n settings.data.style = {};\n if (!('visible' in settings.data))\n settings.data.visible = true;\n // if (!('highlighted' in settings.data)) settings.data.highlighted = false\n // if (!('disableGhost' in settings.data)) settings.data.disableGhost = false\n // if (item === 'ShapeLoop') {\n // \tif (!('loop' in settings)) settings.loop = { start: 0, end: Math.PI * 2, inc: (Math.PI * 2) / 20 }\n // }\n var sceneChild = new this.registeredSceneChilds[item](settings);\n if (sceneChild && scene && this.isAPrimitive(sceneChild)) {\n this.set(sceneChild, 'sideLength', { type: 'transformable-prop', value: (_a = SceneChildUtilitiesData.sideLength) === null || _a === void 0 ? void 0 : _a.default }, scene);\n // this.setProp(\n // \tsceneChild,\n // \t'sideLength',\n // \t{ type: 'transformable-prop', value: SceneChildUtilitiesData.sideLength?.default },\n // \tscene\n // )\n }\n this.getChildren(sceneChild).forEach(function (child) { return _this.create(child); });\n return sceneChild;\n }\n console.warn(\"SceneUtilities: Creation failed. SceneChild \\\"\" + item + \"\\\" is not registered\");\n return null;\n };\n /**\n * Return number of element from a type\n *\n * @param {Scene} scene\n * @param {string} type\n * @returns {number}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getCountSceneChildOfType = function (scene, type) {\n var count = 0;\n Scene.walk(function (sceneChild) {\n count += sceneChild.type == type ? 1 : 0;\n }, scene);\n return count;\n };\n /**\n * Return a copy of sceneChild\n *\n * @param {SceneChild} sceneChild\n * @param {Scene} [scene]\n * @param {boolean} [strict]\n * @returns {(SceneChild | null)}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.copy = function (sceneChild, scene, strict) {\n var _this = this;\n if (strict === void 0) { strict = false; }\n // copy only props, without name, id\n var setting = sceneChild.getProps();\n if (sceneChild instanceof ShapeBase) {\n setting.bUseParent = sceneChild.bUseParent;\n setting.bUseRecursion = sceneChild.bUseRecursion;\n }\n if (sceneChild instanceof ShapeBuffer) {\n setting.shape = sceneChild.shape;\n }\n if (sceneChild instanceof ShapePrimitive) {\n setting.bClosed = sceneChild.bClosed;\n setting.adaptMode = sceneChild.adaptMode;\n setting.vertexCallback = sceneChild.vertexCallback;\n }\n if (sceneChild instanceof ShapeLoop) {\n setting.loopDependencies = sceneChild.loopDependencies;\n }\n if (sceneChild instanceof ShapeLoop) {\n setting.loopDependencies = sceneChild.loopDependencies;\n }\n if (strict) {\n setting.id = sceneChild.id;\n setting.name = sceneChild.name;\n setting.order = sceneChild.order;\n setting.data = JSON.parse(JSON.stringify(sceneChild.data || {}));\n }\n var copied = this.create(sceneChild.type, setting, scene);\n if (copied) {\n if (sceneChild instanceof Group) {\n sceneChild.getChildren().forEach(function (child) {\n var copiedChild = _this.copy(child, scene);\n copiedChild && copied.add(copiedChild);\n });\n }\n else if (sceneChild instanceof Shape && copied instanceof Shape && sceneChild.shape) {\n var copiedShape = this.copy(sceneChild.shape, scene);\n copiedShape && (copied.shape = copiedShape);\n }\n else if (sceneChild instanceof ShapeBuffer && copied instanceof ShapeBuffer && sceneChild.shape) {\n copied.setShape(new Float32Array(sceneChild.shape));\n }\n return copied;\n }\n console.warn(\"SceneUtilities: Copy failed.\", sceneChild);\n return null;\n };\n /**\n * Add scene child to parent.\n * Create a group if parent is Shape and has one element (not Group) inside.\n *\n * @param {(SceneChild | Scene)} parent\n * @param {(string | SceneChild)} sceneChild\n * @param {TSceneChildUtilityProps} [props]\n * @param {Scene} [scene]\n * @returns {(SceneChild | null)}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.add = function (parent, sceneChild, settings, scene) {\n var newSceneChild = null;\n if (parent instanceof Group || parent instanceof Scene) {\n newSceneChild = this.create(sceneChild, settings, scene);\n newSceneChild && parent.add(newSceneChild);\n }\n else if (parent instanceof Shape) {\n if (parent.shape == undefined) {\n newSceneChild = this.create(sceneChild, settings, scene);\n newSceneChild && parent.setShape(newSceneChild);\n }\n else if (parent.shape instanceof ShapeBase) {\n newSceneChild = this.create(sceneChild, settings, scene);\n if (newSceneChild) {\n var newGroup = this.create('Group', undefined, scene);\n var sibling = parent.shape;\n this.remove(parent, sibling);\n parent.setShape(newGroup);\n newGroup.add(sibling);\n newGroup.add(newSceneChild);\n }\n }\n else if (parent.shape instanceof Group) {\n this.add(parent.shape, sceneChild, undefined, scene);\n }\n }\n return newSceneChild;\n };\n /**\n * Remove scene child from\n *\n * @param {SceneChild} from\n * @param {SceneChild} [item]\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.remove = function (from, item) {\n if (!item) {\n // 'from' as item to remove\n if (from.scene) {\n var parent_1 = this.getParent(from);\n !parent_1 ? from.scene.removeFromId(from.id) : this.remove(parent_1, from);\n }\n else {\n console.warn(\"SceneUtilities: Remove failed. SceneChild is not added into scene\", from);\n }\n }\n else {\n if (from instanceof Group)\n from.removeFromId(item.id);\n else if (from instanceof Shape)\n from.setShape(undefined);\n }\n };\n //#endregion\n //#region Scene parent and children\n /**\n * Get Root parent\n *\n * @param {SceneChild} sceneChild\n * @returns {(SceneChild | null)}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getRootParent = function (sceneChild) {\n var parents = this.getParents(sceneChild);\n return parents.length > 0 ? parents[0] : null;\n };\n /**\n * Get first level parent\n *\n * @param {SceneChild} sceneChild\n * @returns {(SceneChild | null)}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getParent = function (sceneChild) {\n var parents = this.getParents(sceneChild);\n return parents.length > 0 ? parents[parents.length - 1] : null;\n };\n /**\n * Get all parents\n *\n * @param {SceneChild} sceneChild\n * @returns {Array}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getParents = function (sceneChild) {\n return sceneChild && sceneChild.scene ? sceneChild.scene.getParentsOfSceneChild(sceneChild) : [];\n };\n /**\n * Return children of a shape.\n * Only Group has array of children, Shape has only one child.\n *\n * @param {SceneChild} sceneChild\n * @returns {Array}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getChildren = function (sceneChild) {\n if (sceneChild instanceof Group)\n return sceneChild.getChildren();\n return sceneChild instanceof Shape && sceneChild.shape ? [sceneChild.shape] : [];\n };\n /**\n * Return only primitive children\n *\n * @param {SceneChild} sceneChild\n * @returns {Array}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getChildrenPrimitives = function (sceneChild) {\n var result = [];\n var children = this.getChildren(sceneChild);\n for (var i = 0, len = children.length; i < len; i++) {\n if (children[i] instanceof ShapePrimitive)\n result.push(children[i]);\n else\n result = result.concat.apply(result, this.getChildrenPrimitives(children[i]));\n }\n return result;\n };\n /**\n * Return a list of neighbors\n *\n * @param {SceneChild} sceneChild\n * @returns {(Array)}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getNeighbors = function (sceneChild) {\n if (sceneChild.scene) {\n var parent_2 = this.getParent(sceneChild);\n return parent_2 == null ? sceneChild.scene.getChildren() : this.getChildren(parent_2);\n }\n return [];\n };\n /**\n * Return a number of element type into a scene\n *\n * @param {Scene} scene\n * @param {string} type\n * @returns {number}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getCountOfSceneChildType = function (scene, type) {\n var count = 0;\n Scene.walk(function (sceneChild) {\n count += sceneChild.type == type ? 1 : 0;\n }, scene);\n return count;\n };\n // /**\n // * Walk through sceneChild\n // *\n // * @param {SceneChild} sceneChild\n // * @param {(child: SceneChild) => void} callback\n // * @memberof SceneUtilities\n // */\n // walk(sceneChild: SceneChild, callback: (child: SceneChild) => void) {\n // \tcallback(sceneChild)\n // \tthis.getChildren(sceneChild).forEach(child => callback(child))\n // }\n //#endregion\n //#region checker\n /**\n * Check sceneChild is Group\n *\n * @param {SceneChild} sceneChild\n * @returns {boolean}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.isGroup = function (sceneChild) {\n return sceneChild instanceof Group;\n };\n /**\n * Check sceneChild are Shape and has a child\n *\n * @param {SceneChild} sceneChild\n * @returns {boolean}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.hasShapeChild = function (sceneChild) {\n return sceneChild instanceof Shape ? sceneChild.shape !== undefined : false;\n };\n /**\n * Check sceneChild is a ShapeBuffer an are binded\n *\n * @param {SceneChild} sceneChild\n * @returns {boolean}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.hasShapeBuffer = function (sceneChild) {\n return sceneChild instanceof ShapeBuffer;\n };\n /**\n * Check scene child is a Primitive\n *\n * @param {SceneChild} sceneChild\n * @returns {boolean}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.isAPrimitive = function (sceneChild) {\n return sceneChild instanceof ShapePrimitive;\n };\n /**\n * Check scene child is a ShapeLoop\n *\n * @param {SceneChild} sceneChild\n * @returns {boolean}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.hasLoop = function (sceneChild) {\n return sceneChild instanceof ShapeLoop;\n };\n //#endregion\n SceneUtilities.prototype.set = function (sceneChild, name, value, scene) {\n switch (SceneChildUtilitiesData[name].dataType) {\n case 'props':\n return this.setProp(sceneChild, name, value, scene);\n case 'drawer':\n return this.setDrawerProp(sceneChild, name, value, scene);\n case 'settings':\n return this.setSetting(sceneChild, name, value, scene);\n }\n };\n /**\n * Set prop: convert animation or transformable props\n *\n * @static\n * @param {SceneChild} sceneChild\n * @param {TSceheChildUtilityPropValue} value\n * @param {Scene} scene\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.setProp = function (sceneChild, name, value, scene) {\n if (typeof sceneChild.data === 'undefined') {\n sceneChild.data = { props: {} };\n }\n else if (typeof sceneChild.data.props === 'undefined') {\n sceneChild.data.props = {};\n }\n sceneChild.clearBuffer(true, true);\n // Check LoopAnimation\n if (name === 'loop') {\n if (sceneChild instanceof ShapeLoop && SceneUtilitiesExtended.bValueLoop(value)) {\n var shapeLoopAnimation = value;\n sceneChild.data.props.loop = value;\n sceneChild.setProp('loop', SceneUtilitiesExtended.composeLoop(shapeLoopAnimation));\n // Set loopDependencies\n var dynamic = shapeLoopAnimation.dynamyc;\n var realDynamic = sceneChild.loopDependencies.indexOf('propArguments') >= 0;\n if (dynamic !== realDynamic) {\n var dependencies = __spreadArrays(sceneChild.loopDependencies);\n if (dynamic)\n !(dependencies.indexOf('propArguments') >= 0) && dependencies.push('propArguments');\n else\n dependencies.indexOf('propArguments') >= 0 && dependencies.splice(dependencies.indexOf('propArguments', 1));\n sceneChild.loopDependencies = dependencies;\n }\n }\n return;\n }\n // Check Animation\n if (SceneUtilitiesExtended.bValueAnimation(value)) {\n sceneChild.data.props[name] = value;\n sceneChild.setProp(name, Animation.composeAnimation(scene, name, value));\n return;\n }\n // Check Transormable prop\n if (SceneUtilitiesExtended.bPropInSceneChildUtilitiesData(name) &&\n SceneUtilitiesExtended.bValueTransformable(value)) {\n sceneChild.data.props[name] = value;\n sceneChild.setProp(name, SceneUtilitiesExtended.getTransformedValue(scene, name, value));\n return;\n }\n // Otherwise, set prop without transformation\n //Equivalent of: if (name in SceneChildPropsData && SceneChildPropsData[name].transformation !== 'none')\n sceneChild.setProp(name, value, true);\n delete sceneChild.data.props[name];\n // Not set to data because exporter override sceneChild.data.props on sceneChild.props (default)\n //sceneChild.data.props[name] = value\n };\n /**\n * Set prop, convert raw function, animation on transformable prop\n *\n * @static\n * @param {SceneChild} sceneChild\n * @param {TDrawerPropsExtendedKeys} name\n * @param {*} value\n * @param {Scene} scene\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.setDrawerProp = function (sceneChild, name, value, scene) {\n if (this.isAPrimitive(sceneChild)) {\n if (typeof sceneChild.data === 'undefined') {\n sceneChild.data = { style: {} };\n }\n else if (typeof sceneChild.data.style === 'undefined') {\n sceneChild.data.style = {};\n }\n if (SceneUtilitiesExtended.bValueAnimation(value)) {\n sceneChild.data.style[name] = value;\n sceneChild.style[name] = Animation.composeAnimation(scene, name, value);\n return;\n }\n // Check Transormable prop\n if (SceneUtilitiesExtended.bPropInSceneChildUtilitiesData(name) &&\n SceneUtilitiesExtended.bValueTransformable(value)) {\n sceneChild.data.style[name] = value;\n sceneChild.style[name] = SceneUtilitiesExtended.getTransformedValue(scene, name, value);\n return;\n }\n // Otherwise, set prop without transformation\n //Equivalent of: if (name in SceneChildPropsData && SceneChildPropsData[name].transformation !== 'none')\n // @ts-ignore\n sceneChild.style[name] = value;\n delete sceneChild.data.style[name];\n }\n };\n /**\n * TODO:\n * Set Args (props, drawer, other settings)\n * SceneChildPropData refactoring\n */\n SceneUtilities.prototype.setSetting = function (sceneChild, name, value, scene) {\n sceneChild.clearBuffer(true, true);\n if (name === 'vertexCallback') {\n if (sceneChild instanceof ShapeBase && SceneUtilitiesExtended.bValueVertexCallback(value)) {\n sceneChild.data.vertexCallback = value;\n sceneChild.vertexCallback = SceneUtilitiesExtended.composeVertexCallback(value);\n // If shape is static vertexCallback has no effect\n // sceneChild.bUseParent = true\n }\n return;\n }\n switch (name) {\n case 'bUseParent':\n if (sceneChild instanceof ShapeBase)\n sceneChild.bUseParent = value;\n break;\n case 'bUseRecursion':\n if (sceneChild instanceof ShapeBase)\n sceneChild.bUseRecursion = value;\n break;\n case 'bClosed':\n if (sceneChild instanceof ShapePrimitive)\n sceneChild.setClosed(value);\n break;\n case 'adaptMode':\n if (sceneChild instanceof ShapePrimitive)\n sceneChild.adapt(value);\n break;\n default:\n if (typeof sceneChild[name] !== 'undefined') {\n //@ts-ignore\n sceneChild[name] = value;\n }\n break;\n }\n };\n return SceneUtilities;\n}());\nexport default new SceneUtilities();\n//# sourceMappingURL=SceneUtilities.js.map","import { toRadians, toDegrees } from \"../../Utilites\";\nimport SceneChildUtilitiesData from \"./SceneChildUtilitiesData\";\n/**\n *\n * @category Services.Scene Utilities\n * @class SceneUtilitiesExtended\n */\nvar SceneUtilitiesExtended = /** @class */ (function () {\n function SceneUtilitiesExtended() {\n }\n //#region ShapeLoop\n SceneUtilitiesExtended.bValueLoop = function (value) {\n return (typeof value === 'object' &&\n 'start' in value &&\n 'end' in value &&\n 'inc' in value &&\n 'vertex' in value &&\n value.vertex.raw &&\n value.vertex.raw.length > 0);\n };\n SceneUtilitiesExtended.bValueVertexCallback = function (value) {\n return value && value.raw && value.raw.length > 0;\n };\n SceneUtilitiesExtended.composeVertexCallback = function (value) {\n if (value && value.raw) {\n var vertexCallback = new Function('vertex', 'vertexRepetition', SceneUtilitiesExtended.RAW_ARGUMENTS, \"return \" + value.raw);\n return vertexCallback;\n }\n };\n SceneUtilitiesExtended.composeLoop = function (loop) {\n var vertex = loop.vertex.raw\n ? new Function('shapeLoopRepetition', SceneUtilitiesExtended.RAW_ARGUMENTS, \"return \" + loop.vertex.raw)\n : undefined;\n //Todo: number -> resolve function\n return {\n start: loop.start,\n end: loop.end,\n inc: loop.inc,\n vertex: vertex,\n };\n };\n //#endregion\n // static getRandomFunctionForProp(name): (rand: number) => any {\n // const prop: ISceneChildProp = UISceneChildUtilitiesStatic.sceneChildProps[name]\n // switch (prop.type)\n // {\n // case 'multiple-range': case 'range': case 'slider':\n // return (rand: number) => {\n // const min = prop.min as number / 2\n // const max = prop.max as number / 2\n // const value = min + ((max - min) * rand)\n // return prop.bAngle ? toRadians(value) : value\n // }\n // case 'color':\n // return (rand: number) => `hsl(${Math.floor(360 * rand)}, ${Math.floor(25 + 75 * rand)}%, ${Math.floor(25 + 75 * rand)}%)`\n // default:\n // return (rand: number) => undefined\n // }\n // }\n //#endregion\n //#region Props relative to drawer\n /**\n * Check value is TAnimation\n * @param value\n */\n SceneUtilitiesExtended.bValueAnimation = function (value) {\n return (value &&\n typeof value === 'object' &&\n value.type &&\n (value.type === 'simple' || value.type === 'raw') /*|| value.type == 'random'*/);\n };\n /**\n * Check value is TTransformableProp\n * @param value\n */\n SceneUtilitiesExtended.bValueTransformable = function (value) {\n return (value !== null &&\n typeof value === 'object' &&\n typeof value.type === 'string' &&\n value.type === 'transformable-prop');\n };\n /**\n * Check the prop need transformation when set\n * @param name\n */\n SceneUtilitiesExtended.bPropInSceneChildUtilitiesData = function (name) {\n return (typeof SceneChildUtilitiesData[name] !== 'undefined' && SceneChildUtilitiesData[name].transformation !== 'none');\n };\n /**\n * Transform value\n * @param scene\n * @param name\n * @param value\n */\n SceneUtilitiesExtended.getTransformedValue = function (scene, name, value) {\n var sceneChildProp = SceneChildUtilitiesData[name];\n if (SceneUtilitiesExtended.bPropInSceneChildUtilitiesData(name) &&\n SceneUtilitiesExtended.bValueTransformable(value)) {\n value = value.value;\n var sceneX = name === 'distance' ? scene.height : scene.width;\n var sceneY = name === 'distance' ? scene.width : scene.height;\n switch (sceneChildProp.transformation) {\n case 'angle':\n if (Array.isArray(value)) {\n return [toRadians(value[0]), toRadians(value[1])];\n }\n return toRadians(value);\n case 'scene-size-percentage': {\n if (typeof scene !== 'undefined') {\n if (Array.isArray(value)) {\n return [(value[0] * sceneX) / 100, (value[1] * sceneY) / 100];\n }\n return (value * (scene.center[0] + scene.center[1])) / 100;\n }\n break;\n }\n case 'scene-size-percentage-inverse': {\n if (typeof scene !== 'undefined') {\n if (Array.isArray(value)) {\n return [(value[0] * 100) / sceneX, (value[1] * 100) / sceneY];\n }\n return (value * 100) / (scene.center[0] + scene.center[1]);\n }\n break;\n }\n }\n }\n return value;\n };\n /**\n * Transform value inverse\n * @param scene\n * @param name\n * @param value\n */\n SceneUtilitiesExtended.getTransformedValueInverse = function (scene, name, value) {\n var sceneChildProp = SceneChildUtilitiesData[name];\n if (SceneUtilitiesExtended.bPropInSceneChildUtilitiesData(name) &&\n SceneUtilitiesExtended.bValueTransformable(value)) {\n value = value.value;\n var sceneX = name === 'distance' ? scene.height : scene.width;\n var sceneY = name === 'distance' ? scene.width : scene.height;\n switch (sceneChildProp.transformation) {\n case 'angle': {\n if (Array.isArray(value)) {\n return [toDegrees(value[0]), toDegrees(value[1])];\n }\n return toDegrees(value);\n }\n case 'scene-size-percentage': {\n if (typeof scene !== 'undefined') {\n if (Array.isArray(value)) {\n return [(value[0] * 100) / sceneX, (value[1] * 100) / sceneY];\n }\n return (value * 100) / (scene.center[0] + scene.center[1]);\n }\n break;\n }\n case 'scene-size-percentage-inverse': {\n if (typeof scene !== 'undefined') {\n if (Array.isArray(value)) {\n return [(value[0] * sceneX) / 100, (value[1] * sceneY) / 100];\n }\n return (value * (scene.center[0] + scene.center[1])) / 100;\n }\n break;\n }\n }\n }\n return value;\n };\n SceneUtilitiesExtended.RAW_ARGUMENTS = '{ repetition, recursion, shape }';\n SceneUtilitiesExtended.RAW_ARGUMENTS_WITH_PARENT = '{ repetition, recursion, shape, parent }';\n return SceneUtilitiesExtended;\n}());\nexport default SceneUtilitiesExtended;\n//# sourceMappingURL=SceneUtilitiesExtended.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { pmod } from \"../../core/math\";\nimport Emitter from \"../events/Emitter\";\nimport { now } from \"../../Utilites\";\n/**\n * Is used for sequence time management.\n * It is necessary to set the duration and the number of frames per second (frame rate).\n *\n * @category Services.Timeline\n * @class Timeline\n * @extends {Emitter}\n */\nvar Timeline = /** @class */ (function (_super) {\n __extends(Timeline, _super);\n function Timeline(duration, framerate) {\n if (duration === void 0) { duration = 60000; }\n if (framerate === void 0) { framerate = 60; }\n var _this = _super.call(this) || this;\n _this.fps_samples_size = 30;\n _this.fps_samples = [];\n _this.fps_samples_index = 0;\n _this.paused_time = 0;\n _this.sequence = {\n duration: duration,\n framerate: framerate,\n frames: Math.round((duration / 1000) * framerate),\n };\n _this.tick_time = 1000 / _this.sequence.framerate;\n _this.fps = _this.sequence.framerate;\n _this.b_sequence_started = false;\n _this.current_frame = 0;\n _this.current_time = 0;\n _this.last_tick = 0;\n _this.start_time = 0;\n return _this;\n }\n //#region sequence meta\n /**\n * Return the sequence\n *\n * @returns {Sequence}\n */\n Timeline.prototype.getSequence = function () {\n return __assign({}, this.sequence);\n };\n /**\n * Set Sequence\n *\n * @param {number} duration\n * @param {number} framerate\n */\n Timeline.prototype.setSequence = function (duration, framerate) {\n this.sequence.duration = duration;\n this.sequence.framerate = framerate;\n this.tick_time = 1000 / this.sequence.framerate;\n this.sequence.frames = Math.round((this.sequence.duration / 1000) * this.sequence.framerate);\n this.dispatch('timeline:update_sequence', this.getSequence());\n };\n /**\n * Set duration of timeline\n *\n * @param {number} framerate\n */\n Timeline.prototype.setDuration = function (duration) {\n this.setSequence(duration, this.sequence.framerate);\n };\n /**\n * Get timeline duration\n *\n * @returns {number}\n */\n Timeline.prototype.getDuration = function () {\n return this.sequence.duration;\n };\n /**\n * Return framerate\n *\n * @returns {number}\n */\n Timeline.prototype.getFramerate = function () {\n return this.sequence.framerate;\n };\n /**\n * Set a framerate\n *\n * @param {number} framerate\n */\n Timeline.prototype.setFramerate = function (framerate) {\n this.setSequence(this.sequence.duration, framerate);\n };\n /**\n * Get number of frames based on duration and framerate\n *\n * @returns {number}\n */\n Timeline.prototype.getFramesCount = function () {\n return this.sequence.frames;\n };\n //#endregion meta\n //#region change status\n Timeline.prototype.bSequenceStarted = function () {\n return this.b_sequence_started;\n };\n /**\n * Start the sequence\n *\n */\n Timeline.prototype.start = function () {\n if (!this.b_sequence_started) {\n this.b_sequence_started = true;\n this.start_time = this.paused_time;\n this.dispatch('timeline:change_status', Timeline.START);\n }\n };\n /**\n * Pause the sequence\n *\n */\n Timeline.prototype.pause = function () {\n if (this.b_sequence_started) {\n this.paused_time = now();\n this.b_sequence_started = false;\n this.dispatch('timeline:change_status', Timeline.PAUSE);\n }\n };\n /**\n * Stop the sequence and reset\n *\n */\n Timeline.prototype.stop = function () {\n if (this.b_sequence_started) {\n this.b_sequence_started = false;\n this.current_time = 0;\n this.current_frame = 0;\n this.start_time = 0;\n this.paused_time = 0;\n this.dispatch('timeline:change_status', Timeline.STOP);\n }\n };\n /**\n * Animation tick\n *\n * @param {number} timestamp current timestamp\n * @returns {boolean}\n */\n Timeline.prototype.tick = function (timestamp) {\n if (this.b_sequence_started) {\n if (!this.start_time) {\n this.start_time = timestamp;\n this.last_tick = -this.tick_time;\n }\n var currentTime = timestamp - this.start_time;\n var elapsed = currentTime - this.last_tick;\n if (elapsed >= this.tick_time) {\n this.calculateFPS(1 / (elapsed / 1000));\n this.last_tick = currentTime;\n this.current_time = (currentTime - (elapsed % this.tick_time)) % this.sequence.duration;\n this.current_frame = this.getFrameAtTime(this.current_time);\n this.dispatch('timeline:progress', {\n current_frame: this.current_frame,\n current_time: this.current_time,\n fps: this.fps,\n });\n return true;\n }\n }\n return false;\n };\n /**\n * Calculate fps\n *\n * @private\n * @param {number} currentFPS\n */\n Timeline.prototype.calculateFPS = function (currentFPS) {\n var samples = this.fps_samples.length;\n if (samples > 0) {\n var average = 0;\n for (var i = 0; i < samples; i++)\n average += this.fps_samples[i];\n this.fps = Math.round(average / samples);\n }\n this.fps_samples[this.fps_samples_index] = Math.round(currentFPS);\n this.fps_samples_index = (this.fps_samples_index + 1) % this.fps_samples_size;\n };\n //#endregion\n //#region Frame and Time\n /**\n * Return current animation frame\n *\n * @returns {number}\n */\n Timeline.prototype.getCurrentFrame = function () {\n return this.current_frame;\n };\n /**\n * get the time at specific frame number\n *\n * @param {number} frame\n * @returns {number}\n */\n Timeline.prototype.getFrameTime = function (frame) {\n frame = pmod(frame, this.sequence.frames);\n return (frame * this.tick_time) % this.sequence.duration;\n };\n /**\n * Return frame number at time\n *\n * @param {number} time\n * @returns {number}\n */\n Timeline.prototype.getFrameAtTime = function (time) {\n return Math.round((time % this.sequence.duration) / this.tick_time);\n };\n /**\n * set current frame\n *\n * @param {number} frame\n */\n Timeline.prototype.setFrame = function (frame) {\n this.current_frame = pmod(frame, this.sequence.frames);\n this.current_time = this.getFrameTime(this.current_frame);\n this.dispatch('timeline:progress', {\n current_frame: this.current_frame,\n current_time: this.current_time,\n fps: this.fps,\n });\n };\n /**\n * Return tick time (based on framerate)\n *\n * @returns {number}\n */\n Timeline.prototype.getTickTime = function () {\n return this.tick_time;\n };\n /**\n * Return the current time\n *\n * @returns {number}\n */\n Timeline.prototype.getTime = function () {\n return this.current_time;\n };\n /**\n * Set animation at time\n *\n * @param {number} time\n */\n Timeline.prototype.setTime = function (time) {\n time = pmod(time, this.sequence.duration);\n this.current_time = time;\n this.current_frame = this.getFrameAtTime(time);\n this.dispatch('timeline:progress', {\n current_frame: this.current_frame,\n current_time: this.current_time,\n fps: this.fps,\n });\n };\n /**\n * Animation status started\n * @internal\n */\n Timeline.START = 'start';\n /**\n * Animation status paused\n * @internal\n */\n Timeline.PAUSE = 'pause';\n /**\n * Animation status stop\n * @internal\n */\n Timeline.STOP = 'stop';\n return Timeline;\n}(Emitter));\nexport default Timeline;\n//# sourceMappingURL=Timeline.js.map","/**\r\n * Common utilities\r\n * @module glMatrix\r\n */\n// Configuration Constants\nexport var EPSILON = 0.000001;\nexport var ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;\nexport var RANDOM = Math.random;\n/**\r\n * Sets the type of array used when creating new vectors and matrices\r\n *\r\n * @param {Float32ArrayConstructor | ArrayConstructor} type Array type, such as Float32Array or Array\r\n */\n\nexport function setMatrixArrayType(type) {\n ARRAY_TYPE = type;\n}\nvar degree = Math.PI / 180;\n/**\r\n * Convert Degree To Radian\r\n *\r\n * @param {Number} a Angle in Degrees\r\n */\n\nexport function toRadian(a) {\n return a * degree;\n}\n/**\r\n * Tests whether or not the arguments have approximately the same value, within an absolute\r\n * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less\r\n * than or equal to 1.0, and a relative tolerance is used for larger values)\r\n *\r\n * @param {Number} a The first number to test.\r\n * @param {Number} b The second number to test.\r\n * @returns {Boolean} True if the numbers are approximately equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));\n}\nif (!Math.hypot) Math.hypot = function () {\n var y = 0,\n i = arguments.length;\n\n while (i--) {\n y += arguments[i] * arguments[i];\n }\n\n return Math.sqrt(y);\n};","import * as glMatrix from \"./common.js\";\n/**\r\n * 4x4 Matrix
Format: column-major, when typed out it looks like row-major
The matrices are being post multiplied.\r\n * @module mat4\r\n */\n\n/**\r\n * Creates a new identity mat4\r\n *\r\n * @returns {mat4} a new 4x4 matrix\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(16);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n }\n\n out[0] = 1;\n out[5] = 1;\n out[10] = 1;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a new mat4 initialized with values from an existing matrix\r\n *\r\n * @param {ReadonlyMat4} a matrix to clone\r\n * @returns {mat4} a new 4x4 matrix\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Copy the values from one mat4 to another\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Create a new mat4 with the given values\r\n *\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\r\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\r\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\r\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\r\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\r\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\r\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\r\n * @returns {mat4} A new mat4\r\n */\n\nexport function fromValues(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n/**\r\n * Set the components of a mat4 to the given values\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\r\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\r\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\r\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\r\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\r\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\r\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\r\n * @returns {mat4} out\r\n */\n\nexport function set(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n/**\r\n * Set a mat4 to the identity matrix\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @returns {mat4} out\r\n */\n\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Transpose the values of a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a12 = a[6],\n a13 = a[7];\n var a23 = a[11];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a01;\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a02;\n out[9] = a12;\n out[11] = a[14];\n out[12] = a03;\n out[13] = a13;\n out[14] = a23;\n } else {\n out[0] = a[0];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a[1];\n out[5] = a[5];\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a[2];\n out[9] = a[6];\n out[10] = a[10];\n out[11] = a[14];\n out[12] = a[3];\n out[13] = a[7];\n out[14] = a[11];\n out[15] = a[15];\n }\n\n return out;\n}\n/**\r\n * Inverts a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n return out;\n}\n/**\r\n * Calculates the adjugate of a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function adjoint(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n out[0] = a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22);\n out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n out[2] = a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12);\n out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n out[5] = a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22);\n out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n out[7] = a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12);\n out[8] = a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21);\n out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n out[10] = a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11);\n out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n out[13] = a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21);\n out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n out[15] = a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11);\n return out;\n}\n/**\r\n * Calculates the determinant of a mat4\r\n *\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {Number} determinant of a\r\n */\n\nexport function determinant(a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n}\n/**\r\n * Multiplies two mat4s\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function multiply(out, a, b) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15]; // Cache only the current line of the second matrix\n\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[4];\n b1 = b[5];\n b2 = b[6];\n b3 = b[7];\n out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[8];\n b1 = b[9];\n b2 = b[10];\n b3 = b[11];\n out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[12];\n b1 = b[13];\n b2 = b[14];\n b3 = b[15];\n out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n return out;\n}\n/**\r\n * Translate a mat4 by the given vector\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to translate\r\n * @param {ReadonlyVec3} v vector to translate by\r\n * @returns {mat4} out\r\n */\n\nexport function translate(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n } else {\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a03;\n out[4] = a10;\n out[5] = a11;\n out[6] = a12;\n out[7] = a13;\n out[8] = a20;\n out[9] = a21;\n out[10] = a22;\n out[11] = a23;\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n\n return out;\n}\n/**\r\n * Scales the mat4 by the dimensions in the given vec3 not using vectorization\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to scale\r\n * @param {ReadonlyVec3} v the vec3 to scale the matrix by\r\n * @returns {mat4} out\r\n **/\n\nexport function scale(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n out[0] = a[0] * x;\n out[1] = a[1] * x;\n out[2] = a[2] * x;\n out[3] = a[3] * x;\n out[4] = a[4] * y;\n out[5] = a[5] * y;\n out[6] = a[6] * y;\n out[7] = a[7] * y;\n out[8] = a[8] * z;\n out[9] = a[9] * z;\n out[10] = a[10] * z;\n out[11] = a[11] * z;\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Rotates a mat4 by the given angle around the given axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @param {ReadonlyVec3} axis the axis to rotate around\r\n * @returns {mat4} out\r\n */\n\nexport function rotate(out, a, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n var b00, b01, b02;\n var b10, b11, b12;\n var b20, b21, b22;\n\n if (len < glMatrix.EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c;\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11]; // Construct the elements of the rotation matrix\n\n b00 = x * x * t + c;\n b01 = y * x * t + z * s;\n b02 = z * x * t - y * s;\n b10 = x * y * t - z * s;\n b11 = y * y * t + c;\n b12 = z * y * t + x * s;\n b20 = x * z * t + y * s;\n b21 = y * z * t - x * s;\n b22 = z * z * t + c; // Perform rotation-specific matrix multiplication\n\n out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the X axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateX(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[4] = a10 * c + a20 * s;\n out[5] = a11 * c + a21 * s;\n out[6] = a12 * c + a22 * s;\n out[7] = a13 * c + a23 * s;\n out[8] = a20 * c - a10 * s;\n out[9] = a21 * c - a11 * s;\n out[10] = a22 * c - a12 * s;\n out[11] = a23 * c - a13 * s;\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the Y axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateY(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[0] = a00 * c - a20 * s;\n out[1] = a01 * c - a21 * s;\n out[2] = a02 * c - a22 * s;\n out[3] = a03 * c - a23 * s;\n out[8] = a00 * s + a20 * c;\n out[9] = a01 * s + a21 * c;\n out[10] = a02 * s + a22 * c;\n out[11] = a03 * s + a23 * c;\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the Z axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateZ(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[0] = a00 * c + a10 * s;\n out[1] = a01 * c + a11 * s;\n out[2] = a02 * c + a12 * s;\n out[3] = a03 * c + a13 * s;\n out[4] = a10 * c - a00 * s;\n out[5] = a11 * c - a01 * s;\n out[6] = a12 * c - a02 * s;\n out[7] = a13 * c - a03 * s;\n return out;\n}\n/**\r\n * Creates a matrix from a vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, dest, vec);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a vector scaling\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.scale(dest, dest, vec);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {ReadonlyVec3} v Scaling vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = v[1];\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = v[2];\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a given angle around a given axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotate(dest, dest, rad, axis);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @param {ReadonlyVec3} axis the axis to rotate around\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotation(out, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n\n if (len < glMatrix.EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c; // Perform rotation-specific matrix multiplication\n\n out[0] = x * x * t + c;\n out[1] = y * x * t + z * s;\n out[2] = z * x * t - y * s;\n out[3] = 0;\n out[4] = x * y * t - z * s;\n out[5] = y * y * t + c;\n out[6] = z * y * t + x * s;\n out[7] = 0;\n out[8] = x * z * t + y * s;\n out[9] = y * z * t - x * s;\n out[10] = z * z * t + c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the X axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateX(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromXRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = c;\n out[6] = s;\n out[7] = 0;\n out[8] = 0;\n out[9] = -s;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the Y axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateY(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromYRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = c;\n out[1] = 0;\n out[2] = -s;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = s;\n out[9] = 0;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the Z axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateZ(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromZRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = 0;\n out[4] = -s;\n out[5] = c;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation and vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslation(out, q, v) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a new mat4 from a dual quat.\r\n *\r\n * @param {mat4} out Matrix\r\n * @param {ReadonlyQuat2} a Dual Quaternion\r\n * @returns {mat4} mat4 receiving operation result\r\n */\n\nexport function fromQuat2(out, a) {\n var translation = new glMatrix.ARRAY_TYPE(3);\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7];\n var magnitude = bx * bx + by * by + bz * bz + bw * bw; //Only scale if it makes sense\n\n if (magnitude > 0) {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2 / magnitude;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2 / magnitude;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2 / magnitude;\n } else {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n }\n\n fromRotationTranslation(out, a, translation);\n return out;\n}\n/**\r\n * Returns the translation vector component of a transformation\r\n * matrix. If a matrix is built with fromRotationTranslation,\r\n * the returned vector will be the same as the translation vector\r\n * originally supplied.\r\n * @param {vec3} out Vector to receive translation component\r\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\r\n * @return {vec3} out\r\n */\n\nexport function getTranslation(out, mat) {\n out[0] = mat[12];\n out[1] = mat[13];\n out[2] = mat[14];\n return out;\n}\n/**\r\n * Returns the scaling factor component of a transformation\r\n * matrix. If a matrix is built with fromRotationTranslationScale\r\n * with a normalized Quaternion paramter, the returned vector will be\r\n * the same as the scaling vector\r\n * originally supplied.\r\n * @param {vec3} out Vector to receive scaling factor component\r\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\r\n * @return {vec3} out\r\n */\n\nexport function getScaling(out, mat) {\n var m11 = mat[0];\n var m12 = mat[1];\n var m13 = mat[2];\n var m21 = mat[4];\n var m22 = mat[5];\n var m23 = mat[6];\n var m31 = mat[8];\n var m32 = mat[9];\n var m33 = mat[10];\n out[0] = Math.hypot(m11, m12, m13);\n out[1] = Math.hypot(m21, m22, m23);\n out[2] = Math.hypot(m31, m32, m33);\n return out;\n}\n/**\r\n * Returns a quaternion representing the rotational component\r\n * of a transformation matrix. If a matrix is built with\r\n * fromRotationTranslation, the returned quaternion will be the\r\n * same as the quaternion originally supplied.\r\n * @param {quat} out Quaternion to receive the rotation component\r\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\r\n * @return {quat} out\r\n */\n\nexport function getRotation(out, mat) {\n var scaling = new glMatrix.ARRAY_TYPE(3);\n getScaling(scaling, mat);\n var is1 = 1 / scaling[0];\n var is2 = 1 / scaling[1];\n var is3 = 1 / scaling[2];\n var sm11 = mat[0] * is1;\n var sm12 = mat[1] * is2;\n var sm13 = mat[2] * is3;\n var sm21 = mat[4] * is1;\n var sm22 = mat[5] * is2;\n var sm23 = mat[6] * is3;\n var sm31 = mat[8] * is1;\n var sm32 = mat[9] * is2;\n var sm33 = mat[10] * is3;\n var trace = sm11 + sm22 + sm33;\n var S = 0;\n\n if (trace > 0) {\n S = Math.sqrt(trace + 1.0) * 2;\n out[3] = 0.25 * S;\n out[0] = (sm23 - sm32) / S;\n out[1] = (sm31 - sm13) / S;\n out[2] = (sm12 - sm21) / S;\n } else if (sm11 > sm22 && sm11 > sm33) {\n S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;\n out[3] = (sm23 - sm32) / S;\n out[0] = 0.25 * S;\n out[1] = (sm12 + sm21) / S;\n out[2] = (sm31 + sm13) / S;\n } else if (sm22 > sm33) {\n S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;\n out[3] = (sm31 - sm13) / S;\n out[0] = (sm12 + sm21) / S;\n out[1] = 0.25 * S;\n out[2] = (sm23 + sm32) / S;\n } else {\n S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;\n out[3] = (sm12 - sm21) / S;\n out[0] = (sm31 + sm13) / S;\n out[1] = (sm23 + sm32) / S;\n out[2] = 0.25 * S;\n }\n\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation, vector translation and vector scale\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n * mat4.scale(dest, scale)\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @param {ReadonlyVec3} s Scaling vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslationScale(out, q, v, s) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n out[0] = (1 - (yy + zz)) * sx;\n out[1] = (xy + wz) * sx;\n out[2] = (xz - wy) * sx;\n out[3] = 0;\n out[4] = (xy - wz) * sy;\n out[5] = (1 - (xx + zz)) * sy;\n out[6] = (yz + wx) * sy;\n out[7] = 0;\n out[8] = (xz + wy) * sz;\n out[9] = (yz - wx) * sz;\n out[10] = (1 - (xx + yy)) * sz;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * mat4.translate(dest, origin);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n * mat4.scale(dest, scale)\r\n * mat4.translate(dest, negativeOrigin);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @param {ReadonlyVec3} s Scaling vector\r\n * @param {ReadonlyVec3} o The origin vector around which to scale and rotate\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslationScaleOrigin(out, q, v, s, o) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n var ox = o[0];\n var oy = o[1];\n var oz = o[2];\n var out0 = (1 - (yy + zz)) * sx;\n var out1 = (xy + wz) * sx;\n var out2 = (xz - wy) * sx;\n var out4 = (xy - wz) * sy;\n var out5 = (1 - (xx + zz)) * sy;\n var out6 = (yz + wx) * sy;\n var out8 = (xz + wy) * sz;\n var out9 = (yz - wx) * sz;\n var out10 = (1 - (xx + yy)) * sz;\n out[0] = out0;\n out[1] = out1;\n out[2] = out2;\n out[3] = 0;\n out[4] = out4;\n out[5] = out5;\n out[6] = out6;\n out[7] = 0;\n out[8] = out8;\n out[9] = out9;\n out[10] = out10;\n out[11] = 0;\n out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz);\n out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz);\n out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz);\n out[15] = 1;\n return out;\n}\n/**\r\n * Calculates a 4x4 matrix from the given quaternion\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {ReadonlyQuat} q Quaternion to create matrix from\r\n *\r\n * @returns {mat4} out\r\n */\n\nexport function fromQuat(out, q) {\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[1] = yx + wz;\n out[2] = zx - wy;\n out[3] = 0;\n out[4] = yx - wz;\n out[5] = 1 - xx - zz;\n out[6] = zy + wx;\n out[7] = 0;\n out[8] = zx + wy;\n out[9] = zy - wx;\n out[10] = 1 - xx - yy;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a frustum matrix with the given bounds\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {Number} left Left bound of the frustum\r\n * @param {Number} right Right bound of the frustum\r\n * @param {Number} bottom Bottom bound of the frustum\r\n * @param {Number} top Top bound of the frustum\r\n * @param {Number} near Near bound of the frustum\r\n * @param {Number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function frustum(out, left, right, bottom, top, near, far) {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n out[0] = near * 2 * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = near * 2 * tb;\n out[6] = 0;\n out[7] = 0;\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = far * near * 2 * nf;\n out[15] = 0;\n return out;\n}\n/**\r\n * Generates a perspective projection matrix with the given bounds.\r\n * Passing null/undefined/no value for far will generate infinite projection matrix.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {number} fovy Vertical field of view in radians\r\n * @param {number} aspect Aspect ratio. typically viewport width/height\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum, can be null or Infinity\r\n * @returns {mat4} out\r\n */\n\nexport function perspective(out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2),\n nf;\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[15] = 0;\n\n if (far != null && far !== Infinity) {\n nf = 1 / (near - far);\n out[10] = (far + near) * nf;\n out[14] = 2 * far * near * nf;\n } else {\n out[10] = -1;\n out[14] = -2 * near;\n }\n\n return out;\n}\n/**\r\n * Generates a perspective projection matrix with the given field of view.\r\n * This is primarily useful for generating projection matrices to be used\r\n * with the still experiemental WebVR API.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {Object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function perspectiveFromFieldOfView(out, fov, near, far) {\n var upTan = Math.tan(fov.upDegrees * Math.PI / 180.0);\n var downTan = Math.tan(fov.downDegrees * Math.PI / 180.0);\n var leftTan = Math.tan(fov.leftDegrees * Math.PI / 180.0);\n var rightTan = Math.tan(fov.rightDegrees * Math.PI / 180.0);\n var xScale = 2.0 / (leftTan + rightTan);\n var yScale = 2.0 / (upTan + downTan);\n out[0] = xScale;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n out[4] = 0.0;\n out[5] = yScale;\n out[6] = 0.0;\n out[7] = 0.0;\n out[8] = -((leftTan - rightTan) * xScale * 0.5);\n out[9] = (upTan - downTan) * yScale * 0.5;\n out[10] = far / (near - far);\n out[11] = -1.0;\n out[12] = 0.0;\n out[13] = 0.0;\n out[14] = far * near / (near - far);\n out[15] = 0.0;\n return out;\n}\n/**\r\n * Generates a orthogonal projection matrix with the given bounds\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {number} left Left bound of the frustum\r\n * @param {number} right Right bound of the frustum\r\n * @param {number} bottom Bottom bound of the frustum\r\n * @param {number} top Top bound of the frustum\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function ortho(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right);\n var bt = 1 / (bottom - top);\n var nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a look-at matrix with the given eye position, focal point, and up axis.\r\n * If you want a matrix that actually makes an object look at another object, you should use targetTo instead.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {ReadonlyVec3} eye Position of the viewer\r\n * @param {ReadonlyVec3} center Point the viewer is looking at\r\n * @param {ReadonlyVec3} up vec3 pointing up\r\n * @returns {mat4} out\r\n */\n\nexport function lookAt(out, eye, center, up) {\n var x0, x1, x2, y0, y1, y2, z0, z1, z2, len;\n var eyex = eye[0];\n var eyey = eye[1];\n var eyez = eye[2];\n var upx = up[0];\n var upy = up[1];\n var upz = up[2];\n var centerx = center[0];\n var centery = center[1];\n var centerz = center[2];\n\n if (Math.abs(eyex - centerx) < glMatrix.EPSILON && Math.abs(eyey - centery) < glMatrix.EPSILON && Math.abs(eyez - centerz) < glMatrix.EPSILON) {\n return identity(out);\n }\n\n z0 = eyex - centerx;\n z1 = eyey - centery;\n z2 = eyez - centerz;\n len = 1 / Math.hypot(z0, z1, z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n x0 = upy * z2 - upz * z1;\n x1 = upz * z0 - upx * z2;\n x2 = upx * z1 - upy * z0;\n len = Math.hypot(x0, x1, x2);\n\n if (!len) {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n } else {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n y0 = z1 * x2 - z2 * x1;\n y1 = z2 * x0 - z0 * x2;\n y2 = z0 * x1 - z1 * x0;\n len = Math.hypot(y0, y1, y2);\n\n if (!len) {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n } else {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a matrix that makes something look at something else.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {ReadonlyVec3} eye Position of the viewer\r\n * @param {ReadonlyVec3} center Point the viewer is looking at\r\n * @param {ReadonlyVec3} up vec3 pointing up\r\n * @returns {mat4} out\r\n */\n\nexport function targetTo(out, eye, target, up) {\n var eyex = eye[0],\n eyey = eye[1],\n eyez = eye[2],\n upx = up[0],\n upy = up[1],\n upz = up[2];\n var z0 = eyex - target[0],\n z1 = eyey - target[1],\n z2 = eyez - target[2];\n var len = z0 * z0 + z1 * z1 + z2 * z2;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n }\n\n var x0 = upy * z2 - upz * z1,\n x1 = upz * z0 - upx * z2,\n x2 = upx * z1 - upy * z0;\n len = x0 * x0 + x1 * x1 + x2 * x2;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n out[0] = x0;\n out[1] = x1;\n out[2] = x2;\n out[3] = 0;\n out[4] = z1 * x2 - z2 * x1;\n out[5] = z2 * x0 - z0 * x2;\n out[6] = z0 * x1 - z1 * x0;\n out[7] = 0;\n out[8] = z0;\n out[9] = z1;\n out[10] = z2;\n out[11] = 0;\n out[12] = eyex;\n out[13] = eyey;\n out[14] = eyez;\n out[15] = 1;\n return out;\n}\n/**\r\n * Returns a string representation of a mat4\r\n *\r\n * @param {ReadonlyMat4} a matrix to represent as a string\r\n * @returns {String} string representation of the matrix\r\n */\n\nexport function str(a) {\n return \"mat4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \", \" + a[9] + \", \" + a[10] + \", \" + a[11] + \", \" + a[12] + \", \" + a[13] + \", \" + a[14] + \", \" + a[15] + \")\";\n}\n/**\r\n * Returns Frobenius norm of a mat4\r\n *\r\n * @param {ReadonlyMat4} a the matrix to calculate Frobenius norm of\r\n * @returns {Number} Frobenius norm\r\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\n}\n/**\r\n * Adds two mat4's\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n out[9] = a[9] + b[9];\n out[10] = a[10] + b[10];\n out[11] = a[11] + b[11];\n out[12] = a[12] + b[12];\n out[13] = a[13] + b[13];\n out[14] = a[14] + b[14];\n out[15] = a[15] + b[15];\n return out;\n}\n/**\r\n * Subtracts matrix b from matrix a\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n out[9] = a[9] - b[9];\n out[10] = a[10] - b[10];\n out[11] = a[11] - b[11];\n out[12] = a[12] - b[12];\n out[13] = a[13] - b[13];\n out[14] = a[14] - b[14];\n out[15] = a[15] - b[15];\n return out;\n}\n/**\r\n * Multiply each element of the matrix by a scalar.\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to scale\r\n * @param {Number} b amount to scale the matrix's elements by\r\n * @returns {mat4} out\r\n */\n\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n out[9] = a[9] * b;\n out[10] = a[10] * b;\n out[11] = a[11] * b;\n out[12] = a[12] * b;\n out[13] = a[13] * b;\n out[14] = a[14] * b;\n out[15] = a[15] * b;\n return out;\n}\n/**\r\n * Adds two mat4's after multiplying each element of the second operand by a scalar value.\r\n *\r\n * @param {mat4} out the receiving vector\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @param {Number} scale the amount to scale b's elements by before adding\r\n * @returns {mat4} out\r\n */\n\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n out[9] = a[9] + b[9] * scale;\n out[10] = a[10] + b[10] * scale;\n out[11] = a[11] + b[11] * scale;\n out[12] = a[12] + b[12] * scale;\n out[13] = a[13] + b[13] * scale;\n out[14] = a[14] + b[14] * scale;\n out[15] = a[15] + b[15] * scale;\n return out;\n}\n/**\r\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyMat4} a The first matrix.\r\n * @param {ReadonlyMat4} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15];\n}\n/**\r\n * Returns whether or not the matrices have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyMat4} a The first matrix.\r\n * @param {ReadonlyMat4} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7];\n var a8 = a[8],\n a9 = a[9],\n a10 = a[10],\n a11 = a[11];\n var a12 = a[12],\n a13 = a[13],\n a14 = a[14],\n a15 = a[15];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n var b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7];\n var b8 = b[8],\n b9 = b[9],\n b10 = b[10],\n b11 = b[11];\n var b12 = b[12],\n b13 = b[13],\n b14 = b[14],\n b15 = b[15];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a15), Math.abs(b15));\n}\n/**\r\n * Alias for {@link mat4.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link mat4.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\n/**\r\n * 2 Dimensional Vector\r\n * @module vec2\r\n */\n\n/**\r\n * Creates a new, empty vec2\r\n *\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(2);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n }\n\n return out;\n}\n/**\r\n * Creates a new vec2 initialized with values from an existing vector\r\n *\r\n * @param {ReadonlyVec2} a vector to clone\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n/**\r\n * Creates a new vec2 initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function fromValues(x, y) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = x;\n out[1] = y;\n return out;\n}\n/**\r\n * Copy the values from one vec2 to another\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the source vector\r\n * @returns {vec2} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n/**\r\n * Set the components of a vec2 to the given values\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @returns {vec2} out\r\n */\n\nexport function set(out, x, y) {\n out[0] = x;\n out[1] = y;\n return out;\n}\n/**\r\n * Adds two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n return out;\n}\n/**\r\n * Subtracts vector b from vector a\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n return out;\n}\n/**\r\n * Multiplies two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n return out;\n}\n/**\r\n * Divides two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n return out;\n}\n/**\r\n * Math.ceil the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to ceil\r\n * @returns {vec2} out\r\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n return out;\n}\n/**\r\n * Math.floor the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to floor\r\n * @returns {vec2} out\r\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n return out;\n}\n/**\r\n * Returns the minimum of two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n return out;\n}\n/**\r\n * Returns the maximum of two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n return out;\n}\n/**\r\n * Math.round the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to round\r\n * @returns {vec2} out\r\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n return out;\n}\n/**\r\n * Scales a vec2 by a scalar number\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {vec2} out\r\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n return out;\n}\n/**\r\n * Adds two vec2's after scaling the second operand by a scalar value\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @param {Number} scale the amount to scale b by before adding\r\n * @returns {vec2} out\r\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n return out;\n}\n/**\r\n * Calculates the euclidian distance between two vec2's\r\n *\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {Number} distance between a and b\r\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return Math.hypot(x, y);\n}\n/**\r\n * Calculates the squared euclidian distance between two vec2's\r\n *\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {Number} squared distance between a and b\r\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return x * x + y * y;\n}\n/**\r\n * Calculates the length of a vec2\r\n *\r\n * @param {ReadonlyVec2} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport function length(a) {\n var x = a[0],\n y = a[1];\n return Math.hypot(x, y);\n}\n/**\r\n * Calculates the squared length of a vec2\r\n *\r\n * @param {ReadonlyVec2} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n */\n\nexport function squaredLength(a) {\n var x = a[0],\n y = a[1];\n return x * x + y * y;\n}\n/**\r\n * Negates the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to negate\r\n * @returns {vec2} out\r\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n return out;\n}\n/**\r\n * Returns the inverse of the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to invert\r\n * @returns {vec2} out\r\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n return out;\n}\n/**\r\n * Normalize a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to normalize\r\n * @returns {vec2} out\r\n */\n\nexport function normalize(out, a) {\n var x = a[0],\n y = a[1];\n var len = x * x + y * y;\n\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n return out;\n}\n/**\r\n * Calculates the dot product of two vec2's\r\n *\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {Number} dot product of a and b\r\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1];\n}\n/**\r\n * Computes the cross product of two vec2's\r\n * Note that the cross product must by definition produce a 3D vector\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function cross(out, a, b) {\n var z = a[0] * b[1] - a[1] * b[0];\n out[0] = out[1] = 0;\n out[2] = z;\n return out;\n}\n/**\r\n * Performs a linear interpolation between two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec2} out\r\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0],\n ay = a[1];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n return out;\n}\n/**\r\n * Generates a random vector with the given scale\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\r\n * @returns {vec2} out\r\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n out[0] = Math.cos(r) * scale;\n out[1] = Math.sin(r) * scale;\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to transform\r\n * @param {ReadonlyMat2} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat2(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat2d\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to transform\r\n * @param {ReadonlyMat2d} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat2d(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y + m[4];\n out[1] = m[1] * x + m[3] * y + m[5];\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat3\r\n * 3rd vector component is implicitly '1'\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to transform\r\n * @param {ReadonlyMat3} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat3(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[3] * y + m[6];\n out[1] = m[1] * x + m[4] * y + m[7];\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat4\r\n * 3rd vector component is implicitly '0'\r\n * 4th vector component is implicitly '1'\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to transform\r\n * @param {ReadonlyMat4} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0];\n var y = a[1];\n out[0] = m[0] * x + m[4] * y + m[12];\n out[1] = m[1] * x + m[5] * y + m[13];\n return out;\n}\n/**\r\n * Rotate a 2D vector\r\n * @param {vec2} out The receiving vec2\r\n * @param {ReadonlyVec2} a The vec2 point to rotate\r\n * @param {ReadonlyVec2} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec2} out\r\n */\n\nexport function rotate(out, a, b, rad) {\n //Translate point to the origin\n var p0 = a[0] - b[0],\n p1 = a[1] - b[1],\n sinC = Math.sin(rad),\n cosC = Math.cos(rad); //perform rotation and translate to correct position\n\n out[0] = p0 * cosC - p1 * sinC + b[0];\n out[1] = p0 * sinC + p1 * cosC + b[1];\n return out;\n}\n/**\r\n * Get the angle between two 2D vectors\r\n * @param {ReadonlyVec2} a The first operand\r\n * @param {ReadonlyVec2} b The second operand\r\n * @returns {Number} The angle in radians\r\n */\n\nexport function angle(a, b) {\n var x1 = a[0],\n y1 = a[1],\n x2 = b[0],\n y2 = b[1],\n // mag is the product of the magnitudes of a and b\n mag = Math.sqrt(x1 * x1 + y1 * y1) * Math.sqrt(x2 * x2 + y2 * y2),\n // mag &&.. short circuits if mag == 0\n cosine = mag && (x1 * x2 + y1 * y2) / mag; // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1\n\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n/**\r\n * Set the components of a vec2 to zero\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @returns {vec2} out\r\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n return out;\n}\n/**\r\n * Returns a string representation of a vector\r\n *\r\n * @param {ReadonlyVec2} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return \"vec2(\" + a[0] + \", \" + a[1] + \")\";\n}\n/**\r\n * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyVec2} a The first vector.\r\n * @param {ReadonlyVec2} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1];\n}\n/**\r\n * Returns whether or not the vectors have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyVec2} a The first vector.\r\n * @param {ReadonlyVec2} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1];\n var b0 = b[0],\n b1 = b[1];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1));\n}\n/**\r\n * Alias for {@link vec2.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Alias for {@link vec2.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;\n/**\r\n * Alias for {@link vec2.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link vec2.divide}\r\n * @function\r\n */\n\nexport var div = divide;\n/**\r\n * Alias for {@link vec2.distance}\r\n * @function\r\n */\n\nexport var dist = distance;\n/**\r\n * Alias for {@link vec2.squaredDistance}\r\n * @function\r\n */\n\nexport var sqrDist = squaredDistance;\n/**\r\n * Alias for {@link vec2.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Perform some operation over an array of vec2s.\r\n *\r\n * @param {Array} a the array of vectors to iterate over\r\n * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed\r\n * @param {Number} offset Number of elements to skip at the beginning of the array\r\n * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\r\n * @param {Function} fn Function to call for each vector in the array\r\n * @param {Object} [arg] additional argument to pass to fn\r\n * @returns {Array} a\r\n * @function\r\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 2;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n }\n\n return a;\n };\n}();","import * as glMatrix from \"./common.js\";\n/**\r\n * 3 Dimensional Vector\r\n * @module vec3\r\n */\n\n/**\r\n * Creates a new, empty vec3\r\n *\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(3);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n\n return out;\n}\n/**\r\n * Creates a new vec3 initialized with values from an existing vector\r\n *\r\n * @param {ReadonlyVec3} a vector to clone\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n/**\r\n * Calculates the length of a vec3\r\n *\r\n * @param {ReadonlyVec3} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return Math.hypot(x, y, z);\n}\n/**\r\n * Creates a new vec3 initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function fromValues(x, y, z) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n/**\r\n * Copy the values from one vec3 to another\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the source vector\r\n * @returns {vec3} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n/**\r\n * Set the components of a vec3 to the given values\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @returns {vec3} out\r\n */\n\nexport function set(out, x, y, z) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n/**\r\n * Adds two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n return out;\n}\n/**\r\n * Subtracts vector b from vector a\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n return out;\n}\n/**\r\n * Multiplies two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n return out;\n}\n/**\r\n * Divides two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n return out;\n}\n/**\r\n * Math.ceil the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to ceil\r\n * @returns {vec3} out\r\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n return out;\n}\n/**\r\n * Math.floor the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to floor\r\n * @returns {vec3} out\r\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n return out;\n}\n/**\r\n * Returns the minimum of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n return out;\n}\n/**\r\n * Returns the maximum of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n return out;\n}\n/**\r\n * Math.round the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to round\r\n * @returns {vec3} out\r\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n return out;\n}\n/**\r\n * Scales a vec3 by a scalar number\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {vec3} out\r\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n return out;\n}\n/**\r\n * Adds two vec3's after scaling the second operand by a scalar value\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {Number} scale the amount to scale b by before adding\r\n * @returns {vec3} out\r\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n return out;\n}\n/**\r\n * Calculates the euclidian distance between two vec3's\r\n *\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {Number} distance between a and b\r\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return Math.hypot(x, y, z);\n}\n/**\r\n * Calculates the squared euclidian distance between two vec3's\r\n *\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {Number} squared distance between a and b\r\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return x * x + y * y + z * z;\n}\n/**\r\n * Calculates the squared length of a vec3\r\n *\r\n * @param {ReadonlyVec3} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n */\n\nexport function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return x * x + y * y + z * z;\n}\n/**\r\n * Negates the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to negate\r\n * @returns {vec3} out\r\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n return out;\n}\n/**\r\n * Returns the inverse of the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to invert\r\n * @returns {vec3} out\r\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n return out;\n}\n/**\r\n * Normalize a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to normalize\r\n * @returns {vec3} out\r\n */\n\nexport function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var len = x * x + y * y + z * z;\n\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n return out;\n}\n/**\r\n * Calculates the dot product of two vec3's\r\n *\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {Number} dot product of a and b\r\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n/**\r\n * Computes the cross product of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function cross(out, a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2];\n var bx = b[0],\n by = b[1],\n bz = b[2];\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n}\n/**\r\n * Performs a linear interpolation between two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n return out;\n}\n/**\r\n * Performs a hermite interpolation with two control points\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {ReadonlyVec3} c the third operand\r\n * @param {ReadonlyVec3} d the fourth operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function hermite(out, a, b, c, d, t) {\n var factorTimes2 = t * t;\n var factor1 = factorTimes2 * (2 * t - 3) + 1;\n var factor2 = factorTimes2 * (t - 2) + t;\n var factor3 = factorTimes2 * (t - 1);\n var factor4 = factorTimes2 * (3 - 2 * t);\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n/**\r\n * Performs a bezier interpolation with two control points\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {ReadonlyVec3} c the third operand\r\n * @param {ReadonlyVec3} d the fourth operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function bezier(out, a, b, c, d, t) {\n var inverseFactor = 1 - t;\n var inverseFactorTimesTwo = inverseFactor * inverseFactor;\n var factorTimes2 = t * t;\n var factor1 = inverseFactorTimesTwo * inverseFactor;\n var factor2 = 3 * t * inverseFactorTimesTwo;\n var factor3 = 3 * factorTimes2 * inverseFactor;\n var factor4 = factorTimes2 * t;\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n/**\r\n * Generates a random vector with the given scale\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\r\n * @returns {vec3} out\r\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n var z = glMatrix.RANDOM() * 2.0 - 1.0;\n var zScale = Math.sqrt(1.0 - z * z) * scale;\n out[0] = Math.cos(r) * zScale;\n out[1] = Math.sin(r) * zScale;\n out[2] = z * scale;\n return out;\n}\n/**\r\n * Transforms the vec3 with a mat4.\r\n * 4th vector component is implicitly '1'\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to transform\r\n * @param {ReadonlyMat4} m matrix to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var w = m[3] * x + m[7] * y + m[11] * z + m[15];\n w = w || 1.0;\n out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n return out;\n}\n/**\r\n * Transforms the vec3 with a mat3.\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to transform\r\n * @param {ReadonlyMat3} m the 3x3 matrix to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformMat3(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n out[0] = x * m[0] + y * m[3] + z * m[6];\n out[1] = x * m[1] + y * m[4] + z * m[7];\n out[2] = x * m[2] + y * m[5] + z * m[8];\n return out;\n}\n/**\r\n * Transforms the vec3 with a quat\r\n * Can also be used for dual quaternions. (Multiply it with the real part)\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to transform\r\n * @param {ReadonlyQuat} q quaternion to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformQuat(out, a, q) {\n // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3];\n var x = a[0],\n y = a[1],\n z = a[2]; // var qvec = [qx, qy, qz];\n // var uv = vec3.cross([], qvec, a);\n\n var uvx = qy * z - qz * y,\n uvy = qz * x - qx * z,\n uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv);\n\n var uuvx = qy * uvz - qz * uvy,\n uuvy = qz * uvx - qx * uvz,\n uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w);\n\n var w2 = qw * 2;\n uvx *= w2;\n uvy *= w2;\n uvz *= w2; // vec3.scale(uuv, uuv, 2);\n\n uuvx *= 2;\n uuvy *= 2;\n uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv));\n\n out[0] = x + uvx + uuvx;\n out[1] = y + uvy + uuvy;\n out[2] = z + uvz + uuvz;\n return out;\n}\n/**\r\n * Rotate a 3D vector around the x-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {ReadonlyVec3} a The vec3 point to rotate\r\n * @param {ReadonlyVec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nexport function rotateX(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[0];\n r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);\n r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Rotate a 3D vector around the y-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {ReadonlyVec3} a The vec3 point to rotate\r\n * @param {ReadonlyVec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nexport function rotateY(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);\n r[1] = p[1];\n r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Rotate a 3D vector around the z-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {ReadonlyVec3} a The vec3 point to rotate\r\n * @param {ReadonlyVec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nexport function rotateZ(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);\n r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);\n r[2] = p[2]; //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Get the angle between two 3D vectors\r\n * @param {ReadonlyVec3} a The first operand\r\n * @param {ReadonlyVec3} b The second operand\r\n * @returns {Number} The angle in radians\r\n */\n\nexport function angle(a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n bx = b[0],\n by = b[1],\n bz = b[2],\n mag1 = Math.sqrt(ax * ax + ay * ay + az * az),\n mag2 = Math.sqrt(bx * bx + by * by + bz * bz),\n mag = mag1 * mag2,\n cosine = mag && dot(a, b) / mag;\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n/**\r\n * Set the components of a vec3 to zero\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @returns {vec3} out\r\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n return out;\n}\n/**\r\n * Returns a string representation of a vector\r\n *\r\n * @param {ReadonlyVec3} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return \"vec3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \")\";\n}\n/**\r\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyVec3} a The first vector.\r\n * @param {ReadonlyVec3} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];\n}\n/**\r\n * Returns whether or not the vectors have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyVec3} a The first vector.\r\n * @param {ReadonlyVec3} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2));\n}\n/**\r\n * Alias for {@link vec3.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;\n/**\r\n * Alias for {@link vec3.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link vec3.divide}\r\n * @function\r\n */\n\nexport var div = divide;\n/**\r\n * Alias for {@link vec3.distance}\r\n * @function\r\n */\n\nexport var dist = distance;\n/**\r\n * Alias for {@link vec3.squaredDistance}\r\n * @function\r\n */\n\nexport var sqrDist = squaredDistance;\n/**\r\n * Alias for {@link vec3.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Alias for {@link vec3.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Perform some operation over an array of vec3s.\r\n *\r\n * @param {Array} a the array of vectors to iterate over\r\n * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\r\n * @param {Number} offset Number of elements to skip at the beginning of the array\r\n * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\r\n * @param {Function} fn Function to call for each vector in the array\r\n * @param {Object} [arg] additional argument to pass to fn\r\n * @returns {Array} a\r\n * @function\r\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 3;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n }\n\n return a;\n };\n}();","/*\n * A fast javascript implementation of simplex noise by Jonas Wagner\n\nBased on a speed-improved simplex noise algorithm for 2D, 3D and 4D in Java.\nWhich is based on example code by Stefan Gustavson (stegu@itn.liu.se).\nWith Optimisations by Peter Eastman (peastman@drizzle.stanford.edu).\nBetter rank ordering method by Stefan Gustavson in 2012.\n\n\n Copyright (c) 2018 Jonas Wagner\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n */\n(function() {\n 'use strict';\n\n var F2 = 0.5 * (Math.sqrt(3.0) - 1.0);\n var G2 = (3.0 - Math.sqrt(3.0)) / 6.0;\n var F3 = 1.0 / 3.0;\n var G3 = 1.0 / 6.0;\n var F4 = (Math.sqrt(5.0) - 1.0) / 4.0;\n var G4 = (5.0 - Math.sqrt(5.0)) / 20.0;\n\n function SimplexNoise(randomOrSeed) {\n var random;\n if (typeof randomOrSeed == 'function') {\n random = randomOrSeed;\n }\n else if (randomOrSeed) {\n random = alea(randomOrSeed);\n } else {\n random = Math.random;\n }\n this.p = buildPermutationTable(random);\n this.perm = new Uint8Array(512);\n this.permMod12 = new Uint8Array(512);\n for (var i = 0; i < 512; i++) {\n this.perm[i] = this.p[i & 255];\n this.permMod12[i] = this.perm[i] % 12;\n }\n\n }\n SimplexNoise.prototype = {\n grad3: new Float32Array([1, 1, 0,\n -1, 1, 0,\n 1, -1, 0,\n\n -1, -1, 0,\n 1, 0, 1,\n -1, 0, 1,\n\n 1, 0, -1,\n -1, 0, -1,\n 0, 1, 1,\n\n 0, -1, 1,\n 0, 1, -1,\n 0, -1, -1]),\n grad4: new Float32Array([0, 1, 1, 1, 0, 1, 1, -1, 0, 1, -1, 1, 0, 1, -1, -1,\n 0, -1, 1, 1, 0, -1, 1, -1, 0, -1, -1, 1, 0, -1, -1, -1,\n 1, 0, 1, 1, 1, 0, 1, -1, 1, 0, -1, 1, 1, 0, -1, -1,\n -1, 0, 1, 1, -1, 0, 1, -1, -1, 0, -1, 1, -1, 0, -1, -1,\n 1, 1, 0, 1, 1, 1, 0, -1, 1, -1, 0, 1, 1, -1, 0, -1,\n -1, 1, 0, 1, -1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, -1,\n 1, 1, 1, 0, 1, 1, -1, 0, 1, -1, 1, 0, 1, -1, -1, 0,\n -1, 1, 1, 0, -1, 1, -1, 0, -1, -1, 1, 0, -1, -1, -1, 0]),\n noise2D: function(xin, yin) {\n var permMod12 = this.permMod12;\n var perm = this.perm;\n var grad3 = this.grad3;\n var n0 = 0; // Noise contributions from the three corners\n var n1 = 0;\n var n2 = 0;\n // Skew the input space to determine which simplex cell we're in\n var s = (xin + yin) * F2; // Hairy factor for 2D\n var i = Math.floor(xin + s);\n var j = Math.floor(yin + s);\n var t = (i + j) * G2;\n var X0 = i - t; // Unskew the cell origin back to (x,y) space\n var Y0 = j - t;\n var x0 = xin - X0; // The x,y distances from the cell origin\n var y0 = yin - Y0;\n // For the 2D case, the simplex shape is an equilateral triangle.\n // Determine which simplex we are in.\n var i1, j1; // Offsets for second (middle) corner of simplex in (i,j) coords\n if (x0 > y0) {\n i1 = 1;\n j1 = 0;\n } // lower triangle, XY order: (0,0)->(1,0)->(1,1)\n else {\n i1 = 0;\n j1 = 1;\n } // upper triangle, YX order: (0,0)->(0,1)->(1,1)\n // A step of (1,0) in (i,j) means a step of (1-c,-c) in (x,y), and\n // a step of (0,1) in (i,j) means a step of (-c,1-c) in (x,y), where\n // c = (3-sqrt(3))/6\n var x1 = x0 - i1 + G2; // Offsets for middle corner in (x,y) unskewed coords\n var y1 = y0 - j1 + G2;\n var x2 = x0 - 1.0 + 2.0 * G2; // Offsets for last corner in (x,y) unskewed coords\n var y2 = y0 - 1.0 + 2.0 * G2;\n // Work out the hashed gradient indices of the three simplex corners\n var ii = i & 255;\n var jj = j & 255;\n // Calculate the contribution from the three corners\n var t0 = 0.5 - x0 * x0 - y0 * y0;\n if (t0 >= 0) {\n var gi0 = permMod12[ii + perm[jj]] * 3;\n t0 *= t0;\n n0 = t0 * t0 * (grad3[gi0] * x0 + grad3[gi0 + 1] * y0); // (x,y) of grad3 used for 2D gradient\n }\n var t1 = 0.5 - x1 * x1 - y1 * y1;\n if (t1 >= 0) {\n var gi1 = permMod12[ii + i1 + perm[jj + j1]] * 3;\n t1 *= t1;\n n1 = t1 * t1 * (grad3[gi1] * x1 + grad3[gi1 + 1] * y1);\n }\n var t2 = 0.5 - x2 * x2 - y2 * y2;\n if (t2 >= 0) {\n var gi2 = permMod12[ii + 1 + perm[jj + 1]] * 3;\n t2 *= t2;\n n2 = t2 * t2 * (grad3[gi2] * x2 + grad3[gi2 + 1] * y2);\n }\n // Add contributions from each corner to get the final noise value.\n // The result is scaled to return values in the interval [-1,1].\n return 70.0 * (n0 + n1 + n2);\n },\n // 3D simplex noise\n noise3D: function(xin, yin, zin) {\n var permMod12 = this.permMod12;\n var perm = this.perm;\n var grad3 = this.grad3;\n var n0, n1, n2, n3; // Noise contributions from the four corners\n // Skew the input space to determine which simplex cell we're in\n var s = (xin + yin + zin) * F3; // Very nice and simple skew factor for 3D\n var i = Math.floor(xin + s);\n var j = Math.floor(yin + s);\n var k = Math.floor(zin + s);\n var t = (i + j + k) * G3;\n var X0 = i - t; // Unskew the cell origin back to (x,y,z) space\n var Y0 = j - t;\n var Z0 = k - t;\n var x0 = xin - X0; // The x,y,z distances from the cell origin\n var y0 = yin - Y0;\n var z0 = zin - Z0;\n // For the 3D case, the simplex shape is a slightly irregular tetrahedron.\n // Determine which simplex we are in.\n var i1, j1, k1; // Offsets for second corner of simplex in (i,j,k) coords\n var i2, j2, k2; // Offsets for third corner of simplex in (i,j,k) coords\n if (x0 >= y0) {\n if (y0 >= z0) {\n i1 = 1;\n j1 = 0;\n k1 = 0;\n i2 = 1;\n j2 = 1;\n k2 = 0;\n } // X Y Z order\n else if (x0 >= z0) {\n i1 = 1;\n j1 = 0;\n k1 = 0;\n i2 = 1;\n j2 = 0;\n k2 = 1;\n } // X Z Y order\n else {\n i1 = 0;\n j1 = 0;\n k1 = 1;\n i2 = 1;\n j2 = 0;\n k2 = 1;\n } // Z X Y order\n }\n else { // x0 y0) rankx++;\n else ranky++;\n if (x0 > z0) rankx++;\n else rankz++;\n if (x0 > w0) rankx++;\n else rankw++;\n if (y0 > z0) ranky++;\n else rankz++;\n if (y0 > w0) ranky++;\n else rankw++;\n if (z0 > w0) rankz++;\n else rankw++;\n var i1, j1, k1, l1; // The integer offsets for the second simplex corner\n var i2, j2, k2, l2; // The integer offsets for the third simplex corner\n var i3, j3, k3, l3; // The integer offsets for the fourth simplex corner\n // simplex[c] is a 4-vector with the numbers 0, 1, 2 and 3 in some order.\n // Many values of c will never occur, since e.g. x>y>z>w makes x= 3 ? 1 : 0;\n j1 = ranky >= 3 ? 1 : 0;\n k1 = rankz >= 3 ? 1 : 0;\n l1 = rankw >= 3 ? 1 : 0;\n // Rank 2 denotes the second largest coordinate.\n i2 = rankx >= 2 ? 1 : 0;\n j2 = ranky >= 2 ? 1 : 0;\n k2 = rankz >= 2 ? 1 : 0;\n l2 = rankw >= 2 ? 1 : 0;\n // Rank 1 denotes the second smallest coordinate.\n i3 = rankx >= 1 ? 1 : 0;\n j3 = ranky >= 1 ? 1 : 0;\n k3 = rankz >= 1 ? 1 : 0;\n l3 = rankw >= 1 ? 1 : 0;\n // The fifth corner has all coordinate offsets = 1, so no need to compute that.\n var x1 = x0 - i1 + G4; // Offsets for second corner in (x,y,z,w) coords\n var y1 = y0 - j1 + G4;\n var z1 = z0 - k1 + G4;\n var w1 = w0 - l1 + G4;\n var x2 = x0 - i2 + 2.0 * G4; // Offsets for third corner in (x,y,z,w) coords\n var y2 = y0 - j2 + 2.0 * G4;\n var z2 = z0 - k2 + 2.0 * G4;\n var w2 = w0 - l2 + 2.0 * G4;\n var x3 = x0 - i3 + 3.0 * G4; // Offsets for fourth corner in (x,y,z,w) coords\n var y3 = y0 - j3 + 3.0 * G4;\n var z3 = z0 - k3 + 3.0 * G4;\n var w3 = w0 - l3 + 3.0 * G4;\n var x4 = x0 - 1.0 + 4.0 * G4; // Offsets for last corner in (x,y,z,w) coords\n var y4 = y0 - 1.0 + 4.0 * G4;\n var z4 = z0 - 1.0 + 4.0 * G4;\n var w4 = w0 - 1.0 + 4.0 * G4;\n // Work out the hashed gradient indices of the five simplex corners\n var ii = i & 255;\n var jj = j & 255;\n var kk = k & 255;\n var ll = l & 255;\n // Calculate the contribution from the five corners\n var t0 = 0.6 - x0 * x0 - y0 * y0 - z0 * z0 - w0 * w0;\n if (t0 < 0) n0 = 0.0;\n else {\n var gi0 = (perm[ii + perm[jj + perm[kk + perm[ll]]]] % 32) * 4;\n t0 *= t0;\n n0 = t0 * t0 * (grad4[gi0] * x0 + grad4[gi0 + 1] * y0 + grad4[gi0 + 2] * z0 + grad4[gi0 + 3] * w0);\n }\n var t1 = 0.6 - x1 * x1 - y1 * y1 - z1 * z1 - w1 * w1;\n if (t1 < 0) n1 = 0.0;\n else {\n var gi1 = (perm[ii + i1 + perm[jj + j1 + perm[kk + k1 + perm[ll + l1]]]] % 32) * 4;\n t1 *= t1;\n n1 = t1 * t1 * (grad4[gi1] * x1 + grad4[gi1 + 1] * y1 + grad4[gi1 + 2] * z1 + grad4[gi1 + 3] * w1);\n }\n var t2 = 0.6 - x2 * x2 - y2 * y2 - z2 * z2 - w2 * w2;\n if (t2 < 0) n2 = 0.0;\n else {\n var gi2 = (perm[ii + i2 + perm[jj + j2 + perm[kk + k2 + perm[ll + l2]]]] % 32) * 4;\n t2 *= t2;\n n2 = t2 * t2 * (grad4[gi2] * x2 + grad4[gi2 + 1] * y2 + grad4[gi2 + 2] * z2 + grad4[gi2 + 3] * w2);\n }\n var t3 = 0.6 - x3 * x3 - y3 * y3 - z3 * z3 - w3 * w3;\n if (t3 < 0) n3 = 0.0;\n else {\n var gi3 = (perm[ii + i3 + perm[jj + j3 + perm[kk + k3 + perm[ll + l3]]]] % 32) * 4;\n t3 *= t3;\n n3 = t3 * t3 * (grad4[gi3] * x3 + grad4[gi3 + 1] * y3 + grad4[gi3 + 2] * z3 + grad4[gi3 + 3] * w3);\n }\n var t4 = 0.6 - x4 * x4 - y4 * y4 - z4 * z4 - w4 * w4;\n if (t4 < 0) n4 = 0.0;\n else {\n var gi4 = (perm[ii + 1 + perm[jj + 1 + perm[kk + 1 + perm[ll + 1]]]] % 32) * 4;\n t4 *= t4;\n n4 = t4 * t4 * (grad4[gi4] * x4 + grad4[gi4 + 1] * y4 + grad4[gi4 + 2] * z4 + grad4[gi4 + 3] * w4);\n }\n // Sum up and scale the result to cover the range [-1,1]\n return 27.0 * (n0 + n1 + n2 + n3 + n4);\n }\n };\n\n function buildPermutationTable(random) {\n var i;\n var p = new Uint8Array(256);\n for (i = 0; i < 256; i++) {\n p[i] = i;\n }\n for (i = 0; i < 255; i++) {\n var r = i + ~~(random() * (256 - i));\n var aux = p[i];\n p[i] = p[r];\n p[r] = aux;\n }\n return p;\n }\n SimplexNoise._buildPermutationTable = buildPermutationTable;\n\n function alea() {\n // Johannes Baagøe , 2010\n var s0 = 0;\n var s1 = 0;\n var s2 = 0;\n var c = 1;\n\n var mash = masher();\n s0 = mash(' ');\n s1 = mash(' ');\n s2 = mash(' ');\n\n for (var i = 0; i < arguments.length; i++) {\n s0 -= mash(arguments[i]);\n if (s0 < 0) {\n s0 += 1;\n }\n s1 -= mash(arguments[i]);\n if (s1 < 0) {\n s1 += 1;\n }\n s2 -= mash(arguments[i]);\n if (s2 < 0) {\n s2 += 1;\n }\n }\n mash = null;\n return function() {\n var t = 2091639 * s0 + c * 2.3283064365386963e-10; // 2^-32\n s0 = s1;\n s1 = s2;\n return s2 = t - (c = t | 0);\n };\n }\n function masher() {\n var n = 0xefc8249d;\n return function(data) {\n data = data.toString();\n for (var i = 0; i < data.length; i++) {\n n += data.charCodeAt(i);\n var h = 0.02519603282416938 * n;\n n = h >>> 0;\n h -= n;\n h *= n;\n n = h >>> 0;\n h -= n;\n n += h * 0x100000000; // 2^32\n }\n return (n >>> 0) * 2.3283064365386963e-10; // 2^-32\n };\n }\n\n // amd\n if (typeof define !== 'undefined' && define.amd) define(function() {return SimplexNoise;});\n // common js\n if (typeof exports !== 'undefined') exports.SimplexNoise = SimplexNoise;\n // browser\n else if (typeof window !== 'undefined') window.SimplexNoise = SimplexNoise;\n // nodejs\n if (typeof module !== 'undefined') {\n module.exports = SimplexNoise;\n }\n\n})();\n","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n// find the complete implementation of crypto (msCrypto) on IE11.\nvar getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => module['default'] :\n\t\t() => module;\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(\"./dist/index-light.js\");\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://Urpflanze/webpack/universalModuleDefinition","webpack://Urpflanze/./dist/Color.js","webpack://Urpflanze/./dist/Utilites.js","webpack://Urpflanze/./dist/core/Group.js","webpack://Urpflanze/./dist/core/Scene.js","webpack://Urpflanze/./dist/core/SceneChild.js","webpack://Urpflanze/./dist/core/math/Vec2.js","webpack://Urpflanze/./dist/core/math/bounding.js","webpack://Urpflanze/./dist/core/math/gl-matrix-extensions.js","webpack://Urpflanze/./dist/core/math/index.js","webpack://Urpflanze/./dist/core/shapes/Shape.js","webpack://Urpflanze/./dist/core/shapes/ShapeBase.js","webpack://Urpflanze/./dist/core/shapes/ShapeBuffer.js","webpack://Urpflanze/./dist/core/shapes/ShapeLoop.js","webpack://Urpflanze/./dist/core/shapes/ShapePrimitive.js","webpack://Urpflanze/./dist/core/shapes/ShapeRecursive.js","webpack://Urpflanze/./dist/core/shapes/primitives/Circle.js","webpack://Urpflanze/./dist/core/shapes/primitives/Line.js","webpack://Urpflanze/./dist/core/shapes/primitives/Lissajous.js","webpack://Urpflanze/./dist/core/shapes/primitives/Polygon.js","webpack://Urpflanze/./dist/core/shapes/primitives/Rect.js","webpack://Urpflanze/./dist/core/shapes/primitives/Rose.js","webpack://Urpflanze/./dist/core/shapes/primitives/Spiral.js","webpack://Urpflanze/./dist/core/shapes/primitives/SuperShape.js","webpack://Urpflanze/./dist/core/shapes/primitives/Triangle.js","webpack://Urpflanze/./dist/core/types/scene-child.js","webpack://Urpflanze/./dist/core/types/shape-base.js","webpack://Urpflanze/./dist/index-light.js","webpack://Urpflanze/./dist/meta.js","webpack://Urpflanze/./dist/services/animation/Animation.js","webpack://Urpflanze/./dist/services/animation/Easings.js","webpack://Urpflanze/./dist/services/animation/Simple.js","webpack://Urpflanze/./dist/services/drawers/Drawer.js","webpack://Urpflanze/./dist/services/drawers/drawer-canvas/DrawerCanvas.js","webpack://Urpflanze/./dist/services/drawers/drawer-canvas/FrameBuffer.js","webpack://Urpflanze/./dist/services/events/Emitter.js","webpack://Urpflanze/./dist/services/scene-utilities/SceneChildUtilitiesData.js","webpack://Urpflanze/./dist/services/scene-utilities/SceneUtilities.js","webpack://Urpflanze/./dist/services/scene-utilities/SceneUtilitiesExtended.js","webpack://Urpflanze/./dist/services/timeline/Timeline.js","webpack://Urpflanze/./node_modules/gl-matrix/esm/common.js","webpack://Urpflanze/./node_modules/gl-matrix/esm/mat4.js","webpack://Urpflanze/./node_modules/gl-matrix/esm/vec2.js","webpack://Urpflanze/./node_modules/gl-matrix/esm/vec3.js","webpack://Urpflanze/./node_modules/simplex-noise/simplex-noise.js","webpack://Urpflanze/./node_modules/uuid/dist/esm-browser/regex.js","webpack://Urpflanze/./node_modules/uuid/dist/esm-browser/rng.js","webpack://Urpflanze/./node_modules/uuid/dist/esm-browser/stringify.js","webpack://Urpflanze/./node_modules/uuid/dist/esm-browser/v1.js","webpack://Urpflanze/./node_modules/uuid/dist/esm-browser/validate.js","webpack://Urpflanze/webpack/bootstrap","webpack://Urpflanze/webpack/runtime/compat get default export","webpack://Urpflanze/webpack/runtime/define property getters","webpack://Urpflanze/webpack/runtime/hasOwnProperty shorthand","webpack://Urpflanze/webpack/runtime/make namespace object","webpack://Urpflanze/webpack/startup"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;;;;;;;;;;;;ACVA;AACA;AACA,0CAA0C,IAAI;AAC9C;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,IAAI;AAC9C;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,6BAA6B,IAAI;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,yBAAyB;AACtC;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5KA,CAAyC;AAC+B;AACxE;AACiC;AACjC;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA,+BAA+B,iBAAiB,EAAE;AAClD,+BAA+B,iBAAiB,EAAE;AAClD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACO;AACP;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sDAAY;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP,0BAA0B,iBAAiB;AAC3C,uBAAuB,OAAO;AAC9B,uBAAuB,OAAO;AAC9B,uBAAuB,OAAO;AAC9B;AACA,2BAA2B,sDAAY;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,KAAK;AAChB,aAAa;AACb;AACO;AACP,sCAAsC,2BAA2B;AACjE,2BAA2B,2EAAsB;AACjD,2BAA2B,iDAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,KAAK;AAChB,aAAa;AACb;AACO;AACP,sCAAsC,2BAA2B;AACjE,2BAA2B,2EAAsB;AACjD,2BAA2B,iDAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,KAAK;AAChB,aAAa;AACb;AACO;AACP,sCAAsC,2BAA2B;AACjE,2BAA2B,2EAAsB;AACjD,2BAA2B,iDAAe;AAC1C;AACA;AACA,sBAAsB,iDAAe;AACrC,eAAe,+CAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,WAAW;AACzB,gBAAgB;AAChB;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,WAAW;AACzB,gBAAgB;AAChB;AACA;AACA;AACA;AACA,IAAI;AACJ,oC;;;;;;;;;;;;;;;;;;;;;;;ACtRA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AAC2B;AACU;AACK;AACJ;AACvC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB,aAAa;AAChD;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,mFAAmF,qBAAqB,EAAE;AAC1G;AACA,4BAA4B,8DAAwB;AACpD;AACA;AACA;AACA,2CAA2C,SAAS;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,0BAA0B,EAAE;AACxE;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,yBAAyB;AACxC;AACA;AACA;AACA,2CAA2C,2BAA2B;AACtE,+CAA+C,0EAA0E,EAAE;AAC3H;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,uBAAuB,yDAAc;AACrC;AACA,mDAAmD,2CAA2C,EAAE;AAChG,uDAAuD,SAAS;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA;AACA,uCAAuC,uBAAuB;AAC9D,6CAA6C,4BAA4B;AACzE,+CAA+C,+CAA+C,EAAE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;AACA,mDAAmD,kCAAkC,EAAE;AACvF;AACA;AACA,+CAA+C,iCAAiC,EAAE;AAClF;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA,+CAA+C,uCAAuC,EAAE;AACxF;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA,wDAAwD,kDAAkD,EAAE,0BAA0B,cAAc,EAAE;AACtJ;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,kCAAkC,yBAAyB,EAAE;AAC7D,kCAAkC,wBAAwB,EAAE;AAC5D,iEAAiE,mCAAmC,EAAE;AACtG;AACA;AACA;AACA,6DAA6D,SAAS;AACtE;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAsB;AACrC;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,yDAAyD,gCAAgC,EAAE,uBAAuB,wBAAwB,EAAE;AAC5I;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D;AACA;AACA;AACA,+CAA+C,8BAA8B,EAAE;AAC/E;AACA;AACA,CAAC,CAAC,gDAAU;AACZ,iEAAe,KAAK,EAAC;AACrB,iC;;;;;;;;;;;;;;;;;;;;;;ACnVA,CAAsC;AACV;AACO;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA,qDAAqD,4CAA4C,EAAE;AACnG;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D;AACA;AACA;AACA,qDAAqD,oCAAoC,EAAE;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC,eAAe,OAAO;AACtB;AACA;AACA;AACA,uBAAuB;AACvB,8CAA8C,6CAA6C;AAC3F,sCAAsC;AACtC;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,qBAAqB,EAAE;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,0BAA0B,EAAE;AACxE;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,iBAAiB;AACjB;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA,6DAA6D,2CAAK;AAClE;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,WAAW;AAC1B,eAAe,4BAA4B;AAC3C,iBAAiB;AACjB;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA,+BAA+B,gDAAU;AACzC;AACA;AACA,mCAAmC,kDAAK;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,2CAAK;AAChE;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,qBAAqB;AACpC;AACA;AACA;AACA,+BAA+B,gDAAU;AACzC;AACA;AACA,mCAAmC,kDAAK;AACxC;AACA;AACA;AACA,2DAA2D,2CAAK;AAChE;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA,kCAAkC,2CAAK;AACvC;AACA;AACA,aAAa;AACb;AACA,uCAAuC,kDAAK;AAC5C;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,KAAK,EAAC;AACrB,iC;;;;;;;;;;;;;;;;;;;ACxUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC,eAAe,yBAAyB;AACxC,eAAe,EAAE;AACjB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,CAAC;AACD,iEAAe,UAAU,EAAC;AAC1B,sC;;;;;;;;;;;;;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA,+BAA+B,6CAA6C,EAAE;AAC9E;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA,0BAA0B,kCAAkC,EAAE;AAC9D;AACA;AACA;AACA,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA,4BAA4B,mCAAmC,EAAE;AACjE;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,gBAAgB;AAChB;AACA,8BAA8B,0CAA0C,EAAE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAe,IAAI,EAAC;AACpB,gC;;;;;;;;;;;;;;;;;;;ACnNA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,EAAE,EAAE;AACT;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,iEAAe,QAAQ,EAAC;AACxB,oC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5EA,CAAqC;AAC9B;AACA;AACA;AACA;AACP,yDAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,mCAAmC,mBAAmB;AACtD;AACA;AACA;AACA;AACA;AACA,gD;;;;;;;;;;;;;;;;;;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,8BAA8B,qCAAqC;AAC1E;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,iC;;;;;;;;;;;;;;;;;;;;;;AC7BA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACoC;AACG;AACV;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc,aAAa;AAC1C;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,sCAAsC,gDAAU;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,YAAY;AAC3B,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,SAAS;AACrE,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD,eAAe,mBAAmB;AAClC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,8DAAwB;AAClD;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,KAAK,EAAC;AACrB,iC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzOA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC6C;AAC6H;AACnI;AACc;AACrB;AACF;AACU;AACD;AACvC,gBAAgB,6CAAW;AAC3B,sBAAsB,6CAAW;AACjC,wBAAwB,6CAAW;AACnC,uBAAuB,6CAAW;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB,aAAa;AAChD;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC,eAAe,yBAAyB;AACxC,eAAe,EAAE;AACjB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,EAAE;AACjB,eAAe,QAAQ;AACvB;AACA;AACA;AACA,uCAAuC,uBAAuB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA,uCAAuC,uBAAuB;AAC9D,6CAA6C,4BAA4B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,yBAAyB;AACxC;AACA;AACA;AACA,2CAA2C,2BAA2B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,sEAAsB,GAAG,oEAAoB;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iDAAe;AAC1C;AACA;AACA;AACA,0CAA0C,2CAA2C;AACrF,8CAA8C,2CAA2C;AACzF;AACA;AACA,sDAAsD,oEAAoB,IAAI,sCAAG;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,8DAAW,yCAAyC,iEAAc;AACrG;AACA,gCAAgC,8DAAW,sCAAsC,gEAAa;AAC9F,oCAAoC,8DAAW,0CAA0C,iEAAc;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,gDAAK;AAC3C,4CAA4C,8DAAW,kDAAkD,iEAAc;AACvH,0CAA0C,8DAAW,gDAAgD,iEAAc;AACnH;AACA;AACA,6BAA6B,oEAAoB;AACjD,qCAAqC,iDAAe;AACpD,4BAA4B,8CAAY,iBAAiB,iEAAc;AACvE;AACA,6BAA6B,sEAAsB;AACnD,qCAAqC,iDAAe;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+CAAa;AACrC,4CAA4C,gDAAc;AAC1D;AACA,4BAA4B,gDAAc;AAC1C;AACA,4BAA4B,gEAAa;AACzC,4BAA4B,+CAAa;AACzC;AACA,yCAAyC,8CAAY;AACrD,yCAAyC,8CAAY;AACrD,yCAAyC,8CAAY;AACrD;AACA,4BAA4B,4CAAU;AACtC;AACA,4BAA4B,gDAAc,mCAAmC,4CAAU;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kDAAgB;AAC5C;AACA;AACA;AACA;AACA,wBAAwB,+CAAa;AACrC,wBAAwB,gDAAc;AACtC;AACA,4BAA4B,gDAAc;AAC1C;AACA,+CAA+C,oEAAoB;AACnE,4BAA4B,8CAAY;AACxC;AACA,oBAAoB,yDAAc;AAClC;AACA,6CAA6C,4BAA4B;AACzE;AACA;AACA;AACA,8CAA8C,wDAAa;AAC3D,8CAA8C,wDAAa;AAC3D;AACA,4BAA4B,oDAAkB;AAC9C;AACA;AACA,sDAAsD,0CAAQ;AAC9D,gCAAgC,oDAAkB;AAClD,gCAAgC,4CAAU;AAC1C,sDAAsD,0CAAQ;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oDAAkB;AAC9C;AACA;AACA;AACA;AACA,wBAAwB,uDAAY;AACpC;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAa;AACrB;AACA,yDAAyD,SAAS;AAClE;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE,GAAG;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA,mEAAmE,SAAS;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,gBAAgB,EAAE,GAAG;AACrB;AACA;AACA;AACA;AACA,kBAAkB,oEAAoB;AACtC,kBAAkB,gCAAgC;AAClD,kBAAkB,gCAAgC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA,KAAK,EAAE;AACP;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,4BAA4B,OAAO,oEAAoB,YAAY,0CAA0C,uFAAuF,GAAG;AACvP;AACA,CAAC,CAAC,gDAAU;AACZ,iEAAe,SAAS,EAAC;AACzB,qC;;;;;;;;;;;;;;;;;;;;;;AC3fA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACuC;AACM;AACiB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB,aAAa;AACjD;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,wFAAwF,6EAA8B;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA,uCAAuC,uBAAuB;AAC9D,6CAA6C,4BAA4B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,4EAA6B;AAC1E,cAAc,gEAA0B;AACxC;AACA;AACA,iDAAiD,SAAS;AAC1D;AACA;AACA,YAAY,uDAAY;AACxB;AACA,QAAQ,wDAAa;AACrB;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,+BAA+B,WAAW;AAC1C;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,oDAAc;AAChB,iEAAe,WAAW,EAAC;AAC3B,uC;;;;;;;;;;;;;;;;;;;;;;;;AClKA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC+D;AACvB;AACV;AACgB;AACV;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB,aAAa;AAC/C,eAAe,QAAQ;AACvB;AACA;AACA,kCAAkC,eAAe;AACjD,4CAA4C,4BAA4B;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sCAAG;AACxB,qBAAqB,sCAAG;AACxB,qCAAqC,eAAe,EAAE;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,2DAA2D,SAAS;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA,uCAAuC,uBAAuB;AAC9D,6CAA6C,4BAA4B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB,eAAe,EAAE;AACjB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA,qDAAqD;AACrD,sDAAsD,QAAQ;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,qEAA+B;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,4EAA6B;AACvE;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uDAAY;AAC5B;AACA;AACA;AACA,YAAY,wDAAa;AACzB;AACA;AACA;AACA;AACA;AACA,yBAAyB,gEAA0B;AACnD,YAAY,yDAAc;AAC1B,2BAA2B,kBAAkB;AAC7C;AACA;AACA,gBAAgB,uDAAY;AAC5B;AACA,YAAY,wDAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,+BAA+B,WAAW;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,oDAAc;AAChB,iEAAe,SAAS,EAAC;AACzB,qC;;;;;;;;;;;;;;;;;;;;;;;AC1QA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACmC;AAC6H;AAC5G;AACb;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB,aAAa;AACpD;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA,mDAAmD,yDAAc;AACjE;AACA;AACA;AACA;AACA;AACA,sBAAsB,8DAAW;AACjC;AACA,qFAAqF,4EAA6B;AAClH;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAAW;AAC1B;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,YAAY;AAC3B,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B,iBAAiB;AACjB;AACA;AACA;AACA;AACA,uBAAuB,yDAAc;AACrC;AACA,4CAA4C,SAAS;AACrD,YAAY,uDAAY;AACxB;AACA,QAAQ,wDAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA,qBAAqB,4EAA6B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,4EAA6B;AAClD;AACA;AACA,iCAAiC,8EAA+B;AAChE,iCAAiC,8EAA+B;AAChE,2CAA2C,SAAS;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,cAAc,EAAC;AAC9B,0C;;;;;;;;;;;;;;;;;;;;;AClNA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACwC;AACZ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB,aAAa;AACpD;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,yDAAc;AACjE;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA,uCAAuC,uBAAuB;AAC9D,6CAA6C,4BAA4B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,yBAAyB;AACxC;AACA;AACA;AACA,wCAAwC,wDAAkB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qDAAqD;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,6BAA6B;AACpD;AACA;AACA,YAAY,uDAAY;AACxB;AACA,sCAAsC,+BAA+B;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yIAAyI,6DAA6D;AACtM;AACA;AACA;AACA;AACA,4BAA4B,uEAAuE;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,SAAS;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA,oBAAoB,uDAAY;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,YAAY;AAC3B,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,gCAAgC;AACnH,gDAAgD;AAChD;AACA;AACA;AACA;AACA,4BAA4B,8DAA8D;AAC1F;AACA,+DAA+D,iBAAiB,wCAAwC;AACxH;AACA,sBAAsB,4DAAsB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF;AACjF;AACA,kBAAkB,EAAE;AACpB;AACA,+BAA+B,gBAAgB;AAC/C;AACA,mEAAmE,SAAS;AAC5E;AACA,+FAA+F,gCAAgC;AAC/H,4DAA4D;AAC5D;AACA;AACA;AACA;AACA,wCAAwC,wDAAwD;AAChG;AACA;AACA,2EAA2E,iBAAiB,wCAAwC;AACpI;AACA,kCAAkC,4DAAsB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE,GAAG;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gCAAgC;AACpD;AACA;AACA;AACA,CAAC,CAAC,2CAAK;AACP,iEAAe,cAAc,EAAC;AAC9B,0C;;;;;;;;;;;;;;;;;;;;;;AC/UA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACgC;AACI;AAC6B;AAClE;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB,aAAa;AAC9C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA,6BAA6B,4EAA6B;AAC1D;AACA;AACA;AACA,iBAAiB,sCAAG;AACpB;AACA;AACA,6EAA6E,oDAAc;AAC3F,aAAa;AACb,oDAAoD,mFAAmF,EAAE;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,MAAM,EAAC;AACtB,kC;;;;;;;;;;;;;;;;;;;;;ACrDA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACiE;AACzB;AACzC;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB,aAAa;AAC9C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,6BAA6B,4EAA6B;AAC1D;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,iDAAW;AACb,iEAAe,IAAI,EAAC;AACpB,gC;;;;;;;;;;;;;;;;;;;;;;AC1CA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACgC;AACI;AAC6B;AAClE;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB,aAAa;AAC/C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,6BAA6B,4EAA6B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,sCAAG;AACpB;AACA;AACA;AACA,uCAAuC,oDAAc;AACrD;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,SAAS,EAAC;AACzB,qC;;;;;;;;;;;;;;;;;;;;;;ACvEA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACoC;AAC6B;AACjC;AACjC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA,wFAAwF,4EAA6B;AACrH;AACA;AACA;AACA;AACA,iBAAiB,sCAAG;AACpB;AACA,uBAAuB,sCAAG;AAC1B,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,OAAO,EAAC;AACvB,mC;;;;;;;;;;;;;;;;;;;;;ACpDA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACiE;AACzB;AACzC;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB,aAAa;AAC9C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,6BAA6B,4EAA6B;AAC1D;AACA;AACA;AACA;AACA,CAAC,CAAC,iDAAW;AACb,iEAAe,IAAI,EAAC;AACpB,gC;;;;;;;;;;;;;;;;;;;;;;ACzCA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACoC;AAC6B;AACjC;AACjC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc,aAAa;AAC1C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA,wFAAwF,6EAA8B;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sCAAG;AAC1B,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,mBAAmB,sCAAG;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,IAAI,EAAC;AACpB,gC;;;;;;;;;;;;;;;;;;;;;;ACzFA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACoC;AAC6B;AACjC;AACjC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe,aAAa;AAC3C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA,wFAAwF,4EAA6B;AACrH;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,QAAQ,sCAAG,+CAA+C,EAAE;AACzG;AACA,uBAAuB,sCAAG;AAC1B;AACA,aAAa;AACb;AACA;AACA,0BAA0B,sCAAG;AAC7B;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oCAAoC;AACtD,kBAAkB,EAAE;AACpB;AACA;AACA;AACA,yCAAyC,eAAe;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA,yCAAyC,wBAAwB;AACjE;AACA,yCAAyC,iCAAiC;AAC1E;AACA,yCAAyC,8BAA8B;AACvE;AACA,yCAAyC,6CAA6C;AACtF;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,MAAM,EAAC;AACtB,kC;;;;;;;;;;;;;;;;;;;;;;AC9HA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACoC;AAC6B;AACjC;AACjC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB,aAAa;AAChD;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA,wFAAwF,6EAA8B;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,sCAAG;AACpB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,UAAU,EAAC;AAC1B,sC;;;;;;;;;;;;;;;;;;;;;AC/EA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACiE;AACzB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB,aAAa;AAC9C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,6BAA6B,4EAA6B;AAC1D;AACA;AACA;AACA;AACA,CAAC,CAAC,iDAAW;AACb,iEAAe,QAAQ,EAAC;AACxB,oC;;;;;;;;;;;;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0CAA0C;AAC3C,uC;;;;;;;;;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4DAA4D;AAC7D,sC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5BA;AACA;AACA;AACkD;AAClD;AACqC;AACrC,yDAA2B;AAC3B;AACA;AACA;AACgD;AACU;AACV;AAChD;AACyE;AACV;AACI;AACZ;AACkB;AACT;AACQ;AACR;AACM;AACF;AACJ;AACI;AACM;AACE;AAC5E;AAC8J;AAC3G;AACP;AAC5C;AACA;AACA;AACwF;AACrB;AACD;AAClE,uC;;;;;;;;;;;;;;;;;;;;;;;ACtCA;AACA;AACA;AACoC;AACpC,gC;;;;;;;;;;;;;;;;;;;;;;ACJA,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC8B;AACiD;AAChC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD,uCAAuC,gGAA0C;AACjF,qCAAqC,gGAA0C;AAC/E,uBAAuB,oDAAc;AACrC;AACA;AACA;AACA,0EAA0E,0BAA0B,yCAAS;AAC7G;AACA;AACA;AACA,4BAA4B,QAAQ;AACpC;AACA;AACA,KAAK;AACL;AACA,iEAAe,SAAS,EAAC;AACzB,qC;;;;;;;;;;;;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA,mDAAmD,wCAAwC,EAAE;AAC7F;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,iEAAe,OAAO,EAAC;AACvB,mC;;;;;;;;;;;;;;;;;;;;;;AC3bA,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACoE;AAC3B;AACT;AAChC;AACA;AACA;AACA;AACA;AACA,iDAAiD,0CAA0C,WAAW,iCAAiC;AACvI,KAAK;AACL;AACA,iDAAiD,yCAAyC,WAAW,4BAA4B;AACjI,KAAK;AACL;AACA,iDAAiD,yCAAyC,WAAW,iBAAiB;AACtH,KAAK;AACL;AACA;AACA;AACA;AACA,kCAAkC,kDAAO;AACzC;AACA,gCAAgC,kDAAO;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,yBAAyB,4DAAoB;AAC7C,uBAAuB,4DAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,gCAAgC,UAAU;AAC1C;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,6CAAO;AACjC;AACA;AACA;AACA;AACA;AACA,sBAAsB,6CAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,6CAAO;AACjC,0BAA0B,6CAAO;AACjC;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,6CAAO;AACzC;AACA;AACA;AACA;AACA;AACA,+DAA+D,6CAAO;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAe,MAAM,EAAC;AACtB,kC;;;;;;;;;;;;;;;;;;;;;;;;;ACxJA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACqC;AACO;AACmB;AACvB;AACC;AACF;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD,+BAA+B,mBAAmB;AAClD;AACA,6BAA6B,uDAAQ;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE,GAAG;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE,GAAG;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qDAAU;AACtB;AACA;AACA;AACA;AACA,4BAA4B,4EAAsB;AAClD,yBAAyB;AACzB;AACA;AACA;AACA;AACA,4BAA4B,kFAA4B;AACxD,yBAAyB;AACzB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC,eAAe,EAAE;AACjB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,SAAS;AACxB,eAAe,2BAA2B,sBAAsB,UAAU;AAC1E;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,gDAAI;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB,eAAe,OAAO;AACtB,gBAAgB,EAAE,GAAG;AACrB;AACA;AACA;AACA,yBAAyB,kDAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,oDAAO;AACT,iEAAe,MAAM,EAAC;AACtB,kC;;;;;;;;;;;;;;;;;;;;;;;AChTA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC+B;AACS;AACA;AACG;AAC3C;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iDAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA,eAAe,oDAAoD;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,iCAAiC;AACjC;AACA,yBAAyB,qBAAqB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,4BAA4B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,wBAAwB,8GAA8G;AACtL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gBAAgB,uDAAiB;AACjC;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,8CAAG;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,iCAAiC;AACjC,6BAA6B;AAC7B;AACA;AACA,wCAAwC,gEAA0B;AAClE;AACA;AACA;AACA,uCAAuC,wBAAwB;AAC/D;AACA;AACA;AACA,oCAAoC,gEAA0B;AAC9D;AACA,0CAA0C,gEAA0B;AACpE,yCAAyC,gEAA0B;AACnE,4CAA4C,gEAA0B;AACtE,4CAA4C,gEAA0B;AACtE;AACA;AACA;AACA;AACA,mCAAmC,gEAA0B;AAC7D;AACA;AACA,4CAA4C,0DAAoB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gEAA0B;AAC/D,wCAAwC,gEAA0B;AAClE;AACA;AACA,4CAA4C,0DAAoB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,gEAA0B;AACrE,0CAA0C,gEAA0B;AACpE,2CAA2C,gEAA0B;AACrE,iDAAiD,gEAA0B;AAC3E,6CAA6C,gEAA0B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,aAAa;AACb;AACA,uBAAuB,8CAAG;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA,YAAY,4DAAY;AACxB,YAAY,4DAAY;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,4CAAM;AACR,iEAAe,YAAY,EAAC;AAC5B,wC;;;;;;;;;;;;;;;;;;;ACvdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,WAAW,EAAE;AACvE;AACA;AACA,CAAC;AACD,iEAAe,WAAW,EAAC;AAC3B,uC;;;;;;;;;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,6CAA6C;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,8CAA8C;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,6BAA6B;AAC5C;AACA;AACA;AACA;AACA,2DAA2D,SAAS;AACpE;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,OAAO,EAAC;AACvB,mC;;;;;;;;;;;;;;;;;;;;;ACzDA,CAAyD;AACc;AACvE;AACA,KAAK,qBAAqB,iFAA6B,EAAE;AACzD,KAAK,sBAAsB,kFAA8B,EAAE;AAC3D,KAAK,uBAAuB,mFAA+B,EAAE;AAC7D,KAAK,qBAAqB,iFAA6B,EAAE;AACzD;AACA;AACA,KAAK,0BAA0B,mFAAsB,EAAE;AACvD,KAAK,uBAAuB,gFAAmB,EAAE;AACjD,KAAK,2BAA2B,oFAAuB,EAAE;AACzD,KAAK,uBAAuB,gFAAmB,EAAE;AACjD,KAAK,4BAA4B,qFAAwB,EAAE;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,iBAAiB,mFAAsB;AACvC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,iEAAe,uBAAuB,EAAC;AACvC,mD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxkBA,sBAAsB,SAAI,IAAI,SAAI;AAClC,iDAAiD,QAAQ;AACzD,wCAAwC,QAAQ;AAChD,wDAAwD,QAAQ;AAChE;AACA;AACA;AACoC;AACW;AAC/C;AACqD;AACQ;AACR;AACM;AACF;AACJ;AACI;AACM;AACE;AACrB;AACkB;AACA;AACV;AACI;AACnB;AACA;AACe;AACL;AACiB;AACF;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,iEAAI;AACtB,sBAAsB,qEAAQ;AAC9B,kBAAkB,iEAAI;AACtB,qBAAqB,oEAAO;AAC5B,oBAAoB,mEAAM;AAC1B,kBAAkB,iEAAI;AACtB,oBAAoB,mEAAM;AAC1B,uBAAuB,sEAAS;AAChC,wBAAwB,uEAAU;AAClC,mBAAmB,iDAAK;AACxB,mBAAmB,wDAAK;AACxB,4BAA4B,iEAAc;AAC1C,uBAAuB,4DAAS;AAChC,yBAAyB,8DAAW;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC,eAAe,6BAA6B;AAC5C,eAAe,MAAM;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qDAAU;AACtC,6DAA6D,8CAA8C,EAAE;AAC7G;AACA;AACA;AACA;AACA;AACA,yCAAyC,8CAAM;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA,oDAAoD,0CAA0C,yEAAkC,mDAAmD;AACnL;AACA;AACA;AACA,qBAAqB,iFAAiF;AACtG;AACA;AACA;AACA,mEAAmE,4BAA4B,EAAE;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,QAAQ,sDAAU;AAClB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,MAAM;AACrB,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA,kCAAkC,4DAAS;AAC3C;AACA;AACA;AACA,kCAAkC,8DAAW;AAC7C;AACA;AACA,kCAAkC,iEAAc;AAChD;AACA;AACA;AACA;AACA,kCAAkC,4DAAS;AAC3C;AACA;AACA,kCAAkC,4DAAS;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA,sCAAsC,iDAAK;AAC3C;AACA;AACA;AACA,iBAAiB;AACjB;AACA,2CAA2C,wDAAK,sBAAsB,wDAAK;AAC3E;AACA;AACA;AACA,2CAA2C,8DAAW,sBAAsB,8DAAW;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,sBAAsB;AACrC,eAAe,wBAAwB;AACvC,eAAe,MAAM;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,8BAA8B,iDAAK,sBAAsB,iDAAK;AAC9D;AACA;AACA;AACA,mCAAmC,wDAAK;AACxC;AACA;AACA;AACA;AACA,6CAA6C,4DAAS;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,iDAAK;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,WAAW;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,iDAAK;AACrC;AACA,qCAAqC,wDAAK;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,kCAAkC,iDAAK;AACvC;AACA,qCAAqC,wDAAK;AAC1C;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD,uCAAuC,iEAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,QAAQ,sDAAU;AAClB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW;AAC7B,kBAAkB,4BAA4B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,qCAAqC,iDAAK;AAC1C;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,qCAAqC,wDAAK;AAC1C;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,qCAAqC,8DAAW;AAChD;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,qCAAqC,iEAAc;AACnD;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,qCAAqC,4DAAS;AAC9C;AACA;AACA;AACA,gBAAgB,8DAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,4BAA4B;AAC3C,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA,+BAA+B,UAAU;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,4DAAS,IAAI,wEAAiC;AACpF;AACA;AACA,2CAA2C,yEAAkC;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6EAAsC;AAClD;AACA,qCAAqC,2EAA0B;AAC/D;AACA;AACA;AACA,YAAY,4FAAqD;AACjE,YAAY,iFAA0C;AACtD;AACA,qCAAqC,iFAA0C;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,yBAAyB;AACxC,eAAe,EAAE;AACjB,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C;AACA;AACA;AACA;AACA,gBAAgB,6EAAsC;AACtD;AACA,yCAAyC,2EAA0B;AACnE;AACA;AACA;AACA,gBAAgB,4FAAqD;AACrE,gBAAgB,iFAA0C;AAC1D;AACA,yCAAyC,iFAA0C;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,4DAAS,IAAI,kFAA2C;AAC9F;AACA,4CAA4C,mFAA4C;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,4DAAS;AACnD;AACA;AACA;AACA,0CAA0C,4DAAS;AACnD;AACA;AACA;AACA,0CAA0C,iEAAc;AACxD;AACA;AACA;AACA,0CAA0C,iEAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,oBAAoB,EAAC;AACpC,0C;;;;;;;;;;;;;;;;;;;;;ACjlBA,CAAsD;AACU;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,uBAAuB,IAAI,2BAA2B,KAAK,2BAA2B;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,6DAAuB,0BAA0B,6DAAuB;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,6DAAuB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oDAAS,YAAY,oDAAS;AAC9D;AACA,2BAA2B,oDAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,6DAAuB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oDAAS,YAAY,oDAAS;AAC9D;AACA,2BAA2B,oDAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,+BAA+B;AAC5E,yDAAyD,uCAAuC;AAChG;AACA,CAAC;AACD,iEAAe,sBAAsB,EAAC;AACtC,kD;;;;;;;;;;;;;;;;;;;;;;AChLA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACuC;AACC;AACH;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,kCAAkC,kBAAkB;AACpD,mCAAmC,gBAAgB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,8CAAG;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA,2BAA2B,aAAa;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA,gBAAgB,gDAAI;AACpB;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,6BAA6B,gDAAI;AACjC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,eAAe,gDAAI;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,oDAAO;AACT,iEAAe,QAAQ,EAAC;AACxB,oC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5SA;AACA;AACA;AACA;AACA;AACO;AACA;AACA;AACP;AACA;AACA;AACA,WAAW,2CAA2C;AACtD;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjDA,CAAwC;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;;AAEnC,MAAM,kDAAmB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY,+CAAgB;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEA,YAAY,+CAAgB;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,MAAM;AACjB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,cAAc;AACzB,aAAa,KAAK;AAClB;;AAEO;AACP,wBAAwB,kDAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;;AAExD;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,KAAK;AACjB,YAAY,aAAa;AACzB,YAAY,KAAK;AACjB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,KAAK;AACjB,YAAY,aAAa;AACzB,YAAY,KAAK;AACjB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,YAAY,KAAK;AACjB;;AAEO;AACP,oBAAoB,kDAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,MAAM;AACjB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,MAAM;AACjB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB;AACA,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,+CAAgB,+BAA+B,+CAAgB,+BAA+B,+CAAgB;AAC/I;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,uEAAuE,+CAAgB,yEAAyE,+CAAgB,yEAAyE,+CAAgB,yEAAyE,+CAAgB,yEAAyE,+CAAgB,yEAAyE,+CAAgB;AAC/zC;AACA;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO,mB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrxDP,CAAwC;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;;AAEnC,MAAM,kDAAmB;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,UAAU,8CAAe;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,cAAc;AACzB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;;AAE5C;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA,8BAA8B,+CAAgB,qEAAqE,+CAAgB;AACnI;AACA;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC,G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/mBD,CAAwC;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;;AAEnC,MAAM,kDAAmB;AACzB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,UAAU,8CAAe;AACzB,UAAU,8CAAe;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,aAAa;;AAEb;AACA;AACA,qBAAqB;;AAErB;AACA;AACA,qDAAqD;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,aAAa;;AAEb;AACA;AACA,qBAAqB;;AAErB;AACA;AACA,qDAAqD;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,aAAa;;AAEb;AACA;AACA,qBAAqB;;AAErB;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB;AACxN;AACA;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC,G;;;;;;;;;;;;;AClxBD;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,qBAAqB;AACrB;AACA,wBAAwB;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,kCAAkC;AAClC;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA,6BAA6B;AAC7B;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,mCAAmC;AACnC,qBAAqB;AACrB;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,yBAAyB;AACzB,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,gDAAgD;AAChD;AACA;;AAEA;AACA,MAAM,IAA2C,EAAE,mCAAO,YAAY,qBAAqB;AAAA,kGAAC;AAC5F;AACA,MAAM,IAA8B,EAAE,oBAAoB;AAC1D;AACA,OAAO,EAAsE;AAC7E;AACA,MAAM,IAA6B;AACnC;AACA;;AAEA,CAAC;;;;;;;;;;;;;;;;;;;;ACxdD,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC,E;;;;;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;;AAEA;AACA,C;;;;;;;;;;;;;;;;;;;;ACbA,CAAqC;AACrC;AACA;AACA;AACA;;AAEA;;AAEA,eAAe,SAAS;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA,ygBAAygB;AACzgB;AACA;AACA;AACA;;AAEA,OAAO,qDAAQ;AACf;AACA;;AAEA;AACA;;AAEA,iEAAe,SAAS,E;;;;;;;;;;;;;;;;;;;;;AC7BxB,CAA2B;AACY;AACvC;AACA;AACA;;AAEA;;AAEA,cAAc;;;AAGd;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA;;AAEA;AACA,sDAAsD,4CAAG;;AAEzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA,uEAAuE;AACvE;;AAEA,2EAA2E;;AAE3E,6DAA6D;;AAE7D;AACA;AACA,GAAG;AACH;;;AAGA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;;AAEA;AACA;AACA,uBAAuB;;AAEvB,0BAA0B;;AAE1B;AACA;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA,sBAAsB;;AAEtB,mCAAmC;;AAEnC,6BAA6B;;AAE7B,iCAAiC;;AAEjC,2BAA2B;;AAE3B,iBAAiB,OAAO;AACxB;AACA;;AAEA,gBAAgB,sDAAS;AACzB;;AAEA,iEAAe,EAAE,E;;;;;;;;;;;;;;;;;;;;AC9FjB,CAA+B;;AAE/B;AACA,qCAAqC,mDAAU;AAC/C;;AAEA,iEAAe,QAAQ,E;;;;;;UCNvB;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCrBA;WACA;WACA;WACA;WACA;WACA,gCAAgC,YAAY;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,wCAAwC,yCAAyC;WACjF;WACA;WACA,E;;;;;WCPA,sF;;;;;WCAA;WACA;WACA;WACA,sDAAsD,kBAAkB;WACxE;WACA,+CAA+C,cAAc;WAC7D,E;;;;UCNA;UACA;UACA;UACA","file":"urpflanze-light.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Urpflanze\"] = factory();\n\telse\n\t\troot[\"Urpflanze\"] = factory();\n})(window, function() {\nreturn ","/**\n * Convert color to IConvertedColor\n * Supported format: 'hsla?' 'rgba?' 'hex{3,8}' number (0xFFFFFF[FF])\n *\n * @internal\n * @ignore\n * @param {(string | number)} color\n * @returns {(IConvertedColor | undefined)}\n */\nexport function parseColorAndConvert(color) {\n var parsed = parseColor(color);\n if (parsed) {\n if (parsed.type === 'hsl') {\n var _a = hslToRgb(parsed.a, parsed.b, parsed.c), r = _a[0], g = _a[1], b = _a[2];\n return {\n r: r,\n g: g,\n b: b,\n h: parsed.a,\n s: parsed.b,\n l: parsed.c,\n alpha: parsed.alpha,\n };\n }\n else {\n var _b = rgbToHsl(parsed.a, parsed.b, parsed.c), h = _b[0], s = _b[1], l = _b[2];\n return {\n h: h,\n s: s,\n l: l,\n r: parsed.a,\n g: parsed.b,\n b: parsed.c,\n alpha: parsed.alpha,\n };\n }\n }\n}\n/**\n * Convert color to IColor\n * Supported format: 'hsla?' 'rgba?' 'hex{3,8}' number (0xFFFFFF[FF])\n *\n * @internal\n * @ignore\n * @param {(string | number)} color\n * @returns {(IColor | undefined)}\n */\nexport function parseColor(color) {\n if (typeof color === 'number') {\n if (color > 0xffffff) {\n return {\n type: 'rgb',\n a: (color >> 24) & 255,\n b: (color >> 16) & 255,\n c: (color >> 8) & 255,\n alpha: (color & 255) / 255,\n };\n }\n else {\n return { type: 'rgb', a: (color >> 16) & 255, b: (color >> 8) & 255, c: color & 255, alpha: 1 };\n }\n }\n color = color.replace(/\\s/g, '');\n var match = /^#([0-9a-f]{3,8})$/i.exec(color);\n if (match) {\n var hex = match[1];\n if (hex.length === 3) {\n return {\n type: 'rgb',\n a: parseInt(hex[0] + hex[0], 16),\n b: parseInt(hex[1] + hex[1], 16),\n c: parseInt(hex[2] + hex[2], 16),\n alpha: 1,\n };\n }\n else {\n return {\n type: 'rgb',\n a: parseInt(hex[0] + hex[1], 16),\n b: parseInt(hex[2] + hex[3], 16),\n c: parseInt(hex[4] + hex[5], 16),\n alpha: hex.length > 6 ? parseInt(hex.substring(6), 16) / 255 : 1,\n };\n }\n }\n match = /^((hsl|rgb)a?)\\((\\d+),(\\d+)%?,(\\d+)%?,?(.+)?\\)$/i.exec(color);\n if (match) {\n var _a = match, type = _a[2], a = _a[3], b = _a[4], c = _a[5], alpha = _a[6];\n return {\n type: type,\n a: +a,\n b: +b,\n c: +c,\n alpha: alpha ? +alpha : 1,\n };\n }\n}\n/**\n * Convert hsl color to rgb\n *\n * @internal\n * @ignore\n * @param {number} h\n * @param {number} s\n * @param {number} l\n * @returns {[number, number, number]}\n */\nexport function hslToRgb(h, s, l) {\n h /= 360;\n s /= 100;\n l /= 100;\n var r, g, b;\n if (s == 0) {\n r = g = b = l; // achromatic\n }\n else {\n var hue2rgb = function (p, q, t) {\n t += t < 0 ? 1 : t > 1 ? -1 : 0;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n };\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n return [(0.5 + r * 255) << 0, (0.5 + g * 255) << 0, (0.5 + b * 255) << 0];\n}\n/**\n * Convert rbg to hsl\n *\n * @internal\n * @ignore\n * @param {number} r\n * @param {number} g\n * @param {number} b\n * @returns {[number, number, number]} (0-360, 0-100, 0-100)\n */\nexport function rgbToHsl(r, g, b) {\n r /= 255;\n g /= 255;\n b /= 255;\n var max = Math.max(r, g, b), min = Math.min(r, g, b);\n var h, s;\n var l = (max + min) / 2;\n if (max == min) {\n h = s = 0; // achromatic\n }\n else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h = h / 6;\n }\n return [(0.5 + h * 360) << 0, (0.5 + s * 100) << 0, (0.5 + l * 100) << 0];\n}\n//# sourceMappingURL=Color.js.map","import SimplexNoise from 'simplex-noise';\nimport { ERepetitionType, IRepetition } from \"./core/types/scene-child\";\n// import SceneChild from '@core/SceneChild'\nimport { vec2 } from 'gl-matrix';\n// import Scene from '@core/Scene'\n/**\n * @ignore\n */\nexport var parseFunction = {\n suffix: '$fn:',\n parse: function (data) {\n return typeof data === 'function' && data.name !== 'SimpleAnimation' ? parseFunction.suffix + data.toString() : data;\n },\n unparse: function (data) {\n return typeof data === 'string' && data.indexOf(parseFunction.suffix) === 0\n ? eval(data.substr(parseFunction.suffix.length))\n : data;\n },\n};\n/**\n * Create Cancellable Promise\n *\n * @ignore\n * @template T\n * @param {Promise} promise\n * @returns {ICancelablePromise}\n */\nexport function cancelablePromise(promise) {\n var resolved = false;\n var canceled = false;\n var wrappedPromise = new Promise(function (resolve, reject) {\n promise\n .then(function (val) {\n resolved = true;\n canceled ? reject('canceled') : resolve(val);\n })\n .catch(function (error) {\n resolved = true;\n canceled ? reject('canceled') : reject(error);\n });\n });\n return {\n promise: wrappedPromise,\n resolved: function () { return resolved; },\n canceled: function () { return canceled; },\n cancel: function () {\n canceled = true;\n },\n };\n}\n// isDef: (object: any): boolean => typeof object !== 'undefined' && object !== null,\n/**\n * Get current timestamp in milliseconds\n *\n * @ignore\n * @returns {number}\n */\nexport function now() {\n return performance.now();\n}\n// aOr: (...args: Array): any => {\n// \tfor (let i = 0; i < args.length; i++) if (Utilities.isDef(args[i])) return args[i]\n// },\n/**\n * Convert number from radians to degrees\n *\n * @category Utilities\n *\n * @example\n * ```javascript\n * Urpflanze.toDegrees(Math.PI) // 180\n * ```\n *\n * @param {number} radians\n * @returns {number}\n */\nexport function toDegrees(radians) {\n return (radians * 180) / Math.PI;\n}\n/**\n * Convert angle from degrees to radians\n * @example\n * ```javascript\n * Urpflanze.toRadians(180) // 3.141592653589793\n * ```\n *\n * @category Utilities\n * @param {number} degrees\n * @returns {number}\n */\nexport function toRadians(degrees) {\n return (degrees * Math.PI) / 180;\n}\n// perf: (name: string, callback: any, log: boolean = false): number => {\n// \tconst t1 = now()\n// \tcallback()\n// \tconst t2 = now()\n// \tlog && console.log('perf ' + name + ': ' + (t2 - t1))\n// \treturn t2 - t1\n// }\n/**\n * Force value to array\n *\n * @ignore\n * @param {(number | Array)} t\n * @returns {Array}\n */\nexport function toArray(t) {\n return Array.isArray(t) ? t : [t, t];\n}\n/**\n * Linear interpolation from `a` when `i` as 0 an `b` when `i' as 1\n *\n * @category Utilities\n * @param {number} a\n * @param {number} b\n * @param {number} i\n * @returns {number}\n */\nexport function lerp(a, b, i) {\n return (1 - i) * a + i * b;\n}\n/**\n * Return number between min and max\n *\n * @category Utilities\n * @example\n * ```javascript\n * Urpflanze.clamp(0, 1, 1.2) // 1\n * Urpflanze.clamp(0, 1, -2) // 0\n * ```\n * @param {number} min\n * @param {number} max\n * @param {number} value\n * @returns {number}\n */\nexport function clamp(min, max, value) {\n return value <= min ? min : value >= max ? max : value;\n}\n/**\n * Map number between refMin e refMax from min and max\n *\n * @category Utilities\n *\n * @example\n * ```javascript\n * Urpflanze.relativeClamp(0, 1, 0.5, 100, 200) // 150\n * ```\n *\n * @param {number} refMin\n * @param {number} refMax\n * @param {number} value\n * @param {number} toMin\n * @param {number} toMax\n * @returns {number}\n */\nexport function relativeClamp(refMin, refMax, value, toMin, toMax) {\n return clamp(toMin, toMax, ((value - refMin) / (refMax - refMin)) * (toMax - toMin) + toMin);\n}\n/**\n * @internal\n * @ignore\n */\nvar noises = {\n random: new SimplexNoise(Math.random),\n};\n/**\n * SimplexNoise\n * Use 'random' as seed property for random seed.\n * Return value between -1 and 1\n *\n * @category Utilities\n *\n * @param {string} [seed='random']\n * @param {number} [x=0]\n * @param {number} [y=0]\n * @param {number} [z=0]\n * @returns {number}\n */\nexport function noise(seed, x, y, z) {\n if (seed === void 0) { seed = 'random'; }\n if (x === void 0) { x = 0; }\n if (y === void 0) { y = 0; }\n if (z === void 0) { z = 0; }\n if (typeof noises[seed] === 'undefined') {\n noises[seed] = new SimplexNoise(seed);\n }\n return noises[seed].noise3D(x, y, z);\n}\n/**\n * Return angle (atan) from offset (or center) for matrix repetition.\n * Offset is array between [-1, -1] and [1, 1].\n * The return value is between -Math.PI / 2 and Math.PI / 2\n *\n * @category Utilities\n *\n * @param {IRepetition} repetition\n * @param {vec2} offsetFromCenter\n * @returns {number}\n */\nexport function angleFromRepetition(repetition, offsetFromCenter) {\n if (offsetFromCenter === void 0) { offsetFromCenter = [0, 0]; }\n if (repetition.type == ERepetitionType.Matrix) {\n var centerMatrix = vec2.fromValues((repetition.col.count - 1) / 2, (repetition.row.count - 1) / 2);\n centerMatrix[0] += centerMatrix[0] * offsetFromCenter[0];\n centerMatrix[1] += centerMatrix[1] * offsetFromCenter[1];\n var x = repetition.col.index - 1 - centerMatrix[0];\n var y = repetition.row.index - 1 - centerMatrix[1];\n return x === 0 ? 0 : Math.atan(y / x);\n }\n return (repetition.angle - Math.PI) / 2;\n}\n/**\n * Return angle (atan2, 4 quadrants) from offset (or center) for matrix repetition.\n * Offset is array between [-1, -1] and [1, 1].\n * The return value is between -Math.PI an Math.PI\n *\n * @category Utilities\n *\n * @param {IRepetition} repetition\n * @param {vec2} offsetFromCenter\n * @returns {number}\n */\nexport function angle2FromRepetition(repetition, offsetFromCenter) {\n if (offsetFromCenter === void 0) { offsetFromCenter = [0, 0]; }\n if (repetition.type == ERepetitionType.Matrix) {\n var centerMatrix = vec2.fromValues((repetition.col.count - 1) / 2, (repetition.row.count - 1) / 2);\n centerMatrix[0] += centerMatrix[0] * offsetFromCenter[0];\n centerMatrix[1] += centerMatrix[1] * offsetFromCenter[1];\n var x = repetition.col.index - 1 - centerMatrix[0];\n var y = repetition.col.index - 1 - centerMatrix[1];\n return x === 0 ? 0 : Math.atan2(y, x);\n }\n return repetition.angle - Math.PI;\n}\n/**\n * Return distance from offset (or center) for matrix repetition.\n * The return value is between 0 and 1\n *\n * @category Utilities\n *\n * @param {IRepetition} repetition\n * @param {vec2} offsetFromCenter offset relative to distance prop\n * @returns {number}\n */\nexport function distanceFromRepetition(repetition, offsetFromCenter) {\n if (offsetFromCenter === void 0) { offsetFromCenter = [0, 0]; }\n if (repetition.type == ERepetitionType.Matrix) {\n var centerMatrix = vec2.fromValues(0.5, 0.5);\n centerMatrix[0] += centerMatrix[0] * offsetFromCenter[0];\n centerMatrix[1] += centerMatrix[1] * offsetFromCenter[1];\n var current = vec2.fromValues(repetition.col.offset - 0.5 / repetition.col.count, repetition.row.offset - 0.5 / repetition.row.count);\n return vec2.distance(current, centerMatrix);\n }\n return 1;\n}\n// /**\n// * Get value percentage of scene width.\n// *\n// * @param {number} percentage\n// * @param {SceneChild} sceneChild\n// * @returns {number}\n// */\n// percW: (percentage: number, sceneChild: SceneChild | Scene): number => {\n// \tif (sceneChild instanceof Scene) return (sceneChild.width * percentage) / 100\n// \treturn sceneChild && sceneChild.scene ? (sceneChild.scene.width * percentage) / 100 : percentage\n// },\n// /**\n// * Get value percentage of scene height.\n// *\n// * @param {number} percentage\n// * @param {SceneChild} sceneChild\n// * @returns {number}\n// */\n// percH: (percentage: number, sceneChild: SceneChild | Scene): number => {\n// \tif (sceneChild instanceof Scene) return (sceneChild.height * percentage) / 100\n// \treturn sceneChild && sceneChild.scene ? (sceneChild.scene.height * percentage) / 100 : percentage\n// },\n//# sourceMappingURL=Utilites.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport Scene from \"./Scene\";\nimport SceneChild from \"./SceneChild\";\nimport ShapeBase from \"./shapes/ShapeBase\";\nimport Bounding from \"./math/bounding\";\n/**\n * A SceneChild container, propagates properties to children\n *\n * @order 3\n * @category Core.Scene\n * @extends {SceneChild}\n * @example\n * ```javascript\n * // Group example\n *\n * const rect = new Urpflanze.Rect({\n * \tdistance: 100 // <- if a property is set the group will not overwrite it\n * })\n * const group = new Urpflanze.Group({\n * \trepetitions: 3,\n * \tdistance: 200\n * })\n *\n * group.add(rect)\n * group.add(new Urpflanze.Triangle())\n * ```\n * @class Group\n */\nvar Group = /** @class */ (function (_super) {\n __extends(Group, _super);\n /**\n * Creates an instance of Group\n *\n * @param {ISceneChildSettings} [settings={}]\n * @memberof Group\n */\n function Group(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = 'Group';\n _this = _super.call(this, settings) || this;\n _this.children = [];\n ['id', 'name', 'data', 'order', 'type'].forEach(function (prop) {\n if (prop in settings)\n delete settings[prop];\n });\n _this.props = settings;\n return _this;\n }\n /**\n * Check group has static children\n *\n * @returns {boolean}\n * @memberof Group\n */\n Group.prototype.isStatic = function () {\n var children = this.children;\n for (var i = 0, len = children.length; i < len; i++)\n if (!children[i].isStatic())\n return false;\n return true;\n };\n /**\n * Check group has static children indexed\n *\n * @returns {boolean}\n * @memberof Group\n */\n Group.prototype.isStaticIndexed = function () {\n var children = this.children;\n for (var i = 0, len = children.length; i < len; i++)\n if (!children[i].isStaticIndexed())\n return false;\n return true;\n };\n /**\n * Add item to Group\n *\n * @param {Array} items\n * @memberof Group\n */\n Group.prototype.add = function () {\n var _this = this;\n var items = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n items[_i] = arguments[_i];\n }\n var _loop_1 = function (i, len) {\n var item = items[i];\n var rawItemProps = item.getProps();\n Object.keys(this_1.props).forEach(function (propKey) {\n if (typeof rawItemProps[propKey] === 'undefined')\n item.setProp(propKey, _this.props[propKey]);\n });\n item.order =\n typeof item.order !== 'undefined'\n ? item.order\n : this_1.children.length > 0\n ? Math.max.apply(this_1, this_1.children.map(function (e) { return e.order || 0; })) + 1\n : 0;\n this_1.scene && Scene.propagateToChilden(item, this_1.scene);\n this_1.children.push(item);\n };\n var this_1 = this;\n for (var i = 0, len = items.length; i < len; i++) {\n _loop_1(i, len);\n }\n this.sortChildren();\n };\n /**\n * Sort children\n *\n * @memberof Group\n */\n Group.prototype.sortChildren = function () {\n this.children.sort(function (a, b) { return a.order - b.order; });\n this.children = this.children.map(function (child, index) {\n child.order = index;\n return child;\n });\n this.clearBuffer(true);\n };\n /**\n * Return shape children\n *\n * @returns {Array}\n * @memberof Group\n */\n Group.prototype.getChildren = function () {\n return this.children;\n };\n /**\n * Find scene child from id or name\n *\n * @param {number | string} idOrName\n * @returns {(SceneChild | null)}\n * @memberof Group\n */\n Group.prototype.find = function (idOrName) {\n if (this.id === idOrName || this.name === idOrName)\n return this;\n var children = this.getChildren();\n for (var i = 0, len = children.length; i < len; i++) {\n var result = children[i].find(idOrName);\n if (result !== null)\n return result;\n }\n return null;\n };\n /**\n * Get item from group\n *\n * @param {number} index\n * @returns {(SceneChild | null)}\n * @memberof Group\n */\n Group.prototype.get = function (index) {\n return index >= 0 && index < this.children.length ? this.children[index] : null;\n };\n /**\n * Remove item from group\n *\n * @param {number} index\n * @returns {(false | Array)}\n * @memberof Group\n */\n Group.prototype.remove = function (index) {\n if (index >= 0 && index < this.children.length) {\n var removed = this.children.splice(index, 1);\n this.clearBuffer(true);\n return removed;\n }\n return false;\n };\n /**\n * Remove from id\n *\n * @param {number} id\n * @memberof Scene\n */\n Group.prototype.removeFromId = function (id) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i].id == id) {\n this.children.splice(i, 1);\n return this.clearBuffer(true);\n }\n }\n };\n /**\n * Generate children buffers\n *\n * @param {number} generateId\n * @param {boolean} [bDirectSceneChild=false]\n * @param {ISceneChildPropArguments} [parentPropArguments]\n * @memberof Group\n */\n Group.prototype.generate = function (generateId, bDirectSceneChild, parentPropArguments) {\n if (bDirectSceneChild === void 0) { bDirectSceneChild = false; }\n this.children.forEach(function (item) { return item.generate(generateId, bDirectSceneChild, parentPropArguments); });\n };\n /**\n * Sum the children bounding\n *\n * @return {IShapeBounding}\n */\n Group.prototype.getBounding = function () {\n var boundings = [];\n var bounding = Bounding.empty();\n if (this.children.length > 0) {\n this.children.forEach(function (item) { return boundings.push(item.getBounding()); });\n for (var i = 0, len = this.children.length; i < len; i++) {\n bounding.x = bounding.x > boundings[i].x ? boundings[i].x : bounding.x;\n bounding.y = bounding.y > boundings[i].y ? boundings[i].y : bounding.y;\n bounding.width = bounding.width < boundings[i].width ? boundings[i].width : bounding.width;\n bounding.height = bounding.height < boundings[i].height ? boundings[i].height : bounding.height;\n }\n bounding.cx = bounding.x + bounding.width / 2;\n bounding.cy = bounding.y + bounding.height / 2;\n }\n return bounding;\n };\n /**\n * Chear children buffer\n *\n * @param {boolean} [bClearIndexed=false]\n * @param {boolean} [bPropagateToParents=false]\n * @memberof Group\n */\n Group.prototype.clearBuffer = function (bClearIndexed, bPropagateToParents) {\n if (bClearIndexed === void 0) { bClearIndexed = false; }\n if (bPropagateToParents === void 0) { bPropagateToParents = true; }\n this.children.forEach(function (item) { return item.clearBuffer(bClearIndexed, false); });\n if (this.scene && bPropagateToParents) {\n var parents = this.scene.getParentsOfSceneChild(this);\n parents.length > 0 && parents[parents.length - 1].clearBuffer(bClearIndexed, bPropagateToParents /* true */);\n }\n // if (bPropagateToParents && this.scene)\n // {\n // const parents = this.scene.getParentsOfSceneChild(this)\n // parents.length > 0 && parents[parents.length - 1].clearBuffer(bClearIndexed, true, false)\n // }\n // if (bPropagateToChildren)\n // {\n // this.children.forEach(sceneChild => sceneChild.clearBuffer(bClearIndexed, false, true))\n // }\n };\n /**\n * Set a single or multiple props\n *\n * @abstract\n * @param {(keyof ISceneChildProps | ISceneChildProps)} key\n * @param {*} [value]\n * @memberof SceneChild\n */\n Group.prototype.setProp = function (key, value) {\n var _this = this;\n if (typeof key === 'object')\n Object.keys(key).forEach(function (k) { return (_this.props[k] = key[k]); });\n else\n this.props[key] = value;\n this.children.forEach(function (item) { return item.setProp(key, value); });\n };\n /**\n * Set a single or multiple props\n *\n * @param {(keyof ISceneChildProps | ISceneChildProps)} key\n * @param {*} [value]\n * @memberof ShapeBase\n */\n Group.prototype.setPropUnsafe = function (key, value) {\n _super.prototype.setPropUnsafe.call(this, key, value);\n this.children.forEach(function (item) { return item.setPropUnsafe(key, value); });\n };\n /**\n * Return length of buffer\n *\n * @param {ISceneChildPropArguments} propArguments\n * @returns {number}\n * @memberof Group\n */\n Group.prototype.getBufferLength = function (propArguments) {\n return this.children.map(function (sceneChild) { return sceneChild.getBufferLength(propArguments); }).reduce(function (p, c) { return p + c; }, 0);\n };\n /**\n * return a single buffer binded from children\n *\n * @returns {Float32Array}\n * @memberof Group\n */\n Group.prototype.getBuffer = function () {\n var buffers = this.children\n .map(function (item) { return item.getBuffer(); })\n .filter(function (b) { return b !== undefined; });\n var size = buffers.reduce(function (currLength, buffer) { return currLength + buffer.length; }, 0);\n if (size > 0) {\n var result = new Float32Array(size);\n result.set(buffers[0], 0);\n for (var i = 1, offset = 0, len = buffers.length; i < len; i++) {\n offset += buffers[i - 1].length;\n result.set(buffers[i], offset);\n }\n return result;\n }\n return ShapeBase.EMPTY_BUFFER;\n };\n /**\n * return a single buffer binded from children\n *\n * @returns {(Array | undefined)}\n * @memberof Group\n */\n Group.prototype.getIndexedBuffer = function () {\n var indexed = this.children.map(function (item) { return item.getIndexedBuffer(); }).filter(function (b) { return b !== undefined; });\n return [].concat.apply([], indexed);\n };\n /**\n * Call strem on children\n *\n * @param {(streamArguments: IStreamArguments) => void} callback\n * @memberof Group\n */\n Group.prototype.stream = function (callback) {\n this.children.forEach(function (item) { return item.stream(callback); });\n };\n return Group;\n}(SceneChild));\nexport default Group;\n//# sourceMappingURL=Group.js.map","import SceneChild from \"./SceneChild\";\nimport Group from \"./Group\";\nimport Shape from \"./shapes/Shape\";\n/**\n * Container for all SceneChild.\n * The main purpose is to manage the drawing order and update the child buffers\n *\n * @order 1\n * @category Core.Scene\n * @class Scene\n */\nvar Scene = /** @class */ (function () {\n /**\n * Creates an instance of Scene.\n * You can see the default values in the property definitions\n */\n function Scene(settings) {\n if (settings === void 0) { settings = {}; }\n /**\n * Logical number, the drawer will take care of defining the unit of measure\n */\n this.width = 400;\n /**\n * Logical number, the drawer will take care of defining the unit of measure\n */\n this.height = 400;\n /**\n * Default background color (black)\n */\n this.background = 'hsla(0, 0%, 0%, 1)';\n /**\n * Default ScenePrimitive stroke color (white)\n */\n this.color = 'hsla(0, 0%, 100%, 1)';\n /**\n * Current time\n */\n this.currentTime = 0;\n if (typeof settings.width !== 'undefined')\n this.width = settings.width;\n if (typeof settings.height !== 'undefined')\n this.height = settings.height;\n if (typeof settings.background !== 'undefined')\n this.background = settings.background;\n if (typeof settings.color !== 'undefined')\n this.color = settings.color;\n this.children = [];\n this.center = [this.width / 2, this.height / 2];\n }\n /**\n * Return width percentage\n *\n * @param {number} [percentage=100]\n * @returns {number}\n */\n Scene.prototype.getWidth = function (percentage) {\n if (percentage === void 0) { percentage = 100; }\n return (this.width * percentage) / 100;\n };\n /**\n * Return height percentage\n *\n * @param {number} [percentage=100]\n * @returns {number}\n */\n Scene.prototype.getHeight = function (percentage) {\n if (percentage === void 0) { percentage = 100; }\n return (this.height * percentage) / 100;\n };\n /**\n * Resize the scene size\n *\n * @param {number} width\n * @param {number} [height=width]\n * @memberof Scene\n */\n Scene.prototype.resize = function (width, height) {\n if (height === void 0) { height = width; }\n this.width = width;\n this.height = height;\n this.center = [this.width / 2, this.height / 2];\n this.children.forEach(function (sceneChild) { return sceneChild.clearBuffer(true, false); });\n };\n /**\n * Update all children, generate a streamable buffer for drawing\n *\n * @param {number} [atTime] time in ms\n * @memberof Scene\n */\n Scene.prototype.update = function (atTime) {\n this.currentTime = atTime;\n for (var i = 0, len = this.children.length; i < len; i++) {\n this.children[i].generate(this.currentTime, true);\n }\n };\n /**\n * Traverse the child buffer and use it with callback\n *\n * @param {(streamArguments: IStreamArguments) => void} callback\n * @memberof Scene\n */\n Scene.prototype.stream = function (callback) {\n this.children.forEach(function (sceneChild) { return sceneChild.stream(callback); });\n };\n /*\n |--------------------------------------------------------------------------\n | SceneChild\n |--------------------------------------------------------------------------\n */\n /**\n * Return a list of children\n *\n * @returns {Array}\n * @memberof Scene\n */\n Scene.prototype.getChildren = function () {\n return this.children;\n };\n /**\n * Add SceneChild to Scene, pass `order` as last parameter for drawing priorities\n *\n * @param {Array} items\n * @param {number} [order]\n * @memberof Scene\n */\n Scene.prototype.add = function () {\n var items = []; /**, order: number */\n for (var _i = 0 /**, order: number */; _i < arguments.length /**, order: number */; _i++ /**, order: number */) {\n items[_i] = arguments[_i]; /**, order: number */\n }\n var order = typeof items[items.length - 1] === 'number' ? items[items.length - 1] : undefined;\n var len = items.length - (typeof order === 'undefined' ? 0 : 1);\n for (var i = 0; i < len; i++) {\n var item = items[i];\n item.order =\n typeof order !== 'undefined'\n ? order + i\n : typeof item.order !== 'undefined'\n ? item.order\n : this.children.length > 0\n ? Math.max.apply(this, this.children.map(function (e) { return e.order || 0; })) + 1\n : 0;\n Scene.propagateToChilden(item, this);\n this.children.push(item);\n item.clearBuffer(true, false);\n }\n this.sortChildren();\n };\n /**\n * Sort children by order\n *\n * @memberof Scene\n */\n Scene.prototype.sortChildren = function () {\n this.children.sort(function (a, b) { return a.order - b.order; });\n this.children = this.children.map(function (child, index) {\n child.order = index;\n return child;\n });\n };\n /**\n * Find sceneChild from id or name in the whole scene\n *\n * @param {string | number} idOrName\n * @returns {(SceneChild | null)}\n * @memberof Scene\n */\n Scene.prototype.find = function (idOrName) {\n var children = this.getChildren();\n for (var i = 0, len = children.length; i < len; i++) {\n var result = children[i].find(idOrName);\n if (result !== null)\n return result;\n }\n return null;\n };\n /**\n * Get shape by index\n *\n * @param {number} index\n * @returns {(SceneChild | null)}\n * @memberof Scene\n */\n Scene.prototype.get = function (index) {\n return index >= 0 && index < this.children.length ? this.children[index] : null;\n };\n /**\n * Remove a shape by index\n *\n * @param {number} index\n * @memberof Scene\n */\n Scene.prototype.remove = function (index) {\n index >= 0 && index < this.children.length && this.children.splice(index, 1);\n };\n /**\n * Removes all children\n *\n * @memberof Scene\n */\n Scene.prototype.removeChildren = function () {\n this.children = [];\n };\n /**\n * Remove sceneChild by id or name\n *\n * @param {number | number} idOrName\n * @memberof Scene\n */\n Scene.prototype.removeFromId = function (idOrName) {\n for (var i = 0, len = this.children.length; i < len; i++)\n if (this.children[i].id === idOrName || this.children[i].name === idOrName) {\n this.children.splice(i, 1);\n return;\n }\n };\n /**\n * Return true if sceneChild is direct children\n *\n * @param {SceneChild} sceneChild\n * @returns {boolean}\n * @memberof Scene\n */\n Scene.prototype.isFirstLevelChild = function (sceneChild) {\n for (var i = 0, len = this.children.length; i < len; i++)\n if (this.children[i].id === sceneChild.id)\n return true;\n var parents = this.getParentsOfSceneChild(sceneChild);\n return parents.length === 1 && parents[0] instanceof Group;\n };\n /**\n * Returns the list of sceneChild hierarchy starting from the scene\n *\n * @param {SceneChild} sceneChild\n * @returns {Array}\n * @memberof Scene\n */\n Scene.prototype.getParentsOfSceneChild = function (sceneChild) {\n var result = Scene.getParentsOfSceneChild(this, sceneChild);\n if (result) {\n result.splice(0, 1);\n return result;\n }\n return [];\n };\n /**\n * Returns the list of sceneChild hierarchy starting from the scene\n *\n * @static\n * @param {(Scene | SceneChild)} current\n * @param {SceneChild} sceneChild\n * @param {(Array)} [parents=[]]\n * @returns {(Array | null)}\n * @memberof Scene\n */\n Scene.getParentsOfSceneChild = function (current, sceneChild, parents) {\n if (parents === void 0) { parents = []; }\n var result;\n if (current instanceof SceneChild) {\n if (current.id == sceneChild.id)\n return parents;\n if (current instanceof Shape && current.shape) {\n var tmpParents = parents.slice();\n tmpParents.push(current);\n if ((result = Scene.getParentsOfSceneChild(current.shape, sceneChild, tmpParents)))\n return result;\n }\n }\n if (current instanceof Scene || current instanceof Group) {\n var children = current.getChildren();\n parents.push(current);\n for (var i = 0, len = children.length; i < len; i++) {\n var child = children[i];\n if ((result = Scene.getParentsOfSceneChild(child, sceneChild, parents)))\n return result;\n }\n parents.pop();\n }\n return null;\n };\n /**\n * Walk through the scene\n *\n * @static\n * @param {SceneChild} callbackk\n * @param {(Scene | SceneChild)} current\n * @memberof Scene\n */\n Scene.walk = function (callback, current) {\n if (current instanceof SceneChild) {\n if (callback(current) === false)\n return false;\n if (current instanceof Shape && current.shape)\n if (Scene.walk(callback, current.shape) === false)\n return false;\n }\n if (current instanceof Scene || current instanceof Group) {\n var children = current.getChildren();\n for (var i = 0, len = children.length; i < len; i++) {\n var child = children[i];\n if (Scene.walk(callback, child) === false)\n return false;\n }\n }\n };\n /**\n * Propagate scene to sceneChild (and children)\n *\n * @static\n * @param {SceneChild} sceneChild\n * @param {Scene} scene\n * @memberof Scene\n */\n Scene.propagateToChilden = function (sceneChild, scene) {\n sceneChild.scene = scene;\n if (sceneChild instanceof Group) {\n sceneChild.getChildren().forEach(function (item) {\n Scene.propagateToChilden(item, scene);\n });\n }\n else if (sceneChild instanceof Shape && sceneChild.shape) {\n sceneChild.shape.scene = scene;\n Scene.propagateToChilden(sceneChild.shape, scene);\n }\n };\n return Scene;\n}());\nexport default Scene;\n//# sourceMappingURL=Scene.js.map","/**\n * Autoincrement sceneChild default id\n *\n * @internal\n * @ignore\n */\nvar __id = 0;\n/**\n * The element to be added into a scene.\n * Preserve props, drawing order, generate and return buffers.\n * The only implementations of this class are Group and ShapeBase\n *\n * @abstract\n * @category Core.Abstract\n * @order 2\n * @class SceneChild\n */\nvar SceneChild = /** @class */ (function () {\n /**\n * Creates an instance of SceneChild.\n * Base values will be assigned in case they are not passed\n *\n * @param {ISceneChildSettings} settings\n */\n function SceneChild(settings) {\n var _a;\n this.id = (_a = settings.id) !== null && _a !== void 0 ? _a : ++__id;\n this.type = settings.type || 'SceneChild';\n this.name = settings.name || this.type + '_' + this.id;\n this.data = settings.data || {};\n this.props = {};\n }\n /**\n * Find this or form or children.\n * Overridden by classes that extend it\n *\n * @param {string | number} idOrName\n * @returns {(SceneChild | null)}\n */\n SceneChild.prototype.find = function (idOrName) {\n if (this.id === idOrName || this.name === idOrName)\n return this;\n return null;\n };\n /**\n * Return the sceneChild properties\n *\n * @returns {ISceneChildProps}\n */\n SceneChild.prototype.getProps = function () {\n return this.props;\n };\n /**\n * Return a sceneChild prop or default value\n *\n * @param {keyof ISceneChildProps} key\n * @param {ISceneChildPropArguments} [propArguments]\n * @param {*} [defaultValue]\n * @returns {*}\n */\n SceneChild.prototype.getProp = function (key, propArguments, defaultValue) {\n var _a;\n return ((_a = this.props[key]) !== null && _a !== void 0 ? _a : defaultValue);\n };\n /**\n * Set a single or multiple props\n *\n * @param {(keyof ISceneChildProps | ISceneChildProps)} key\n * @param {*} [value]\n */\n SceneChild.prototype.setPropUnsafe = function (key, value) {\n var _this = this;\n if (typeof key == 'string')\n this.props[key] = value;\n else\n Object.keys(key).forEach(function (k) {\n return (_this.props[k] = key[k]);\n });\n };\n return SceneChild;\n}());\nexport default SceneChild;\n//# sourceMappingURL=SceneChild.js.map","/**\n * Temporany matrix\n *\n * @internal\n * @ignore\n */\nvar MATRIX = new Array(4);\n/**\n * Vec2 operation\n *\n * @category Core.Utilities\n */\nvar Vec2 = {\n /**\n * Create new vertex\n *\n * @param {Array | number} [x=0]\n * @param {number} [y]\n * @returns {Array}\n */\n create: function (x, y) {\n if (x === void 0) { x = 0; }\n var out = new Array(2);\n if (typeof x === 'number') {\n out[0] = x;\n out[1] = y !== null && y !== void 0 ? y : x;\n }\n else {\n out[0] = x[0];\n out[1] = x[1];\n }\n return out;\n },\n normalize: function (v) {\n var len = Vec2.length(v);\n return len !== 0 ? [v[0] / len, v[1] / len] : [0, 0];\n },\n /**\n * Distance between two points\n *\n * @param {Array} a\n * @param {Array} b\n * @returns {number}\n */\n distance: function (a, b) { return Math.hypot(b[0] - a[0], b[1] - a[1]); },\n /**\n * dot product\n *\n * @param {Array} a\n * @param {Array} b\n * @returns {number}\n */\n dot: function (a, b) { return a[0] * b[0] + a[1] * b[1]; },\n /**\n * length of point\n *\n * @param {Array} vec\n * @returns {number}\n */\n length: function (vec) { return Math.hypot(vec[0], vec[1]); },\n /**\n * angle between two point\n *\n * @param {Array} a\n * @param {Array} b\n * @returns {number}\n */\n angle: function (a, b) {\n a = Vec2.normalize(a);\n b = Vec2.normalize(b);\n return Math.acos(Vec2.dot(a, b));\n },\n /**\n * skewX point\n *\n * @param {Array} vec\n * @param {number} m\n */\n skewX: function (vec, m) {\n vec[0] += Math.tan(m) * vec[1];\n },\n /**\n * skewY point\n *\n * @param {Array} vec\n * @param {number} m\n */\n skewY: function (vec, m) {\n vec[1] += Math.tan(m) * vec[0];\n },\n /**\n * squeezeX point\n *\n * @param {Array} vec\n * @param {number} m\n */\n squeezeX: function (vec, m) {\n vec[1] += vec[1] * (vec[0] * -m);\n },\n /**\n * squeezeY point\n *\n * @param {Array} vec\n * @param {number} m\n */\n squeezeY: function (vec, m) {\n vec[0] += vec[0] * (vec[1] * m);\n },\n /**\n * Rotate point\n *\n * @param {Array} vec\n * @param {Array} MATRIX\n * @param {Array} fromPoint\n * @internal\n */\n rotate: function (vec, MATRIX, fromPoint) {\n var p0 = vec[0] - fromPoint[0];\n var p1 = vec[1] - fromPoint[1];\n vec[0] = p0 * MATRIX[0] + p1 * MATRIX[1] + fromPoint[0];\n vec[1] = p0 * MATRIX[2] + p1 * MATRIX[3] + fromPoint[1];\n },\n /**\n * RotateX point\n *\n * @param {Array} vec\n * @param {Array} fromPoint\n * @param {number} rad\n */\n rotateX: function (vec, fromPoint, rad) {\n MATRIX[0] = 1;\n MATRIX[1] = 0;\n MATRIX[2] = 0;\n MATRIX[3] = Math.cos(rad);\n Vec2.rotate(vec, MATRIX, fromPoint);\n },\n /**\n * RotateY point\n *\n * @param {Array} vec\n * @param {Array} fromPoint\n * @param {number} rad\n */\n rotateY: function (vec, fromPoint, rad) {\n MATRIX[0] = Math.cos(rad);\n MATRIX[1] = 0;\n MATRIX[2] = 0;\n MATRIX[3] = 1;\n Vec2.rotate(vec, MATRIX, fromPoint);\n },\n /**\n * RotateZ point\n *\n * @param {Array} vec\n * @param {Array} fromPoint\n * @param {number} rad\n */\n rotateZ: function (vec, fromPoint, rad) {\n MATRIX[0] = Math.cos(rad);\n MATRIX[1] = -Math.sin(rad);\n MATRIX[2] = Math.sin(rad);\n MATRIX[3] = Math.cos(rad);\n Vec2.rotate(vec, MATRIX, fromPoint);\n },\n /**\n * Translate vertex\n *\n * @param {Array} vec\n * @param {Array} to\n */\n translate: function (vec, to) {\n vec[0] += to[0];\n vec[1] += to[1];\n },\n /**\n * Scale vertex\n *\n * @param {Array} vec\n * @param {Array} to\n */\n scale: function (vec, to) {\n vec[0] *= to[0];\n vec[1] *= to[1];\n },\n /**\n * Scale vertex\n *\n * @param {Array} vec\n * @param {Array} to\n */\n divide: function (vec, to) {\n vec[0] /= to[0];\n vec[1] /= to[1];\n },\n /**\n * Vec to string\n *\n * @param {Array} vec\n * @return {string}\n */\n toString: function (vec) { return \"x: \" + vec[0] + \", y: \" + vec[1]; },\n /**\n * Vertex [0, 0]\n */\n ZERO: Array.from([0, 0]),\n /**\n * Vertex [1, 1]\n */\n ONE: Array.from([1, 1]),\n};\nexport default Vec2;\n//# sourceMappingURL=Vec2.js.map","/**\n * @internal\n * @ignore\n */\nvar Bounding = {\n empty: function () { return ({\n cx: 0,\n cy: 0,\n x: -1,\n y: -1,\n width: 2,\n height: 2,\n }); },\n clear: function (tmpBounding) {\n tmpBounding[0] = undefined;\n tmpBounding[1] = undefined;\n tmpBounding[2] = undefined;\n tmpBounding[3] = undefined;\n },\n add: function (tmpBounding, x, y) {\n if (typeof tmpBounding[0] === 'undefined' || x < tmpBounding[0])\n tmpBounding[0] = x;\n if (typeof tmpBounding[2] === 'undefined' || x > tmpBounding[2])\n tmpBounding[2] = x;\n if (typeof tmpBounding[1] === 'undefined' || y < tmpBounding[1])\n tmpBounding[1] = y;\n if (typeof tmpBounding[3] === 'undefined' || y > tmpBounding[3])\n tmpBounding[3] = y;\n },\n sum: function (dest, bounding) {\n if (typeof bounding[0] !== 'undefined' &&\n typeof bounding[1] !== 'undefined' &&\n typeof bounding[2] !== 'undefined' &&\n typeof bounding[3] !== 'undefined') {\n if (typeof dest[0] === 'undefined' ||\n typeof dest[1] === 'undefined' ||\n typeof dest[2] === 'undefined' ||\n typeof dest[3] === 'undefined') {\n dest[0] = bounding[0];\n dest[1] = bounding[1];\n dest[2] = bounding[2];\n dest[3] = bounding[3];\n }\n else {\n if (dest[0] < bounding[0])\n dest[0] = bounding[0];\n if (dest[2] > bounding[2])\n dest[2] = bounding[2];\n if (dest[1] < bounding[1])\n dest[1] = bounding[1];\n if (dest[3] > bounding[3])\n dest[3] = bounding[3];\n }\n }\n else {\n console.warn('[Urplfanze:Bounding] cannot sum bounding');\n }\n },\n bind: function (bounding, tmpBounding) {\n if (typeof tmpBounding[0] !== 'undefined' &&\n typeof tmpBounding[1] !== 'undefined' &&\n typeof tmpBounding[2] !== 'undefined' &&\n typeof tmpBounding[3] !== 'undefined') {\n bounding.x = tmpBounding[0];\n bounding.y = tmpBounding[1];\n bounding.width = tmpBounding[2] - tmpBounding[0];\n bounding.height = tmpBounding[3] - tmpBounding[1];\n bounding.cx = bounding.x + bounding.width / 2;\n bounding.cy = bounding.y + bounding.height / 2;\n }\n else {\n console.warn('[Urplfanze:Bounding] cannot bind bounding');\n }\n },\n};\nexport default Bounding;\n//# sourceMappingURL=bounding.js.map","import { glMatrix } from 'gl-matrix';\nexport var VEC3_ZERO = [0, 0, 0];\nexport var VEC3_ONE = [1, 1, 1];\nexport var VEC2_ZERO = [0, 0];\nexport var VEC2_ONE = [1, 1];\nglMatrix.setMatrixArrayType(Array);\n/**\n * Skew matrix\n *\n * @internal\n * @ignore\n */\nexport function fromSkew(out, skew) {\n out[0] = 1;\n out[1] = Math.tan(skew[1]);\n out[2] = 0;\n out[3] = 0;\n out[4] = Math.tan(skew[0]);\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * number to vec 2\n *\n * @internal\n * @ignore\n */\nexport function toVec2(x) {\n if (Array.isArray(x))\n return [x[0], x[1]];\n return [x, x];\n}\n/**\n * number to vec 3\n *\n * @internal\n * @ignore\n */\nexport function toVec3(x, defaultZValue) {\n if (defaultZValue === void 0) { defaultZValue = 0; }\n if (Array.isArray(x)) {\n return [x[0], x[1], defaultZValue];\n }\n return [x, x, defaultZValue];\n}\n//# sourceMappingURL=gl-matrix-extensions.js.map","/**\n * Return logarith value and base\n *\n * @category Core.Utilities\n *\n * @param n number\n * @param base number\n */\nexport var log = function (n, base) { return Math.log(n) / Math.log(base); };\n/**\n * @category Core.Utilities\n */\nexport var PI2 = Math.PI * 2;\n/**\n * @category Core.Utilities\n */\nexport var PHI = (1 + Math.sqrt(5)) / 2;\n/**\n * Return a positive module of positive or negative value\n *\n * @category Core.Utilities\n *\n * @param value number\n * @param base number\n */\nexport var pmod = function (value, base) {\n var result = value % base;\n return result < 0 ? result + base : result;\n};\n//# sourceMappingURL=index.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport ShapeBase from \"./ShapeBase\";\nimport SceneChild from \"../SceneChild\";\nimport Scene from \"../Scene\";\n/**\n * Container of ShapeBase or Group, it applies transformations on each repetition\n *\n * @category Core.Shapes\n */\nvar Shape = /** @class */ (function (_super) {\n __extends(Shape, _super);\n /**\n * Creates an instance of Shape.\n *\n * @param {ShapeSettings} [settings={}]\n */\n function Shape(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = settings.type || 'Shape';\n _this = _super.call(this, settings) || this;\n if (settings.shape instanceof SceneChild) {\n _this.shape = settings.shape;\n }\n else {\n console.warn(\"[Urpflanze:Shape] requires the 'shape' property to be instance of SceneChild,\\nYou passed:\", settings.shape);\n }\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n /**\n * Check if shape is static\n *\n * @returns {boolean}\n */\n Shape.prototype.isStatic = function () {\n return _super.prototype.isStatic.call(this) && (this.shape ? this.shape.isStatic() : true);\n };\n /**\n * Check if shape has static index\n *\n * @returns {boolean}\n */\n Shape.prototype.isStaticIndexed = function () {\n return _super.prototype.isStaticIndexed.call(this) && (this.shape ? this.shape.isStaticIndexed() : true);\n };\n /**\n * Find shape by id or name\n *\n * @param {number | string} idOrName\n * @returns {(SceneChild | null)}\n */\n Shape.prototype.find = function (idOrName) {\n if (this.id === idOrName || this.name === idOrName)\n return this;\n if (this.shape)\n return this.shape.find(idOrName);\n return null;\n };\n /**\n * Return length of buffer\n *\n * @param {ISceneChildPropArguments} propArguments\n * @returns {number}\n */\n Shape.prototype.getBufferLength = function (propArguments) {\n if (this.bStatic && this.buffer && this.buffer.length > 0)\n return this.buffer.length;\n var childBufferLength = this.shape ? this.shape.getBufferLength(propArguments) : 0;\n return childBufferLength * this.getRepetitionCount();\n };\n /**\n * Return a buffer of children shape or loop generated buffer\n *\n * @protected\n * @param {number} generateId\n * @param {ISceneChildPropArguments} propArguments\n * @returns {Float32Array}\n */\n Shape.prototype.generateBuffer = function (generateId, propArguments) {\n if (this.shape) {\n this.shape.generate(generateId, false, propArguments);\n return this.shape.getBuffer() || Shape.EMPTY_BUFFER;\n }\n return Shape.EMPTY_BUFFER;\n };\n /**\n * Return bounding\n *\n * @param {boolean} bDirectSceneChild\n * @returns {IShapeBounding}\n */\n Shape.prototype.getShapeBounding = function () {\n if (this.shape) {\n return this.shape.getBounding();\n }\n return this.bounding; // empty bounding defined in ShapeBase\n };\n /**\n * Add to indexed buffer\n *\n * @protected\n * @param {number} frameLength\n * @param {IRepetition} repetition\n * @returns {number} nextIndex\n */\n Shape.prototype.addIndex = function (frameLength, repetition, recursion\n // singleRepetitionBounding: IShapeBounding\n ) {\n if (this.shape) {\n var childIndexedBuffer = this.shape.getIndexedBuffer() || [];\n var parent_1 = {\n shape: this,\n frameLength: frameLength,\n // singleRepetitionBounding,\n repetition: {\n type: repetition.type,\n angle: repetition.angle,\n index: repetition.index,\n count: repetition.count,\n offset: repetition.offset,\n row: {\n index: repetition.row.index,\n count: repetition.row.count,\n offset: repetition.row.offset,\n },\n col: {\n index: repetition.col.index,\n count: repetition.col.count,\n offset: repetition.col.offset,\n },\n },\n };\n if (typeof recursion !== 'undefined') {\n parent_1.recursion = {\n index: recursion.index,\n offset: recursion.offset,\n count: recursion.offset,\n level: recursion.level,\n };\n }\n for (var i = 0, len = childIndexedBuffer.length; i < len; i++) {\n var currentIndexed = __assign({}, childIndexedBuffer[i]);\n currentIndexed.parent = currentIndexed.parent ? Shape.setIndexedParent(currentIndexed.parent, parent_1) : parent_1;\n this.indexedBuffer.push(currentIndexed);\n }\n }\n };\n /**\n * Set parent of indexed\n *\n * @static\n * @param {(IBufferIndex | IParentBufferIndex)} current\n * @param {IParentBufferIndex} parent\n * @returns {(IBufferIndex | IParentBufferIndex)}\n */\n Shape.setIndexedParent = function (current, parent) {\n var index = {\n shape: current.shape,\n // singleRepetitionBounding: current.singleRepetitionBounding,\n repetition: {\n type: current.repetition.type,\n angle: current.repetition.angle,\n index: current.repetition.index,\n count: current.repetition.count,\n offset: current.repetition.offset,\n row: {\n index: current.repetition.row.index,\n count: current.repetition.row.count,\n offset: current.repetition.row.offset,\n },\n col: {\n index: current.repetition.col.index,\n count: current.repetition.col.count,\n offset: current.repetition.col.offset,\n },\n },\n frameLength: current.frameLength,\n };\n if (typeof current.recursion !== 'undefined') {\n index.recursion = {\n index: current.recursion.index,\n offset: current.recursion.offset,\n count: current.recursion.offset,\n level: current.recursion.level,\n };\n }\n index.parent = current.parent ? Shape.setIndexedParent(current.parent, parent) : parent;\n return index;\n };\n /**\n * Set shape\n *\n * @param {(SceneChild | undefined)} [shape]\n */\n Shape.prototype.setShape = function (shape) {\n if (typeof shape === 'undefined') {\n this.shape = undefined;\n this.clearBuffer(true, true);\n }\n else {\n this.scene && Scene.propagateToChilden(shape, this.scene);\n this.shape = shape;\n this.shape.clearBuffer(true, true);\n }\n };\n return Shape;\n}(ShapeBase));\nexport default Shape;\n//# sourceMappingURL=Shape.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { mat4, vec2, vec3 } from 'gl-matrix';\nimport { ERepetitionType, IRepetition, IBaseRepetition, ISceneChildPropArguments, ISceneChildProps, IStreamArguments, IRecursionRepetition, } from \"../types/scene-child\";\nimport { clamp } from \"../../Utilites\";\nimport * as glme from \"../math/gl-matrix-extensions\";\nimport Vec2 from \"../math/Vec2\";\nimport { PI2 } from \"../math\";\nimport Bounding from \"../math/bounding\";\nimport SceneChild from \"../SceneChild\";\nvar tmpMatrix = mat4.create();\nvar transformMatrix = mat4.create();\nvar perspectiveMatrix = mat4.create();\nvar repetitionMatrix = mat4.create();\n/**\n * Main class for shape generation\n *\n * @category Core.Abstract\n * @abstract\n * @class ShapeBase\n * @order 4\n * @extends {SceneChild}\n */\nvar ShapeBase = /** @class */ (function (_super) {\n __extends(ShapeBase, _super);\n /**\n * Creates an instance of ShapeBase\n *\n * @param {ISceneChildSettings} [settings={}]\n */\n function ShapeBase(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = _super.call(this, settings) || this;\n /**\n * Shape generation id\n * used for prevent buffer calculation\n *\n * @internal\n * @ignore\n */\n _this.generateId = -1;\n /**\n * Flag used to determine if indexedBuffer has been generated\n *\n * @internal\n * @ignore\n */\n _this.bIndexed = false;\n /**\n * Array used for index a vertex buffer\n * only for first level scene children\n *\n * @internal\n * @ignore\n */\n _this.indexedBuffer = [];\n /**\n * The bounding inside the scene\n *\n * @type {IShapeBounding}\n */\n _this.bounding = {\n cx: 0,\n cy: 0,\n x: -1,\n y: -1,\n width: 2,\n height: 2,\n };\n _this.props = {\n distance: settings.distance,\n repetitions: settings.repetitions,\n rotateX: settings.rotateX,\n rotateY: settings.rotateY,\n rotateZ: settings.rotateZ,\n skewX: settings.skewX,\n skewY: settings.skewY,\n squeezeX: settings.squeezeX,\n squeezeY: settings.squeezeY,\n displace: settings.displace,\n translate: settings.translate,\n scale: settings.scale,\n transformOrigin: settings.transformOrigin,\n perspective: settings.perspective,\n perspectiveOrigin: settings.perspectiveOrigin,\n };\n _this.bUseParent = !!settings.bUseParent;\n _this.bUseRecursion = !!settings.bUseRecursion;\n _this.vertexCallback = settings.vertexCallback;\n return _this;\n }\n /**\n * Check if the shape should be generated every time\n *\n * @returns {boolean}\n */\n ShapeBase.prototype.isStatic = function () {\n var props = this.props;\n return (typeof props.distance !== 'function' &&\n typeof props.repetitions !== 'function' &&\n typeof props.rotateX !== 'function' &&\n typeof props.rotateY !== 'function' &&\n typeof props.rotateZ !== 'function' &&\n typeof props.displace !== 'function' &&\n typeof props.skewX !== 'function' &&\n typeof props.skewY !== 'function' &&\n typeof props.squeezeX !== 'function' &&\n typeof props.squeezeY !== 'function' &&\n typeof props.translate !== 'function' &&\n typeof props.scale !== 'function' &&\n typeof props.transformOrigin !== 'function');\n };\n /**\n * Check if the indexedBuffer array needs to be recreated every time,\n * this can happen when a shape generates an array of vertices different in length at each repetition\n *\n * @returns {boolean}\n */\n ShapeBase.prototype.isStaticIndexed = function () {\n return typeof this.props.repetitions !== 'function';\n };\n /**\n * Return a prop value\n *\n * @param {keyof ISceneChildProps} key\n * @param {ISceneChildPropArguments} [propArguments]\n * @param {*} [defaultValue]\n * @returns {*}\n */\n ShapeBase.prototype.getProp = function (key, propArguments, defaultValue) {\n var attribute = this.props[key];\n if (typeof attribute === 'function') {\n attribute = attribute(propArguments);\n }\n return typeof attribute === 'undefined' || Number.isNaN(attribute) ? defaultValue : attribute;\n };\n /**\n * Set a single or multiple props\n *\n * @param {(keyof ISceneChildProps | ISceneChildProps)} key\n * @param {*} [value]\n * @param {boolean} [bClearIndexed=false]\n */\n ShapeBase.prototype.setProp = function (key, value, bClearIndexed) {\n var _this = this;\n if (bClearIndexed === void 0) { bClearIndexed = false; }\n if (typeof key == 'string') {\n bClearIndexed = bClearIndexed || key == 'repetitions';\n this.props[key] = value;\n }\n else {\n bClearIndexed = bClearIndexed || 'repetitions' in key;\n Object.keys(key).forEach(function (k) {\n return (_this.props[k] = key[k]);\n });\n }\n this.clearBuffer(bClearIndexed, true);\n };\n /**\n * Unset buffer\n *\n * @param {boolean} [bClearIndexed=false]\n * @param {boolean} [bPropagateToParents=false]\n * @param {boolean} [bPropagateToChildren=false]\n */\n ShapeBase.prototype.clearBuffer = function (bClearIndexed, bPropagateToParents) {\n if (bClearIndexed === void 0) { bClearIndexed = false; }\n if (bPropagateToParents === void 0) { bPropagateToParents = true; }\n this.buffer = undefined;\n if (bClearIndexed) {\n this.bIndexed = false;\n this.indexedBuffer = [];\n }\n this.bStatic = this.isStatic();\n this.bStaticIndexed = this.isStaticIndexed();\n if (bPropagateToParents && this.scene && !this.scene.isFirstLevelChild(this)) {\n var parents = this.scene.getParentsOfSceneChild(this);\n parents.length > 0 && parents[parents.length - 1].clearBuffer(bClearIndexed, bPropagateToParents /* true */);\n }\n };\n /**\n * Update the vertex array if the shape is not static and update the indexedBuffer if it is also not static\n *\n * @param {number} generateId generation id\n * @param {boolean} [bDirectSceneChild=false] adjust shape of center of scene\n * @param {ISceneChildPropArguments} [parentPropArguments]\n */\n ShapeBase.prototype.generate = function (generateId, bDirectSceneChild, parentPropArguments) {\n var _a, _b;\n if (bDirectSceneChild === void 0) { bDirectSceneChild = false; }\n if (this.buffer && (this.bStatic || (generateId === this.generateId && !this.bUseParent && !this.bUseRecursion))) {\n return;\n }\n this.generateId = generateId;\n if (!this.bStaticIndexed || !this.bIndexed)\n this.indexedBuffer = [];\n var propArguments = ShapeBase.getEmptyPropArguments(this, parentPropArguments);\n var repetition = propArguments.repetition;\n var repetitions = this.getProp('repetitions', propArguments, 1);\n var repetitionType = Array.isArray(repetitions) ? ERepetitionType.Matrix : ERepetitionType.Ring;\n var repetitionCount = Array.isArray(repetitions)\n ? repetitions[0] * ((_a = repetitions[1]) !== null && _a !== void 0 ? _a : repetitions[0])\n : repetitions;\n var repetitionRowCount = Array.isArray(repetitions) ? repetitions[0] : repetitionCount;\n var repetitionColCount = Array.isArray(repetitions) ? (_b = repetitions[1]) !== null && _b !== void 0 ? _b : repetitions[0] : 1;\n var rowRepetition = repetition.row;\n rowRepetition.count = repetitionRowCount;\n var colRepetition = repetition.col;\n colRepetition.count = repetitionColCount;\n repetition.count = repetitionCount;\n repetition.col.count = repetitionColCount;\n repetition.row.count = repetitionRowCount;\n repetition.type = repetitionType;\n var totalBufferLength = 0;\n var buffers = [];\n var currentIndex = 0;\n var centerMatrix = vec2.fromValues((repetitionColCount - 1) / 2, (repetitionRowCount - 1) / 2);\n var sceneCenter = this.scene ? [this.scene.center[0], this.scene.center[1], 0] : [0, 0, 0];\n var tmpTotalShapeBounding = [undefined, undefined, undefined, undefined];\n var tmpSingleRepetitionBounding = [undefined, undefined, undefined, undefined];\n for (var currentRowRepetition = 0; currentRowRepetition < repetitionRowCount; currentRowRepetition++) {\n for (var currentColRepetition = 0; currentColRepetition < repetitionColCount; currentColRepetition++, currentIndex++) {\n repetition.index = currentIndex + 1;\n repetition.offset = repetitionCount > 1 ? currentIndex / (repetitionCount - 1) : 1;\n repetition.angle = repetitionType === ERepetitionType.Ring ? (PI2 / repetitionCount) * currentIndex : 0;\n colRepetition.index = currentColRepetition + 1;\n colRepetition.offset = repetitionColCount > 1 ? currentColRepetition / (repetitionColCount - 1) : 1;\n rowRepetition.index = currentRowRepetition + 1;\n rowRepetition.offset = repetitionRowCount > 1 ? currentRowRepetition / (repetitionRowCount - 1) : 1;\n // Generate primitives buffer recursively\n var buffer = this.generateBuffer(generateId, propArguments);\n var bufferLength = buffer.length;\n var bounding = this.getShapeBounding();\n buffers[currentIndex] = new Float32Array(bufferLength);\n totalBufferLength += bufferLength;\n {\n var distance = glme.toVec2(this.getProp('distance', propArguments, glme.VEC2_ZERO));\n var displace = this.getProp('displace', propArguments, 0);\n var scale = glme.toVec3(this.getProp('scale', propArguments, glme.VEC2_ONE), 1);\n var translate = glme.toVec3(this.getProp('translate', propArguments, glme.VEC2_ZERO), 0);\n var skewX = this.getProp('skewX', propArguments, 0);\n var skewY = this.getProp('skewY', propArguments, 0);\n var squeezeX = this.getProp('squeezeX', propArguments, 0);\n var squeezeY = this.getProp('squeezeY', propArguments, 0);\n var rotateX = this.getProp('rotateX', propArguments, 0);\n var rotateY = this.getProp('rotateY', propArguments, 0);\n var rotateZ = this.getProp('rotateZ', propArguments, 0);\n var perspective = clamp(0, 1, this.getProp('perspective', propArguments, 0));\n var perspectiveOrigin = glme.toVec3(this.getProp('perspectiveOrigin', propArguments, glme.VEC2_ZERO), 0);\n var transformOrigin = glme.toVec3(this.getProp('transformOrigin', propArguments, glme.VEC2_ZERO), 0);\n var offset = void 0;\n switch (repetitionType) {\n case ERepetitionType.Ring:\n offset = vec3.fromValues(distance[0], 0, 0);\n vec3.rotateZ(offset, offset, glme.VEC3_ZERO, repetition.angle + displace);\n break;\n case ERepetitionType.Matrix:\n offset = vec3.fromValues(distance[1] * (currentColRepetition - centerMatrix[0]), distance[0] * (currentRowRepetition - centerMatrix[1]), 0);\n break;\n }\n var perspectiveSize = perspective > 0 ? Math.max(bounding.width, bounding.height) / 2 : 1;\n var perspectiveValue = perspective > 0 ? perspectiveSize + (1 - perspective) * (perspectiveSize * 10) : 0;\n var bTransformOrigin = perspective !== 0 || transformOrigin[0] !== 0 || transformOrigin[1] !== 0;\n var bPerspectiveOrigin = perspectiveOrigin[0] !== 0 || perspectiveOrigin[1] !== 0;\n if (bTransformOrigin) {\n transformOrigin[0] *= bounding.width / 2;\n transformOrigin[1] *= bounding.height / 2;\n transformOrigin[2] = perspectiveValue;\n }\n /**\n * Create Matrices\n */\n {\n /**\n * Create Transformation matrix\n */\n mat4.identity(transformMatrix);\n bTransformOrigin && mat4.translate(transformMatrix, transformMatrix, transformOrigin);\n if (translate[0] !== 0 || translate[1] !== 0)\n mat4.translate(transformMatrix, transformMatrix, translate);\n if (skewX !== 0 || skewY !== 0) {\n glme.fromSkew(tmpMatrix, [skewX, skewY]);\n mat4.multiply(transformMatrix, transformMatrix, tmpMatrix);\n }\n rotateX !== 0 && mat4.rotateX(transformMatrix, transformMatrix, rotateX);\n rotateY !== 0 && mat4.rotateY(transformMatrix, transformMatrix, rotateY);\n rotateZ !== 0 && mat4.rotateZ(transformMatrix, transformMatrix, rotateZ);\n if (scale[0] !== 1 || scale[1] !== 1)\n mat4.scale(transformMatrix, transformMatrix, scale);\n bTransformOrigin &&\n mat4.translate(transformMatrix, transformMatrix, vec3.scale(transformOrigin, transformOrigin, -1));\n /**\n * Create Perspective matrix\n */\n if (perspectiveValue > 0) {\n if (bPerspectiveOrigin) {\n perspectiveOrigin[0] *= bounding.width / 2;\n perspectiveOrigin[1] *= bounding.height / 2;\n perspectiveOrigin[2] = 0;\n }\n mat4.perspective(perspectiveMatrix, -Math.PI / 2, 1, 0, Infinity);\n }\n /**\n * Create Repetition matrix\n */\n mat4.identity(repetitionMatrix);\n mat4.translate(repetitionMatrix, repetitionMatrix, offset);\n if (bDirectSceneChild) {\n mat4.translate(repetitionMatrix, repetitionMatrix, sceneCenter);\n }\n if (repetitionType === ERepetitionType.Ring)\n mat4.rotateZ(repetitionMatrix, repetitionMatrix, repetition.angle + displace);\n }\n Bounding.clear(tmpSingleRepetitionBounding);\n // Apply matrices on vertex\n for (var bufferIndex = 0; bufferIndex < bufferLength; bufferIndex += 2) {\n var vertex = [buffer[bufferIndex], buffer[bufferIndex + 1], perspectiveValue];\n {\n // Apply squeeze, can be insert into transformMatrix?\n squeezeX !== 0 && Vec2.squeezeX(vertex, squeezeX);\n squeezeY !== 0 && Vec2.squeezeY(vertex, squeezeY);\n // Apply transforms\n vec3.transformMat4(vertex, vertex, transformMatrix);\n // Apply perspective\n if (perspectiveValue > 0) {\n bPerspectiveOrigin && vec3.add(vertex, vertex, perspectiveOrigin);\n vec3.transformMat4(vertex, vertex, perspectiveMatrix);\n vec3.scale(vertex, vertex, perspectiveValue);\n bPerspectiveOrigin && vec3.sub(vertex, vertex, perspectiveOrigin);\n }\n // custom vertex manipulation\n if (this.vertexCallback) {\n var index = bufferIndex / 2;\n var count = bufferLength / 2;\n var vertexRepetition = {\n index: index + 1,\n count: count,\n offset: count > 1 ? index / (count - 1) : 1,\n };\n this.vertexCallback(vertex, vertexRepetition, propArguments);\n }\n // final, apply repetition matrix\n vec3.transformMat4(vertex, vertex, repetitionMatrix);\n }\n buffers[currentIndex][bufferIndex] = vertex[0];\n buffers[currentIndex][bufferIndex + 1] = vertex[1];\n // Bounding.add(tmpSingleRepetitionBounding, vertex[0], vertex[1])\n Bounding.add(tmpTotalShapeBounding, vertex[0], vertex[1]);\n }\n }\n // Bounding.sum(tmpTotalShapeBounding, tmpSingleRepetitionBounding)\n // After buffer creation, add a frame into indexedBuffer if not static or update bounding\n // const singleRepetitionBounding = { cx: 0, cy: 0, x: -1, y: -1, width: 2, height: 2 }\n // Bounding.bind(singleRepetitionBounding, tmpSingleRepetitionBounding)\n if (!this.bStaticIndexed || !this.bIndexed) {\n this.addIndex(bufferLength, repetition);\n }\n }\n }\n Bounding.bind(this.bounding, tmpTotalShapeBounding);\n this.buffer = new Float32Array(totalBufferLength);\n for (var i = 0, offset = 0, len = buffers.length; i < len; offset += buffers[i].length, i++)\n this.buffer.set(buffers[i], offset);\n this.bIndexed = true;\n };\n /**\n * Return current shape (whit repetions) bounding\n *\n * @return {*} {IShapeBounding}\n */\n ShapeBase.prototype.getBounding = function () {\n return this.bounding;\n };\n /**\n * Get number of repetitions\n *\n * @returns {number}\n */\n ShapeBase.prototype.getRepetitionCount = function () {\n var _a;\n var repetitions = this.getProp('repetitions', undefined, 1);\n return Array.isArray(repetitions) ? repetitions[0] * ((_a = repetitions[1]) !== null && _a !== void 0 ? _a : repetitions[0]) : repetitions;\n };\n /**\n * Return buffer\n *\n * @returns {(Float32Array | undefined)}\n */\n ShapeBase.prototype.getBuffer = function () {\n return this.buffer;\n };\n /**\n * Return indexed buffer\n *\n * @returns {(Array | undefined)}\n */\n ShapeBase.prototype.getIndexedBuffer = function () {\n return this.indexedBuffer;\n };\n /**\n * Return number of encapsulation\n *\n * @param {IBufferIndex} index\n * @returns {number}\n */\n ShapeBase.getIndexParentLevel = function (index) {\n if (typeof index.parent === 'undefined')\n return 0;\n var currentParent = index.parent;\n var currentParentLevel = 1;\n while (typeof currentParent.parent !== 'undefined') {\n currentParentLevel++;\n currentParent = currentParent.parent;\n }\n return currentParentLevel;\n };\n /**\n * Stream buffer\n *\n * @param {(TStreamCallback} callback\n */\n ShapeBase.prototype.stream = function (callback) {\n if (this.buffer && this.indexedBuffer) {\n for (var i = 0, j = 0, len = this.indexedBuffer.length; i < len; i++) {\n var currentIndexing = this.indexedBuffer[i];\n callback({\n buffer: this.buffer,\n frameLength: currentIndexing.frameLength,\n frameBufferIndex: j,\n currentIndexing: currentIndexing,\n currentShapeIndex: i,\n totalShapes: len,\n });\n j += currentIndexing.frameLength;\n }\n }\n };\n /**\n * Return empty propArguments\n *\n * @static\n * @param {ShapeBase} shape\n * @return {*} {ISceneChildPropArguments}\n */\n ShapeBase.getEmptyPropArguments = function (shape, parentPropArguments) {\n // prettier-ignore\n var repetition = {\n type: ERepetitionType.Ring, angle: 0, index: 1, offset: 1, count: 1,\n row: { index: 1, offset: 1, count: 1 },\n col: { index: 1, offset: 1, count: 1 },\n };\n return {\n repetition: repetition,\n shape: shape,\n parent: parentPropArguments,\n };\n };\n /**\n * Empty buffer\n *\n * @internal\n * @ignore\n */\n ShapeBase.EMPTY_BUFFER = new Float32Array(0);\n /**\n * Empty BaseRepetition\n *\n * @internal\n * @ignore\n */\n ShapeBase.getEmptySimpleRepetition = function () { return ({\n index: 1,\n offset: 1,\n count: 1,\n }); };\n /**\n * Empty Repetition\n *\n * @internal\n * @ignore\n */\n ShapeBase.getEmptyRepetition = function () { return (__assign(__assign({ type: ERepetitionType.Ring, angle: 0 }, ShapeBase.getEmptySimpleRepetition()), { row: ShapeBase.getEmptySimpleRepetition(), col: ShapeBase.getEmptySimpleRepetition() })); };\n return ShapeBase;\n}(SceneChild));\nexport default ShapeBase;\n//# sourceMappingURL=ShapeBase.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport Bounding from \"../math/bounding\";\nimport ShapePrimitive from \"./ShapePrimitive\";\nimport { EShapePrimitiveAdaptMode } from \"../types/shape-base\";\n/**\n * @category Core.Shapes\n */\nvar ShapeBuffer = /** @class */ (function (_super) {\n __extends(ShapeBuffer, _super);\n /**\n * Creates an instance of ShapeBuffer.\n *\n * @param {IShapeBufferSettings} [settings={}]\n */\n function ShapeBuffer(settings) {\n if (settings === void 0) { settings = {}; }\n var _a;\n var _this = this;\n settings.type = settings.type || 'ShapeBuffer';\n settings.adaptMode = (_a = settings.adaptMode) !== null && _a !== void 0 ? _a : EShapePrimitiveAdaptMode.Scale;\n _this = _super.call(this, settings) || this;\n if (typeof settings.shape === 'undefined') {\n console.warn('[Urpflanze:ShapeBuffer] ShapeBuffer require a buffer passed from `shape` property');\n _this.shape = ShapeBuffer.EMPTY_BUFFER;\n }\n else\n _this.shape = Float32Array.from(settings.shape);\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n /**\n * Unset buffer\n *\n * @param {boolean} [bClearIndexed=false]\n * @param {boolean} [bPropagateToParents=false]\n */\n ShapeBuffer.prototype.clearBuffer = function (bClearIndexed, bPropagateToParents) {\n if (bClearIndexed === void 0) { bClearIndexed = false; }\n if (bPropagateToParents === void 0) { bPropagateToParents = true; }\n _super.prototype.clearBuffer.call(this, bClearIndexed, bPropagateToParents);\n this.shapeBuffer = undefined;\n // this.shapeBuffer = ShapeBuffer.buffer2Dto3D(this.shapeBuffer)\n };\n /**\n * Apply sideLength on .shape buffer and calculate bounding\n *\n * @protected\n */\n ShapeBuffer.prototype.bindBuffer = function (propArguments) {\n var sideLength = this.getRepetitionSideLength(propArguments);\n var shapeBuffer = this.adaptMode !== EShapePrimitiveAdaptMode.None\n ? ShapePrimitive.adaptBuffer(this.shape, this.adaptMode)\n : Float32Array.from(this.shape);\n var tmpBounding = [undefined, undefined, undefined, undefined];\n for (var i = 0, len = shapeBuffer.length; i < len; i += 2) {\n shapeBuffer[i] *= sideLength[0];\n shapeBuffer[i + 1] *= sideLength[1];\n Bounding.add(tmpBounding, shapeBuffer[i], shapeBuffer[i + 1]);\n }\n Bounding.bind(this.currentGenerationPrimitiveBounding, tmpBounding);\n this.shapeBuffer = shapeBuffer;\n };\n /**\n * Return length of buffer\n *\n * @param {ISceneChildPropArguments} propArguments\n * @returns {number}\n */\n ShapeBuffer.prototype.getBufferLength = function (propArguments) {\n if (this.buffer && this.buffer.length > 0)\n return this.buffer.length;\n return this.shape.length * this.getRepetitionCount();\n };\n /**\n * Return a buffer of children shape or loop generated buffer\n *\n * @protected\n * @param {number} generateId\n * @param {ISceneChildPropArguments} propArguments\n * @returns {Float32Array}\n */\n ShapeBuffer.prototype.generateBuffer = function (generateId, propArguments) {\n if (typeof this.shapeBuffer === 'undefined' || typeof this.props.sideLength === 'function') {\n this.bindBuffer(propArguments);\n }\n return this.shapeBuffer;\n };\n /**\n * Set shape\n *\n * @param {(Float32Array)} [shape]\n */\n ShapeBuffer.prototype.setShape = function (shape) {\n this.shape = shape;\n this.clearBuffer(true);\n };\n /**\n * Subdivide buffer n times\n *\n * @param {number} [level=1]\n */\n ShapeBuffer.prototype.subdivide = function (level) {\n if (level === void 0) { level = 1; }\n var subdivided = this.shape;\n if (subdivided && subdivided.length > 0) {\n for (var i = 0; i < level; i++)\n subdivided = ShapeBuffer.subdivide(subdivided, this.bClosed);\n this.setShape(subdivided);\n }\n };\n /**\n * Subdivide buffer\n *\n * @static\n * @param {Float32Array} shape\n * @param {boolean} [bClosed=true]\n * @returns {(Float32Array)}\n */\n ShapeBuffer.subdivide = function (shape, bClosed) {\n if (bClosed === void 0) { bClosed = true; }\n var shapeLength = shape.length;\n var subdivided = new Float32Array(shapeLength * 2 - (bClosed ? 0 : 2));\n for (var i = 0; i < shapeLength; i += 2) {\n if (i === 0) {\n subdivided[0] = shape[0];\n subdivided[1] = shape[1];\n }\n else {\n var px = shape[i - 2];\n var py = shape[i - 1];\n var x = shape[i];\n var y = shape[i + 1];\n var nx = (x + px) / 2;\n var ny = (y + py) / 2;\n subdivided[(i - 1) * 2] = nx;\n subdivided[(i - 1) * 2 + 1] = ny;\n subdivided[i * 2] = x;\n subdivided[i * 2 + 1] = y;\n }\n }\n if (bClosed) {\n subdivided[(shapeLength - 1) * 2] = (shape[0] + shape[shapeLength - 2]) / 2;\n subdivided[(shapeLength - 1) * 2 + 1] = (shape[1] + shape[shapeLength - 1]) / 2;\n }\n return subdivided;\n };\n return ShapeBuffer;\n}(ShapePrimitive));\nexport default ShapeBuffer;\n//# sourceMappingURL=ShapeBuffer.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { EShapePrimitiveAdaptMode } from \"../types/shape-base\";\nimport Bounding from \"../math/bounding\";\nimport { PI2 } from \"../math\";\nimport ShapePrimitive from \"./ShapePrimitive\";\nimport ShapeBase from \"./ShapeBase\";\n/**\n * Shape Loop\n *\n * @category Core.Shapes\n * @public\n * @class ShapeLoop\n * @extends {ShapePrimitive}\n */\nvar ShapeLoop = /** @class */ (function (_super) {\n __extends(ShapeLoop, _super);\n /**\n * Creates an instance of ShapeLoop.\n *\n * @param {IShapeLoopSettings} [settings={}]\n * @param {boolean} [bPreventGeneration=false]\n */\n function ShapeLoop(settings, bPreventGeneration) {\n if (settings === void 0) { settings = {}; }\n if (bPreventGeneration === void 0) { bPreventGeneration = false; }\n var _this = this;\n settings.type = settings.type || 'ShapeLoop';\n _this = _super.call(this, settings) || this;\n _this.loopDependencies = (settings.loopDependencies || []).concat('sideLength');\n _this.props.loop = settings.loop;\n if (!bPreventGeneration) {\n _this.loop = {\n start: 0,\n end: PI2,\n inc: PI2 / 10,\n vertex: function () { return [0, 0]; },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n }\n return _this;\n }\n /**\n * Check if currentOrSingleLoopBuffer is static\n *\n * @returns {boolean}\n */\n ShapeLoop.prototype.isStaticLoop = function () {\n if (this.loopDependencies.includes('propArguments'))\n return false;\n for (var i = 0, len = this.loopDependencies.length; i < len; i++)\n if (typeof this.props[this.loopDependencies[i]] === 'function')\n return false;\n return true;\n };\n /**\n * Check if shape is static\n *\n * @returns {boolean}\n */\n ShapeLoop.prototype.isStatic = function () {\n return this.bStaticLoop && _super.prototype.isStatic.call(this);\n };\n /**\n * Check if shape has static indexed\n *\n * @returns {boolean}\n */\n ShapeLoop.prototype.isStaticIndexed = function () {\n return this.bStaticLoop && _super.prototype.isStaticIndexed.call(this);\n };\n /**\n * Unset buffer\n *\n * @param {boolean} [bClearIndexed=false]\n * @param {boolean} [bPropagateToParents=false]\n */\n ShapeLoop.prototype.clearBuffer = function (bClearIndexed, bPropagateToParents) {\n if (bClearIndexed === void 0) { bClearIndexed = false; }\n if (bPropagateToParents === void 0) { bPropagateToParents = true; }\n this.bStaticLoop = this.isStaticLoop();\n if (bClearIndexed) {\n this.currentOrSingleLoopBuffer = undefined;\n }\n _super.prototype.clearBuffer.call(this, bClearIndexed, bPropagateToParents);\n };\n /**\n * Set single or multiple props\n *\n * @param {(K)} key\n * @param {*} [value]\n * @param {boolean} [bClearIndexed=false]\n */\n ShapeLoop.prototype.setProp = function (key, value) {\n var _a;\n var bClearIndexed = false;\n var keys = typeof key === 'string' ? (_a = {}, _a[key] = value, _a) : key;\n for (var i = this.loopDependencies.length - 1; i >= 0; i--) {\n if (this.loopDependencies[i] in keys) {\n // this.props.loop = undefined\n bClearIndexed = true;\n break;\n }\n }\n if ('loop' in keys) {\n keys.loop = __assign(__assign({}, this.props.loop), keys.loop);\n bClearIndexed = true;\n }\n _super.prototype.setProp.call(this, keys, value, bClearIndexed);\n };\n /**\n * Return length of buffer\n *\n * @param {ISceneChildPropArguments} [propArguments]\n * @returns {number}\n */\n ShapeLoop.prototype.getBufferLength = function (propArguments) {\n if (this.bStatic && typeof this.buffer !== 'undefined')\n return this.buffer.length;\n if (this.bStaticLoop && typeof this.currentOrSingleLoopBuffer !== 'undefined')\n return this.currentOrSingleLoopBuffer.length * this.getRepetitionCount();\n var count = this.getLoop(propArguments || ShapeBase.getEmptyPropArguments(this)).count;\n return this.getRepetitionCount() * count * 2;\n };\n /**\n * Return a buffer of children shape or loop generated buffer\n *\n * @protected\n * @param {number} generateId\n * @param {ISceneChildPropArguments} propArguments\n * @returns {Float32Array}\n */\n ShapeLoop.prototype.generateBuffer = function (generateId, propArguments) {\n if (!this.bStaticLoop)\n return this.generateLoopBuffer(propArguments);\n if (typeof this.props.sideLength === 'function' || typeof this.currentOrSingleLoopBuffer === 'undefined')\n this.currentOrSingleLoopBuffer = this.generateLoopBuffer(propArguments);\n return this.currentOrSingleLoopBuffer;\n };\n /**\n * Generate loop buffer\n *\n * @protected\n * @param {ISceneChildPropArguments} propArguments\n * @returns {Float32Array}\n */\n ShapeLoop.prototype.generateLoopBuffer = function (propArguments) {\n var _a = this.getLoop(propArguments), start = _a.start, inc = _a.inc, end = _a.end, count = _a.count;\n var sideLength = this.getRepetitionSideLength(propArguments);\n var getVertex = (this.props.loop && this.props.loop.vertex\n ? this.props.loop.vertex\n : this.loop.vertex);\n var shapeLoop = {\n index: 0,\n offset: 0,\n angle: 0,\n count: count,\n };\n var vertexLength = shapeLoop.count;\n var bufferLength = vertexLength * 2;\n var currentOrSingleLoopBuffer = new Float32Array(bufferLength);\n var bNoAdapt = this.adaptMode === EShapePrimitiveAdaptMode.None;\n var tmpBounding = [undefined, undefined, undefined, undefined];\n for (var i = 0, j = 0; i < vertexLength; i++, j += 2) {\n var angle = start + inc * i;\n var offset = shapeLoop.count > 1 ? i / (shapeLoop.count - 1) : 1;\n // const angle = (end - start) * offset + start\n shapeLoop.angle = angle;\n shapeLoop.index = i + 1;\n shapeLoop.offset = offset;\n var vertex = Float32Array.from(getVertex(shapeLoop, propArguments));\n currentOrSingleLoopBuffer[j] = vertex[0];\n currentOrSingleLoopBuffer[j + 1] = vertex[1];\n if (bNoAdapt) {\n currentOrSingleLoopBuffer[j] *= sideLength[0];\n currentOrSingleLoopBuffer[j + 1] *= sideLength[1];\n Bounding.add(tmpBounding, currentOrSingleLoopBuffer[j], currentOrSingleLoopBuffer[j + 1]);\n }\n }\n if (bNoAdapt) {\n Bounding.bind(this.currentGenerationPrimitiveBounding, tmpBounding);\n }\n else {\n /**\n * Adapt and apply side length\n */\n var buffer = ShapePrimitive.adaptBuffer(currentOrSingleLoopBuffer, this.adaptMode);\n Bounding.clear(tmpBounding);\n for (var i = 0; i < bufferLength; i += 2) {\n buffer[i] = buffer[i] * sideLength[0];\n buffer[i + 1] = buffer[i + 1] * sideLength[1];\n Bounding.add(tmpBounding, buffer[i], buffer[i + 1]);\n }\n Bounding.bind(this.currentGenerationPrimitiveBounding, tmpBounding);\n return buffer;\n }\n return currentOrSingleLoopBuffer;\n };\n /**\n * Return information about a client loop gnerator\n *\n * @public\n * @param {ISceneChildPropArguments} propArguments\n * @returns {ShapeLoopInformation}\n */\n ShapeLoop.prototype.getLoop = function (propArguments) {\n var _a, _b, _c, _d, _e, _f;\n var start = (_b = (_a = this.props.loop) === null || _a === void 0 ? void 0 : _a.start) !== null && _b !== void 0 ? _b : this.loop.start;\n var end = (_d = (_c = this.props.loop) === null || _c === void 0 ? void 0 : _c.end) !== null && _d !== void 0 ? _d : this.loop.end;\n var inc = (_f = (_e = this.props.loop) === null || _e === void 0 ? void 0 : _e.inc) !== null && _f !== void 0 ? _f : this.loop.inc;\n start = (typeof start === 'function' ? start(propArguments) : start);\n end = (typeof end === 'function' ? end(propArguments) : end);\n inc = (typeof inc === 'function' ? inc(propArguments) : inc);\n var count = Math.ceil((end - start) / inc);\n return { start: start, end: end, inc: inc, count: count <= 0 ? 0 : count };\n };\n /**\n * Subdivide loop n times\n *\n * @param {number} [level=1]\n */\n ShapeLoop.prototype.subdivide = function (level) {\n if (level === void 0) { level = 1; }\n var currentLoop = this.props.loop || this.loop;\n // TODO: subdivide function?\n if (typeof currentLoop.inc === 'number') {\n currentLoop.inc = (currentLoop.inc || 1) / Math.pow(2, level);\n this.setProp('loop', currentLoop);\n }\n };\n /**\n * Set shape from loop generator\n *\n * @param {(IShapeLoopGenerator)} [shape]\n */\n ShapeLoop.prototype.setShape = function (loop) {\n this.setProp('loop', loop);\n };\n ShapeLoop.PId2 = Math.PI / 2;\n return ShapeLoop;\n}(ShapePrimitive));\nexport default ShapeLoop;\n//# sourceMappingURL=ShapeLoop.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport ShapeBase from \"./ShapeBase\";\nimport { EShapePrimitiveAdaptMode, IBufferIndex, IParentBufferIndex, IShapeBounding, IShapePrimitiveProps, IShapePrimitiveSettings, } from \"../types/shape-base\";\nimport * as glme from \"../math/gl-matrix-extensions\";\nimport Bounding from \"../math/bounding\";\n/**\n * @category Core.Abstract\n */\nvar ShapePrimitive = /** @class */ (function (_super) {\n __extends(ShapePrimitive, _super);\n /**\n * Creates an instance of ShapePrimitive.\n *\n * @param {IShapePrimitiveSettings} [settings={}]\n */\n function ShapePrimitive(settings) {\n if (settings === void 0) { settings = {}; }\n var _a, _b;\n var _this = _super.call(this, settings) || this;\n /**\n * Contain the bounding of the last generated buffer\n *\n * @type {IShapeBounding}\n */\n _this.currentGenerationPrimitiveBounding = Bounding.empty();\n _this.props.sideLength =\n typeof settings.sideLength === 'undefined'\n ? undefined\n : typeof settings.sideLength === 'function'\n ? settings.sideLength\n : glme.toVec2(settings.sideLength);\n _this.style = settings.style || {};\n _this.adaptMode = (_a = settings.adaptMode) !== null && _a !== void 0 ? _a : EShapePrimitiveAdaptMode.None;\n _this.bClosed = (_b = settings.bClosed) !== null && _b !== void 0 ? _b : true;\n return _this;\n }\n /**\n * Check if shape is static\n *\n * @returns {boolean}\n * @memberof ShapePrimitive\n */\n ShapePrimitive.prototype.isStatic = function () {\n return typeof this.props.sideLength !== 'function' && _super.prototype.isStatic.call(this);\n };\n ShapePrimitive.prototype.getRepetitionSideLength = function (propArguments) {\n if (this.bStatic) {\n // not set default value into constructor because it can be overridden by group\n if (typeof this.props.sideLength === 'undefined') {\n this.props.sideLength = [50, 50];\n }\n else if (typeof this.props.sideLength === 'number') {\n this.props.sideLength = [this.props.sideLength, this.props.sideLength];\n }\n return this.props.sideLength;\n }\n return glme.toVec2(this.getProp('sideLength', propArguments, [50, 50]));\n };\n /**\n * Return a bounding of generated buffer if is direct scene child\n *\n * @returns {IShapeBounding}\n * @memberof ShapePrimitive\n */\n ShapePrimitive.prototype.getShapeBounding = function () {\n return this.currentGenerationPrimitiveBounding;\n };\n /**\n * Add this to indexedBuffer\n *\n * @protected\n * @param {number} frameLength\n * @param {IRepetition} repetition\n * @returns {number} nextIndex\n */\n ShapePrimitive.prototype.addIndex = function (frameLength, repetition, recursion\n // singleRepetitionBounding: IShapeBounding\n ) {\n var index = {\n shape: this,\n frameLength: frameLength,\n // singleRepetitionBounding,\n repetition: {\n type: repetition.type,\n angle: repetition.angle,\n index: repetition.index,\n count: repetition.count,\n offset: repetition.offset,\n row: {\n index: repetition.row.index,\n count: repetition.row.count,\n offset: repetition.row.offset,\n },\n col: {\n index: repetition.col.index,\n count: repetition.col.count,\n offset: repetition.col.offset,\n },\n },\n };\n if (typeof recursion !== 'undefined') {\n index.recursion = {\n index: recursion.index,\n offset: recursion.offset,\n count: recursion.offset,\n level: recursion.level,\n };\n }\n this.indexedBuffer.push(index);\n };\n /**\n * Return bClosed\n *\n * @returns {boolean}\n * @memberof ShapePrimitive\n */\n ShapePrimitive.prototype.isClosed = function () {\n return this.bClosed;\n };\n /**\n * Set bClosed\n *\n * @param {boolean} bClosed\n * @memberof ShapePrimitive\n */\n ShapePrimitive.prototype.setClosed = function (bClosed) {\n this.bClosed = bClosed;\n };\n /**\n * Return adaptMode\n *\n * @returns {EShapePrimitiveAdaptMode}\n * @memberof ShapeBase\n */\n ShapePrimitive.prototype.getAdaptMode = function () {\n return this.adaptMode;\n };\n /**\n * Set adaptMode\n *\n * @param {EShapePrimitiveAdaptMode} bAdapted\n * @memberof ShapeBase\n */\n ShapePrimitive.prototype.adapt = function (adaptMode) {\n this.adaptMode = adaptMode;\n this.clearBuffer(true);\n };\n /**\n * Get buffer bounding\n *\n * @static\n * @param {Float32Array} buffer\n * @returns {IShapeBounding}\n * @memberof ShapePrimitive\n */\n ShapePrimitive.getBounding = function (buffer, bounding) {\n if (typeof bounding === 'undefined')\n bounding = Bounding.empty();\n var tmp_bounding = [undefined, undefined, undefined, undefined];\n for (var i = 0, len = buffer.length; i < len; i += 2) {\n Bounding.add(tmp_bounding, buffer[i], buffer[i + 1]);\n }\n Bounding.bind(bounding, tmp_bounding);\n return bounding;\n };\n /**\n * Return adapted buffer between [-1,-1] and [1,1]\n *\n * @public\n * @static\n * @param {Float32Array} input\n * @param {EShapePrimitiveAdaptMode} mode\n * @returns {Float32Array}\n * @memberof ShapePrimitive\n */\n ShapePrimitive.adaptBuffer = function (input, mode, rect) {\n if (mode === EShapePrimitiveAdaptMode.None)\n return Float32Array.from(input);\n var output = new Float32Array(input.length);\n if (!rect) {\n rect = ShapePrimitive.getBounding(input);\n }\n var scale = rect.width >= 2 ||\n rect.height >= 2 ||\n (mode >= EShapePrimitiveAdaptMode.Fill && (rect.width < 2 || rect.height < 2))\n ? 2 / Math.max(rect.width, rect.height)\n : 1;\n var translateX = mode >= EShapePrimitiveAdaptMode.Center ? rect.cx : 0;\n var translateY = mode >= EShapePrimitiveAdaptMode.Center ? rect.cy : 0;\n for (var i = 0, len = input.length; i < len; i += 2) {\n output[i] = (input[i] - translateX) * scale;\n output[i + 1] = (input[i + 1] - translateY) * scale;\n }\n return output;\n };\n return ShapePrimitive;\n}(ShapeBase));\nexport default ShapePrimitive;\n//# sourceMappingURL=ShapePrimitive.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport Bounding from \"../math/bounding\";\nimport Shape from \"./Shape\";\n/**\n * @category Core.Shapes\n */\nvar ShapeRecursive = /** @class */ (function (_super) {\n __extends(ShapeRecursive, _super);\n /**\n * Creates an instance of ShapeRecursive.\n *\n * @param {IShapeRecursiveSettings} [settings={}]\n */\n function ShapeRecursive(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = settings.type || 'ShapeRecursive';\n _this = _super.call(this, settings) || this;\n _this.props.recursions = settings.recursions || 1;\n _this.props.recursionScale = settings.recursionScale || 2;\n _this.props.recursionVertex = settings.recursionVertex || 0;\n // this.bInner = settings.bInner ?? false\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n _this.currentGenerationRecursiveBounding = Bounding.empty();\n return _this;\n }\n /**\n * Unset buffer\n *\n * @param {boolean} [bClearIndexed=false]\n * @param {boolean} [bPropagateToParents=false]\n * @param {boolean} [bPropagateToChildren=false]\n */\n ShapeRecursive.prototype.clearBuffer = function (bClearIndexed, bPropagateToParents) {\n if (bClearIndexed === void 0) { bClearIndexed = false; }\n if (bPropagateToParents === void 0) { bPropagateToParents = true; }\n if (bClearIndexed) {\n this.shapeRecursiveBuffer = undefined;\n }\n _super.prototype.clearBuffer.call(this, bClearIndexed, bPropagateToParents);\n };\n // /**\n // * Set type of recursion\n // *\n // * @param {boolean} inner\n // */\n // public setRecursionnInner(inner: boolean): void {\n // \tthis.bInner = inner\n // \tthis.clearBuffer(true)\n // }\n /**\n *\n * @returns {boolean}\n */\n ShapeRecursive.prototype.isStatic = function () {\n return (typeof this.props.recursions !== 'function' &&\n typeof this.props.recursionScale !== 'function' &&\n typeof this.props.recursionVertex !== 'function' &&\n _super.prototype.isStatic.call(this));\n };\n /**\n *\n * @returns {boolean}\n */\n ShapeRecursive.prototype.isStaticIndexed = function () {\n return typeof this.props.recursions !== 'function' && _super.prototype.isStaticIndexed.call(this);\n };\n /**\n * Return a buffer of children shape with recursion\n *\n * @protected\n * @param {number} generateId\n * @param {ISceneChildPropArguments} propArguments\n * @returns {Float32Array}\n */\n ShapeRecursive.prototype.generateBuffer = function (generateId, propArguments) {\n if (!this.isStatic() || typeof this.shapeRecursiveBuffer === 'undefined') {\n this.bindBuffer(generateId, propArguments);\n }\n return this.shapeRecursiveBuffer;\n };\n /**\n * Generate Recoursive shape buffer\n *\n * @protected\n * @param {number} generateId\n * @param {ISceneChildPropArguments} propArguments\n */\n ShapeRecursive.prototype.bindBuffer = function (generateId, propArguments) {\n if (typeof this.shape === 'undefined') {\n this.shapeRecursiveBuffer = Shape.EMPTY_BUFFER;\n return;\n }\n var recursions = Math.floor(this.getProp('recursions', propArguments, 1));\n var recursionVertex = Math.floor(this.getProp('recursionVertex', propArguments, 0));\n var recursionScale = this.getProp('recursionScale', propArguments, 2);\n var currentRecursionRepetition = {\n index: 1,\n offset: 1,\n count: 1,\n level: { index: 1, offset: recursions > 1 ? 0 : 1, count: 1 },\n };\n if (recursions <= 1) {\n var buffer = this.generateShapeBuffer(propArguments, generateId, currentRecursionRepetition);\n this.currentGenerationRecursiveBounding = this.shape.getBounding();\n this.shapeRecursiveBuffer = buffer;\n return;\n }\n var shapeBuffer = this.generateShapeBuffer(propArguments, generateId, currentRecursionRepetition);\n var storedRecursion = [currentRecursionRepetition];\n var paretRecursionIndex = 0, added = 1;\n var tmpBounding = [undefined, undefined, undefined, undefined];\n var singleShapeBufferLength = shapeBuffer.length;\n var realVertexCount = singleShapeBufferLength / 2;\n var singleShapeVertexCount = recursionVertex <= 0 ? realVertexCount : Math.min(recursionVertex, realVertexCount);\n var recursionOffsetMultiplier = recursionVertex === 0 ? 1 : realVertexCount / Math.min(recursionVertex, realVertexCount);\n var recusiveShapeBuffer = new Float32Array(ShapeRecursive.summmation(recursions, singleShapeVertexCount) * singleShapeBufferLength);\n for (var i = 0; i < singleShapeBufferLength; i += 2) {\n recusiveShapeBuffer[i] = shapeBuffer[i];\n recusiveShapeBuffer[i + 1] = shapeBuffer[i + 1];\n Bounding.add(tmpBounding, recusiveShapeBuffer[i], recusiveShapeBuffer[i + 1]);\n }\n for (var currentRecursion = 1; currentRecursion < recursions; currentRecursion++) {\n var level_offset = recursions > 1 ? currentRecursion / (recursions - 1) : 1;\n var currentRecursionVertexCount = ShapeRecursive.summmation(currentRecursion, singleShapeVertexCount);\n var recursionBufferStartIndex = currentRecursionVertexCount * singleShapeBufferLength;\n var parentRecursion = currentRecursion - 1;\n var parentRecursionBufferStartIndex = parentRecursion === 0\n ? 0\n : ShapeRecursive.summmation(parentRecursion, singleShapeVertexCount) * singleShapeBufferLength;\n for (var currentShapeRecursionRepetition = 0, totalRecursionRepetitions = Math.pow(singleShapeVertexCount, currentRecursion); currentShapeRecursionRepetition < totalRecursionRepetitions; currentShapeRecursionRepetition++, added++) {\n currentRecursionRepetition = {\n index: currentShapeRecursionRepetition + 1,\n offset: totalRecursionRepetitions > 1 ? currentShapeRecursionRepetition / (totalRecursionRepetitions - 1) : 1,\n count: totalRecursionRepetitions,\n level: { index: currentRecursion + 1, offset: level_offset, count: recursions },\n parent: storedRecursion[paretRecursionIndex],\n };\n shapeBuffer = this.generateShapeBuffer(propArguments, generateId, currentRecursionRepetition);\n storedRecursion.push(currentRecursionRepetition);\n var shapeVertexBufferIndex = recursionBufferStartIndex + currentShapeRecursionRepetition * singleShapeBufferLength;\n // const centerVertexIndex = parentRecursionBufferStartIndex + currentShapeRecursionRepetition * 2\n var centerVertexIndex = Math.floor(parentRecursionBufferStartIndex + currentShapeRecursionRepetition * 2 * recursionOffsetMultiplier);\n centerVertexIndex = centerVertexIndex % 2 === 0 ? centerVertexIndex : centerVertexIndex + 1;\n var centerX = recusiveShapeBuffer[centerVertexIndex];\n var centerY = recusiveShapeBuffer[centerVertexIndex + 1];\n for (var i = 0, len = singleShapeBufferLength; i < len; i += 2) {\n // if (this.bInner) {\n // \tconst parentCurrentVertex =\n // \t\tparentRecursionBufferStartIndex +\n // \t\tMath.floor(currentShapeRecursionRepetition / singleShapeVertexCount) *\n // \t\t\tsingleShapeVertexCount *\n // \t\t\trecursionOffsetMultiplier *\n // \t\t\t2\n // \tconst parentX = recusiveShapeBuffer[parentCurrentVertex + i]\n // \tconst parentY = recusiveShapeBuffer[parentCurrentVertex + i + 1]\n // \trecusiveShapeBuffer[shapeVertexBufferIndex + i] = (centerX - parentX) / recursionScale + parentX\n // \trecusiveShapeBuffer[shapeVertexBufferIndex + i + 1] = (centerY - parentY) / recursionScale + parentY\n // const parentX = shapeBuffer[i] / recursionScale ** currentRecursion\n // const parentY = shapeBuffer[i + 1] / recursionScale ** currentRecursion\n // recusiveShapeBuffer[shapeVertexBufferIndex + i] = (centerX - parentX) / recursionScale + parentX\n // recusiveShapeBuffer[shapeVertexBufferIndex + i + 1] = (centerY - parentY) / recursionScale + parentY\n // } else {\n var parentXScaled = shapeBuffer[i] / Math.pow(recursionScale, currentRecursion);\n var parentYScaled = shapeBuffer[i + 1] / Math.pow(recursionScale, currentRecursion);\n recusiveShapeBuffer[shapeVertexBufferIndex + i] = centerX + parentXScaled;\n recusiveShapeBuffer[shapeVertexBufferIndex + i + 1] = centerY + parentYScaled;\n // }\n Bounding.add(tmpBounding, recusiveShapeBuffer[shapeVertexBufferIndex + i], recusiveShapeBuffer[shapeVertexBufferIndex + i + 1]);\n }\n if (added % singleShapeVertexCount === 0) {\n paretRecursionIndex += 1;\n }\n }\n }\n Bounding.bind(this.currentGenerationRecursiveBounding, tmpBounding);\n this.shapeRecursiveBuffer = recusiveShapeBuffer;\n };\n ShapeRecursive.prototype.generateShapeBuffer = function (propArguments, generateId, recursionRepetition) {\n propArguments.recursion = recursionRepetition;\n return _super.prototype.generateBuffer.call(this, generateId, propArguments);\n };\n /**\n * Add this to indexedBuffer\n *\n * @protected\n * @param {number} frameLength\n * @param {IRepetition} repetition\n * @returns {number} nextIndex\n */\n ShapeRecursive.prototype.addIndex = function (frameLength, repetition, recursion\n // singleRepetitionBounding: IShapeBounding\n ) {\n if (this.shape) {\n var propArguments = { repetition: repetition, shape: this };\n var recursions = Math.floor(this.getProp('recursions', propArguments, 1));\n var recursionVertex = Math.floor(this.getProp('recursionVertex', propArguments, 0));\n // const realFrameLength = ShapeRecursive.summmation(recursions, this.shape.getBufferLength() / 2)\n var bufferIndex = {\n shape: this,\n frameLength: frameLength,\n // singleRepetitionBounding,\n repetition: {\n type: repetition.type,\n angle: repetition.angle,\n index: repetition.index,\n count: repetition.count,\n offset: repetition.offset,\n row: {\n index: repetition.row.index,\n count: repetition.row.count,\n offset: repetition.row.offset,\n },\n col: {\n index: repetition.col.index,\n count: repetition.col.count,\n offset: repetition.col.offset,\n },\n },\n };\n if (typeof recursion !== 'undefined') {\n bufferIndex.recursion = {\n index: recursion.index,\n offset: recursion.offset,\n count: recursion.offset,\n level: recursion.level,\n };\n }\n var childIndexedBuffer = this.shape.getIndexedBuffer() || [];\n for (var childIndexed = 0, childIndexedLen = childIndexedBuffer.length; childIndexed < childIndexedLen; childIndexed++) {\n var currentIndexed = __assign({}, childIndexedBuffer[childIndexed]);\n var currentRecursionRepetition = {\n index: 1,\n offset: 1,\n count: 1,\n level: { index: 1, offset: recursions > 1 ? 0 : 1, count: recursions },\n };\n var recursionBufferIndex = __assign(__assign({}, bufferIndex), { recursion: currentRecursionRepetition });\n currentIndexed.parent = currentIndexed.parent\n ? Shape.setIndexedParent(currentIndexed.parent, recursionBufferIndex)\n : recursionBufferIndex;\n this.indexedBuffer.push(currentIndexed);\n }\n if (recursions > 1) {\n var realVertexCount = this.shape.getBufferLength(propArguments) / 2;\n var vertexCount = recursionVertex <= 0 ? realVertexCount : Math.min(recursionVertex, realVertexCount);\n var storedRecursion = this.indexedBuffer.map(function (indexed) { return [\n indexed.parent.recursion,\n ]; });\n var paretRecursionIndex = 0, added = 1;\n for (var i = 1; i < recursions; i++) {\n var level_offset = recursions > 1 ? i / (recursions - 1) : 1;\n for (var j = 0, len = Math.pow(vertexCount, i); j < len; j++, added++) {\n var recursionOffset = len > 1 ? j / (len - 1) : 1;\n for (var childIndexed = 0, childIndexedLen = childIndexedBuffer.length; childIndexed < childIndexedLen; childIndexed++) {\n var currentIndexed = __assign({}, childIndexedBuffer[childIndexed]);\n var currentRecursionRepetition = {\n index: j + 1,\n offset: recursionOffset,\n count: len,\n level: { index: i + 1, offset: level_offset, count: recursions },\n parent: storedRecursion[childIndexed][paretRecursionIndex],\n };\n var recursionBufferIndex = __assign(__assign({}, bufferIndex), { recursion: currentRecursionRepetition });\n currentIndexed.parent = currentIndexed.parent\n ? Shape.setIndexedParent(currentIndexed.parent, recursionBufferIndex)\n : recursionBufferIndex;\n this.indexedBuffer.push(currentIndexed);\n storedRecursion[childIndexed].push(currentRecursionRepetition);\n if (added % vertexCount === 0) {\n paretRecursionIndex += 1;\n }\n }\n }\n }\n }\n }\n };\n /**\n * Retturn summation value\n *\n * @static\n * @param {number} recursion\n * @param {number} vertexCount\n * @returns {number}\n */\n ShapeRecursive.summmation = function (recursion, vertexCount) {\n if (recursion === 1)\n return 1;\n var result = 1;\n for (var i = 1; i < recursion; i++)\n result += Math.pow(vertexCount, i);\n return result;\n };\n /**\n * Empty recursion repetition\n *\n * @static\n * @return {*} {IRecursionRepetition}\n */\n ShapeRecursive.getEmptyRecursion = function () {\n return {\n index: 1,\n offset: 1,\n count: 1,\n level: { index: 1, offset: 1, count: 1 },\n };\n };\n return ShapeRecursive;\n}(Shape));\nexport default ShapeRecursive;\n//# sourceMappingURL=ShapeRecursive.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PI2 } from \"../../math\";\nimport ShapeLoop from \"../ShapeLoop\";\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\n/**\n *\n * @category Core.Primitives\n * @class Circle\n * @extends {ShapeLoop}\n */\nvar Circle = /** @class */ (function (_super) {\n __extends(Circle, _super);\n /**\n * Creates an instance of Circle.\n *\n * @param {ShapeLoopSettings} [settings={}]\n * @memberof Circle\n */\n function Circle(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = 'Circle';\n settings.adaptMode = EShapePrimitiveAdaptMode.None;\n _this = _super.call(this, settings, true) || this;\n _this.loop = {\n start: 0,\n end: PI2,\n inc: function (propArguments) {\n var sideLength = _this.getRepetitionSideLength(propArguments);\n return (1 / Math.pow(sideLength[0] * sideLength[1], 0.25)) * ShapeLoop.PId2;\n },\n vertex: function (shapeLoopRepetition) { return [Math.cos(shapeLoopRepetition.angle), Math.sin(shapeLoopRepetition.angle)]; },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n return Circle;\n}(ShapeLoop));\nexport default Circle;\n//# sourceMappingURL=Circle.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport ShapeBuffer from \"../ShapeBuffer\";\n/**\n *\n * @category Core.Primitives\n * @class Line\n * @extends {ShapeBuffer}\n */\nvar Line = /** @class */ (function (_super) {\n __extends(Line, _super);\n /**\n * Creates an instance of Line.\n *\n * @param {ShapeBaseSettings} [settings={}]\n * @memberof Line\n */\n function Line(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = 'Line';\n settings.shape = [-1, 0, 1, 0];\n settings.adaptMode = EShapePrimitiveAdaptMode.None;\n settings.bClosed = false;\n _this = _super.call(this, settings) || this;\n return _this;\n }\n return Line;\n}(ShapeBuffer));\nexport default Line;\n//# sourceMappingURL=Line.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PI2 } from \"../../math\";\nimport ShapeLoop from \"../ShapeLoop\";\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\n/**\n * Lissajous shape\n *\n * @category Core.Primitives\n * @class Lissajous\n * @extends {ShapeLoop}\n */\nvar Lissajous = /** @class */ (function (_super) {\n __extends(Lissajous, _super);\n /**\n * Creates an instance of Lissajous.\n *\n * @param {ILissajousSettings} [settings={}]\n * @memberof Lissajous\n */\n function Lissajous(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = 'Lissajous';\n settings.loopDependencies = (settings.loopDependencies || []).concat(['wx', 'wy', 'wz']);\n settings.adaptMode = EShapePrimitiveAdaptMode.None;\n _this = _super.call(this, settings, true) || this;\n _this.props.wx = settings.wx || 1;\n _this.props.wy = settings.wy || 2;\n _this.props.wz = settings.wz || 0;\n _this.loop = {\n start: 0,\n end: PI2,\n inc: function (propArguments) {\n var wx = _this.getProp('wx', propArguments);\n var wy = _this.getProp('wy', propArguments);\n var ratio = wx == wy ? ShapeLoop.PId2 : 0.5 - Math.min(49, wx + wy) * 0.01;\n var sideLength = _this.getRepetitionSideLength(propArguments);\n return (1 / Math.pow(sideLength[0] * sideLength[1], 0.25)) * ratio;\n },\n vertex: function (shapeLoopRepetition) {\n return _this.wx === _this.wy\n ? [Math.cos(shapeLoopRepetition.angle + _this.wz), Math.sin(shapeLoopRepetition.angle)]\n : [Math.cos(_this.wx * shapeLoopRepetition.angle + _this.wz), Math.sin(_this.wy * shapeLoopRepetition.angle)];\n },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n Lissajous.prototype.generateLoopBuffer = function (propArguments) {\n this.wx = this.getProp('wx', propArguments, 1);\n this.wy = this.getProp('wy', propArguments, 2);\n this.wz = this.getProp('wz', propArguments, 2);\n return _super.prototype.generateLoopBuffer.call(this, propArguments);\n };\n return Lissajous;\n}(ShapeLoop));\nexport default Lissajous;\n//# sourceMappingURL=Lissajous.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport ShapeLoop from \"../ShapeLoop\";\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport { PI2 } from \"../../math\";\n/**\n * Polygon shape\n *\n * @category Core.Primitives\n * @class Polygon\n * @extends {ShapeLoop}\n */\nvar Polygon = /** @class */ (function (_super) {\n __extends(Polygon, _super);\n function Polygon(settings) {\n if (settings === void 0) { settings = {}; }\n var _a;\n var _this = this;\n settings.type = settings.type || 'Polygon';\n settings.loopDependencies = (settings.loopDependencies || []).concat(['sideNumber']);\n settings.adaptMode = (_a = settings.adaptMode) !== null && _a !== void 0 ? _a : EShapePrimitiveAdaptMode.None;\n _this = _super.call(this, settings, true) || this;\n _this.props.sideNumber = settings.sideNumber;\n _this.loop = {\n start: 0,\n end: PI2,\n inc: function (propArguments) {\n return PI2 / _this.getProp('sideNumber', propArguments, 5);\n },\n vertex: function (shapeLoopRepetition) {\n return [Math.cos(shapeLoopRepetition.angle), Math.sin(shapeLoopRepetition.angle)];\n },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n return Polygon;\n}(ShapeLoop));\nexport default Polygon;\n//# sourceMappingURL=Polygon.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport ShapeBuffer from \"../ShapeBuffer\";\n/**\n *\n * @category Core.Primitives\n * @class Rect\n * @extends {ShapeBuffer}\n */\nvar Rect = /** @class */ (function (_super) {\n __extends(Rect, _super);\n /**\n * Creates an instance of Rect.\n *\n * @param {ShapeBaseSettings} [settings={}]\n * @memberof Rect\n */\n function Rect(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = 'Rect';\n settings.shape = [-1, -1, 1, -1, 1, 1, -1, 1];\n settings.adaptMode = EShapePrimitiveAdaptMode.None;\n _this = _super.call(this, settings) || this;\n return _this;\n }\n return Rect;\n}(ShapeBuffer));\nexport default Rect;\n//# sourceMappingURL=Rect.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport ShapeLoop from \"../ShapeLoop\";\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport { PI2 } from \"../../math\";\n/**\n * Rose shape\n *\n * @category Core.Primitives\n * @class Rose\n * @extends {ShapeLoop}\n */\nvar Rose = /** @class */ (function (_super) {\n __extends(Rose, _super);\n /**\n * Creates an instance of Rose.\n *\n * @param {IRoseSettings} [settings={}]\n * @memberof Rose\n */\n function Rose(settings) {\n if (settings === void 0) { settings = {}; }\n var _a, _b, _c;\n var _this = this;\n settings.type = 'Rose';\n settings.loopDependencies = (settings.loopDependencies || []).concat(['n', 'd']);\n settings.adaptMode = (_a = settings.adaptMode) !== null && _a !== void 0 ? _a : EShapePrimitiveAdaptMode.Scale;\n _this = _super.call(this, settings, true) || this;\n _this.props.n = (_b = settings.n) !== null && _b !== void 0 ? _b : 1;\n _this.props.d = (_c = settings.d) !== null && _c !== void 0 ? _c : 2;\n _this.loop = {\n start: 0,\n end: function (propArguments) {\n return Rose.getFinalAngleFromK(_this.getProp('n', propArguments), _this.getProp('d', propArguments));\n },\n inc: function (propArguments) {\n var n = _this.getProp('n', propArguments);\n var d = _this.getProp('d', propArguments);\n var sideLength = _this.getRepetitionSideLength(propArguments);\n var sides = Math.pow(sideLength[0] * sideLength[1], 0.45);\n var k = d < n ? n / d : 1.5;\n return PI2 / (sides * k);\n },\n vertex: function (shapeLoopRepetition) {\n var f = Math.cos(_this.k * shapeLoopRepetition.angle);\n return [f * Math.cos(shapeLoopRepetition.angle), f * Math.sin(shapeLoopRepetition.angle)];\n },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n Rose.prototype.generateLoopBuffer = function (propArguments) {\n this.k = this.getProp('n', propArguments) / this.getProp('d', propArguments);\n return _super.prototype.generateLoopBuffer.call(this, propArguments);\n };\n /**\n * Return end angle of rose\n *\n * @static\n * @param {number} n\n * @param {number} d\n * @returns {number}\n * @memberof Rose\n */\n Rose.getFinalAngleFromK = function (n, d) {\n if (n == d)\n return PI2;\n var k = n / d;\n var p = n * d;\n if (!Number.isInteger(k) && k % 0.5 == 0)\n return 4 * Math.PI;\n return Math.PI * d * (p % 2 == 0 ? 2 : 1);\n };\n return Rose;\n}(ShapeLoop));\nexport default Rose;\n//# sourceMappingURL=Rose.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport ShapeLoop from \"../ShapeLoop\";\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport { PI2 } from \"../../math\";\n/**\n * Spiral shape\n *\n * @category Core.Primitives\n * @class Spiral\n * @extends {ShapeLoop}\n */\nvar Spiral = /** @class */ (function (_super) {\n __extends(Spiral, _super);\n /**\n * Creates an instance of Spiral.\n *\n * @param {SpiralSettings} [settings={}]\n * @memberof Spiral\n */\n function Spiral(settings) {\n if (settings === void 0) { settings = {}; }\n var _a, _b, _c, _d;\n var _this = this;\n settings.type = 'Spiral';\n settings.bClosed = false;\n settings.adaptMode = (_a = settings.adaptMode) !== null && _a !== void 0 ? _a : EShapePrimitiveAdaptMode.None;\n settings.loopDependencies = (settings.loopDependencies || []).concat(['twists', 'twistsStart', 'spiral']);\n _this = _super.call(this, settings, true) || this;\n _this.props.spiral = (_b = settings.spiral) !== null && _b !== void 0 ? _b : Spiral.types.ARCHIMEDE;\n _this.props.twists = (_c = settings.twists) !== null && _c !== void 0 ? _c : 2;\n _this.props.twistsStart = (_d = settings.twistsStart) !== null && _d !== void 0 ? _d : 0;\n _this.loop = {\n start: function (propArguments) { return PI2 * _this.getProp('twistsStart', propArguments); },\n end: function (propArguments) {\n return PI2 *\n (_this.getProp('twistsStart', propArguments) + _this.getProp('twists', propArguments));\n },\n inc: function (propArguments) {\n var twists = _this.getProp('twists', propArguments);\n var rep = PI2 * twists;\n var sideLength = _this.getRepetitionSideLength(propArguments);\n var radius = 4 + Math.sqrt(sideLength[0] * sideLength[1]);\n return rep / (radius * twists);\n },\n vertex: function (shapeLoopRepetition) {\n var r = _this.r(shapeLoopRepetition.angle);\n return [r * Math.cos(shapeLoopRepetition.angle), r * Math.sin(shapeLoopRepetition.angle)];\n },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n Spiral.prototype.generateLoopBuffer = function (propArguments) {\n this.spiral = this.getProp('spiral', propArguments);\n this.r = Spiral.getRFromTSpiralType(this.spiral);\n return _super.prototype.generateLoopBuffer.call(this, propArguments);\n };\n // /**\n // * Set single or multiple props\n // *\n // * @param {(keyof ISpiralProps | ISpiralProps)} key\n // * @param {*} [value]\n // * @memberof Spiral\n // */\n // public setProp(key: keyof ISpiralProps | ISpiralProps, value?: any): void {\n // \tkey = typeof key === 'string' ? { [key]: value } : key\n // \tif (('twists' in key || 'twistsStart' in key) && this.props.loop) {\n // \t\tthis.props.loop.start = undefined\n // \t\tthis.props.loop.end = undefined\n // \t}\n // \tsuper.setProp(key as keyof IShapeLoopProps, value)\n // }\n /**\n * Point position and scale factor for spiral types\n *\n * @static\n * @param {TSpiralType} spiral\n * @returns {number}\n * @memberof Spiral\n */\n Spiral.getRFromTSpiralType = function (spiral) {\n switch (spiral) {\n case Spiral.types.ARCHIMEDE:\n return function (angle) { return angle / 10; };\n case Spiral.types.HYPERBOLIC:\n return function (angle) { return (1 / angle) * 3; };\n case Spiral.types.FERMAT:\n return function (angle) { return Math.pow(angle, 0.5) / 3; };\n case Spiral.types.LITUUS:\n return function (angle) { return Math.pow(angle, -0.5); };\n case Spiral.types.LOGARITHMIC:\n return function (angle) { return Math.pow(Math.E, (angle * 0.2)) / 10; };\n }\n return function (angle) { return angle; };\n };\n /**\n * Spural types\n *\n * @static\n * @type {{ [name in TSpiralType]: TSpiralType }}\n * @memberof Spiral\n */\n Spiral.types = {\n ARCHIMEDE: 'ARCHIMEDE',\n HYPERBOLIC: 'HYPERBOLIC',\n FERMAT: 'FERMAT',\n LITUUS: 'LITUUS',\n LOGARITHMIC: 'LOGARITHMIC',\n };\n return Spiral;\n}(ShapeLoop));\nexport default Spiral;\n//# sourceMappingURL=Spiral.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport ShapeLoop from \"../ShapeLoop\";\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport { PI2 } from \"../../math\";\n/**\n * ShperShape\n *\n * @category Core.Primitives\n * @class SuperShape\n * @extends {ShapeLoop}\n */\nvar SuperShape = /** @class */ (function (_super) {\n __extends(SuperShape, _super);\n /**\n * Creates an instance of SuperShape.\n *\n * @param {ISuperShapeSettings} [settings={}]\n * @memberof SuperShape\n */\n function SuperShape(settings) {\n if (settings === void 0) { settings = {}; }\n var _a, _b, _c, _d, _e, _f, _g;\n var _this = this;\n settings.type = 'SuperShape';\n settings.loopDependencies = (settings.loopDependencies || []).concat(['a', 'b', 'm', 'n1', 'n2', 'n3']);\n settings.adaptMode = (_a = settings.adaptMode) !== null && _a !== void 0 ? _a : EShapePrimitiveAdaptMode.Scale;\n _this = _super.call(this, settings, true) || this;\n _this.props.a = (_b = settings.a) !== null && _b !== void 0 ? _b : 1;\n _this.props.b = (_c = settings.b) !== null && _c !== void 0 ? _c : 1;\n _this.props.m = (_d = settings.m) !== null && _d !== void 0 ? _d : 6;\n _this.props.n1 = (_e = settings.n1) !== null && _e !== void 0 ? _e : 1;\n _this.props.n2 = (_f = settings.n2) !== null && _f !== void 0 ? _f : 1;\n _this.props.n3 = (_g = settings.n3) !== null && _g !== void 0 ? _g : 1;\n _this.loop = {\n start: 0,\n end: PI2,\n inc: function (propArguments) {\n var sideLength = _this.getRepetitionSideLength(propArguments);\n return Math.PI / Math.pow(sideLength[0] * sideLength[1], 0.5);\n },\n vertex: function (shapeLoopRepetition) {\n var angle = shapeLoopRepetition.angle;\n var m = (_this.m * angle) / 4;\n var a = Math.pow(Math.abs(Math.cos(m) / _this.a), _this.n2);\n var b = Math.pow(Math.abs(Math.sin(m) / _this.b), _this.n3);\n var raux = Math.pow((a + b), (1 / _this.n1));\n var r = raux === 0 ? 1 : 1 / raux;\n return [r * Math.cos(angle), r * Math.sin(angle)];\n },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n SuperShape.prototype.generateLoopBuffer = function (propArguments) {\n this.a = this.getProp('a', propArguments);\n this.b = this.getProp('b', propArguments);\n this.m = this.getProp('m', propArguments);\n this.n1 = this.getProp('n1', propArguments);\n this.n2 = this.getProp('n2', propArguments);\n this.n3 = this.getProp('n3', propArguments);\n return _super.prototype.generateLoopBuffer.call(this, propArguments);\n };\n return SuperShape;\n}(ShapeLoop));\nexport default SuperShape;\n//# sourceMappingURL=SuperShape.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport ShapeBuffer from \"../ShapeBuffer\";\n/**\n * Triangle ShapeBuffer\n *\n * @category Core.Primitives\n */\nvar Triangle = /** @class */ (function (_super) {\n __extends(Triangle, _super);\n /**\n * Creates an instance of Triangleeee.\n *\n * @param {ShapeBaseSettings} [settings={}]\n * @memberof Triangle\n */\n function Triangle(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = 'Triangle';\n settings.shape = [-1, -1, 1, 0, -1, 1];\n settings.adaptMode = EShapePrimitiveAdaptMode.None;\n _this = _super.call(this, settings) || this;\n return _this;\n }\n return Triangle;\n}(ShapeBuffer));\nexport default Triangle;\n//# sourceMappingURL=Triangle.js.map","/**\n * Repetition type enumerator.\n *\n * @category Core.Enums\n * @internal\n */\nexport var ERepetitionType;\n(function (ERepetitionType) {\n /**\n * Defines the type of repetition of the shape,\n * in a circular way starting from the center of the scene\n * @order 1\n */\n ERepetitionType[ERepetitionType[\"Ring\"] = 1] = \"Ring\";\n /**\n * Defines the type of repetition of the shape,\n * on a nxm grid starting from the center of the scene\n * @order 2\n */\n ERepetitionType[ERepetitionType[\"Matrix\"] = 2] = \"Matrix\";\n})(ERepetitionType || (ERepetitionType = {}));\n//# sourceMappingURL=scene-child.js.map","/**\n *\n *\n * @category Core.Enums\n */\nexport var EShapePrimitiveAdaptMode;\n(function (EShapePrimitiveAdaptMode) {\n /**\n * The buffer is not changed\n * @order 1\n */\n EShapePrimitiveAdaptMode[EShapePrimitiveAdaptMode[\"None\"] = 0] = \"None\";\n /**\n * The buffer is scaled in a range between [-1, -1] and [1,1]\n * @order 2\n */\n EShapePrimitiveAdaptMode[EShapePrimitiveAdaptMode[\"Scale\"] = 2] = \"Scale\";\n /**\n * The buffer is scaled in a range between [-1, -1] and [1,1] and is centered\n * @order 3\n */\n EShapePrimitiveAdaptMode[EShapePrimitiveAdaptMode[\"Center\"] = 4] = \"Center\";\n /**\n * The buffer is adapted centrally and expanded in a range between [-1, -1] and [1,1]\n * @order 4\n */\n EShapePrimitiveAdaptMode[EShapePrimitiveAdaptMode[\"Fill\"] = 8] = \"Fill\";\n})(EShapePrimitiveAdaptMode || (EShapePrimitiveAdaptMode = {}));\n//# sourceMappingURL=shape-base.js.map","/**\n * Meta\n */\nexport { version, author, license } from \"./meta\";\n// Set glMatrixArrayType\nimport { glMatrix } from 'gl-matrix';\nglMatrix.setMatrixArrayType(Array);\n/**\n * Core\n */\nexport { default as Scene } from \"./core/Scene\";\nexport { default as SceneChild } from \"./core/SceneChild\";\nexport { default as Group } from \"./core/Group\";\n// Shapes\nexport { default as ShapePrimitive } from \"./core/shapes/ShapePrimitive\";\nexport { default as ShapeLoop } from \"./core/shapes/ShapeLoop\";\nexport { default as ShapeBuffer } from \"./core/shapes/ShapeBuffer\";\nexport { default as Shape } from \"./core/shapes/Shape\";\nexport { default as ShapeRecursive } from \"./core/shapes/ShapeRecursive\";\nexport { default as Line } from \"./core/shapes/primitives/Line\";\nexport { default as Triangle } from \"./core/shapes/primitives/Triangle\";\nexport { default as Rect } from \"./core/shapes/primitives/Rect\";\nexport { default as Polygon } from \"./core/shapes/primitives/Polygon\";\nexport { default as Circle } from \"./core/shapes/primitives/Circle\";\nexport { default as Rose } from \"./core/shapes/primitives/Rose\";\nexport { default as Spiral } from \"./core/shapes/primitives/Spiral\";\nexport { default as Lissajous } from \"./core/shapes/primitives/Lissajous\";\nexport { default as SuperShape } from \"./core/shapes/primitives/SuperShape\";\n// Utilities\nexport { lerp, clamp, relativeClamp, toDegrees, toRadians, now, noise, angleFromRepetition, angle2FromRepetition, distanceFromRepetition, } from \"./Utilites\";\nexport { default as Vec2 } from \"./core/math/Vec2\";\nexport { PHI, PI2, log } from \"./core/math\";\n/**\n * Services\n */\nexport { default as DrawerCanvas } from \"./services/drawers/drawer-canvas/DrawerCanvas\";\nexport { default as Animation } from \"./services/animation/Simple\";\nexport { default as Easings } from \"./services/animation/Easings\";\n//# sourceMappingURL=index-light.js.map","var version = '0.3.3';\nvar author = 'Gennaro Bosone ';\nvar license = 'GPL-3.0-or-later';\nexport { version, author, license };\n//# sourceMappingURL=meta.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport Simple from \"./Simple\";\nimport SceneUtilitiesExtended from \"../scene-utilities/SceneUtilitiesExtended\";\nimport * as Urpflanze from \"../../index-light\";\n/**\n * @ignore\n * @internal\n * @category Services.Animation\n */\nvar Animation = {\n composeAnimation: function (scene, prop_name, animation) {\n switch (animation.type) {\n case 'simple': {\n var simpleAnimation = __assign({}, animation.value);\n simpleAnimation.from = SceneUtilitiesExtended.getTransformedValue(scene, prop_name, simpleAnimation.from);\n simpleAnimation.to = SceneUtilitiesExtended.getTransformedValue(scene, prop_name, simpleAnimation.to);\n return Simple.compose(simpleAnimation);\n }\n case 'raw': {\n var rawValue = animation.value;\n return new Function('Urpflanze', 'scene', \"\\\"use strict\\\"; return \" + rawValue.raw)(Urpflanze, scene);\n }\n // case 'random': {\n // const randomValue = SetProp.getRandomFunctionForProp(prop_name)\n // return ({ shape }) => randomValue(shape.rand())\n // }\n }\n },\n};\nexport default Animation;\n//# sourceMappingURL=Animation.js.map","/**\n * Easing functions\n *\n * @category Services.Animation\n */\nvar Easings = {\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n linear: function (time, start, end, duration) { return (end * time) / duration + start; },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duratte duration\n * @returns {number}\n */\n quadraticIn: function (time, start, end, duratte) {\n time /= duratte;\n return end * time * time + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quadraticOut: function (time, start, end, duration) {\n time /= duration;\n return -end * time * (time - 2) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quadraticInOut: function (time, start, end, duration) {\n time /= duration / 2;\n if (time < 1)\n return (end / 2) * time * time + start;\n time--;\n return (-end / 2) * (time * (time - 2) - 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n cubicIn: function (time, start, end, duration) {\n time /= duration;\n return end * time * time * time + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n cubicOut: function (time, start, end, duration) {\n time /= duration;\n time--;\n return end * (time * time * time + 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n cubicInOut: function (time, start, end, duration) {\n time /= duration / 2;\n if (time < 1)\n return (end / 2) * time * time * time + start;\n time -= 2;\n return (end / 2) * (time * time * time + 2) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quarticIn: function (time, start, end, duration) {\n time /= duration;\n return end * time * time * time * time + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quarticOut: function (time, start, end, duration) {\n time /= duration;\n time--;\n return -end * (time * time * time * time - 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quarticInOut: function (time, start, end, duration) {\n time /= duration / 2;\n if (time < 1)\n return (end / 2) * time * time * time * time + start;\n time -= 2;\n return (-end / 2) * (time * time * time * time - 2) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quinticIn: function (time, start, end, duration) {\n time /= duration;\n return end * time * time * time * time * time + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quinticOut: function (time, start, end, duration) {\n time /= duration;\n time--;\n return end * (time * time * time * time * time + 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quinticInOut: function (time, start, end, duration) {\n time /= duration / 2;\n if (time < 1)\n return (end / 2) * time * time * time * time * time + start;\n time -= 2;\n return (end / 2) * (time * time * time * time * time + 2) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n sinusoidalIn: function (time, start, end, duration) {\n return -end * Math.cos((time / duration) * (Math.PI / 2)) + end + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n sinusoidalOut: function (time, start, end, duration) {\n return end * Math.sin((time / duration) * (Math.PI / 2)) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n sinusoidalInOut: function (time, start, end, duration) {\n return (-end / 2) * (Math.cos((Math.PI * time) / duration) - 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n exponentialIn: function (time, start, end, duration) {\n return end * Math.pow(2, 10 * (time / duration - 1)) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n exponentialOut: function (time, start, end, duration) {\n return end * (-Math.pow(2, (-10 * time) / duration) + 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n exponentialInOut: function (time, start, end, duration) {\n time /= duration / 2;\n if (time < 1)\n return (end / 2) * Math.pow(2, 10 * (time - 1)) + start;\n time--;\n return (end / 2) * (-Math.pow(2, -10 * time) + 2) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n circularIn: function (time, start, end, duration) {\n time /= duration;\n return -end * (Math.sqrt(1 - time * time) - 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n circularOut: function (time, start, end, duration) {\n time /= duration;\n time--;\n return end * Math.sqrt(1 - time * time) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n circularInOut: function (time, start, end, duration) {\n time /= duration / 2;\n if (time < 1)\n return (-end / 2) * (Math.sqrt(1 - time * time) - 1) + start;\n time -= 2;\n return (end / 2) * (Math.sqrt(1 - time * time) + 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @param {number} a amplitude (optional)\n * @param {number} p period (optional)\n * @return {number}\n */\n elasticIn: function (time, start, end, duration, a, p) {\n if (time == 0) {\n return start;\n }\n if ((time /= duration) == 1) {\n return start + end;\n }\n if (!p) {\n p = duration * 0.3;\n }\n var s = 0;\n if (!a || a < Math.abs(end)) {\n a = end;\n s = p / 4;\n }\n else {\n s = (p / (2 * Math.PI)) * Math.asin(end / a);\n }\n return -(a * Math.pow(2, 10 * (time -= 1)) * Math.sin(((time * duration - s) * (2 * Math.PI)) / p)) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @param {number} a amplitude (optional)\n * @param {number} p period (optional)\n * @return {number}\n */\n elasticOut: function (time, start, end, duration, a, p) {\n if (time == 0) {\n return start;\n }\n if ((time /= duration) == 1) {\n return start + end;\n }\n if (!p) {\n p = duration * 0.3;\n }\n var s = 0;\n if (!a || a < Math.abs(end)) {\n a = end;\n s = p / 4;\n }\n else {\n s = (p / (2 * Math.PI)) * Math.asin(end / a);\n }\n return a * Math.pow(2, -10 * time) * Math.sin(((time * duration - s) * (2 * Math.PI)) / p) + end + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @param {number} a amplitude (optional)\n * @param {number} p period (optional)\n * @return {number}\n */\n elasticInOut: function (time, start, end, duration, a, p) {\n if (time == 0) {\n return start;\n }\n if ((time /= duration / 2) == 2) {\n return start + end;\n }\n if (!p) {\n p = duration * (0.3 * 1.5);\n }\n var s = 0;\n if (!a || a < Math.abs(end)) {\n a = end;\n s = p / 4;\n }\n else {\n s = (p / (2 * Math.PI)) * Math.asin(end / a);\n }\n if (time < 1) {\n return -0.5 * (a * Math.pow(2, 10 * (time -= 1)) * Math.sin(((time * duration - s) * (2 * Math.PI)) / p)) + start;\n }\n return (a * Math.pow(2, -10 * (time -= 1)) * Math.sin(((time * duration - s) * (2 * Math.PI)) / p) * 0.5 + end + start);\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @param {number} s overshoot (optional)\n * @return {number}\n */\n backIn: function (time, start, end, duration, s) {\n if (typeof s == 'undefined') {\n s = 1.70158;\n }\n return end * (time /= duration) * time * ((s + 1) * time - s) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @param {number} s overshoot (optional)\n * @return {number}\n */\n backOut: function (time, start, end, duration, s) {\n if (typeof s == 'undefined') {\n s = 1.70158;\n }\n return end * ((time = time / duration - 1) * time * ((s + 1) * time + s) + 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @param {number} s overshoot (optional)\n * @return {number}\n */\n backInOut: function (time, start, end, duration, s) {\n if (typeof s == 'undefined') {\n s = 1.70158;\n }\n if ((time /= duration / 2) < 1) {\n return (end / 2) * (time * time * (((s *= 1.525) + 1) * time - s)) + start;\n }\n return (end / 2) * ((time -= 2) * time * (((s *= 1.525) + 1) * time + s) + 2) + start;\n },\n /**\n * @param {number} t current time\n * @param {number} b start value\n * @param {number} c end value\n * @param {number} d duration\n * @return {number}\n */\n bounceIn: function (time, start, end, duration) {\n return end - Easings.bounceOut(duration - time, 0, end, duration) + start;\n },\n /**\n * @param {number} t current time\n * @param {number} b start value\n * @param {number} c end value\n * @param {number} d duration\n * @return {number}\n */\n bounceOut: function (time, start, end, duration) {\n if ((time /= duration) < 1 / 2.75) {\n return end * (7.5625 * time * time) + start;\n }\n else if (time < 2 / 2.75) {\n return end * (7.5625 * (time -= 1.5 / 2.75) * time + 0.75) + start;\n }\n else if (time < 2.5 / 2.75) {\n return end * (7.5625 * (time -= 2.25 / 2.75) * time + 0.9375) + start;\n }\n return end * (7.5625 * (time -= 2.625 / 2.75) * time + 0.984375) + start;\n },\n /**\n *\n *\n * @param {number} time\n * @param {number} start\n * @param {number} end\n * @param {number} duration\n * @returns\n */\n bounceInOut: function (time, start, end, duration) {\n if (time < duration / 2) {\n return Easings.bounceIn(time * 2, 0, end, duration) * 0.5 + start;\n }\n return Easings.bounceOut(time * 2 - duration, 0, end, duration) * 0.5 + end * 0.5 + start;\n },\n};\nexport default Easings;\n//# sourceMappingURL=Easings.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { parseColorAndConvert, IConvertedColor } from \"../../Color\";\nimport { toArray } from \"../../Utilites\";\nimport Easings from \"./Easings\";\n/**\n * @category Services.Animation\n */\nvar Simple = {\n loop: function (props) {\n return Simple.compose(__assign(__assign({ mode: 'sinusoidal', modeFunction: 'cos' }, props), { type: 'loop', delay: undefined }));\n },\n uncontrolledLoop: function (props) {\n return Simple.compose(__assign(__assign({ mode: 'easing', modeFunction: 'linear' }, props), { type: 'uncontrolled-loop' }));\n },\n static: function (props) {\n return Simple.compose(__assign(__assign({ mode: 'easing', modeFunction: 'linear' }, props), { type: 'static' }));\n },\n compose: function (simpleAnimation) {\n if (typeof simpleAnimation.from !== 'string' && typeof simpleAnimation.to !== 'string') {\n var bArray = Array.isArray(simpleAnimation.from) || Array.isArray(simpleAnimation.to);\n //@ts-ignore\n var from_1 = bArray ? toArray(simpleAnimation.from) : simpleAnimation.from;\n //@ts-ignore\n var to_1 = bArray ? toArray(simpleAnimation.to) : simpleAnimation.to;\n var vCallback_1 = bArray\n ? function (current_index, v) {\n var a = (simpleAnimation.invertOdd && current_index % 2 == 1 ? to_1 : from_1);\n var b = (simpleAnimation.invertOdd && current_index % 2 == 1 ? from_1 : to_1);\n return simpleAnimation.typeValue === 'int'\n ? [Math.round(a[0] + v * (b[0] - a[0])), Math.round(a[1] + v * (b[1] - a[1]))]\n : [a[0] + v * (b[0] - a[0]), a[1] + v * (b[1] - a[1])];\n }\n : function (current_index, v) {\n var a = (simpleAnimation.invertOdd && current_index % 2 == 1 ? to_1 : from_1);\n var b = (simpleAnimation.invertOdd && current_index % 2 == 1 ? from_1 : to_1);\n return simpleAnimation.typeValue === 'int' ? Math.round(a + v * (b - a)) : a + v * (b - a);\n };\n return createSimpleAnimationCallback(simpleAnimation, function (props, v) {\n return vCallback_1(props.repetition.index, v);\n });\n }\n else {\n var from_2 = parseColorAndConvert(simpleAnimation.from);\n var to_2 = parseColorAndConvert(simpleAnimation.to);\n var vCallback_2 = simpleAnimation.colorTransitionMode == 'hue' ? interpolateColorHSL : interpolateColorRGB;\n if (typeof from_2 !== 'undefined' && typeof to_2 !== 'undefined') {\n return createSimpleAnimationCallback(simpleAnimation, function (props, v) {\n var a = simpleAnimation.invertOdd && props.repetition.index % 2 == 1 ? to_2 : from_2;\n var b = simpleAnimation.invertOdd && props.repetition.index % 2 == 1 ? from_2 : to_2;\n return vCallback_2(a, b, v);\n });\n }\n return function () { return 0; };\n }\n },\n};\nfunction createSimpleAnimationCallback(animation, value) {\n var _a = animation, duration = _a.duration, type = _a.type, mode = _a.mode, modeFunction = _a.modeFunction, delay = _a.delay;\n if (type === 'static') {\n if (delay && delay > 0)\n return function SimpleAnimation(props) {\n var _a, _b, _c;\n return value(props, (((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0) <= delay\n ? 0\n : (((_b = props.shape.scene) === null || _b === void 0 ? void 0 : _b.currentTime) || 0) - delay >= duration\n ? 1\n : Easings[modeFunction]((((_c = props.shape.scene) === null || _c === void 0 ? void 0 : _c.currentTime) || 0) - delay, 0, 1, duration));\n };\n else\n return function SimpleAnimation(props) {\n var _a, _b;\n return value(props, (((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0) <= duration\n ? Easings[modeFunction](((_b = props.shape.scene) === null || _b === void 0 ? void 0 : _b.currentTime) || 0, 0, 1 - 0, duration)\n : 1);\n };\n }\n else {\n if (type === 'loop') {\n if (mode == 'sinusoidal') {\n return function SimpleAnimation(props) {\n var _a;\n var frequency = ((((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0 || 0) * 2 * Math.PI) / duration;\n return value(props, 0.5 + Math[modeFunction](frequency) * 0.5);\n };\n } /* easing */\n else {\n return function SimpleAnimation(props) {\n var _a;\n var d2 = duration / 2;\n var t = (((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0) % duration;\n return value(props, t <= d2\n ? Easings[modeFunction](t, 0, 1, d2)\n : Easings[modeFunction](d2 - (t - d2), 0, 1, d2));\n };\n }\n } // uncontrolled-loop\n else {\n if (mode == 'sinusoidal') {\n return function SimpleAnimation(props) {\n var _a;\n var time = (((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0) % (duration + delay);\n time = time <= delay ? 0 : time - delay;\n var frequency = ((time || 0) * 2 * Math.PI) / duration;\n return value(props, 0.5 + Math[modeFunction](frequency) * 0.5);\n };\n }\n else {\n if (delay && delay > 0)\n return function SimpleAnimation(props) {\n var _a;\n var time = (((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0) % (duration + delay);\n return value(props, time <= delay\n ? 0\n : time - delay >= duration\n ? 1\n : Easings[modeFunction](time - delay, 0, 1, duration));\n };\n else\n return function SimpleAnimation(props) {\n var _a;\n var time = (((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0) % duration;\n return value(props, time <= duration ? Easings[modeFunction](time, 0, 1 - 0, duration) : 1);\n };\n }\n }\n }\n}\nfunction interpolateColorRGB(start, end, v) {\n var r = start.r + v * (end.r - start.r);\n var g = start.g + v * (end.g - start.g);\n var b = start.b + v * (end.b - start.b);\n var alpha = start.alpha + v * (end.alpha - start.alpha);\n return \"rgba(\" + Math.floor(r) + \",\" + Math.floor(g) + \",\" + Math.floor(b) + \",\" + alpha + \")\";\n}\nfunction interpolateColorHSL(start, end, v) {\n var h = start.h + v * (end.h - start.h);\n var s = start.s + v * (end.s - start.s);\n var l = start.l + v * (end.l - start.l);\n var alpha = start.alpha + v * (end.alpha - start.alpha);\n return \"hsla(\" + h + \",\" + s + \"%,\" + l + \"%,\" + alpha + \")\";\n}\nexport default Simple;\n//# sourceMappingURL=Simple.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport Scene from \"../../core/Scene\";\nimport Timeline from \"../timeline/Timeline\";\nimport SceneUtilities from \"../scene-utilities/SceneUtilities\";\nimport Emitter from \"../events/Emitter\";\nimport { parseColor } from \"../../Color\";\nimport { pmod } from \"../../core/math\";\n/**\n * Abstract Drawer\n *\n * @category Services.Drawer\n * @abstract\n * @class Drawer\n * @extends {Emitter}\n * @template IADrawerOptions\n * @template IDrawerEvents\n */\nvar Drawer = /** @class */ (function (_super) {\n __extends(Drawer, _super);\n function Drawer(scene, ratio, duration, framerate) {\n if (scene === void 0) { scene = undefined; }\n if (ratio === void 0) { ratio = undefined; }\n var _this = _super.call(this) || this;\n _this.timeline = new Timeline(duration, framerate);\n _this.ratio = ratio || (scene && scene.width && scene.height ? scene.width / scene.height : 1);\n if (scene) {\n var size = Math.max(scene.width, scene.height);\n var width = _this.ratio >= 1 ? size : size * _this.ratio;\n var height = _this.ratio >= 1 ? size / _this.ratio : size;\n scene.resize(width, height);\n _this.setScene(scene);\n }\n _this.draw_id = null;\n _this.redraw_id = null;\n _this.animation_id = null;\n _this.draw = _this.draw.bind(_this);\n _this.animate = _this.animate.bind(_this);\n _this.startAnimation = _this.startAnimation.bind(_this);\n return _this;\n }\n /**\n * Set scene\n *\n * @param {Scene} scene\n */\n Drawer.prototype.setScene = function (scene) {\n this.scene = scene;\n // if (!this.resolution && this.scene.width) this.resolution = this.scene.width\n };\n /**\n * Return scene\n *\n * @return {*} {Scene}\n */\n Drawer.prototype.getScene = function () {\n return this.scene;\n };\n /**\n * Return timeline\n *\n * @return {*} {Timeline}\n */\n Drawer.prototype.getTimeline = function () {\n return this.timeline;\n };\n /**\n * Resize scene and canvas\n *\n * @param {number} width\n * @param {number} height\n * @param {number} [ratio]\n */\n Drawer.prototype.resize = function (width, height, ratio) {\n var _this = this;\n ratio = ratio || this.ratio || width / height;\n var size = Math.max(width, height);\n width = ratio >= 1 ? size : size * ratio;\n height = ratio >= 1 ? size / ratio : size;\n this.ratio = ratio;\n if (this.scene) {\n this.scene.resize(width, height);\n Scene.walk(function (sceneChild) {\n if (sceneChild.data) {\n if (sceneChild.data.props) {\n var props_1 = sceneChild.data.props;\n Object.keys(props_1).forEach(function (name) {\n SceneUtilities.setProp(sceneChild, name, props_1[name], _this.scene);\n });\n }\n if (sceneChild.data.style) {\n var style_1 = sceneChild.data.style;\n Object.keys(style_1).forEach(function (name) {\n SceneUtilities.setDrawerProp(sceneChild, name, style_1[name], _this.scene);\n });\n }\n }\n }, this.scene);\n }\n };\n /**\n * Resize by ratio\n *\n */\n Drawer.prototype.setRatio = function (ratio) {\n if (this.scene) {\n this.resize(this.scene.width, this.scene.height, ratio);\n }\n };\n /**\n * Return drawer ratio\n */\n Drawer.prototype.getRatio = function () {\n return this.ratio;\n };\n /**\n * Set draw option\n *\n * @template K\n * @param {(K | IADrawerOptions)} name\n */\n Drawer.prototype.setOption = function (name, value) {\n if (typeof name == 'object') {\n var keys = Object.keys(name);\n for (var i = 0, len = keys.length; i < len; i++) {\n this.drawerOptions[keys[i]] = name[keys[i]];\n }\n }\n else {\n this.drawerOptions[name] = value;\n }\n };\n /**\n * Return option valie or default\n *\n * @template K\n * @param {K} name\n * @param {IADrawerOptions[K]} defaultValue\n */\n Drawer.prototype.getOption = function (name, defaultValue) {\n var _a;\n return (_a = this.drawerOptions[name]) !== null && _a !== void 0 ? _a : defaultValue;\n };\n /**\n * Return all options\n */\n Drawer.prototype.getOptions = function () {\n return this.drawerOptions;\n };\n /**\n * Internal tick animation\n */\n Drawer.prototype.animate = function (timestamp) {\n if (this.timeline.bSequenceStarted()) {\n this.animation_id = requestAnimationFrame(this.animate);\n if (this.timeline.tick(timestamp))\n this.draw();\n }\n };\n /**\n * Start animation drawing\n */\n Drawer.prototype.startAnimation = function () {\n this.stopAnimation();\n this.timeline.start();\n this.animation_id = requestAnimationFrame(this.animate);\n };\n /**\n * Stop animation drawing\n */\n Drawer.prototype.stopAnimation = function () {\n this.timeline.stop();\n if (this.animation_id)\n cancelAnimationFrame(this.animation_id);\n };\n /**\n * Pause animation drawing\n */\n Drawer.prototype.pauseAnimation = function () {\n this.timeline.pause();\n if (this.animation_id)\n cancelAnimationFrame(this.animation_id);\n };\n /**\n * Play animation drawing\n */\n Drawer.prototype.playAnimation = function () {\n this.timeline.start();\n requestAnimationFrame(this.animate);\n };\n /**\n * Redraw\n *\n * @returns {void}\n * @memberof DrawerCanvas\n */\n Drawer.prototype.redraw = function () {\n if (!this.timeline.bSequenceStarted()) {\n this.draw_id && cancelAnimationFrame(this.draw_id);\n if (typeof this.drawerOptions.ghosts === undefined || this.drawerOptions.ghosts === 0)\n this.timeline.stop();\n this.draw_id = requestAnimationFrame(this.draw);\n }\n else if (typeof this.drawerOptions.ghosts === undefined || this.drawerOptions.ghosts === 0) {\n this.stopAnimation();\n this.redraw_id && cancelAnimationFrame(this.redraw_id);\n this.redraw_id = requestAnimationFrame(this.startAnimation);\n }\n };\n /**\n * Return a style value\n *\n * @static\n * @template T\n * @param {ShapePrimitive} shape\n * @param {keyof T} key\n * @param {IDrawerPropArguments} propArguments\n * @param {*} [defaultValue]\n * @returns {*}\n */\n Drawer.getStreamDrawerProp = function (shape, key, propArguments, defaultValue) {\n var attribute = shape.style[key];\n if (typeof attribute === 'function') {\n attribute = attribute(propArguments);\n }\n return attribute !== null && attribute !== void 0 ? attribute : defaultValue;\n };\n /**\n * Each ghosts index and create drawerOptions to pass at the draw method\n *\n * @static\n * @template T\n * @param {T} drawerOptions\n * @param {Timeline} timeline\n * @param {((ghostDrawerOptions: T & { ghostIndex?: number }) => any)} ghostCallback\n */\n Drawer.eachGhosts = function (drawerOptions, timeline, ghostCallback) {\n if (drawerOptions.ghosts) {\n var ghostDrawerOptions = __assign({}, drawerOptions);\n var drawAtTime = timeline.getTime();\n var sequenceDuration = timeline.getDuration();\n var ghostRepetition = {\n offset: 0,\n index: 0,\n count: drawerOptions.ghosts,\n };\n for (var i = 1; i <= drawerOptions.ghosts; i++) {\n ghostRepetition.index = i;\n ghostRepetition.offset = ghostRepetition.index / ghostRepetition.count;\n var ghostTime = drawAtTime -\n (drawerOptions.ghostSkipFunction\n ? drawerOptions.ghostSkipFunction(ghostRepetition, drawAtTime)\n : i * drawerOptions.ghostSkipTime);\n ghostDrawerOptions.ghostIndex = i;\n ghostDrawerOptions.time = pmod(ghostTime, sequenceDuration);\n ghostCallback(ghostDrawerOptions);\n }\n }\n };\n /**\n * Create color based on ghostMultiplier\n *\n * @static\n * @param {any} color\n * @param {number} ghostMultiplier\n * @return {*} {(string | undefined)}\n */\n Drawer.ghostifyColor = function (color, ghostMultiplier) {\n if (typeof color === 'string' || typeof color === 'number') {\n var parsed = parseColor(color);\n if (parsed) {\n var ghostAlpha = parsed.alpha * ghostMultiplier;\n return parsed.type === 'rgb'\n ? \"rgba(\" + parsed.a + \",\" + parsed.b + \",\" + parsed.c + \",\" + ghostAlpha + \")\"\n : \"hsla(\" + parsed.a + \",\" + parsed.b + \"%,\" + parsed.c + \"%,\" + ghostAlpha + \")\";\n }\n }\n return color;\n };\n return Drawer;\n}(Emitter));\nexport default Drawer;\n//# sourceMappingURL=Drawer.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport Drawer from \"../Drawer\";\nimport FrameBuffer from \"./FrameBuffer\";\nimport { now } from \"../../../Utilites\";\nimport Vec2 from \"../../../core/math/Vec2\";\n/**\n *\n * @category Services.Drawer\n * @extends {Emitter}\n */\nvar DrawerCanvas = /** @class */ (function (_super) {\n __extends(DrawerCanvas, _super);\n function DrawerCanvas(scene, canvasOrContainer, drawerOptions, ratio, duration, framerate, bBuffering) {\n if (ratio === void 0) { ratio = undefined; }\n if (bBuffering === void 0) { bBuffering = false; }\n var _a, _b, _c, _d, _e;\n var _this = _super.call(this, scene, ratio, duration, framerate) || this;\n _this.bBuffering = false;\n _this.drawerOptions = {};\n _this.drawerOptions.clear = (_a = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.clear) !== null && _a !== void 0 ? _a : true;\n _this.drawerOptions.time = (_b = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.time) !== null && _b !== void 0 ? _b : 0;\n _this.drawerOptions.simmetricLines = (_c = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.simmetricLines) !== null && _c !== void 0 ? _c : 0;\n _this.drawerOptions.noBackground = (_d = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.noBackground) !== null && _d !== void 0 ? _d : false;\n _this.drawerOptions.ghosts = (drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.ghosts) || 0;\n _this.drawerOptions.ghostAlpha = (drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.ghostAlpha) === false ? false : true;\n _this.drawerOptions.ghostSkipTime = (_e = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.ghostSkipTime) !== null && _e !== void 0 ? _e : 30;\n _this.drawerOptions.ghostSkipFunction = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.ghostSkipFunction;\n _this.drawerOptions.backgroundImage = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.backgroundImage;\n _this.drawerOptions.backgroundImageFit = (drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.backgroundImageFit) || 'cover';\n _this.bBuffering = bBuffering;\n _this.buffer = new FrameBuffer();\n if ((typeof HTMLCanvasElement !== 'undefined' && canvasOrContainer instanceof HTMLCanvasElement) ||\n (typeof OffscreenCanvas !== 'undefined' && canvasOrContainer instanceof OffscreenCanvas)) {\n var canvas = canvasOrContainer;\n _this.setCanvas(canvas);\n }\n else if (canvasOrContainer) {\n var canvas = document.createElement('canvas');\n var container = canvasOrContainer;\n container.appendChild(canvas);\n _this.setCanvas(canvas);\n }\n return _this;\n }\n DrawerCanvas.prototype.setBuffering = function (bBuffering) {\n this.bBuffering = bBuffering;\n this.flushBuffer();\n };\n DrawerCanvas.prototype.getBBuffering = function () {\n return this.bBuffering;\n };\n /**\n * Set scene\n *\n * @param {Scene} scene\n * @memberof CanvasDrawer\n */\n DrawerCanvas.prototype.setScene = function (scene) {\n _super.prototype.setScene.call(this, scene);\n if (this.canvas) {\n this.setCanvas(this.canvas); // and flush\n }\n };\n /**\n * Set the canvas or append to container\n *\n * @param {(HTMLElement | HTMLCanvasElement | OffscreenCanvas)} canvasOrContainer\n * @memberof CanvasDrawer\n */\n DrawerCanvas.prototype.setCanvas = function (canvasOrContainer) {\n var canvas;\n if (typeof HTMLElement !== 'undefined' && canvasOrContainer instanceof HTMLElement) {\n if (typeof HTMLCanvasElement !== 'undefined' && canvasOrContainer instanceof HTMLCanvasElement) {\n canvas = canvasOrContainer;\n }\n else {\n canvas = (this.canvas || document.createElement('canvas'));\n while (canvasOrContainer.lastChild)\n canvasOrContainer.removeChild(canvasOrContainer.lastChild);\n canvasOrContainer.appendChild(canvas);\n }\n }\n else {\n canvas = canvasOrContainer;\n }\n this.canvas = canvas;\n this.context = this.canvas.getContext('2d', {\n alpha: true,\n desynchronized: this.bBuffering !== true,\n });\n if (this.scene) {\n this.resize(this.scene.width, this.scene.height); // and flush\n }\n };\n /**\n * Return canvas element\n *\n * @returns {(HTMLCanvasElement | OffscreenCanvas)}\n * @memberof DrawerCanvas\n */\n DrawerCanvas.prototype.getCanvas = function () {\n return this.canvas;\n };\n /**\n * Return canvas context\n *\n * @returns {(CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D | null)}\n * @memberof DrawerCanvas\n */\n DrawerCanvas.prototype.getContext = function () {\n return this.context;\n };\n /**\n * Resize scene and canvas\n *\n * @param {number} width\n * @param {number} height\n * @param {number} [ratio]\n * @memberof DrawerCanvas\n */\n DrawerCanvas.prototype.resize = function (width, height, ratio) {\n _super.prototype.resize.call(this, width, height, ratio);\n if (this.canvas && this.scene) {\n this.canvas.width = this.scene.width;\n this.canvas.height = this.scene.height;\n if (typeof HTMLCanvasElement !== 'undefined' && this.canvas instanceof HTMLCanvasElement) {\n this.canvas.style.width = this.scene.width + 'px';\n this.canvas.style.height = this.scene.height + 'px';\n }\n }\n this.flushBuffer();\n this.dispatch('drawer-canvas:resize');\n this.redraw();\n };\n DrawerCanvas.prototype.flushBuffer = function () {\n if (this.bBuffering) {\n this.buffer.flush();\n this.dispatch('drawer-canvas:buffer_flush');\n }\n };\n DrawerCanvas.prototype.getStoredFrames = function () {\n if (this.bBuffering) {\n return this.buffer.getStoredFrames();\n }\n return [];\n };\n /**\n * Set draw option\n *\n * @template K\n * @param {(K | IDrawerOptions)} name\n * @param {Required[K]} [value]\n * @memberof CanvasDrawer\n */\n DrawerCanvas.prototype.setOption = function (name, value) {\n _super.prototype.setOption.call(this, name, value);\n this.flushBuffer();\n };\n // public preload(): Promise {\n // \tif (this.bBuffering && this.scene) {\n // \t\treturn new Promise((resolve, reject) => {\n // \t\t\tthis.flushBuffer()\n // \t\t\tconst sequence = this.timeline.getSequence()\n // \t\t\tlet canvas: HTMLCanvasElement | OffscreenCanvas\n // \t\t\tif (typeof OffscreenCanvas !== 'undefined') canvas = new OffscreenCanvas(this.scene.width, this.scene.height)\n // \t\t\telse {\n // \t\t\t\tcanvas = document.createElement('canvas')\n // \t\t\t\tcanvas.width = this.scene.width\n // \t\t\t\tcanvas.height = this.scene.height\n // \t\t\t}\n // \t\t\tconst context: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D | null = canvas.getContext('2d', {\n // \t\t\t\talpha: true,\n // \t\t\t\tdesynchronized: false,\n // \t\t\t})\n // \t\t\tif (!context) reject('Create context error')\n // \t\t\tconst drawerOptions = { ...this.drawerOptions }\n // \t\t\tconst sequenceEndTime = this.timeline.getSequenceEndTime()\n // \t\t\tfor (let i = 0; i < sequence.frames; i++) {\n // \t\t\t\t// requestAnimationFrame(() => {\n // \t\t\t\tconst time = this.timeline.getFrameTime(i)\n // \t\t\t\tdrawerOptions.clear = this.drawerOptions.clear || i === 0\n // \t\t\t\tdrawerOptions.time = time\n // \t\t\t\tDrawerCanvas.draw(this.scene, context, drawerOptions, this.resolution)\n // \t\t\t\tif (drawerOptions.ghosts) {\n // \t\t\t\t\tfor (let gi = 1; gi <= drawerOptions.ghosts; gi++) {\n // \t\t\t\t\t\tconst ghostTime =\n // \t\t\t\t\t\t\ttime -\n // \t\t\t\t\t\t\t(drawerOptions.ghostSkipFunction\n // \t\t\t\t\t\t\t\t? drawerOptions.ghostSkipFunction(gi)\n // \t\t\t\t\t\t\t\t: gi * (drawerOptions.ghostSkipTime ?? 30))\n // \t\t\t\t\t\tdrawerOptions.clear = false\n // \t\t\t\t\t\tdrawerOptions.ghostIndex = gi\n // \t\t\t\t\t\tdrawerOptions.time =\n // \t\t\t\t\t\t\tghostTime < 0\n // \t\t\t\t\t\t\t\t? ghostTime + sequenceEndTime\n // \t\t\t\t\t\t\t\t: ghostTime > sequenceEndTime\n // \t\t\t\t\t\t\t\t? ghostTime % sequenceEndTime\n // \t\t\t\t\t\t\t\t: ghostTime\n // \t\t\t\t\t\tDrawerCanvas.draw(this.scene, context, drawerOptions, this.resolution)\n // \t\t\t\t\t}\n // \t\t\t\t}\n // \t\t\t\tthis.buffer.push(i, context as CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D)\n // \t\t\t\t// })\n // \t\t\t}\n // \t\t\tresolve(true)\n // \t\t})\n // \t} else {\n // \t\treturn Promise.reject()\n // \t}\n // }\n /**\n * Draw current scene\n *\n * @returns {number}\n * @memberof DrawerCanvas\n */\n DrawerCanvas.prototype.draw = function () {\n var _this = this;\n var _a;\n if (typeof this.scene === 'undefined')\n return -1;\n var draw_time = 0;\n var timeline = this.timeline;\n var drawAtTime = timeline.getTime();\n var drawerOptions = __assign(__assign({}, this.drawerOptions), { ghostIndex: undefined, clear: this.drawerOptions.clear || timeline.getCurrentFrame() <= 1, time: drawAtTime });\n var currentFrame = timeline.getFrameAtTime(drawAtTime);\n this.dispatch('drawer-canvas:before_draw', {\n currentFrame: currentFrame,\n currentTime: drawAtTime,\n });\n if (this.bBuffering && this.buffer.exist(currentFrame)) {\n (_a = this.context) === null || _a === void 0 ? void 0 : _a.putImageData(this.buffer.get(currentFrame), 0, 0);\n }\n else {\n if (drawerOptions.ghosts) {\n Drawer.eachGhosts(drawerOptions, timeline, function (ghostDrawerOptions) {\n ghostDrawerOptions.clear = drawerOptions.clear && ghostDrawerOptions.ghostIndex === 1;\n draw_time += _this.applyDraw(ghostDrawerOptions);\n });\n drawerOptions.clear = false;\n }\n draw_time += this.applyDraw(drawerOptions);\n if (this.bBuffering && this.context) {\n this.buffer.push(currentFrame, this.context);\n if (this.buffer.count() >= this.timeline.getFramesCount()) {\n this.dispatch('drawer-canvas:buffer_loaded');\n }\n }\n }\n return draw_time;\n };\n /**\n * Redraw\n *\n * @returns {void}\n * @memberof DrawerCanvas\n */\n DrawerCanvas.prototype.redraw = function () {\n if (!this.timeline.bSequenceStarted()) {\n this.draw_id && cancelAnimationFrame(this.draw_id);\n !this.drawerOptions.clear &&\n (typeof this.drawerOptions.ghosts === undefined || this.drawerOptions.ghosts === 0) &&\n this.timeline.stop();\n this.draw_id = requestAnimationFrame(this.draw);\n }\n else if (!this.drawerOptions.clear &&\n (typeof this.drawerOptions.ghosts === undefined || this.drawerOptions.ghosts === 0)) {\n this.stopAnimation();\n this.redraw_id && cancelAnimationFrame(this.redraw_id);\n this.redraw_id = requestAnimationFrame(this.startAnimation);\n }\n };\n DrawerCanvas.prototype.applyDraw = function (options) {\n var _a, _b;\n var start_time = now();\n var scene = this.scene;\n var context = this.context;\n context.globalCompositeOperation = 'source-over';\n var time = (_a = options.time) !== null && _a !== void 0 ? _a : 0;\n var simmetricLines = (_b = options.simmetricLines) !== null && _b !== void 0 ? _b : 0;\n var clear = options.clear;\n var noBackground = options.noBackground;\n var backgroundImage = options.backgroundImage;\n var bGhost = typeof options.ghosts !== 'undefined' &&\n options.ghosts > 0 &&\n typeof options.ghostIndex !== 'undefined' &&\n options.ghostIndex > 0;\n var ghostMultiplier = bGhost ? 1 - options.ghostIndex / (options.ghosts + 0.5) : 0;\n var ghostAlpha = options.ghostAlpha === true;\n var width = scene.width;\n var height = scene.height;\n var ratio = width / height;\n if (clear) {\n if (noBackground) {\n context.clearRect(0, 0, width, height);\n }\n else {\n context.fillStyle = scene.background;\n context.fillRect(0, 0, width, height);\n if (backgroundImage) {\n var sourceWidth = backgroundImage instanceof SVGImageElement ? backgroundImage.width.baseVal.value : backgroundImage.width;\n var sourceHeight = backgroundImage instanceof SVGImageElement ? backgroundImage.height.baseVal.value : backgroundImage.height;\n var sourceRatio = sourceWidth / sourceHeight;\n var x = 0, y = 0, bgWidth = width, bgHeight = height;\n if (sourceRatio !== ratio) {\n if (options.backgroundImageFit === 'contain') {\n bgWidth = ratio > sourceRatio ? (sourceWidth * height) / sourceHeight : width;\n bgHeight = ratio > sourceRatio ? height : (sourceHeight * width) / sourceWidth;\n }\n else {\n bgWidth = ratio < sourceRatio ? (sourceWidth * height) / sourceHeight : width;\n bgHeight = ratio < sourceRatio ? height : (sourceHeight * width) / sourceWidth;\n }\n x = (width - bgWidth) / 2;\n y = (height - bgHeight) / 2;\n }\n context.drawImage(backgroundImage, x, y, bgWidth, bgHeight);\n }\n }\n if (simmetricLines > 0) {\n DrawerCanvas.drawSimmetricLines(context, simmetricLines, width, height, scene.color);\n }\n }\n {\n var logFillColorWarn_1 = false;\n var logStrokeColorWarn_1 = false;\n scene.currentTime = time;\n scene.getChildren().forEach(function (sceneChild) {\n if (!sceneChild.data ||\n (!(sceneChild.data.visible === false) && !(bGhost && sceneChild.data.disableGhost === true))) {\n sceneChild.generate(time, true);\n context.save();\n sceneChild.stream(function (stream) {\n var currentIndex = stream.currentIndexing;\n var shape = currentIndex.shape;\n var propArguments = {\n canvasContext: context,\n shape: shape,\n // singleRepetitionBounding: currentIndex.singleRepetitionBounding,\n repetition: {\n type: currentIndex.repetition.type,\n angle: currentIndex.repetition.angle,\n index: currentIndex.repetition.index,\n count: currentIndex.repetition.count,\n offset: currentIndex.repetition.offset,\n row: {\n index: currentIndex.repetition.row.index,\n count: currentIndex.repetition.row.count,\n offset: currentIndex.repetition.row.offset,\n },\n col: {\n index: currentIndex.repetition.col.index,\n count: currentIndex.repetition.col.count,\n offset: currentIndex.repetition.col.offset,\n },\n },\n parent: currentIndex.parent,\n };\n var composite = Drawer.getStreamDrawerProp(shape, 'composite', propArguments, 'source-over');\n context.globalCompositeOperation = composite;\n context.beginPath();\n context.moveTo(stream.buffer[stream.frameBufferIndex], stream.buffer[stream.frameBufferIndex + 1]);\n for (var i = 2; i < stream.frameLength; i += 2) {\n context.lineTo(stream.buffer[stream.frameBufferIndex + i], stream.buffer[stream.frameBufferIndex + i + 1]);\n }\n currentIndex.shape.isClosed() && context.closePath();\n var alpha = Drawer.getStreamDrawerProp(shape, 'opacity', propArguments, 1);\n context.globalAlpha = alpha;\n var shadowColor = Drawer.getStreamDrawerProp(shape, 'shadowColor', propArguments);\n var shadowBlur = Drawer.getStreamDrawerProp(shape, 'shadowBlur', propArguments);\n var shadowOffsetX = Drawer.getStreamDrawerProp(shape, 'shadowOffsetX', propArguments);\n var shadowOffsetY = Drawer.getStreamDrawerProp(shape, 'shadowOffsetY', propArguments);\n context.shadowColor = shadowColor;\n context.shadowBlur = shadowBlur;\n shadowOffsetX && (context.shadowOffsetX = shadowOffsetX);\n shadowOffsetY && (context.shadowOffsetY = shadowOffsetY);\n var fill = Drawer.getStreamDrawerProp(shape, 'fill', propArguments);\n if (typeof fill !== 'undefined') {\n if (bGhost && ghostAlpha) {\n var color = Drawer.ghostifyColor(fill, ghostMultiplier);\n if (color) {\n fill = color;\n }\n else if (!logFillColorWarn_1) {\n console.warn(\"[Urpflanze:DrawerCanvas] Unable ghost fill color '\" + fill + \"',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tplease enter a rgba or hsla color\");\n logFillColorWarn_1 = true;\n }\n }\n context.fillStyle = fill;\n context.fill();\n }\n var stroke = Drawer.getStreamDrawerProp(shape, 'stroke', propArguments, typeof fill === 'undefined' ? scene.color : undefined);\n var lineWidth = Drawer.getStreamDrawerProp(shape, 'lineWidth', propArguments, 1);\n if (stroke) {\n if (bGhost && ghostAlpha) {\n var color = Drawer.ghostifyColor(stroke, ghostMultiplier);\n if (color) {\n stroke = color;\n }\n else if (!logStrokeColorWarn_1) {\n console.warn(\"[Urpflanze:DrawerCanvas] Unable ghost stroke color '\" + stroke + \"',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tplease enter a rgba or hsla color\");\n logStrokeColorWarn_1 = true;\n }\n lineWidth *= ghostMultiplier;\n }\n var lineJoin = Drawer.getStreamDrawerProp(shape, 'lineJoin', propArguments);\n var lineCap = Drawer.getStreamDrawerProp(shape, 'lineCap', propArguments);\n var lineDash = Drawer.getStreamDrawerProp(shape, 'lineDash', propArguments);\n var lineDashOffset = Drawer.getStreamDrawerProp(shape, 'lineDashOffset', propArguments);\n var miterLimit = Drawer.getStreamDrawerProp(shape, 'miterLimit', propArguments);\n context.setLineDash.call(context, lineDash || []);\n context.lineJoin = lineJoin;\n context.lineCap = lineCap;\n context.lineDashOffset = lineDashOffset;\n context.miterLimit = miterLimit;\n context.lineWidth = lineWidth;\n context.strokeStyle = stroke;\n context.stroke();\n }\n });\n context.restore();\n }\n });\n }\n var end_time = now();\n return end_time - start_time;\n };\n DrawerCanvas.drawSimmetricLines = function (context, simmetricLines, width, height, color) {\n var offset = Math.PI / simmetricLines;\n var size = Math.max(width, height);\n var center = [size / 2, size / 2];\n for (var i = 0; i < simmetricLines; i++) {\n var a = [-size, -size];\n var b = [size * 2, size * 2];\n var rotate = i * offset + Math.PI / 4;\n Vec2.rotateZ(a, center, rotate);\n Vec2.rotateZ(b, center, rotate);\n context.beginPath();\n context.strokeStyle = color;\n context.lineWidth = 1;\n context.moveTo(a[0], a[1]);\n context.lineTo(b[0], b[1]);\n context.stroke();\n }\n };\n return DrawerCanvas;\n}(Drawer));\nexport default DrawerCanvas;\n//# sourceMappingURL=DrawerCanvas.js.map","/**\n *\n * @category Services.Drawer\n * @class FrameBuffer\n */\nvar FrameBuffer = /** @class */ (function () {\n function FrameBuffer() {\n this.frames = {};\n }\n FrameBuffer.prototype.exist = function (frameNumber) {\n return typeof this.frames[frameNumber] !== 'undefined';\n };\n FrameBuffer.prototype.get = function (frameNumber) {\n return this.exist(frameNumber) ? this.frames[frameNumber] : null;\n };\n FrameBuffer.prototype.count = function () {\n return Object.keys(this.frames).length;\n };\n FrameBuffer.prototype.push = function (frameNumber, context) {\n this.frames[frameNumber] = context.getImageData(0, 0, context.canvas.width, context.canvas.height);\n };\n FrameBuffer.prototype.flush = function () {\n this.frames = {};\n };\n FrameBuffer.prototype.getStoredFrames = function () {\n return Object.keys(this.frames).map(function (e) { return +e; });\n };\n return FrameBuffer;\n}());\nexport default FrameBuffer;\n//# sourceMappingURL=FrameBuffer.js.map","/**\n * Class used for emit and dispatch events\n *\n * @category Services.Emitter\n * @abstract\n * @class Emitter\n * @template EventTypes\n */\nvar Emitter = /** @class */ (function () {\n function Emitter() {\n this.callbacks = {};\n }\n /**\n * Attach callback at event\n *\n * @param {keyof EventTypes} e\n * @param {(value: EventTypes[keyof EventTypes]) => any} callback\n * @memberof Emitter\n */\n Emitter.prototype.attach = function (e, callback) {\n if (!(e in this.callbacks)) {\n this.callbacks[e] = [];\n }\n this.callbacks[e].push(callback);\n };\n /**\n * Remove callbach listener at event\n *\n * @param {keyof EventTypes} e\n * @param {(value: EventTypes[keyof EventTypes]) => void} callback\n * @memberof Emitter\n */\n Emitter.prototype.detach = function (e, callback) {\n if (e in this.callbacks) {\n var index = this.callbacks[e].indexOf(callback);\n if (index >= 0) {\n this.callbacks[e].splice(index, 1);\n }\n }\n };\n /**\n * Dispatch event\n *\n * @param {keyof EventTypes} e\n * @param {EventTypes[keyof EventTypes]} [params]\n * @memberof Emitter\n */\n Emitter.prototype.dispatch = function (e, params) {\n if (e in this.callbacks) {\n for (var i = 0, len = this.callbacks[e].length; i < len; i++)\n if (this.callbacks[e][i](params) === false)\n break;\n }\n };\n return Emitter;\n}());\nexport default Emitter;\n//# sourceMappingURL=Emitter.js.map","import Spiral from \"../../core/shapes/primitives/Spiral\";\nimport { EShapePrimitiveAdaptMode } from \"../../core/types/shape-base\";\nvar OptionShapePrimitiveAdaptMode = [\n { key: 'None', value: EShapePrimitiveAdaptMode.None },\n { key: 'Scale', value: EShapePrimitiveAdaptMode.Scale },\n { key: 'Center', value: EShapePrimitiveAdaptMode.Center },\n { key: 'Fill', value: EShapePrimitiveAdaptMode.Fill },\n];\nvar OptionSpiralType = [\n { key: 'ARCHIMEDE', value: Spiral.types.ARCHIMEDE },\n { key: 'FERMAT', value: Spiral.types.FERMAT },\n { key: 'HYPERBOLIC', value: Spiral.types.HYPERBOLIC },\n { key: 'LITUUS', value: Spiral.types.LITUUS },\n { key: 'LOGARITHMIC', value: Spiral.types.LOGARITHMIC },\n];\n/**\n * @category Services.Scene Utilities\n */\nvar SceneChildUtilitiesData = {\n repetitions: {\n animable: true,\n name: 'repetitions',\n label: 'Repetitions',\n type: 'range',\n min: 1,\n max: 200,\n step: 1,\n default: 1,\n default_animate: 20,\n canBArray: true,\n transformation: 'none',\n dataType: 'props',\n type_value: 'int',\n },\n distance: {\n animable: true,\n name: 'distance',\n label: 'Distance',\n type: 'range',\n min: -100,\n max: 100,\n step: 0.1,\n default: 0,\n canBArray: true,\n default_animate: 25,\n transformation: 'scene-size-percentage',\n dataType: 'props',\n },\n displace: {\n animable: true,\n name: 'displace',\n label: 'Displace',\n type: 'range',\n min: -360,\n max: 360,\n step: 1,\n default: 0,\n default_animate: 360,\n transformation: 'angle',\n dataType: 'props',\n },\n squeezeX: {\n animable: true,\n name: 'squeezeX',\n label: 'SqueezeX',\n type: 'range',\n min: -0.2,\n max: 0.2,\n step: 0.01,\n default: 0,\n default_animate: 0.1,\n transformation: 'scene-size-percentage-inverse',\n dataType: 'props',\n },\n squeezeY: {\n animable: true,\n name: 'squeezeY',\n label: 'SqueezeY',\n type: 'range',\n min: -0.2,\n max: 0.2,\n step: 0.01,\n default: 0,\n default_animate: 0.1,\n transformation: 'scene-size-percentage-inverse',\n dataType: 'props',\n },\n rotateX: {\n animable: true,\n name: 'rotateX',\n label: 'RotateX',\n type: 'range',\n min: -360,\n max: 360,\n step: 1,\n default: 0,\n default_animate: 360,\n transformation: 'angle',\n dataType: 'props',\n },\n rotateY: {\n animable: true,\n name: 'rotateY',\n label: 'RotateY',\n type: 'range',\n min: -360,\n max: 360,\n step: 1,\n default: 0,\n default_animate: 360,\n transformation: 'angle',\n dataType: 'props',\n },\n rotateZ: {\n animable: true,\n name: 'rotateZ',\n label: 'RotateZ',\n type: 'range',\n min: -360,\n max: 360,\n step: 1,\n default: 0,\n default_animate: 360,\n transformation: 'angle',\n dataType: 'props',\n },\n skewX: {\n animable: true,\n name: 'skewX',\n label: 'SkewX',\n type: 'range',\n min: -90,\n max: 90,\n step: 1,\n default: 0,\n default_animate: 1,\n transformation: 'angle',\n dataType: 'props',\n },\n skewY: {\n animable: true,\n name: 'skewY',\n label: 'SkewY',\n type: 'range',\n min: -90,\n max: 90,\n step: 1,\n default: 0,\n default_animate: 1,\n transformation: 'angle',\n dataType: 'props',\n },\n translate: {\n animable: true,\n name: 'translate',\n label: 'Translate',\n type: 'multiple-range',\n min: -100,\n max: 100,\n step: 0.1,\n default: 0,\n default_animate: 0,\n initialArray: true,\n transformation: 'scene-size-percentage',\n dataType: 'props',\n },\n scale: {\n animable: true,\n name: 'scale',\n label: 'Scale',\n type: 'multiple-range',\n min: -5,\n max: 5,\n step: 0.01,\n default: 1,\n default_animate: 3,\n transformation: 'none',\n dataType: 'props',\n },\n transformOrigin: {\n animable: true,\n name: 'transformOrigin',\n label: 'Transform Origin',\n type: 'multiple-range',\n min: -1,\n max: 1,\n step: 0.01,\n default: [0, 0],\n default_animate: [-1, 1],\n initialArray: true,\n transformation: 'none',\n dataType: 'props',\n },\n perspective: {\n animable: true,\n name: 'perspective',\n label: 'Perspective',\n type: 'range',\n min: 0,\n max: 1,\n step: 0.01,\n default: 0,\n default_animate: 0.8,\n transformation: 'none',\n dataType: 'props',\n },\n perspectiveOrigin: {\n animable: true,\n name: 'perspectiveOrigin',\n label: 'Perspective Origin',\n type: 'multiple-range',\n min: -1,\n max: 1,\n step: 0.01,\n default: [0, 0],\n default_animate: [-1, 1],\n initialArray: true,\n transformation: 'none',\n dataType: 'props',\n },\n // primitive style\n fill: {\n animable: true,\n name: 'fill',\n label: 'Fill',\n type: 'color',\n default: '#000',\n default_animate: '#fff',\n transformation: 'none',\n dataType: 'drawer',\n },\n stroke: {\n animable: true,\n name: 'stroke',\n label: 'Stroke',\n type: 'color',\n default: '#fff',\n default_animate: '#000',\n transformation: 'none',\n dataType: 'drawer',\n },\n lineWidth: {\n animable: true,\n name: 'lineWidth',\n label: 'Stroke weight',\n type: 'slider',\n min: 0,\n max: 30,\n step: 0.01,\n default: 0.1,\n default_animate: 3,\n transformation: 'scene-size-percentage',\n dataType: 'drawer',\n },\n bClosed: {\n name: 'bClosed',\n label: 'Closed',\n type: 'checkbox',\n default: undefined,\n transformation: 'none',\n dataType: 'settings',\n },\n bUseParent: {\n name: 'bUseParent',\n label: 'Use parent repetition',\n type: 'checkbox',\n default: false,\n transformation: 'none',\n dataType: 'settings',\n },\n bUseRecursion: {\n name: 'bUseRecursion',\n label: 'Use recursion repetition',\n type: 'checkbox',\n default: false,\n transformation: 'none',\n dataType: 'settings',\n },\n vertexCallback: {\n name: 'vertexCallback',\n label: 'vertexCallback',\n type: 'function',\n default: undefined,\n transformation: 'none',\n dataType: 'settings',\n },\n adaptMode: {\n name: 'adaptMode',\n label: 'Adapt',\n type: 'radio',\n options: OptionShapePrimitiveAdaptMode,\n default: undefined,\n transformation: 'none',\n dataType: 'settings',\n },\n // recursion\n recursions: {\n animable: true,\n name: 'recursion',\n label: 'Recursion',\n type: 'range',\n min: 1,\n max: 8,\n step: 1,\n default: 1,\n default_animate: 2,\n transformation: 'none',\n dataType: 'props',\n type_value: 'int',\n },\n recursionScale: {\n animable: true,\n name: 'recursionScale',\n label: 'Recursion Scale',\n type: 'range',\n min: 0.1,\n max: 5,\n step: 0.01,\n default: 1,\n default_animate: 2,\n transformation: 'none',\n dataType: 'props',\n },\n recursionVertex: {\n animable: true,\n name: 'recursionVertex',\n label: 'Recursion Vertex',\n type: 'range',\n min: 1,\n max: 100,\n step: 1,\n default: 10,\n default_animate: 20,\n transformation: 'none',\n dataType: 'props',\n type_value: 'int',\n },\n // primitive\n sideLength: {\n animable: true,\n name: 'sideLength',\n label: 'Side Length',\n type: 'multiple-range',\n min: 0.01,\n max: 100,\n step: 0.1,\n default: 10,\n default_animate: 20,\n transformation: 'scene-size-percentage',\n dataType: 'props',\n },\n // polygon\n sideNumber: {\n animable: true,\n name: 'sideNumber',\n label: 'Side Number',\n type: 'range',\n min: 1,\n max: 20,\n step: 1,\n default: 5,\n default_animate: 2,\n transformation: 'none',\n dataType: 'props',\n },\n // rose\n n: {\n animable: true,\n name: 'n',\n label: 'n',\n type: 'range',\n min: 1,\n max: 10,\n step: 1,\n default: 1,\n default_animate: 3,\n transformation: 'none',\n dataType: 'props',\n },\n d: {\n animable: true,\n name: 'd',\n label: 'd',\n type: 'range',\n min: 1,\n max: 10,\n step: 1,\n default: 2,\n default_animate: 4,\n transformation: 'none',\n dataType: 'props',\n },\n // lissajous\n wx: {\n animable: true,\n name: 'wx',\n label: 'wx',\n type: 'range',\n min: 1,\n max: 10,\n step: 1,\n default: 1,\n default_animate: 3,\n transformation: 'none',\n dataType: 'props',\n },\n wy: {\n animable: true,\n name: 'wy',\n label: 'wy',\n type: 'range',\n min: 1,\n max: 10,\n step: 1,\n default: 2,\n default_animate: 4,\n transformation: 'none',\n dataType: 'props',\n },\n wz: {\n animable: true,\n name: 'wz',\n label: 'wz',\n type: 'range',\n min: -360,\n max: 360,\n step: 1,\n default: 0,\n default_animate: 360,\n transformation: 'angle',\n dataType: 'props',\n },\n // spiral\n twists: {\n animable: true,\n name: 'twists',\n label: 'Twists',\n type: 'range',\n min: 1,\n max: 60,\n step: 0.1,\n default: 1,\n default_animate: 3,\n transformation: 'none',\n dataType: 'props',\n },\n twistsStart: {\n animable: true,\n name: 'twists_start',\n label: 'Twists start',\n type: 'range',\n min: 0,\n max: 60,\n step: 0.1,\n default: 0,\n default_animate: 1,\n transformation: 'none',\n dataType: 'props',\n },\n spiral: {\n name: 'spiral',\n label: 'Spiral type',\n type: 'select',\n options: OptionSpiralType,\n default: Spiral.types.ARCHIMEDE,\n transformation: 'none',\n dataType: 'props',\n },\n // supershape\n a: {\n animable: true,\n name: 'a',\n label: 'A',\n type: 'range',\n min: -5,\n max: 5,\n step: 0.1,\n default: 1,\n default_animate: 0.1,\n transformation: 'none',\n dataType: 'props',\n },\n b: {\n animable: true,\n name: 'b',\n label: 'B',\n type: 'range',\n min: -5,\n max: 5,\n step: 0.1,\n default: 1,\n default_animate: 0.1,\n transformation: 'none',\n dataType: 'props',\n },\n m: {\n animable: true,\n name: 'm',\n label: 'm',\n type: 'range',\n min: 1,\n max: 20,\n step: 1,\n default: 1,\n default_animate: 6,\n transformation: 'none',\n dataType: 'props',\n type_value: 'int',\n },\n n1: {\n animable: true,\n name: 'n1',\n label: 'n1',\n type: 'range',\n min: -3,\n max: 3,\n step: 0.01,\n default: 1,\n default_animate: 0.1,\n transformation: 'none',\n dataType: 'props',\n },\n n2: {\n animable: true,\n name: 'n2',\n label: 'n2',\n type: 'range',\n min: -3,\n max: 3,\n step: 0.01,\n default: 1,\n default_animate: 0.1,\n transformation: 'none',\n dataType: 'props',\n },\n n3: {\n animable: true,\n name: 'n3',\n label: 'n3',\n type: 'range',\n min: -3,\n max: 3,\n step: 0.01,\n default: 1,\n default_animate: 0.1,\n transformation: 'none',\n dataType: 'props',\n },\n // loop\n 'loop.start': {\n name: 'loop.start',\n label: 'start',\n type: 'range',\n default: undefined,\n min: 0,\n max: 100,\n step: 0.01,\n transformation: 'none',\n dataType: 'props',\n },\n 'loop.end': {\n name: 'loop.end',\n label: 'end',\n type: 'range',\n default: undefined,\n min: 0,\n max: 100,\n step: 0.01,\n transformation: 'none',\n dataType: 'props',\n },\n 'loop.inc': {\n name: 'loop.inc',\n label: 'inc',\n type: 'range',\n default: undefined,\n min: 0.01,\n max: 100,\n step: 0.01,\n transformation: 'none',\n dataType: 'props',\n },\n};\nexport default SceneChildUtilitiesData;\n//# sourceMappingURL=SceneChildUtilitiesData.js.map","var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nimport { v1 as uuidv1 } from 'uuid';\nimport SceneChild from \"../../core/SceneChild\";\n// Shapes\nimport Line from \"../../core/shapes/primitives/Line\";\nimport Triangle from \"../../core/shapes/primitives/Triangle\";\nimport Rect from \"../../core/shapes/primitives/Rect\";\nimport Polygon from \"../../core/shapes/primitives/Polygon\";\nimport Circle from \"../../core/shapes/primitives/Circle\";\nimport Rose from \"../../core/shapes/primitives/Rose\";\nimport Spiral from \"../../core/shapes/primitives/Spiral\";\nimport Lissajous from \"../../core/shapes/primitives/Lissajous\";\nimport SuperShape from \"../../core/shapes/primitives/SuperShape\";\nimport Shape from \"../../core/shapes/Shape\";\nimport ShapeRecursive from \"../../core/shapes/ShapeRecursive\";\nimport ShapePrimitive from \"../../core/shapes/ShapePrimitive\";\nimport ShapeLoop from \"../../core/shapes/ShapeLoop\";\nimport ShapeBuffer from \"../../core/shapes/ShapeBuffer\";\nimport Scene from \"../../core/Scene\";\nimport Group from \"../../core/Group\";\nimport ShapeBase from \"../../core/shapes/ShapeBase\";\nimport Animation from \"../animation/Animation\";\nimport SceneChildUtilitiesData from \"./SceneChildUtilitiesData\";\nimport SceneUtilitiesExtended from \"./SceneUtilitiesExtended\";\n/**\n *\n * @category Services.Scene Utilities\n * @class SceneUtilities\n */\nvar SceneUtilities = /** @class */ (function () {\n function SceneUtilities() {\n this.registeredSceneChilds = {};\n this.registeredSceneChilds = {\n Line: Line,\n Triangle: Triangle,\n Rect: Rect,\n Polygon: Polygon,\n Circle: Circle,\n Rose: Rose,\n Spiral: Spiral,\n Lissajous: Lissajous,\n SuperShape: SuperShape,\n Group: Group,\n Shape: Shape,\n ShapeRecursive: ShapeRecursive,\n ShapeLoop: ShapeLoop,\n ShapeBuffer: ShapeBuffer,\n };\n }\n //#region Register scene child\n /**\n * Return a list of name of registered sceneChild\n *\n * @returns {Array}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getRegistered = function () {\n return Object.keys(this.registeredSceneChilds);\n };\n /**\n * Register scene child for fast creation\n *\n * @param {string} type\n * @param {SceneChildInstance} ref\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.register = function (type, ref) {\n if (!(type in this.registeredSceneChilds)) {\n this.registeredSceneChilds[type] = ref;\n }\n else {\n console.warn(\"SceneUtilities: SceneChild \\\"\" + type + \"\\\" is already registered\");\n }\n };\n /**\n * unregister scene child\n *\n * @param {string} type\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.unregister = function (type) {\n if (type in this.registeredSceneChilds) {\n delete this.registeredSceneChilds[type];\n }\n else {\n console.warn(\"SceneUtilities: SceneChild \\\"\" + type + \"\\\" is not registered\");\n }\n };\n //#endregion\n //#region Scene manipulation\n /**\n * Logic creation of a SceneChild\n * Since scene is not passed, name are set if they are present in args or type\n *\n *\n * @param {(string | SceneChild)} item\n * @param {TSceneChildUtilitiesSettings} [setting]\n * @param {Scene} [scene]\n * @returns {(SceneChild | null)}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.create = function (item, settings, scene) {\n var _this = this;\n var _a;\n scene = scene ? scene : typeof item !== 'string' ? item.scene : undefined;\n if (item instanceof SceneChild) {\n this.getChildren(item).forEach(function (child) { return _this.create(child, undefined, scene); });\n return item;\n }\n if (item in this.registeredSceneChilds) {\n if (!settings)\n settings = {};\n settings.id = settings.id || uuidv1();\n if (!settings.name && scene)\n settings.name = item + '_' + (this.getCountSceneChildOfType(scene, item) + 1);\n if (!settings.data)\n settings.data = {};\n if (!('props' in settings.data))\n settings.data.props = {};\n if (!('style' in settings.data))\n settings.data.style = {};\n if (!('visible' in settings.data))\n settings.data.visible = true;\n // if (!('highlighted' in settings.data)) settings.data.highlighted = false\n // if (!('disableGhost' in settings.data)) settings.data.disableGhost = false\n // if (item === 'ShapeLoop') {\n // \tif (!('loop' in settings)) settings.loop = { start: 0, end: Math.PI * 2, inc: (Math.PI * 2) / 20 }\n // }\n var sceneChild = new this.registeredSceneChilds[item](settings);\n if (sceneChild && scene && this.isAPrimitive(sceneChild)) {\n this.set(sceneChild, 'sideLength', { type: 'transformable-prop', value: (_a = SceneChildUtilitiesData.sideLength) === null || _a === void 0 ? void 0 : _a.default }, scene);\n // this.setProp(\n // \tsceneChild,\n // \t'sideLength',\n // \t{ type: 'transformable-prop', value: SceneChildUtilitiesData.sideLength?.default },\n // \tscene\n // )\n }\n this.getChildren(sceneChild).forEach(function (child) { return _this.create(child); });\n return sceneChild;\n }\n console.warn(\"SceneUtilities: Creation failed. SceneChild \\\"\" + item + \"\\\" is not registered\");\n return null;\n };\n /**\n * Return number of element from a type\n *\n * @param {Scene} scene\n * @param {string} type\n * @returns {number}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getCountSceneChildOfType = function (scene, type) {\n var count = 0;\n Scene.walk(function (sceneChild) {\n count += sceneChild.type == type ? 1 : 0;\n }, scene);\n return count;\n };\n /**\n * Return a copy of sceneChild\n *\n * @param {SceneChild} sceneChild\n * @param {Scene} [scene]\n * @param {boolean} [strict]\n * @returns {(SceneChild | null)}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.copy = function (sceneChild, scene, strict) {\n var _this = this;\n if (strict === void 0) { strict = false; }\n // copy only props, without name, id\n var setting = sceneChild.getProps();\n if (sceneChild instanceof ShapeBase) {\n setting.bUseParent = sceneChild.bUseParent;\n setting.bUseRecursion = sceneChild.bUseRecursion;\n }\n if (sceneChild instanceof ShapeBuffer) {\n setting.shape = sceneChild.shape;\n }\n if (sceneChild instanceof ShapePrimitive) {\n setting.bClosed = sceneChild.bClosed;\n setting.adaptMode = sceneChild.adaptMode;\n setting.vertexCallback = sceneChild.vertexCallback;\n }\n if (sceneChild instanceof ShapeLoop) {\n setting.loopDependencies = sceneChild.loopDependencies;\n }\n if (sceneChild instanceof ShapeLoop) {\n setting.loopDependencies = sceneChild.loopDependencies;\n }\n if (strict) {\n setting.id = sceneChild.id;\n setting.name = sceneChild.name;\n setting.order = sceneChild.order;\n setting.data = JSON.parse(JSON.stringify(sceneChild.data || {}));\n }\n var copied = this.create(sceneChild.type, setting, scene);\n if (copied) {\n if (sceneChild instanceof Group) {\n sceneChild.getChildren().forEach(function (child) {\n var copiedChild = _this.copy(child, scene);\n copiedChild && copied.add(copiedChild);\n });\n }\n else if (sceneChild instanceof Shape && copied instanceof Shape && sceneChild.shape) {\n var copiedShape = this.copy(sceneChild.shape, scene);\n copiedShape && (copied.shape = copiedShape);\n }\n else if (sceneChild instanceof ShapeBuffer && copied instanceof ShapeBuffer && sceneChild.shape) {\n copied.setShape(new Float32Array(sceneChild.shape));\n }\n return copied;\n }\n console.warn(\"SceneUtilities: Copy failed.\", sceneChild);\n return null;\n };\n /**\n * Add scene child to parent.\n * Create a group if parent is Shape and has one element (not Group) inside.\n *\n * @param {(SceneChild | Scene)} parent\n * @param {(string | SceneChild)} sceneChild\n * @param {TSceneChildUtilityProps} [props]\n * @param {Scene} [scene]\n * @returns {(SceneChild | null)}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.add = function (parent, sceneChild, settings, scene) {\n var newSceneChild = null;\n if (parent instanceof Group || parent instanceof Scene) {\n newSceneChild = this.create(sceneChild, settings, scene);\n newSceneChild && parent.add(newSceneChild);\n }\n else if (parent instanceof Shape) {\n if (parent.shape == undefined) {\n newSceneChild = this.create(sceneChild, settings, scene);\n newSceneChild && parent.setShape(newSceneChild);\n }\n else if (parent.shape instanceof ShapeBase) {\n newSceneChild = this.create(sceneChild, settings, scene);\n if (newSceneChild) {\n var newGroup = this.create('Group', undefined, scene);\n var sibling = parent.shape;\n this.remove(parent, sibling);\n parent.setShape(newGroup);\n newGroup.add(sibling);\n newGroup.add(newSceneChild);\n }\n }\n else if (parent.shape instanceof Group) {\n this.add(parent.shape, sceneChild, undefined, scene);\n }\n }\n return newSceneChild;\n };\n /**\n * Remove scene child from\n *\n * @param {SceneChild} from\n * @param {SceneChild} [item]\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.remove = function (from, item) {\n if (!item) {\n // 'from' as item to remove\n if (from.scene) {\n var parent_1 = this.getParent(from);\n !parent_1 ? from.scene.removeFromId(from.id) : this.remove(parent_1, from);\n }\n else {\n console.warn(\"SceneUtilities: Remove failed. SceneChild is not added into scene\", from);\n }\n }\n else {\n if (from instanceof Group)\n from.removeFromId(item.id);\n else if (from instanceof Shape)\n from.setShape(undefined);\n }\n };\n //#endregion\n //#region Scene parent and children\n /**\n * Get Root parent\n *\n * @param {SceneChild} sceneChild\n * @returns {(SceneChild | null)}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getRootParent = function (sceneChild) {\n var parents = this.getParents(sceneChild);\n return parents.length > 0 ? parents[0] : null;\n };\n /**\n * Get first level parent\n *\n * @param {SceneChild} sceneChild\n * @returns {(SceneChild | null)}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getParent = function (sceneChild) {\n var parents = this.getParents(sceneChild);\n return parents.length > 0 ? parents[parents.length - 1] : null;\n };\n /**\n * Get all parents\n *\n * @param {SceneChild} sceneChild\n * @returns {Array}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getParents = function (sceneChild) {\n return sceneChild && sceneChild.scene ? sceneChild.scene.getParentsOfSceneChild(sceneChild) : [];\n };\n /**\n * Return children of a shape.\n * Only Group has array of children, Shape has only one child.\n *\n * @param {SceneChild} sceneChild\n * @returns {Array}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getChildren = function (sceneChild) {\n if (sceneChild instanceof Group)\n return sceneChild.getChildren();\n return sceneChild instanceof Shape && sceneChild.shape ? [sceneChild.shape] : [];\n };\n /**\n * Return only primitive children\n *\n * @param {SceneChild} sceneChild\n * @returns {Array}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getChildrenPrimitives = function (sceneChild) {\n var result = [];\n var children = this.getChildren(sceneChild);\n for (var i = 0, len = children.length; i < len; i++) {\n if (children[i] instanceof ShapePrimitive)\n result.push(children[i]);\n else\n result = result.concat.apply(result, this.getChildrenPrimitives(children[i]));\n }\n return result;\n };\n /**\n * Return a list of neighbors\n *\n * @param {SceneChild} sceneChild\n * @returns {(Array)}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getNeighbors = function (sceneChild) {\n if (sceneChild.scene) {\n var parent_2 = this.getParent(sceneChild);\n return parent_2 == null ? sceneChild.scene.getChildren() : this.getChildren(parent_2);\n }\n return [];\n };\n /**\n * Return a number of element type into a scene\n *\n * @param {Scene} scene\n * @param {string} type\n * @returns {number}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getCountOfSceneChildType = function (scene, type) {\n var count = 0;\n Scene.walk(function (sceneChild) {\n count += sceneChild.type == type ? 1 : 0;\n }, scene);\n return count;\n };\n // /**\n // * Walk through sceneChild\n // *\n // * @param {SceneChild} sceneChild\n // * @param {(child: SceneChild) => void} callback\n // * @memberof SceneUtilities\n // */\n // walk(sceneChild: SceneChild, callback: (child: SceneChild) => void) {\n // \tcallback(sceneChild)\n // \tthis.getChildren(sceneChild).forEach(child => callback(child))\n // }\n //#endregion\n //#region checker\n /**\n * Check sceneChild is Group\n *\n * @param {SceneChild} sceneChild\n * @returns {boolean}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.isGroup = function (sceneChild) {\n return sceneChild instanceof Group;\n };\n /**\n * Check sceneChild are Shape and has a child\n *\n * @param {SceneChild} sceneChild\n * @returns {boolean}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.hasShapeChild = function (sceneChild) {\n return sceneChild instanceof Shape ? sceneChild.shape !== undefined : false;\n };\n /**\n * Check sceneChild is a ShapeBuffer an are binded\n *\n * @param {SceneChild} sceneChild\n * @returns {boolean}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.hasShapeBuffer = function (sceneChild) {\n return sceneChild instanceof ShapeBuffer;\n };\n /**\n * Check scene child is a Primitive\n *\n * @param {SceneChild} sceneChild\n * @returns {boolean}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.isAPrimitive = function (sceneChild) {\n return sceneChild instanceof ShapePrimitive;\n };\n /**\n * Check scene child is a ShapeLoop\n *\n * @param {SceneChild} sceneChild\n * @returns {boolean}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.hasLoop = function (sceneChild) {\n return sceneChild instanceof ShapeLoop;\n };\n //#endregion\n SceneUtilities.prototype.set = function (sceneChild, name, value, scene) {\n switch (SceneChildUtilitiesData[name].dataType) {\n case 'props':\n return this.setProp(sceneChild, name, value, scene);\n case 'drawer':\n return this.setDrawerProp(sceneChild, name, value, scene);\n case 'settings':\n return this.setSetting(sceneChild, name, value, scene);\n }\n };\n /**\n * Set prop: convert animation or transformable props\n *\n * @static\n * @param {SceneChild} sceneChild\n * @param {TSceheChildUtilityPropValue} value\n * @param {Scene} scene\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.setProp = function (sceneChild, name, value, scene) {\n if (typeof sceneChild.data === 'undefined') {\n sceneChild.data = { props: {} };\n }\n else if (typeof sceneChild.data.props === 'undefined') {\n sceneChild.data.props = {};\n }\n sceneChild.clearBuffer(true, true);\n // Check LoopAnimation\n if (name === 'loop') {\n if (sceneChild instanceof ShapeLoop && SceneUtilitiesExtended.bValueLoop(value)) {\n var shapeLoopAnimation = value;\n sceneChild.data.props.loop = value;\n sceneChild.setProp('loop', SceneUtilitiesExtended.composeLoop(shapeLoopAnimation));\n // Set loopDependencies\n var dynamic = shapeLoopAnimation.dynamyc;\n var realDynamic = sceneChild.loopDependencies.indexOf('propArguments') >= 0;\n if (dynamic !== realDynamic) {\n var dependencies = __spreadArrays(sceneChild.loopDependencies);\n if (dynamic)\n !(dependencies.indexOf('propArguments') >= 0) && dependencies.push('propArguments');\n else\n dependencies.indexOf('propArguments') >= 0 && dependencies.splice(dependencies.indexOf('propArguments', 1));\n sceneChild.loopDependencies = dependencies;\n }\n }\n return;\n }\n // Check Animation\n if (SceneUtilitiesExtended.bValueAnimation(value)) {\n sceneChild.data.props[name] = value;\n sceneChild.setProp(name, Animation.composeAnimation(scene, name, value));\n return;\n }\n // Check Transormable prop\n if (SceneUtilitiesExtended.bPropInSceneChildUtilitiesData(name) &&\n SceneUtilitiesExtended.bValueTransformable(value)) {\n sceneChild.data.props[name] = value;\n sceneChild.setProp(name, SceneUtilitiesExtended.getTransformedValue(scene, name, value));\n return;\n }\n // Otherwise, set prop without transformation\n //Equivalent of: if (name in SceneChildPropsData && SceneChildPropsData[name].transformation !== 'none')\n sceneChild.setProp(name, value, true);\n delete sceneChild.data.props[name];\n // Not set to data because exporter override sceneChild.data.props on sceneChild.props (default)\n //sceneChild.data.props[name] = value\n };\n /**\n * Set prop, convert raw function, animation on transformable prop\n *\n * @static\n * @param {SceneChild} sceneChild\n * @param {TDrawerPropsExtendedKeys} name\n * @param {*} value\n * @param {Scene} scene\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.setDrawerProp = function (sceneChild, name, value, scene) {\n if (this.isAPrimitive(sceneChild)) {\n if (typeof sceneChild.data === 'undefined') {\n sceneChild.data = { style: {} };\n }\n else if (typeof sceneChild.data.style === 'undefined') {\n sceneChild.data.style = {};\n }\n if (SceneUtilitiesExtended.bValueAnimation(value)) {\n sceneChild.data.style[name] = value;\n sceneChild.style[name] = Animation.composeAnimation(scene, name, value);\n return;\n }\n // Check Transormable prop\n if (SceneUtilitiesExtended.bPropInSceneChildUtilitiesData(name) &&\n SceneUtilitiesExtended.bValueTransformable(value)) {\n sceneChild.data.style[name] = value;\n sceneChild.style[name] = SceneUtilitiesExtended.getTransformedValue(scene, name, value);\n return;\n }\n // Otherwise, set prop without transformation\n //Equivalent of: if (name in SceneChildPropsData && SceneChildPropsData[name].transformation !== 'none')\n // @ts-ignore\n sceneChild.style[name] = value;\n delete sceneChild.data.style[name];\n }\n };\n /**\n * TODO:\n * Set Args (props, drawer, other settings)\n * SceneChildPropData refactoring\n */\n SceneUtilities.prototype.setSetting = function (sceneChild, name, value, scene) {\n sceneChild.clearBuffer(true, true);\n if (name === 'vertexCallback') {\n if (sceneChild instanceof ShapeBase && SceneUtilitiesExtended.bValueVertexCallback(value)) {\n sceneChild.data.vertexCallback = value;\n sceneChild.vertexCallback = SceneUtilitiesExtended.composeVertexCallback(value);\n // If shape is static vertexCallback has no effect\n // sceneChild.bUseParent = true\n }\n return;\n }\n switch (name) {\n case 'bUseParent':\n if (sceneChild instanceof ShapeBase)\n sceneChild.bUseParent = value;\n break;\n case 'bUseRecursion':\n if (sceneChild instanceof ShapeBase)\n sceneChild.bUseRecursion = value;\n break;\n case 'bClosed':\n if (sceneChild instanceof ShapePrimitive)\n sceneChild.setClosed(value);\n break;\n case 'adaptMode':\n if (sceneChild instanceof ShapePrimitive)\n sceneChild.adapt(value);\n break;\n default:\n if (typeof sceneChild[name] !== 'undefined') {\n //@ts-ignore\n sceneChild[name] = value;\n }\n break;\n }\n };\n return SceneUtilities;\n}());\nexport default new SceneUtilities();\n//# sourceMappingURL=SceneUtilities.js.map","import { toRadians, toDegrees } from \"../../Utilites\";\nimport SceneChildUtilitiesData from \"./SceneChildUtilitiesData\";\n/**\n *\n * @category Services.Scene Utilities\n * @class SceneUtilitiesExtended\n */\nvar SceneUtilitiesExtended = /** @class */ (function () {\n function SceneUtilitiesExtended() {\n }\n //#region ShapeLoop\n SceneUtilitiesExtended.bValueLoop = function (value) {\n return (typeof value === 'object' &&\n 'start' in value &&\n 'end' in value &&\n 'inc' in value &&\n 'vertex' in value &&\n value.vertex.raw &&\n value.vertex.raw.length > 0);\n };\n SceneUtilitiesExtended.bValueVertexCallback = function (value) {\n return value && value.raw && value.raw.length > 0;\n };\n SceneUtilitiesExtended.composeVertexCallback = function (value) {\n if (value && value.raw) {\n var vertexCallback = new Function('vertex', 'vertexRepetition', SceneUtilitiesExtended.RAW_ARGUMENTS, \"return \" + value.raw);\n return vertexCallback;\n }\n };\n SceneUtilitiesExtended.composeLoop = function (loop) {\n var vertex = loop.vertex.raw\n ? new Function('shapeLoopRepetition', SceneUtilitiesExtended.RAW_ARGUMENTS, \"return \" + loop.vertex.raw)\n : undefined;\n //Todo: number -> resolve function\n return {\n start: loop.start,\n end: loop.end,\n inc: loop.inc,\n vertex: vertex,\n };\n };\n //#endregion\n // static getRandomFunctionForProp(name): (rand: number) => any {\n // const prop: ISceneChildProp = UISceneChildUtilitiesStatic.sceneChildProps[name]\n // switch (prop.type)\n // {\n // case 'multiple-range': case 'range': case 'slider':\n // return (rand: number) => {\n // const min = prop.min as number / 2\n // const max = prop.max as number / 2\n // const value = min + ((max - min) * rand)\n // return prop.bAngle ? toRadians(value) : value\n // }\n // case 'color':\n // return (rand: number) => `hsl(${Math.floor(360 * rand)}, ${Math.floor(25 + 75 * rand)}%, ${Math.floor(25 + 75 * rand)}%)`\n // default:\n // return (rand: number) => undefined\n // }\n // }\n //#endregion\n //#region Props relative to drawer\n /**\n * Check value is TAnimation\n * @param value\n */\n SceneUtilitiesExtended.bValueAnimation = function (value) {\n return (value &&\n typeof value === 'object' &&\n value.type &&\n (value.type === 'simple' || value.type === 'raw') /*|| value.type == 'random'*/);\n };\n /**\n * Check value is TTransformableProp\n * @param value\n */\n SceneUtilitiesExtended.bValueTransformable = function (value) {\n return (value !== null &&\n typeof value === 'object' &&\n typeof value.type === 'string' &&\n value.type === 'transformable-prop');\n };\n /**\n * Check the prop need transformation when set\n * @param name\n */\n SceneUtilitiesExtended.bPropInSceneChildUtilitiesData = function (name) {\n return (typeof SceneChildUtilitiesData[name] !== 'undefined' && SceneChildUtilitiesData[name].transformation !== 'none');\n };\n /**\n * Transform value\n * @param scene\n * @param name\n * @param value\n */\n SceneUtilitiesExtended.getTransformedValue = function (scene, name, value) {\n var sceneChildProp = SceneChildUtilitiesData[name];\n if (SceneUtilitiesExtended.bPropInSceneChildUtilitiesData(name) &&\n SceneUtilitiesExtended.bValueTransformable(value)) {\n value = value.value;\n var sceneX = name === 'distance' ? scene.height : scene.width;\n var sceneY = name === 'distance' ? scene.width : scene.height;\n switch (sceneChildProp.transformation) {\n case 'angle':\n if (Array.isArray(value)) {\n return [toRadians(value[0]), toRadians(value[1])];\n }\n return toRadians(value);\n case 'scene-size-percentage': {\n if (typeof scene !== 'undefined') {\n if (Array.isArray(value)) {\n return [(value[0] * sceneX) / 100, (value[1] * sceneY) / 100];\n }\n return (value * (scene.center[0] + scene.center[1])) / 100;\n }\n break;\n }\n case 'scene-size-percentage-inverse': {\n if (typeof scene !== 'undefined') {\n if (Array.isArray(value)) {\n return [(value[0] * 100) / sceneX, (value[1] * 100) / sceneY];\n }\n return (value * 100) / (scene.center[0] + scene.center[1]);\n }\n break;\n }\n }\n }\n return value;\n };\n /**\n * Transform value inverse\n * @param scene\n * @param name\n * @param value\n */\n SceneUtilitiesExtended.getTransformedValueInverse = function (scene, name, value) {\n var sceneChildProp = SceneChildUtilitiesData[name];\n if (SceneUtilitiesExtended.bPropInSceneChildUtilitiesData(name) &&\n SceneUtilitiesExtended.bValueTransformable(value)) {\n value = value.value;\n var sceneX = name === 'distance' ? scene.height : scene.width;\n var sceneY = name === 'distance' ? scene.width : scene.height;\n switch (sceneChildProp.transformation) {\n case 'angle': {\n if (Array.isArray(value)) {\n return [toDegrees(value[0]), toDegrees(value[1])];\n }\n return toDegrees(value);\n }\n case 'scene-size-percentage': {\n if (typeof scene !== 'undefined') {\n if (Array.isArray(value)) {\n return [(value[0] * 100) / sceneX, (value[1] * 100) / sceneY];\n }\n return (value * 100) / (scene.center[0] + scene.center[1]);\n }\n break;\n }\n case 'scene-size-percentage-inverse': {\n if (typeof scene !== 'undefined') {\n if (Array.isArray(value)) {\n return [(value[0] * sceneX) / 100, (value[1] * sceneY) / 100];\n }\n return (value * (scene.center[0] + scene.center[1])) / 100;\n }\n break;\n }\n }\n }\n return value;\n };\n SceneUtilitiesExtended.RAW_ARGUMENTS = '{ repetition, recursion, shape }';\n SceneUtilitiesExtended.RAW_ARGUMENTS_WITH_PARENT = '{ repetition, recursion, shape, parent }';\n return SceneUtilitiesExtended;\n}());\nexport default SceneUtilitiesExtended;\n//# sourceMappingURL=SceneUtilitiesExtended.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { pmod } from \"../../core/math\";\nimport Emitter from \"../events/Emitter\";\nimport { now } from \"../../Utilites\";\n/**\n * Is used for sequence time management.\n * It is necessary to set the duration and the number of frames per second (frame rate).\n *\n * @category Services.Timeline\n * @class Timeline\n * @extends {Emitter}\n */\nvar Timeline = /** @class */ (function (_super) {\n __extends(Timeline, _super);\n function Timeline(duration, framerate) {\n if (duration === void 0) { duration = 60000; }\n if (framerate === void 0) { framerate = 60; }\n var _this = _super.call(this) || this;\n _this.fps_samples_size = 30;\n _this.fps_samples = [];\n _this.fps_samples_index = 0;\n _this.paused_time = 0;\n _this.sequence = {\n duration: duration,\n framerate: framerate,\n frames: Math.round((duration / 1000) * framerate),\n };\n _this.tick_time = 1000 / _this.sequence.framerate;\n _this.fps = _this.sequence.framerate;\n _this.b_sequence_started = false;\n _this.current_frame = 0;\n _this.current_time = 0;\n _this.last_tick = 0;\n _this.start_time = 0;\n return _this;\n }\n //#region sequence meta\n /**\n * Return the sequence\n *\n * @returns {Sequence}\n */\n Timeline.prototype.getSequence = function () {\n return __assign({}, this.sequence);\n };\n /**\n * Set Sequence\n *\n * @param {number} duration\n * @param {number} framerate\n */\n Timeline.prototype.setSequence = function (duration, framerate) {\n this.sequence.duration = duration;\n this.sequence.framerate = framerate;\n this.tick_time = 1000 / this.sequence.framerate;\n this.sequence.frames = Math.round((this.sequence.duration / 1000) * this.sequence.framerate);\n this.dispatch('timeline:update_sequence', this.getSequence());\n };\n /**\n * Set duration of timeline\n *\n * @param {number} framerate\n */\n Timeline.prototype.setDuration = function (duration) {\n this.setSequence(duration, this.sequence.framerate);\n };\n /**\n * Get timeline duration\n *\n * @returns {number}\n */\n Timeline.prototype.getDuration = function () {\n return this.sequence.duration;\n };\n /**\n * Return framerate\n *\n * @returns {number}\n */\n Timeline.prototype.getFramerate = function () {\n return this.sequence.framerate;\n };\n /**\n * Set a framerate\n *\n * @param {number} framerate\n */\n Timeline.prototype.setFramerate = function (framerate) {\n this.setSequence(this.sequence.duration, framerate);\n };\n /**\n * Get number of frames based on duration and framerate\n *\n * @returns {number}\n */\n Timeline.prototype.getFramesCount = function () {\n return this.sequence.frames;\n };\n //#endregion meta\n //#region change status\n Timeline.prototype.bSequenceStarted = function () {\n return this.b_sequence_started;\n };\n /**\n * Start the sequence\n *\n */\n Timeline.prototype.start = function () {\n if (!this.b_sequence_started) {\n this.b_sequence_started = true;\n this.start_time = this.paused_time;\n this.dispatch('timeline:change_status', Timeline.START);\n }\n };\n /**\n * Pause the sequence\n *\n */\n Timeline.prototype.pause = function () {\n if (this.b_sequence_started) {\n this.paused_time = now();\n this.b_sequence_started = false;\n this.dispatch('timeline:change_status', Timeline.PAUSE);\n }\n };\n /**\n * Stop the sequence and reset\n *\n */\n Timeline.prototype.stop = function () {\n if (this.b_sequence_started) {\n this.b_sequence_started = false;\n this.current_time = 0;\n this.current_frame = 0;\n this.start_time = 0;\n this.paused_time = 0;\n this.dispatch('timeline:change_status', Timeline.STOP);\n }\n };\n /**\n * Animation tick\n *\n * @param {number} timestamp current timestamp\n * @returns {boolean}\n */\n Timeline.prototype.tick = function (timestamp) {\n if (this.b_sequence_started) {\n if (!this.start_time) {\n this.start_time = timestamp;\n this.last_tick = -this.tick_time;\n }\n var currentTime = timestamp - this.start_time;\n var elapsed = currentTime - this.last_tick;\n if (elapsed >= this.tick_time) {\n this.calculateFPS(1 / (elapsed / 1000));\n this.last_tick = currentTime;\n this.current_time = (currentTime - (elapsed % this.tick_time)) % this.sequence.duration;\n this.current_frame = this.getFrameAtTime(this.current_time);\n this.dispatch('timeline:progress', {\n current_frame: this.current_frame,\n current_time: this.current_time,\n fps: this.fps,\n });\n return true;\n }\n }\n return false;\n };\n /**\n * Calculate fps\n *\n * @private\n * @param {number} currentFPS\n */\n Timeline.prototype.calculateFPS = function (currentFPS) {\n var samples = this.fps_samples.length;\n if (samples > 0) {\n var average = 0;\n for (var i = 0; i < samples; i++)\n average += this.fps_samples[i];\n this.fps = Math.round(average / samples);\n }\n this.fps_samples[this.fps_samples_index] = Math.round(currentFPS);\n this.fps_samples_index = (this.fps_samples_index + 1) % this.fps_samples_size;\n };\n //#endregion\n //#region Frame and Time\n /**\n * Return current animation frame\n *\n * @returns {number}\n */\n Timeline.prototype.getCurrentFrame = function () {\n return this.current_frame;\n };\n /**\n * get the time at specific frame number\n *\n * @param {number} frame\n * @returns {number}\n */\n Timeline.prototype.getFrameTime = function (frame) {\n frame = pmod(frame, this.sequence.frames);\n return (frame * this.tick_time) % this.sequence.duration;\n };\n /**\n * Return frame number at time\n *\n * @param {number} time\n * @returns {number}\n */\n Timeline.prototype.getFrameAtTime = function (time) {\n return Math.round((time % this.sequence.duration) / this.tick_time);\n };\n /**\n * set current frame\n *\n * @param {number} frame\n */\n Timeline.prototype.setFrame = function (frame) {\n this.current_frame = pmod(frame, this.sequence.frames);\n this.current_time = this.getFrameTime(this.current_frame);\n this.dispatch('timeline:progress', {\n current_frame: this.current_frame,\n current_time: this.current_time,\n fps: this.fps,\n });\n };\n /**\n * Return tick time (based on framerate)\n *\n * @returns {number}\n */\n Timeline.prototype.getTickTime = function () {\n return this.tick_time;\n };\n /**\n * Return the current time\n *\n * @returns {number}\n */\n Timeline.prototype.getTime = function () {\n return this.current_time;\n };\n /**\n * Set animation at time\n *\n * @param {number} time\n */\n Timeline.prototype.setTime = function (time) {\n time = pmod(time, this.sequence.duration);\n this.current_time = time;\n this.current_frame = this.getFrameAtTime(time);\n this.dispatch('timeline:progress', {\n current_frame: this.current_frame,\n current_time: this.current_time,\n fps: this.fps,\n });\n };\n /**\n * Animation status started\n * @internal\n */\n Timeline.START = 'start';\n /**\n * Animation status paused\n * @internal\n */\n Timeline.PAUSE = 'pause';\n /**\n * Animation status stop\n * @internal\n */\n Timeline.STOP = 'stop';\n return Timeline;\n}(Emitter));\nexport default Timeline;\n//# sourceMappingURL=Timeline.js.map","/**\r\n * Common utilities\r\n * @module glMatrix\r\n */\n// Configuration Constants\nexport var EPSILON = 0.000001;\nexport var ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;\nexport var RANDOM = Math.random;\n/**\r\n * Sets the type of array used when creating new vectors and matrices\r\n *\r\n * @param {Float32ArrayConstructor | ArrayConstructor} type Array type, such as Float32Array or Array\r\n */\n\nexport function setMatrixArrayType(type) {\n ARRAY_TYPE = type;\n}\nvar degree = Math.PI / 180;\n/**\r\n * Convert Degree To Radian\r\n *\r\n * @param {Number} a Angle in Degrees\r\n */\n\nexport function toRadian(a) {\n return a * degree;\n}\n/**\r\n * Tests whether or not the arguments have approximately the same value, within an absolute\r\n * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less\r\n * than or equal to 1.0, and a relative tolerance is used for larger values)\r\n *\r\n * @param {Number} a The first number to test.\r\n * @param {Number} b The second number to test.\r\n * @returns {Boolean} True if the numbers are approximately equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));\n}\nif (!Math.hypot) Math.hypot = function () {\n var y = 0,\n i = arguments.length;\n\n while (i--) {\n y += arguments[i] * arguments[i];\n }\n\n return Math.sqrt(y);\n};","import * as glMatrix from \"./common.js\";\n/**\r\n * 4x4 Matrix
Format: column-major, when typed out it looks like row-major
The matrices are being post multiplied.\r\n * @module mat4\r\n */\n\n/**\r\n * Creates a new identity mat4\r\n *\r\n * @returns {mat4} a new 4x4 matrix\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(16);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n }\n\n out[0] = 1;\n out[5] = 1;\n out[10] = 1;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a new mat4 initialized with values from an existing matrix\r\n *\r\n * @param {ReadonlyMat4} a matrix to clone\r\n * @returns {mat4} a new 4x4 matrix\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Copy the values from one mat4 to another\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Create a new mat4 with the given values\r\n *\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\r\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\r\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\r\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\r\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\r\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\r\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\r\n * @returns {mat4} A new mat4\r\n */\n\nexport function fromValues(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n/**\r\n * Set the components of a mat4 to the given values\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\r\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\r\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\r\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\r\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\r\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\r\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\r\n * @returns {mat4} out\r\n */\n\nexport function set(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n/**\r\n * Set a mat4 to the identity matrix\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @returns {mat4} out\r\n */\n\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Transpose the values of a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a12 = a[6],\n a13 = a[7];\n var a23 = a[11];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a01;\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a02;\n out[9] = a12;\n out[11] = a[14];\n out[12] = a03;\n out[13] = a13;\n out[14] = a23;\n } else {\n out[0] = a[0];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a[1];\n out[5] = a[5];\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a[2];\n out[9] = a[6];\n out[10] = a[10];\n out[11] = a[14];\n out[12] = a[3];\n out[13] = a[7];\n out[14] = a[11];\n out[15] = a[15];\n }\n\n return out;\n}\n/**\r\n * Inverts a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n return out;\n}\n/**\r\n * Calculates the adjugate of a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function adjoint(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n out[0] = a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22);\n out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n out[2] = a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12);\n out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n out[5] = a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22);\n out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n out[7] = a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12);\n out[8] = a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21);\n out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n out[10] = a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11);\n out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n out[13] = a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21);\n out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n out[15] = a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11);\n return out;\n}\n/**\r\n * Calculates the determinant of a mat4\r\n *\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {Number} determinant of a\r\n */\n\nexport function determinant(a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n}\n/**\r\n * Multiplies two mat4s\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function multiply(out, a, b) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15]; // Cache only the current line of the second matrix\n\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[4];\n b1 = b[5];\n b2 = b[6];\n b3 = b[7];\n out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[8];\n b1 = b[9];\n b2 = b[10];\n b3 = b[11];\n out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[12];\n b1 = b[13];\n b2 = b[14];\n b3 = b[15];\n out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n return out;\n}\n/**\r\n * Translate a mat4 by the given vector\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to translate\r\n * @param {ReadonlyVec3} v vector to translate by\r\n * @returns {mat4} out\r\n */\n\nexport function translate(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n } else {\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a03;\n out[4] = a10;\n out[5] = a11;\n out[6] = a12;\n out[7] = a13;\n out[8] = a20;\n out[9] = a21;\n out[10] = a22;\n out[11] = a23;\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n\n return out;\n}\n/**\r\n * Scales the mat4 by the dimensions in the given vec3 not using vectorization\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to scale\r\n * @param {ReadonlyVec3} v the vec3 to scale the matrix by\r\n * @returns {mat4} out\r\n **/\n\nexport function scale(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n out[0] = a[0] * x;\n out[1] = a[1] * x;\n out[2] = a[2] * x;\n out[3] = a[3] * x;\n out[4] = a[4] * y;\n out[5] = a[5] * y;\n out[6] = a[6] * y;\n out[7] = a[7] * y;\n out[8] = a[8] * z;\n out[9] = a[9] * z;\n out[10] = a[10] * z;\n out[11] = a[11] * z;\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Rotates a mat4 by the given angle around the given axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @param {ReadonlyVec3} axis the axis to rotate around\r\n * @returns {mat4} out\r\n */\n\nexport function rotate(out, a, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n var b00, b01, b02;\n var b10, b11, b12;\n var b20, b21, b22;\n\n if (len < glMatrix.EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c;\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11]; // Construct the elements of the rotation matrix\n\n b00 = x * x * t + c;\n b01 = y * x * t + z * s;\n b02 = z * x * t - y * s;\n b10 = x * y * t - z * s;\n b11 = y * y * t + c;\n b12 = z * y * t + x * s;\n b20 = x * z * t + y * s;\n b21 = y * z * t - x * s;\n b22 = z * z * t + c; // Perform rotation-specific matrix multiplication\n\n out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the X axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateX(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[4] = a10 * c + a20 * s;\n out[5] = a11 * c + a21 * s;\n out[6] = a12 * c + a22 * s;\n out[7] = a13 * c + a23 * s;\n out[8] = a20 * c - a10 * s;\n out[9] = a21 * c - a11 * s;\n out[10] = a22 * c - a12 * s;\n out[11] = a23 * c - a13 * s;\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the Y axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateY(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[0] = a00 * c - a20 * s;\n out[1] = a01 * c - a21 * s;\n out[2] = a02 * c - a22 * s;\n out[3] = a03 * c - a23 * s;\n out[8] = a00 * s + a20 * c;\n out[9] = a01 * s + a21 * c;\n out[10] = a02 * s + a22 * c;\n out[11] = a03 * s + a23 * c;\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the Z axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateZ(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[0] = a00 * c + a10 * s;\n out[1] = a01 * c + a11 * s;\n out[2] = a02 * c + a12 * s;\n out[3] = a03 * c + a13 * s;\n out[4] = a10 * c - a00 * s;\n out[5] = a11 * c - a01 * s;\n out[6] = a12 * c - a02 * s;\n out[7] = a13 * c - a03 * s;\n return out;\n}\n/**\r\n * Creates a matrix from a vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, dest, vec);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a vector scaling\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.scale(dest, dest, vec);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {ReadonlyVec3} v Scaling vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = v[1];\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = v[2];\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a given angle around a given axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotate(dest, dest, rad, axis);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @param {ReadonlyVec3} axis the axis to rotate around\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotation(out, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n\n if (len < glMatrix.EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c; // Perform rotation-specific matrix multiplication\n\n out[0] = x * x * t + c;\n out[1] = y * x * t + z * s;\n out[2] = z * x * t - y * s;\n out[3] = 0;\n out[4] = x * y * t - z * s;\n out[5] = y * y * t + c;\n out[6] = z * y * t + x * s;\n out[7] = 0;\n out[8] = x * z * t + y * s;\n out[9] = y * z * t - x * s;\n out[10] = z * z * t + c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the X axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateX(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromXRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = c;\n out[6] = s;\n out[7] = 0;\n out[8] = 0;\n out[9] = -s;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the Y axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateY(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromYRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = c;\n out[1] = 0;\n out[2] = -s;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = s;\n out[9] = 0;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the Z axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateZ(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromZRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = 0;\n out[4] = -s;\n out[5] = c;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation and vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslation(out, q, v) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a new mat4 from a dual quat.\r\n *\r\n * @param {mat4} out Matrix\r\n * @param {ReadonlyQuat2} a Dual Quaternion\r\n * @returns {mat4} mat4 receiving operation result\r\n */\n\nexport function fromQuat2(out, a) {\n var translation = new glMatrix.ARRAY_TYPE(3);\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7];\n var magnitude = bx * bx + by * by + bz * bz + bw * bw; //Only scale if it makes sense\n\n if (magnitude > 0) {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2 / magnitude;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2 / magnitude;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2 / magnitude;\n } else {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n }\n\n fromRotationTranslation(out, a, translation);\n return out;\n}\n/**\r\n * Returns the translation vector component of a transformation\r\n * matrix. If a matrix is built with fromRotationTranslation,\r\n * the returned vector will be the same as the translation vector\r\n * originally supplied.\r\n * @param {vec3} out Vector to receive translation component\r\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\r\n * @return {vec3} out\r\n */\n\nexport function getTranslation(out, mat) {\n out[0] = mat[12];\n out[1] = mat[13];\n out[2] = mat[14];\n return out;\n}\n/**\r\n * Returns the scaling factor component of a transformation\r\n * matrix. If a matrix is built with fromRotationTranslationScale\r\n * with a normalized Quaternion paramter, the returned vector will be\r\n * the same as the scaling vector\r\n * originally supplied.\r\n * @param {vec3} out Vector to receive scaling factor component\r\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\r\n * @return {vec3} out\r\n */\n\nexport function getScaling(out, mat) {\n var m11 = mat[0];\n var m12 = mat[1];\n var m13 = mat[2];\n var m21 = mat[4];\n var m22 = mat[5];\n var m23 = mat[6];\n var m31 = mat[8];\n var m32 = mat[9];\n var m33 = mat[10];\n out[0] = Math.hypot(m11, m12, m13);\n out[1] = Math.hypot(m21, m22, m23);\n out[2] = Math.hypot(m31, m32, m33);\n return out;\n}\n/**\r\n * Returns a quaternion representing the rotational component\r\n * of a transformation matrix. If a matrix is built with\r\n * fromRotationTranslation, the returned quaternion will be the\r\n * same as the quaternion originally supplied.\r\n * @param {quat} out Quaternion to receive the rotation component\r\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\r\n * @return {quat} out\r\n */\n\nexport function getRotation(out, mat) {\n var scaling = new glMatrix.ARRAY_TYPE(3);\n getScaling(scaling, mat);\n var is1 = 1 / scaling[0];\n var is2 = 1 / scaling[1];\n var is3 = 1 / scaling[2];\n var sm11 = mat[0] * is1;\n var sm12 = mat[1] * is2;\n var sm13 = mat[2] * is3;\n var sm21 = mat[4] * is1;\n var sm22 = mat[5] * is2;\n var sm23 = mat[6] * is3;\n var sm31 = mat[8] * is1;\n var sm32 = mat[9] * is2;\n var sm33 = mat[10] * is3;\n var trace = sm11 + sm22 + sm33;\n var S = 0;\n\n if (trace > 0) {\n S = Math.sqrt(trace + 1.0) * 2;\n out[3] = 0.25 * S;\n out[0] = (sm23 - sm32) / S;\n out[1] = (sm31 - sm13) / S;\n out[2] = (sm12 - sm21) / S;\n } else if (sm11 > sm22 && sm11 > sm33) {\n S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;\n out[3] = (sm23 - sm32) / S;\n out[0] = 0.25 * S;\n out[1] = (sm12 + sm21) / S;\n out[2] = (sm31 + sm13) / S;\n } else if (sm22 > sm33) {\n S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;\n out[3] = (sm31 - sm13) / S;\n out[0] = (sm12 + sm21) / S;\n out[1] = 0.25 * S;\n out[2] = (sm23 + sm32) / S;\n } else {\n S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;\n out[3] = (sm12 - sm21) / S;\n out[0] = (sm31 + sm13) / S;\n out[1] = (sm23 + sm32) / S;\n out[2] = 0.25 * S;\n }\n\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation, vector translation and vector scale\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n * mat4.scale(dest, scale)\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @param {ReadonlyVec3} s Scaling vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslationScale(out, q, v, s) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n out[0] = (1 - (yy + zz)) * sx;\n out[1] = (xy + wz) * sx;\n out[2] = (xz - wy) * sx;\n out[3] = 0;\n out[4] = (xy - wz) * sy;\n out[5] = (1 - (xx + zz)) * sy;\n out[6] = (yz + wx) * sy;\n out[7] = 0;\n out[8] = (xz + wy) * sz;\n out[9] = (yz - wx) * sz;\n out[10] = (1 - (xx + yy)) * sz;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * mat4.translate(dest, origin);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n * mat4.scale(dest, scale)\r\n * mat4.translate(dest, negativeOrigin);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @param {ReadonlyVec3} s Scaling vector\r\n * @param {ReadonlyVec3} o The origin vector around which to scale and rotate\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslationScaleOrigin(out, q, v, s, o) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n var ox = o[0];\n var oy = o[1];\n var oz = o[2];\n var out0 = (1 - (yy + zz)) * sx;\n var out1 = (xy + wz) * sx;\n var out2 = (xz - wy) * sx;\n var out4 = (xy - wz) * sy;\n var out5 = (1 - (xx + zz)) * sy;\n var out6 = (yz + wx) * sy;\n var out8 = (xz + wy) * sz;\n var out9 = (yz - wx) * sz;\n var out10 = (1 - (xx + yy)) * sz;\n out[0] = out0;\n out[1] = out1;\n out[2] = out2;\n out[3] = 0;\n out[4] = out4;\n out[5] = out5;\n out[6] = out6;\n out[7] = 0;\n out[8] = out8;\n out[9] = out9;\n out[10] = out10;\n out[11] = 0;\n out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz);\n out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz);\n out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz);\n out[15] = 1;\n return out;\n}\n/**\r\n * Calculates a 4x4 matrix from the given quaternion\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {ReadonlyQuat} q Quaternion to create matrix from\r\n *\r\n * @returns {mat4} out\r\n */\n\nexport function fromQuat(out, q) {\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[1] = yx + wz;\n out[2] = zx - wy;\n out[3] = 0;\n out[4] = yx - wz;\n out[5] = 1 - xx - zz;\n out[6] = zy + wx;\n out[7] = 0;\n out[8] = zx + wy;\n out[9] = zy - wx;\n out[10] = 1 - xx - yy;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a frustum matrix with the given bounds\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {Number} left Left bound of the frustum\r\n * @param {Number} right Right bound of the frustum\r\n * @param {Number} bottom Bottom bound of the frustum\r\n * @param {Number} top Top bound of the frustum\r\n * @param {Number} near Near bound of the frustum\r\n * @param {Number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function frustum(out, left, right, bottom, top, near, far) {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n out[0] = near * 2 * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = near * 2 * tb;\n out[6] = 0;\n out[7] = 0;\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = far * near * 2 * nf;\n out[15] = 0;\n return out;\n}\n/**\r\n * Generates a perspective projection matrix with the given bounds.\r\n * Passing null/undefined/no value for far will generate infinite projection matrix.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {number} fovy Vertical field of view in radians\r\n * @param {number} aspect Aspect ratio. typically viewport width/height\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum, can be null or Infinity\r\n * @returns {mat4} out\r\n */\n\nexport function perspective(out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2),\n nf;\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[15] = 0;\n\n if (far != null && far !== Infinity) {\n nf = 1 / (near - far);\n out[10] = (far + near) * nf;\n out[14] = 2 * far * near * nf;\n } else {\n out[10] = -1;\n out[14] = -2 * near;\n }\n\n return out;\n}\n/**\r\n * Generates a perspective projection matrix with the given field of view.\r\n * This is primarily useful for generating projection matrices to be used\r\n * with the still experiemental WebVR API.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {Object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function perspectiveFromFieldOfView(out, fov, near, far) {\n var upTan = Math.tan(fov.upDegrees * Math.PI / 180.0);\n var downTan = Math.tan(fov.downDegrees * Math.PI / 180.0);\n var leftTan = Math.tan(fov.leftDegrees * Math.PI / 180.0);\n var rightTan = Math.tan(fov.rightDegrees * Math.PI / 180.0);\n var xScale = 2.0 / (leftTan + rightTan);\n var yScale = 2.0 / (upTan + downTan);\n out[0] = xScale;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n out[4] = 0.0;\n out[5] = yScale;\n out[6] = 0.0;\n out[7] = 0.0;\n out[8] = -((leftTan - rightTan) * xScale * 0.5);\n out[9] = (upTan - downTan) * yScale * 0.5;\n out[10] = far / (near - far);\n out[11] = -1.0;\n out[12] = 0.0;\n out[13] = 0.0;\n out[14] = far * near / (near - far);\n out[15] = 0.0;\n return out;\n}\n/**\r\n * Generates a orthogonal projection matrix with the given bounds\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {number} left Left bound of the frustum\r\n * @param {number} right Right bound of the frustum\r\n * @param {number} bottom Bottom bound of the frustum\r\n * @param {number} top Top bound of the frustum\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function ortho(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right);\n var bt = 1 / (bottom - top);\n var nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a look-at matrix with the given eye position, focal point, and up axis.\r\n * If you want a matrix that actually makes an object look at another object, you should use targetTo instead.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {ReadonlyVec3} eye Position of the viewer\r\n * @param {ReadonlyVec3} center Point the viewer is looking at\r\n * @param {ReadonlyVec3} up vec3 pointing up\r\n * @returns {mat4} out\r\n */\n\nexport function lookAt(out, eye, center, up) {\n var x0, x1, x2, y0, y1, y2, z0, z1, z2, len;\n var eyex = eye[0];\n var eyey = eye[1];\n var eyez = eye[2];\n var upx = up[0];\n var upy = up[1];\n var upz = up[2];\n var centerx = center[0];\n var centery = center[1];\n var centerz = center[2];\n\n if (Math.abs(eyex - centerx) < glMatrix.EPSILON && Math.abs(eyey - centery) < glMatrix.EPSILON && Math.abs(eyez - centerz) < glMatrix.EPSILON) {\n return identity(out);\n }\n\n z0 = eyex - centerx;\n z1 = eyey - centery;\n z2 = eyez - centerz;\n len = 1 / Math.hypot(z0, z1, z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n x0 = upy * z2 - upz * z1;\n x1 = upz * z0 - upx * z2;\n x2 = upx * z1 - upy * z0;\n len = Math.hypot(x0, x1, x2);\n\n if (!len) {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n } else {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n y0 = z1 * x2 - z2 * x1;\n y1 = z2 * x0 - z0 * x2;\n y2 = z0 * x1 - z1 * x0;\n len = Math.hypot(y0, y1, y2);\n\n if (!len) {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n } else {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a matrix that makes something look at something else.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {ReadonlyVec3} eye Position of the viewer\r\n * @param {ReadonlyVec3} center Point the viewer is looking at\r\n * @param {ReadonlyVec3} up vec3 pointing up\r\n * @returns {mat4} out\r\n */\n\nexport function targetTo(out, eye, target, up) {\n var eyex = eye[0],\n eyey = eye[1],\n eyez = eye[2],\n upx = up[0],\n upy = up[1],\n upz = up[2];\n var z0 = eyex - target[0],\n z1 = eyey - target[1],\n z2 = eyez - target[2];\n var len = z0 * z0 + z1 * z1 + z2 * z2;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n }\n\n var x0 = upy * z2 - upz * z1,\n x1 = upz * z0 - upx * z2,\n x2 = upx * z1 - upy * z0;\n len = x0 * x0 + x1 * x1 + x2 * x2;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n out[0] = x0;\n out[1] = x1;\n out[2] = x2;\n out[3] = 0;\n out[4] = z1 * x2 - z2 * x1;\n out[5] = z2 * x0 - z0 * x2;\n out[6] = z0 * x1 - z1 * x0;\n out[7] = 0;\n out[8] = z0;\n out[9] = z1;\n out[10] = z2;\n out[11] = 0;\n out[12] = eyex;\n out[13] = eyey;\n out[14] = eyez;\n out[15] = 1;\n return out;\n}\n/**\r\n * Returns a string representation of a mat4\r\n *\r\n * @param {ReadonlyMat4} a matrix to represent as a string\r\n * @returns {String} string representation of the matrix\r\n */\n\nexport function str(a) {\n return \"mat4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \", \" + a[9] + \", \" + a[10] + \", \" + a[11] + \", \" + a[12] + \", \" + a[13] + \", \" + a[14] + \", \" + a[15] + \")\";\n}\n/**\r\n * Returns Frobenius norm of a mat4\r\n *\r\n * @param {ReadonlyMat4} a the matrix to calculate Frobenius norm of\r\n * @returns {Number} Frobenius norm\r\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\n}\n/**\r\n * Adds two mat4's\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n out[9] = a[9] + b[9];\n out[10] = a[10] + b[10];\n out[11] = a[11] + b[11];\n out[12] = a[12] + b[12];\n out[13] = a[13] + b[13];\n out[14] = a[14] + b[14];\n out[15] = a[15] + b[15];\n return out;\n}\n/**\r\n * Subtracts matrix b from matrix a\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n out[9] = a[9] - b[9];\n out[10] = a[10] - b[10];\n out[11] = a[11] - b[11];\n out[12] = a[12] - b[12];\n out[13] = a[13] - b[13];\n out[14] = a[14] - b[14];\n out[15] = a[15] - b[15];\n return out;\n}\n/**\r\n * Multiply each element of the matrix by a scalar.\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to scale\r\n * @param {Number} b amount to scale the matrix's elements by\r\n * @returns {mat4} out\r\n */\n\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n out[9] = a[9] * b;\n out[10] = a[10] * b;\n out[11] = a[11] * b;\n out[12] = a[12] * b;\n out[13] = a[13] * b;\n out[14] = a[14] * b;\n out[15] = a[15] * b;\n return out;\n}\n/**\r\n * Adds two mat4's after multiplying each element of the second operand by a scalar value.\r\n *\r\n * @param {mat4} out the receiving vector\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @param {Number} scale the amount to scale b's elements by before adding\r\n * @returns {mat4} out\r\n */\n\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n out[9] = a[9] + b[9] * scale;\n out[10] = a[10] + b[10] * scale;\n out[11] = a[11] + b[11] * scale;\n out[12] = a[12] + b[12] * scale;\n out[13] = a[13] + b[13] * scale;\n out[14] = a[14] + b[14] * scale;\n out[15] = a[15] + b[15] * scale;\n return out;\n}\n/**\r\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyMat4} a The first matrix.\r\n * @param {ReadonlyMat4} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15];\n}\n/**\r\n * Returns whether or not the matrices have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyMat4} a The first matrix.\r\n * @param {ReadonlyMat4} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7];\n var a8 = a[8],\n a9 = a[9],\n a10 = a[10],\n a11 = a[11];\n var a12 = a[12],\n a13 = a[13],\n a14 = a[14],\n a15 = a[15];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n var b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7];\n var b8 = b[8],\n b9 = b[9],\n b10 = b[10],\n b11 = b[11];\n var b12 = b[12],\n b13 = b[13],\n b14 = b[14],\n b15 = b[15];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a15), Math.abs(b15));\n}\n/**\r\n * Alias for {@link mat4.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link mat4.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\n/**\r\n * 2 Dimensional Vector\r\n * @module vec2\r\n */\n\n/**\r\n * Creates a new, empty vec2\r\n *\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(2);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n }\n\n return out;\n}\n/**\r\n * Creates a new vec2 initialized with values from an existing vector\r\n *\r\n * @param {ReadonlyVec2} a vector to clone\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n/**\r\n * Creates a new vec2 initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function fromValues(x, y) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = x;\n out[1] = y;\n return out;\n}\n/**\r\n * Copy the values from one vec2 to another\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the source vector\r\n * @returns {vec2} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n/**\r\n * Set the components of a vec2 to the given values\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @returns {vec2} out\r\n */\n\nexport function set(out, x, y) {\n out[0] = x;\n out[1] = y;\n return out;\n}\n/**\r\n * Adds two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n return out;\n}\n/**\r\n * Subtracts vector b from vector a\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n return out;\n}\n/**\r\n * Multiplies two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n return out;\n}\n/**\r\n * Divides two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n return out;\n}\n/**\r\n * Math.ceil the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to ceil\r\n * @returns {vec2} out\r\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n return out;\n}\n/**\r\n * Math.floor the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to floor\r\n * @returns {vec2} out\r\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n return out;\n}\n/**\r\n * Returns the minimum of two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n return out;\n}\n/**\r\n * Returns the maximum of two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n return out;\n}\n/**\r\n * Math.round the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to round\r\n * @returns {vec2} out\r\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n return out;\n}\n/**\r\n * Scales a vec2 by a scalar number\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {vec2} out\r\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n return out;\n}\n/**\r\n * Adds two vec2's after scaling the second operand by a scalar value\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @param {Number} scale the amount to scale b by before adding\r\n * @returns {vec2} out\r\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n return out;\n}\n/**\r\n * Calculates the euclidian distance between two vec2's\r\n *\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {Number} distance between a and b\r\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return Math.hypot(x, y);\n}\n/**\r\n * Calculates the squared euclidian distance between two vec2's\r\n *\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {Number} squared distance between a and b\r\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return x * x + y * y;\n}\n/**\r\n * Calculates the length of a vec2\r\n *\r\n * @param {ReadonlyVec2} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport function length(a) {\n var x = a[0],\n y = a[1];\n return Math.hypot(x, y);\n}\n/**\r\n * Calculates the squared length of a vec2\r\n *\r\n * @param {ReadonlyVec2} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n */\n\nexport function squaredLength(a) {\n var x = a[0],\n y = a[1];\n return x * x + y * y;\n}\n/**\r\n * Negates the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to negate\r\n * @returns {vec2} out\r\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n return out;\n}\n/**\r\n * Returns the inverse of the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to invert\r\n * @returns {vec2} out\r\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n return out;\n}\n/**\r\n * Normalize a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to normalize\r\n * @returns {vec2} out\r\n */\n\nexport function normalize(out, a) {\n var x = a[0],\n y = a[1];\n var len = x * x + y * y;\n\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n return out;\n}\n/**\r\n * Calculates the dot product of two vec2's\r\n *\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {Number} dot product of a and b\r\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1];\n}\n/**\r\n * Computes the cross product of two vec2's\r\n * Note that the cross product must by definition produce a 3D vector\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function cross(out, a, b) {\n var z = a[0] * b[1] - a[1] * b[0];\n out[0] = out[1] = 0;\n out[2] = z;\n return out;\n}\n/**\r\n * Performs a linear interpolation between two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec2} out\r\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0],\n ay = a[1];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n return out;\n}\n/**\r\n * Generates a random vector with the given scale\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\r\n * @returns {vec2} out\r\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n out[0] = Math.cos(r) * scale;\n out[1] = Math.sin(r) * scale;\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to transform\r\n * @param {ReadonlyMat2} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat2(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat2d\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to transform\r\n * @param {ReadonlyMat2d} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat2d(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y + m[4];\n out[1] = m[1] * x + m[3] * y + m[5];\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat3\r\n * 3rd vector component is implicitly '1'\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to transform\r\n * @param {ReadonlyMat3} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat3(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[3] * y + m[6];\n out[1] = m[1] * x + m[4] * y + m[7];\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat4\r\n * 3rd vector component is implicitly '0'\r\n * 4th vector component is implicitly '1'\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to transform\r\n * @param {ReadonlyMat4} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0];\n var y = a[1];\n out[0] = m[0] * x + m[4] * y + m[12];\n out[1] = m[1] * x + m[5] * y + m[13];\n return out;\n}\n/**\r\n * Rotate a 2D vector\r\n * @param {vec2} out The receiving vec2\r\n * @param {ReadonlyVec2} a The vec2 point to rotate\r\n * @param {ReadonlyVec2} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec2} out\r\n */\n\nexport function rotate(out, a, b, rad) {\n //Translate point to the origin\n var p0 = a[0] - b[0],\n p1 = a[1] - b[1],\n sinC = Math.sin(rad),\n cosC = Math.cos(rad); //perform rotation and translate to correct position\n\n out[0] = p0 * cosC - p1 * sinC + b[0];\n out[1] = p0 * sinC + p1 * cosC + b[1];\n return out;\n}\n/**\r\n * Get the angle between two 2D vectors\r\n * @param {ReadonlyVec2} a The first operand\r\n * @param {ReadonlyVec2} b The second operand\r\n * @returns {Number} The angle in radians\r\n */\n\nexport function angle(a, b) {\n var x1 = a[0],\n y1 = a[1],\n x2 = b[0],\n y2 = b[1],\n // mag is the product of the magnitudes of a and b\n mag = Math.sqrt(x1 * x1 + y1 * y1) * Math.sqrt(x2 * x2 + y2 * y2),\n // mag &&.. short circuits if mag == 0\n cosine = mag && (x1 * x2 + y1 * y2) / mag; // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1\n\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n/**\r\n * Set the components of a vec2 to zero\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @returns {vec2} out\r\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n return out;\n}\n/**\r\n * Returns a string representation of a vector\r\n *\r\n * @param {ReadonlyVec2} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return \"vec2(\" + a[0] + \", \" + a[1] + \")\";\n}\n/**\r\n * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyVec2} a The first vector.\r\n * @param {ReadonlyVec2} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1];\n}\n/**\r\n * Returns whether or not the vectors have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyVec2} a The first vector.\r\n * @param {ReadonlyVec2} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1];\n var b0 = b[0],\n b1 = b[1];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1));\n}\n/**\r\n * Alias for {@link vec2.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Alias for {@link vec2.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;\n/**\r\n * Alias for {@link vec2.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link vec2.divide}\r\n * @function\r\n */\n\nexport var div = divide;\n/**\r\n * Alias for {@link vec2.distance}\r\n * @function\r\n */\n\nexport var dist = distance;\n/**\r\n * Alias for {@link vec2.squaredDistance}\r\n * @function\r\n */\n\nexport var sqrDist = squaredDistance;\n/**\r\n * Alias for {@link vec2.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Perform some operation over an array of vec2s.\r\n *\r\n * @param {Array} a the array of vectors to iterate over\r\n * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed\r\n * @param {Number} offset Number of elements to skip at the beginning of the array\r\n * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\r\n * @param {Function} fn Function to call for each vector in the array\r\n * @param {Object} [arg] additional argument to pass to fn\r\n * @returns {Array} a\r\n * @function\r\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 2;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n }\n\n return a;\n };\n}();","import * as glMatrix from \"./common.js\";\n/**\r\n * 3 Dimensional Vector\r\n * @module vec3\r\n */\n\n/**\r\n * Creates a new, empty vec3\r\n *\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(3);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n\n return out;\n}\n/**\r\n * Creates a new vec3 initialized with values from an existing vector\r\n *\r\n * @param {ReadonlyVec3} a vector to clone\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n/**\r\n * Calculates the length of a vec3\r\n *\r\n * @param {ReadonlyVec3} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return Math.hypot(x, y, z);\n}\n/**\r\n * Creates a new vec3 initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function fromValues(x, y, z) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n/**\r\n * Copy the values from one vec3 to another\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the source vector\r\n * @returns {vec3} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n/**\r\n * Set the components of a vec3 to the given values\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @returns {vec3} out\r\n */\n\nexport function set(out, x, y, z) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n/**\r\n * Adds two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n return out;\n}\n/**\r\n * Subtracts vector b from vector a\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n return out;\n}\n/**\r\n * Multiplies two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n return out;\n}\n/**\r\n * Divides two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n return out;\n}\n/**\r\n * Math.ceil the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to ceil\r\n * @returns {vec3} out\r\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n return out;\n}\n/**\r\n * Math.floor the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to floor\r\n * @returns {vec3} out\r\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n return out;\n}\n/**\r\n * Returns the minimum of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n return out;\n}\n/**\r\n * Returns the maximum of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n return out;\n}\n/**\r\n * Math.round the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to round\r\n * @returns {vec3} out\r\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n return out;\n}\n/**\r\n * Scales a vec3 by a scalar number\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {vec3} out\r\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n return out;\n}\n/**\r\n * Adds two vec3's after scaling the second operand by a scalar value\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {Number} scale the amount to scale b by before adding\r\n * @returns {vec3} out\r\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n return out;\n}\n/**\r\n * Calculates the euclidian distance between two vec3's\r\n *\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {Number} distance between a and b\r\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return Math.hypot(x, y, z);\n}\n/**\r\n * Calculates the squared euclidian distance between two vec3's\r\n *\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {Number} squared distance between a and b\r\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return x * x + y * y + z * z;\n}\n/**\r\n * Calculates the squared length of a vec3\r\n *\r\n * @param {ReadonlyVec3} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n */\n\nexport function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return x * x + y * y + z * z;\n}\n/**\r\n * Negates the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to negate\r\n * @returns {vec3} out\r\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n return out;\n}\n/**\r\n * Returns the inverse of the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to invert\r\n * @returns {vec3} out\r\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n return out;\n}\n/**\r\n * Normalize a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to normalize\r\n * @returns {vec3} out\r\n */\n\nexport function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var len = x * x + y * y + z * z;\n\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n return out;\n}\n/**\r\n * Calculates the dot product of two vec3's\r\n *\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {Number} dot product of a and b\r\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n/**\r\n * Computes the cross product of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function cross(out, a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2];\n var bx = b[0],\n by = b[1],\n bz = b[2];\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n}\n/**\r\n * Performs a linear interpolation between two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n return out;\n}\n/**\r\n * Performs a hermite interpolation with two control points\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {ReadonlyVec3} c the third operand\r\n * @param {ReadonlyVec3} d the fourth operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function hermite(out, a, b, c, d, t) {\n var factorTimes2 = t * t;\n var factor1 = factorTimes2 * (2 * t - 3) + 1;\n var factor2 = factorTimes2 * (t - 2) + t;\n var factor3 = factorTimes2 * (t - 1);\n var factor4 = factorTimes2 * (3 - 2 * t);\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n/**\r\n * Performs a bezier interpolation with two control points\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {ReadonlyVec3} c the third operand\r\n * @param {ReadonlyVec3} d the fourth operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function bezier(out, a, b, c, d, t) {\n var inverseFactor = 1 - t;\n var inverseFactorTimesTwo = inverseFactor * inverseFactor;\n var factorTimes2 = t * t;\n var factor1 = inverseFactorTimesTwo * inverseFactor;\n var factor2 = 3 * t * inverseFactorTimesTwo;\n var factor3 = 3 * factorTimes2 * inverseFactor;\n var factor4 = factorTimes2 * t;\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n/**\r\n * Generates a random vector with the given scale\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\r\n * @returns {vec3} out\r\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n var z = glMatrix.RANDOM() * 2.0 - 1.0;\n var zScale = Math.sqrt(1.0 - z * z) * scale;\n out[0] = Math.cos(r) * zScale;\n out[1] = Math.sin(r) * zScale;\n out[2] = z * scale;\n return out;\n}\n/**\r\n * Transforms the vec3 with a mat4.\r\n * 4th vector component is implicitly '1'\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to transform\r\n * @param {ReadonlyMat4} m matrix to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var w = m[3] * x + m[7] * y + m[11] * z + m[15];\n w = w || 1.0;\n out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n return out;\n}\n/**\r\n * Transforms the vec3 with a mat3.\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to transform\r\n * @param {ReadonlyMat3} m the 3x3 matrix to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformMat3(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n out[0] = x * m[0] + y * m[3] + z * m[6];\n out[1] = x * m[1] + y * m[4] + z * m[7];\n out[2] = x * m[2] + y * m[5] + z * m[8];\n return out;\n}\n/**\r\n * Transforms the vec3 with a quat\r\n * Can also be used for dual quaternions. (Multiply it with the real part)\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to transform\r\n * @param {ReadonlyQuat} q quaternion to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformQuat(out, a, q) {\n // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3];\n var x = a[0],\n y = a[1],\n z = a[2]; // var qvec = [qx, qy, qz];\n // var uv = vec3.cross([], qvec, a);\n\n var uvx = qy * z - qz * y,\n uvy = qz * x - qx * z,\n uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv);\n\n var uuvx = qy * uvz - qz * uvy,\n uuvy = qz * uvx - qx * uvz,\n uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w);\n\n var w2 = qw * 2;\n uvx *= w2;\n uvy *= w2;\n uvz *= w2; // vec3.scale(uuv, uuv, 2);\n\n uuvx *= 2;\n uuvy *= 2;\n uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv));\n\n out[0] = x + uvx + uuvx;\n out[1] = y + uvy + uuvy;\n out[2] = z + uvz + uuvz;\n return out;\n}\n/**\r\n * Rotate a 3D vector around the x-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {ReadonlyVec3} a The vec3 point to rotate\r\n * @param {ReadonlyVec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nexport function rotateX(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[0];\n r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);\n r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Rotate a 3D vector around the y-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {ReadonlyVec3} a The vec3 point to rotate\r\n * @param {ReadonlyVec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nexport function rotateY(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);\n r[1] = p[1];\n r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Rotate a 3D vector around the z-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {ReadonlyVec3} a The vec3 point to rotate\r\n * @param {ReadonlyVec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nexport function rotateZ(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);\n r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);\n r[2] = p[2]; //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Get the angle between two 3D vectors\r\n * @param {ReadonlyVec3} a The first operand\r\n * @param {ReadonlyVec3} b The second operand\r\n * @returns {Number} The angle in radians\r\n */\n\nexport function angle(a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n bx = b[0],\n by = b[1],\n bz = b[2],\n mag1 = Math.sqrt(ax * ax + ay * ay + az * az),\n mag2 = Math.sqrt(bx * bx + by * by + bz * bz),\n mag = mag1 * mag2,\n cosine = mag && dot(a, b) / mag;\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n/**\r\n * Set the components of a vec3 to zero\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @returns {vec3} out\r\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n return out;\n}\n/**\r\n * Returns a string representation of a vector\r\n *\r\n * @param {ReadonlyVec3} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return \"vec3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \")\";\n}\n/**\r\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyVec3} a The first vector.\r\n * @param {ReadonlyVec3} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];\n}\n/**\r\n * Returns whether or not the vectors have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyVec3} a The first vector.\r\n * @param {ReadonlyVec3} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2));\n}\n/**\r\n * Alias for {@link vec3.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;\n/**\r\n * Alias for {@link vec3.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link vec3.divide}\r\n * @function\r\n */\n\nexport var div = divide;\n/**\r\n * Alias for {@link vec3.distance}\r\n * @function\r\n */\n\nexport var dist = distance;\n/**\r\n * Alias for {@link vec3.squaredDistance}\r\n * @function\r\n */\n\nexport var sqrDist = squaredDistance;\n/**\r\n * Alias for {@link vec3.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Alias for {@link vec3.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Perform some operation over an array of vec3s.\r\n *\r\n * @param {Array} a the array of vectors to iterate over\r\n * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\r\n * @param {Number} offset Number of elements to skip at the beginning of the array\r\n * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\r\n * @param {Function} fn Function to call for each vector in the array\r\n * @param {Object} [arg] additional argument to pass to fn\r\n * @returns {Array} a\r\n * @function\r\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 3;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n }\n\n return a;\n };\n}();","/*\n * A fast javascript implementation of simplex noise by Jonas Wagner\n\nBased on a speed-improved simplex noise algorithm for 2D, 3D and 4D in Java.\nWhich is based on example code by Stefan Gustavson (stegu@itn.liu.se).\nWith Optimisations by Peter Eastman (peastman@drizzle.stanford.edu).\nBetter rank ordering method by Stefan Gustavson in 2012.\n\n\n Copyright (c) 2018 Jonas Wagner\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n */\n(function() {\n 'use strict';\n\n var F2 = 0.5 * (Math.sqrt(3.0) - 1.0);\n var G2 = (3.0 - Math.sqrt(3.0)) / 6.0;\n var F3 = 1.0 / 3.0;\n var G3 = 1.0 / 6.0;\n var F4 = (Math.sqrt(5.0) - 1.0) / 4.0;\n var G4 = (5.0 - Math.sqrt(5.0)) / 20.0;\n\n function SimplexNoise(randomOrSeed) {\n var random;\n if (typeof randomOrSeed == 'function') {\n random = randomOrSeed;\n }\n else if (randomOrSeed) {\n random = alea(randomOrSeed);\n } else {\n random = Math.random;\n }\n this.p = buildPermutationTable(random);\n this.perm = new Uint8Array(512);\n this.permMod12 = new Uint8Array(512);\n for (var i = 0; i < 512; i++) {\n this.perm[i] = this.p[i & 255];\n this.permMod12[i] = this.perm[i] % 12;\n }\n\n }\n SimplexNoise.prototype = {\n grad3: new Float32Array([1, 1, 0,\n -1, 1, 0,\n 1, -1, 0,\n\n -1, -1, 0,\n 1, 0, 1,\n -1, 0, 1,\n\n 1, 0, -1,\n -1, 0, -1,\n 0, 1, 1,\n\n 0, -1, 1,\n 0, 1, -1,\n 0, -1, -1]),\n grad4: new Float32Array([0, 1, 1, 1, 0, 1, 1, -1, 0, 1, -1, 1, 0, 1, -1, -1,\n 0, -1, 1, 1, 0, -1, 1, -1, 0, -1, -1, 1, 0, -1, -1, -1,\n 1, 0, 1, 1, 1, 0, 1, -1, 1, 0, -1, 1, 1, 0, -1, -1,\n -1, 0, 1, 1, -1, 0, 1, -1, -1, 0, -1, 1, -1, 0, -1, -1,\n 1, 1, 0, 1, 1, 1, 0, -1, 1, -1, 0, 1, 1, -1, 0, -1,\n -1, 1, 0, 1, -1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, -1,\n 1, 1, 1, 0, 1, 1, -1, 0, 1, -1, 1, 0, 1, -1, -1, 0,\n -1, 1, 1, 0, -1, 1, -1, 0, -1, -1, 1, 0, -1, -1, -1, 0]),\n noise2D: function(xin, yin) {\n var permMod12 = this.permMod12;\n var perm = this.perm;\n var grad3 = this.grad3;\n var n0 = 0; // Noise contributions from the three corners\n var n1 = 0;\n var n2 = 0;\n // Skew the input space to determine which simplex cell we're in\n var s = (xin + yin) * F2; // Hairy factor for 2D\n var i = Math.floor(xin + s);\n var j = Math.floor(yin + s);\n var t = (i + j) * G2;\n var X0 = i - t; // Unskew the cell origin back to (x,y) space\n var Y0 = j - t;\n var x0 = xin - X0; // The x,y distances from the cell origin\n var y0 = yin - Y0;\n // For the 2D case, the simplex shape is an equilateral triangle.\n // Determine which simplex we are in.\n var i1, j1; // Offsets for second (middle) corner of simplex in (i,j) coords\n if (x0 > y0) {\n i1 = 1;\n j1 = 0;\n } // lower triangle, XY order: (0,0)->(1,0)->(1,1)\n else {\n i1 = 0;\n j1 = 1;\n } // upper triangle, YX order: (0,0)->(0,1)->(1,1)\n // A step of (1,0) in (i,j) means a step of (1-c,-c) in (x,y), and\n // a step of (0,1) in (i,j) means a step of (-c,1-c) in (x,y), where\n // c = (3-sqrt(3))/6\n var x1 = x0 - i1 + G2; // Offsets for middle corner in (x,y) unskewed coords\n var y1 = y0 - j1 + G2;\n var x2 = x0 - 1.0 + 2.0 * G2; // Offsets for last corner in (x,y) unskewed coords\n var y2 = y0 - 1.0 + 2.0 * G2;\n // Work out the hashed gradient indices of the three simplex corners\n var ii = i & 255;\n var jj = j & 255;\n // Calculate the contribution from the three corners\n var t0 = 0.5 - x0 * x0 - y0 * y0;\n if (t0 >= 0) {\n var gi0 = permMod12[ii + perm[jj]] * 3;\n t0 *= t0;\n n0 = t0 * t0 * (grad3[gi0] * x0 + grad3[gi0 + 1] * y0); // (x,y) of grad3 used for 2D gradient\n }\n var t1 = 0.5 - x1 * x1 - y1 * y1;\n if (t1 >= 0) {\n var gi1 = permMod12[ii + i1 + perm[jj + j1]] * 3;\n t1 *= t1;\n n1 = t1 * t1 * (grad3[gi1] * x1 + grad3[gi1 + 1] * y1);\n }\n var t2 = 0.5 - x2 * x2 - y2 * y2;\n if (t2 >= 0) {\n var gi2 = permMod12[ii + 1 + perm[jj + 1]] * 3;\n t2 *= t2;\n n2 = t2 * t2 * (grad3[gi2] * x2 + grad3[gi2 + 1] * y2);\n }\n // Add contributions from each corner to get the final noise value.\n // The result is scaled to return values in the interval [-1,1].\n return 70.0 * (n0 + n1 + n2);\n },\n // 3D simplex noise\n noise3D: function(xin, yin, zin) {\n var permMod12 = this.permMod12;\n var perm = this.perm;\n var grad3 = this.grad3;\n var n0, n1, n2, n3; // Noise contributions from the four corners\n // Skew the input space to determine which simplex cell we're in\n var s = (xin + yin + zin) * F3; // Very nice and simple skew factor for 3D\n var i = Math.floor(xin + s);\n var j = Math.floor(yin + s);\n var k = Math.floor(zin + s);\n var t = (i + j + k) * G3;\n var X0 = i - t; // Unskew the cell origin back to (x,y,z) space\n var Y0 = j - t;\n var Z0 = k - t;\n var x0 = xin - X0; // The x,y,z distances from the cell origin\n var y0 = yin - Y0;\n var z0 = zin - Z0;\n // For the 3D case, the simplex shape is a slightly irregular tetrahedron.\n // Determine which simplex we are in.\n var i1, j1, k1; // Offsets for second corner of simplex in (i,j,k) coords\n var i2, j2, k2; // Offsets for third corner of simplex in (i,j,k) coords\n if (x0 >= y0) {\n if (y0 >= z0) {\n i1 = 1;\n j1 = 0;\n k1 = 0;\n i2 = 1;\n j2 = 1;\n k2 = 0;\n } // X Y Z order\n else if (x0 >= z0) {\n i1 = 1;\n j1 = 0;\n k1 = 0;\n i2 = 1;\n j2 = 0;\n k2 = 1;\n } // X Z Y order\n else {\n i1 = 0;\n j1 = 0;\n k1 = 1;\n i2 = 1;\n j2 = 0;\n k2 = 1;\n } // Z X Y order\n }\n else { // x0 y0) rankx++;\n else ranky++;\n if (x0 > z0) rankx++;\n else rankz++;\n if (x0 > w0) rankx++;\n else rankw++;\n if (y0 > z0) ranky++;\n else rankz++;\n if (y0 > w0) ranky++;\n else rankw++;\n if (z0 > w0) rankz++;\n else rankw++;\n var i1, j1, k1, l1; // The integer offsets for the second simplex corner\n var i2, j2, k2, l2; // The integer offsets for the third simplex corner\n var i3, j3, k3, l3; // The integer offsets for the fourth simplex corner\n // simplex[c] is a 4-vector with the numbers 0, 1, 2 and 3 in some order.\n // Many values of c will never occur, since e.g. x>y>z>w makes x= 3 ? 1 : 0;\n j1 = ranky >= 3 ? 1 : 0;\n k1 = rankz >= 3 ? 1 : 0;\n l1 = rankw >= 3 ? 1 : 0;\n // Rank 2 denotes the second largest coordinate.\n i2 = rankx >= 2 ? 1 : 0;\n j2 = ranky >= 2 ? 1 : 0;\n k2 = rankz >= 2 ? 1 : 0;\n l2 = rankw >= 2 ? 1 : 0;\n // Rank 1 denotes the second smallest coordinate.\n i3 = rankx >= 1 ? 1 : 0;\n j3 = ranky >= 1 ? 1 : 0;\n k3 = rankz >= 1 ? 1 : 0;\n l3 = rankw >= 1 ? 1 : 0;\n // The fifth corner has all coordinate offsets = 1, so no need to compute that.\n var x1 = x0 - i1 + G4; // Offsets for second corner in (x,y,z,w) coords\n var y1 = y0 - j1 + G4;\n var z1 = z0 - k1 + G4;\n var w1 = w0 - l1 + G4;\n var x2 = x0 - i2 + 2.0 * G4; // Offsets for third corner in (x,y,z,w) coords\n var y2 = y0 - j2 + 2.0 * G4;\n var z2 = z0 - k2 + 2.0 * G4;\n var w2 = w0 - l2 + 2.0 * G4;\n var x3 = x0 - i3 + 3.0 * G4; // Offsets for fourth corner in (x,y,z,w) coords\n var y3 = y0 - j3 + 3.0 * G4;\n var z3 = z0 - k3 + 3.0 * G4;\n var w3 = w0 - l3 + 3.0 * G4;\n var x4 = x0 - 1.0 + 4.0 * G4; // Offsets for last corner in (x,y,z,w) coords\n var y4 = y0 - 1.0 + 4.0 * G4;\n var z4 = z0 - 1.0 + 4.0 * G4;\n var w4 = w0 - 1.0 + 4.0 * G4;\n // Work out the hashed gradient indices of the five simplex corners\n var ii = i & 255;\n var jj = j & 255;\n var kk = k & 255;\n var ll = l & 255;\n // Calculate the contribution from the five corners\n var t0 = 0.6 - x0 * x0 - y0 * y0 - z0 * z0 - w0 * w0;\n if (t0 < 0) n0 = 0.0;\n else {\n var gi0 = (perm[ii + perm[jj + perm[kk + perm[ll]]]] % 32) * 4;\n t0 *= t0;\n n0 = t0 * t0 * (grad4[gi0] * x0 + grad4[gi0 + 1] * y0 + grad4[gi0 + 2] * z0 + grad4[gi0 + 3] * w0);\n }\n var t1 = 0.6 - x1 * x1 - y1 * y1 - z1 * z1 - w1 * w1;\n if (t1 < 0) n1 = 0.0;\n else {\n var gi1 = (perm[ii + i1 + perm[jj + j1 + perm[kk + k1 + perm[ll + l1]]]] % 32) * 4;\n t1 *= t1;\n n1 = t1 * t1 * (grad4[gi1] * x1 + grad4[gi1 + 1] * y1 + grad4[gi1 + 2] * z1 + grad4[gi1 + 3] * w1);\n }\n var t2 = 0.6 - x2 * x2 - y2 * y2 - z2 * z2 - w2 * w2;\n if (t2 < 0) n2 = 0.0;\n else {\n var gi2 = (perm[ii + i2 + perm[jj + j2 + perm[kk + k2 + perm[ll + l2]]]] % 32) * 4;\n t2 *= t2;\n n2 = t2 * t2 * (grad4[gi2] * x2 + grad4[gi2 + 1] * y2 + grad4[gi2 + 2] * z2 + grad4[gi2 + 3] * w2);\n }\n var t3 = 0.6 - x3 * x3 - y3 * y3 - z3 * z3 - w3 * w3;\n if (t3 < 0) n3 = 0.0;\n else {\n var gi3 = (perm[ii + i3 + perm[jj + j3 + perm[kk + k3 + perm[ll + l3]]]] % 32) * 4;\n t3 *= t3;\n n3 = t3 * t3 * (grad4[gi3] * x3 + grad4[gi3 + 1] * y3 + grad4[gi3 + 2] * z3 + grad4[gi3 + 3] * w3);\n }\n var t4 = 0.6 - x4 * x4 - y4 * y4 - z4 * z4 - w4 * w4;\n if (t4 < 0) n4 = 0.0;\n else {\n var gi4 = (perm[ii + 1 + perm[jj + 1 + perm[kk + 1 + perm[ll + 1]]]] % 32) * 4;\n t4 *= t4;\n n4 = t4 * t4 * (grad4[gi4] * x4 + grad4[gi4 + 1] * y4 + grad4[gi4 + 2] * z4 + grad4[gi4 + 3] * w4);\n }\n // Sum up and scale the result to cover the range [-1,1]\n return 27.0 * (n0 + n1 + n2 + n3 + n4);\n }\n };\n\n function buildPermutationTable(random) {\n var i;\n var p = new Uint8Array(256);\n for (i = 0; i < 256; i++) {\n p[i] = i;\n }\n for (i = 0; i < 255; i++) {\n var r = i + ~~(random() * (256 - i));\n var aux = p[i];\n p[i] = p[r];\n p[r] = aux;\n }\n return p;\n }\n SimplexNoise._buildPermutationTable = buildPermutationTable;\n\n function alea() {\n // Johannes Baagøe , 2010\n var s0 = 0;\n var s1 = 0;\n var s2 = 0;\n var c = 1;\n\n var mash = masher();\n s0 = mash(' ');\n s1 = mash(' ');\n s2 = mash(' ');\n\n for (var i = 0; i < arguments.length; i++) {\n s0 -= mash(arguments[i]);\n if (s0 < 0) {\n s0 += 1;\n }\n s1 -= mash(arguments[i]);\n if (s1 < 0) {\n s1 += 1;\n }\n s2 -= mash(arguments[i]);\n if (s2 < 0) {\n s2 += 1;\n }\n }\n mash = null;\n return function() {\n var t = 2091639 * s0 + c * 2.3283064365386963e-10; // 2^-32\n s0 = s1;\n s1 = s2;\n return s2 = t - (c = t | 0);\n };\n }\n function masher() {\n var n = 0xefc8249d;\n return function(data) {\n data = data.toString();\n for (var i = 0; i < data.length; i++) {\n n += data.charCodeAt(i);\n var h = 0.02519603282416938 * n;\n n = h >>> 0;\n h -= n;\n h *= n;\n n = h >>> 0;\n h -= n;\n n += h * 0x100000000; // 2^32\n }\n return (n >>> 0) * 2.3283064365386963e-10; // 2^-32\n };\n }\n\n // amd\n if (typeof define !== 'undefined' && define.amd) define(function() {return SimplexNoise;});\n // common js\n if (typeof exports !== 'undefined') exports.SimplexNoise = SimplexNoise;\n // browser\n else if (typeof window !== 'undefined') window.SimplexNoise = SimplexNoise;\n // nodejs\n if (typeof module !== 'undefined') {\n module.exports = SimplexNoise;\n }\n\n})();\n","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n// find the complete implementation of crypto (msCrypto) on IE11.\nvar getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => module['default'] :\n\t\t() => module;\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(\"./dist/index-light.js\");\n"],"sourceRoot":""} \ No newline at end of file diff --git a/build/urpflanze-light.min.js b/build/urpflanze-light.min.js index fa1601a..36507cc 100644 --- a/build/urpflanze-light.min.js +++ b/build/urpflanze-light.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Urpflanze=e():t.Urpflanze=e()}(window,(function(){return(()=>{var __webpack_modules__={1723:(t,e,n)=>{"use strict";function r(t){var e=i(t);if(e){if("hsl"===e.type){var n=function(t,e,n){var r,i,o;if(t/=360,n/=100,0==(e/=100))r=i=o=n;else{var a=function(t,e,n){return(n+=n<0?1:n>1?-1:0)<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t},s=n<.5?n*(1+e):n+e-n*e,p=2*n-s;r=a(p,s,t+1/3),i=a(p,s,t),o=a(p,s,t-1/3)}return[.5+255*r<<0,.5+255*i<<0,.5+255*o<<0]}(e.a,e.b,e.c);return{r:n[0],g:n[1],b:n[2],h:e.a,s:e.b,l:e.c,alpha:e.alpha}}var r=function(t,e,n){t/=255,e/=255,n/=255;var r,i,o=Math.max(t,e,n),a=Math.min(t,e,n),s=(o+a)/2;if(o==a)r=i=0;else{var p=o-a;switch(i=s>.5?p/(2-o-a):p/(o+a),o){case t:r=(e-n)/p+(e16777215?{type:"rgb",a:t>>24&255,b:t>>16&255,c:t>>8&255,alpha:(255&t)/255}:{type:"rgb",a:t>>16&255,b:t>>8&255,c:255&t,alpha:1};t=t.replace(/\s/g,"");var e=/^#([0-9a-f]{3,8})$/i.exec(t);if(e){var n=e[1];return 3===n.length?{type:"rgb",a:parseInt(n[0]+n[0],16),b:parseInt(n[1]+n[1],16),c:parseInt(n[2]+n[2],16),alpha:1}:{type:"rgb",a:parseInt(n[0]+n[1],16),b:parseInt(n[2]+n[3],16),c:parseInt(n[4]+n[5],16),alpha:n.length>6?parseInt(n.substring(6),16)/255:1}}if(e=/^((hsl|rgb)a?)\((\d+),(\d+)%?,(\d+)%?,?(.+)?\)$/i.exec(t)){var r=e,i=r[2],o=r[3],a=r[4],s=r[5],p=r[6];return{type:i,a:+o,b:+a,c:+s,alpha:p?+p:1}}}n.d(e,{k0:()=>r,lu:()=>i})},9277:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{zO:()=>now,Ux:()=>toDegrees,Yr:()=>toRadians,qo:()=>toArray,t7:()=>lerp,uZ:()=>clamp,Sr:()=>relativeClamp,tF:()=>noise,aT:()=>angleFromRepetition,B7:()=>angle2FromRepetition,db:()=>distanceFromRepetition});var simplex_noise__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(21),simplex_noise__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(simplex_noise__WEBPACK_IMPORTED_MODULE_0__),_core_types_scene_child__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(9835),gl_matrix__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(1437),parseFunction={suffix:"$fn:",parse:function(t){return"function"==typeof t&&"SimpleAnimation"!==t.name?parseFunction.suffix+t.toString():t},unparse:function(data){return"string"==typeof data&&0===data.indexOf(parseFunction.suffix)?eval(data.substr(parseFunction.suffix.length)):data}};function cancelablePromise(t){var e=!1,n=!1;return{promise:new Promise((function(r,i){t.then((function(t){e=!0,n?i("canceled"):r(t)})).catch((function(t){e=!0,i(n?"canceled":t)}))})),resolved:function(){return e},canceled:function(){return n},cancel:function(){n=!0}}}function now(){return performance.now()}function toDegrees(t){return 180*t/Math.PI}function toRadians(t){return t*Math.PI/180}function toArray(t){return Array.isArray(t)?t:[t,t]}function lerp(t,e,n){return(1-n)*t+n*e}function clamp(t,e,n){return n<=t?t:n>=e?e:n}function relativeClamp(t,e,n,r,i){return clamp(r,i,(n-t)/(e-t)*(i-r)+r)}var noises={random:new(simplex_noise__WEBPACK_IMPORTED_MODULE_0___default())(Math.random)};function noise(t,e,n,r){return void 0===t&&(t="random"),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===noises[t]&&(noises[t]=new(simplex_noise__WEBPACK_IMPORTED_MODULE_0___default())(t)),noises[t].noise3D(e,n,r)}function angleFromRepetition(t,e){if(void 0===e&&(e=[0,0]),t.type==_core_types_scene_child__WEBPACK_IMPORTED_MODULE_1__.i.Matrix){var n=gl_matrix__WEBPACK_IMPORTED_MODULE_2__.al((t.col.count-1)/2,(t.row.count-1)/2);n[0]+=n[0]*e[0],n[1]+=n[1]*e[1];var r=t.col.index-1-n[0],i=t.row.index-1-n[1];return 0===r?0:Math.atan(i/r)}return(t.angle-Math.PI)/2}function angle2FromRepetition(t,e){if(void 0===e&&(e=[0,0]),t.type==_core_types_scene_child__WEBPACK_IMPORTED_MODULE_1__.i.Matrix){var n=gl_matrix__WEBPACK_IMPORTED_MODULE_2__.al((t.col.count-1)/2,(t.row.count-1)/2);n[0]+=n[0]*e[0],n[1]+=n[1]*e[1];var r=t.col.index-1-n[0],i=t.col.index-1-n[1];return 0===r?0:Math.atan2(i,r)}return t.angle-Math.PI}function distanceFromRepetition(t,e){if(void 0===e&&(e=[0,0]),t.type==_core_types_scene_child__WEBPACK_IMPORTED_MODULE_1__.i.Matrix){var n=gl_matrix__WEBPACK_IMPORTED_MODULE_2__.al(.5,.5);n[0]+=n[0]*e[0],n[1]+=n[1]*e[1];var r=gl_matrix__WEBPACK_IMPORTED_MODULE_2__.al(t.col.offset-.5/t.col.count,t.row.offset-.5/t.row.count);return gl_matrix__WEBPACK_IMPORTED_MODULE_2__.TE(r,n)}return 1}},5631:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r,i=n(817),o=n(9213),a=n(5282),s=n(7329),p=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const c=function(t){function e(e){void 0===e&&(e={});var n=this;return e.type="Group",(n=t.call(this,e)||this).children=[],["id","name","data","order","type"].forEach((function(t){t in e&&delete e[t]})),n.props=e,n}return p(e,t),e.prototype.isStatic=function(){for(var t=this.children,e=0,n=t.length;e0?Math.max.apply(o,o.children.map((function(t){return t.order||0})))+1:0,o.scene&&i.Z.propagateToChilden(a,o.scene),o.children.push(a)},o=this,a=0,s=e.length;a=0&&t=0&&t0){this.children.forEach((function(e){return t.push(e.getBounding())}));for(var n=0,r=this.children.length;nt[n].x?t[n].x:e.x,e.y=e.y>t[n].y?t[n].y:e.y,e.width=e.width0&&n[n.length-1].clearBuffer(t,e)}},e.prototype.setProp=function(t,e){var n=this;"object"==typeof t?Object.keys(t).forEach((function(e){return n.props[e]=t[e]})):this.props[t]=e,this.children.forEach((function(n){return n.setProp(t,e)}))},e.prototype.setPropUnsafe=function(e,n){t.prototype.setPropUnsafe.call(this,e,n),this.children.forEach((function(t){return t.setPropUnsafe(e,n)}))},e.prototype.getBufferLength=function(t){return this.children.map((function(e){return e.getBufferLength(t)})).reduce((function(t,e){return t+e}),0)},e.prototype.getBuffer=function(){var t=this.children.map((function(t){return t.getBuffer()})).filter((function(t){return void 0!==t})),e=t.reduce((function(t,e){return t+e.length}),0);if(e>0){var n=new Float32Array(e);n.set(t[0],0);for(var r=1,i=0,o=t.length;r{"use strict";n.d(e,{Z:()=>a});var r=n(9213),i=n(5631),o=n(8227);const a=function(){function t(t){void 0===t&&(t={}),this.width=400,this.height=400,this.background="hsla(0, 0%, 0%, 1)",this.color="hsla(0, 0%, 100%, 1)",this.currentTime=0,void 0!==t.width&&(this.width=t.width),void 0!==t.height&&(this.height=t.height),void 0!==t.background&&(this.background=t.background),void 0!==t.color&&(this.color=t.color),this.children=[],this.center=[this.width/2,this.height/2]}return t.prototype.getWidth=function(t){return void 0===t&&(t=100),this.width*t/100},t.prototype.getHeight=function(t){return void 0===t&&(t=100),this.height*t/100},t.prototype.resize=function(t,e){void 0===e&&(e=t),this.width=t,this.height=e,this.center=[this.width/2,this.height/2],this.children.forEach((function(t){return t.clearBuffer(!0,!1)}))},t.prototype.update=function(t){this.currentTime=t;for(var e=0,n=this.children.length;e0?Math.max.apply(this,this.children.map((function(t){return t.order||0})))+1:0,t.propagateToChilden(a,this),this.children.push(a),a.clearBuffer(!0,!1)}this.sortChildren()},t.prototype.sortChildren=function(){this.children.sort((function(t,e){return t.order-e.order})),this.children=this.children.map((function(t,e){return t.order=e,t}))},t.prototype.find=function(t){for(var e=this.getChildren(),n=0,r=e.length;n=0&&t=0&&t{"use strict";n.d(e,{Z:()=>i});var r=0;const i=function(){function t(t){var e;this.id=null!==(e=t.id)&&void 0!==e?e:++r,this.type=t.type||"SceneChild",this.name=t.name||this.type+"_"+this.id,this.data=t.data||{},this.props={}}return t.prototype.find=function(t){return this.id===t||this.name===t?this:null},t.prototype.getProps=function(){return this.props},t.prototype.getProp=function(t,e,n){var r;return null!==(r=this.props[t])&&void 0!==r?r:n},t.prototype.setPropUnsafe=function(t,e){var n=this;"string"==typeof t?this.props[t]=e:Object.keys(t).forEach((function(e){return n.props[e]=t[e]}))},t}()},212:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=new Array(4),i={create:function(t,e){void 0===t&&(t=0);var n=new Array(2);return"number"==typeof t?(n[0]=t,n[1]=null!=e?e:t):(n[0]=t[0],n[1]=t[1]),n},normalize:function(t){var e=i.length(t);return 0!==e?[t[0]/e,t[1]/e]:[0,0]},distance:function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1])},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},length:function(t){return Math.hypot(t[0],t[1])},angle:function(t,e){return t=i.normalize(t),e=i.normalize(e),Math.acos(i.dot(t,e))},skewX:function(t,e){t[0]+=Math.tan(e)*t[1]},skewY:function(t,e){t[1]+=Math.tan(e)*t[0]},squeezeX:function(t,e){t[1]+=t[1]*(t[0]*-e)},squeezeY:function(t,e){t[0]+=t[0]*(t[1]*e)},rotate:function(t,e,n){var r=t[0]-n[0],i=t[1]-n[1];t[0]=r*e[0]+i*e[1]+n[0],t[1]=r*e[2]+i*e[3]+n[1]},rotateX:function(t,e,n){r[0]=1,r[1]=0,r[2]=0,r[3]=Math.cos(n),i.rotate(t,r,e)},rotateY:function(t,e,n){r[0]=Math.cos(n),r[1]=0,r[2]=0,r[3]=1,i.rotate(t,r,e)},rotateZ:function(t,e,n){r[0]=Math.cos(n),r[1]=-Math.sin(n),r[2]=Math.sin(n),r[3]=Math.cos(n),i.rotate(t,r,e)},translate:function(t,e){t[0]+=e[0],t[1]+=e[1]},scale:function(t,e){t[0]*=e[0],t[1]*=e[1]},divide:function(t,e){t[0]/=e[0],t[1]/=e[1]},toString:function(t){return"x: "+t[0]+", y: "+t[1]},ZERO:Array.from([0,0]),ONE:Array.from([1,1])};const o=i},7329:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r={empty:function(){return{cx:0,cy:0,x:-1,y:-1,width:2,height:2}},clear:function(t){t[0]=void 0,t[1]=void 0,t[2]=void 0,t[3]=void 0},add:function(t,e,n){(void 0===t[0]||et[2])&&(t[2]=e),(void 0===t[1]||nt[3])&&(t[3]=n)},sum:function(t,e){void 0!==e[0]&&void 0!==e[1]&&void 0!==e[2]&&void 0!==e[3]?void 0===t[0]||void 0===t[1]||void 0===t[2]||void 0===t[3]?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3]):(t[0]e[2]&&(t[2]=e[2]),t[1]e[3]&&(t[3]=e[3])):console.warn("[Urplfanze:Bounding] cannot sum bounding")},bind:function(t,e){void 0!==e[0]&&void 0!==e[1]&&void 0!==e[2]&&void 0!==e[3]?(t.x=e[0],t.y=e[1],t.width=e[2]-e[0],t.height=e[3]-e[1],t.cx=t.x+t.width/2,t.cy=t.y+t.height/2):console.warn("[Urplfanze:Bounding] cannot bind bounding")}}},2727:(t,e,n)=>{"use strict";n.d(e,{Gt:()=>i,hp:()=>o,uP:()=>a,s8:()=>s,pn:()=>p,$2:()=>c});var r=n(9685),i=[0,0,0],o=[0,0],a=[1,1];function s(t,e){return t[0]=1,t[1]=Math.tan(e[1]),t[2]=0,t[3]=0,t[4]=Math.tan(e[0]),t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function p(t){return Array.isArray(t)?[t[0],t[1]]:[t,t]}function c(t,e){return void 0===e&&(e=0),Array.isArray(t)?[t[0],t[1],e]:[t,t,e]}r.ZR(Array)},4426:(t,e,n)=>{"use strict";n.d(e,{cM:()=>r,yo:()=>i,Q_:()=>o,$B:()=>a});var r=function(t,e){return Math.log(t)/Math.log(e)},i=2*Math.PI,o=(1+Math.sqrt(5))/2,a=function(t,e){var n=t%e;return n<0?n+e:n}},8227:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r,i=n(5282),o=n(9213),a=n(817),s=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),p=function(){return(p=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0?this.buffer.length:(this.shape?this.shape.getBufferLength(t):0)*this.getRepetitionCount()},e.prototype.generateBuffer=function(t,n){return this.shape?(this.shape.generate(t,!1,n),this.shape.getBuffer()||e.EMPTY_BUFFER):e.EMPTY_BUFFER},e.prototype.getShapeBounding=function(){return this.shape?this.shape.getBounding():this.bounding},e.prototype.addIndex=function(t,n,r){if(this.shape){var i=this.shape.getIndexedBuffer()||[],o={shape:this,frameLength:t,repetition:{type:n.type,angle:n.angle,index:n.index,count:n.count,offset:n.offset,row:{index:n.row.index,count:n.row.count,offset:n.row.offset},col:{index:n.col.index,count:n.col.count,offset:n.col.offset}}};void 0!==r&&(o.recursion={index:r.index,offset:r.offset,count:r.offset,level:r.level});for(var a=0,s=i.length;a{"use strict";n.d(e,{Z:()=>R});var r=n(9685);function i(){var t=new r.WT(16);return r.WT!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function o(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function a(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],p=e[5],c=e[6],u=e[7],f=e[8],l=e[9],h=e[10],d=e[11],v=e[12],y=e[13],m=e[14],g=e[15],_=n[0],b=n[1],w=n[2],x=n[3];return t[0]=_*r+b*s+w*f+x*v,t[1]=_*i+b*p+w*l+x*y,t[2]=_*o+b*c+w*h+x*m,t[3]=_*a+b*u+w*d+x*g,_=n[4],b=n[5],w=n[6],x=n[7],t[4]=_*r+b*s+w*f+x*v,t[5]=_*i+b*p+w*l+x*y,t[6]=_*o+b*c+w*h+x*m,t[7]=_*a+b*u+w*d+x*g,_=n[8],b=n[9],w=n[10],x=n[11],t[8]=_*r+b*s+w*f+x*v,t[9]=_*i+b*p+w*l+x*y,t[10]=_*o+b*c+w*h+x*m,t[11]=_*a+b*u+w*d+x*g,_=n[12],b=n[13],w=n[14],x=n[15],t[12]=_*r+b*s+w*f+x*v,t[13]=_*i+b*p+w*l+x*y,t[14]=_*o+b*c+w*h+x*m,t[15]=_*a+b*u+w*d+x*g,t}function s(t,e,n){var r,i,o,a,s,p,c,u,f,l,h,d,v=n[0],y=n[1],m=n[2];return e===t?(t[12]=e[0]*v+e[4]*y+e[8]*m+e[12],t[13]=e[1]*v+e[5]*y+e[9]*m+e[13],t[14]=e[2]*v+e[6]*y+e[10]*m+e[14],t[15]=e[3]*v+e[7]*y+e[11]*m+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],p=e[5],c=e[6],u=e[7],f=e[8],l=e[9],h=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=p,t[6]=c,t[7]=u,t[8]=f,t[9]=l,t[10]=h,t[11]=d,t[12]=r*v+s*y+f*m+e[12],t[13]=i*v+p*y+l*m+e[13],t[14]=o*v+c*y+h*m+e[14],t[15]=a*v+u*y+d*m+e[15]),t}function p(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function c(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],p=e[7],c=e[8],u=e[9],f=e[10],l=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*r,t[5]=a*i+u*r,t[6]=s*i+f*r,t[7]=p*i+l*r,t[8]=c*i-o*r,t[9]=u*i-a*r,t[10]=f*i-s*r,t[11]=l*i-p*r,t}function u(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],p=e[3],c=e[8],u=e[9],f=e[10],l=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*r,t[1]=a*i-u*r,t[2]=s*i-f*r,t[3]=p*i-l*r,t[8]=o*r+c*i,t[9]=a*r+u*i,t[10]=s*r+f*i,t[11]=p*r+l*i,t}function f(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],p=e[3],c=e[4],u=e[5],f=e[6],l=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*r,t[1]=a*i+u*r,t[2]=s*i+f*r,t[3]=p*i+l*r,t[4]=c*i-o*r,t[5]=u*i-a*r,t[6]=f*i-s*r,t[7]=l*i-p*r,t}function l(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}function h(t,e,n){var i=new r.WT(3);return i[0]=t,i[1]=e,i[2]=n,i}function d(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function v(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function y(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function m(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}var g,_,b=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t},w=(g=new r.WT(3),r.WT!=Float32Array&&(g[0]=0,g[1]=0,g[2]=0),g,n(1437)),x=n(9835),S=n(9277),O=n(2727),M=n(212),P=n(4426),Z=n(7329),C=n(9213),I=(_=function(t,e){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}_(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),A=function(){return(A=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&n[n.length-1].clearBuffer(t,e)}},e.prototype.generate=function(t,n,r){var i,g;if(void 0===n&&(n=!1),!this.buffer||!this.bStatic&&(t!==this.generateId||this.bUseParent||this.bUseRecursion)){this.generateId=t,this.bStaticIndexed&&this.bIndexed||(this.indexedBuffer=[]);var _=e.getEmptyPropArguments(this,r),C=_.repetition,I=this.getProp("repetitions",_,1),A=Array.isArray(I)?x.i.Matrix:x.i.Ring,R=Array.isArray(I)?I[0]*(null!==(i=I[1])&&void 0!==i?i:I[0]):I,E=Array.isArray(I)?I[0]:R,F=Array.isArray(I)?null!==(g=I[1])&&void 0!==g?g:I[0]:1,D=C.row;D.count=E;var q=C.col;q.count=F,C.count=R,C.col.count=F,C.row.count=E,C.type=A;for(var j=0,U=[],z=0,V=w.al((F-1)/2,(E-1)/2),Y=this.scene?[this.scene.center[0],this.scene.center[1],0]:[0,0,0],N=[void 0,void 0,void 0,void 0],W=[void 0,void 0,void 0,void 0],G=0;G1?z/(R-1):1,C.angle=A===x.i.Ring?P.yo/R*z:0,q.index=H+1,q.offset=F>1?H/(F-1):1,D.index=G+1,D.offset=E>1?G/(E-1):1;var X=this.generateBuffer(t,_),K=X.length,$=this.getShapeBounding();U[z]=new Float32Array(K),j+=K;var J=O.pn(this.getProp("distance",_,O.hp)),Q=this.getProp("displace",_,0),tt=O.$2(this.getProp("scale",_,O.uP),1),et=O.$2(this.getProp("translate",_,O.hp),0),nt=this.getProp("skewX",_,0),rt=this.getProp("skewY",_,0),it=this.getProp("squeezeX",_,0),ot=this.getProp("squeezeY",_,0),at=this.getProp("rotateX",_,0),st=this.getProp("rotateY",_,0),pt=this.getProp("rotateZ",_,0),ct=(0,S.uZ)(0,1,this.getProp("perspective",_,0)),ut=O.$2(this.getProp("perspectiveOrigin",_,O.hp),0),ft=O.$2(this.getProp("transformOrigin",_,O.hp),0),lt=void 0;switch(A){case x.i.Ring:m(lt=h(J[0],0,0),lt,O.Gt,C.angle+Q);break;case x.i.Matrix:lt=h(J[1]*(H-V[0]),J[0]*(G-V[1]),0)}var ht=ct>0?Math.max($.width,$.height)/2:1,dt=ct>0?ht+10*ht*(1-ct):0,vt=0!==ct||0!==ft[0]||0!==ft[1],yt=0!==ut[0]||0!==ut[1];vt&&(ft[0]*=$.width/2,ft[1]*=$.height/2,ft[2]=dt),o(B),vt&&s(B,B,ft),0===et[0]&&0===et[1]||s(B,B,et),0===nt&&0===rt||(O.s8(T,[nt,rt]),a(B,B,T)),0!==at&&c(B,B,at),0!==st&&u(B,B,st),0!==pt&&f(B,B,pt),1===tt[0]&&1===tt[1]||p(B,B,tt),vt&&s(B,B,v(ft,ft,-1)),dt>0&&(yt&&(ut[0]*=$.width/2,ut[1]*=$.height/2,ut[2]=0),l(k,-Math.PI/2,1,0,1/0)),o(L),s(L,L,lt),n&&s(L,L,Y),A===x.i.Ring&&f(L,L,C.angle+Q),Z.Z.clear(W);for(var mt=0;mt0&&(yt&&d(gt,gt,ut),y(gt,gt,k),v(gt,gt,dt),yt&&b(gt,gt,ut)),this.vertexCallback){var _t=mt/2,bt=K/2,wt={index:_t+1,count:bt,offset:bt>1?_t/(bt-1):1};this.vertexCallback(gt,wt,_)}y(gt,gt,L),U[z][mt]=gt[0],U[z][mt+1]=gt[1],Z.Z.add(N,gt[0],gt[1])}this.bStaticIndexed&&this.bIndexed||this.addIndex(K,C)}Z.Z.bind(this.bounding,N),this.buffer=new Float32Array(j);for(var xt=0,St=(lt=0,U.length);xt{"use strict";n.d(e,{Z:()=>p});var r,i=n(7329),o=n(6591),a=n(6669),s=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const p=function(t){function e(n){var r;void 0===n&&(n={});var i=this;return n.type=n.type||"ShapeBuffer",n.adaptMode=null!==(r=n.adaptMode)&&void 0!==r?r:a._.Scale,i=t.call(this,n)||this,void 0===n.shape?(console.warn("[Urpflanze:ShapeBuffer] ShapeBuffer require a buffer passed from `shape` property"),i.shape=e.EMPTY_BUFFER):i.shape=Float32Array.from(n.shape),i.bStatic=i.isStatic(),i.bStaticIndexed=i.isStaticIndexed(),i}return s(e,t),e.prototype.clearBuffer=function(e,n){void 0===e&&(e=!1),void 0===n&&(n=!0),t.prototype.clearBuffer.call(this,e,n),this.shapeBuffer=void 0},e.prototype.bindBuffer=function(t){for(var e=this.getRepetitionSideLength(t),n=this.adaptMode!==a._.None?o.Z.adaptBuffer(this.shape,this.adaptMode):Float32Array.from(this.shape),r=[void 0,void 0,void 0,void 0],s=0,p=n.length;s0?this.buffer.length:this.shape.length*this.getRepetitionCount()},e.prototype.generateBuffer=function(t,e){return void 0!==this.shapeBuffer&&"function"!=typeof this.props.sideLength||this.bindBuffer(e),this.shapeBuffer},e.prototype.setShape=function(t){this.shape=t,this.clearBuffer(!0)},e.prototype.subdivide=function(t){void 0===t&&(t=1);var n=this.shape;if(n&&n.length>0){for(var r=0;r{"use strict";n.d(e,{Z:()=>f});var r,i=n(6669),o=n(7329),a=n(4426),s=n(6591),p=n(5282),c=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=function(){return(u=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;a--)if(this.loopDependencies[a]in o){i=!0;break}"loop"in o&&(o.loop=u(u({},this.props.loop),o.loop),i=!0),t.prototype.setProp.call(this,o,n,i)},e.prototype.getBufferLength=function(t){if(this.bStatic&&void 0!==this.buffer)return this.buffer.length;if(this.bStaticLoop&&void 0!==this.currentOrSingleLoopBuffer)return this.currentOrSingleLoopBuffer.length*this.getRepetitionCount();var e=this.getLoop(t||p.Z.getEmptyPropArguments(this)).count;return this.getRepetitionCount()*e*2},e.prototype.generateBuffer=function(t,e){return this.bStaticLoop?("function"!=typeof this.props.sideLength&&void 0!==this.currentOrSingleLoopBuffer||(this.currentOrSingleLoopBuffer=this.generateLoopBuffer(e)),this.currentOrSingleLoopBuffer):this.generateLoopBuffer(e)},e.prototype.generateLoopBuffer=function(t){for(var e=this.getLoop(t),n=e.start,r=e.inc,a=(e.end,e.count),p=this.getRepetitionSideLength(t),c=this.props.loop&&this.props.loop.vertex?this.props.loop.vertex:this.loop.vertex,u={index:0,offset:0,angle:0,count:a},f=u.count,l=2*f,h=new Float32Array(l),d=this.adaptMode===i._.None,v=[void 0,void 0,void 0,void 0],y=0,m=0;y1?y/(u.count-1):1;u.angle=g,u.index=y+1,u.offset=_;var b=Float32Array.from(c(u,t));h[m]=b[0],h[m+1]=b[1],d&&(h[m]*=p[0],h[m+1]*=p[1],o.Z.add(v,h[m],h[m+1]))}if(!d){var w=s.Z.adaptBuffer(h,this.adaptMode);for(o.Z.clear(v),y=0;y{"use strict";n.d(e,{Z:()=>c});var r,i=n(5282),o=n(6669),a=n(2727),s=n(7329),p=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const c=function(t){function e(e){var n,r;void 0===e&&(e={});var i=t.call(this,e)||this;return i.currentGenerationPrimitiveBounding=s.Z.empty(),i.props.sideLength=void 0===e.sideLength?void 0:"function"==typeof e.sideLength?e.sideLength:a.pn(e.sideLength),i.style=e.style||{},i.adaptMode=null!==(n=e.adaptMode)&&void 0!==n?n:o._.None,i.bClosed=null===(r=e.bClosed)||void 0===r||r,i}return p(e,t),e.prototype.isStatic=function(){return"function"!=typeof this.props.sideLength&&t.prototype.isStatic.call(this)},e.prototype.getRepetitionSideLength=function(t){return this.bStatic?(void 0===this.props.sideLength?this.props.sideLength=[50,50]:"number"==typeof this.props.sideLength&&(this.props.sideLength=[this.props.sideLength,this.props.sideLength]),this.props.sideLength):a.pn(this.getProp("sideLength",t,[50,50]))},e.prototype.getShapeBounding=function(){return this.currentGenerationPrimitiveBounding},e.prototype.addIndex=function(t,e,n){var r={shape:this,frameLength:t,repetition:{type:e.type,angle:e.angle,index:e.index,count:e.count,offset:e.offset,row:{index:e.row.index,count:e.row.count,offset:e.row.offset},col:{index:e.col.index,count:e.col.count,offset:e.col.offset}}};void 0!==n&&(r.recursion={index:n.index,offset:n.offset,count:n.offset,level:n.level}),this.indexedBuffer.push(r)},e.prototype.isClosed=function(){return this.bClosed},e.prototype.setClosed=function(t){this.bClosed=t},e.prototype.getAdaptMode=function(){return this.adaptMode},e.prototype.adapt=function(t){this.adaptMode=t,this.clearBuffer(!0)},e.getBounding=function(t,e){void 0===e&&(e=s.Z.empty());for(var n=[void 0,void 0,void 0,void 0],r=0,i=t.length;r=2||r.height>=2||n>=o._.Fill&&(r.width<2||r.height<2)?2/Math.max(r.width,r.height):1,s=n>=o._.Center?r.cx:0,p=n>=o._.Center?r.cy:0,c=0,u=t.length;c{"use strict";n.d(e,{Z:()=>p});var r,i=n(7329),o=n(8227),a=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(){return(s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n1?0:1,count:1}};if(r<=1){var c=this.generateShapeBuffer(n,t,p);return this.currentGenerationRecursiveBounding=this.shape.getBounding(),void(this.shapeRecursiveBuffer=c)}for(var u=this.generateShapeBuffer(n,t,p),f=[p],l=0,h=1,d=[void 0,void 0,void 0,void 0],v=u.length,y=v/2,m=a<=0?y:Math.min(a,y),g=0===a?1:y/Math.min(a,y),_=new Float32Array(e.summmation(r,m)*v),b=0;b1?w/(r-1):1,S=e.summmation(w,m)*v,O=w-1,M=0===O?0:e.summmation(O,m)*v,P=0,Z=Math.pow(m,w);P1?P/(Z-1):1,count:Z,level:{index:w+1,offset:x,count:r},parent:f[l]},u=this.generateShapeBuffer(n,t,p),f.push(p);for(var C=S+P*v,I=Math.floor(M+2*P*g),A=_[I=I%2==0?I:I+1],T=_[I+1],B=(b=0,v);b1?0:1,count:i}},d=s(s({},p),{recursion:h});l.parent=l.parent?o.Z.setIndexedParent(l.parent,d):d,this.indexedBuffer.push(l)}if(i>1)for(var v=this.shape.getBufferLength(r)/2,y=a<=0?v:Math.min(a,v),m=this.indexedBuffer.map((function(t){return[t.parent.recursion]})),g=0,_=1,b=1;b1?b/(i-1):1,x=0,S=Math.pow(y,b);x1?x/(S-1):1;for(u=0,f=c.length;u{"use strict";n.d(e,{Z:()=>p});var r,i=n(4426),o=n(1315),a=n(6669),s=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const p=function(t){function e(e){void 0===e&&(e={});var n=this;return e.type="Circle",e.adaptMode=a._.None,(n=t.call(this,e,!0)||this).loop={start:0,end:i.yo,inc:function(t){var e=n.getRepetitionSideLength(t);return 1/Math.pow(e[0]*e[1],.25)*o.Z.PId2},vertex:function(t){return[Math.cos(t.angle),Math.sin(t.angle)]}},n.bStaticLoop=n.isStaticLoop(),n.bStatic=n.isStatic(),n.bStaticIndexed=n.isStaticIndexed(),n}return s(e,t),e}(o.Z)},1010:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r,i=n(6669),o=n(3969),a=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const s=function(t){function e(e){return void 0===e&&(e={}),e.type="Line",e.shape=[-1,0,1,0],e.adaptMode=i._.None,e.bClosed=!1,t.call(this,e)||this}return a(e,t),e}(o.Z)},6863:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});var r,i=n(4426),o=n(1315),a=n(6669),s=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const p=function(t){function e(e){void 0===e&&(e={});var n=this;return e.type="Lissajous",e.loopDependencies=(e.loopDependencies||[]).concat(["wx","wy","wz"]),e.adaptMode=a._.None,(n=t.call(this,e,!0)||this).props.wx=e.wx||1,n.props.wy=e.wy||2,n.props.wz=e.wz||0,n.loop={start:0,end:i.yo,inc:function(t){var e=n.getProp("wx",t),r=n.getProp("wy",t),i=e==r?o.Z.PId2:.5-.01*Math.min(49,e+r),a=n.getRepetitionSideLength(t);return 1/Math.pow(a[0]*a[1],.25)*i},vertex:function(t){return n.wx===n.wy?[Math.cos(t.angle+n.wz),Math.sin(t.angle)]:[Math.cos(n.wx*t.angle+n.wz),Math.sin(n.wy*t.angle)]}},n.bStaticLoop=n.isStaticLoop(),n.bStatic=n.isStatic(),n.bStaticIndexed=n.isStaticIndexed(),n}return s(e,t),e.prototype.generateLoopBuffer=function(e){return this.wx=this.getProp("wx",e,1),this.wy=this.getProp("wy",e,2),this.wz=this.getProp("wz",e,2),t.prototype.generateLoopBuffer.call(this,e)},e}(o.Z)},2868:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});var r,i=n(1315),o=n(6669),a=n(4426),s=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const p=function(t){function e(e){var n;void 0===e&&(e={});var r=this;return e.type=e.type||"Polygon",e.loopDependencies=(e.loopDependencies||[]).concat(["sideNumber"]),e.adaptMode=null!==(n=e.adaptMode)&&void 0!==n?n:o._.None,(r=t.call(this,e,!0)||this).props.sideNumber=e.sideNumber,r.loop={start:0,end:a.yo,inc:function(t){return a.yo/r.getProp("sideNumber",t,5)},vertex:function(t){return[Math.cos(t.angle),Math.sin(t.angle)]}},r.bStaticLoop=r.isStaticLoop(),r.bStatic=r.isStatic(),r.bStaticIndexed=r.isStaticIndexed(),r}return s(e,t),e}(i.Z)},178:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r,i=n(6669),o=n(3969),a=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const s=function(t){function e(e){return void 0===e&&(e={}),e.type="Rect",e.shape=[-1,-1,1,-1,1,1,-1,1],e.adaptMode=i._.None,t.call(this,e)||this}return a(e,t),e}(o.Z)},5589:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});var r,i=n(1315),o=n(6669),a=n(4426),s=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const p=function(t){function e(n){var r,i,s;void 0===n&&(n={});var p=this;return n.type="Rose",n.loopDependencies=(n.loopDependencies||[]).concat(["n","d"]),n.adaptMode=null!==(r=n.adaptMode)&&void 0!==r?r:o._.Scale,(p=t.call(this,n,!0)||this).props.n=null!==(i=n.n)&&void 0!==i?i:1,p.props.d=null!==(s=n.d)&&void 0!==s?s:2,p.loop={start:0,end:function(t){return e.getFinalAngleFromK(p.getProp("n",t),p.getProp("d",t))},inc:function(t){var e=p.getProp("n",t),n=p.getProp("d",t),r=p.getRepetitionSideLength(t),i=Math.pow(r[0]*r[1],.45),o=n{"use strict";n.d(e,{Z:()=>p});var r,i=n(1315),o=n(6669),a=n(4426),s=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const p=function(t){function e(n){var r,i,s,p;void 0===n&&(n={});var c=this;return n.type="Spiral",n.bClosed=!1,n.adaptMode=null!==(r=n.adaptMode)&&void 0!==r?r:o._.None,n.loopDependencies=(n.loopDependencies||[]).concat(["twists","twistsStart","spiral"]),(c=t.call(this,n,!0)||this).props.spiral=null!==(i=n.spiral)&&void 0!==i?i:e.types.ARCHIMEDE,c.props.twists=null!==(s=n.twists)&&void 0!==s?s:2,c.props.twistsStart=null!==(p=n.twistsStart)&&void 0!==p?p:0,c.loop={start:function(t){return a.yo*c.getProp("twistsStart",t)},end:function(t){return a.yo*(c.getProp("twistsStart",t)+c.getProp("twists",t))},inc:function(t){var e=c.getProp("twists",t),n=a.yo*e,r=c.getRepetitionSideLength(t);return n/((4+Math.sqrt(r[0]*r[1]))*e)},vertex:function(t){var e=c.r(t.angle);return[e*Math.cos(t.angle),e*Math.sin(t.angle)]}},c.bStaticLoop=c.isStaticLoop(),c.bStatic=c.isStatic(),c.bStaticIndexed=c.isStaticIndexed(),c}return s(e,t),e.prototype.generateLoopBuffer=function(n){return this.spiral=this.getProp("spiral",n),this.r=e.getRFromTSpiralType(this.spiral),t.prototype.generateLoopBuffer.call(this,n)},e.getRFromTSpiralType=function(t){switch(t){case e.types.ARCHIMEDE:return function(t){return t/10};case e.types.HYPERBOLIC:return function(t){return 1/t*3};case e.types.FERMAT:return function(t){return Math.pow(t,.5)/3};case e.types.LITUUS:return function(t){return Math.pow(t,-.5)};case e.types.LOGARITHMIC:return function(t){return Math.pow(Math.E,.2*t)/10}}return function(t){return t}},e.types={ARCHIMEDE:"ARCHIMEDE",HYPERBOLIC:"HYPERBOLIC",FERMAT:"FERMAT",LITUUS:"LITUUS",LOGARITHMIC:"LOGARITHMIC"},e}(i.Z)},6817:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});var r,i=n(1315),o=n(6669),a=n(4426),s=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const p=function(t){function e(e){var n,r,i,s,p,c,u;void 0===e&&(e={});var f=this;return e.type="SuperShape",e.loopDependencies=(e.loopDependencies||[]).concat(["a","b","m","n1","n2","n3"]),e.adaptMode=null!==(n=e.adaptMode)&&void 0!==n?n:o._.Scale,(f=t.call(this,e,!0)||this).props.a=null!==(r=e.a)&&void 0!==r?r:1,f.props.b=null!==(i=e.b)&&void 0!==i?i:1,f.props.m=null!==(s=e.m)&&void 0!==s?s:6,f.props.n1=null!==(p=e.n1)&&void 0!==p?p:1,f.props.n2=null!==(c=e.n2)&&void 0!==c?c:1,f.props.n3=null!==(u=e.n3)&&void 0!==u?u:1,f.loop={start:0,end:a.yo,inc:function(t){var e=f.getRepetitionSideLength(t);return Math.PI/Math.pow(e[0]*e[1],.5)},vertex:function(t){var e=t.angle,n=f.m*e/4,r=Math.pow(Math.abs(Math.cos(n)/f.a),f.n2),i=Math.pow(Math.abs(Math.sin(n)/f.b),f.n3),o=Math.pow(r+i,1/f.n1),a=0===o?1:1/o;return[a*Math.cos(e),a*Math.sin(e)]}},f.bStaticLoop=f.isStaticLoop(),f.bStatic=f.isStatic(),f.bStaticIndexed=f.isStaticIndexed(),f}return s(e,t),e.prototype.generateLoopBuffer=function(e){return this.a=this.getProp("a",e),this.b=this.getProp("b",e),this.m=this.getProp("m",e),this.n1=this.getProp("n1",e),this.n2=this.getProp("n2",e),this.n3=this.getProp("n3",e),t.prototype.generateLoopBuffer.call(this,e)},e}(i.Z)},4068:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r,i=n(6669),o=n(3969),a=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const s=function(t){function e(e){return void 0===e&&(e={}),e.type="Triangle",e.shape=[-1,-1,1,0,-1,1],e.adaptMode=i._.None,t.call(this,e)||this}return a(e,t),e}(o.Z)},9835:(t,e,n)=>{"use strict";var r;n.d(e,{i:()=>r}),function(t){t[t.Ring=1]="Ring",t[t.Matrix=2]="Matrix"}(r||(r={}))},6669:(t,e,n)=>{"use strict";var r;n.d(e,{_:()=>r}),function(t){t[t.None=0]="None",t[t.Scale=2]="Scale",t[t.Center=4]="Center",t[t.Fill=8]="Fill"}(r||(r={}))},522:(t,e,n)=>{"use strict";n.r(e),n.d(e,{version:()=>r.i8,author:()=>r.v,license:()=>r.Vl,Scene:()=>o.Z,SceneChild:()=>a.Z,Group:()=>s.Z,ShapePrimitive:()=>p.Z,ShapeLoop:()=>c.Z,ShapeBuffer:()=>u.Z,Shape:()=>f.Z,ShapeRecursive:()=>l.Z,Line:()=>h.Z,Triangle:()=>d.Z,Rect:()=>v.Z,Polygon:()=>y.Z,Circle:()=>m.Z,Rose:()=>g.Z,Spiral:()=>_.Z,Lissajous:()=>b.Z,SuperShape:()=>w.Z,lerp:()=>x.t7,clamp:()=>x.uZ,relativeClamp:()=>x.Sr,toDegrees:()=>x.Ux,toRadians:()=>x.Yr,now:()=>x.zO,noise:()=>x.tF,angleFromRepetition:()=>x.aT,angle2FromRepetition:()=>x.B7,distanceFromRepetition:()=>x.db,Vec2:()=>S.Z,PHI:()=>O.Q_,PI2:()=>O.yo,log:()=>O.cM,DrawerCanvas:()=>M.Z,Animation:()=>P.Z,Easings:()=>Z.Z});var r=n(7629),i=n(9685),o=n(817),a=n(9213),s=n(5631),p=n(6591),c=n(1315),u=n(3969),f=n(8227),l=n(1029),h=n(1010),d=n(4068),v=n(178),y=n(2868),m=n(9668),g=n(5589),_=n(1590),b=n(6863),w=n(6817),x=n(9277),S=n(212),O=n(4426),M=n(4789),P=n(9465),Z=n(3996);i.ZR(Array)},7629:(t,e,n)=>{"use strict";n.d(e,{i8:()=>r,v:()=>i,Vl:()=>o});var r="%VERSION%",i="Gennaro Bosone ",o="%LICENSE%"},3996:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r={linear:function(t,e,n,r){return n*t/r+e},quadraticIn:function(t,e,n,r){return n*(t/=r)*t+e},quadraticOut:function(t,e,n,r){return-n*(t/=r)*(t-2)+e},quadraticInOut:function(t,e,n,r){return(t/=r/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e},cubicIn:function(t,e,n,r){return n*(t/=r)*t*t+e},cubicOut:function(t,e,n,r){return t/=r,n*(--t*t*t+1)+e},cubicInOut:function(t,e,n,r){return(t/=r/2)<1?n/2*t*t*t+e:n/2*((t-=2)*t*t+2)+e},quarticIn:function(t,e,n,r){return n*(t/=r)*t*t*t+e},quarticOut:function(t,e,n,r){return t/=r,-n*(--t*t*t*t-1)+e},quarticInOut:function(t,e,n,r){return(t/=r/2)<1?n/2*t*t*t*t+e:-n/2*((t-=2)*t*t*t-2)+e},quinticIn:function(t,e,n,r){return n*(t/=r)*t*t*t*t+e},quinticOut:function(t,e,n,r){return t/=r,n*(--t*t*t*t*t+1)+e},quinticInOut:function(t,e,n,r){return(t/=r/2)<1?n/2*t*t*t*t*t+e:n/2*((t-=2)*t*t*t*t+2)+e},sinusoidalIn:function(t,e,n,r){return-n*Math.cos(t/r*(Math.PI/2))+n+e},sinusoidalOut:function(t,e,n,r){return n*Math.sin(t/r*(Math.PI/2))+e},sinusoidalInOut:function(t,e,n,r){return-n/2*(Math.cos(Math.PI*t/r)-1)+e},exponentialIn:function(t,e,n,r){return n*Math.pow(2,10*(t/r-1))+e},exponentialOut:function(t,e,n,r){return n*(1-Math.pow(2,-10*t/r))+e},exponentialInOut:function(t,e,n,r){return(t/=r/2)<1?n/2*Math.pow(2,10*(t-1))+e:(t--,n/2*(2-Math.pow(2,-10*t))+e)},circularIn:function(t,e,n,r){return t/=r,-n*(Math.sqrt(1-t*t)-1)+e},circularOut:function(t,e,n,r){return t/=r,t--,n*Math.sqrt(1-t*t)+e},circularInOut:function(t,e,n,r){return(t/=r/2)<1?-n/2*(Math.sqrt(1-t*t)-1)+e:(t-=2,n/2*(Math.sqrt(1-t*t)+1)+e)},elasticIn:function(t,e,n,r,i,o){if(0==t)return e;if(1==(t/=r))return e+n;o||(o=.3*r);var a=0;return!i||i{"use strict";n.d(e,{Z:()=>f});var r=n(1723),i=n(9277),o=n(3996),a=function(){return(a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0?function(t){var n,i,a;return e(t,((null===(n=t.shape.scene)||void 0===n?void 0:n.currentTime)||0)<=p?0:((null===(i=t.shape.scene)||void 0===i?void 0:i.currentTime)||0)-p>=r?1:o.Z[s](((null===(a=t.shape.scene)||void 0===a?void 0:a.currentTime)||0)-p,0,1,r))}:function(t){var n,i;return e(t,((null===(n=t.shape.scene)||void 0===n?void 0:n.currentTime)||0)<=r?o.Z[s]((null===(i=t.shape.scene)||void 0===i?void 0:i.currentTime)||0,0,1,r):1)}:"loop"===i?"sinusoidal"==a?function(t){var n,i=2*((null===(n=t.shape.scene)||void 0===n?void 0:n.currentTime)||0)*Math.PI/r;return e(t,.5+.5*Math[s](i))}:function(t){var n,i=r/2,a=((null===(n=t.shape.scene)||void 0===n?void 0:n.currentTime)||0)%r;return e(t,a<=i?o.Z[s](a,0,1,i):o.Z[s](i-(a-i),0,1,i))}:"sinusoidal"==a?function(t){var n,i=((null===(n=t.shape.scene)||void 0===n?void 0:n.currentTime)||0)%(r+p),o=2*((i=i<=p?0:i-p)||0)*Math.PI/r;return e(t,.5+.5*Math[s](o))}:p&&p>0?function(t){var n,i=((null===(n=t.shape.scene)||void 0===n?void 0:n.currentTime)||0)%(r+p);return e(t,i<=p?0:i-p>=r?1:o.Z[s](i-p,0,1,r))}:function(t){var n,i=((null===(n=t.shape.scene)||void 0===n?void 0:n.currentTime)||0)%r;return e(t,i<=r?o.Z[s](i,0,1,r):1)}}function c(t,e,n){var r=t.r+n*(e.r-t.r),i=t.g+n*(e.g-t.g),o=t.b+n*(e.b-t.b),a=t.alpha+n*(e.alpha-t.alpha);return"rgba("+Math.floor(r)+","+Math.floor(i)+","+Math.floor(o)+","+a+")"}function u(t,e,n){return"hsla("+(t.h+n*(e.h-t.h))+","+(t.s+n*(e.s-t.s))+"%,"+(t.l+n*(e.l-t.l))+"%,"+(t.alpha+n*(e.alpha-t.alpha))+")"}const f=s},3448:(t,e,n)=>{"use strict";n.d(e,{Z:()=>v});var r,i=n(817),o=n(4426),a=n(7131),s=n(9277),p=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(){return(c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=this.tick_time)return this.calculateFPS(1/(n/1e3)),this.last_tick=e,this.current_time=(e-n%this.tick_time)%this.sequence.duration,this.current_frame=this.getFrameAtTime(this.current_time),this.dispatch("timeline:progress",{current_frame:this.current_frame,current_time:this.current_time,fps:this.fps}),!0}return!1},e.prototype.calculateFPS=function(t){var e=this.fps_samples.length;if(e>0){for(var n=0,r=0;r=1?a:a*o.ratio,p=o.ratio>=1?a/o.ratio:a;e.resize(s,p),o.setScene(e)}return o.draw_id=null,o.redraw_id=null,o.animation_id=null,o.draw=o.draw.bind(o),o.animate=o.animate.bind(o),o.startAnimation=o.startAnimation.bind(o),o}return h(e,t),e.prototype.setScene=function(t){this.scene=t},e.prototype.getScene=function(){return this.scene},e.prototype.getTimeline=function(){return this.timeline},e.prototype.resize=function(t,e,n){var r=this;n=n||this.ratio||t/e;var o=Math.max(t,e);t=n>=1?o:o*n,e=n>=1?o/n:o,this.ratio=n,this.scene&&(this.scene.resize(t,e),i.Z.walk((function(t){if(t.data){if(t.data.props){var e=t.data.props;Object.keys(e).forEach((function(n){f.Z.setProp(t,n,e[n],r.scene)}))}if(t.data.style){var n=t.data.style;Object.keys(n).forEach((function(e){f.Z.setDrawerProp(t,e,n[e],r.scene)}))}}}),this.scene))},e.prototype.setRatio=function(t){this.scene&&this.resize(this.scene.width,this.scene.height,t)},e.prototype.getRatio=function(){return this.ratio},e.prototype.setOption=function(t,e){if("object"==typeof t)for(var n=Object.keys(t),r=0,i=n.length;r{"use strict";n.d(e,{Z:()=>u});var r=n(3448);const i=function(){function t(){this.frames={}}return t.prototype.exist=function(t){return void 0!==this.frames[t]},t.prototype.get=function(t){return this.exist(t)?this.frames[t]:null},t.prototype.count=function(){return Object.keys(this.frames).length},t.prototype.push=function(t,e){this.frames[t]=e.getImageData(0,0,e.canvas.width,e.canvas.height)},t.prototype.flush=function(){this.frames={}},t.prototype.getStoredFrames=function(){return Object.keys(this.frames).map((function(t){return+t}))},t}();var o,a=n(9277),s=n(212),p=(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(){return(c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=this.timeline.getFramesCount()&&this.dispatch("drawer-canvas:buffer_loaded"))),n},e.prototype.redraw=function(){this.timeline.bSequenceStarted()?this.drawerOptions.clear||void 0!==typeof this.drawerOptions.ghosts&&0!==this.drawerOptions.ghosts||(this.stopAnimation(),this.redraw_id&&cancelAnimationFrame(this.redraw_id),this.redraw_id=requestAnimationFrame(this.startAnimation)):(this.draw_id&&cancelAnimationFrame(this.draw_id),!this.drawerOptions.clear&&(void 0===typeof this.drawerOptions.ghosts||0===this.drawerOptions.ghosts)&&this.timeline.stop(),this.draw_id=requestAnimationFrame(this.draw))},e.prototype.applyDraw=function(t){var n,i,o=(0,a.zO)(),s=this.scene,p=this.context;p.globalCompositeOperation="source-over";var c=null!==(n=t.time)&&void 0!==n?n:0,u=null!==(i=t.simmetricLines)&&void 0!==i?i:0,f=t.clear,l=t.noBackground,h=t.backgroundImage,d=void 0!==t.ghosts&&t.ghosts>0&&void 0!==t.ghostIndex&&t.ghostIndex>0,v=d?1-t.ghostIndex/(t.ghosts+.5):0,y=!0===t.ghostAlpha,m=s.width,g=s.height,_=m/g;if(f){if(l)p.clearRect(0,0,m,g);else if(p.fillStyle=s.background,p.fillRect(0,0,m,g),h){var b=h instanceof SVGImageElement?h.width.baseVal.value:h.width,w=h instanceof SVGImageElement?h.height.baseVal.value:h.height,x=b/w,S=0,O=0,M=m,P=g;x!==_&&("contain"===t.backgroundImageFit?(M=_>x?b*g/w:m,P=_>x?g:w*m/b):(M=_0&&e.drawSimmetricLines(p,u,m,g,s.color)}var Z=!1,C=!1;return s.currentTime=c,s.getChildren().forEach((function(t){t.data&&(!1===t.data.visible||d&&!0===t.data.disableGhost)||(t.generate(c,!0),p.save(),t.stream((function(t){var e=t.currentIndexing,n=e.shape,i={canvasContext:p,shape:n,repetition:{type:e.repetition.type,angle:e.repetition.angle,index:e.repetition.index,count:e.repetition.count,offset:e.repetition.offset,row:{index:e.repetition.row.index,count:e.repetition.row.count,offset:e.repetition.row.offset},col:{index:e.repetition.col.index,count:e.repetition.col.count,offset:e.repetition.col.offset}},parent:e.parent},o=r.Z.getStreamDrawerProp(n,"composite",i,"source-over");p.globalCompositeOperation=o,p.beginPath(),p.moveTo(t.buffer[t.frameBufferIndex],t.buffer[t.frameBufferIndex+1]);for(var a=2;a{"use strict";n.d(e,{Z:()=>r});const r=function(){function t(){this.callbacks={}}return t.prototype.attach=function(t,e){t in this.callbacks||(this.callbacks[t]=[]),this.callbacks[t].push(e)},t.prototype.detach=function(t,e){if(t in this.callbacks){var n=this.callbacks[t].indexOf(e);n>=0&&this.callbacks[t].splice(n,1)}},t.prototype.dispatch=function(t,e){if(t in this.callbacks)for(var n=0,r=this.callbacks[t].length;n{"use strict";n.d(e,{Z:()=>o});var r=n(1590),i=n(6669);const o={repetitions:{animable:!0,name:"repetitions",label:"Repetitions",type:"range",min:1,max:200,step:1,default:1,default_animate:20,canBArray:!0,transformation:"none",dataType:"props",type_value:"int"},distance:{animable:!0,name:"distance",label:"Distance",type:"range",min:-100,max:100,step:.1,default:0,canBArray:!0,default_animate:25,transformation:"scene-size-percentage",dataType:"props"},displace:{animable:!0,name:"displace",label:"Displace",type:"range",min:-360,max:360,step:1,default:0,default_animate:360,transformation:"angle",dataType:"props"},squeezeX:{animable:!0,name:"squeezeX",label:"SqueezeX",type:"range",min:-.2,max:.2,step:.01,default:0,default_animate:.1,transformation:"scene-size-percentage-inverse",dataType:"props"},squeezeY:{animable:!0,name:"squeezeY",label:"SqueezeY",type:"range",min:-.2,max:.2,step:.01,default:0,default_animate:.1,transformation:"scene-size-percentage-inverse",dataType:"props"},rotateX:{animable:!0,name:"rotateX",label:"RotateX",type:"range",min:-360,max:360,step:1,default:0,default_animate:360,transformation:"angle",dataType:"props"},rotateY:{animable:!0,name:"rotateY",label:"RotateY",type:"range",min:-360,max:360,step:1,default:0,default_animate:360,transformation:"angle",dataType:"props"},rotateZ:{animable:!0,name:"rotateZ",label:"RotateZ",type:"range",min:-360,max:360,step:1,default:0,default_animate:360,transformation:"angle",dataType:"props"},skewX:{animable:!0,name:"skewX",label:"SkewX",type:"range",min:-90,max:90,step:1,default:0,default_animate:1,transformation:"angle",dataType:"props"},skewY:{animable:!0,name:"skewY",label:"SkewY",type:"range",min:-90,max:90,step:1,default:0,default_animate:1,transformation:"angle",dataType:"props"},translate:{animable:!0,name:"translate",label:"Translate",type:"multiple-range",min:-100,max:100,step:.1,default:0,default_animate:0,initialArray:!0,transformation:"scene-size-percentage",dataType:"props"},scale:{animable:!0,name:"scale",label:"Scale",type:"multiple-range",min:-5,max:5,step:.01,default:1,default_animate:3,transformation:"none",dataType:"props"},transformOrigin:{animable:!0,name:"transformOrigin",label:"Transform Origin",type:"multiple-range",min:-1,max:1,step:.01,default:[0,0],default_animate:[-1,1],initialArray:!0,transformation:"none",dataType:"props"},perspective:{animable:!0,name:"perspective",label:"Perspective",type:"range",min:0,max:1,step:.01,default:0,default_animate:.8,transformation:"none",dataType:"props"},perspectiveOrigin:{animable:!0,name:"perspectiveOrigin",label:"Perspective Origin",type:"multiple-range",min:-1,max:1,step:.01,default:[0,0],default_animate:[-1,1],initialArray:!0,transformation:"none",dataType:"props"},fill:{animable:!0,name:"fill",label:"Fill",type:"color",default:"#000",default_animate:"#fff",transformation:"none",dataType:"drawer"},stroke:{animable:!0,name:"stroke",label:"Stroke",type:"color",default:"#fff",default_animate:"#000",transformation:"none",dataType:"drawer"},lineWidth:{animable:!0,name:"lineWidth",label:"Stroke weight",type:"slider",min:0,max:30,step:.01,default:.1,default_animate:3,transformation:"scene-size-percentage",dataType:"drawer"},bClosed:{name:"bClosed",label:"Closed",type:"checkbox",default:void 0,transformation:"none",dataType:"settings"},bUseParent:{name:"bUseParent",label:"Use parent repetition",type:"checkbox",default:!1,transformation:"none",dataType:"settings"},bUseRecursion:{name:"bUseRecursion",label:"Use recursion repetition",type:"checkbox",default:!1,transformation:"none",dataType:"settings"},vertexCallback:{name:"vertexCallback",label:"vertexCallback",type:"function",default:void 0,transformation:"none",dataType:"settings"},adaptMode:{name:"adaptMode",label:"Adapt",type:"radio",options:[{key:"None",value:i._.None},{key:"Scale",value:i._.Scale},{key:"Center",value:i._.Center},{key:"Fill",value:i._.Fill}],default:void 0,transformation:"none",dataType:"settings"},recursions:{animable:!0,name:"recursion",label:"Recursion",type:"range",min:1,max:8,step:1,default:1,default_animate:2,transformation:"none",dataType:"props",type_value:"int"},recursionScale:{animable:!0,name:"recursionScale",label:"Recursion Scale",type:"range",min:.1,max:5,step:.01,default:1,default_animate:2,transformation:"none",dataType:"props"},recursionVertex:{animable:!0,name:"recursionVertex",label:"Recursion Vertex",type:"range",min:1,max:100,step:1,default:10,default_animate:20,transformation:"none",dataType:"props",type_value:"int"},sideLength:{animable:!0,name:"sideLength",label:"Side Length",type:"multiple-range",min:.01,max:100,step:.1,default:10,default_animate:20,transformation:"scene-size-percentage",dataType:"props"},sideNumber:{animable:!0,name:"sideNumber",label:"Side Number",type:"range",min:1,max:20,step:1,default:5,default_animate:2,transformation:"none",dataType:"props"},n:{animable:!0,name:"n",label:"n",type:"range",min:1,max:10,step:1,default:1,default_animate:3,transformation:"none",dataType:"props"},d:{animable:!0,name:"d",label:"d",type:"range",min:1,max:10,step:1,default:2,default_animate:4,transformation:"none",dataType:"props"},wx:{animable:!0,name:"wx",label:"wx",type:"range",min:1,max:10,step:1,default:1,default_animate:3,transformation:"none",dataType:"props"},wy:{animable:!0,name:"wy",label:"wy",type:"range",min:1,max:10,step:1,default:2,default_animate:4,transformation:"none",dataType:"props"},wz:{animable:!0,name:"wz",label:"wz",type:"range",min:-360,max:360,step:1,default:0,default_animate:360,transformation:"angle",dataType:"props"},twists:{animable:!0,name:"twists",label:"Twists",type:"range",min:1,max:60,step:.1,default:1,default_animate:3,transformation:"none",dataType:"props"},twistsStart:{animable:!0,name:"twists_start",label:"Twists start",type:"range",min:0,max:60,step:.1,default:0,default_animate:1,transformation:"none",dataType:"props"},spiral:{name:"spiral",label:"Spiral type",type:"select",options:[{key:"ARCHIMEDE",value:r.Z.types.ARCHIMEDE},{key:"FERMAT",value:r.Z.types.FERMAT},{key:"HYPERBOLIC",value:r.Z.types.HYPERBOLIC},{key:"LITUUS",value:r.Z.types.LITUUS},{key:"LOGARITHMIC",value:r.Z.types.LOGARITHMIC}],default:r.Z.types.ARCHIMEDE,transformation:"none",dataType:"props"},a:{animable:!0,name:"a",label:"A",type:"range",min:-5,max:5,step:.1,default:1,default_animate:.1,transformation:"none",dataType:"props"},b:{animable:!0,name:"b",label:"B",type:"range",min:-5,max:5,step:.1,default:1,default_animate:.1,transformation:"none",dataType:"props"},m:{animable:!0,name:"m",label:"m",type:"range",min:1,max:20,step:1,default:1,default_animate:6,transformation:"none",dataType:"props",type_value:"int"},n1:{animable:!0,name:"n1",label:"n1",type:"range",min:-3,max:3,step:.01,default:1,default_animate:.1,transformation:"none",dataType:"props"},n2:{animable:!0,name:"n2",label:"n2",type:"range",min:-3,max:3,step:.01,default:1,default_animate:.1,transformation:"none",dataType:"props"},n3:{animable:!0,name:"n3",label:"n3",type:"range",min:-3,max:3,step:.01,default:1,default_animate:.1,transformation:"none",dataType:"props"},"loop.start":{name:"loop.start",label:"start",type:"range",default:void 0,min:0,max:100,step:.01,transformation:"none",dataType:"props"},"loop.end":{name:"loop.end",label:"end",type:"range",default:void 0,min:0,max:100,step:.01,transformation:"none",dataType:"props"},"loop.inc":{name:"loop.inc",label:"inc",type:"range",default:void 0,min:.01,max:100,step:.01,transformation:"none",dataType:"props"}}},464:(t,e,n)=>{"use strict";n.d(e,{Z:()=>I});var r=n(3639),i=n(9213),o=n(1010),a=n(4068),s=n(178),p=n(2868),c=n(9668),u=n(5589),f=n(1590),l=n(6863),h=n(6817),d=n(8227),v=n(1029),y=n(6591),m=n(1315),g=n(3969),_=n(817),b=n(5631),w=n(5282),x=n(9465),S=n(9277),O=n(1118);const M=function(){function t(){}return t.bValueLoop=function(t){return"object"==typeof t&&"start"in t&&"end"in t&&"inc"in t&&"vertex"in t&&t.vertex.raw&&t.vertex.raw.length>0},t.bValueVertexCallback=function(t){return t&&t.raw&&t.raw.length>0},t.composeVertexCallback=function(e){if(e&&e.raw)return new Function("vertex","vertexRepetition",t.RAW_ARGUMENTS,"return "+e.raw)},t.composeLoop=function(e){var n=e.vertex.raw?new Function("shapeLoopRepetition",t.RAW_ARGUMENTS,"return "+e.vertex.raw):void 0;return{start:e.start,end:e.end,inc:e.inc,vertex:n}},t.bValueAnimation=function(t){return t&&"object"==typeof t&&t.type&&("simple"===t.type||"raw"===t.type)},t.bValueTransformable=function(t){return null!==t&&"object"==typeof t&&"string"==typeof t.type&&"transformable-prop"===t.type},t.bPropInSceneChildUtilitiesData=function(t){return void 0!==O.Z[t]&&"none"!==O.Z[t].transformation},t.getTransformedValue=function(e,n,r){var i=O.Z[n];if(t.bPropInSceneChildUtilitiesData(n)&&t.bValueTransformable(r)){r=r.value;var o="distance"===n?e.height:e.width,a="distance"===n?e.width:e.height;switch(i.transformation){case"angle":return Array.isArray(r)?[(0,S.Yr)(r[0]),(0,S.Yr)(r[1])]:(0,S.Yr)(r);case"scene-size-percentage":if(void 0!==e)return Array.isArray(r)?[r[0]*o/100,r[1]*a/100]:r*(e.center[0]+e.center[1])/100;break;case"scene-size-percentage-inverse":if(void 0!==e)return Array.isArray(r)?[100*r[0]/o,100*r[1]/a]:100*r/(e.center[0]+e.center[1])}}return r},t.getTransformedValueInverse=function(e,n,r){var i=O.Z[n];if(t.bPropInSceneChildUtilitiesData(n)&&t.bValueTransformable(r)){r=r.value;var o="distance"===n?e.height:e.width,a="distance"===n?e.width:e.height;switch(i.transformation){case"angle":return Array.isArray(r)?[(0,S.Ux)(r[0]),(0,S.Ux)(r[1])]:(0,S.Ux)(r);case"scene-size-percentage":if(void 0!==e)return Array.isArray(r)?[100*r[0]/o,100*r[1]/a]:100*r/(e.center[0]+e.center[1]);break;case"scene-size-percentage-inverse":if(void 0!==e)return Array.isArray(r)?[r[0]*o/100,r[1]*a/100]:r*(e.center[0]+e.center[1])/100}}return r},t.RAW_ARGUMENTS="{ repetition, recursion, shape }",t.RAW_ARGUMENTS_WITH_PARENT="{ repetition, recursion, shape, parent }",t}();var P=n(522),Z=function(){return(Z=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0?e[0]:null},t.prototype.getParent=function(t){var e=this.getParents(t);return e.length>0?e[e.length-1]:null},t.prototype.getParents=function(t){return t&&t.scene?t.scene.getParentsOfSceneChild(t):[]},t.prototype.getChildren=function(t){return t instanceof b.Z?t.getChildren():t instanceof d.Z&&t.shape?[t.shape]:[]},t.prototype.getChildrenPrimitives=function(t){for(var e=[],n=this.getChildren(t),r=0,i=n.length;r=0){var a=function(){for(var t=0,e=0,n=arguments.length;e=0)&&a.push("propArguments"):a.indexOf("propArguments")>=0&&a.splice(a.indexOf("propArguments",1)),t.loopDependencies=a}}},t.prototype.setDrawerProp=function(t,e,n,r){if(this.isAPrimitive(t)){if(void 0===t.data?t.data={style:{}}:void 0===t.data.style&&(t.data.style={}),M.bValueAnimation(n))return t.data.style[e]=n,void(t.style[e]=C(r,e,n));if(M.bPropInSceneChildUtilitiesData(e)&&M.bValueTransformable(n))return t.data.style[e]=n,void(t.style[e]=M.getTransformedValue(r,e,n));t.style[e]=n,delete t.data.style[e]}},t.prototype.setSetting=function(t,e,n,r){if(t.clearBuffer(!0,!0),"vertexCallback"!==e)switch(e){case"bUseParent":t instanceof w.Z&&(t.bUseParent=n);break;case"bUseRecursion":t instanceof w.Z&&(t.bUseRecursion=n);break;case"bClosed":t instanceof y.Z&&t.setClosed(n);break;case"adaptMode":t instanceof y.Z&&t.adapt(n);break;default:void 0!==t[e]&&(t[e]=n)}else t instanceof w.Z&&M.bValueVertexCallback(n)&&(t.data.vertexCallback=n,t.vertexCallback=M.composeVertexCallback(n))},t}())},9685:(t,e,n)=>{"use strict";n.d(e,{WT:()=>r,ZR:()=>i});var r="undefined"!=typeof Float32Array?Float32Array:Array;function i(t){r=t}Math.random,Math.PI,Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)})},1437:(t,e,n)=>{"use strict";n.d(e,{al:()=>o,TE:()=>a});var r,i=n(9685);function o(t,e){var n=new i.WT(2);return n[0]=t,n[1]=e,n}function a(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.hypot(n,r)}r=new i.WT(2),i.WT!=Float32Array&&(r[0]=0,r[1]=0)},21:(t,e,n)=>{var r;!function(){"use strict";var i=.5*(Math.sqrt(3)-1),o=(3-Math.sqrt(3))/6,a=1/6,s=(Math.sqrt(5)-1)/4,p=(5-Math.sqrt(5))/20;function c(t){var e;e="function"==typeof t?t:t?function(){var t=0,e=0,n=0,r=1,i=f();t=i(" "),e=i(" "),n=i(" ");for(var o=0;o>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)}}c.prototype={grad3:new Float32Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0,1,0,1,-1,0,1,1,0,-1,-1,0,-1,0,1,1,0,-1,1,0,1,-1,0,-1,-1]),grad4:new Float32Array([0,1,1,1,0,1,1,-1,0,1,-1,1,0,1,-1,-1,0,-1,1,1,0,-1,1,-1,0,-1,-1,1,0,-1,-1,-1,1,0,1,1,1,0,1,-1,1,0,-1,1,1,0,-1,-1,-1,0,1,1,-1,0,1,-1,-1,0,-1,1,-1,0,-1,-1,1,1,0,1,1,1,0,-1,1,-1,0,1,1,-1,0,-1,-1,1,0,1,-1,1,0,-1,-1,-1,0,1,-1,-1,0,-1,1,1,1,0,1,1,-1,0,1,-1,1,0,1,-1,-1,0,-1,1,1,0,-1,1,-1,0,-1,-1,1,0,-1,-1,-1,0]),noise2D:function(t,e){var n,r,a=this.permMod12,s=this.perm,p=this.grad3,c=0,u=0,f=0,l=(t+e)*i,h=Math.floor(t+l),d=Math.floor(e+l),v=(h+d)*o,y=t-(h-v),m=e-(d-v);y>m?(n=1,r=0):(n=0,r=1);var g=y-n+o,_=m-r+o,b=y-1+2*o,w=m-1+2*o,x=255&h,S=255&d,O=.5-y*y-m*m;if(O>=0){var M=3*a[x+s[S]];c=(O*=O)*O*(p[M]*y+p[M+1]*m)}var P=.5-g*g-_*_;if(P>=0){var Z=3*a[x+n+s[S+r]];u=(P*=P)*P*(p[Z]*g+p[Z+1]*_)}var C=.5-b*b-w*w;if(C>=0){var I=3*a[x+1+s[S+1]];f=(C*=C)*C*(p[I]*b+p[I+1]*w)}return 70*(c+u+f)},noise3D:function(t,e,n){var r,i,o,s,p,c,u,f,l,h,d=this.permMod12,v=this.perm,y=this.grad3,m=.3333333333333333*(t+e+n),g=Math.floor(t+m),_=Math.floor(e+m),b=Math.floor(n+m),w=(g+_+b)*a,x=t-(g-w),S=e-(_-w),O=n-(b-w);x>=S?S>=O?(p=1,c=0,u=0,f=1,l=1,h=0):x>=O?(p=1,c=0,u=0,f=1,l=0,h=1):(p=0,c=0,u=1,f=1,l=0,h=1):SB?R++:E++,T>k?R++:F++,T>L?R++:D++,B>k?E++:F++,B>L?E++:D++,k>L?F++:D++;var q=T-(f=R>=3?1:0)+p,j=B-(l=E>=3?1:0)+p,U=k-(h=F>=3?1:0)+p,z=L-(d=D>=3?1:0)+p,V=T-(v=R>=2?1:0)+2*p,Y=B-(y=E>=2?1:0)+2*p,N=k-(m=F>=2?1:0)+2*p,W=L-(g=D>=2?1:0)+2*p,G=T-(_=R>=1?1:0)+3*p,H=B-(b=E>=1?1:0)+3*p,X=k-(w=F>=1?1:0)+3*p,K=L-(x=D>=1?1:0)+3*p,$=T-1+4*p,J=B-1+4*p,Q=k-1+4*p,tt=L-1+4*p,et=255&P,nt=255&Z,rt=255&C,it=255&I,ot=.6-T*T-B*B-k*k-L*L;if(ot<0)i=0;else{var at=S[et+S[nt+S[rt+S[it]]]]%32*4;i=(ot*=ot)*ot*(O[at]*T+O[at+1]*B+O[at+2]*k+O[at+3]*L)}var st=.6-q*q-j*j-U*U-z*z;if(st<0)o=0;else{var pt=S[et+f+S[nt+l+S[rt+h+S[it+d]]]]%32*4;o=(st*=st)*st*(O[pt]*q+O[pt+1]*j+O[pt+2]*U+O[pt+3]*z)}var ct=.6-V*V-Y*Y-N*N-W*W;if(ct<0)a=0;else{var ut=S[et+v+S[nt+y+S[rt+m+S[it+g]]]]%32*4;a=(ct*=ct)*ct*(O[ut]*V+O[ut+1]*Y+O[ut+2]*N+O[ut+3]*W)}var ft=.6-G*G-H*H-X*X-K*K;if(ft<0)c=0;else{var lt=S[et+_+S[nt+b+S[rt+w+S[it+x]]]]%32*4;c=(ft*=ft)*ft*(O[lt]*G+O[lt+1]*H+O[lt+2]*X+O[lt+3]*K)}var ht=.6-$*$-J*J-Q*Q-tt*tt;if(ht<0)u=0;else{var dt=S[et+1+S[nt+1+S[rt+1+S[it+1]]]]%32*4;u=(ht*=ht)*ht*(O[dt]*$+O[dt+1]*J+O[dt+2]*Q+O[dt+3]*tt)}return 27*(i+o+a+c+u)}},c._buildPermutationTable=u,void 0===(r=function(){return c}.call(e,n,e,t))||(t.exports=r),e.SimplexNoise=c,t.exports=c}()},3639:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),i=new Uint8Array(16);function o(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,s=function(t){return"string"==typeof t&&a.test(t)};for(var p=[],c=0;c<256;++c)p.push((c+256).toString(16).substr(1));var u,f,l=0,h=0;const d=function(t,e,n){var r=e&&n||0,i=e||new Array(16),a=(t=t||{}).node||u,c=void 0!==t.clockseq?t.clockseq:f;if(null==a||null==c){var d=t.random||(t.rng||o)();null==a&&(a=u=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==c&&(c=f=16383&(d[6]<<8|d[7]))}var v=void 0!==t.msecs?t.msecs:Date.now(),y=void 0!==t.nsecs?t.nsecs:h+1,m=v-l+(y-h)/1e4;if(m<0&&void 0===t.clockseq&&(c=c+1&16383),(m<0||v>l)&&void 0===t.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=v,h=y,f=c;var g=(1e4*(268435455&(v+=122192928e5))+y)%4294967296;i[r++]=g>>>24&255,i[r++]=g>>>16&255,i[r++]=g>>>8&255,i[r++]=255&g;var _=v/4294967296*1e4&268435455;i[r++]=_>>>8&255,i[r++]=255&_,i[r++]=_>>>24&15|16,i[r++]=_>>>16&255,i[r++]=c>>>8|128,i[r++]=255&c;for(var b=0;b<6;++b)i[r+b]=a[b];return e||function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(p[t[e+0]]+p[t[e+1]]+p[t[e+2]]+p[t[e+3]]+"-"+p[t[e+4]]+p[t[e+5]]+"-"+p[t[e+6]]+p[t[e+7]]+"-"+p[t[e+8]]+p[t[e+9]]+"-"+p[t[e+10]]+p[t[e+11]]+p[t[e+12]]+p[t[e+13]]+p[t[e+14]]+p[t[e+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n}(i)}}},__webpack_module_cache__={};function __webpack_require__(t){if(__webpack_module_cache__[t])return __webpack_module_cache__[t].exports;var e=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](e,e.exports,__webpack_require__),e.exports}return __webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var n in e)__webpack_require__.o(e,n)&&!__webpack_require__.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__(522)})()})); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Urpflanze=e():t.Urpflanze=e()}(window,(function(){return(()=>{var __webpack_modules__={1723:(t,e,n)=>{"use strict";function r(t){var e=i(t);if(e){if("hsl"===e.type){var n=function(t,e,n){var r,i,o;if(t/=360,n/=100,0==(e/=100))r=i=o=n;else{var a=function(t,e,n){return(n+=n<0?1:n>1?-1:0)<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t},s=n<.5?n*(1+e):n+e-n*e,p=2*n-s;r=a(p,s,t+1/3),i=a(p,s,t),o=a(p,s,t-1/3)}return[.5+255*r<<0,.5+255*i<<0,.5+255*o<<0]}(e.a,e.b,e.c);return{r:n[0],g:n[1],b:n[2],h:e.a,s:e.b,l:e.c,alpha:e.alpha}}var r=function(t,e,n){t/=255,e/=255,n/=255;var r,i,o=Math.max(t,e,n),a=Math.min(t,e,n),s=(o+a)/2;if(o==a)r=i=0;else{var p=o-a;switch(i=s>.5?p/(2-o-a):p/(o+a),o){case t:r=(e-n)/p+(e16777215?{type:"rgb",a:t>>24&255,b:t>>16&255,c:t>>8&255,alpha:(255&t)/255}:{type:"rgb",a:t>>16&255,b:t>>8&255,c:255&t,alpha:1};t=t.replace(/\s/g,"");var e=/^#([0-9a-f]{3,8})$/i.exec(t);if(e){var n=e[1];return 3===n.length?{type:"rgb",a:parseInt(n[0]+n[0],16),b:parseInt(n[1]+n[1],16),c:parseInt(n[2]+n[2],16),alpha:1}:{type:"rgb",a:parseInt(n[0]+n[1],16),b:parseInt(n[2]+n[3],16),c:parseInt(n[4]+n[5],16),alpha:n.length>6?parseInt(n.substring(6),16)/255:1}}if(e=/^((hsl|rgb)a?)\((\d+),(\d+)%?,(\d+)%?,?(.+)?\)$/i.exec(t)){var r=e,i=r[2],o=r[3],a=r[4],s=r[5],p=r[6];return{type:i,a:+o,b:+a,c:+s,alpha:p?+p:1}}}n.d(e,{k0:()=>r,lu:()=>i})},9277:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{zO:()=>now,Ux:()=>toDegrees,Yr:()=>toRadians,qo:()=>toArray,t7:()=>lerp,uZ:()=>clamp,Sr:()=>relativeClamp,tF:()=>noise,aT:()=>angleFromRepetition,B7:()=>angle2FromRepetition,db:()=>distanceFromRepetition});var simplex_noise__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(21),simplex_noise__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(simplex_noise__WEBPACK_IMPORTED_MODULE_0__),_core_types_scene_child__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(9835),gl_matrix__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(1437),parseFunction={suffix:"$fn:",parse:function(t){return"function"==typeof t&&"SimpleAnimation"!==t.name?parseFunction.suffix+t.toString():t},unparse:function(data){return"string"==typeof data&&0===data.indexOf(parseFunction.suffix)?eval(data.substr(parseFunction.suffix.length)):data}};function cancelablePromise(t){var e=!1,n=!1;return{promise:new Promise((function(r,i){t.then((function(t){e=!0,n?i("canceled"):r(t)})).catch((function(t){e=!0,i(n?"canceled":t)}))})),resolved:function(){return e},canceled:function(){return n},cancel:function(){n=!0}}}function now(){return performance.now()}function toDegrees(t){return 180*t/Math.PI}function toRadians(t){return t*Math.PI/180}function toArray(t){return Array.isArray(t)?t:[t,t]}function lerp(t,e,n){return(1-n)*t+n*e}function clamp(t,e,n){return n<=t?t:n>=e?e:n}function relativeClamp(t,e,n,r,i){return clamp(r,i,(n-t)/(e-t)*(i-r)+r)}var noises={random:new(simplex_noise__WEBPACK_IMPORTED_MODULE_0___default())(Math.random)};function noise(t,e,n,r){return void 0===t&&(t="random"),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===noises[t]&&(noises[t]=new(simplex_noise__WEBPACK_IMPORTED_MODULE_0___default())(t)),noises[t].noise3D(e,n,r)}function angleFromRepetition(t,e){if(void 0===e&&(e=[0,0]),t.type==_core_types_scene_child__WEBPACK_IMPORTED_MODULE_1__.i.Matrix){var n=gl_matrix__WEBPACK_IMPORTED_MODULE_2__.al((t.col.count-1)/2,(t.row.count-1)/2);n[0]+=n[0]*e[0],n[1]+=n[1]*e[1];var r=t.col.index-1-n[0],i=t.row.index-1-n[1];return 0===r?0:Math.atan(i/r)}return(t.angle-Math.PI)/2}function angle2FromRepetition(t,e){if(void 0===e&&(e=[0,0]),t.type==_core_types_scene_child__WEBPACK_IMPORTED_MODULE_1__.i.Matrix){var n=gl_matrix__WEBPACK_IMPORTED_MODULE_2__.al((t.col.count-1)/2,(t.row.count-1)/2);n[0]+=n[0]*e[0],n[1]+=n[1]*e[1];var r=t.col.index-1-n[0],i=t.col.index-1-n[1];return 0===r?0:Math.atan2(i,r)}return t.angle-Math.PI}function distanceFromRepetition(t,e){if(void 0===e&&(e=[0,0]),t.type==_core_types_scene_child__WEBPACK_IMPORTED_MODULE_1__.i.Matrix){var n=gl_matrix__WEBPACK_IMPORTED_MODULE_2__.al(.5,.5);n[0]+=n[0]*e[0],n[1]+=n[1]*e[1];var r=gl_matrix__WEBPACK_IMPORTED_MODULE_2__.al(t.col.offset-.5/t.col.count,t.row.offset-.5/t.row.count);return gl_matrix__WEBPACK_IMPORTED_MODULE_2__.TE(r,n)}return 1}},5631:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r,i=n(817),o=n(9213),a=n(5282),s=n(7329),p=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const c=function(t){function e(e){void 0===e&&(e={});var n=this;return e.type="Group",(n=t.call(this,e)||this).children=[],["id","name","data","order","type"].forEach((function(t){t in e&&delete e[t]})),n.props=e,n}return p(e,t),e.prototype.isStatic=function(){for(var t=this.children,e=0,n=t.length;e0?Math.max.apply(o,o.children.map((function(t){return t.order||0})))+1:0,o.scene&&i.Z.propagateToChilden(a,o.scene),o.children.push(a)},o=this,a=0,s=e.length;a=0&&t=0&&t0){this.children.forEach((function(e){return t.push(e.getBounding())}));for(var n=0,r=this.children.length;nt[n].x?t[n].x:e.x,e.y=e.y>t[n].y?t[n].y:e.y,e.width=e.width0&&n[n.length-1].clearBuffer(t,e)}},e.prototype.setProp=function(t,e){var n=this;"object"==typeof t?Object.keys(t).forEach((function(e){return n.props[e]=t[e]})):this.props[t]=e,this.children.forEach((function(n){return n.setProp(t,e)}))},e.prototype.setPropUnsafe=function(e,n){t.prototype.setPropUnsafe.call(this,e,n),this.children.forEach((function(t){return t.setPropUnsafe(e,n)}))},e.prototype.getBufferLength=function(t){return this.children.map((function(e){return e.getBufferLength(t)})).reduce((function(t,e){return t+e}),0)},e.prototype.getBuffer=function(){var t=this.children.map((function(t){return t.getBuffer()})).filter((function(t){return void 0!==t})),e=t.reduce((function(t,e){return t+e.length}),0);if(e>0){var n=new Float32Array(e);n.set(t[0],0);for(var r=1,i=0,o=t.length;r{"use strict";n.d(e,{Z:()=>a});var r=n(9213),i=n(5631),o=n(8227);const a=function(){function t(t){void 0===t&&(t={}),this.width=400,this.height=400,this.background="hsla(0, 0%, 0%, 1)",this.color="hsla(0, 0%, 100%, 1)",this.currentTime=0,void 0!==t.width&&(this.width=t.width),void 0!==t.height&&(this.height=t.height),void 0!==t.background&&(this.background=t.background),void 0!==t.color&&(this.color=t.color),this.children=[],this.center=[this.width/2,this.height/2]}return t.prototype.getWidth=function(t){return void 0===t&&(t=100),this.width*t/100},t.prototype.getHeight=function(t){return void 0===t&&(t=100),this.height*t/100},t.prototype.resize=function(t,e){void 0===e&&(e=t),this.width=t,this.height=e,this.center=[this.width/2,this.height/2],this.children.forEach((function(t){return t.clearBuffer(!0,!1)}))},t.prototype.update=function(t){this.currentTime=t;for(var e=0,n=this.children.length;e0?Math.max.apply(this,this.children.map((function(t){return t.order||0})))+1:0,t.propagateToChilden(a,this),this.children.push(a),a.clearBuffer(!0,!1)}this.sortChildren()},t.prototype.sortChildren=function(){this.children.sort((function(t,e){return t.order-e.order})),this.children=this.children.map((function(t,e){return t.order=e,t}))},t.prototype.find=function(t){for(var e=this.getChildren(),n=0,r=e.length;n=0&&t=0&&t{"use strict";n.d(e,{Z:()=>i});var r=0;const i=function(){function t(t){var e;this.id=null!==(e=t.id)&&void 0!==e?e:++r,this.type=t.type||"SceneChild",this.name=t.name||this.type+"_"+this.id,this.data=t.data||{},this.props={}}return t.prototype.find=function(t){return this.id===t||this.name===t?this:null},t.prototype.getProps=function(){return this.props},t.prototype.getProp=function(t,e,n){var r;return null!==(r=this.props[t])&&void 0!==r?r:n},t.prototype.setPropUnsafe=function(t,e){var n=this;"string"==typeof t?this.props[t]=e:Object.keys(t).forEach((function(e){return n.props[e]=t[e]}))},t}()},212:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=new Array(4),i={create:function(t,e){void 0===t&&(t=0);var n=new Array(2);return"number"==typeof t?(n[0]=t,n[1]=null!=e?e:t):(n[0]=t[0],n[1]=t[1]),n},normalize:function(t){var e=i.length(t);return 0!==e?[t[0]/e,t[1]/e]:[0,0]},distance:function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1])},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},length:function(t){return Math.hypot(t[0],t[1])},angle:function(t,e){return t=i.normalize(t),e=i.normalize(e),Math.acos(i.dot(t,e))},skewX:function(t,e){t[0]+=Math.tan(e)*t[1]},skewY:function(t,e){t[1]+=Math.tan(e)*t[0]},squeezeX:function(t,e){t[1]+=t[1]*(t[0]*-e)},squeezeY:function(t,e){t[0]+=t[0]*(t[1]*e)},rotate:function(t,e,n){var r=t[0]-n[0],i=t[1]-n[1];t[0]=r*e[0]+i*e[1]+n[0],t[1]=r*e[2]+i*e[3]+n[1]},rotateX:function(t,e,n){r[0]=1,r[1]=0,r[2]=0,r[3]=Math.cos(n),i.rotate(t,r,e)},rotateY:function(t,e,n){r[0]=Math.cos(n),r[1]=0,r[2]=0,r[3]=1,i.rotate(t,r,e)},rotateZ:function(t,e,n){r[0]=Math.cos(n),r[1]=-Math.sin(n),r[2]=Math.sin(n),r[3]=Math.cos(n),i.rotate(t,r,e)},translate:function(t,e){t[0]+=e[0],t[1]+=e[1]},scale:function(t,e){t[0]*=e[0],t[1]*=e[1]},divide:function(t,e){t[0]/=e[0],t[1]/=e[1]},toString:function(t){return"x: "+t[0]+", y: "+t[1]},ZERO:Array.from([0,0]),ONE:Array.from([1,1])};const o=i},7329:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r={empty:function(){return{cx:0,cy:0,x:-1,y:-1,width:2,height:2}},clear:function(t){t[0]=void 0,t[1]=void 0,t[2]=void 0,t[3]=void 0},add:function(t,e,n){(void 0===t[0]||et[2])&&(t[2]=e),(void 0===t[1]||nt[3])&&(t[3]=n)},sum:function(t,e){void 0!==e[0]&&void 0!==e[1]&&void 0!==e[2]&&void 0!==e[3]?void 0===t[0]||void 0===t[1]||void 0===t[2]||void 0===t[3]?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3]):(t[0]e[2]&&(t[2]=e[2]),t[1]e[3]&&(t[3]=e[3])):console.warn("[Urplfanze:Bounding] cannot sum bounding")},bind:function(t,e){void 0!==e[0]&&void 0!==e[1]&&void 0!==e[2]&&void 0!==e[3]?(t.x=e[0],t.y=e[1],t.width=e[2]-e[0],t.height=e[3]-e[1],t.cx=t.x+t.width/2,t.cy=t.y+t.height/2):console.warn("[Urplfanze:Bounding] cannot bind bounding")}}},2727:(t,e,n)=>{"use strict";n.d(e,{Gt:()=>i,hp:()=>o,uP:()=>a,s8:()=>s,pn:()=>p,$2:()=>c});var r=n(9685),i=[0,0,0],o=[0,0],a=[1,1];function s(t,e){return t[0]=1,t[1]=Math.tan(e[1]),t[2]=0,t[3]=0,t[4]=Math.tan(e[0]),t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function p(t){return Array.isArray(t)?[t[0],t[1]]:[t,t]}function c(t,e){return void 0===e&&(e=0),Array.isArray(t)?[t[0],t[1],e]:[t,t,e]}r.ZR(Array)},4426:(t,e,n)=>{"use strict";n.d(e,{cM:()=>r,yo:()=>i,Q_:()=>o,$B:()=>a});var r=function(t,e){return Math.log(t)/Math.log(e)},i=2*Math.PI,o=(1+Math.sqrt(5))/2,a=function(t,e){var n=t%e;return n<0?n+e:n}},8227:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r,i=n(5282),o=n(9213),a=n(817),s=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),p=function(){return(p=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0?this.buffer.length:(this.shape?this.shape.getBufferLength(t):0)*this.getRepetitionCount()},e.prototype.generateBuffer=function(t,n){return this.shape?(this.shape.generate(t,!1,n),this.shape.getBuffer()||e.EMPTY_BUFFER):e.EMPTY_BUFFER},e.prototype.getShapeBounding=function(){return this.shape?this.shape.getBounding():this.bounding},e.prototype.addIndex=function(t,n,r){if(this.shape){var i=this.shape.getIndexedBuffer()||[],o={shape:this,frameLength:t,repetition:{type:n.type,angle:n.angle,index:n.index,count:n.count,offset:n.offset,row:{index:n.row.index,count:n.row.count,offset:n.row.offset},col:{index:n.col.index,count:n.col.count,offset:n.col.offset}}};void 0!==r&&(o.recursion={index:r.index,offset:r.offset,count:r.offset,level:r.level});for(var a=0,s=i.length;a{"use strict";n.d(e,{Z:()=>R});var r=n(9685);function i(){var t=new r.WT(16);return r.WT!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function o(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function a(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],p=e[5],c=e[6],u=e[7],f=e[8],l=e[9],h=e[10],d=e[11],v=e[12],y=e[13],m=e[14],g=e[15],_=n[0],b=n[1],w=n[2],x=n[3];return t[0]=_*r+b*s+w*f+x*v,t[1]=_*i+b*p+w*l+x*y,t[2]=_*o+b*c+w*h+x*m,t[3]=_*a+b*u+w*d+x*g,_=n[4],b=n[5],w=n[6],x=n[7],t[4]=_*r+b*s+w*f+x*v,t[5]=_*i+b*p+w*l+x*y,t[6]=_*o+b*c+w*h+x*m,t[7]=_*a+b*u+w*d+x*g,_=n[8],b=n[9],w=n[10],x=n[11],t[8]=_*r+b*s+w*f+x*v,t[9]=_*i+b*p+w*l+x*y,t[10]=_*o+b*c+w*h+x*m,t[11]=_*a+b*u+w*d+x*g,_=n[12],b=n[13],w=n[14],x=n[15],t[12]=_*r+b*s+w*f+x*v,t[13]=_*i+b*p+w*l+x*y,t[14]=_*o+b*c+w*h+x*m,t[15]=_*a+b*u+w*d+x*g,t}function s(t,e,n){var r,i,o,a,s,p,c,u,f,l,h,d,v=n[0],y=n[1],m=n[2];return e===t?(t[12]=e[0]*v+e[4]*y+e[8]*m+e[12],t[13]=e[1]*v+e[5]*y+e[9]*m+e[13],t[14]=e[2]*v+e[6]*y+e[10]*m+e[14],t[15]=e[3]*v+e[7]*y+e[11]*m+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],p=e[5],c=e[6],u=e[7],f=e[8],l=e[9],h=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=p,t[6]=c,t[7]=u,t[8]=f,t[9]=l,t[10]=h,t[11]=d,t[12]=r*v+s*y+f*m+e[12],t[13]=i*v+p*y+l*m+e[13],t[14]=o*v+c*y+h*m+e[14],t[15]=a*v+u*y+d*m+e[15]),t}function p(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function c(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],p=e[7],c=e[8],u=e[9],f=e[10],l=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*r,t[5]=a*i+u*r,t[6]=s*i+f*r,t[7]=p*i+l*r,t[8]=c*i-o*r,t[9]=u*i-a*r,t[10]=f*i-s*r,t[11]=l*i-p*r,t}function u(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],p=e[3],c=e[8],u=e[9],f=e[10],l=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*r,t[1]=a*i-u*r,t[2]=s*i-f*r,t[3]=p*i-l*r,t[8]=o*r+c*i,t[9]=a*r+u*i,t[10]=s*r+f*i,t[11]=p*r+l*i,t}function f(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],p=e[3],c=e[4],u=e[5],f=e[6],l=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*r,t[1]=a*i+u*r,t[2]=s*i+f*r,t[3]=p*i+l*r,t[4]=c*i-o*r,t[5]=u*i-a*r,t[6]=f*i-s*r,t[7]=l*i-p*r,t}function l(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}function h(t,e,n){var i=new r.WT(3);return i[0]=t,i[1]=e,i[2]=n,i}function d(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function v(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function y(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function m(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}var g,_,b=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t},w=(g=new r.WT(3),r.WT!=Float32Array&&(g[0]=0,g[1]=0,g[2]=0),g,n(1437)),x=n(9835),S=n(9277),O=n(2727),M=n(212),P=n(4426),Z=n(7329),C=n(9213),I=(_=function(t,e){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}_(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),A=function(){return(A=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&n[n.length-1].clearBuffer(t,e)}},e.prototype.generate=function(t,n,r){var i,g;if(void 0===n&&(n=!1),!this.buffer||!this.bStatic&&(t!==this.generateId||this.bUseParent||this.bUseRecursion)){this.generateId=t,this.bStaticIndexed&&this.bIndexed||(this.indexedBuffer=[]);var _=e.getEmptyPropArguments(this,r),C=_.repetition,I=this.getProp("repetitions",_,1),A=Array.isArray(I)?x.i.Matrix:x.i.Ring,R=Array.isArray(I)?I[0]*(null!==(i=I[1])&&void 0!==i?i:I[0]):I,E=Array.isArray(I)?I[0]:R,F=Array.isArray(I)?null!==(g=I[1])&&void 0!==g?g:I[0]:1,D=C.row;D.count=E;var q=C.col;q.count=F,C.count=R,C.col.count=F,C.row.count=E,C.type=A;for(var j=0,U=[],z=0,V=w.al((F-1)/2,(E-1)/2),Y=this.scene?[this.scene.center[0],this.scene.center[1],0]:[0,0,0],N=[void 0,void 0,void 0,void 0],W=[void 0,void 0,void 0,void 0],G=0;G1?z/(R-1):1,C.angle=A===x.i.Ring?P.yo/R*z:0,q.index=H+1,q.offset=F>1?H/(F-1):1,D.index=G+1,D.offset=E>1?G/(E-1):1;var X=this.generateBuffer(t,_),K=X.length,$=this.getShapeBounding();U[z]=new Float32Array(K),j+=K;var J=O.pn(this.getProp("distance",_,O.hp)),Q=this.getProp("displace",_,0),tt=O.$2(this.getProp("scale",_,O.uP),1),et=O.$2(this.getProp("translate",_,O.hp),0),nt=this.getProp("skewX",_,0),rt=this.getProp("skewY",_,0),it=this.getProp("squeezeX",_,0),ot=this.getProp("squeezeY",_,0),at=this.getProp("rotateX",_,0),st=this.getProp("rotateY",_,0),pt=this.getProp("rotateZ",_,0),ct=(0,S.uZ)(0,1,this.getProp("perspective",_,0)),ut=O.$2(this.getProp("perspectiveOrigin",_,O.hp),0),ft=O.$2(this.getProp("transformOrigin",_,O.hp),0),lt=void 0;switch(A){case x.i.Ring:m(lt=h(J[0],0,0),lt,O.Gt,C.angle+Q);break;case x.i.Matrix:lt=h(J[1]*(H-V[0]),J[0]*(G-V[1]),0)}var ht=ct>0?Math.max($.width,$.height)/2:1,dt=ct>0?ht+10*ht*(1-ct):0,vt=0!==ct||0!==ft[0]||0!==ft[1],yt=0!==ut[0]||0!==ut[1];vt&&(ft[0]*=$.width/2,ft[1]*=$.height/2,ft[2]=dt),o(B),vt&&s(B,B,ft),0===et[0]&&0===et[1]||s(B,B,et),0===nt&&0===rt||(O.s8(T,[nt,rt]),a(B,B,T)),0!==at&&c(B,B,at),0!==st&&u(B,B,st),0!==pt&&f(B,B,pt),1===tt[0]&&1===tt[1]||p(B,B,tt),vt&&s(B,B,v(ft,ft,-1)),dt>0&&(yt&&(ut[0]*=$.width/2,ut[1]*=$.height/2,ut[2]=0),l(k,-Math.PI/2,1,0,1/0)),o(L),s(L,L,lt),n&&s(L,L,Y),A===x.i.Ring&&f(L,L,C.angle+Q),Z.Z.clear(W);for(var mt=0;mt0&&(yt&&d(gt,gt,ut),y(gt,gt,k),v(gt,gt,dt),yt&&b(gt,gt,ut)),this.vertexCallback){var _t=mt/2,bt=K/2,wt={index:_t+1,count:bt,offset:bt>1?_t/(bt-1):1};this.vertexCallback(gt,wt,_)}y(gt,gt,L),U[z][mt]=gt[0],U[z][mt+1]=gt[1],Z.Z.add(N,gt[0],gt[1])}this.bStaticIndexed&&this.bIndexed||this.addIndex(K,C)}Z.Z.bind(this.bounding,N),this.buffer=new Float32Array(j);for(var xt=0,St=(lt=0,U.length);xt{"use strict";n.d(e,{Z:()=>p});var r,i=n(7329),o=n(6591),a=n(6669),s=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const p=function(t){function e(n){var r;void 0===n&&(n={});var i=this;return n.type=n.type||"ShapeBuffer",n.adaptMode=null!==(r=n.adaptMode)&&void 0!==r?r:a._.Scale,i=t.call(this,n)||this,void 0===n.shape?(console.warn("[Urpflanze:ShapeBuffer] ShapeBuffer require a buffer passed from `shape` property"),i.shape=e.EMPTY_BUFFER):i.shape=Float32Array.from(n.shape),i.bStatic=i.isStatic(),i.bStaticIndexed=i.isStaticIndexed(),i}return s(e,t),e.prototype.clearBuffer=function(e,n){void 0===e&&(e=!1),void 0===n&&(n=!0),t.prototype.clearBuffer.call(this,e,n),this.shapeBuffer=void 0},e.prototype.bindBuffer=function(t){for(var e=this.getRepetitionSideLength(t),n=this.adaptMode!==a._.None?o.Z.adaptBuffer(this.shape,this.adaptMode):Float32Array.from(this.shape),r=[void 0,void 0,void 0,void 0],s=0,p=n.length;s0?this.buffer.length:this.shape.length*this.getRepetitionCount()},e.prototype.generateBuffer=function(t,e){return void 0!==this.shapeBuffer&&"function"!=typeof this.props.sideLength||this.bindBuffer(e),this.shapeBuffer},e.prototype.setShape=function(t){this.shape=t,this.clearBuffer(!0)},e.prototype.subdivide=function(t){void 0===t&&(t=1);var n=this.shape;if(n&&n.length>0){for(var r=0;r{"use strict";n.d(e,{Z:()=>f});var r,i=n(6669),o=n(7329),a=n(4426),s=n(6591),p=n(5282),c=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=function(){return(u=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;a--)if(this.loopDependencies[a]in o){i=!0;break}"loop"in o&&(o.loop=u(u({},this.props.loop),o.loop),i=!0),t.prototype.setProp.call(this,o,n,i)},e.prototype.getBufferLength=function(t){if(this.bStatic&&void 0!==this.buffer)return this.buffer.length;if(this.bStaticLoop&&void 0!==this.currentOrSingleLoopBuffer)return this.currentOrSingleLoopBuffer.length*this.getRepetitionCount();var e=this.getLoop(t||p.Z.getEmptyPropArguments(this)).count;return this.getRepetitionCount()*e*2},e.prototype.generateBuffer=function(t,e){return this.bStaticLoop?("function"!=typeof this.props.sideLength&&void 0!==this.currentOrSingleLoopBuffer||(this.currentOrSingleLoopBuffer=this.generateLoopBuffer(e)),this.currentOrSingleLoopBuffer):this.generateLoopBuffer(e)},e.prototype.generateLoopBuffer=function(t){for(var e=this.getLoop(t),n=e.start,r=e.inc,a=(e.end,e.count),p=this.getRepetitionSideLength(t),c=this.props.loop&&this.props.loop.vertex?this.props.loop.vertex:this.loop.vertex,u={index:0,offset:0,angle:0,count:a},f=u.count,l=2*f,h=new Float32Array(l),d=this.adaptMode===i._.None,v=[void 0,void 0,void 0,void 0],y=0,m=0;y1?y/(u.count-1):1;u.angle=g,u.index=y+1,u.offset=_;var b=Float32Array.from(c(u,t));h[m]=b[0],h[m+1]=b[1],d&&(h[m]*=p[0],h[m+1]*=p[1],o.Z.add(v,h[m],h[m+1]))}if(!d){var w=s.Z.adaptBuffer(h,this.adaptMode);for(o.Z.clear(v),y=0;y{"use strict";n.d(e,{Z:()=>c});var r,i=n(5282),o=n(6669),a=n(2727),s=n(7329),p=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const c=function(t){function e(e){var n,r;void 0===e&&(e={});var i=t.call(this,e)||this;return i.currentGenerationPrimitiveBounding=s.Z.empty(),i.props.sideLength=void 0===e.sideLength?void 0:"function"==typeof e.sideLength?e.sideLength:a.pn(e.sideLength),i.style=e.style||{},i.adaptMode=null!==(n=e.adaptMode)&&void 0!==n?n:o._.None,i.bClosed=null===(r=e.bClosed)||void 0===r||r,i}return p(e,t),e.prototype.isStatic=function(){return"function"!=typeof this.props.sideLength&&t.prototype.isStatic.call(this)},e.prototype.getRepetitionSideLength=function(t){return this.bStatic?(void 0===this.props.sideLength?this.props.sideLength=[50,50]:"number"==typeof this.props.sideLength&&(this.props.sideLength=[this.props.sideLength,this.props.sideLength]),this.props.sideLength):a.pn(this.getProp("sideLength",t,[50,50]))},e.prototype.getShapeBounding=function(){return this.currentGenerationPrimitiveBounding},e.prototype.addIndex=function(t,e,n){var r={shape:this,frameLength:t,repetition:{type:e.type,angle:e.angle,index:e.index,count:e.count,offset:e.offset,row:{index:e.row.index,count:e.row.count,offset:e.row.offset},col:{index:e.col.index,count:e.col.count,offset:e.col.offset}}};void 0!==n&&(r.recursion={index:n.index,offset:n.offset,count:n.offset,level:n.level}),this.indexedBuffer.push(r)},e.prototype.isClosed=function(){return this.bClosed},e.prototype.setClosed=function(t){this.bClosed=t},e.prototype.getAdaptMode=function(){return this.adaptMode},e.prototype.adapt=function(t){this.adaptMode=t,this.clearBuffer(!0)},e.getBounding=function(t,e){void 0===e&&(e=s.Z.empty());for(var n=[void 0,void 0,void 0,void 0],r=0,i=t.length;r=2||r.height>=2||n>=o._.Fill&&(r.width<2||r.height<2)?2/Math.max(r.width,r.height):1,s=n>=o._.Center?r.cx:0,p=n>=o._.Center?r.cy:0,c=0,u=t.length;c{"use strict";n.d(e,{Z:()=>p});var r,i=n(7329),o=n(8227),a=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(){return(s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n1?0:1,count:1}};if(r<=1){var c=this.generateShapeBuffer(n,t,p);return this.currentGenerationRecursiveBounding=this.shape.getBounding(),void(this.shapeRecursiveBuffer=c)}for(var u=this.generateShapeBuffer(n,t,p),f=[p],l=0,h=1,d=[void 0,void 0,void 0,void 0],v=u.length,y=v/2,m=a<=0?y:Math.min(a,y),g=0===a?1:y/Math.min(a,y),_=new Float32Array(e.summmation(r,m)*v),b=0;b1?w/(r-1):1,S=e.summmation(w,m)*v,O=w-1,M=0===O?0:e.summmation(O,m)*v,P=0,Z=Math.pow(m,w);P1?P/(Z-1):1,count:Z,level:{index:w+1,offset:x,count:r},parent:f[l]},u=this.generateShapeBuffer(n,t,p),f.push(p);for(var C=S+P*v,I=Math.floor(M+2*P*g),A=_[I=I%2==0?I:I+1],T=_[I+1],B=(b=0,v);b1?0:1,count:i}},d=s(s({},p),{recursion:h});l.parent=l.parent?o.Z.setIndexedParent(l.parent,d):d,this.indexedBuffer.push(l)}if(i>1)for(var v=this.shape.getBufferLength(r)/2,y=a<=0?v:Math.min(a,v),m=this.indexedBuffer.map((function(t){return[t.parent.recursion]})),g=0,_=1,b=1;b1?b/(i-1):1,x=0,S=Math.pow(y,b);x1?x/(S-1):1;for(u=0,f=c.length;u{"use strict";n.d(e,{Z:()=>p});var r,i=n(4426),o=n(1315),a=n(6669),s=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const p=function(t){function e(e){void 0===e&&(e={});var n=this;return e.type="Circle",e.adaptMode=a._.None,(n=t.call(this,e,!0)||this).loop={start:0,end:i.yo,inc:function(t){var e=n.getRepetitionSideLength(t);return 1/Math.pow(e[0]*e[1],.25)*o.Z.PId2},vertex:function(t){return[Math.cos(t.angle),Math.sin(t.angle)]}},n.bStaticLoop=n.isStaticLoop(),n.bStatic=n.isStatic(),n.bStaticIndexed=n.isStaticIndexed(),n}return s(e,t),e}(o.Z)},1010:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r,i=n(6669),o=n(3969),a=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const s=function(t){function e(e){return void 0===e&&(e={}),e.type="Line",e.shape=[-1,0,1,0],e.adaptMode=i._.None,e.bClosed=!1,t.call(this,e)||this}return a(e,t),e}(o.Z)},6863:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});var r,i=n(4426),o=n(1315),a=n(6669),s=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const p=function(t){function e(e){void 0===e&&(e={});var n=this;return e.type="Lissajous",e.loopDependencies=(e.loopDependencies||[]).concat(["wx","wy","wz"]),e.adaptMode=a._.None,(n=t.call(this,e,!0)||this).props.wx=e.wx||1,n.props.wy=e.wy||2,n.props.wz=e.wz||0,n.loop={start:0,end:i.yo,inc:function(t){var e=n.getProp("wx",t),r=n.getProp("wy",t),i=e==r?o.Z.PId2:.5-.01*Math.min(49,e+r),a=n.getRepetitionSideLength(t);return 1/Math.pow(a[0]*a[1],.25)*i},vertex:function(t){return n.wx===n.wy?[Math.cos(t.angle+n.wz),Math.sin(t.angle)]:[Math.cos(n.wx*t.angle+n.wz),Math.sin(n.wy*t.angle)]}},n.bStaticLoop=n.isStaticLoop(),n.bStatic=n.isStatic(),n.bStaticIndexed=n.isStaticIndexed(),n}return s(e,t),e.prototype.generateLoopBuffer=function(e){return this.wx=this.getProp("wx",e,1),this.wy=this.getProp("wy",e,2),this.wz=this.getProp("wz",e,2),t.prototype.generateLoopBuffer.call(this,e)},e}(o.Z)},2868:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});var r,i=n(1315),o=n(6669),a=n(4426),s=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const p=function(t){function e(e){var n;void 0===e&&(e={});var r=this;return e.type=e.type||"Polygon",e.loopDependencies=(e.loopDependencies||[]).concat(["sideNumber"]),e.adaptMode=null!==(n=e.adaptMode)&&void 0!==n?n:o._.None,(r=t.call(this,e,!0)||this).props.sideNumber=e.sideNumber,r.loop={start:0,end:a.yo,inc:function(t){return a.yo/r.getProp("sideNumber",t,5)},vertex:function(t){return[Math.cos(t.angle),Math.sin(t.angle)]}},r.bStaticLoop=r.isStaticLoop(),r.bStatic=r.isStatic(),r.bStaticIndexed=r.isStaticIndexed(),r}return s(e,t),e}(i.Z)},178:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r,i=n(6669),o=n(3969),a=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const s=function(t){function e(e){return void 0===e&&(e={}),e.type="Rect",e.shape=[-1,-1,1,-1,1,1,-1,1],e.adaptMode=i._.None,t.call(this,e)||this}return a(e,t),e}(o.Z)},5589:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});var r,i=n(1315),o=n(6669),a=n(4426),s=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const p=function(t){function e(n){var r,i,s;void 0===n&&(n={});var p=this;return n.type="Rose",n.loopDependencies=(n.loopDependencies||[]).concat(["n","d"]),n.adaptMode=null!==(r=n.adaptMode)&&void 0!==r?r:o._.Scale,(p=t.call(this,n,!0)||this).props.n=null!==(i=n.n)&&void 0!==i?i:1,p.props.d=null!==(s=n.d)&&void 0!==s?s:2,p.loop={start:0,end:function(t){return e.getFinalAngleFromK(p.getProp("n",t),p.getProp("d",t))},inc:function(t){var e=p.getProp("n",t),n=p.getProp("d",t),r=p.getRepetitionSideLength(t),i=Math.pow(r[0]*r[1],.45),o=n{"use strict";n.d(e,{Z:()=>p});var r,i=n(1315),o=n(6669),a=n(4426),s=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const p=function(t){function e(n){var r,i,s,p;void 0===n&&(n={});var c=this;return n.type="Spiral",n.bClosed=!1,n.adaptMode=null!==(r=n.adaptMode)&&void 0!==r?r:o._.None,n.loopDependencies=(n.loopDependencies||[]).concat(["twists","twistsStart","spiral"]),(c=t.call(this,n,!0)||this).props.spiral=null!==(i=n.spiral)&&void 0!==i?i:e.types.ARCHIMEDE,c.props.twists=null!==(s=n.twists)&&void 0!==s?s:2,c.props.twistsStart=null!==(p=n.twistsStart)&&void 0!==p?p:0,c.loop={start:function(t){return a.yo*c.getProp("twistsStart",t)},end:function(t){return a.yo*(c.getProp("twistsStart",t)+c.getProp("twists",t))},inc:function(t){var e=c.getProp("twists",t),n=a.yo*e,r=c.getRepetitionSideLength(t);return n/((4+Math.sqrt(r[0]*r[1]))*e)},vertex:function(t){var e=c.r(t.angle);return[e*Math.cos(t.angle),e*Math.sin(t.angle)]}},c.bStaticLoop=c.isStaticLoop(),c.bStatic=c.isStatic(),c.bStaticIndexed=c.isStaticIndexed(),c}return s(e,t),e.prototype.generateLoopBuffer=function(n){return this.spiral=this.getProp("spiral",n),this.r=e.getRFromTSpiralType(this.spiral),t.prototype.generateLoopBuffer.call(this,n)},e.getRFromTSpiralType=function(t){switch(t){case e.types.ARCHIMEDE:return function(t){return t/10};case e.types.HYPERBOLIC:return function(t){return 1/t*3};case e.types.FERMAT:return function(t){return Math.pow(t,.5)/3};case e.types.LITUUS:return function(t){return Math.pow(t,-.5)};case e.types.LOGARITHMIC:return function(t){return Math.pow(Math.E,.2*t)/10}}return function(t){return t}},e.types={ARCHIMEDE:"ARCHIMEDE",HYPERBOLIC:"HYPERBOLIC",FERMAT:"FERMAT",LITUUS:"LITUUS",LOGARITHMIC:"LOGARITHMIC"},e}(i.Z)},6817:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});var r,i=n(1315),o=n(6669),a=n(4426),s=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const p=function(t){function e(e){var n,r,i,s,p,c,u;void 0===e&&(e={});var f=this;return e.type="SuperShape",e.loopDependencies=(e.loopDependencies||[]).concat(["a","b","m","n1","n2","n3"]),e.adaptMode=null!==(n=e.adaptMode)&&void 0!==n?n:o._.Scale,(f=t.call(this,e,!0)||this).props.a=null!==(r=e.a)&&void 0!==r?r:1,f.props.b=null!==(i=e.b)&&void 0!==i?i:1,f.props.m=null!==(s=e.m)&&void 0!==s?s:6,f.props.n1=null!==(p=e.n1)&&void 0!==p?p:1,f.props.n2=null!==(c=e.n2)&&void 0!==c?c:1,f.props.n3=null!==(u=e.n3)&&void 0!==u?u:1,f.loop={start:0,end:a.yo,inc:function(t){var e=f.getRepetitionSideLength(t);return Math.PI/Math.pow(e[0]*e[1],.5)},vertex:function(t){var e=t.angle,n=f.m*e/4,r=Math.pow(Math.abs(Math.cos(n)/f.a),f.n2),i=Math.pow(Math.abs(Math.sin(n)/f.b),f.n3),o=Math.pow(r+i,1/f.n1),a=0===o?1:1/o;return[a*Math.cos(e),a*Math.sin(e)]}},f.bStaticLoop=f.isStaticLoop(),f.bStatic=f.isStatic(),f.bStaticIndexed=f.isStaticIndexed(),f}return s(e,t),e.prototype.generateLoopBuffer=function(e){return this.a=this.getProp("a",e),this.b=this.getProp("b",e),this.m=this.getProp("m",e),this.n1=this.getProp("n1",e),this.n2=this.getProp("n2",e),this.n3=this.getProp("n3",e),t.prototype.generateLoopBuffer.call(this,e)},e}(i.Z)},4068:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r,i=n(6669),o=n(3969),a=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const s=function(t){function e(e){return void 0===e&&(e={}),e.type="Triangle",e.shape=[-1,-1,1,0,-1,1],e.adaptMode=i._.None,t.call(this,e)||this}return a(e,t),e}(o.Z)},9835:(t,e,n)=>{"use strict";var r;n.d(e,{i:()=>r}),function(t){t[t.Ring=1]="Ring",t[t.Matrix=2]="Matrix"}(r||(r={}))},6669:(t,e,n)=>{"use strict";var r;n.d(e,{_:()=>r}),function(t){t[t.None=0]="None",t[t.Scale=2]="Scale",t[t.Center=4]="Center",t[t.Fill=8]="Fill"}(r||(r={}))},522:(t,e,n)=>{"use strict";n.r(e),n.d(e,{version:()=>r.i8,author:()=>r.v,license:()=>r.Vl,Scene:()=>o.Z,SceneChild:()=>a.Z,Group:()=>s.Z,ShapePrimitive:()=>p.Z,ShapeLoop:()=>c.Z,ShapeBuffer:()=>u.Z,Shape:()=>f.Z,ShapeRecursive:()=>l.Z,Line:()=>h.Z,Triangle:()=>d.Z,Rect:()=>v.Z,Polygon:()=>y.Z,Circle:()=>m.Z,Rose:()=>g.Z,Spiral:()=>_.Z,Lissajous:()=>b.Z,SuperShape:()=>w.Z,lerp:()=>x.t7,clamp:()=>x.uZ,relativeClamp:()=>x.Sr,toDegrees:()=>x.Ux,toRadians:()=>x.Yr,now:()=>x.zO,noise:()=>x.tF,angleFromRepetition:()=>x.aT,angle2FromRepetition:()=>x.B7,distanceFromRepetition:()=>x.db,Vec2:()=>S.Z,PHI:()=>O.Q_,PI2:()=>O.yo,log:()=>O.cM,DrawerCanvas:()=>M.Z,Animation:()=>P.Z,Easings:()=>Z.Z});var r=n(7629),i=n(9685),o=n(817),a=n(9213),s=n(5631),p=n(6591),c=n(1315),u=n(3969),f=n(8227),l=n(1029),h=n(1010),d=n(4068),v=n(178),y=n(2868),m=n(9668),g=n(5589),_=n(1590),b=n(6863),w=n(6817),x=n(9277),S=n(212),O=n(4426),M=n(4789),P=n(9465),Z=n(3996);i.ZR(Array)},7629:(t,e,n)=>{"use strict";n.d(e,{i8:()=>r,v:()=>i,Vl:()=>o});var r="0.3.3",i="Gennaro Bosone ",o="GPL-3.0-or-later"},3996:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r={linear:function(t,e,n,r){return n*t/r+e},quadraticIn:function(t,e,n,r){return n*(t/=r)*t+e},quadraticOut:function(t,e,n,r){return-n*(t/=r)*(t-2)+e},quadraticInOut:function(t,e,n,r){return(t/=r/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e},cubicIn:function(t,e,n,r){return n*(t/=r)*t*t+e},cubicOut:function(t,e,n,r){return t/=r,n*(--t*t*t+1)+e},cubicInOut:function(t,e,n,r){return(t/=r/2)<1?n/2*t*t*t+e:n/2*((t-=2)*t*t+2)+e},quarticIn:function(t,e,n,r){return n*(t/=r)*t*t*t+e},quarticOut:function(t,e,n,r){return t/=r,-n*(--t*t*t*t-1)+e},quarticInOut:function(t,e,n,r){return(t/=r/2)<1?n/2*t*t*t*t+e:-n/2*((t-=2)*t*t*t-2)+e},quinticIn:function(t,e,n,r){return n*(t/=r)*t*t*t*t+e},quinticOut:function(t,e,n,r){return t/=r,n*(--t*t*t*t*t+1)+e},quinticInOut:function(t,e,n,r){return(t/=r/2)<1?n/2*t*t*t*t*t+e:n/2*((t-=2)*t*t*t*t+2)+e},sinusoidalIn:function(t,e,n,r){return-n*Math.cos(t/r*(Math.PI/2))+n+e},sinusoidalOut:function(t,e,n,r){return n*Math.sin(t/r*(Math.PI/2))+e},sinusoidalInOut:function(t,e,n,r){return-n/2*(Math.cos(Math.PI*t/r)-1)+e},exponentialIn:function(t,e,n,r){return n*Math.pow(2,10*(t/r-1))+e},exponentialOut:function(t,e,n,r){return n*(1-Math.pow(2,-10*t/r))+e},exponentialInOut:function(t,e,n,r){return(t/=r/2)<1?n/2*Math.pow(2,10*(t-1))+e:(t--,n/2*(2-Math.pow(2,-10*t))+e)},circularIn:function(t,e,n,r){return t/=r,-n*(Math.sqrt(1-t*t)-1)+e},circularOut:function(t,e,n,r){return t/=r,t--,n*Math.sqrt(1-t*t)+e},circularInOut:function(t,e,n,r){return(t/=r/2)<1?-n/2*(Math.sqrt(1-t*t)-1)+e:(t-=2,n/2*(Math.sqrt(1-t*t)+1)+e)},elasticIn:function(t,e,n,r,i,o){if(0==t)return e;if(1==(t/=r))return e+n;o||(o=.3*r);var a=0;return!i||i{"use strict";n.d(e,{Z:()=>f});var r=n(1723),i=n(9277),o=n(3996),a=function(){return(a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0?function(t){var n,i,a;return e(t,((null===(n=t.shape.scene)||void 0===n?void 0:n.currentTime)||0)<=p?0:((null===(i=t.shape.scene)||void 0===i?void 0:i.currentTime)||0)-p>=r?1:o.Z[s](((null===(a=t.shape.scene)||void 0===a?void 0:a.currentTime)||0)-p,0,1,r))}:function(t){var n,i;return e(t,((null===(n=t.shape.scene)||void 0===n?void 0:n.currentTime)||0)<=r?o.Z[s]((null===(i=t.shape.scene)||void 0===i?void 0:i.currentTime)||0,0,1,r):1)}:"loop"===i?"sinusoidal"==a?function(t){var n,i=2*((null===(n=t.shape.scene)||void 0===n?void 0:n.currentTime)||0)*Math.PI/r;return e(t,.5+.5*Math[s](i))}:function(t){var n,i=r/2,a=((null===(n=t.shape.scene)||void 0===n?void 0:n.currentTime)||0)%r;return e(t,a<=i?o.Z[s](a,0,1,i):o.Z[s](i-(a-i),0,1,i))}:"sinusoidal"==a?function(t){var n,i=((null===(n=t.shape.scene)||void 0===n?void 0:n.currentTime)||0)%(r+p),o=2*((i=i<=p?0:i-p)||0)*Math.PI/r;return e(t,.5+.5*Math[s](o))}:p&&p>0?function(t){var n,i=((null===(n=t.shape.scene)||void 0===n?void 0:n.currentTime)||0)%(r+p);return e(t,i<=p?0:i-p>=r?1:o.Z[s](i-p,0,1,r))}:function(t){var n,i=((null===(n=t.shape.scene)||void 0===n?void 0:n.currentTime)||0)%r;return e(t,i<=r?o.Z[s](i,0,1,r):1)}}function c(t,e,n){var r=t.r+n*(e.r-t.r),i=t.g+n*(e.g-t.g),o=t.b+n*(e.b-t.b),a=t.alpha+n*(e.alpha-t.alpha);return"rgba("+Math.floor(r)+","+Math.floor(i)+","+Math.floor(o)+","+a+")"}function u(t,e,n){return"hsla("+(t.h+n*(e.h-t.h))+","+(t.s+n*(e.s-t.s))+"%,"+(t.l+n*(e.l-t.l))+"%,"+(t.alpha+n*(e.alpha-t.alpha))+")"}const f=s},3448:(t,e,n)=>{"use strict";n.d(e,{Z:()=>v});var r,i=n(817),o=n(4426),a=n(7131),s=n(9277),p=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(){return(c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=this.tick_time)return this.calculateFPS(1/(n/1e3)),this.last_tick=e,this.current_time=(e-n%this.tick_time)%this.sequence.duration,this.current_frame=this.getFrameAtTime(this.current_time),this.dispatch("timeline:progress",{current_frame:this.current_frame,current_time:this.current_time,fps:this.fps}),!0}return!1},e.prototype.calculateFPS=function(t){var e=this.fps_samples.length;if(e>0){for(var n=0,r=0;r=1?a:a*o.ratio,p=o.ratio>=1?a/o.ratio:a;e.resize(s,p),o.setScene(e)}return o.draw_id=null,o.redraw_id=null,o.animation_id=null,o.draw=o.draw.bind(o),o.animate=o.animate.bind(o),o.startAnimation=o.startAnimation.bind(o),o}return h(e,t),e.prototype.setScene=function(t){this.scene=t},e.prototype.getScene=function(){return this.scene},e.prototype.getTimeline=function(){return this.timeline},e.prototype.resize=function(t,e,n){var r=this;n=n||this.ratio||t/e;var o=Math.max(t,e);t=n>=1?o:o*n,e=n>=1?o/n:o,this.ratio=n,this.scene&&(this.scene.resize(t,e),i.Z.walk((function(t){if(t.data){if(t.data.props){var e=t.data.props;Object.keys(e).forEach((function(n){f.Z.setProp(t,n,e[n],r.scene)}))}if(t.data.style){var n=t.data.style;Object.keys(n).forEach((function(e){f.Z.setDrawerProp(t,e,n[e],r.scene)}))}}}),this.scene))},e.prototype.setRatio=function(t){this.scene&&this.resize(this.scene.width,this.scene.height,t)},e.prototype.getRatio=function(){return this.ratio},e.prototype.setOption=function(t,e){if("object"==typeof t)for(var n=Object.keys(t),r=0,i=n.length;r{"use strict";n.d(e,{Z:()=>u});var r=n(3448);const i=function(){function t(){this.frames={}}return t.prototype.exist=function(t){return void 0!==this.frames[t]},t.prototype.get=function(t){return this.exist(t)?this.frames[t]:null},t.prototype.count=function(){return Object.keys(this.frames).length},t.prototype.push=function(t,e){this.frames[t]=e.getImageData(0,0,e.canvas.width,e.canvas.height)},t.prototype.flush=function(){this.frames={}},t.prototype.getStoredFrames=function(){return Object.keys(this.frames).map((function(t){return+t}))},t}();var o,a=n(9277),s=n(212),p=(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(){return(c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=this.timeline.getFramesCount()&&this.dispatch("drawer-canvas:buffer_loaded"))),n},e.prototype.redraw=function(){this.timeline.bSequenceStarted()?this.drawerOptions.clear||void 0!==typeof this.drawerOptions.ghosts&&0!==this.drawerOptions.ghosts||(this.stopAnimation(),this.redraw_id&&cancelAnimationFrame(this.redraw_id),this.redraw_id=requestAnimationFrame(this.startAnimation)):(this.draw_id&&cancelAnimationFrame(this.draw_id),!this.drawerOptions.clear&&(void 0===typeof this.drawerOptions.ghosts||0===this.drawerOptions.ghosts)&&this.timeline.stop(),this.draw_id=requestAnimationFrame(this.draw))},e.prototype.applyDraw=function(t){var n,i,o=(0,a.zO)(),s=this.scene,p=this.context;p.globalCompositeOperation="source-over";var c=null!==(n=t.time)&&void 0!==n?n:0,u=null!==(i=t.simmetricLines)&&void 0!==i?i:0,f=t.clear,l=t.noBackground,h=t.backgroundImage,d=void 0!==t.ghosts&&t.ghosts>0&&void 0!==t.ghostIndex&&t.ghostIndex>0,v=d?1-t.ghostIndex/(t.ghosts+.5):0,y=!0===t.ghostAlpha,m=s.width,g=s.height,_=m/g;if(f){if(l)p.clearRect(0,0,m,g);else if(p.fillStyle=s.background,p.fillRect(0,0,m,g),h){var b=h instanceof SVGImageElement?h.width.baseVal.value:h.width,w=h instanceof SVGImageElement?h.height.baseVal.value:h.height,x=b/w,S=0,O=0,M=m,P=g;x!==_&&("contain"===t.backgroundImageFit?(M=_>x?b*g/w:m,P=_>x?g:w*m/b):(M=_0&&e.drawSimmetricLines(p,u,m,g,s.color)}var Z=!1,C=!1;return s.currentTime=c,s.getChildren().forEach((function(t){t.data&&(!1===t.data.visible||d&&!0===t.data.disableGhost)||(t.generate(c,!0),p.save(),t.stream((function(t){var e=t.currentIndexing,n=e.shape,i={canvasContext:p,shape:n,repetition:{type:e.repetition.type,angle:e.repetition.angle,index:e.repetition.index,count:e.repetition.count,offset:e.repetition.offset,row:{index:e.repetition.row.index,count:e.repetition.row.count,offset:e.repetition.row.offset},col:{index:e.repetition.col.index,count:e.repetition.col.count,offset:e.repetition.col.offset}},parent:e.parent},o=r.Z.getStreamDrawerProp(n,"composite",i,"source-over");p.globalCompositeOperation=o,p.beginPath(),p.moveTo(t.buffer[t.frameBufferIndex],t.buffer[t.frameBufferIndex+1]);for(var a=2;a{"use strict";n.d(e,{Z:()=>r});const r=function(){function t(){this.callbacks={}}return t.prototype.attach=function(t,e){t in this.callbacks||(this.callbacks[t]=[]),this.callbacks[t].push(e)},t.prototype.detach=function(t,e){if(t in this.callbacks){var n=this.callbacks[t].indexOf(e);n>=0&&this.callbacks[t].splice(n,1)}},t.prototype.dispatch=function(t,e){if(t in this.callbacks)for(var n=0,r=this.callbacks[t].length;n{"use strict";n.d(e,{Z:()=>o});var r=n(1590),i=n(6669);const o={repetitions:{animable:!0,name:"repetitions",label:"Repetitions",type:"range",min:1,max:200,step:1,default:1,default_animate:20,canBArray:!0,transformation:"none",dataType:"props",type_value:"int"},distance:{animable:!0,name:"distance",label:"Distance",type:"range",min:-100,max:100,step:.1,default:0,canBArray:!0,default_animate:25,transformation:"scene-size-percentage",dataType:"props"},displace:{animable:!0,name:"displace",label:"Displace",type:"range",min:-360,max:360,step:1,default:0,default_animate:360,transformation:"angle",dataType:"props"},squeezeX:{animable:!0,name:"squeezeX",label:"SqueezeX",type:"range",min:-.2,max:.2,step:.01,default:0,default_animate:.1,transformation:"scene-size-percentage-inverse",dataType:"props"},squeezeY:{animable:!0,name:"squeezeY",label:"SqueezeY",type:"range",min:-.2,max:.2,step:.01,default:0,default_animate:.1,transformation:"scene-size-percentage-inverse",dataType:"props"},rotateX:{animable:!0,name:"rotateX",label:"RotateX",type:"range",min:-360,max:360,step:1,default:0,default_animate:360,transformation:"angle",dataType:"props"},rotateY:{animable:!0,name:"rotateY",label:"RotateY",type:"range",min:-360,max:360,step:1,default:0,default_animate:360,transformation:"angle",dataType:"props"},rotateZ:{animable:!0,name:"rotateZ",label:"RotateZ",type:"range",min:-360,max:360,step:1,default:0,default_animate:360,transformation:"angle",dataType:"props"},skewX:{animable:!0,name:"skewX",label:"SkewX",type:"range",min:-90,max:90,step:1,default:0,default_animate:1,transformation:"angle",dataType:"props"},skewY:{animable:!0,name:"skewY",label:"SkewY",type:"range",min:-90,max:90,step:1,default:0,default_animate:1,transformation:"angle",dataType:"props"},translate:{animable:!0,name:"translate",label:"Translate",type:"multiple-range",min:-100,max:100,step:.1,default:0,default_animate:0,initialArray:!0,transformation:"scene-size-percentage",dataType:"props"},scale:{animable:!0,name:"scale",label:"Scale",type:"multiple-range",min:-5,max:5,step:.01,default:1,default_animate:3,transformation:"none",dataType:"props"},transformOrigin:{animable:!0,name:"transformOrigin",label:"Transform Origin",type:"multiple-range",min:-1,max:1,step:.01,default:[0,0],default_animate:[-1,1],initialArray:!0,transformation:"none",dataType:"props"},perspective:{animable:!0,name:"perspective",label:"Perspective",type:"range",min:0,max:1,step:.01,default:0,default_animate:.8,transformation:"none",dataType:"props"},perspectiveOrigin:{animable:!0,name:"perspectiveOrigin",label:"Perspective Origin",type:"multiple-range",min:-1,max:1,step:.01,default:[0,0],default_animate:[-1,1],initialArray:!0,transformation:"none",dataType:"props"},fill:{animable:!0,name:"fill",label:"Fill",type:"color",default:"#000",default_animate:"#fff",transformation:"none",dataType:"drawer"},stroke:{animable:!0,name:"stroke",label:"Stroke",type:"color",default:"#fff",default_animate:"#000",transformation:"none",dataType:"drawer"},lineWidth:{animable:!0,name:"lineWidth",label:"Stroke weight",type:"slider",min:0,max:30,step:.01,default:.1,default_animate:3,transformation:"scene-size-percentage",dataType:"drawer"},bClosed:{name:"bClosed",label:"Closed",type:"checkbox",default:void 0,transformation:"none",dataType:"settings"},bUseParent:{name:"bUseParent",label:"Use parent repetition",type:"checkbox",default:!1,transformation:"none",dataType:"settings"},bUseRecursion:{name:"bUseRecursion",label:"Use recursion repetition",type:"checkbox",default:!1,transformation:"none",dataType:"settings"},vertexCallback:{name:"vertexCallback",label:"vertexCallback",type:"function",default:void 0,transformation:"none",dataType:"settings"},adaptMode:{name:"adaptMode",label:"Adapt",type:"radio",options:[{key:"None",value:i._.None},{key:"Scale",value:i._.Scale},{key:"Center",value:i._.Center},{key:"Fill",value:i._.Fill}],default:void 0,transformation:"none",dataType:"settings"},recursions:{animable:!0,name:"recursion",label:"Recursion",type:"range",min:1,max:8,step:1,default:1,default_animate:2,transformation:"none",dataType:"props",type_value:"int"},recursionScale:{animable:!0,name:"recursionScale",label:"Recursion Scale",type:"range",min:.1,max:5,step:.01,default:1,default_animate:2,transformation:"none",dataType:"props"},recursionVertex:{animable:!0,name:"recursionVertex",label:"Recursion Vertex",type:"range",min:1,max:100,step:1,default:10,default_animate:20,transformation:"none",dataType:"props",type_value:"int"},sideLength:{animable:!0,name:"sideLength",label:"Side Length",type:"multiple-range",min:.01,max:100,step:.1,default:10,default_animate:20,transformation:"scene-size-percentage",dataType:"props"},sideNumber:{animable:!0,name:"sideNumber",label:"Side Number",type:"range",min:1,max:20,step:1,default:5,default_animate:2,transformation:"none",dataType:"props"},n:{animable:!0,name:"n",label:"n",type:"range",min:1,max:10,step:1,default:1,default_animate:3,transformation:"none",dataType:"props"},d:{animable:!0,name:"d",label:"d",type:"range",min:1,max:10,step:1,default:2,default_animate:4,transformation:"none",dataType:"props"},wx:{animable:!0,name:"wx",label:"wx",type:"range",min:1,max:10,step:1,default:1,default_animate:3,transformation:"none",dataType:"props"},wy:{animable:!0,name:"wy",label:"wy",type:"range",min:1,max:10,step:1,default:2,default_animate:4,transformation:"none",dataType:"props"},wz:{animable:!0,name:"wz",label:"wz",type:"range",min:-360,max:360,step:1,default:0,default_animate:360,transformation:"angle",dataType:"props"},twists:{animable:!0,name:"twists",label:"Twists",type:"range",min:1,max:60,step:.1,default:1,default_animate:3,transformation:"none",dataType:"props"},twistsStart:{animable:!0,name:"twists_start",label:"Twists start",type:"range",min:0,max:60,step:.1,default:0,default_animate:1,transformation:"none",dataType:"props"},spiral:{name:"spiral",label:"Spiral type",type:"select",options:[{key:"ARCHIMEDE",value:r.Z.types.ARCHIMEDE},{key:"FERMAT",value:r.Z.types.FERMAT},{key:"HYPERBOLIC",value:r.Z.types.HYPERBOLIC},{key:"LITUUS",value:r.Z.types.LITUUS},{key:"LOGARITHMIC",value:r.Z.types.LOGARITHMIC}],default:r.Z.types.ARCHIMEDE,transformation:"none",dataType:"props"},a:{animable:!0,name:"a",label:"A",type:"range",min:-5,max:5,step:.1,default:1,default_animate:.1,transformation:"none",dataType:"props"},b:{animable:!0,name:"b",label:"B",type:"range",min:-5,max:5,step:.1,default:1,default_animate:.1,transformation:"none",dataType:"props"},m:{animable:!0,name:"m",label:"m",type:"range",min:1,max:20,step:1,default:1,default_animate:6,transformation:"none",dataType:"props",type_value:"int"},n1:{animable:!0,name:"n1",label:"n1",type:"range",min:-3,max:3,step:.01,default:1,default_animate:.1,transformation:"none",dataType:"props"},n2:{animable:!0,name:"n2",label:"n2",type:"range",min:-3,max:3,step:.01,default:1,default_animate:.1,transformation:"none",dataType:"props"},n3:{animable:!0,name:"n3",label:"n3",type:"range",min:-3,max:3,step:.01,default:1,default_animate:.1,transformation:"none",dataType:"props"},"loop.start":{name:"loop.start",label:"start",type:"range",default:void 0,min:0,max:100,step:.01,transformation:"none",dataType:"props"},"loop.end":{name:"loop.end",label:"end",type:"range",default:void 0,min:0,max:100,step:.01,transformation:"none",dataType:"props"},"loop.inc":{name:"loop.inc",label:"inc",type:"range",default:void 0,min:.01,max:100,step:.01,transformation:"none",dataType:"props"}}},464:(t,e,n)=>{"use strict";n.d(e,{Z:()=>I});var r=n(3639),i=n(9213),o=n(1010),a=n(4068),s=n(178),p=n(2868),c=n(9668),u=n(5589),f=n(1590),l=n(6863),h=n(6817),d=n(8227),v=n(1029),y=n(6591),m=n(1315),g=n(3969),_=n(817),b=n(5631),w=n(5282),x=n(9465),S=n(9277),O=n(1118);const M=function(){function t(){}return t.bValueLoop=function(t){return"object"==typeof t&&"start"in t&&"end"in t&&"inc"in t&&"vertex"in t&&t.vertex.raw&&t.vertex.raw.length>0},t.bValueVertexCallback=function(t){return t&&t.raw&&t.raw.length>0},t.composeVertexCallback=function(e){if(e&&e.raw)return new Function("vertex","vertexRepetition",t.RAW_ARGUMENTS,"return "+e.raw)},t.composeLoop=function(e){var n=e.vertex.raw?new Function("shapeLoopRepetition",t.RAW_ARGUMENTS,"return "+e.vertex.raw):void 0;return{start:e.start,end:e.end,inc:e.inc,vertex:n}},t.bValueAnimation=function(t){return t&&"object"==typeof t&&t.type&&("simple"===t.type||"raw"===t.type)},t.bValueTransformable=function(t){return null!==t&&"object"==typeof t&&"string"==typeof t.type&&"transformable-prop"===t.type},t.bPropInSceneChildUtilitiesData=function(t){return void 0!==O.Z[t]&&"none"!==O.Z[t].transformation},t.getTransformedValue=function(e,n,r){var i=O.Z[n];if(t.bPropInSceneChildUtilitiesData(n)&&t.bValueTransformable(r)){r=r.value;var o="distance"===n?e.height:e.width,a="distance"===n?e.width:e.height;switch(i.transformation){case"angle":return Array.isArray(r)?[(0,S.Yr)(r[0]),(0,S.Yr)(r[1])]:(0,S.Yr)(r);case"scene-size-percentage":if(void 0!==e)return Array.isArray(r)?[r[0]*o/100,r[1]*a/100]:r*(e.center[0]+e.center[1])/100;break;case"scene-size-percentage-inverse":if(void 0!==e)return Array.isArray(r)?[100*r[0]/o,100*r[1]/a]:100*r/(e.center[0]+e.center[1])}}return r},t.getTransformedValueInverse=function(e,n,r){var i=O.Z[n];if(t.bPropInSceneChildUtilitiesData(n)&&t.bValueTransformable(r)){r=r.value;var o="distance"===n?e.height:e.width,a="distance"===n?e.width:e.height;switch(i.transformation){case"angle":return Array.isArray(r)?[(0,S.Ux)(r[0]),(0,S.Ux)(r[1])]:(0,S.Ux)(r);case"scene-size-percentage":if(void 0!==e)return Array.isArray(r)?[100*r[0]/o,100*r[1]/a]:100*r/(e.center[0]+e.center[1]);break;case"scene-size-percentage-inverse":if(void 0!==e)return Array.isArray(r)?[r[0]*o/100,r[1]*a/100]:r*(e.center[0]+e.center[1])/100}}return r},t.RAW_ARGUMENTS="{ repetition, recursion, shape }",t.RAW_ARGUMENTS_WITH_PARENT="{ repetition, recursion, shape, parent }",t}();var P=n(522),Z=function(){return(Z=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0?e[0]:null},t.prototype.getParent=function(t){var e=this.getParents(t);return e.length>0?e[e.length-1]:null},t.prototype.getParents=function(t){return t&&t.scene?t.scene.getParentsOfSceneChild(t):[]},t.prototype.getChildren=function(t){return t instanceof b.Z?t.getChildren():t instanceof d.Z&&t.shape?[t.shape]:[]},t.prototype.getChildrenPrimitives=function(t){for(var e=[],n=this.getChildren(t),r=0,i=n.length;r=0){var a=function(){for(var t=0,e=0,n=arguments.length;e=0)&&a.push("propArguments"):a.indexOf("propArguments")>=0&&a.splice(a.indexOf("propArguments",1)),t.loopDependencies=a}}},t.prototype.setDrawerProp=function(t,e,n,r){if(this.isAPrimitive(t)){if(void 0===t.data?t.data={style:{}}:void 0===t.data.style&&(t.data.style={}),M.bValueAnimation(n))return t.data.style[e]=n,void(t.style[e]=C(r,e,n));if(M.bPropInSceneChildUtilitiesData(e)&&M.bValueTransformable(n))return t.data.style[e]=n,void(t.style[e]=M.getTransformedValue(r,e,n));t.style[e]=n,delete t.data.style[e]}},t.prototype.setSetting=function(t,e,n,r){if(t.clearBuffer(!0,!0),"vertexCallback"!==e)switch(e){case"bUseParent":t instanceof w.Z&&(t.bUseParent=n);break;case"bUseRecursion":t instanceof w.Z&&(t.bUseRecursion=n);break;case"bClosed":t instanceof y.Z&&t.setClosed(n);break;case"adaptMode":t instanceof y.Z&&t.adapt(n);break;default:void 0!==t[e]&&(t[e]=n)}else t instanceof w.Z&&M.bValueVertexCallback(n)&&(t.data.vertexCallback=n,t.vertexCallback=M.composeVertexCallback(n))},t}())},9685:(t,e,n)=>{"use strict";n.d(e,{WT:()=>r,ZR:()=>i});var r="undefined"!=typeof Float32Array?Float32Array:Array;function i(t){r=t}Math.random,Math.PI,Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)})},1437:(t,e,n)=>{"use strict";n.d(e,{al:()=>o,TE:()=>a});var r,i=n(9685);function o(t,e){var n=new i.WT(2);return n[0]=t,n[1]=e,n}function a(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.hypot(n,r)}r=new i.WT(2),i.WT!=Float32Array&&(r[0]=0,r[1]=0)},21:(t,e,n)=>{var r;!function(){"use strict";var i=.5*(Math.sqrt(3)-1),o=(3-Math.sqrt(3))/6,a=1/6,s=(Math.sqrt(5)-1)/4,p=(5-Math.sqrt(5))/20;function c(t){var e;e="function"==typeof t?t:t?function(){var t=0,e=0,n=0,r=1,i=f();t=i(" "),e=i(" "),n=i(" ");for(var o=0;o>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)}}c.prototype={grad3:new Float32Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0,1,0,1,-1,0,1,1,0,-1,-1,0,-1,0,1,1,0,-1,1,0,1,-1,0,-1,-1]),grad4:new Float32Array([0,1,1,1,0,1,1,-1,0,1,-1,1,0,1,-1,-1,0,-1,1,1,0,-1,1,-1,0,-1,-1,1,0,-1,-1,-1,1,0,1,1,1,0,1,-1,1,0,-1,1,1,0,-1,-1,-1,0,1,1,-1,0,1,-1,-1,0,-1,1,-1,0,-1,-1,1,1,0,1,1,1,0,-1,1,-1,0,1,1,-1,0,-1,-1,1,0,1,-1,1,0,-1,-1,-1,0,1,-1,-1,0,-1,1,1,1,0,1,1,-1,0,1,-1,1,0,1,-1,-1,0,-1,1,1,0,-1,1,-1,0,-1,-1,1,0,-1,-1,-1,0]),noise2D:function(t,e){var n,r,a=this.permMod12,s=this.perm,p=this.grad3,c=0,u=0,f=0,l=(t+e)*i,h=Math.floor(t+l),d=Math.floor(e+l),v=(h+d)*o,y=t-(h-v),m=e-(d-v);y>m?(n=1,r=0):(n=0,r=1);var g=y-n+o,_=m-r+o,b=y-1+2*o,w=m-1+2*o,x=255&h,S=255&d,O=.5-y*y-m*m;if(O>=0){var M=3*a[x+s[S]];c=(O*=O)*O*(p[M]*y+p[M+1]*m)}var P=.5-g*g-_*_;if(P>=0){var Z=3*a[x+n+s[S+r]];u=(P*=P)*P*(p[Z]*g+p[Z+1]*_)}var C=.5-b*b-w*w;if(C>=0){var I=3*a[x+1+s[S+1]];f=(C*=C)*C*(p[I]*b+p[I+1]*w)}return 70*(c+u+f)},noise3D:function(t,e,n){var r,i,o,s,p,c,u,f,l,h,d=this.permMod12,v=this.perm,y=this.grad3,m=.3333333333333333*(t+e+n),g=Math.floor(t+m),_=Math.floor(e+m),b=Math.floor(n+m),w=(g+_+b)*a,x=t-(g-w),S=e-(_-w),O=n-(b-w);x>=S?S>=O?(p=1,c=0,u=0,f=1,l=1,h=0):x>=O?(p=1,c=0,u=0,f=1,l=0,h=1):(p=0,c=0,u=1,f=1,l=0,h=1):SB?R++:E++,T>k?R++:F++,T>L?R++:D++,B>k?E++:F++,B>L?E++:D++,k>L?F++:D++;var q=T-(f=R>=3?1:0)+p,j=B-(l=E>=3?1:0)+p,U=k-(h=F>=3?1:0)+p,z=L-(d=D>=3?1:0)+p,V=T-(v=R>=2?1:0)+2*p,Y=B-(y=E>=2?1:0)+2*p,N=k-(m=F>=2?1:0)+2*p,W=L-(g=D>=2?1:0)+2*p,G=T-(_=R>=1?1:0)+3*p,H=B-(b=E>=1?1:0)+3*p,X=k-(w=F>=1?1:0)+3*p,K=L-(x=D>=1?1:0)+3*p,$=T-1+4*p,J=B-1+4*p,Q=k-1+4*p,tt=L-1+4*p,et=255&P,nt=255&Z,rt=255&C,it=255&I,ot=.6-T*T-B*B-k*k-L*L;if(ot<0)i=0;else{var at=S[et+S[nt+S[rt+S[it]]]]%32*4;i=(ot*=ot)*ot*(O[at]*T+O[at+1]*B+O[at+2]*k+O[at+3]*L)}var st=.6-q*q-j*j-U*U-z*z;if(st<0)o=0;else{var pt=S[et+f+S[nt+l+S[rt+h+S[it+d]]]]%32*4;o=(st*=st)*st*(O[pt]*q+O[pt+1]*j+O[pt+2]*U+O[pt+3]*z)}var ct=.6-V*V-Y*Y-N*N-W*W;if(ct<0)a=0;else{var ut=S[et+v+S[nt+y+S[rt+m+S[it+g]]]]%32*4;a=(ct*=ct)*ct*(O[ut]*V+O[ut+1]*Y+O[ut+2]*N+O[ut+3]*W)}var ft=.6-G*G-H*H-X*X-K*K;if(ft<0)c=0;else{var lt=S[et+_+S[nt+b+S[rt+w+S[it+x]]]]%32*4;c=(ft*=ft)*ft*(O[lt]*G+O[lt+1]*H+O[lt+2]*X+O[lt+3]*K)}var ht=.6-$*$-J*J-Q*Q-tt*tt;if(ht<0)u=0;else{var dt=S[et+1+S[nt+1+S[rt+1+S[it+1]]]]%32*4;u=(ht*=ht)*ht*(O[dt]*$+O[dt+1]*J+O[dt+2]*Q+O[dt+3]*tt)}return 27*(i+o+a+c+u)}},c._buildPermutationTable=u,void 0===(r=function(){return c}.call(e,n,e,t))||(t.exports=r),e.SimplexNoise=c,t.exports=c}()},3639:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),i=new Uint8Array(16);function o(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,s=function(t){return"string"==typeof t&&a.test(t)};for(var p=[],c=0;c<256;++c)p.push((c+256).toString(16).substr(1));var u,f,l=0,h=0;const d=function(t,e,n){var r=e&&n||0,i=e||new Array(16),a=(t=t||{}).node||u,c=void 0!==t.clockseq?t.clockseq:f;if(null==a||null==c){var d=t.random||(t.rng||o)();null==a&&(a=u=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==c&&(c=f=16383&(d[6]<<8|d[7]))}var v=void 0!==t.msecs?t.msecs:Date.now(),y=void 0!==t.nsecs?t.nsecs:h+1,m=v-l+(y-h)/1e4;if(m<0&&void 0===t.clockseq&&(c=c+1&16383),(m<0||v>l)&&void 0===t.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=v,h=y,f=c;var g=(1e4*(268435455&(v+=122192928e5))+y)%4294967296;i[r++]=g>>>24&255,i[r++]=g>>>16&255,i[r++]=g>>>8&255,i[r++]=255&g;var _=v/4294967296*1e4&268435455;i[r++]=_>>>8&255,i[r++]=255&_,i[r++]=_>>>24&15|16,i[r++]=_>>>16&255,i[r++]=c>>>8|128,i[r++]=255&c;for(var b=0;b<6;++b)i[r+b]=a[b];return e||function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(p[t[e+0]]+p[t[e+1]]+p[t[e+2]]+p[t[e+3]]+"-"+p[t[e+4]]+p[t[e+5]]+"-"+p[t[e+6]]+p[t[e+7]]+"-"+p[t[e+8]]+p[t[e+9]]+"-"+p[t[e+10]]+p[t[e+11]]+p[t[e+12]]+p[t[e+13]]+p[t[e+14]]+p[t[e+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n}(i)}}},__webpack_module_cache__={};function __webpack_require__(t){if(__webpack_module_cache__[t])return __webpack_module_cache__[t].exports;var e=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](e,e.exports,__webpack_require__),e.exports}return __webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var n in e)__webpack_require__.o(e,n)&&!__webpack_require__.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__(522)})()})); \ No newline at end of file diff --git a/build/urpflanze.js b/build/urpflanze.js index 14be4d7..c95039c 100644 --- a/build/urpflanze.js +++ b/build/urpflanze.js @@ -4886,9 +4886,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ "author": () => /* binding */ author, /* harmony export */ "license": () => /* binding */ license /* harmony export */ }); -var version = '%VERSION%'; +var version = '0.3.3'; var author = 'Gennaro Bosone '; -var license = '%LICENSE%'; +var license = 'GPL-3.0-or-later'; //# sourceMappingURL=meta.js.map diff --git a/build/urpflanze.js.map b/build/urpflanze.js.map index 6364bb0..125a5d4 100644 --- a/build/urpflanze.js.map +++ b/build/urpflanze.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://Urpflanze/webpack/universalModuleDefinition","webpack://Urpflanze/./dist/Color.js","webpack://Urpflanze/./dist/Utilites.js","webpack://Urpflanze/./dist/core/Group.js","webpack://Urpflanze/./dist/core/Scene.js","webpack://Urpflanze/./dist/core/SceneChild.js","webpack://Urpflanze/./dist/core/math/Vec2.js","webpack://Urpflanze/./dist/core/math/bounding.js","webpack://Urpflanze/./dist/core/math/gl-matrix-extensions.js","webpack://Urpflanze/./dist/core/math/index.js","webpack://Urpflanze/./dist/core/shapes/Shape.js","webpack://Urpflanze/./dist/core/shapes/ShapeBase.js","webpack://Urpflanze/./dist/core/shapes/ShapeBuffer.js","webpack://Urpflanze/./dist/core/shapes/ShapeLoop.js","webpack://Urpflanze/./dist/core/shapes/ShapePrimitive.js","webpack://Urpflanze/./dist/core/shapes/ShapeRecursive.js","webpack://Urpflanze/./dist/core/shapes/primitives/Circle.js","webpack://Urpflanze/./dist/core/shapes/primitives/Line.js","webpack://Urpflanze/./dist/core/shapes/primitives/Lissajous.js","webpack://Urpflanze/./dist/core/shapes/primitives/Polygon.js","webpack://Urpflanze/./dist/core/shapes/primitives/Rect.js","webpack://Urpflanze/./dist/core/shapes/primitives/Rose.js","webpack://Urpflanze/./dist/core/shapes/primitives/Spiral.js","webpack://Urpflanze/./dist/core/shapes/primitives/SuperShape.js","webpack://Urpflanze/./dist/core/shapes/primitives/Triangle.js","webpack://Urpflanze/./dist/core/types/scene-child.js","webpack://Urpflanze/./dist/core/types/scene.js","webpack://Urpflanze/./dist/core/types/shape-base.js","webpack://Urpflanze/./dist/core/types/shape-primitives.js","webpack://Urpflanze/./dist/index-light.js","webpack://Urpflanze/./dist/index.js","webpack://Urpflanze/./dist/meta.js","webpack://Urpflanze/./dist/services/animation/Animation.js","webpack://Urpflanze/./dist/services/animation/Easings.js","webpack://Urpflanze/./dist/services/animation/Simple.js","webpack://Urpflanze/./dist/services/drawers/Drawer.js","webpack://Urpflanze/./dist/services/drawers/drawer-canvas/DrawerCanvas.js","webpack://Urpflanze/./dist/services/drawers/drawer-canvas/FrameBuffer.js","webpack://Urpflanze/./dist/services/drawers/drawer-svg/DrawerSVG.js","webpack://Urpflanze/./dist/services/events/Emitter.js","webpack://Urpflanze/./dist/services/exporters/GCODEExporter.js","webpack://Urpflanze/./dist/services/exporters/JSONExporter.js","webpack://Urpflanze/./dist/services/exporters/SVGExporter.js","webpack://Urpflanze/./dist/services/importers/JSONImporter.js","webpack://Urpflanze/./dist/services/importers/SVGImporter.js","webpack://Urpflanze/./dist/services/renderer/Capturer.js","webpack://Urpflanze/./dist/services/renderer/Renderer.js","webpack://Urpflanze/./dist/services/scene-utilities/SceneChildUtilitiesData.js","webpack://Urpflanze/./dist/services/scene-utilities/SceneUtilities.js","webpack://Urpflanze/./dist/services/scene-utilities/SceneUtilitiesExtended.js","webpack://Urpflanze/./dist/services/timeline/Timeline.js","webpack://Urpflanze/./node_modules/gl-matrix/esm/common.js","webpack://Urpflanze/./node_modules/gl-matrix/esm/mat4.js","webpack://Urpflanze/./node_modules/gl-matrix/esm/vec2.js","webpack://Urpflanze/./node_modules/gl-matrix/esm/vec3.js","webpack://Urpflanze/./node_modules/immediate/lib/browser.js","webpack://Urpflanze/./node_modules/jszip/lib/base64.js","webpack://Urpflanze/./node_modules/jszip/lib/compressedObject.js","webpack://Urpflanze/./node_modules/jszip/lib/compressions.js","webpack://Urpflanze/./node_modules/jszip/lib/crc32.js","webpack://Urpflanze/./node_modules/jszip/lib/defaults.js","webpack://Urpflanze/./node_modules/jszip/lib/external.js","webpack://Urpflanze/./node_modules/jszip/lib/flate.js","webpack://Urpflanze/./node_modules/jszip/lib/generate/ZipFileWorker.js","webpack://Urpflanze/./node_modules/jszip/lib/generate/index.js","webpack://Urpflanze/./node_modules/jszip/lib/index.js","webpack://Urpflanze/./node_modules/jszip/lib/load.js","webpack://Urpflanze/./node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js","webpack://Urpflanze/./node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js","webpack://Urpflanze/./node_modules/jszip/lib/nodejsUtils.js","webpack://Urpflanze/./node_modules/jszip/lib/object.js","webpack://Urpflanze/./node_modules/jszip/lib/readable-stream-browser.js","webpack://Urpflanze/./node_modules/jszip/lib/reader/ArrayReader.js","webpack://Urpflanze/./node_modules/jszip/lib/reader/DataReader.js","webpack://Urpflanze/./node_modules/jszip/lib/reader/NodeBufferReader.js","webpack://Urpflanze/./node_modules/jszip/lib/reader/StringReader.js","webpack://Urpflanze/./node_modules/jszip/lib/reader/Uint8ArrayReader.js","webpack://Urpflanze/./node_modules/jszip/lib/reader/readerFor.js","webpack://Urpflanze/./node_modules/jszip/lib/signature.js","webpack://Urpflanze/./node_modules/jszip/lib/stream/ConvertWorker.js","webpack://Urpflanze/./node_modules/jszip/lib/stream/Crc32Probe.js","webpack://Urpflanze/./node_modules/jszip/lib/stream/DataLengthProbe.js","webpack://Urpflanze/./node_modules/jszip/lib/stream/DataWorker.js","webpack://Urpflanze/./node_modules/jszip/lib/stream/GenericWorker.js","webpack://Urpflanze/./node_modules/jszip/lib/stream/StreamHelper.js","webpack://Urpflanze/./node_modules/jszip/lib/support.js","webpack://Urpflanze/./node_modules/jszip/lib/utf8.js","webpack://Urpflanze/./node_modules/jszip/lib/utils.js","webpack://Urpflanze/./node_modules/jszip/lib/zipEntries.js","webpack://Urpflanze/./node_modules/jszip/lib/zipEntry.js","webpack://Urpflanze/./node_modules/jszip/lib/zipObject.js","webpack://Urpflanze/./node_modules/lie/lib/browser.js","webpack://Urpflanze/./node_modules/pako/index.js","webpack://Urpflanze/./node_modules/pako/lib/deflate.js","webpack://Urpflanze/./node_modules/pako/lib/inflate.js","webpack://Urpflanze/./node_modules/pako/lib/utils/common.js","webpack://Urpflanze/./node_modules/pako/lib/utils/strings.js","webpack://Urpflanze/./node_modules/pako/lib/zlib/adler32.js","webpack://Urpflanze/./node_modules/pako/lib/zlib/constants.js","webpack://Urpflanze/./node_modules/pako/lib/zlib/crc32.js","webpack://Urpflanze/./node_modules/pako/lib/zlib/deflate.js","webpack://Urpflanze/./node_modules/pako/lib/zlib/gzheader.js","webpack://Urpflanze/./node_modules/pako/lib/zlib/inffast.js","webpack://Urpflanze/./node_modules/pako/lib/zlib/inflate.js","webpack://Urpflanze/./node_modules/pako/lib/zlib/inftrees.js","webpack://Urpflanze/./node_modules/pako/lib/zlib/messages.js","webpack://Urpflanze/./node_modules/pako/lib/zlib/trees.js","webpack://Urpflanze/./node_modules/pako/lib/zlib/zstream.js","webpack://Urpflanze/./node_modules/set-immediate-shim/index.js","webpack://Urpflanze/./node_modules/simplex-noise/simplex-noise.js","webpack://Urpflanze/./node_modules/simplify-js/simplify.js","webpack://Urpflanze/./node_modules/svgpath/index.js","webpack://Urpflanze/./node_modules/svgpath/lib/a2c.js","webpack://Urpflanze/./node_modules/svgpath/lib/ellipse.js","webpack://Urpflanze/./node_modules/svgpath/lib/matrix.js","webpack://Urpflanze/./node_modules/svgpath/lib/path_parse.js","webpack://Urpflanze/./node_modules/svgpath/lib/svgpath.js","webpack://Urpflanze/./node_modules/svgpath/lib/transform_parse.js","webpack://Urpflanze/./node_modules/transformation-matrix/src/applyToPoint.js","webpack://Urpflanze/./node_modules/transformation-matrix/src/fromDefinition.js","webpack://Urpflanze/./node_modules/transformation-matrix/src/fromObject.js","webpack://Urpflanze/./node_modules/transformation-matrix/src/fromString.js","webpack://Urpflanze/./node_modules/transformation-matrix/src/fromTransformAttribute.autogenerated.js","webpack://Urpflanze/./node_modules/transformation-matrix/src/fromTransformAttribute.js","webpack://Urpflanze/./node_modules/transformation-matrix/src/fromTriangles.js","webpack://Urpflanze/./node_modules/transformation-matrix/src/identity.js","webpack://Urpflanze/./node_modules/transformation-matrix/src/index.js","webpack://Urpflanze/./node_modules/transformation-matrix/src/inverse.js","webpack://Urpflanze/./node_modules/transformation-matrix/src/isAffineMatrix.js","webpack://Urpflanze/./node_modules/transformation-matrix/src/rotate.js","webpack://Urpflanze/./node_modules/transformation-matrix/src/scale.js","webpack://Urpflanze/./node_modules/transformation-matrix/src/shear.js","webpack://Urpflanze/./node_modules/transformation-matrix/src/skew.js","webpack://Urpflanze/./node_modules/transformation-matrix/src/smoothMatrix.js","webpack://Urpflanze/./node_modules/transformation-matrix/src/toString.js","webpack://Urpflanze/./node_modules/transformation-matrix/src/transform.js","webpack://Urpflanze/./node_modules/transformation-matrix/src/translate.js","webpack://Urpflanze/./node_modules/transformation-matrix/src/utils.js","webpack://Urpflanze/./node_modules/uuid/dist/esm-browser/regex.js","webpack://Urpflanze/./node_modules/uuid/dist/esm-browser/rng.js","webpack://Urpflanze/./node_modules/uuid/dist/esm-browser/stringify.js","webpack://Urpflanze/./node_modules/uuid/dist/esm-browser/v1.js","webpack://Urpflanze/./node_modules/uuid/dist/esm-browser/validate.js","webpack://Urpflanze/ignored|stream","webpack://Urpflanze/webpack/bootstrap","webpack://Urpflanze/webpack/runtime/compat get default export","webpack://Urpflanze/webpack/runtime/define property getters","webpack://Urpflanze/webpack/runtime/global","webpack://Urpflanze/webpack/runtime/hasOwnProperty shorthand","webpack://Urpflanze/webpack/runtime/make namespace object","webpack://Urpflanze/webpack/startup"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;;;;;;;;;;;;ACVA;AACA;AACA,0CAA0C,IAAI;AAC9C;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,IAAI;AAC9C;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,6BAA6B,IAAI;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,yBAAyB;AACtC;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5KA,CAAyC;AAC+B;AACxE;AACiC;AACjC;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA,+BAA+B,iBAAiB,EAAE;AAClD,+BAA+B,iBAAiB,EAAE;AAClD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACO;AACP;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sDAAY;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP,0BAA0B,iBAAiB;AAC3C,uBAAuB,OAAO;AAC9B,uBAAuB,OAAO;AAC9B,uBAAuB,OAAO;AAC9B;AACA,2BAA2B,sDAAY;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,KAAK;AAChB,aAAa;AACb;AACO;AACP,sCAAsC,2BAA2B;AACjE,2BAA2B,2EAAsB;AACjD,2BAA2B,iDAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,KAAK;AAChB,aAAa;AACb;AACO;AACP,sCAAsC,2BAA2B;AACjE,2BAA2B,2EAAsB;AACjD,2BAA2B,iDAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,KAAK;AAChB,aAAa;AACb;AACO;AACP,sCAAsC,2BAA2B;AACjE,2BAA2B,2EAAsB;AACjD,2BAA2B,iDAAe;AAC1C;AACA;AACA,sBAAsB,iDAAe;AACrC,eAAe,+CAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,WAAW;AACzB,gBAAgB;AAChB;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,WAAW;AACzB,gBAAgB;AAChB;AACA;AACA;AACA;AACA,IAAI;AACJ,oC;;;;;;;;;;;;;;;;;;;;;;;ACtRA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AAC2B;AACU;AACK;AACJ;AACvC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB,aAAa;AAChD;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,mFAAmF,qBAAqB,EAAE;AAC1G;AACA,4BAA4B,8DAAwB;AACpD;AACA;AACA;AACA,2CAA2C,SAAS;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,0BAA0B,EAAE;AACxE;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,yBAAyB;AACxC;AACA;AACA;AACA,2CAA2C,2BAA2B;AACtE,+CAA+C,0EAA0E,EAAE;AAC3H;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,uBAAuB,yDAAc;AACrC;AACA,mDAAmD,2CAA2C,EAAE;AAChG,uDAAuD,SAAS;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA;AACA,uCAAuC,uBAAuB;AAC9D,6CAA6C,4BAA4B;AACzE,+CAA+C,+CAA+C,EAAE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;AACA,mDAAmD,kCAAkC,EAAE;AACvF;AACA;AACA,+CAA+C,iCAAiC,EAAE;AAClF;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA,+CAA+C,uCAAuC,EAAE;AACxF;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA,wDAAwD,kDAAkD,EAAE,0BAA0B,cAAc,EAAE;AACtJ;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,kCAAkC,yBAAyB,EAAE;AAC7D,kCAAkC,wBAAwB,EAAE;AAC5D,iEAAiE,mCAAmC,EAAE;AACtG;AACA;AACA;AACA,6DAA6D,SAAS;AACtE;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAsB;AACrC;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,yDAAyD,gCAAgC,EAAE,uBAAuB,wBAAwB,EAAE;AAC5I;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D;AACA;AACA;AACA,+CAA+C,8BAA8B,EAAE;AAC/E;AACA;AACA,CAAC,CAAC,gDAAU;AACZ,iEAAe,KAAK,EAAC;AACrB,iC;;;;;;;;;;;;;;;;;;;;;;ACnVA,CAAsC;AACV;AACO;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA,qDAAqD,4CAA4C,EAAE;AACnG;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D;AACA;AACA;AACA,qDAAqD,oCAAoC,EAAE;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC,eAAe,OAAO;AACtB;AACA;AACA;AACA,uBAAuB;AACvB,8CAA8C,6CAA6C;AAC3F,sCAAsC;AACtC;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,qBAAqB,EAAE;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,0BAA0B,EAAE;AACxE;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,iBAAiB;AACjB;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA,6DAA6D,2CAAK;AAClE;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,WAAW;AAC1B,eAAe,4BAA4B;AAC3C,iBAAiB;AACjB;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA,+BAA+B,gDAAU;AACzC;AACA;AACA,mCAAmC,kDAAK;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,2CAAK;AAChE;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,qBAAqB;AACpC;AACA;AACA;AACA,+BAA+B,gDAAU;AACzC;AACA;AACA,mCAAmC,kDAAK;AACxC;AACA;AACA;AACA,2DAA2D,2CAAK;AAChE;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA,kCAAkC,2CAAK;AACvC;AACA;AACA,aAAa;AACb;AACA,uCAAuC,kDAAK;AAC5C;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,KAAK,EAAC;AACrB,iC;;;;;;;;;;;;;;;;;;;ACxUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC,eAAe,yBAAyB;AACxC,eAAe,EAAE;AACjB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,CAAC;AACD,iEAAe,UAAU,EAAC;AAC1B,sC;;;;;;;;;;;;;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA,+BAA+B,6CAA6C,EAAE;AAC9E;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA,0BAA0B,kCAAkC,EAAE;AAC9D;AACA;AACA;AACA,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA,4BAA4B,mCAAmC,EAAE;AACjE;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,cAAc;AAC7B,gBAAgB;AAChB;AACA,8BAA8B,0CAA0C,EAAE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAe,IAAI,EAAC;AACpB,gC;;;;;;;;;;;;;;;;;;;ACnNA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,EAAE,EAAE;AACT;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,iEAAe,QAAQ,EAAC;AACxB,oC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5EA,CAAqC;AAC9B;AACA;AACA;AACA;AACP,yDAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,mCAAmC,mBAAmB;AACtD;AACA;AACA;AACA;AACA;AACA,gD;;;;;;;;;;;;;;;;;;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,8BAA8B,qCAAqC;AAC1E;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,iC;;;;;;;;;;;;;;;;;;;;;;AC7BA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACoC;AACG;AACV;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc,aAAa;AAC1C;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,sCAAsC,gDAAU;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,YAAY;AAC3B,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,SAAS;AACrE,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD,eAAe,mBAAmB;AAClC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,8DAAwB;AAClD;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,KAAK,EAAC;AACrB,iC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzOA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC6C;AAC6H;AACnI;AACc;AACrB;AACF;AACU;AACD;AACvC,gBAAgB,6CAAW;AAC3B,sBAAsB,6CAAW;AACjC,wBAAwB,6CAAW;AACnC,uBAAuB,6CAAW;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB,aAAa;AAChD;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC,eAAe,yBAAyB;AACxC,eAAe,EAAE;AACjB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,EAAE;AACjB,eAAe,QAAQ;AACvB;AACA;AACA;AACA,uCAAuC,uBAAuB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA,uCAAuC,uBAAuB;AAC9D,6CAA6C,4BAA4B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,yBAAyB;AACxC;AACA;AACA;AACA,2CAA2C,2BAA2B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,sEAAsB,GAAG,oEAAoB;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iDAAe;AAC1C;AACA;AACA;AACA,0CAA0C,2CAA2C;AACrF,8CAA8C,2CAA2C;AACzF;AACA;AACA,sDAAsD,oEAAoB,IAAI,sCAAG;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,8DAAW,yCAAyC,iEAAc;AACrG;AACA,gCAAgC,8DAAW,sCAAsC,gEAAa;AAC9F,oCAAoC,8DAAW,0CAA0C,iEAAc;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,gDAAK;AAC3C,4CAA4C,8DAAW,kDAAkD,iEAAc;AACvH,0CAA0C,8DAAW,gDAAgD,iEAAc;AACnH;AACA;AACA,6BAA6B,oEAAoB;AACjD,qCAAqC,iDAAe;AACpD,4BAA4B,8CAAY,iBAAiB,iEAAc;AACvE;AACA,6BAA6B,sEAAsB;AACnD,qCAAqC,iDAAe;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+CAAa;AACrC,4CAA4C,gDAAc;AAC1D;AACA,4BAA4B,gDAAc;AAC1C;AACA,4BAA4B,gEAAa;AACzC,4BAA4B,+CAAa;AACzC;AACA,yCAAyC,8CAAY;AACrD,yCAAyC,8CAAY;AACrD,yCAAyC,8CAAY;AACrD;AACA,4BAA4B,4CAAU;AACtC;AACA,4BAA4B,gDAAc,mCAAmC,4CAAU;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kDAAgB;AAC5C;AACA;AACA;AACA;AACA,wBAAwB,+CAAa;AACrC,wBAAwB,gDAAc;AACtC;AACA,4BAA4B,gDAAc;AAC1C;AACA,+CAA+C,oEAAoB;AACnE,4BAA4B,8CAAY;AACxC;AACA,oBAAoB,yDAAc;AAClC;AACA,6CAA6C,4BAA4B;AACzE;AACA;AACA;AACA,8CAA8C,wDAAa;AAC3D,8CAA8C,wDAAa;AAC3D;AACA,4BAA4B,oDAAkB;AAC9C;AACA;AACA,sDAAsD,0CAAQ;AAC9D,gCAAgC,oDAAkB;AAClD,gCAAgC,4CAAU;AAC1C,sDAAsD,0CAAQ;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oDAAkB;AAC9C;AACA;AACA;AACA;AACA,wBAAwB,uDAAY;AACpC;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAa;AACrB;AACA,yDAAyD,SAAS;AAClE;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE,GAAG;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA,mEAAmE,SAAS;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,gBAAgB,EAAE,GAAG;AACrB;AACA;AACA;AACA;AACA,kBAAkB,oEAAoB;AACtC,kBAAkB,gCAAgC;AAClD,kBAAkB,gCAAgC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA,KAAK,EAAE;AACP;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,4BAA4B,OAAO,oEAAoB,YAAY,0CAA0C,uFAAuF,GAAG;AACvP;AACA,CAAC,CAAC,gDAAU;AACZ,iEAAe,SAAS,EAAC;AACzB,qC;;;;;;;;;;;;;;;;;;;;;;AC3fA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACuC;AACM;AACiB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB,aAAa;AACjD;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,wFAAwF,6EAA8B;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA,uCAAuC,uBAAuB;AAC9D,6CAA6C,4BAA4B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,4EAA6B;AAC1E,cAAc,gEAA0B;AACxC;AACA;AACA,iDAAiD,SAAS;AAC1D;AACA;AACA,YAAY,uDAAY;AACxB;AACA,QAAQ,wDAAa;AACrB;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,+BAA+B,WAAW;AAC1C;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,oDAAc;AAChB,iEAAe,WAAW,EAAC;AAC3B,uC;;;;;;;;;;;;;;;;;;;;;;;;AClKA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC+D;AACvB;AACV;AACgB;AACV;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB,aAAa;AAC/C,eAAe,QAAQ;AACvB;AACA;AACA,kCAAkC,eAAe;AACjD,4CAA4C,4BAA4B;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sCAAG;AACxB,qBAAqB,sCAAG;AACxB,qCAAqC,eAAe,EAAE;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,2DAA2D,SAAS;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA,uCAAuC,uBAAuB;AAC9D,6CAA6C,4BAA4B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB,eAAe,EAAE;AACjB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA,qDAAqD;AACrD,sDAAsD,QAAQ;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,qEAA+B;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,4EAA6B;AACvE;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uDAAY;AAC5B;AACA;AACA;AACA,YAAY,wDAAa;AACzB;AACA;AACA;AACA;AACA;AACA,yBAAyB,gEAA0B;AACnD,YAAY,yDAAc;AAC1B,2BAA2B,kBAAkB;AAC7C;AACA;AACA,gBAAgB,uDAAY;AAC5B;AACA,YAAY,wDAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,+BAA+B,WAAW;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,oDAAc;AAChB,iEAAe,SAAS,EAAC;AACzB,qC;;;;;;;;;;;;;;;;;;;;;;;AC1QA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACmC;AAC6H;AAC5G;AACb;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB,aAAa;AACpD;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA,mDAAmD,yDAAc;AACjE;AACA;AACA;AACA;AACA;AACA,sBAAsB,8DAAW;AACjC;AACA,qFAAqF,4EAA6B;AAClH;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAAW;AAC1B;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,YAAY;AAC3B,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B,iBAAiB;AACjB;AACA;AACA;AACA;AACA,uBAAuB,yDAAc;AACrC;AACA,4CAA4C,SAAS;AACrD,YAAY,uDAAY;AACxB;AACA,QAAQ,wDAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA,qBAAqB,4EAA6B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,4EAA6B;AAClD;AACA;AACA,iCAAiC,8EAA+B;AAChE,iCAAiC,8EAA+B;AAChE,2CAA2C,SAAS;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,cAAc,EAAC;AAC9B,0C;;;;;;;;;;;;;;;;;;;;;AClNA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACwC;AACZ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB,aAAa;AACpD;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,yDAAc;AACjE;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA,uCAAuC,uBAAuB;AAC9D,6CAA6C,4BAA4B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,yBAAyB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,yBAAyB;AACxC;AACA;AACA;AACA,wCAAwC,wDAAkB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qDAAqD;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,6BAA6B;AACpD;AACA;AACA,YAAY,uDAAY;AACxB;AACA,sCAAsC,+BAA+B;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yIAAyI,6DAA6D;AACtM;AACA;AACA;AACA;AACA,4BAA4B,uEAAuE;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,SAAS;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA,oBAAoB,uDAAY;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,YAAY;AAC3B,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,gCAAgC;AACnH,gDAAgD;AAChD;AACA;AACA;AACA;AACA,4BAA4B,8DAA8D;AAC1F;AACA,+DAA+D,iBAAiB,wCAAwC;AACxH;AACA,sBAAsB,4DAAsB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF;AACjF;AACA,kBAAkB,EAAE;AACpB;AACA,+BAA+B,gBAAgB;AAC/C;AACA,mEAAmE,SAAS;AAC5E;AACA,+FAA+F,gCAAgC;AAC/H,4DAA4D;AAC5D;AACA;AACA;AACA;AACA,wCAAwC,wDAAwD;AAChG;AACA;AACA,2EAA2E,iBAAiB,wCAAwC;AACpI;AACA,kCAAkC,4DAAsB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE,GAAG;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gCAAgC;AACpD;AACA;AACA;AACA,CAAC,CAAC,2CAAK;AACP,iEAAe,cAAc,EAAC;AAC9B,0C;;;;;;;;;;;;;;;;;;;;;;AC/UA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACgC;AACI;AAC6B;AAClE;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB,aAAa;AAC9C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA,6BAA6B,4EAA6B;AAC1D;AACA;AACA;AACA,iBAAiB,sCAAG;AACpB;AACA;AACA,6EAA6E,oDAAc;AAC3F,aAAa;AACb,oDAAoD,mFAAmF,EAAE;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,MAAM,EAAC;AACtB,kC;;;;;;;;;;;;;;;;;;;;;ACrDA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACiE;AACzB;AACzC;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB,aAAa;AAC9C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,6BAA6B,4EAA6B;AAC1D;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,iDAAW;AACb,iEAAe,IAAI,EAAC;AACpB,gC;;;;;;;;;;;;;;;;;;;;;;AC1CA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACgC;AACI;AAC6B;AAClE;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB,aAAa;AAC/C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,6BAA6B,4EAA6B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,sCAAG;AACpB;AACA;AACA;AACA,uCAAuC,oDAAc;AACrD;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,SAAS,EAAC;AACzB,qC;;;;;;;;;;;;;;;;;;;;;;ACvEA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACoC;AAC6B;AACjC;AACjC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA,wFAAwF,4EAA6B;AACrH;AACA;AACA;AACA;AACA,iBAAiB,sCAAG;AACpB;AACA,uBAAuB,sCAAG;AAC1B,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,OAAO,EAAC;AACvB,mC;;;;;;;;;;;;;;;;;;;;;ACpDA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACiE;AACzB;AACzC;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB,aAAa;AAC9C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,6BAA6B,4EAA6B;AAC1D;AACA;AACA;AACA;AACA,CAAC,CAAC,iDAAW;AACb,iEAAe,IAAI,EAAC;AACpB,gC;;;;;;;;;;;;;;;;;;;;;;ACzCA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACoC;AAC6B;AACjC;AACjC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc,aAAa;AAC1C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA,wFAAwF,6EAA8B;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sCAAG;AAC1B,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,mBAAmB,sCAAG;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,IAAI,EAAC;AACpB,gC;;;;;;;;;;;;;;;;;;;;;;ACzFA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACoC;AAC6B;AACjC;AACjC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe,aAAa;AAC3C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA,wFAAwF,4EAA6B;AACrH;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,QAAQ,sCAAG,+CAA+C,EAAE;AACzG;AACA,uBAAuB,sCAAG;AAC1B;AACA,aAAa;AACb;AACA;AACA,0BAA0B,sCAAG;AAC7B;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oCAAoC;AACtD,kBAAkB,EAAE;AACpB;AACA;AACA;AACA,yCAAyC,eAAe;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA,yCAAyC,wBAAwB;AACjE;AACA,yCAAyC,iCAAiC;AAC1E;AACA,yCAAyC,8BAA8B;AACvE;AACA,yCAAyC,6CAA6C;AACtF;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,MAAM,EAAC;AACtB,kC;;;;;;;;;;;;;;;;;;;;;;AC9HA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACoC;AAC6B;AACjC;AACjC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB,aAAa;AAChD;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA,wFAAwF,6EAA8B;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,sCAAG;AACpB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,+CAAS;AACX,iEAAe,UAAU,EAAC;AAC1B,sC;;;;;;;;;;;;;;;;;;;;;AC/EA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACiE;AACzB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB,aAAa;AAC9C;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,6BAA6B,4EAA6B;AAC1D;AACA;AACA;AACA;AACA,CAAC,CAAC,iDAAW;AACb,iEAAe,QAAQ,EAAC;AACxB,oC;;;;;;;;;;;;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0CAA0C;AAC3C,uC;;;;;;;;;;;;;;;ACrBU;AACV,iC;;;;;;;;;;;;;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4DAA4D;AAC7D,sC;;;;;;;;;;;;;;;AC5BU;AACV,4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACDA;AACA;AACA;AACkD;AAClD;AACqC;AACrC,yDAA2B;AAC3B;AACA;AACA;AACgD;AACU;AACV;AAChD;AACyE;AACV;AACI;AACZ;AACkB;AACT;AACQ;AACR;AACM;AACF;AACJ;AACI;AACM;AACE;AAC5E;AAC8J;AAC3G;AACP;AAC5C;AACA;AACA;AACwF;AACrB;AACD;AAClE,uC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtCA;AACA;AACA;AACmC;AACM;AACD;AACM;AAChB;AACwD;AACP;AACZ;AACS;AACA;AACE;AACJ;AACA;AAC1E,iC;;;;;;;;;;;;;;;;;;;;;;;AChBA;AACA;AACA;AACoC;AACpC,gC;;;;;;;;;;;;;;;;;;;;;;ACJA,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC8B;AACiD;AAChC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD,uCAAuC,gGAA0C;AACjF,qCAAqC,gGAA0C;AAC/E,uBAAuB,oDAAc;AACrC;AACA;AACA;AACA,0EAA0E,0BAA0B,yCAAS;AAC7G;AACA;AACA;AACA,4BAA4B,QAAQ;AACpC;AACA;AACA,KAAK;AACL;AACA,iEAAe,SAAS,EAAC;AACzB,qC;;;;;;;;;;;;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA,mDAAmD,wCAAwC,EAAE;AAC7F;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA,KAAK;AACL;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,iEAAe,OAAO,EAAC;AACvB,mC;;;;;;;;;;;;;;;;;;;;;;AC3bA,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACoE;AAC3B;AACT;AAChC;AACA;AACA;AACA;AACA;AACA,iDAAiD,0CAA0C,WAAW,iCAAiC;AACvI,KAAK;AACL;AACA,iDAAiD,yCAAyC,WAAW,4BAA4B;AACjI,KAAK;AACL;AACA,iDAAiD,yCAAyC,WAAW,iBAAiB;AACtH,KAAK;AACL;AACA;AACA;AACA;AACA,kCAAkC,kDAAO;AACzC;AACA,gCAAgC,kDAAO;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,yBAAyB,4DAAoB;AAC7C,uBAAuB,4DAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,gCAAgC,UAAU;AAC1C;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,6CAAO;AACjC;AACA;AACA;AACA;AACA;AACA,sBAAsB,6CAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,6CAAO;AACjC,0BAA0B,6CAAO;AACjC;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,6CAAO;AACzC;AACA;AACA;AACA;AACA;AACA,+DAA+D,6CAAO;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAe,MAAM,EAAC;AACtB,kC;;;;;;;;;;;;;;;;;;;;;;;;;ACxJA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACqC;AACO;AACmB;AACvB;AACC;AACF;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD,+BAA+B,mBAAmB;AAClD;AACA,6BAA6B,uDAAQ;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE,GAAG;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE,GAAG;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qDAAU;AACtB;AACA;AACA;AACA;AACA,4BAA4B,4EAAsB;AAClD,yBAAyB;AACzB;AACA;AACA;AACA;AACA,4BAA4B,kFAA4B;AACxD,yBAAyB;AACzB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC,eAAe,EAAE;AACjB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,SAAS;AACxB,eAAe,2BAA2B,sBAAsB,UAAU;AAC1E;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,gDAAI;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB,eAAe,OAAO;AACtB,gBAAgB,EAAE,GAAG;AACrB;AACA;AACA;AACA,yBAAyB,kDAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,oDAAO;AACT,iEAAe,MAAM,EAAC;AACtB,kC;;;;;;;;;;;;;;;;;;;;;;;AChTA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC+B;AACS;AACA;AACG;AAC3C;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iDAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA,eAAe,oDAAoD;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,iCAAiC;AACjC;AACA,yBAAyB,qBAAqB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,4BAA4B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,wBAAwB,8GAA8G;AACtL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gBAAgB,uDAAiB;AACjC;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,8CAAG;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,iCAAiC;AACjC,6BAA6B;AAC7B;AACA;AACA,wCAAwC,gEAA0B;AAClE;AACA;AACA;AACA,uCAAuC,wBAAwB;AAC/D;AACA;AACA;AACA,oCAAoC,gEAA0B;AAC9D;AACA,0CAA0C,gEAA0B;AACpE,yCAAyC,gEAA0B;AACnE,4CAA4C,gEAA0B;AACtE,4CAA4C,gEAA0B;AACtE;AACA;AACA;AACA;AACA,mCAAmC,gEAA0B;AAC7D;AACA;AACA,4CAA4C,0DAAoB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gEAA0B;AAC/D,wCAAwC,gEAA0B;AAClE;AACA;AACA,4CAA4C,0DAAoB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,gEAA0B;AACrE,0CAA0C,gEAA0B;AACpE,2CAA2C,gEAA0B;AACrE,iDAAiD,gEAA0B;AAC3E,6CAA6C,gEAA0B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,aAAa;AACb;AACA,uBAAuB,8CAAG;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA,YAAY,4DAAY;AACxB,YAAY,4DAAY;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,4CAAM;AACR,iEAAe,YAAY,EAAC;AAC5B,wC;;;;;;;;;;;;;;;;;;;ACvdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,WAAW,EAAE;AACvE;AACA;AACA,CAAC;AACD,iEAAe,WAAW,EAAC;AAC3B,uC;;;;;;;;;;;;;;;;;;;;;;AC9BA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACsD;AACd;AACT;AAC/B;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,oBAAoB;AAC3D,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,wBAAwB,0CAA0C;AAClH;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,YAAY,uDAAiB;AAC7B;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,gCAAgC,EAAE;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,4DAAoB;AAC7C;AACA;AACA;AACA;AACA,wGAAwG;AACxG;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,8CAAG;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA,+BAA+B,gEAA0B;AACzD;AACA;AACA,wCAAwC,0DAAoB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gEAA0B;AAC3D,oCAAoC,gEAA0B;AAC9D;AACA;AACA,wCAAwC,0DAAoB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT,uBAAuB,8CAAG;AAC1B;AACA;AACA;AACA,CAAC,CAAC,4CAAM;AACR,iEAAe,SAAS,EAAC;AACzB,qC;;;;;;;;;;;;;;;;;;;ACxMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,6CAA6C;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,8CAA8C;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,6BAA6B;AAC5C;AACA;AACA;AACA;AACA,2DAA2D,SAAS;AACpE;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,OAAO,EAAC;AACvB,mC;;;;;;;;;;;;;;;;;;;;ACzDA,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,0BAA0B,EAAE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,SAAS;AAC1D;AACA;AACA;AACA,gGAAgG,4BAA4B;AAC5H;AACA,oCAAoC,gDAAK;AACzC,oCAAoC,gDAAK;AACzC;AACA;AACA,+EAA+E,qBAAqB;AACpG,mCAAmC,gDAAK;AACxC,mCAAmC,gDAAK;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,aAAa,EAAC;AAC7B,yC;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzHA,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACqC;AACO;AACQ;AACI;AACM;AACf;AACM;AACU;AACgD;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,uBAAuB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,uBAAuB;AACrD;AACA,sBAAsB,+EAA+B;AACrD;AACA;AACA;AACA;AACA,oCAAoC,0DAAmB;AACvD;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,SAAS;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA,0BAA0B,6EAAuB;AACjD,gBAAgB,6EAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,WAAW;AAC1C;AACA;AACA;AACA;AACA;AACA,sCAAsC,iDAAiD,qCAAqC;AAC5H,uBAAuB;AACvB;AACA,8CAA8C,gEAAc;AAC5D,qBAAqB;AACrB,qBAAqB;AACrB;AACA;AACA;AACA;AACA,uBAAuB,6EAAuB;AAC9C,gBAAgB,6EAAuB;AACvC;AACA,kDAAkD,0DAAmB;AACrE;AACA,SAAS;AACT;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D,iEAAiE,qCAAqC;AACtG,kCAAkC,6DAAW;AAC7C;AACA;AACA,kCAAkC,2DAAS;AAC3C;AACA;AACA,+CAA+C,0DAAmB;AAClE;AACA,kCAAkC,gEAAc;AAChD;AACA;AACA,2BAA2B,6EAAuB;AAClD,oBAAoB,6EAAuB;AAC3C;AACA,sDAAsD,0DAAmB;AACzE;AACA,aAAa;AACb;AACA;AACA,sDAAsD,SAAS;AAC/D;AACA,qEAAqE,qCAAqC;AAC1G;AACA;AACA;AACA,uCAAuC,uDAAK,0BAA0B,gDAAK;AAC3E;AACA,gCAAgC,gFAA0B;AAC1D,2BAA2B,0BAA0B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,YAAY,EAAC;AAC5B,wC;;;;;;;;;;;;;;;;;;;;ACnJA,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA,gDAAgD,yBAAyB,uGAAuG;AAChL;AACA,sBAAsB,kEAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,WAAW,EAAC;AAC3B,uC;;;;;;;;;;;;;;;;;;;;;;;;;AC9CA,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACqC;AAC4B;AAClB;AACgB;AAC3B;AACC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA,2BAA2B,4DAAqB;AAChD;AACA,wBAAwB,gDAAK;AAC7B;AACA;AACA;AACA;AACA,SAAS;AACT,yBAAyB,wEAAY;AACrC;AACA;AACA;AACA,iDAAiD,SAAS;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,2EAAqB;AAC9C;AACA,qCAAqC;AACrC;AACA;AACA,gBAAgB,4EAAsB,sBAAsB,4DAAqB;AACjF,aAAa;AACb,qCAAqC;AACrC;AACA;AACA,gBAAgB,kFAA4B,uBAAuB,4DAAqB;AACxF,aAAa;AACb;AACA,gBAAgB,+EAAyB;AACzC;AACA,wEAAwE,SAAS;AACjF;AACA,6BAA6B,wEAAkB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,6CAAM;AACtB,+BAA+B,0CAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,CAAC;AACD,iEAAe,YAAY,EAAC;AAC5B,wC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACnJA,sBAAsB,SAAI,IAAI,SAAI;AAClC,iDAAiD,QAAQ;AACzD,wCAAwC,QAAQ;AAChD,wDAAwD,QAAQ;AAChE;AACA;AACA;AAC+F;AAC5D;AACL;AACY;AACuB;AACxB;AACJ;AACyB;AACN;AACZ;AACP;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA,kCAAkC,kBAAkB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qEAA+B;AAC1D,wBAAwB,gDAAK;AAC7B;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,mBAAmB,wEAAY;AAC/B;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA,kCAAkC,kBAAkB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA,4BAA4B,6DAAW;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA,wBAAwB,iDAAK;AAC7B,qCAAqC,qBAAqB,EAAE;AAC5D,mBAAmB,uDAAK,EAAE,eAAe;AACzC;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA,kCAAkC,kBAAkB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,qCAAqC,EAAE;AACjH;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,uDAAuD,EAAE;AAC1G;AACA,iDAAiD,oDAAoD,EAAE;AACvG;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,uCAAuC,mBAAmB,EAAE;AAC5D,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,kDAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,wDAAwD,sBAAsB,EAAE;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,qCAAqC,EAAE;AAC1G;AACA;AACA,+CAA+C,SAAS;AACxD,0BAA0B,4EAA0B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA,uCAAuC,sBAAsB;AAC7D;AACA,4CAA4C,SAAS;AACrD,mCAAmC,iCAAiC;AACpE,qBAAqB,kDAAQ;AAC7B;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB,iBAAiB;AACjB;AACA;AACA,+BAA+B,cAAc;AAC7C,iCAAiC,0BAA0B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,8DAAO,CAAC,qEAAc,CAAC,6EAAsB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,8CAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,iBAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA,4BAA4B,8DAAO,CAAC,qEAAc,CAAC,6EAAsB;AACzE;AACA;AACA;AACA;AACA,iCAAiC,8DAAO,CAAC,qEAAc,CAAC,6EAAsB;AAC9E,sCAAsC,8DAAO;AAC7C,gCAAgC,4DAAK;AACrC;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,8CAAO;AAChC;AACA;AACA;AACA,sCAAsC,qBAAqB,EAAE;AAC7D,mCAAmC,gBAAgB,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA,8BAA8B,UAAU;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,EAAE,aAAa,EAAE;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,mCAAmC,+CAA+C,EAAE;AACpF;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,gFAAgF,EAAE;AACjI;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,qCAAqC,wDAAwD,EAAE;AAC/F,+BAA+B,oCAAoC,EAAE;AACrE;AACA;AACA,CAAC;AACD,iEAAe,WAAW,EAAC;AAC3B,uC;;;;;;;;;;;;;;;;;;;;ACziBA,CAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,yCAAyC,iCAAiC,EAAE;AAC5E,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA,wBAAwB,8CAAG;AAC3B,wEAAwE,QAAQ,8CAAG,eAAe,EAAE;AACpG;AACA;AACA;AACA;AACA,6CAA6C,+BAA+B;AAC5E;AACA,sDAAsD,0CAA0C,EAAE;AAClG,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,GAAG,gBAAgB;AACpC;AACA,aAAa;AACb,qCAAqC,kBAAkB,EAAE;AACzD,SAAS;AACT;AACA;AACA,CAAC;AACD,iEAAe,QAAQ,EAAC;AACxB,oC;;;;;;;;;;;;;;;;;;;;;;;;AC/FA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,iBAAiB,SAAI,IAAI,SAAI;AAC7B,2BAA2B,+DAA+D,gBAAgB,EAAE,EAAE;AAC9G;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,qFAAqF;AACpH;AACA,KAAK;AACL;AACA,mBAAmB,SAAI,IAAI,SAAI;AAC/B,aAAa,6BAA6B,0BAA0B,aAAa,EAAE,qBAAqB;AACxG,gBAAgB,qDAAqD,oEAAoE,aAAa,EAAE;AACxJ,sBAAsB,sBAAsB,qBAAqB,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,kCAAkC,SAAS;AAC3C,kCAAkC,WAAW,UAAU;AACvD,yCAAyC,cAAc;AACvD;AACA,6GAA6G,OAAO,UAAU;AAC9H,gFAAgF,iBAAiB,OAAO;AACxG,wDAAwD,gBAAgB,QAAQ,OAAO;AACvF,8CAA8C,gBAAgB,gBAAgB,OAAO;AACrF;AACA,iCAAiC;AACjC;AACA;AACA,SAAS,YAAY,aAAa,OAAO,EAAE,UAAU,WAAW;AAChE,mCAAmC,SAAS;AAC5C;AACA;AAC+B;AAC6C;AACpC;AACN;AAClC;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,8CAAQ;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT,6BAA6B,4DAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,8CAAG;AAC/C;AACA;AACA,mCAAmC,8CAAG;AACtC;AACA,6CAA6C,4DAAsB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa,EAAE,EAAE;AACjB,SAAS;AACT,6BAA6B,4DAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,8CAAG;AAC3C;AACA;AACA;AACA;AACA;AACA,sCAAsC,8CAAG;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,kCAAK;AACvC,wDAAwD,SAAS;AACjE;AACA;AACA,yDAAyD,QAAQ;AACjE;AACA;AACA;AACA;AACA,gEAAgE,eAAe;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC,CAAC,oDAAO;AACT,iEAAe,QAAQ,EAAC;AACxB,oC;;;;;;;;;;;;;;;;;;;;;AC3PA,CAAyD;AACc;AACvE;AACA,KAAK,qBAAqB,iFAA6B,EAAE;AACzD,KAAK,sBAAsB,kFAA8B,EAAE;AAC3D,KAAK,uBAAuB,mFAA+B,EAAE;AAC7D,KAAK,qBAAqB,iFAA6B,EAAE;AACzD;AACA;AACA,KAAK,0BAA0B,mFAAsB,EAAE;AACvD,KAAK,uBAAuB,gFAAmB,EAAE;AACjD,KAAK,2BAA2B,oFAAuB,EAAE;AACzD,KAAK,uBAAuB,gFAAmB,EAAE;AACjD,KAAK,4BAA4B,qFAAwB,EAAE;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,iBAAiB,mFAAsB;AACvC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,iEAAe,uBAAuB,EAAC;AACvC,mD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxkBA,sBAAsB,SAAI,IAAI,SAAI;AAClC,iDAAiD,QAAQ;AACzD,wCAAwC,QAAQ;AAChD,wDAAwD,QAAQ;AAChE;AACA;AACA;AACoC;AACW;AAC/C;AACqD;AACQ;AACR;AACM;AACF;AACJ;AACI;AACM;AACE;AACrB;AACkB;AACA;AACV;AACI;AACnB;AACA;AACe;AACL;AACiB;AACF;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,iEAAI;AACtB,sBAAsB,qEAAQ;AAC9B,kBAAkB,iEAAI;AACtB,qBAAqB,oEAAO;AAC5B,oBAAoB,mEAAM;AAC1B,kBAAkB,iEAAI;AACtB,oBAAoB,mEAAM;AAC1B,uBAAuB,sEAAS;AAChC,wBAAwB,uEAAU;AAClC,mBAAmB,iDAAK;AACxB,mBAAmB,wDAAK;AACxB,4BAA4B,iEAAc;AAC1C,uBAAuB,4DAAS;AAChC,yBAAyB,8DAAW;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC,eAAe,6BAA6B;AAC5C,eAAe,MAAM;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qDAAU;AACtC,6DAA6D,8CAA8C,EAAE;AAC7G;AACA;AACA;AACA;AACA;AACA,yCAAyC,8CAAM;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA,oDAAoD,0CAA0C,yEAAkC,mDAAmD;AACnL;AACA;AACA;AACA,qBAAqB,iFAAiF;AACtG;AACA;AACA;AACA,mEAAmE,4BAA4B,EAAE;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,QAAQ,sDAAU;AAClB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,MAAM;AACrB,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA,kCAAkC,4DAAS;AAC3C;AACA;AACA;AACA,kCAAkC,8DAAW;AAC7C;AACA;AACA,kCAAkC,iEAAc;AAChD;AACA;AACA;AACA;AACA,kCAAkC,4DAAS;AAC3C;AACA;AACA,kCAAkC,4DAAS;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA,sCAAsC,iDAAK;AAC3C;AACA;AACA;AACA,iBAAiB;AACjB;AACA,2CAA2C,wDAAK,sBAAsB,wDAAK;AAC3E;AACA;AACA;AACA,2CAA2C,8DAAW,sBAAsB,8DAAW;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,sBAAsB;AACrC,eAAe,wBAAwB;AACvC,eAAe,MAAM;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,8BAA8B,iDAAK,sBAAsB,iDAAK;AAC9D;AACA;AACA;AACA,mCAAmC,wDAAK;AACxC;AACA;AACA;AACA;AACA,6CAA6C,4DAAS;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,iDAAK;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,WAAW;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,iDAAK;AACrC;AACA,qCAAqC,wDAAK;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,kCAAkC,iDAAK;AACvC;AACA,qCAAqC,wDAAK;AAC1C;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD,uCAAuC,iEAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,QAAQ,sDAAU;AAClB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW;AAC7B,kBAAkB,4BAA4B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,qCAAqC,iDAAK;AAC1C;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,qCAAqC,wDAAK;AAC1C;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,qCAAqC,8DAAW;AAChD;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,qCAAqC,iEAAc;AACnD;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,qCAAqC,4DAAS;AAC9C;AACA;AACA;AACA,gBAAgB,8DAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,4BAA4B;AAC3C,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA,+BAA+B,UAAU;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,4DAAS,IAAI,wEAAiC;AACpF;AACA;AACA,2CAA2C,yEAAkC;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6EAAsC;AAClD;AACA,qCAAqC,2EAA0B;AAC/D;AACA;AACA;AACA,YAAY,4FAAqD;AACjE,YAAY,iFAA0C;AACtD;AACA,qCAAqC,iFAA0C;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,yBAAyB;AACxC,eAAe,EAAE;AACjB,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C;AACA;AACA;AACA;AACA,gBAAgB,6EAAsC;AACtD;AACA,yCAAyC,2EAA0B;AACnE;AACA;AACA;AACA,gBAAgB,4FAAqD;AACrE,gBAAgB,iFAA0C;AAC1D;AACA,yCAAyC,iFAA0C;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,4DAAS,IAAI,kFAA2C;AAC9F;AACA,4CAA4C,mFAA4C;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,4DAAS;AACnD;AACA;AACA;AACA,0CAA0C,4DAAS;AACnD;AACA;AACA;AACA,0CAA0C,iEAAc;AACxD;AACA;AACA;AACA,0CAA0C,iEAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,oBAAoB,EAAC;AACpC,0C;;;;;;;;;;;;;;;;;;;;;ACjlBA,CAAsD;AACU;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,uBAAuB,IAAI,2BAA2B,KAAK,2BAA2B;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,6DAAuB,0BAA0B,6DAAuB;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,6DAAuB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oDAAS,YAAY,oDAAS;AAC9D;AACA,2BAA2B,oDAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,6DAAuB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oDAAS,YAAY,oDAAS;AAC9D;AACA,2BAA2B,oDAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,+BAA+B;AAC5E,yDAAyD,uCAAuC;AAChG;AACA,CAAC;AACD,iEAAe,sBAAsB,EAAC;AACtC,kD;;;;;;;;;;;;;;;;;;;;;;AChLA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACuC;AACC;AACH;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,kCAAkC,kBAAkB;AACpD,mCAAmC,gBAAgB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,8CAAG;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA,2BAA2B,aAAa;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA,gBAAgB,gDAAI;AACpB;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,6BAA6B,gDAAI;AACjC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,eAAe,gDAAI;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,oDAAO;AACT,iEAAe,QAAQ,EAAC;AACxB,oC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5SA;AACA;AACA;AACA;AACA;AACO;AACA;AACA;AACP;AACA;AACA;AACA,WAAW,2CAA2C;AACtD;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjDA,CAAwC;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;;AAEnC,MAAM,kDAAmB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY,+CAAgB;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEA,YAAY,+CAAgB;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,MAAM;AACjB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,cAAc;AACzB,aAAa,KAAK;AAClB;;AAEO;AACP,wBAAwB,kDAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;;AAExD;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,KAAK;AACjB,YAAY,aAAa;AACzB,YAAY,KAAK;AACjB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,KAAK;AACjB,YAAY,aAAa;AACzB,YAAY,KAAK;AACjB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,YAAY,KAAK;AACjB;;AAEO;AACP,oBAAoB,kDAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,MAAM;AACjB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,MAAM;AACjB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB;AACA,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,+CAAgB,+BAA+B,+CAAgB,+BAA+B,+CAAgB;AAC/I;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB,uEAAuE,+CAAgB,yEAAyE,+CAAgB,yEAAyE,+CAAgB,yEAAyE,+CAAgB,yEAAyE,+CAAgB,yEAAyE,+CAAgB;AAC/zC;AACA;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO,mB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrxDP,CAAwC;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;;AAEnC,MAAM,kDAAmB;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,UAAU,8CAAe;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,cAAc;AACzB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;;AAE5C;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA,8BAA8B,+CAAgB,qEAAqE,+CAAgB;AACnI;AACA;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC,G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/mBD,CAAwC;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;;AAEnC,MAAM,kDAAmB;AACzB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP,gBAAgB,kDAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,UAAU,8CAAe;AACzB,UAAU,8CAAe;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,aAAa;;AAEb;AACA;AACA,qBAAqB;;AAErB;AACA;AACA,qDAAqD;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,aAAa;;AAEb;AACA;AACA,qBAAqB;;AAErB;AACA;AACA,qDAAqD;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA,aAAa;;AAEb;AACA;AACA,qBAAqB;;AAErB;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,OAAO;AACpB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,aAAa;AACxB,aAAa,QAAQ;AACrB;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,+CAAgB,qEAAqE,+CAAgB,qEAAqE,+CAAgB;AACxN;AACA;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA,cAAc;AACd;AACA;;AAEO;AACP;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC,G;;;;;;;;;;;;;;AClxBY;AACb,eAAe,qBAAM,qBAAqB,qBAAM;;AAEhD;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,qBAAM;AACxB;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG,WAAW,qBAAM,wBAAwB,qBAAM;AAClD,sBAAsB,qBAAM;AAC5B;AACA;AACA;AACA;AACA,GAAG,wBAAwB,qBAAM,4BAA4B,qBAAM;AACnE;;AAEA,mCAAmC;AACnC;AACA,qBAAqB,qBAAM;AAC3B;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM,qBAAM;AACZ;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACpEa;AACb,YAAY,mBAAO,CAAC,kDAAS;AAC7B,cAAc,mBAAO,CAAC,sDAAW;AACjC;AACA;;;AAGA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,yBAAyB,aAAa;AACjE;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;;;;;;;;;;;;;ACzGa;;AAEb,eAAe,mBAAO,CAAC,wDAAY;AACnC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,sBAAsB,mBAAO,CAAC,oFAA0B;AACxD,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,sBAAsB,mBAAO,CAAC,oFAA0B;;AAExD;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,qCAAqC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;;;;;;;;AC1Ea;;AAEb,oBAAoB,mBAAO,CAAC,gFAAwB;;AAEpD,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,yFAAoC;;;;;;;;;;;;;;;ACbvB;;AAEb,YAAY,mBAAO,CAAC,kDAAS;;AAE7B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iBAAiB,SAAS;AAC1B;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;;AAEA;;AAEA,qBAAqB,SAAS;AAC9B;AACA;;AAEA,wBAAwB;AACxB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;;AAEA;;AAEA,qBAAqB,SAAS;AAC9B;AACA;;AAEA,wBAAwB;AACxB;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;AC5Ea;AACb,cAAc;AACd,cAAc;AACd,WAAW;AACX,qBAAqB;AACrB,YAAY;AACZ,mBAAmB;AACnB,0BAA0B;AAC1B,eAAe;AACf,uBAAuB;AACvB,sBAAsB;;;;;;;;;;;;;;;ACVtB;AACa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB,mBAAO,CAAC,8CAAK;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AClBa;AACb;;AAEA,WAAW,mBAAO,CAAC,0CAAM;AACzB,YAAY,mBAAO,CAAC,kDAAS;AAC7B,oBAAoB,mBAAO,CAAC,gFAAwB;;AAEpD;;AAEA,aAAa;;AAEb;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA,sBAAsB;AACtB;AACA;AACA,wBAAwB;AACxB,wCAAwC;AACxC;;;;;;;;;;;;;;;ACpFa;;AAEb,YAAY,mBAAO,CAAC,mDAAU;AAC9B,oBAAoB,mBAAO,CAAC,iFAAyB;AACrD,WAAW,mBAAO,CAAC,iDAAS;AAC5B,YAAY,mBAAO,CAAC,mDAAU;AAC9B,gBAAgB,mBAAO,CAAC,2DAAc;;AAEtC;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA,eAAe,WAAW;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA,KAAK,OAAO;AACZ,+BAA+B;AAC/B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA,oBAAoB;AACpB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA,oBAAoB;AACpB,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA,gBAAgB;AAChB,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;;AAEA;;;;;;;;;;;;;;;;AC3hBa;;AAEb,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,oBAAoB,mBAAO,CAAC,2EAAiB;;AAE7C;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,sBAAsB;;AAEtB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACxDa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB,IAAI;AAC1B,8BAA8B;AAC9B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,mBAAO,CAAC,oDAAU;AACpC,4BAA4B,mBAAO,CAAC,gDAAQ;AAC5C,gBAAgB,mBAAO,CAAC,sDAAW;AACnC,iBAAiB,mBAAO,CAAC,wDAAY;;AAErC;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iBAAiB,mBAAO,CAAC,wDAAY;AACrC;;;;;;;;;;;;;;;ACnDa;AACb,YAAY,mBAAO,CAAC,kDAAS;AAC7B,eAAe,mBAAO,CAAC,wDAAY;AACnC,WAAW,mBAAO,CAAC,gDAAQ;AAC3B,YAAY,mBAAO,CAAC,kDAAS;AAC7B,iBAAiB,mBAAO,CAAC,4DAAc;AACvC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,kBAAkB,mBAAO,CAAC,8DAAe;;AAEzC;AACA;AACA,WAAW,SAAS;AACpB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;;AAEA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;;;;;;;;;;;;;;;ACjFa;;AAEb,YAAY,mBAAO,CAAC,mDAAU;AAC9B,oBAAoB,mBAAO,CAAC,iFAAyB;;AAErD;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;;;;ACzEa;;AAEb,eAAe,0GAAmC;;AAElD,YAAY,mBAAO,CAAC,mDAAU;AAC9B;;AAEA;AACA;AACA;AACA;AACA,UAAU,aAAa;AACvB,UAAU,OAAO;AACjB,UAAU,SAAS;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;;;AAGA;AACA;AACA;;AAEA;;;;;;;;;;;;;;;ACzCa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,QAAQ;AACvB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACxDa;AACb,WAAW,mBAAO,CAAC,gDAAQ;AAC3B,YAAY,mBAAO,CAAC,kDAAS;AAC7B,oBAAoB,mBAAO,CAAC,gFAAwB;AACpD,mBAAmB,mBAAO,CAAC,8EAAuB;AAClD,eAAe,mBAAO,CAAC,wDAAY;AACnC,uBAAuB,mBAAO,CAAC,wEAAoB;AACnD,gBAAgB,mBAAO,CAAC,0DAAa;AACrC,eAAe,mBAAO,CAAC,8DAAY;AACnC,kBAAkB,mBAAO,CAAC,8DAAe;AACzC,+BAA+B,mBAAO,CAAC,sGAAmC;;;AAG1E;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,qCAAqC;AAChD,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;;AAGL;AACA;AACA,eAAe,SAAS;AACxB,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF;AACpF,uCAAuC;AACvC;AACA;AACA,KAAK;;AAEL;AACA;AACA,eAAe,SAAS;AACxB,sCAAsC;AACtC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;;AAEA,SAAS;AACT;AACA,KAAK;;AAEL;AACA;AACA,iBAAiB,cAAc;AAC/B;AACA,iBAAiB,qCAAqC;AACtD,iBAAiB,OAAO;AACxB,iBAAiB,mBAAmB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,kBAAkB;AAClB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,iBAAiB,cAAc;AAC/B,iBAAiB,MAAM;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb,2BAA2B,iBAAiB;AAC5C;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,gBAAgB,0CAA0C;AAC1D;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACpYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAAkC;;;;;;;;;;;;;;;ACRrB;AACb,iBAAiB,mBAAO,CAAC,mEAAc;AACvC,YAAY,mBAAO,CAAC,mDAAU;;AAE9B;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACxDa;AACb,YAAY,mBAAO,CAAC,mDAAU;;AAE9B;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,uCAAuC,iBAAiB;AACxD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;;;;;;;;;;;;;;;ACnHa;AACb,uBAAuB,mBAAO,CAAC,+EAAoB;AACnD,YAAY,mBAAO,CAAC,mDAAU;;AAE9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AClBa;AACb,iBAAiB,mBAAO,CAAC,mEAAc;AACvC,YAAY,mBAAO,CAAC,mDAAU;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACrCa;AACb,kBAAkB,mBAAO,CAAC,qEAAe;AACzC,YAAY,mBAAO,CAAC,mDAAU;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACrBa;;AAEb,YAAY,mBAAO,CAAC,mDAAU;AAC9B,cAAc,mBAAO,CAAC,uDAAY;AAClC,kBAAkB,mBAAO,CAAC,qEAAe;AACzC,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C,uBAAuB,mBAAO,CAAC,+EAAoB;AACnD,uBAAuB,mBAAO,CAAC,+EAAoB;;AAEnD;AACA;AACA,WAAW,qCAAqC;AAChD,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AC3Ba;AACb,yBAAyB;AACzB,2BAA2B;AAC3B,6BAA6B;AAC7B,uCAAuC;AACvC,mCAAmC;AACnC,uBAAuB;;;;;;;;;;;;;;;ACNV;;AAEb,oBAAoB,mBAAO,CAAC,yEAAiB;AAC7C,YAAY,mBAAO,CAAC,mDAAU;;AAE9B;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;ACzBa;;AAEb,oBAAoB,mBAAO,CAAC,yEAAiB;AAC7C,YAAY,mBAAO,CAAC,mDAAU;AAC9B,YAAY,mBAAO,CAAC,mDAAU;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACvBa;;AAEb,YAAY,mBAAO,CAAC,mDAAU;AAC9B,oBAAoB,mBAAO,CAAC,yEAAiB;;AAE7C;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC3Ba;;AAEb,YAAY,mBAAO,CAAC,mDAAU;AAC9B,oBAAoB,mBAAO,CAAC,yEAAiB;;AAE7C;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;;;;;;;;;;;;;;ACnHa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,MAAM;AACrB,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA,0BAA0B,kCAAkC;AAC5D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;;ACtQa;;AAEb,YAAY,mBAAO,CAAC,mDAAU;AAC9B,oBAAoB,mBAAO,CAAC,yEAAiB;AAC7C,oBAAoB,mBAAO,CAAC,yEAAiB;AAC7C,aAAa,mBAAO,CAAC,qDAAW;AAChC,cAAc,mBAAO,CAAC,uDAAY;AAClC,eAAe,mBAAO,CAAC,yDAAa;;AAEpC;AACA;AACA;AACA,oCAAoC,mBAAO,CAAC,yGAAqC;AACjF,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,yBAAyB;AACpC,WAAW,OAAO;AAClB,YAAY,0CAA0C;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB,YAAY,yBAAyB;AACrC;AACA;AACA;AACA;AACA,cAAc,sBAAsB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB,gBAAgB,aAAa;AAC7B;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,SAAS;AACxB,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;;;AAGA;;;;;;;;;;;;;;;;;;;;;;;ACnNa;;AAEb,cAAc;AACd,aAAa;AACb,cAAc;AACd,mBAAmB;AACnB,kBAAkB;AAClB;AACA,kBAAkB;;AAElB;AACA,IAAI,YAAY;AAChB;AACA;AACA;AACA;AACA,QAAQ,YAAY;AACpB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,YAAY;AACxB;AACA;AACA,YAAY,YAAY;AACxB;AACA;AACA;;AAEA;AACA,IAAI,kBAAkB,KAAK,0GAAmC;AAC9D,CAAC;AACD,IAAI,kBAAkB;AACtB;;;;;;;;;;;;;;;;;;;;;;ACrCa;;AAEb,YAAY,mBAAO,CAAC,kDAAS;AAC7B,cAAc,mBAAO,CAAC,sDAAW;AACjC,kBAAkB,mBAAO,CAAC,8DAAe;AACzC,oBAAoB,mBAAO,CAAC,gFAAwB;;AAEpD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;;AAEA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA,wBAAwB,aAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B,kBAAkB;;AAE7C;AACA;AACA,oDAAoD,OAAO;;AAE3D;AACA;AACA,kBAAkB,YAAY;;AAE9B;AACA;AACA,oBAAoB,YAAY;;AAEhC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,oBAAoB,OAAO;AAC3B;AACA;AACA,uBAAuB,qBAAqB,UAAU;;AAEtD;AACA;AACA,wBAAwB,0BAA0B,cAAc,UAAU;;AAE1E;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,0BAA0B,UAAU;;AAE5D;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;;;AAGA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,wBAAwB;AACpC;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,wBAAwB;AACnC,YAAY,OAAO;AACnB;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClRX;;AAEb,cAAc,mBAAO,CAAC,sDAAW;AACjC,aAAa,mBAAO,CAAC,oDAAU;AAC/B,kBAAkB,mBAAO,CAAC,8DAAe;AACzC,mBAAmB,mBAAO,CAAC,sEAAoB;AAC/C,eAAe,mBAAO,CAAC,wDAAY;;;AAGnC;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,KAAK;AACjB;AACA,eAAe;AACf;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,oCAAoC;AAC/C,YAAY,oCAAoC;AAChD;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA,WAAW,oCAAoC;AAC/C,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,yBAAyB;;;AAGzB;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C,YAAY,oCAAoC;AAChD;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,2CAA2C;AACtD,YAAY,MAAM;AAClB;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,MAAM;AAClB;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;;AAEA,wBAAwB;AACxB,wBAAwB,MAAM;;AAE9B;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA,cAAc;AACd;AACA;AACA,eAAe,wBAAwB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,MAAM;AACjB;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,OAAO;AACnB;AACA,cAAc;AACd,mBAAmB;AACnB,eAAe,sBAAsB,OAAO;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA,sBAAsB;;AAEtB;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;;;;;;;;;;;;;;AC3da;AACb,gBAAgB,mBAAO,CAAC,wEAAoB;AAC5C,YAAY,mBAAO,CAAC,kDAAS;AAC7B,UAAU,mBAAO,CAAC,0DAAa;AAC/B,eAAe,mBAAO,CAAC,wDAAY;AACnC,WAAW,mBAAO,CAAC,gDAAQ;AAC3B,cAAc,mBAAO,CAAC,sDAAW;AACjC;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gDAAgD;AAChD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,qCAAqC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;;;;;;;;;;;;;;ACrQa;AACb,gBAAgB,mBAAO,CAAC,wEAAoB;AAC5C,YAAY,mBAAO,CAAC,kDAAS;AAC7B,uBAAuB,mBAAO,CAAC,wEAAoB;AACnD,cAAc,mBAAO,CAAC,kDAAS;AAC/B,WAAW,mBAAO,CAAC,gDAAQ;AAC3B,mBAAmB,mBAAO,CAAC,gEAAgB;AAC3C,cAAc,mBAAO,CAAC,sDAAW;;AAEjC;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,YAAY;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,WAAW;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,eAAe,WAAW;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,eAAe,WAAW;AAC1B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,WAAW;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACrSa;;AAEb,mBAAmB,mBAAO,CAAC,8EAAuB;AAClD,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,WAAW,mBAAO,CAAC,gDAAQ;AAC3B,uBAAuB,mBAAO,CAAC,wEAAoB;AACnD,oBAAoB,mBAAO,CAAC,gFAAwB;;AAEpD;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,qCAAqC;AAChD,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,cAAc,2BAA2B;AACzC;AACA;AACA;;;;;;;;;;;;;;;ACpIa;AACb,gBAAgB,mBAAO,CAAC,0DAAW;;AAEnC;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;AChRA;AACa;;AAEb,gBAAgB,+FAAoC;;AAEpD,gBAAgB,mBAAO,CAAC,yDAAe;AACvC,gBAAgB,mBAAO,CAAC,yDAAe;AACvC,gBAAgB,mBAAO,CAAC,uEAAsB;;AAE9C;;AAEA;;AAEA;;;;;;;;;;;;;;;;;;;ACba;;;AAGb,mBAAmB,mBAAO,CAAC,+DAAgB;AAC3C,mBAAmB,mBAAO,CAAC,+DAAgB;AAC3C,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,mBAAmB,mBAAO,CAAC,+DAAgB;;AAE3C;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C;AACA;AACA,8BAA8B;AAC9B;AACA,qBAAqB,8BAA8B;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,eAAe;;AAElB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAkB;AAClB,mBAAmB;AACnB,sBAAsB;AACtB,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,cAAc;;AAEjC;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,qBAAqB,yCAAyC;;AAE9D;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,eAAe;AACf,eAAe;AACf,kBAAkB;AAClB,YAAY;;;;;;;;;;;;;;;;;;;AC/YC;;;AAGb,mBAAmB,mBAAO,CAAC,+DAAgB;AAC3C,mBAAmB,mBAAO,CAAC,+DAAgB;AAC3C,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,mBAAmB,mBAAO,CAAC,mEAAkB;AAC7C,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,mBAAmB,mBAAO,CAAC,+DAAgB;AAC3C,mBAAmB,mBAAO,CAAC,iEAAiB;;AAE5C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C;AACA;AACA,8BAA8B;AAC9B;AACA,qBAAqB,8BAA8B;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG,eAAe;;AAElB;;AAEA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB;AAClB,mBAAmB;AACnB,sBAAsB;AACtB,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,cAAc;AACjC;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,sDAAsD;;AAEtD;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,kEAAkE;;AAEvF;;AAEA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,qBAAqB,yCAAyC;;AAE9D;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,eAAe;AACf,eAAe;AACf,kBAAkB;AAClB,cAAc;;;;;;;;;;;;;;;;;;;ACtaD;;;AAGb;AACA;AACA;;AAEA;AACA;AACA;;AAEA,cAAc;AACd;AACA;AACA;AACA,kBAAkB,UAAU;;AAE5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA,iBAAiB;AACjB,4BAA4B,YAAY;AACxC,qBAAqB,8BAA8B;AACnD;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,kCAAkC,OAAO;AACzC;AACA;;AAEA;AACA;AACA;AACA,kCAAkC,OAAO;AACzC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,gBAAgB;AAChB;AACA,IAAI,YAAY;AAChB,IAAI,aAAa;AACjB,IAAI,aAAa;AACjB;AACA,GAAG;AACH,IAAI,YAAY;AAChB,IAAI,aAAa;AACjB,IAAI,aAAa;AACjB;AACA;AACA;;AAEA;;;;;;;;;;;;;;;;;;;;ACxGA;AACa;;;AAGb,YAAY,mBAAO,CAAC,yDAAU;;;AAG9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK,wCAAwC,EAAE,aAAa,sBAAsB;AAClF,KAAK,oDAAoD,EAAE,aAAa,0BAA0B;;;AAGlG;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA,kCAAkC;;;AAGlC;AACA,kBAAkB;AAClB;;AAEA;AACA,iBAAiB,iBAAiB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,wBAAwB,aAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;;;AAGA;AACA,qBAAqB;AACrB;AACA;;;AAGA;AACA,qBAAqB;AACrB;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;AACA;;;AAGA;AACA,kBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA,mBAAmB,qBAAqB,UAAU;;AAElD;AACA;AACA,oBAAoB,0BAA0B,gBAAgB,UAAU;;AAExE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,0BAA0B,UAAU;;AAExD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,yBAAyB,kBAAkB;;AAE3C;AACA;AACA,kDAAkD,OAAO;;AAEzD;AACA;AACA,gBAAgB,YAAY;;AAE5B;AACA;AACA,kBAAkB,YAAY;;AAE9B;AACA;;;;;;;;;;;;;;;AC1La;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;;;AAGA;;;;;;;;;;;;;;;AClDa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACnEa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iBAAiB,SAAS;AAC1B;AACA,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA,mBAAmB,SAAS;AAC5B;AACA;;AAEA,sBAAsB;AACtB;;;AAGA;;;;;;;;;;;;;;;;;;;;;;;;AC1Da;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,mBAAO,CAAC,gEAAiB;AACvC,cAAc,mBAAO,CAAC,sDAAS;AAC/B,cAAc,mBAAO,CAAC,0DAAW;AACjC,cAAc,mBAAO,CAAC,sDAAS;AAC/B,cAAc,mBAAO,CAAC,4DAAY;;AAElC;AACA;;;AAGA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC;AAChC;;;AAGA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0BAA0B;AAC1B,0BAA0B;AAC1B,0BAA0B;AAC1B,0BAA0B;;AAE1B,mBAAmB;;AAEnB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oBAAoB,sBAAsB,qBAAqB,cAAc,EAAE;;;AAG/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,YAAY;AAC/B,kBAAkB,UAAU;;AAE5B;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,wBAAwB;AACxB,YAAY;AACZ,UAAU;AACV,+BAA+B;AAC/B,gCAAgC;AAChC;AACA;;AAEA,sBAAsB;;AAEtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,0BAA0B;;AAE3D;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,aAAa;;AAEb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA,yDAAyD;AACzD;;AAEA;;AAEA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,0DAA0D;AAC1D;;AAEA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,aAAa;;AAEb;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,OAAO,EAAE;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;;AAEA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,WAAW;AACX,mBAAmB;;AAEnB;;AAEA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,OAAO,EAAE;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oEAAoE;AACpE;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,0DAA0D;AAC1D;;AAEA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA,qBAAqB;AACrB,eAAe;;AAEf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,mBAAmB;AACnB,kBAAkB;AAClB,0BAA0B;AAC1B,4BAA4B;AAC5B,uBAAuB;AACvB,mBAAmB;AACnB,gBAAgB;AAChB,qBAAqB;AACrB,mBAAmB;AACnB,2BAA2B;AAC3B,uBAAuB;;AAEvB,kBAAkB;AAClB,kBAAkB;AAClB,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;;AAEnB,iBAAiB;AACjB,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,wBAAwB;AACxB,sBAAsB;AACtB,2BAA2B;AAC3B,oBAAoB;AACpB,uBAAuB;AACvB,qBAAqB;;AAErB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB;AACjB,oBAAoB;;AAEpB;AACA;;AAEA,sBAAsB;;AAEtB;;AAEA;;AAEA,2CAA2C;AAC3C,6CAA6C;AAC7C,4CAA4C;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uBAAuB;AACvB,uBAAuB;AACvB,uBAAuB;;AAEvB;AACA;AACA;;AAEA,0BAA0B;AAC1B,+CAA+C;AAC/C;;AAEA,oBAAoB;AACpB,oBAAoB;AACpB;AACA;AACA;;AAEA,gDAAgD;AAChD;AACA;AACA;;AAEA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB;;AAEpB;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB,sBAAsB;AACtB,mBAAmB;AACnB,kBAAkB;;;AAGlB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,6BAA6B,uBAAuB;AACpD,8BAA8B,uBAAuB;AACrD;AACA;AACA;;;AAGA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA,uBAAuB;AACvB;AACA;AACA;;AAEA;AACA,aAAa;AACb;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qBAAqB;;AAErB,sCAAsC;;AAEtC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA,eAAe;;AAEf;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB;AAChB;AACA;;AAEA;AACA;;AAEA,uBAAuB;AACvB,qBAAqB;AACrB;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,6BAA6B,uBAAuB;AACpD;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,uBAAuB;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B,2BAA2B,aAAa;AACxC,oBAAoB,qBAAqB;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,oDAAoD;AACpD;AACA;;AAEA,aAAa;;AAEb;AACA;AACA,qBAAqB;AACrB,yBAAyB;AACzB,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,mBAAmB;AACnB,oBAAoB;AACpB,oBAAoB;AACpB,wBAAwB;AACxB,wBAAwB;AACxB,eAAe;AACf,kBAAkB;AAClB,4BAA4B;AAC5B,mBAAmB;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACj1Da;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;;ACzDa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,WAAW;AACX,WAAW;AACX,UAAU;AACV,UAAU;AACV;AACA,WAAW;AACX;AACA,YAAY;AACZ,YAAY;AACZ,YAAY;AACZ;AACA,eAAe;AACf,WAAW;AACX,WAAW;AACX,YAAY;AACZ,YAAY;AACZ,YAAY;AACZ,YAAY;AACZ,WAAW;AACX,SAAS;AACT;AACA,UAAU;AACV,WAAW;AACX,WAAW;AACX;;;AAGA,oBAAoB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,GAAG;AAClB;AACA;AACA;AACA;;AAEA,wBAAwB;AACxB;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B,4BAA4B;AAC5B,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,gCAAgC;AAChC;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,mBAAmB;AACnB,qCAAqC;AACrC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,mBAAmB;AACnB;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA,qBAAqB;AACrB,uCAAuC;AACvC;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,mBAAmB;AACnB,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,kBAAkB;AAClB;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY;AACZ;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;ACxVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB,mBAAO,CAAC,gEAAiB;AAC7C,oBAAoB,mBAAO,CAAC,0DAAW;AACvC,oBAAoB,mBAAO,CAAC,sDAAS;AACrC,oBAAoB,mBAAO,CAAC,0DAAW;AACvC,oBAAoB,mBAAO,CAAC,4DAAY;;AAExC;AACA;AACA;;AAEA;AACA;;;AAGA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;;;AAGA,gBAAgB;AAChB,iBAAiB;AACjB,gBAAgB;AAChB,cAAc;AACd,iBAAiB;AACjB,iBAAiB;AACjB,gBAAgB;AAChB,mBAAmB;AACnB,gBAAgB;AAChB,mBAAmB;AACnB,iBAAiB;AACjB,qBAAqB;AACrB,uBAAuB;AACvB,uBAAuB;AACvB,sBAAsB;AACtB,qBAAqB;AACrB,sBAAsB;AACtB,wBAAwB;AACxB,yBAAyB;AACzB,yBAAyB;AACzB,wBAAwB;AACxB,2BAA2B;AAC3B,yBAAyB;AACzB,4BAA4B;AAC5B,0BAA0B;AAC1B,wBAAwB;AACxB,kBAAkB;AAClB,mBAAmB;AACnB,iBAAiB;AACjB,gBAAgB;AAChB,gBAAgB;AAChB,iBAAiB;;AAEjB;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,gBAAgB;AAChB,wBAAwB;AACxB,iBAAiB;AACjB,gBAAgB;AAChB,iBAAiB;AACjB,iBAAiB;AACjB;AACA,mBAAmB;;AAEnB;AACA,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,qBAAqB;;AAErB;AACA,gBAAgB;AAChB,gBAAgB;;AAEhB;AACA,kBAAkB;AAClB,kBAAkB;;AAElB;AACA,iBAAiB;;AAEjB;AACA,sBAAsB;AACtB,uBAAuB;AACvB,mBAAmB;AACnB,oBAAoB;;AAEpB;AACA,iBAAiB;AACjB,gBAAgB;AAChB,iBAAiB;AACjB,gBAAgB;AAChB,mBAAmB;;AAEnB,mCAAmC;AACnC,mCAAmC;;AAEnC;AACA;AACA;AACA;AACA,yCAAyC;AACzC,qBAAqB;AACrB,sBAAsB;AACtB,gBAAgB;AAChB,gBAAgB;AAChB,eAAe;AACf;;AAEA;AACA;;AAEA,6BAA6B,uBAAuB;AACpD;AACA;AACA,gBAAgB;AAChB,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,6BAA6B,uBAAuB;AACpD;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,6BAA6B,uBAAuB;AACpD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,cAAc,uBAAuB;AACrC,sBAAsB;;AAEtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB;;AAEpB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uBAAuB,uBAAuB;AAC9C,uBAAuB,uBAAuB;AAC9C,uBAAuB,uBAAuB;AAC9C,uBAAuB,uBAAuB;;AAE9C,uEAAuE,UAAU;;AAEjF;AACA;AACA,sBAAsB,uBAAuB;;AAE7C,uEAAuE,UAAU;;AAEjF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD,sCAAsC,qBAAqB;AAC3D;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB,WAAW;AACX,UAAU;AACV,iBAAiB;AACjB,WAAW;AACX,WAAW;AACX,gBAAgB;AAChB,WAAW;AACX,WAAW;AACX;AACA,eAAe;AACf,mCAAmC;AACnC,aAAa;AACb,mCAAmC;AACnC,UAAU;AACV,UAAU;AACV,+BAA+B;AAC/B;;AAEA,QAAQ;;AAER;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,qBAAqB,EAAE;;;AAGnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,aAAa;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,iBAAiB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,aAAa;AACzC,4BAA4B,aAAa;AACzC,2BAA2B,iBAAiB;AAC5C,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB;AAChB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,oEAAoE;AACpE;AACA;AACA;;AAEA,sCAAsC,OAAO;AAC7C;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,iBAAiB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,iBAAiB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,iBAAiB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iCAAiC,OAAO;;AAExC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,iBAAiB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,kEAAkE;AAClE;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA,kDAAkD,OAAO;AACzD;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,oEAAoE;AACpE;AACA;AACA;;AAEA,oCAAoC,OAAO;AAC3C;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA,kDAAkD,OAAO;AACzD;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,iBAAiB;AAC1C;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,qBAAqB;AAC3D,8BAA8B,aAAa;AAC3C;AACA;AACA;AACA;AACA,aAAa;AACb,qCAAqC,kBAAkB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,qBAAqB;AACzD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,0BAA0B,aAAa;AACvC;AACA;AACA;AACA;AACA,SAAS;AACT,iCAAiC,kBAAkB;AACnD;AACA;AACA,yBAAyB,iBAAiB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6BAA6B,uBAAuB;AACpD;AACA,+BAA+B,uBAAuB;;AAEtD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,6DAA6D,uBAAuB;AACpF;;AAEA;AACA;AACA;;AAEA;AACA;AACA,eAAe;AACf,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB;AACpB,qBAAqB;AACrB,wBAAwB;AACxB,mBAAmB;AACnB,oBAAoB;AACpB,eAAe;AACf,kBAAkB;AAClB,wBAAwB;AACxB,4BAA4B;AAC5B,mBAAmB;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACnhDa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY,mBAAO,CAAC,gEAAiB;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB;;AAEzB,cAAc;AACd,cAAc;AACd,uBAAuB;AACvB,eAAe;AACf,eAAe;AACf,eAAe;AACf,eAAe;AACf,eAAe;AACf,eAAe;AACf,WAAW;AACX,WAAW;AACX,UAAU;AACV,WAAW;AACX,WAAW;AACX,kBAAkB;AAClB;AACA,iBAAiB;AACjB,UAAU;AACV,2CAA2C,eAAe;AAC1D,0CAA0C,eAAe;AACzD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA,eAAe,aAAa;AAC5B;AACA;;AAEA;AACA;AACA,qBAAqB,UAAU;AAC/B,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA,kBAAkB;AAClB,sCAAsC,2BAA2B;AACjE,uCAAuC;AACvC,wCAAwC;AACxC;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;AACA,eAAe,WAAW;AAC1B,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;;AAEA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA,GAAG,OAAO;AACV;AACA;AACA;AACA;;AAEA;AACA,WAAW;AACX,UAAU;AACV,YAAY;AACZ,qBAAqB;AACrB,cAAc;AACd,WAAW;AACX,WAAW;AACX,mBAAmB;AACnB,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACtVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AC/Ba;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,YAAY,mBAAO,CAAC,gEAAiB;;AAErC;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B;AAC9B;;AAEA;;;AAGA,oBAAoB,sBAAsB,qBAAqB,cAAc,EAAE;;AAE/E;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;;AAEA,kCAAkC;AAClC,iCAAiC;AACjC,iCAAiC;AACjC,4BAA4B;AAC5B,iCAAiC;;AAEjC;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA,2BAA2B;AAC3B,oBAAoB;AACpB,6BAA6B;AAC7B;;;;AAIA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,WAAW;AACX,WAAW;AACX,YAAY;AACZ,QAAQ;AACR,mBAAmB;;AAEnB,gBAAgB,kBAAkB;AAClC;AACA;;AAEA;AACA;AACA;AACA,+CAA+C;;AAE/C,0BAA0B,eAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uBAAuB,UAAU,EAAE;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ;;AAE/B;AACA;;AAEA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C,uBAAuB;AACvB,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,yBAAyB,YAAY;AACrC;AACA;AACA;AACA,yBAAyB,UAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,mBAAmB;AACnB,qBAAqB;AACrB;AACA,0CAA0C;AAC1C,eAAe;AACf,WAAW;AACX,QAAQ;;AAER;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,gBAAgB;AAC7B;AACA,oBAAoB,UAAU;AAC9B;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,QAAQ;AACR,WAAW;AACX,aAAa;AACb,WAAW;AACX,WAAW;AACX;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,yBAAyB;AACzC;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,aAAa;AACb,QAAQ,gBAAgB;AACxB;AACA,eAAe,oCAAoC;AACnD;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,kBAAkB;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,aAAa;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA,aAAa,aAAa,QAAQ,iCAAiC;AACnE,aAAa,aAAa,QAAQ,iCAAiC;AACnE,aAAa,cAAc,OAAO,+BAA+B;;AAEjE;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,eAAe;AACf,kBAAkB;AAClB;AACA,eAAe;;AAEf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,YAAY;AACZ;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;;AAEtD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B,2BAA2B;AAC3B;AACA,WAAW;AACX,SAAS;AACT,aAAa;AACb,WAAW;AACX,YAAY;;AAEZ;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,OAAO;AACP;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA,kCAAkC;AAClC;AACA,eAAe;AACf;AACA;;AAEA,kCAAkC;AAClC;AACA;AACA;AACA,oCAAoC;AACpC;AACA,OAAO;;AAEP;AACA;AACA;;AAEA,KAAK;AACL;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,oBAAoB;AACpB,WAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,WAAW;AACxB;AACA;AACA;;AAEA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uCAAuC,QAAQ,OAAO,wBAAwB;;AAE9E;AACA;AACA;AACA,eAAe;AACf;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;;AAEA,8BAA8B;;AAE9B,6BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,GAAG;;AAEH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,mBAAmB;AACnB;AACA,QAAQ;AACR,mBAAmB;AACnB,aAAa;;AAEb,wCAAwC;;AAExC,gBAAgB;AAChB,oBAAoB;AACpB,oBAAoB;;AAEpB;AACA;AACA;AACA;AACA,gDAAgD;;AAEhD,aAAa,eAAe;AAC5B;AACA;;AAEA;AACA;;AAEA,KAAK;AACL;;AAEA,KAAK;;AAEL,+BAA+B,kCAAkC;AACjE;;AAEA,KAAK;AACL;;AAEA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,KAAK;AACL;AACA;;AAEA,KAAK;AACL;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,mBAAmB;AACnB;AACA,QAAQ;AACR,mBAAmB;AACnB,aAAa;;AAEb,wCAAwC;;AAExC,gBAAgB;AAChB,oBAAoB;AACpB,oBAAoB;;AAEpB,+BAA+B;AAC/B;AACA;AACA;AACA;;AAEA,aAAa,eAAe;AAC5B;AACA;;AAEA;AACA;;AAEA,KAAK;AACL,UAAU,iCAAiC,EAAE;;AAE7C,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;AACL;AACA;;AAEA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;AACL;AACA;;AAEA,KAAK;AACL;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC,kBAAkB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA,gCAAgC;AAChC,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;;AAEA,wCAAwC;AACxC;;AAEA,wCAAwC;AACxC;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,IAAI,MAAM,GAAG,MAAM,GAAG;AAChD;AACA;AACA;AACA,SAAS,IAAI,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,IAAI,MAAM,IAAI;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,iBAAiB;AACjB,WAAW;AACX;AACA,wDAAwD;AACxD,uCAAuC;AACvC;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,iBAAiB;AACjB,WAAW;AACX;AACA,4BAA4B;AAC5B,sBAAsB;;AAEtB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,wBAAwB;;AAE1D,GAAG;AACH;AACA,4CAA4C;AAC5C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAG;;AAEH;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,kBAAkB;AAClB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB;AAChB,wBAAwB;AACxB,uBAAuB;AACvB,iBAAiB;AACjB,iBAAiB;;;;;;;;;;;;;;;ACrsCJ;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;;AC9Ca;AACb;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACNA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,qBAAqB;AACrB;AACA,wBAAwB;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,kCAAkC;AAClC;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA,6BAA6B;AAC7B;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,mCAAmC;AACnC,qBAAqB;AACrB;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,yBAAyB;AACzB,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,gDAAgD;AAChD;AACA;;AAEA;AACA,MAAM,IAA2C,EAAE,mCAAO,YAAY,qBAAqB;AAAA,kGAAC;AAC5F;AACA,MAAM,IAA8B,EAAE,oBAAoB;AAC1D;AACA,OAAO,EAAsE;AAC7E;AACA,MAAM,IAA6B;AACnC;AACA;;AAEA,CAAC;;;;;;;;;;;;;ACxdD;AACA;AACA;AACA;AACA;;AAEA,cAAc;;AAEd;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,wCAAwC,SAAS;AACjD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,UAAU;AACrC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,IAAI,IAA0C,EAAE,mCAAO,YAAY,iBAAiB,EAAE;AAAA,kGAAC;AACvF,KAAK,EAI2B;;AAEhC,CAAC;;;;;;;;;;;;;;;;AC1HY;;AAEb,kGAAyC;;;;;;;;;;;;;;;ACFzC;AACA;AACa;;;AAGb;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,YAAY;AAC/B,mBAAmB,YAAY;;AAE/B;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,cAAc;AAC/B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;;;;;;;;;;;;;;AC3La;;AAEb;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,MAAM,MAAM;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;;ACvGa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,kCAAkC,qBAAqB;AACvD,kBAAkB;AAClB,oBAAoB;AACpB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,iBAAiB,uBAAuB;AACxC;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B,iBAAiB;;AAE5C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;;;;;;;;;;;;;;AC/Ia;;;AAGb,mBAAmB;;AAEnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC;AACpC;;AAEA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,SAAS;AACT,yBAAyB,OAAO;AAChC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,GAAG;;AAEH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACtTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;;AAGb,qBAAqB,mBAAO,CAAC,8DAAc;AAC3C,qBAAqB,mBAAO,CAAC,wEAAmB;AAChD,qBAAqB,mBAAO,CAAC,sDAAU;AACvC,qBAAqB,mBAAO,CAAC,gDAAO;AACpC,qBAAqB,mBAAO,CAAC,wDAAW;;;AAGxC;AACA;AACA;AACA,mCAAmC,0BAA0B;;AAE7D;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kDAAkD,oBAAoB,EAAE;AACxE;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA,wBAAwB,QAAQ;;AAEhC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;;AAGA;AACA;AACA;AACA;;AAEA,6BAA6B,QAAQ;;AAErC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA,iBAAiB,0BAA0B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,gBAAgB;AACzC;AACA;AACA;;AAEA;AACA;AACA,yBAAyB,gBAAgB;AACzC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,QAAQ;AAC3B;AACA,SAAS;AACT;AACA;AACA,GAAG;;AAEH;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA,qBAAqB,aAAa;;AAElC;;AAEA,aAAa,qBAAqB;AAClC;AACA,iBAAiB,4BAA4B;AAC7C;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,QAAQ;;AAElC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,cAAc;AACjC,gCAAgC;AAChC;AACA;AACA,GAAG;;AAEH;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,QAAQ;;AAElC;AACA,sCAAsC,QAAQ;;AAE9C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,cAAc;AACjC,gCAAgC;AAChC;AACA;AACA,GAAG;;AAEH;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA,GAAG;;AAEH;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;;AAEvB,yBAAyB;AACzB;;AAEA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK,2BAA2B;AAChC;;AAEA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;AAGA;;;;;;;;;;;;;;;ACxoBa;;;AAGb,aAAa,mBAAO,CAAC,sDAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,uBAAuB,QAAQ;;AAE/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;;;;;;;;;;;;;;;;;;;;ACtFA;AACA;AACA,kBAAkB,OAAO;AACzB,kBAAkB,MAAM;AACxB,aAAa,MAAM;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB,kBAAkB,QAAQ;AAC1B,aAAa,QAAQ;AACrB;AACO;AACP;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;ACxBA,CAAyC;AACF;AACR;AACK;AACJ;AACD;;AAE/B;AACA;AACA,yCAAyC,SAAS;AAClD,aAAa,SAAS;AACtB;AACA;AACA;AACA,KAAK,+CAA+C;AACpD,KAAK,oCAAoC;AACzC,KAAK,8BAA8B;AACnC,KAAK,4CAA4C;AACjD,KAAK,2BAA2B;AAChC,KAAK,4BAA4B;AACjC,KAAK;AACL;AACA;AACA;AACA,KAAK,qCAAqC;AAC1C,KAAK,uCAAuC;AAC5C,KAAK,qCAAqC;AAC1C,KAAK,8CAA8C;AACnD,KAAK,0CAA0C;AAC/C,KAAK,wCAAwC;AAC7C,KAAK;AACL;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,uDAAU;AAC3B,SAAS;AACT;AACA;;AAEA;AACA;;AAEA,uCAAuC,qDAAS;;AAEhD,eAAe,qDAAS;;AAExB;AACA;;AAEA,uCAAuC,6CAAK;;AAE5C,eAAe,6CAAK;;AAEpB;AACA;;AAEA;AACA,iBAAiB,kDAAS;AAC1B;AACA,eAAe,kDAAS;;AAExB;AACA;AACA,eAAe,8CAAO;;AAEtB;AACA;AACA,eAAe,8CAAO;;AAEtB;AACA;AACA,eAAe,6CAAK;;AAEpB;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AC3FA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACfA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB,aAAa,OAAO;AACpB;AACA;AACA;AACA,IAAI;AACJ;AACO;AACP;AACA,gEAAgE,OAAO;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AC1BA;;AAEA;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,yBAAyB,EAAE;AACjF,sDAAsD,yBAAyB,EAAE;AACjF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,yBAAyB,EAAE;AACjF,sDAAsD,yBAAyB,EAAE;AACjF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,wBAAwB,yBAAyB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA,gCAAgC;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAA6B,WAAW;AACxC,gCAAgC;AAChC;AACA,iBAAiB,mDAAmD;AACpE;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA,4BAA4B,+BAA+B;AAC3D,4BAA4B,6BAA6B;AACzD,6BAA6B,UAAU;AACvC,kCAAkC,iBAAiB;AACnD,8BAA8B,oBAAoB;AAClD,kCAAkC,6DAA6D;AAC/F,6BAA6B,mBAAmB;;AAEhD;AACA;AACA,8BAA8B,qBAAqB;AACnD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,YAAY;AACZ;;AAEA;AACA,YAAY;AACZ;;AAEA;AACA,YAAY;AACZ;;AAEA;AACA,YAAY;AACZ;;AAEA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,uBAAuB,iCAAiC;AACxD;;AAEA;AACA;;AAEA,gCAAgC,QAAQ;;AAExC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mCAAmC,QAAQ;;AAE3C;AACA;AACA,gDAAgD;AAChD,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAKE;;AAEF,iEAAe;AACf;AACA;AACA,CAAC,EAAC;;;;;;;;;;;;;;;;;;;;;AC16CF,CAA8D;;AAE9D;AACA;AACA;AACA,2BAA2B,OAAO;AAClC,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA,KAAK,qCAAqC;AAC1C,KAAK,8BAA8B;AACnC,KAAK;AACL;AACA;AACA;AACA,IAAI;AACJ;AACO;AACP,SAAS,4EAAK;AACd;;;;;;;;;;;;;;;;;;;;;;;ACrBA,CAAmC;AACI;AACM;;AAE7C;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,aAAa,OAAO;AACpB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB,iDAAO;AAC3B,uBAAuB,qDAAS;;AAEhC;AACA,SAAS,2DAAY;AACrB;;;;;;;;;;;;;;;;;;;;ACpDA;AACA;AACA,aAAa,OAAO;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACb8B;AACF;AACA;AACF;AACD;AACO;AACR;AACD;AACA;AACD;AACI;AACC;AACA;AACI;AACD;AACE;AACQ;;;;;;;;;;;;;;;;;;;;AChBxC;AACA;AACA,kBAAkB,OAAO;AACzB,aAAa,OAAO;AACpB;AACO;AACP;;AAEA,SAAS,mBAAmB;;AAE5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;ACpBA,CAA6C;;AAE7C;AACA;AACA,kBAAkB,OAAO;AACzB,YAAY,QAAQ;AACpB;;AAEO;AACP,SAAS,gDAAQ;AACjB;AACA,IAAI,iDAAS;AACb;AACA,IAAI,iDAAS;AACb;AACA,IAAI,iDAAS;AACb;AACA,IAAI,iDAAS;AACb;AACA,IAAI,iDAAS;AACb;AACA,IAAI,iDAAS;AACb;;;;;;;;;;;;;;;;;;;;;;;;;ACtBA,CAAqC;AACE;AACA;;AAEvC,OAAO,eAAe;AACtB;AACA;AACA,iBAAiB,OAAO;AACxB,gBAAgB,OAAO;AACvB,gBAAgB,OAAO;AACvB,aAAa,OAAO;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,mDAAW,QAAQ,mDAAW;AACpC;AACA;;AAEA,SAAS,qDAAS;AAClB,IAAI,qDAAS;AACb;AACA,IAAI,qDAAS;AACb;AACA;;AAEA;AACA;AACA,iBAAiB,OAAO;AACxB,gBAAgB,OAAO;AACvB,gBAAgB,OAAO;AACvB,aAAa,OAAO;AACpB;AACO;AACP;AACA;;;;;;;;;;;;;;;;;;;;;;;AC3CA,CAAqC;AACE;AACA;;AAEvC;AACA;AACA,cAAc,OAAO;AACrB,qBAAqB,OAAO;AAC5B,gBAAgB,OAAO;AACvB,gBAAgB,OAAO;AACvB,aAAa,OAAO;AACpB;AACO;AACP,MAAM,mDAAW;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,mDAAW,QAAQ,mDAAW;AACpC;AACA;;AAEA,SAAS,qDAAS;AAClB,IAAI,qDAAS;AACb;AACA,IAAI,qDAAS;AACb;AACA;;;;;;;;;;;;;;;;;;;;ACjCA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,aAAa,OAAO;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;ACfA;AACA,OAAO,MAAM;;AAEb;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,aAAa,OAAO;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,aAAa,OAAO;AACpB;AACO;AACP;AACA;;;;;;;;;;;;;;;;;;;;AC5BA;AACA;AACA,kBAAkB,OAAO;AACzB,uBAAuB,OAAO;AAC9B,aAAa,OAAO;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACfA;AACA;AACA,kBAAkB,OAAO;AACzB,aAAa,OAAO;AACpB;AACO;AACP;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB,aAAa,OAAO;AACpB;AACO;AACP;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB,aAAa,OAAO;AACpB;AACO;AACP,mBAAmB,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS;AACxF;;;;;;;;;;;;;;;;;;;;;;ACzBA;AACA;AACA,oBAAoB,qBAAqB;AACzC,aAAa,OAAO;AACpB;AACO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,qBAAqB;AACzC,aAAa,OAAO;AACpB;AACO;AACP;AACA;;;;;;;;;;;;;;;;;;;;AC5CA;AACA;AACA,cAAc,OAAO;AACrB,oBAAoB,OAAO;AAC3B,aAAa,OAAO;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;ACfO;AACP;AACA;;AAEO;AACP;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;;;;;AClBA,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC,E;;;;;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;;AAEA;AACA,C;;;;;;;;;;;;;;;;;;;;ACbA,CAAqC;AACrC;AACA;AACA;AACA;;AAEA;;AAEA,eAAe,SAAS;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA,ygBAAygB;AACzgB;AACA;AACA;AACA;;AAEA,OAAO,qDAAQ;AACf;AACA;;AAEA;AACA;;AAEA,iEAAe,SAAS,E;;;;;;;;;;;;;;;;;;;;;AC7BxB,CAA2B;AACY;AACvC;AACA;AACA;;AAEA;;AAEA,cAAc;;;AAGd;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA;;AAEA;AACA,sDAAsD,4CAAG;;AAEzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA,uEAAuE;AACvE;;AAEA,2EAA2E;;AAE3E,6DAA6D;;AAE7D;AACA;AACA,GAAG;AACH;;;AAGA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;;AAEA;AACA;AACA,uBAAuB;;AAEvB,0BAA0B;;AAE1B;AACA;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA,sBAAsB;;AAEtB,mCAAmC;;AAEnC,6BAA6B;;AAE7B,iCAAiC;;AAEjC,2BAA2B;;AAE3B,iBAAiB,OAAO;AACxB;AACA;;AAEA,gBAAgB,sDAAS;AACzB;;AAEA,iEAAe,EAAE,E;;;;;;;;;;;;;;;;;;;;AC9FjB,CAA+B;;AAE/B;AACA,qCAAqC,mDAAU;AAC/C;;AAEA,iEAAe,QAAQ,E;;;;;;;;;;;;ACNvB,e;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCrBA;WACA;WACA;WACA;WACA;WACA,gCAAgC,YAAY;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,wCAAwC,yCAAyC;WACjF;WACA;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,EAAE;WACF;WACA;WACA,CAAC,I;;;;;WCPD,sF;;;;;WCAA;WACA;WACA;WACA,sDAAsD,kBAAkB;WACxE;WACA,+CAA+C,cAAc;WAC7D,E;;;;UCNA;UACA;UACA;UACA","file":"urpflanze.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Urpflanze\"] = factory();\n\telse\n\t\troot[\"Urpflanze\"] = factory();\n})(window, function() {\nreturn ","/**\n * Convert color to IConvertedColor\n * Supported format: 'hsla?' 'rgba?' 'hex{3,8}' number (0xFFFFFF[FF])\n *\n * @internal\n * @ignore\n * @param {(string | number)} color\n * @returns {(IConvertedColor | undefined)}\n */\nexport function parseColorAndConvert(color) {\n var parsed = parseColor(color);\n if (parsed) {\n if (parsed.type === 'hsl') {\n var _a = hslToRgb(parsed.a, parsed.b, parsed.c), r = _a[0], g = _a[1], b = _a[2];\n return {\n r: r,\n g: g,\n b: b,\n h: parsed.a,\n s: parsed.b,\n l: parsed.c,\n alpha: parsed.alpha,\n };\n }\n else {\n var _b = rgbToHsl(parsed.a, parsed.b, parsed.c), h = _b[0], s = _b[1], l = _b[2];\n return {\n h: h,\n s: s,\n l: l,\n r: parsed.a,\n g: parsed.b,\n b: parsed.c,\n alpha: parsed.alpha,\n };\n }\n }\n}\n/**\n * Convert color to IColor\n * Supported format: 'hsla?' 'rgba?' 'hex{3,8}' number (0xFFFFFF[FF])\n *\n * @internal\n * @ignore\n * @param {(string | number)} color\n * @returns {(IColor | undefined)}\n */\nexport function parseColor(color) {\n if (typeof color === 'number') {\n if (color > 0xffffff) {\n return {\n type: 'rgb',\n a: (color >> 24) & 255,\n b: (color >> 16) & 255,\n c: (color >> 8) & 255,\n alpha: (color & 255) / 255,\n };\n }\n else {\n return { type: 'rgb', a: (color >> 16) & 255, b: (color >> 8) & 255, c: color & 255, alpha: 1 };\n }\n }\n color = color.replace(/\\s/g, '');\n var match = /^#([0-9a-f]{3,8})$/i.exec(color);\n if (match) {\n var hex = match[1];\n if (hex.length === 3) {\n return {\n type: 'rgb',\n a: parseInt(hex[0] + hex[0], 16),\n b: parseInt(hex[1] + hex[1], 16),\n c: parseInt(hex[2] + hex[2], 16),\n alpha: 1,\n };\n }\n else {\n return {\n type: 'rgb',\n a: parseInt(hex[0] + hex[1], 16),\n b: parseInt(hex[2] + hex[3], 16),\n c: parseInt(hex[4] + hex[5], 16),\n alpha: hex.length > 6 ? parseInt(hex.substring(6), 16) / 255 : 1,\n };\n }\n }\n match = /^((hsl|rgb)a?)\\((\\d+),(\\d+)%?,(\\d+)%?,?(.+)?\\)$/i.exec(color);\n if (match) {\n var _a = match, type = _a[2], a = _a[3], b = _a[4], c = _a[5], alpha = _a[6];\n return {\n type: type,\n a: +a,\n b: +b,\n c: +c,\n alpha: alpha ? +alpha : 1,\n };\n }\n}\n/**\n * Convert hsl color to rgb\n *\n * @internal\n * @ignore\n * @param {number} h\n * @param {number} s\n * @param {number} l\n * @returns {[number, number, number]}\n */\nexport function hslToRgb(h, s, l) {\n h /= 360;\n s /= 100;\n l /= 100;\n var r, g, b;\n if (s == 0) {\n r = g = b = l; // achromatic\n }\n else {\n var hue2rgb = function (p, q, t) {\n t += t < 0 ? 1 : t > 1 ? -1 : 0;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n };\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n return [(0.5 + r * 255) << 0, (0.5 + g * 255) << 0, (0.5 + b * 255) << 0];\n}\n/**\n * Convert rbg to hsl\n *\n * @internal\n * @ignore\n * @param {number} r\n * @param {number} g\n * @param {number} b\n * @returns {[number, number, number]} (0-360, 0-100, 0-100)\n */\nexport function rgbToHsl(r, g, b) {\n r /= 255;\n g /= 255;\n b /= 255;\n var max = Math.max(r, g, b), min = Math.min(r, g, b);\n var h, s;\n var l = (max + min) / 2;\n if (max == min) {\n h = s = 0; // achromatic\n }\n else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h = h / 6;\n }\n return [(0.5 + h * 360) << 0, (0.5 + s * 100) << 0, (0.5 + l * 100) << 0];\n}\n//# sourceMappingURL=Color.js.map","import SimplexNoise from 'simplex-noise';\nimport { ERepetitionType, IRepetition } from \"./core/types/scene-child\";\n// import SceneChild from '@core/SceneChild'\nimport { vec2 } from 'gl-matrix';\n// import Scene from '@core/Scene'\n/**\n * @ignore\n */\nexport var parseFunction = {\n suffix: '$fn:',\n parse: function (data) {\n return typeof data === 'function' && data.name !== 'SimpleAnimation' ? parseFunction.suffix + data.toString() : data;\n },\n unparse: function (data) {\n return typeof data === 'string' && data.indexOf(parseFunction.suffix) === 0\n ? eval(data.substr(parseFunction.suffix.length))\n : data;\n },\n};\n/**\n * Create Cancellable Promise\n *\n * @ignore\n * @template T\n * @param {Promise} promise\n * @returns {ICancelablePromise}\n */\nexport function cancelablePromise(promise) {\n var resolved = false;\n var canceled = false;\n var wrappedPromise = new Promise(function (resolve, reject) {\n promise\n .then(function (val) {\n resolved = true;\n canceled ? reject('canceled') : resolve(val);\n })\n .catch(function (error) {\n resolved = true;\n canceled ? reject('canceled') : reject(error);\n });\n });\n return {\n promise: wrappedPromise,\n resolved: function () { return resolved; },\n canceled: function () { return canceled; },\n cancel: function () {\n canceled = true;\n },\n };\n}\n// isDef: (object: any): boolean => typeof object !== 'undefined' && object !== null,\n/**\n * Get current timestamp in milliseconds\n *\n * @ignore\n * @returns {number}\n */\nexport function now() {\n return performance.now();\n}\n// aOr: (...args: Array): any => {\n// \tfor (let i = 0; i < args.length; i++) if (Utilities.isDef(args[i])) return args[i]\n// },\n/**\n * Convert number from radians to degrees\n *\n * @category Utilities\n *\n * @example\n * ```javascript\n * Urpflanze.toDegrees(Math.PI) // 180\n * ```\n *\n * @param {number} radians\n * @returns {number}\n */\nexport function toDegrees(radians) {\n return (radians * 180) / Math.PI;\n}\n/**\n * Convert angle from degrees to radians\n * @example\n * ```javascript\n * Urpflanze.toRadians(180) // 3.141592653589793\n * ```\n *\n * @category Utilities\n * @param {number} degrees\n * @returns {number}\n */\nexport function toRadians(degrees) {\n return (degrees * Math.PI) / 180;\n}\n// perf: (name: string, callback: any, log: boolean = false): number => {\n// \tconst t1 = now()\n// \tcallback()\n// \tconst t2 = now()\n// \tlog && console.log('perf ' + name + ': ' + (t2 - t1))\n// \treturn t2 - t1\n// }\n/**\n * Force value to array\n *\n * @ignore\n * @param {(number | Array)} t\n * @returns {Array}\n */\nexport function toArray(t) {\n return Array.isArray(t) ? t : [t, t];\n}\n/**\n * Linear interpolation from `a` when `i` as 0 an `b` when `i' as 1\n *\n * @category Utilities\n * @param {number} a\n * @param {number} b\n * @param {number} i\n * @returns {number}\n */\nexport function lerp(a, b, i) {\n return (1 - i) * a + i * b;\n}\n/**\n * Return number between min and max\n *\n * @category Utilities\n * @example\n * ```javascript\n * Urpflanze.clamp(0, 1, 1.2) // 1\n * Urpflanze.clamp(0, 1, -2) // 0\n * ```\n * @param {number} min\n * @param {number} max\n * @param {number} value\n * @returns {number}\n */\nexport function clamp(min, max, value) {\n return value <= min ? min : value >= max ? max : value;\n}\n/**\n * Map number between refMin e refMax from min and max\n *\n * @category Utilities\n *\n * @example\n * ```javascript\n * Urpflanze.relativeClamp(0, 1, 0.5, 100, 200) // 150\n * ```\n *\n * @param {number} refMin\n * @param {number} refMax\n * @param {number} value\n * @param {number} toMin\n * @param {number} toMax\n * @returns {number}\n */\nexport function relativeClamp(refMin, refMax, value, toMin, toMax) {\n return clamp(toMin, toMax, ((value - refMin) / (refMax - refMin)) * (toMax - toMin) + toMin);\n}\n/**\n * @internal\n * @ignore\n */\nvar noises = {\n random: new SimplexNoise(Math.random),\n};\n/**\n * SimplexNoise\n * Use 'random' as seed property for random seed.\n * Return value between -1 and 1\n *\n * @category Utilities\n *\n * @param {string} [seed='random']\n * @param {number} [x=0]\n * @param {number} [y=0]\n * @param {number} [z=0]\n * @returns {number}\n */\nexport function noise(seed, x, y, z) {\n if (seed === void 0) { seed = 'random'; }\n if (x === void 0) { x = 0; }\n if (y === void 0) { y = 0; }\n if (z === void 0) { z = 0; }\n if (typeof noises[seed] === 'undefined') {\n noises[seed] = new SimplexNoise(seed);\n }\n return noises[seed].noise3D(x, y, z);\n}\n/**\n * Return angle (atan) from offset (or center) for matrix repetition.\n * Offset is array between [-1, -1] and [1, 1].\n * The return value is between -Math.PI / 2 and Math.PI / 2\n *\n * @category Utilities\n *\n * @param {IRepetition} repetition\n * @param {vec2} offsetFromCenter\n * @returns {number}\n */\nexport function angleFromRepetition(repetition, offsetFromCenter) {\n if (offsetFromCenter === void 0) { offsetFromCenter = [0, 0]; }\n if (repetition.type == ERepetitionType.Matrix) {\n var centerMatrix = vec2.fromValues((repetition.col.count - 1) / 2, (repetition.row.count - 1) / 2);\n centerMatrix[0] += centerMatrix[0] * offsetFromCenter[0];\n centerMatrix[1] += centerMatrix[1] * offsetFromCenter[1];\n var x = repetition.col.index - 1 - centerMatrix[0];\n var y = repetition.row.index - 1 - centerMatrix[1];\n return x === 0 ? 0 : Math.atan(y / x);\n }\n return (repetition.angle - Math.PI) / 2;\n}\n/**\n * Return angle (atan2, 4 quadrants) from offset (or center) for matrix repetition.\n * Offset is array between [-1, -1] and [1, 1].\n * The return value is between -Math.PI an Math.PI\n *\n * @category Utilities\n *\n * @param {IRepetition} repetition\n * @param {vec2} offsetFromCenter\n * @returns {number}\n */\nexport function angle2FromRepetition(repetition, offsetFromCenter) {\n if (offsetFromCenter === void 0) { offsetFromCenter = [0, 0]; }\n if (repetition.type == ERepetitionType.Matrix) {\n var centerMatrix = vec2.fromValues((repetition.col.count - 1) / 2, (repetition.row.count - 1) / 2);\n centerMatrix[0] += centerMatrix[0] * offsetFromCenter[0];\n centerMatrix[1] += centerMatrix[1] * offsetFromCenter[1];\n var x = repetition.col.index - 1 - centerMatrix[0];\n var y = repetition.col.index - 1 - centerMatrix[1];\n return x === 0 ? 0 : Math.atan2(y, x);\n }\n return repetition.angle - Math.PI;\n}\n/**\n * Return distance from offset (or center) for matrix repetition.\n * The return value is between 0 and 1\n *\n * @category Utilities\n *\n * @param {IRepetition} repetition\n * @param {vec2} offsetFromCenter offset relative to distance prop\n * @returns {number}\n */\nexport function distanceFromRepetition(repetition, offsetFromCenter) {\n if (offsetFromCenter === void 0) { offsetFromCenter = [0, 0]; }\n if (repetition.type == ERepetitionType.Matrix) {\n var centerMatrix = vec2.fromValues(0.5, 0.5);\n centerMatrix[0] += centerMatrix[0] * offsetFromCenter[0];\n centerMatrix[1] += centerMatrix[1] * offsetFromCenter[1];\n var current = vec2.fromValues(repetition.col.offset - 0.5 / repetition.col.count, repetition.row.offset - 0.5 / repetition.row.count);\n return vec2.distance(current, centerMatrix);\n }\n return 1;\n}\n// /**\n// * Get value percentage of scene width.\n// *\n// * @param {number} percentage\n// * @param {SceneChild} sceneChild\n// * @returns {number}\n// */\n// percW: (percentage: number, sceneChild: SceneChild | Scene): number => {\n// \tif (sceneChild instanceof Scene) return (sceneChild.width * percentage) / 100\n// \treturn sceneChild && sceneChild.scene ? (sceneChild.scene.width * percentage) / 100 : percentage\n// },\n// /**\n// * Get value percentage of scene height.\n// *\n// * @param {number} percentage\n// * @param {SceneChild} sceneChild\n// * @returns {number}\n// */\n// percH: (percentage: number, sceneChild: SceneChild | Scene): number => {\n// \tif (sceneChild instanceof Scene) return (sceneChild.height * percentage) / 100\n// \treturn sceneChild && sceneChild.scene ? (sceneChild.scene.height * percentage) / 100 : percentage\n// },\n//# sourceMappingURL=Utilites.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport Scene from \"./Scene\";\nimport SceneChild from \"./SceneChild\";\nimport ShapeBase from \"./shapes/ShapeBase\";\nimport Bounding from \"./math/bounding\";\n/**\n * A SceneChild container, propagates properties to children\n *\n * @order 3\n * @category Core.Scene\n * @extends {SceneChild}\n * @example\n * ```javascript\n * // Group example\n *\n * const rect = new Urpflanze.Rect({\n * \tdistance: 100 // <- if a property is set the group will not overwrite it\n * })\n * const group = new Urpflanze.Group({\n * \trepetitions: 3,\n * \tdistance: 200\n * })\n *\n * group.add(rect)\n * group.add(new Urpflanze.Triangle())\n * ```\n * @class Group\n */\nvar Group = /** @class */ (function (_super) {\n __extends(Group, _super);\n /**\n * Creates an instance of Group\n *\n * @param {ISceneChildSettings} [settings={}]\n * @memberof Group\n */\n function Group(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = 'Group';\n _this = _super.call(this, settings) || this;\n _this.children = [];\n ['id', 'name', 'data', 'order', 'type'].forEach(function (prop) {\n if (prop in settings)\n delete settings[prop];\n });\n _this.props = settings;\n return _this;\n }\n /**\n * Check group has static children\n *\n * @returns {boolean}\n * @memberof Group\n */\n Group.prototype.isStatic = function () {\n var children = this.children;\n for (var i = 0, len = children.length; i < len; i++)\n if (!children[i].isStatic())\n return false;\n return true;\n };\n /**\n * Check group has static children indexed\n *\n * @returns {boolean}\n * @memberof Group\n */\n Group.prototype.isStaticIndexed = function () {\n var children = this.children;\n for (var i = 0, len = children.length; i < len; i++)\n if (!children[i].isStaticIndexed())\n return false;\n return true;\n };\n /**\n * Add item to Group\n *\n * @param {Array} items\n * @memberof Group\n */\n Group.prototype.add = function () {\n var _this = this;\n var items = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n items[_i] = arguments[_i];\n }\n var _loop_1 = function (i, len) {\n var item = items[i];\n var rawItemProps = item.getProps();\n Object.keys(this_1.props).forEach(function (propKey) {\n if (typeof rawItemProps[propKey] === 'undefined')\n item.setProp(propKey, _this.props[propKey]);\n });\n item.order =\n typeof item.order !== 'undefined'\n ? item.order\n : this_1.children.length > 0\n ? Math.max.apply(this_1, this_1.children.map(function (e) { return e.order || 0; })) + 1\n : 0;\n this_1.scene && Scene.propagateToChilden(item, this_1.scene);\n this_1.children.push(item);\n };\n var this_1 = this;\n for (var i = 0, len = items.length; i < len; i++) {\n _loop_1(i, len);\n }\n this.sortChildren();\n };\n /**\n * Sort children\n *\n * @memberof Group\n */\n Group.prototype.sortChildren = function () {\n this.children.sort(function (a, b) { return a.order - b.order; });\n this.children = this.children.map(function (child, index) {\n child.order = index;\n return child;\n });\n this.clearBuffer(true);\n };\n /**\n * Return shape children\n *\n * @returns {Array}\n * @memberof Group\n */\n Group.prototype.getChildren = function () {\n return this.children;\n };\n /**\n * Find scene child from id or name\n *\n * @param {number | string} idOrName\n * @returns {(SceneChild | null)}\n * @memberof Group\n */\n Group.prototype.find = function (idOrName) {\n if (this.id === idOrName || this.name === idOrName)\n return this;\n var children = this.getChildren();\n for (var i = 0, len = children.length; i < len; i++) {\n var result = children[i].find(idOrName);\n if (result !== null)\n return result;\n }\n return null;\n };\n /**\n * Get item from group\n *\n * @param {number} index\n * @returns {(SceneChild | null)}\n * @memberof Group\n */\n Group.prototype.get = function (index) {\n return index >= 0 && index < this.children.length ? this.children[index] : null;\n };\n /**\n * Remove item from group\n *\n * @param {number} index\n * @returns {(false | Array)}\n * @memberof Group\n */\n Group.prototype.remove = function (index) {\n if (index >= 0 && index < this.children.length) {\n var removed = this.children.splice(index, 1);\n this.clearBuffer(true);\n return removed;\n }\n return false;\n };\n /**\n * Remove from id\n *\n * @param {number} id\n * @memberof Scene\n */\n Group.prototype.removeFromId = function (id) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i].id == id) {\n this.children.splice(i, 1);\n return this.clearBuffer(true);\n }\n }\n };\n /**\n * Generate children buffers\n *\n * @param {number} generateId\n * @param {boolean} [bDirectSceneChild=false]\n * @param {ISceneChildPropArguments} [parentPropArguments]\n * @memberof Group\n */\n Group.prototype.generate = function (generateId, bDirectSceneChild, parentPropArguments) {\n if (bDirectSceneChild === void 0) { bDirectSceneChild = false; }\n this.children.forEach(function (item) { return item.generate(generateId, bDirectSceneChild, parentPropArguments); });\n };\n /**\n * Sum the children bounding\n *\n * @return {IShapeBounding}\n */\n Group.prototype.getBounding = function () {\n var boundings = [];\n var bounding = Bounding.empty();\n if (this.children.length > 0) {\n this.children.forEach(function (item) { return boundings.push(item.getBounding()); });\n for (var i = 0, len = this.children.length; i < len; i++) {\n bounding.x = bounding.x > boundings[i].x ? boundings[i].x : bounding.x;\n bounding.y = bounding.y > boundings[i].y ? boundings[i].y : bounding.y;\n bounding.width = bounding.width < boundings[i].width ? boundings[i].width : bounding.width;\n bounding.height = bounding.height < boundings[i].height ? boundings[i].height : bounding.height;\n }\n bounding.cx = bounding.x + bounding.width / 2;\n bounding.cy = bounding.y + bounding.height / 2;\n }\n return bounding;\n };\n /**\n * Chear children buffer\n *\n * @param {boolean} [bClearIndexed=false]\n * @param {boolean} [bPropagateToParents=false]\n * @memberof Group\n */\n Group.prototype.clearBuffer = function (bClearIndexed, bPropagateToParents) {\n if (bClearIndexed === void 0) { bClearIndexed = false; }\n if (bPropagateToParents === void 0) { bPropagateToParents = true; }\n this.children.forEach(function (item) { return item.clearBuffer(bClearIndexed, false); });\n if (this.scene && bPropagateToParents) {\n var parents = this.scene.getParentsOfSceneChild(this);\n parents.length > 0 && parents[parents.length - 1].clearBuffer(bClearIndexed, bPropagateToParents /* true */);\n }\n // if (bPropagateToParents && this.scene)\n // {\n // const parents = this.scene.getParentsOfSceneChild(this)\n // parents.length > 0 && parents[parents.length - 1].clearBuffer(bClearIndexed, true, false)\n // }\n // if (bPropagateToChildren)\n // {\n // this.children.forEach(sceneChild => sceneChild.clearBuffer(bClearIndexed, false, true))\n // }\n };\n /**\n * Set a single or multiple props\n *\n * @abstract\n * @param {(keyof ISceneChildProps | ISceneChildProps)} key\n * @param {*} [value]\n * @memberof SceneChild\n */\n Group.prototype.setProp = function (key, value) {\n var _this = this;\n if (typeof key === 'object')\n Object.keys(key).forEach(function (k) { return (_this.props[k] = key[k]); });\n else\n this.props[key] = value;\n this.children.forEach(function (item) { return item.setProp(key, value); });\n };\n /**\n * Set a single or multiple props\n *\n * @param {(keyof ISceneChildProps | ISceneChildProps)} key\n * @param {*} [value]\n * @memberof ShapeBase\n */\n Group.prototype.setPropUnsafe = function (key, value) {\n _super.prototype.setPropUnsafe.call(this, key, value);\n this.children.forEach(function (item) { return item.setPropUnsafe(key, value); });\n };\n /**\n * Return length of buffer\n *\n * @param {ISceneChildPropArguments} propArguments\n * @returns {number}\n * @memberof Group\n */\n Group.prototype.getBufferLength = function (propArguments) {\n return this.children.map(function (sceneChild) { return sceneChild.getBufferLength(propArguments); }).reduce(function (p, c) { return p + c; }, 0);\n };\n /**\n * return a single buffer binded from children\n *\n * @returns {Float32Array}\n * @memberof Group\n */\n Group.prototype.getBuffer = function () {\n var buffers = this.children\n .map(function (item) { return item.getBuffer(); })\n .filter(function (b) { return b !== undefined; });\n var size = buffers.reduce(function (currLength, buffer) { return currLength + buffer.length; }, 0);\n if (size > 0) {\n var result = new Float32Array(size);\n result.set(buffers[0], 0);\n for (var i = 1, offset = 0, len = buffers.length; i < len; i++) {\n offset += buffers[i - 1].length;\n result.set(buffers[i], offset);\n }\n return result;\n }\n return ShapeBase.EMPTY_BUFFER;\n };\n /**\n * return a single buffer binded from children\n *\n * @returns {(Array | undefined)}\n * @memberof Group\n */\n Group.prototype.getIndexedBuffer = function () {\n var indexed = this.children.map(function (item) { return item.getIndexedBuffer(); }).filter(function (b) { return b !== undefined; });\n return [].concat.apply([], indexed);\n };\n /**\n * Call strem on children\n *\n * @param {(streamArguments: IStreamArguments) => void} callback\n * @memberof Group\n */\n Group.prototype.stream = function (callback) {\n this.children.forEach(function (item) { return item.stream(callback); });\n };\n return Group;\n}(SceneChild));\nexport default Group;\n//# sourceMappingURL=Group.js.map","import SceneChild from \"./SceneChild\";\nimport Group from \"./Group\";\nimport Shape from \"./shapes/Shape\";\n/**\n * Container for all SceneChild.\n * The main purpose is to manage the drawing order and update the child buffers\n *\n * @order 1\n * @category Core.Scene\n * @class Scene\n */\nvar Scene = /** @class */ (function () {\n /**\n * Creates an instance of Scene.\n * You can see the default values in the property definitions\n */\n function Scene(settings) {\n if (settings === void 0) { settings = {}; }\n /**\n * Logical number, the drawer will take care of defining the unit of measure\n */\n this.width = 400;\n /**\n * Logical number, the drawer will take care of defining the unit of measure\n */\n this.height = 400;\n /**\n * Default background color (black)\n */\n this.background = 'hsla(0, 0%, 0%, 1)';\n /**\n * Default ScenePrimitive stroke color (white)\n */\n this.color = 'hsla(0, 0%, 100%, 1)';\n /**\n * Current time\n */\n this.currentTime = 0;\n if (typeof settings.width !== 'undefined')\n this.width = settings.width;\n if (typeof settings.height !== 'undefined')\n this.height = settings.height;\n if (typeof settings.background !== 'undefined')\n this.background = settings.background;\n if (typeof settings.color !== 'undefined')\n this.color = settings.color;\n this.children = [];\n this.center = [this.width / 2, this.height / 2];\n }\n /**\n * Return width percentage\n *\n * @param {number} [percentage=100]\n * @returns {number}\n */\n Scene.prototype.getWidth = function (percentage) {\n if (percentage === void 0) { percentage = 100; }\n return (this.width * percentage) / 100;\n };\n /**\n * Return height percentage\n *\n * @param {number} [percentage=100]\n * @returns {number}\n */\n Scene.prototype.getHeight = function (percentage) {\n if (percentage === void 0) { percentage = 100; }\n return (this.height * percentage) / 100;\n };\n /**\n * Resize the scene size\n *\n * @param {number} width\n * @param {number} [height=width]\n * @memberof Scene\n */\n Scene.prototype.resize = function (width, height) {\n if (height === void 0) { height = width; }\n this.width = width;\n this.height = height;\n this.center = [this.width / 2, this.height / 2];\n this.children.forEach(function (sceneChild) { return sceneChild.clearBuffer(true, false); });\n };\n /**\n * Update all children, generate a streamable buffer for drawing\n *\n * @param {number} [atTime] time in ms\n * @memberof Scene\n */\n Scene.prototype.update = function (atTime) {\n this.currentTime = atTime;\n for (var i = 0, len = this.children.length; i < len; i++) {\n this.children[i].generate(this.currentTime, true);\n }\n };\n /**\n * Traverse the child buffer and use it with callback\n *\n * @param {(streamArguments: IStreamArguments) => void} callback\n * @memberof Scene\n */\n Scene.prototype.stream = function (callback) {\n this.children.forEach(function (sceneChild) { return sceneChild.stream(callback); });\n };\n /*\n |--------------------------------------------------------------------------\n | SceneChild\n |--------------------------------------------------------------------------\n */\n /**\n * Return a list of children\n *\n * @returns {Array}\n * @memberof Scene\n */\n Scene.prototype.getChildren = function () {\n return this.children;\n };\n /**\n * Add SceneChild to Scene, pass `order` as last parameter for drawing priorities\n *\n * @param {Array} items\n * @param {number} [order]\n * @memberof Scene\n */\n Scene.prototype.add = function () {\n var items = []; /**, order: number */\n for (var _i = 0 /**, order: number */; _i < arguments.length /**, order: number */; _i++ /**, order: number */) {\n items[_i] = arguments[_i]; /**, order: number */\n }\n var order = typeof items[items.length - 1] === 'number' ? items[items.length - 1] : undefined;\n var len = items.length - (typeof order === 'undefined' ? 0 : 1);\n for (var i = 0; i < len; i++) {\n var item = items[i];\n item.order =\n typeof order !== 'undefined'\n ? order + i\n : typeof item.order !== 'undefined'\n ? item.order\n : this.children.length > 0\n ? Math.max.apply(this, this.children.map(function (e) { return e.order || 0; })) + 1\n : 0;\n Scene.propagateToChilden(item, this);\n this.children.push(item);\n item.clearBuffer(true, false);\n }\n this.sortChildren();\n };\n /**\n * Sort children by order\n *\n * @memberof Scene\n */\n Scene.prototype.sortChildren = function () {\n this.children.sort(function (a, b) { return a.order - b.order; });\n this.children = this.children.map(function (child, index) {\n child.order = index;\n return child;\n });\n };\n /**\n * Find sceneChild from id or name in the whole scene\n *\n * @param {string | number} idOrName\n * @returns {(SceneChild | null)}\n * @memberof Scene\n */\n Scene.prototype.find = function (idOrName) {\n var children = this.getChildren();\n for (var i = 0, len = children.length; i < len; i++) {\n var result = children[i].find(idOrName);\n if (result !== null)\n return result;\n }\n return null;\n };\n /**\n * Get shape by index\n *\n * @param {number} index\n * @returns {(SceneChild | null)}\n * @memberof Scene\n */\n Scene.prototype.get = function (index) {\n return index >= 0 && index < this.children.length ? this.children[index] : null;\n };\n /**\n * Remove a shape by index\n *\n * @param {number} index\n * @memberof Scene\n */\n Scene.prototype.remove = function (index) {\n index >= 0 && index < this.children.length && this.children.splice(index, 1);\n };\n /**\n * Removes all children\n *\n * @memberof Scene\n */\n Scene.prototype.removeChildren = function () {\n this.children = [];\n };\n /**\n * Remove sceneChild by id or name\n *\n * @param {number | number} idOrName\n * @memberof Scene\n */\n Scene.prototype.removeFromId = function (idOrName) {\n for (var i = 0, len = this.children.length; i < len; i++)\n if (this.children[i].id === idOrName || this.children[i].name === idOrName) {\n this.children.splice(i, 1);\n return;\n }\n };\n /**\n * Return true if sceneChild is direct children\n *\n * @param {SceneChild} sceneChild\n * @returns {boolean}\n * @memberof Scene\n */\n Scene.prototype.isFirstLevelChild = function (sceneChild) {\n for (var i = 0, len = this.children.length; i < len; i++)\n if (this.children[i].id === sceneChild.id)\n return true;\n var parents = this.getParentsOfSceneChild(sceneChild);\n return parents.length === 1 && parents[0] instanceof Group;\n };\n /**\n * Returns the list of sceneChild hierarchy starting from the scene\n *\n * @param {SceneChild} sceneChild\n * @returns {Array}\n * @memberof Scene\n */\n Scene.prototype.getParentsOfSceneChild = function (sceneChild) {\n var result = Scene.getParentsOfSceneChild(this, sceneChild);\n if (result) {\n result.splice(0, 1);\n return result;\n }\n return [];\n };\n /**\n * Returns the list of sceneChild hierarchy starting from the scene\n *\n * @static\n * @param {(Scene | SceneChild)} current\n * @param {SceneChild} sceneChild\n * @param {(Array)} [parents=[]]\n * @returns {(Array | null)}\n * @memberof Scene\n */\n Scene.getParentsOfSceneChild = function (current, sceneChild, parents) {\n if (parents === void 0) { parents = []; }\n var result;\n if (current instanceof SceneChild) {\n if (current.id == sceneChild.id)\n return parents;\n if (current instanceof Shape && current.shape) {\n var tmpParents = parents.slice();\n tmpParents.push(current);\n if ((result = Scene.getParentsOfSceneChild(current.shape, sceneChild, tmpParents)))\n return result;\n }\n }\n if (current instanceof Scene || current instanceof Group) {\n var children = current.getChildren();\n parents.push(current);\n for (var i = 0, len = children.length; i < len; i++) {\n var child = children[i];\n if ((result = Scene.getParentsOfSceneChild(child, sceneChild, parents)))\n return result;\n }\n parents.pop();\n }\n return null;\n };\n /**\n * Walk through the scene\n *\n * @static\n * @param {SceneChild} callbackk\n * @param {(Scene | SceneChild)} current\n * @memberof Scene\n */\n Scene.walk = function (callback, current) {\n if (current instanceof SceneChild) {\n if (callback(current) === false)\n return false;\n if (current instanceof Shape && current.shape)\n if (Scene.walk(callback, current.shape) === false)\n return false;\n }\n if (current instanceof Scene || current instanceof Group) {\n var children = current.getChildren();\n for (var i = 0, len = children.length; i < len; i++) {\n var child = children[i];\n if (Scene.walk(callback, child) === false)\n return false;\n }\n }\n };\n /**\n * Propagate scene to sceneChild (and children)\n *\n * @static\n * @param {SceneChild} sceneChild\n * @param {Scene} scene\n * @memberof Scene\n */\n Scene.propagateToChilden = function (sceneChild, scene) {\n sceneChild.scene = scene;\n if (sceneChild instanceof Group) {\n sceneChild.getChildren().forEach(function (item) {\n Scene.propagateToChilden(item, scene);\n });\n }\n else if (sceneChild instanceof Shape && sceneChild.shape) {\n sceneChild.shape.scene = scene;\n Scene.propagateToChilden(sceneChild.shape, scene);\n }\n };\n return Scene;\n}());\nexport default Scene;\n//# sourceMappingURL=Scene.js.map","/**\n * Autoincrement sceneChild default id\n *\n * @internal\n * @ignore\n */\nvar __id = 0;\n/**\n * The element to be added into a scene.\n * Preserve props, drawing order, generate and return buffers.\n * The only implementations of this class are Group and ShapeBase\n *\n * @abstract\n * @category Core.Abstract\n * @order 2\n * @class SceneChild\n */\nvar SceneChild = /** @class */ (function () {\n /**\n * Creates an instance of SceneChild.\n * Base values will be assigned in case they are not passed\n *\n * @param {ISceneChildSettings} settings\n */\n function SceneChild(settings) {\n var _a;\n this.id = (_a = settings.id) !== null && _a !== void 0 ? _a : ++__id;\n this.type = settings.type || 'SceneChild';\n this.name = settings.name || this.type + '_' + this.id;\n this.data = settings.data || {};\n this.props = {};\n }\n /**\n * Find this or form or children.\n * Overridden by classes that extend it\n *\n * @param {string | number} idOrName\n * @returns {(SceneChild | null)}\n */\n SceneChild.prototype.find = function (idOrName) {\n if (this.id === idOrName || this.name === idOrName)\n return this;\n return null;\n };\n /**\n * Return the sceneChild properties\n *\n * @returns {ISceneChildProps}\n */\n SceneChild.prototype.getProps = function () {\n return this.props;\n };\n /**\n * Return a sceneChild prop or default value\n *\n * @param {keyof ISceneChildProps} key\n * @param {ISceneChildPropArguments} [propArguments]\n * @param {*} [defaultValue]\n * @returns {*}\n */\n SceneChild.prototype.getProp = function (key, propArguments, defaultValue) {\n var _a;\n return ((_a = this.props[key]) !== null && _a !== void 0 ? _a : defaultValue);\n };\n /**\n * Set a single or multiple props\n *\n * @param {(keyof ISceneChildProps | ISceneChildProps)} key\n * @param {*} [value]\n */\n SceneChild.prototype.setPropUnsafe = function (key, value) {\n var _this = this;\n if (typeof key == 'string')\n this.props[key] = value;\n else\n Object.keys(key).forEach(function (k) {\n return (_this.props[k] = key[k]);\n });\n };\n return SceneChild;\n}());\nexport default SceneChild;\n//# sourceMappingURL=SceneChild.js.map","/**\n * Temporany matrix\n *\n * @internal\n * @ignore\n */\nvar MATRIX = new Array(4);\n/**\n * Vec2 operation\n *\n * @category Core.Utilities\n */\nvar Vec2 = {\n /**\n * Create new vertex\n *\n * @param {Array | number} [x=0]\n * @param {number} [y]\n * @returns {Array}\n */\n create: function (x, y) {\n if (x === void 0) { x = 0; }\n var out = new Array(2);\n if (typeof x === 'number') {\n out[0] = x;\n out[1] = y !== null && y !== void 0 ? y : x;\n }\n else {\n out[0] = x[0];\n out[1] = x[1];\n }\n return out;\n },\n normalize: function (v) {\n var len = Vec2.length(v);\n return len !== 0 ? [v[0] / len, v[1] / len] : [0, 0];\n },\n /**\n * Distance between two points\n *\n * @param {Array} a\n * @param {Array} b\n * @returns {number}\n */\n distance: function (a, b) { return Math.hypot(b[0] - a[0], b[1] - a[1]); },\n /**\n * dot product\n *\n * @param {Array} a\n * @param {Array} b\n * @returns {number}\n */\n dot: function (a, b) { return a[0] * b[0] + a[1] * b[1]; },\n /**\n * length of point\n *\n * @param {Array} vec\n * @returns {number}\n */\n length: function (vec) { return Math.hypot(vec[0], vec[1]); },\n /**\n * angle between two point\n *\n * @param {Array} a\n * @param {Array} b\n * @returns {number}\n */\n angle: function (a, b) {\n a = Vec2.normalize(a);\n b = Vec2.normalize(b);\n return Math.acos(Vec2.dot(a, b));\n },\n /**\n * skewX point\n *\n * @param {Array} vec\n * @param {number} m\n */\n skewX: function (vec, m) {\n vec[0] += Math.tan(m) * vec[1];\n },\n /**\n * skewY point\n *\n * @param {Array} vec\n * @param {number} m\n */\n skewY: function (vec, m) {\n vec[1] += Math.tan(m) * vec[0];\n },\n /**\n * squeezeX point\n *\n * @param {Array} vec\n * @param {number} m\n */\n squeezeX: function (vec, m) {\n vec[1] += vec[1] * (vec[0] * -m);\n },\n /**\n * squeezeY point\n *\n * @param {Array} vec\n * @param {number} m\n */\n squeezeY: function (vec, m) {\n vec[0] += vec[0] * (vec[1] * m);\n },\n /**\n * Rotate point\n *\n * @param {Array} vec\n * @param {Array} MATRIX\n * @param {Array} fromPoint\n * @internal\n */\n rotate: function (vec, MATRIX, fromPoint) {\n var p0 = vec[0] - fromPoint[0];\n var p1 = vec[1] - fromPoint[1];\n vec[0] = p0 * MATRIX[0] + p1 * MATRIX[1] + fromPoint[0];\n vec[1] = p0 * MATRIX[2] + p1 * MATRIX[3] + fromPoint[1];\n },\n /**\n * RotateX point\n *\n * @param {Array} vec\n * @param {Array} fromPoint\n * @param {number} rad\n */\n rotateX: function (vec, fromPoint, rad) {\n MATRIX[0] = 1;\n MATRIX[1] = 0;\n MATRIX[2] = 0;\n MATRIX[3] = Math.cos(rad);\n Vec2.rotate(vec, MATRIX, fromPoint);\n },\n /**\n * RotateY point\n *\n * @param {Array} vec\n * @param {Array} fromPoint\n * @param {number} rad\n */\n rotateY: function (vec, fromPoint, rad) {\n MATRIX[0] = Math.cos(rad);\n MATRIX[1] = 0;\n MATRIX[2] = 0;\n MATRIX[3] = 1;\n Vec2.rotate(vec, MATRIX, fromPoint);\n },\n /**\n * RotateZ point\n *\n * @param {Array} vec\n * @param {Array} fromPoint\n * @param {number} rad\n */\n rotateZ: function (vec, fromPoint, rad) {\n MATRIX[0] = Math.cos(rad);\n MATRIX[1] = -Math.sin(rad);\n MATRIX[2] = Math.sin(rad);\n MATRIX[3] = Math.cos(rad);\n Vec2.rotate(vec, MATRIX, fromPoint);\n },\n /**\n * Translate vertex\n *\n * @param {Array} vec\n * @param {Array} to\n */\n translate: function (vec, to) {\n vec[0] += to[0];\n vec[1] += to[1];\n },\n /**\n * Scale vertex\n *\n * @param {Array} vec\n * @param {Array} to\n */\n scale: function (vec, to) {\n vec[0] *= to[0];\n vec[1] *= to[1];\n },\n /**\n * Scale vertex\n *\n * @param {Array} vec\n * @param {Array} to\n */\n divide: function (vec, to) {\n vec[0] /= to[0];\n vec[1] /= to[1];\n },\n /**\n * Vec to string\n *\n * @param {Array} vec\n * @return {string}\n */\n toString: function (vec) { return \"x: \" + vec[0] + \", y: \" + vec[1]; },\n /**\n * Vertex [0, 0]\n */\n ZERO: Array.from([0, 0]),\n /**\n * Vertex [1, 1]\n */\n ONE: Array.from([1, 1]),\n};\nexport default Vec2;\n//# sourceMappingURL=Vec2.js.map","/**\n * @internal\n * @ignore\n */\nvar Bounding = {\n empty: function () { return ({\n cx: 0,\n cy: 0,\n x: -1,\n y: -1,\n width: 2,\n height: 2,\n }); },\n clear: function (tmpBounding) {\n tmpBounding[0] = undefined;\n tmpBounding[1] = undefined;\n tmpBounding[2] = undefined;\n tmpBounding[3] = undefined;\n },\n add: function (tmpBounding, x, y) {\n if (typeof tmpBounding[0] === 'undefined' || x < tmpBounding[0])\n tmpBounding[0] = x;\n if (typeof tmpBounding[2] === 'undefined' || x > tmpBounding[2])\n tmpBounding[2] = x;\n if (typeof tmpBounding[1] === 'undefined' || y < tmpBounding[1])\n tmpBounding[1] = y;\n if (typeof tmpBounding[3] === 'undefined' || y > tmpBounding[3])\n tmpBounding[3] = y;\n },\n sum: function (dest, bounding) {\n if (typeof bounding[0] !== 'undefined' &&\n typeof bounding[1] !== 'undefined' &&\n typeof bounding[2] !== 'undefined' &&\n typeof bounding[3] !== 'undefined') {\n if (typeof dest[0] === 'undefined' ||\n typeof dest[1] === 'undefined' ||\n typeof dest[2] === 'undefined' ||\n typeof dest[3] === 'undefined') {\n dest[0] = bounding[0];\n dest[1] = bounding[1];\n dest[2] = bounding[2];\n dest[3] = bounding[3];\n }\n else {\n if (dest[0] < bounding[0])\n dest[0] = bounding[0];\n if (dest[2] > bounding[2])\n dest[2] = bounding[2];\n if (dest[1] < bounding[1])\n dest[1] = bounding[1];\n if (dest[3] > bounding[3])\n dest[3] = bounding[3];\n }\n }\n else {\n console.warn('[Urplfanze:Bounding] cannot sum bounding');\n }\n },\n bind: function (bounding, tmpBounding) {\n if (typeof tmpBounding[0] !== 'undefined' &&\n typeof tmpBounding[1] !== 'undefined' &&\n typeof tmpBounding[2] !== 'undefined' &&\n typeof tmpBounding[3] !== 'undefined') {\n bounding.x = tmpBounding[0];\n bounding.y = tmpBounding[1];\n bounding.width = tmpBounding[2] - tmpBounding[0];\n bounding.height = tmpBounding[3] - tmpBounding[1];\n bounding.cx = bounding.x + bounding.width / 2;\n bounding.cy = bounding.y + bounding.height / 2;\n }\n else {\n console.warn('[Urplfanze:Bounding] cannot bind bounding');\n }\n },\n};\nexport default Bounding;\n//# sourceMappingURL=bounding.js.map","import { glMatrix } from 'gl-matrix';\nexport var VEC3_ZERO = [0, 0, 0];\nexport var VEC3_ONE = [1, 1, 1];\nexport var VEC2_ZERO = [0, 0];\nexport var VEC2_ONE = [1, 1];\nglMatrix.setMatrixArrayType(Array);\n/**\n * Skew matrix\n *\n * @internal\n * @ignore\n */\nexport function fromSkew(out, skew) {\n out[0] = 1;\n out[1] = Math.tan(skew[1]);\n out[2] = 0;\n out[3] = 0;\n out[4] = Math.tan(skew[0]);\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * number to vec 2\n *\n * @internal\n * @ignore\n */\nexport function toVec2(x) {\n if (Array.isArray(x))\n return [x[0], x[1]];\n return [x, x];\n}\n/**\n * number to vec 3\n *\n * @internal\n * @ignore\n */\nexport function toVec3(x, defaultZValue) {\n if (defaultZValue === void 0) { defaultZValue = 0; }\n if (Array.isArray(x)) {\n return [x[0], x[1], defaultZValue];\n }\n return [x, x, defaultZValue];\n}\n//# sourceMappingURL=gl-matrix-extensions.js.map","/**\n * Return logarith value and base\n *\n * @category Core.Utilities\n *\n * @param n number\n * @param base number\n */\nexport var log = function (n, base) { return Math.log(n) / Math.log(base); };\n/**\n * @category Core.Utilities\n */\nexport var PI2 = Math.PI * 2;\n/**\n * @category Core.Utilities\n */\nexport var PHI = (1 + Math.sqrt(5)) / 2;\n/**\n * Return a positive module of positive or negative value\n *\n * @category Core.Utilities\n *\n * @param value number\n * @param base number\n */\nexport var pmod = function (value, base) {\n var result = value % base;\n return result < 0 ? result + base : result;\n};\n//# sourceMappingURL=index.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport ShapeBase from \"./ShapeBase\";\nimport SceneChild from \"../SceneChild\";\nimport Scene from \"../Scene\";\n/**\n * Container of ShapeBase or Group, it applies transformations on each repetition\n *\n * @category Core.Shapes\n */\nvar Shape = /** @class */ (function (_super) {\n __extends(Shape, _super);\n /**\n * Creates an instance of Shape.\n *\n * @param {ShapeSettings} [settings={}]\n */\n function Shape(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = settings.type || 'Shape';\n _this = _super.call(this, settings) || this;\n if (settings.shape instanceof SceneChild) {\n _this.shape = settings.shape;\n }\n else {\n console.warn(\"[Urpflanze:Shape] requires the 'shape' property to be instance of SceneChild,\\nYou passed:\", settings.shape);\n }\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n /**\n * Check if shape is static\n *\n * @returns {boolean}\n */\n Shape.prototype.isStatic = function () {\n return _super.prototype.isStatic.call(this) && (this.shape ? this.shape.isStatic() : true);\n };\n /**\n * Check if shape has static index\n *\n * @returns {boolean}\n */\n Shape.prototype.isStaticIndexed = function () {\n return _super.prototype.isStaticIndexed.call(this) && (this.shape ? this.shape.isStaticIndexed() : true);\n };\n /**\n * Find shape by id or name\n *\n * @param {number | string} idOrName\n * @returns {(SceneChild | null)}\n */\n Shape.prototype.find = function (idOrName) {\n if (this.id === idOrName || this.name === idOrName)\n return this;\n if (this.shape)\n return this.shape.find(idOrName);\n return null;\n };\n /**\n * Return length of buffer\n *\n * @param {ISceneChildPropArguments} propArguments\n * @returns {number}\n */\n Shape.prototype.getBufferLength = function (propArguments) {\n if (this.bStatic && this.buffer && this.buffer.length > 0)\n return this.buffer.length;\n var childBufferLength = this.shape ? this.shape.getBufferLength(propArguments) : 0;\n return childBufferLength * this.getRepetitionCount();\n };\n /**\n * Return a buffer of children shape or loop generated buffer\n *\n * @protected\n * @param {number} generateId\n * @param {ISceneChildPropArguments} propArguments\n * @returns {Float32Array}\n */\n Shape.prototype.generateBuffer = function (generateId, propArguments) {\n if (this.shape) {\n this.shape.generate(generateId, false, propArguments);\n return this.shape.getBuffer() || Shape.EMPTY_BUFFER;\n }\n return Shape.EMPTY_BUFFER;\n };\n /**\n * Return bounding\n *\n * @param {boolean} bDirectSceneChild\n * @returns {IShapeBounding}\n */\n Shape.prototype.getShapeBounding = function () {\n if (this.shape) {\n return this.shape.getBounding();\n }\n return this.bounding; // empty bounding defined in ShapeBase\n };\n /**\n * Add to indexed buffer\n *\n * @protected\n * @param {number} frameLength\n * @param {IRepetition} repetition\n * @returns {number} nextIndex\n */\n Shape.prototype.addIndex = function (frameLength, repetition, recursion\n // singleRepetitionBounding: IShapeBounding\n ) {\n if (this.shape) {\n var childIndexedBuffer = this.shape.getIndexedBuffer() || [];\n var parent_1 = {\n shape: this,\n frameLength: frameLength,\n // singleRepetitionBounding,\n repetition: {\n type: repetition.type,\n angle: repetition.angle,\n index: repetition.index,\n count: repetition.count,\n offset: repetition.offset,\n row: {\n index: repetition.row.index,\n count: repetition.row.count,\n offset: repetition.row.offset,\n },\n col: {\n index: repetition.col.index,\n count: repetition.col.count,\n offset: repetition.col.offset,\n },\n },\n };\n if (typeof recursion !== 'undefined') {\n parent_1.recursion = {\n index: recursion.index,\n offset: recursion.offset,\n count: recursion.offset,\n level: recursion.level,\n };\n }\n for (var i = 0, len = childIndexedBuffer.length; i < len; i++) {\n var currentIndexed = __assign({}, childIndexedBuffer[i]);\n currentIndexed.parent = currentIndexed.parent ? Shape.setIndexedParent(currentIndexed.parent, parent_1) : parent_1;\n this.indexedBuffer.push(currentIndexed);\n }\n }\n };\n /**\n * Set parent of indexed\n *\n * @static\n * @param {(IBufferIndex | IParentBufferIndex)} current\n * @param {IParentBufferIndex} parent\n * @returns {(IBufferIndex | IParentBufferIndex)}\n */\n Shape.setIndexedParent = function (current, parent) {\n var index = {\n shape: current.shape,\n // singleRepetitionBounding: current.singleRepetitionBounding,\n repetition: {\n type: current.repetition.type,\n angle: current.repetition.angle,\n index: current.repetition.index,\n count: current.repetition.count,\n offset: current.repetition.offset,\n row: {\n index: current.repetition.row.index,\n count: current.repetition.row.count,\n offset: current.repetition.row.offset,\n },\n col: {\n index: current.repetition.col.index,\n count: current.repetition.col.count,\n offset: current.repetition.col.offset,\n },\n },\n frameLength: current.frameLength,\n };\n if (typeof current.recursion !== 'undefined') {\n index.recursion = {\n index: current.recursion.index,\n offset: current.recursion.offset,\n count: current.recursion.offset,\n level: current.recursion.level,\n };\n }\n index.parent = current.parent ? Shape.setIndexedParent(current.parent, parent) : parent;\n return index;\n };\n /**\n * Set shape\n *\n * @param {(SceneChild | undefined)} [shape]\n */\n Shape.prototype.setShape = function (shape) {\n if (typeof shape === 'undefined') {\n this.shape = undefined;\n this.clearBuffer(true, true);\n }\n else {\n this.scene && Scene.propagateToChilden(shape, this.scene);\n this.shape = shape;\n this.shape.clearBuffer(true, true);\n }\n };\n return Shape;\n}(ShapeBase));\nexport default Shape;\n//# sourceMappingURL=Shape.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { mat4, vec2, vec3 } from 'gl-matrix';\nimport { ERepetitionType, IRepetition, IBaseRepetition, ISceneChildPropArguments, ISceneChildProps, IStreamArguments, IRecursionRepetition, } from \"../types/scene-child\";\nimport { clamp } from \"../../Utilites\";\nimport * as glme from \"../math/gl-matrix-extensions\";\nimport Vec2 from \"../math/Vec2\";\nimport { PI2 } from \"../math\";\nimport Bounding from \"../math/bounding\";\nimport SceneChild from \"../SceneChild\";\nvar tmpMatrix = mat4.create();\nvar transformMatrix = mat4.create();\nvar perspectiveMatrix = mat4.create();\nvar repetitionMatrix = mat4.create();\n/**\n * Main class for shape generation\n *\n * @category Core.Abstract\n * @abstract\n * @class ShapeBase\n * @order 4\n * @extends {SceneChild}\n */\nvar ShapeBase = /** @class */ (function (_super) {\n __extends(ShapeBase, _super);\n /**\n * Creates an instance of ShapeBase\n *\n * @param {ISceneChildSettings} [settings={}]\n */\n function ShapeBase(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = _super.call(this, settings) || this;\n /**\n * Shape generation id\n * used for prevent buffer calculation\n *\n * @internal\n * @ignore\n */\n _this.generateId = -1;\n /**\n * Flag used to determine if indexedBuffer has been generated\n *\n * @internal\n * @ignore\n */\n _this.bIndexed = false;\n /**\n * Array used for index a vertex buffer\n * only for first level scene children\n *\n * @internal\n * @ignore\n */\n _this.indexedBuffer = [];\n /**\n * The bounding inside the scene\n *\n * @type {IShapeBounding}\n */\n _this.bounding = {\n cx: 0,\n cy: 0,\n x: -1,\n y: -1,\n width: 2,\n height: 2,\n };\n _this.props = {\n distance: settings.distance,\n repetitions: settings.repetitions,\n rotateX: settings.rotateX,\n rotateY: settings.rotateY,\n rotateZ: settings.rotateZ,\n skewX: settings.skewX,\n skewY: settings.skewY,\n squeezeX: settings.squeezeX,\n squeezeY: settings.squeezeY,\n displace: settings.displace,\n translate: settings.translate,\n scale: settings.scale,\n transformOrigin: settings.transformOrigin,\n perspective: settings.perspective,\n perspectiveOrigin: settings.perspectiveOrigin,\n };\n _this.bUseParent = !!settings.bUseParent;\n _this.bUseRecursion = !!settings.bUseRecursion;\n _this.vertexCallback = settings.vertexCallback;\n return _this;\n }\n /**\n * Check if the shape should be generated every time\n *\n * @returns {boolean}\n */\n ShapeBase.prototype.isStatic = function () {\n var props = this.props;\n return (typeof props.distance !== 'function' &&\n typeof props.repetitions !== 'function' &&\n typeof props.rotateX !== 'function' &&\n typeof props.rotateY !== 'function' &&\n typeof props.rotateZ !== 'function' &&\n typeof props.displace !== 'function' &&\n typeof props.skewX !== 'function' &&\n typeof props.skewY !== 'function' &&\n typeof props.squeezeX !== 'function' &&\n typeof props.squeezeY !== 'function' &&\n typeof props.translate !== 'function' &&\n typeof props.scale !== 'function' &&\n typeof props.transformOrigin !== 'function');\n };\n /**\n * Check if the indexedBuffer array needs to be recreated every time,\n * this can happen when a shape generates an array of vertices different in length at each repetition\n *\n * @returns {boolean}\n */\n ShapeBase.prototype.isStaticIndexed = function () {\n return typeof this.props.repetitions !== 'function';\n };\n /**\n * Return a prop value\n *\n * @param {keyof ISceneChildProps} key\n * @param {ISceneChildPropArguments} [propArguments]\n * @param {*} [defaultValue]\n * @returns {*}\n */\n ShapeBase.prototype.getProp = function (key, propArguments, defaultValue) {\n var attribute = this.props[key];\n if (typeof attribute === 'function') {\n attribute = attribute(propArguments);\n }\n return typeof attribute === 'undefined' || Number.isNaN(attribute) ? defaultValue : attribute;\n };\n /**\n * Set a single or multiple props\n *\n * @param {(keyof ISceneChildProps | ISceneChildProps)} key\n * @param {*} [value]\n * @param {boolean} [bClearIndexed=false]\n */\n ShapeBase.prototype.setProp = function (key, value, bClearIndexed) {\n var _this = this;\n if (bClearIndexed === void 0) { bClearIndexed = false; }\n if (typeof key == 'string') {\n bClearIndexed = bClearIndexed || key == 'repetitions';\n this.props[key] = value;\n }\n else {\n bClearIndexed = bClearIndexed || 'repetitions' in key;\n Object.keys(key).forEach(function (k) {\n return (_this.props[k] = key[k]);\n });\n }\n this.clearBuffer(bClearIndexed, true);\n };\n /**\n * Unset buffer\n *\n * @param {boolean} [bClearIndexed=false]\n * @param {boolean} [bPropagateToParents=false]\n * @param {boolean} [bPropagateToChildren=false]\n */\n ShapeBase.prototype.clearBuffer = function (bClearIndexed, bPropagateToParents) {\n if (bClearIndexed === void 0) { bClearIndexed = false; }\n if (bPropagateToParents === void 0) { bPropagateToParents = true; }\n this.buffer = undefined;\n if (bClearIndexed) {\n this.bIndexed = false;\n this.indexedBuffer = [];\n }\n this.bStatic = this.isStatic();\n this.bStaticIndexed = this.isStaticIndexed();\n if (bPropagateToParents && this.scene && !this.scene.isFirstLevelChild(this)) {\n var parents = this.scene.getParentsOfSceneChild(this);\n parents.length > 0 && parents[parents.length - 1].clearBuffer(bClearIndexed, bPropagateToParents /* true */);\n }\n };\n /**\n * Update the vertex array if the shape is not static and update the indexedBuffer if it is also not static\n *\n * @param {number} generateId generation id\n * @param {boolean} [bDirectSceneChild=false] adjust shape of center of scene\n * @param {ISceneChildPropArguments} [parentPropArguments]\n */\n ShapeBase.prototype.generate = function (generateId, bDirectSceneChild, parentPropArguments) {\n var _a, _b;\n if (bDirectSceneChild === void 0) { bDirectSceneChild = false; }\n if (this.buffer && (this.bStatic || (generateId === this.generateId && !this.bUseParent && !this.bUseRecursion))) {\n return;\n }\n this.generateId = generateId;\n if (!this.bStaticIndexed || !this.bIndexed)\n this.indexedBuffer = [];\n var propArguments = ShapeBase.getEmptyPropArguments(this, parentPropArguments);\n var repetition = propArguments.repetition;\n var repetitions = this.getProp('repetitions', propArguments, 1);\n var repetitionType = Array.isArray(repetitions) ? ERepetitionType.Matrix : ERepetitionType.Ring;\n var repetitionCount = Array.isArray(repetitions)\n ? repetitions[0] * ((_a = repetitions[1]) !== null && _a !== void 0 ? _a : repetitions[0])\n : repetitions;\n var repetitionRowCount = Array.isArray(repetitions) ? repetitions[0] : repetitionCount;\n var repetitionColCount = Array.isArray(repetitions) ? (_b = repetitions[1]) !== null && _b !== void 0 ? _b : repetitions[0] : 1;\n var rowRepetition = repetition.row;\n rowRepetition.count = repetitionRowCount;\n var colRepetition = repetition.col;\n colRepetition.count = repetitionColCount;\n repetition.count = repetitionCount;\n repetition.col.count = repetitionColCount;\n repetition.row.count = repetitionRowCount;\n repetition.type = repetitionType;\n var totalBufferLength = 0;\n var buffers = [];\n var currentIndex = 0;\n var centerMatrix = vec2.fromValues((repetitionColCount - 1) / 2, (repetitionRowCount - 1) / 2);\n var sceneCenter = this.scene ? [this.scene.center[0], this.scene.center[1], 0] : [0, 0, 0];\n var tmpTotalShapeBounding = [undefined, undefined, undefined, undefined];\n var tmpSingleRepetitionBounding = [undefined, undefined, undefined, undefined];\n for (var currentRowRepetition = 0; currentRowRepetition < repetitionRowCount; currentRowRepetition++) {\n for (var currentColRepetition = 0; currentColRepetition < repetitionColCount; currentColRepetition++, currentIndex++) {\n repetition.index = currentIndex + 1;\n repetition.offset = repetitionCount > 1 ? currentIndex / (repetitionCount - 1) : 1;\n repetition.angle = repetitionType === ERepetitionType.Ring ? (PI2 / repetitionCount) * currentIndex : 0;\n colRepetition.index = currentColRepetition + 1;\n colRepetition.offset = repetitionColCount > 1 ? currentColRepetition / (repetitionColCount - 1) : 1;\n rowRepetition.index = currentRowRepetition + 1;\n rowRepetition.offset = repetitionRowCount > 1 ? currentRowRepetition / (repetitionRowCount - 1) : 1;\n // Generate primitives buffer recursively\n var buffer = this.generateBuffer(generateId, propArguments);\n var bufferLength = buffer.length;\n var bounding = this.getShapeBounding();\n buffers[currentIndex] = new Float32Array(bufferLength);\n totalBufferLength += bufferLength;\n {\n var distance = glme.toVec2(this.getProp('distance', propArguments, glme.VEC2_ZERO));\n var displace = this.getProp('displace', propArguments, 0);\n var scale = glme.toVec3(this.getProp('scale', propArguments, glme.VEC2_ONE), 1);\n var translate = glme.toVec3(this.getProp('translate', propArguments, glme.VEC2_ZERO), 0);\n var skewX = this.getProp('skewX', propArguments, 0);\n var skewY = this.getProp('skewY', propArguments, 0);\n var squeezeX = this.getProp('squeezeX', propArguments, 0);\n var squeezeY = this.getProp('squeezeY', propArguments, 0);\n var rotateX = this.getProp('rotateX', propArguments, 0);\n var rotateY = this.getProp('rotateY', propArguments, 0);\n var rotateZ = this.getProp('rotateZ', propArguments, 0);\n var perspective = clamp(0, 1, this.getProp('perspective', propArguments, 0));\n var perspectiveOrigin = glme.toVec3(this.getProp('perspectiveOrigin', propArguments, glme.VEC2_ZERO), 0);\n var transformOrigin = glme.toVec3(this.getProp('transformOrigin', propArguments, glme.VEC2_ZERO), 0);\n var offset = void 0;\n switch (repetitionType) {\n case ERepetitionType.Ring:\n offset = vec3.fromValues(distance[0], 0, 0);\n vec3.rotateZ(offset, offset, glme.VEC3_ZERO, repetition.angle + displace);\n break;\n case ERepetitionType.Matrix:\n offset = vec3.fromValues(distance[1] * (currentColRepetition - centerMatrix[0]), distance[0] * (currentRowRepetition - centerMatrix[1]), 0);\n break;\n }\n var perspectiveSize = perspective > 0 ? Math.max(bounding.width, bounding.height) / 2 : 1;\n var perspectiveValue = perspective > 0 ? perspectiveSize + (1 - perspective) * (perspectiveSize * 10) : 0;\n var bTransformOrigin = perspective !== 0 || transformOrigin[0] !== 0 || transformOrigin[1] !== 0;\n var bPerspectiveOrigin = perspectiveOrigin[0] !== 0 || perspectiveOrigin[1] !== 0;\n if (bTransformOrigin) {\n transformOrigin[0] *= bounding.width / 2;\n transformOrigin[1] *= bounding.height / 2;\n transformOrigin[2] = perspectiveValue;\n }\n /**\n * Create Matrices\n */\n {\n /**\n * Create Transformation matrix\n */\n mat4.identity(transformMatrix);\n bTransformOrigin && mat4.translate(transformMatrix, transformMatrix, transformOrigin);\n if (translate[0] !== 0 || translate[1] !== 0)\n mat4.translate(transformMatrix, transformMatrix, translate);\n if (skewX !== 0 || skewY !== 0) {\n glme.fromSkew(tmpMatrix, [skewX, skewY]);\n mat4.multiply(transformMatrix, transformMatrix, tmpMatrix);\n }\n rotateX !== 0 && mat4.rotateX(transformMatrix, transformMatrix, rotateX);\n rotateY !== 0 && mat4.rotateY(transformMatrix, transformMatrix, rotateY);\n rotateZ !== 0 && mat4.rotateZ(transformMatrix, transformMatrix, rotateZ);\n if (scale[0] !== 1 || scale[1] !== 1)\n mat4.scale(transformMatrix, transformMatrix, scale);\n bTransformOrigin &&\n mat4.translate(transformMatrix, transformMatrix, vec3.scale(transformOrigin, transformOrigin, -1));\n /**\n * Create Perspective matrix\n */\n if (perspectiveValue > 0) {\n if (bPerspectiveOrigin) {\n perspectiveOrigin[0] *= bounding.width / 2;\n perspectiveOrigin[1] *= bounding.height / 2;\n perspectiveOrigin[2] = 0;\n }\n mat4.perspective(perspectiveMatrix, -Math.PI / 2, 1, 0, Infinity);\n }\n /**\n * Create Repetition matrix\n */\n mat4.identity(repetitionMatrix);\n mat4.translate(repetitionMatrix, repetitionMatrix, offset);\n if (bDirectSceneChild) {\n mat4.translate(repetitionMatrix, repetitionMatrix, sceneCenter);\n }\n if (repetitionType === ERepetitionType.Ring)\n mat4.rotateZ(repetitionMatrix, repetitionMatrix, repetition.angle + displace);\n }\n Bounding.clear(tmpSingleRepetitionBounding);\n // Apply matrices on vertex\n for (var bufferIndex = 0; bufferIndex < bufferLength; bufferIndex += 2) {\n var vertex = [buffer[bufferIndex], buffer[bufferIndex + 1], perspectiveValue];\n {\n // Apply squeeze, can be insert into transformMatrix?\n squeezeX !== 0 && Vec2.squeezeX(vertex, squeezeX);\n squeezeY !== 0 && Vec2.squeezeY(vertex, squeezeY);\n // Apply transforms\n vec3.transformMat4(vertex, vertex, transformMatrix);\n // Apply perspective\n if (perspectiveValue > 0) {\n bPerspectiveOrigin && vec3.add(vertex, vertex, perspectiveOrigin);\n vec3.transformMat4(vertex, vertex, perspectiveMatrix);\n vec3.scale(vertex, vertex, perspectiveValue);\n bPerspectiveOrigin && vec3.sub(vertex, vertex, perspectiveOrigin);\n }\n // custom vertex manipulation\n if (this.vertexCallback) {\n var index = bufferIndex / 2;\n var count = bufferLength / 2;\n var vertexRepetition = {\n index: index + 1,\n count: count,\n offset: count > 1 ? index / (count - 1) : 1,\n };\n this.vertexCallback(vertex, vertexRepetition, propArguments);\n }\n // final, apply repetition matrix\n vec3.transformMat4(vertex, vertex, repetitionMatrix);\n }\n buffers[currentIndex][bufferIndex] = vertex[0];\n buffers[currentIndex][bufferIndex + 1] = vertex[1];\n // Bounding.add(tmpSingleRepetitionBounding, vertex[0], vertex[1])\n Bounding.add(tmpTotalShapeBounding, vertex[0], vertex[1]);\n }\n }\n // Bounding.sum(tmpTotalShapeBounding, tmpSingleRepetitionBounding)\n // After buffer creation, add a frame into indexedBuffer if not static or update bounding\n // const singleRepetitionBounding = { cx: 0, cy: 0, x: -1, y: -1, width: 2, height: 2 }\n // Bounding.bind(singleRepetitionBounding, tmpSingleRepetitionBounding)\n if (!this.bStaticIndexed || !this.bIndexed) {\n this.addIndex(bufferLength, repetition);\n }\n }\n }\n Bounding.bind(this.bounding, tmpTotalShapeBounding);\n this.buffer = new Float32Array(totalBufferLength);\n for (var i = 0, offset = 0, len = buffers.length; i < len; offset += buffers[i].length, i++)\n this.buffer.set(buffers[i], offset);\n this.bIndexed = true;\n };\n /**\n * Return current shape (whit repetions) bounding\n *\n * @return {*} {IShapeBounding}\n */\n ShapeBase.prototype.getBounding = function () {\n return this.bounding;\n };\n /**\n * Get number of repetitions\n *\n * @returns {number}\n */\n ShapeBase.prototype.getRepetitionCount = function () {\n var _a;\n var repetitions = this.getProp('repetitions', undefined, 1);\n return Array.isArray(repetitions) ? repetitions[0] * ((_a = repetitions[1]) !== null && _a !== void 0 ? _a : repetitions[0]) : repetitions;\n };\n /**\n * Return buffer\n *\n * @returns {(Float32Array | undefined)}\n */\n ShapeBase.prototype.getBuffer = function () {\n return this.buffer;\n };\n /**\n * Return indexed buffer\n *\n * @returns {(Array | undefined)}\n */\n ShapeBase.prototype.getIndexedBuffer = function () {\n return this.indexedBuffer;\n };\n /**\n * Return number of encapsulation\n *\n * @param {IBufferIndex} index\n * @returns {number}\n */\n ShapeBase.getIndexParentLevel = function (index) {\n if (typeof index.parent === 'undefined')\n return 0;\n var currentParent = index.parent;\n var currentParentLevel = 1;\n while (typeof currentParent.parent !== 'undefined') {\n currentParentLevel++;\n currentParent = currentParent.parent;\n }\n return currentParentLevel;\n };\n /**\n * Stream buffer\n *\n * @param {(TStreamCallback} callback\n */\n ShapeBase.prototype.stream = function (callback) {\n if (this.buffer && this.indexedBuffer) {\n for (var i = 0, j = 0, len = this.indexedBuffer.length; i < len; i++) {\n var currentIndexing = this.indexedBuffer[i];\n callback({\n buffer: this.buffer,\n frameLength: currentIndexing.frameLength,\n frameBufferIndex: j,\n currentIndexing: currentIndexing,\n currentShapeIndex: i,\n totalShapes: len,\n });\n j += currentIndexing.frameLength;\n }\n }\n };\n /**\n * Return empty propArguments\n *\n * @static\n * @param {ShapeBase} shape\n * @return {*} {ISceneChildPropArguments}\n */\n ShapeBase.getEmptyPropArguments = function (shape, parentPropArguments) {\n // prettier-ignore\n var repetition = {\n type: ERepetitionType.Ring, angle: 0, index: 1, offset: 1, count: 1,\n row: { index: 1, offset: 1, count: 1 },\n col: { index: 1, offset: 1, count: 1 },\n };\n return {\n repetition: repetition,\n shape: shape,\n parent: parentPropArguments,\n };\n };\n /**\n * Empty buffer\n *\n * @internal\n * @ignore\n */\n ShapeBase.EMPTY_BUFFER = new Float32Array(0);\n /**\n * Empty BaseRepetition\n *\n * @internal\n * @ignore\n */\n ShapeBase.getEmptySimpleRepetition = function () { return ({\n index: 1,\n offset: 1,\n count: 1,\n }); };\n /**\n * Empty Repetition\n *\n * @internal\n * @ignore\n */\n ShapeBase.getEmptyRepetition = function () { return (__assign(__assign({ type: ERepetitionType.Ring, angle: 0 }, ShapeBase.getEmptySimpleRepetition()), { row: ShapeBase.getEmptySimpleRepetition(), col: ShapeBase.getEmptySimpleRepetition() })); };\n return ShapeBase;\n}(SceneChild));\nexport default ShapeBase;\n//# sourceMappingURL=ShapeBase.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport Bounding from \"../math/bounding\";\nimport ShapePrimitive from \"./ShapePrimitive\";\nimport { EShapePrimitiveAdaptMode } from \"../types/shape-base\";\n/**\n * @category Core.Shapes\n */\nvar ShapeBuffer = /** @class */ (function (_super) {\n __extends(ShapeBuffer, _super);\n /**\n * Creates an instance of ShapeBuffer.\n *\n * @param {IShapeBufferSettings} [settings={}]\n */\n function ShapeBuffer(settings) {\n if (settings === void 0) { settings = {}; }\n var _a;\n var _this = this;\n settings.type = settings.type || 'ShapeBuffer';\n settings.adaptMode = (_a = settings.adaptMode) !== null && _a !== void 0 ? _a : EShapePrimitiveAdaptMode.Scale;\n _this = _super.call(this, settings) || this;\n if (typeof settings.shape === 'undefined') {\n console.warn('[Urpflanze:ShapeBuffer] ShapeBuffer require a buffer passed from `shape` property');\n _this.shape = ShapeBuffer.EMPTY_BUFFER;\n }\n else\n _this.shape = Float32Array.from(settings.shape);\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n /**\n * Unset buffer\n *\n * @param {boolean} [bClearIndexed=false]\n * @param {boolean} [bPropagateToParents=false]\n */\n ShapeBuffer.prototype.clearBuffer = function (bClearIndexed, bPropagateToParents) {\n if (bClearIndexed === void 0) { bClearIndexed = false; }\n if (bPropagateToParents === void 0) { bPropagateToParents = true; }\n _super.prototype.clearBuffer.call(this, bClearIndexed, bPropagateToParents);\n this.shapeBuffer = undefined;\n // this.shapeBuffer = ShapeBuffer.buffer2Dto3D(this.shapeBuffer)\n };\n /**\n * Apply sideLength on .shape buffer and calculate bounding\n *\n * @protected\n */\n ShapeBuffer.prototype.bindBuffer = function (propArguments) {\n var sideLength = this.getRepetitionSideLength(propArguments);\n var shapeBuffer = this.adaptMode !== EShapePrimitiveAdaptMode.None\n ? ShapePrimitive.adaptBuffer(this.shape, this.adaptMode)\n : Float32Array.from(this.shape);\n var tmpBounding = [undefined, undefined, undefined, undefined];\n for (var i = 0, len = shapeBuffer.length; i < len; i += 2) {\n shapeBuffer[i] *= sideLength[0];\n shapeBuffer[i + 1] *= sideLength[1];\n Bounding.add(tmpBounding, shapeBuffer[i], shapeBuffer[i + 1]);\n }\n Bounding.bind(this.currentGenerationPrimitiveBounding, tmpBounding);\n this.shapeBuffer = shapeBuffer;\n };\n /**\n * Return length of buffer\n *\n * @param {ISceneChildPropArguments} propArguments\n * @returns {number}\n */\n ShapeBuffer.prototype.getBufferLength = function (propArguments) {\n if (this.buffer && this.buffer.length > 0)\n return this.buffer.length;\n return this.shape.length * this.getRepetitionCount();\n };\n /**\n * Return a buffer of children shape or loop generated buffer\n *\n * @protected\n * @param {number} generateId\n * @param {ISceneChildPropArguments} propArguments\n * @returns {Float32Array}\n */\n ShapeBuffer.prototype.generateBuffer = function (generateId, propArguments) {\n if (typeof this.shapeBuffer === 'undefined' || typeof this.props.sideLength === 'function') {\n this.bindBuffer(propArguments);\n }\n return this.shapeBuffer;\n };\n /**\n * Set shape\n *\n * @param {(Float32Array)} [shape]\n */\n ShapeBuffer.prototype.setShape = function (shape) {\n this.shape = shape;\n this.clearBuffer(true);\n };\n /**\n * Subdivide buffer n times\n *\n * @param {number} [level=1]\n */\n ShapeBuffer.prototype.subdivide = function (level) {\n if (level === void 0) { level = 1; }\n var subdivided = this.shape;\n if (subdivided && subdivided.length > 0) {\n for (var i = 0; i < level; i++)\n subdivided = ShapeBuffer.subdivide(subdivided, this.bClosed);\n this.setShape(subdivided);\n }\n };\n /**\n * Subdivide buffer\n *\n * @static\n * @param {Float32Array} shape\n * @param {boolean} [bClosed=true]\n * @returns {(Float32Array)}\n */\n ShapeBuffer.subdivide = function (shape, bClosed) {\n if (bClosed === void 0) { bClosed = true; }\n var shapeLength = shape.length;\n var subdivided = new Float32Array(shapeLength * 2 - (bClosed ? 0 : 2));\n for (var i = 0; i < shapeLength; i += 2) {\n if (i === 0) {\n subdivided[0] = shape[0];\n subdivided[1] = shape[1];\n }\n else {\n var px = shape[i - 2];\n var py = shape[i - 1];\n var x = shape[i];\n var y = shape[i + 1];\n var nx = (x + px) / 2;\n var ny = (y + py) / 2;\n subdivided[(i - 1) * 2] = nx;\n subdivided[(i - 1) * 2 + 1] = ny;\n subdivided[i * 2] = x;\n subdivided[i * 2 + 1] = y;\n }\n }\n if (bClosed) {\n subdivided[(shapeLength - 1) * 2] = (shape[0] + shape[shapeLength - 2]) / 2;\n subdivided[(shapeLength - 1) * 2 + 1] = (shape[1] + shape[shapeLength - 1]) / 2;\n }\n return subdivided;\n };\n return ShapeBuffer;\n}(ShapePrimitive));\nexport default ShapeBuffer;\n//# sourceMappingURL=ShapeBuffer.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { EShapePrimitiveAdaptMode } from \"../types/shape-base\";\nimport Bounding from \"../math/bounding\";\nimport { PI2 } from \"../math\";\nimport ShapePrimitive from \"./ShapePrimitive\";\nimport ShapeBase from \"./ShapeBase\";\n/**\n * Shape Loop\n *\n * @category Core.Shapes\n * @public\n * @class ShapeLoop\n * @extends {ShapePrimitive}\n */\nvar ShapeLoop = /** @class */ (function (_super) {\n __extends(ShapeLoop, _super);\n /**\n * Creates an instance of ShapeLoop.\n *\n * @param {IShapeLoopSettings} [settings={}]\n * @param {boolean} [bPreventGeneration=false]\n */\n function ShapeLoop(settings, bPreventGeneration) {\n if (settings === void 0) { settings = {}; }\n if (bPreventGeneration === void 0) { bPreventGeneration = false; }\n var _this = this;\n settings.type = settings.type || 'ShapeLoop';\n _this = _super.call(this, settings) || this;\n _this.loopDependencies = (settings.loopDependencies || []).concat('sideLength');\n _this.props.loop = settings.loop;\n if (!bPreventGeneration) {\n _this.loop = {\n start: 0,\n end: PI2,\n inc: PI2 / 10,\n vertex: function () { return [0, 0]; },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n }\n return _this;\n }\n /**\n * Check if currentOrSingleLoopBuffer is static\n *\n * @returns {boolean}\n */\n ShapeLoop.prototype.isStaticLoop = function () {\n if (this.loopDependencies.includes('propArguments'))\n return false;\n for (var i = 0, len = this.loopDependencies.length; i < len; i++)\n if (typeof this.props[this.loopDependencies[i]] === 'function')\n return false;\n return true;\n };\n /**\n * Check if shape is static\n *\n * @returns {boolean}\n */\n ShapeLoop.prototype.isStatic = function () {\n return this.bStaticLoop && _super.prototype.isStatic.call(this);\n };\n /**\n * Check if shape has static indexed\n *\n * @returns {boolean}\n */\n ShapeLoop.prototype.isStaticIndexed = function () {\n return this.bStaticLoop && _super.prototype.isStaticIndexed.call(this);\n };\n /**\n * Unset buffer\n *\n * @param {boolean} [bClearIndexed=false]\n * @param {boolean} [bPropagateToParents=false]\n */\n ShapeLoop.prototype.clearBuffer = function (bClearIndexed, bPropagateToParents) {\n if (bClearIndexed === void 0) { bClearIndexed = false; }\n if (bPropagateToParents === void 0) { bPropagateToParents = true; }\n this.bStaticLoop = this.isStaticLoop();\n if (bClearIndexed) {\n this.currentOrSingleLoopBuffer = undefined;\n }\n _super.prototype.clearBuffer.call(this, bClearIndexed, bPropagateToParents);\n };\n /**\n * Set single or multiple props\n *\n * @param {(K)} key\n * @param {*} [value]\n * @param {boolean} [bClearIndexed=false]\n */\n ShapeLoop.prototype.setProp = function (key, value) {\n var _a;\n var bClearIndexed = false;\n var keys = typeof key === 'string' ? (_a = {}, _a[key] = value, _a) : key;\n for (var i = this.loopDependencies.length - 1; i >= 0; i--) {\n if (this.loopDependencies[i] in keys) {\n // this.props.loop = undefined\n bClearIndexed = true;\n break;\n }\n }\n if ('loop' in keys) {\n keys.loop = __assign(__assign({}, this.props.loop), keys.loop);\n bClearIndexed = true;\n }\n _super.prototype.setProp.call(this, keys, value, bClearIndexed);\n };\n /**\n * Return length of buffer\n *\n * @param {ISceneChildPropArguments} [propArguments]\n * @returns {number}\n */\n ShapeLoop.prototype.getBufferLength = function (propArguments) {\n if (this.bStatic && typeof this.buffer !== 'undefined')\n return this.buffer.length;\n if (this.bStaticLoop && typeof this.currentOrSingleLoopBuffer !== 'undefined')\n return this.currentOrSingleLoopBuffer.length * this.getRepetitionCount();\n var count = this.getLoop(propArguments || ShapeBase.getEmptyPropArguments(this)).count;\n return this.getRepetitionCount() * count * 2;\n };\n /**\n * Return a buffer of children shape or loop generated buffer\n *\n * @protected\n * @param {number} generateId\n * @param {ISceneChildPropArguments} propArguments\n * @returns {Float32Array}\n */\n ShapeLoop.prototype.generateBuffer = function (generateId, propArguments) {\n if (!this.bStaticLoop)\n return this.generateLoopBuffer(propArguments);\n if (typeof this.props.sideLength === 'function' || typeof this.currentOrSingleLoopBuffer === 'undefined')\n this.currentOrSingleLoopBuffer = this.generateLoopBuffer(propArguments);\n return this.currentOrSingleLoopBuffer;\n };\n /**\n * Generate loop buffer\n *\n * @protected\n * @param {ISceneChildPropArguments} propArguments\n * @returns {Float32Array}\n */\n ShapeLoop.prototype.generateLoopBuffer = function (propArguments) {\n var _a = this.getLoop(propArguments), start = _a.start, inc = _a.inc, end = _a.end, count = _a.count;\n var sideLength = this.getRepetitionSideLength(propArguments);\n var getVertex = (this.props.loop && this.props.loop.vertex\n ? this.props.loop.vertex\n : this.loop.vertex);\n var shapeLoop = {\n index: 0,\n offset: 0,\n angle: 0,\n count: count,\n };\n var vertexLength = shapeLoop.count;\n var bufferLength = vertexLength * 2;\n var currentOrSingleLoopBuffer = new Float32Array(bufferLength);\n var bNoAdapt = this.adaptMode === EShapePrimitiveAdaptMode.None;\n var tmpBounding = [undefined, undefined, undefined, undefined];\n for (var i = 0, j = 0; i < vertexLength; i++, j += 2) {\n var angle = start + inc * i;\n var offset = shapeLoop.count > 1 ? i / (shapeLoop.count - 1) : 1;\n // const angle = (end - start) * offset + start\n shapeLoop.angle = angle;\n shapeLoop.index = i + 1;\n shapeLoop.offset = offset;\n var vertex = Float32Array.from(getVertex(shapeLoop, propArguments));\n currentOrSingleLoopBuffer[j] = vertex[0];\n currentOrSingleLoopBuffer[j + 1] = vertex[1];\n if (bNoAdapt) {\n currentOrSingleLoopBuffer[j] *= sideLength[0];\n currentOrSingleLoopBuffer[j + 1] *= sideLength[1];\n Bounding.add(tmpBounding, currentOrSingleLoopBuffer[j], currentOrSingleLoopBuffer[j + 1]);\n }\n }\n if (bNoAdapt) {\n Bounding.bind(this.currentGenerationPrimitiveBounding, tmpBounding);\n }\n else {\n /**\n * Adapt and apply side length\n */\n var buffer = ShapePrimitive.adaptBuffer(currentOrSingleLoopBuffer, this.adaptMode);\n Bounding.clear(tmpBounding);\n for (var i = 0; i < bufferLength; i += 2) {\n buffer[i] = buffer[i] * sideLength[0];\n buffer[i + 1] = buffer[i + 1] * sideLength[1];\n Bounding.add(tmpBounding, buffer[i], buffer[i + 1]);\n }\n Bounding.bind(this.currentGenerationPrimitiveBounding, tmpBounding);\n return buffer;\n }\n return currentOrSingleLoopBuffer;\n };\n /**\n * Return information about a client loop gnerator\n *\n * @public\n * @param {ISceneChildPropArguments} propArguments\n * @returns {ShapeLoopInformation}\n */\n ShapeLoop.prototype.getLoop = function (propArguments) {\n var _a, _b, _c, _d, _e, _f;\n var start = (_b = (_a = this.props.loop) === null || _a === void 0 ? void 0 : _a.start) !== null && _b !== void 0 ? _b : this.loop.start;\n var end = (_d = (_c = this.props.loop) === null || _c === void 0 ? void 0 : _c.end) !== null && _d !== void 0 ? _d : this.loop.end;\n var inc = (_f = (_e = this.props.loop) === null || _e === void 0 ? void 0 : _e.inc) !== null && _f !== void 0 ? _f : this.loop.inc;\n start = (typeof start === 'function' ? start(propArguments) : start);\n end = (typeof end === 'function' ? end(propArguments) : end);\n inc = (typeof inc === 'function' ? inc(propArguments) : inc);\n var count = Math.ceil((end - start) / inc);\n return { start: start, end: end, inc: inc, count: count <= 0 ? 0 : count };\n };\n /**\n * Subdivide loop n times\n *\n * @param {number} [level=1]\n */\n ShapeLoop.prototype.subdivide = function (level) {\n if (level === void 0) { level = 1; }\n var currentLoop = this.props.loop || this.loop;\n // TODO: subdivide function?\n if (typeof currentLoop.inc === 'number') {\n currentLoop.inc = (currentLoop.inc || 1) / Math.pow(2, level);\n this.setProp('loop', currentLoop);\n }\n };\n /**\n * Set shape from loop generator\n *\n * @param {(IShapeLoopGenerator)} [shape]\n */\n ShapeLoop.prototype.setShape = function (loop) {\n this.setProp('loop', loop);\n };\n ShapeLoop.PId2 = Math.PI / 2;\n return ShapeLoop;\n}(ShapePrimitive));\nexport default ShapeLoop;\n//# sourceMappingURL=ShapeLoop.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport ShapeBase from \"./ShapeBase\";\nimport { EShapePrimitiveAdaptMode, IBufferIndex, IParentBufferIndex, IShapeBounding, IShapePrimitiveProps, IShapePrimitiveSettings, } from \"../types/shape-base\";\nimport * as glme from \"../math/gl-matrix-extensions\";\nimport Bounding from \"../math/bounding\";\n/**\n * @category Core.Abstract\n */\nvar ShapePrimitive = /** @class */ (function (_super) {\n __extends(ShapePrimitive, _super);\n /**\n * Creates an instance of ShapePrimitive.\n *\n * @param {IShapePrimitiveSettings} [settings={}]\n */\n function ShapePrimitive(settings) {\n if (settings === void 0) { settings = {}; }\n var _a, _b;\n var _this = _super.call(this, settings) || this;\n /**\n * Contain the bounding of the last generated buffer\n *\n * @type {IShapeBounding}\n */\n _this.currentGenerationPrimitiveBounding = Bounding.empty();\n _this.props.sideLength =\n typeof settings.sideLength === 'undefined'\n ? undefined\n : typeof settings.sideLength === 'function'\n ? settings.sideLength\n : glme.toVec2(settings.sideLength);\n _this.style = settings.style || {};\n _this.adaptMode = (_a = settings.adaptMode) !== null && _a !== void 0 ? _a : EShapePrimitiveAdaptMode.None;\n _this.bClosed = (_b = settings.bClosed) !== null && _b !== void 0 ? _b : true;\n return _this;\n }\n /**\n * Check if shape is static\n *\n * @returns {boolean}\n * @memberof ShapePrimitive\n */\n ShapePrimitive.prototype.isStatic = function () {\n return typeof this.props.sideLength !== 'function' && _super.prototype.isStatic.call(this);\n };\n ShapePrimitive.prototype.getRepetitionSideLength = function (propArguments) {\n if (this.bStatic) {\n // not set default value into constructor because it can be overridden by group\n if (typeof this.props.sideLength === 'undefined') {\n this.props.sideLength = [50, 50];\n }\n else if (typeof this.props.sideLength === 'number') {\n this.props.sideLength = [this.props.sideLength, this.props.sideLength];\n }\n return this.props.sideLength;\n }\n return glme.toVec2(this.getProp('sideLength', propArguments, [50, 50]));\n };\n /**\n * Return a bounding of generated buffer if is direct scene child\n *\n * @returns {IShapeBounding}\n * @memberof ShapePrimitive\n */\n ShapePrimitive.prototype.getShapeBounding = function () {\n return this.currentGenerationPrimitiveBounding;\n };\n /**\n * Add this to indexedBuffer\n *\n * @protected\n * @param {number} frameLength\n * @param {IRepetition} repetition\n * @returns {number} nextIndex\n */\n ShapePrimitive.prototype.addIndex = function (frameLength, repetition, recursion\n // singleRepetitionBounding: IShapeBounding\n ) {\n var index = {\n shape: this,\n frameLength: frameLength,\n // singleRepetitionBounding,\n repetition: {\n type: repetition.type,\n angle: repetition.angle,\n index: repetition.index,\n count: repetition.count,\n offset: repetition.offset,\n row: {\n index: repetition.row.index,\n count: repetition.row.count,\n offset: repetition.row.offset,\n },\n col: {\n index: repetition.col.index,\n count: repetition.col.count,\n offset: repetition.col.offset,\n },\n },\n };\n if (typeof recursion !== 'undefined') {\n index.recursion = {\n index: recursion.index,\n offset: recursion.offset,\n count: recursion.offset,\n level: recursion.level,\n };\n }\n this.indexedBuffer.push(index);\n };\n /**\n * Return bClosed\n *\n * @returns {boolean}\n * @memberof ShapePrimitive\n */\n ShapePrimitive.prototype.isClosed = function () {\n return this.bClosed;\n };\n /**\n * Set bClosed\n *\n * @param {boolean} bClosed\n * @memberof ShapePrimitive\n */\n ShapePrimitive.prototype.setClosed = function (bClosed) {\n this.bClosed = bClosed;\n };\n /**\n * Return adaptMode\n *\n * @returns {EShapePrimitiveAdaptMode}\n * @memberof ShapeBase\n */\n ShapePrimitive.prototype.getAdaptMode = function () {\n return this.adaptMode;\n };\n /**\n * Set adaptMode\n *\n * @param {EShapePrimitiveAdaptMode} bAdapted\n * @memberof ShapeBase\n */\n ShapePrimitive.prototype.adapt = function (adaptMode) {\n this.adaptMode = adaptMode;\n this.clearBuffer(true);\n };\n /**\n * Get buffer bounding\n *\n * @static\n * @param {Float32Array} buffer\n * @returns {IShapeBounding}\n * @memberof ShapePrimitive\n */\n ShapePrimitive.getBounding = function (buffer, bounding) {\n if (typeof bounding === 'undefined')\n bounding = Bounding.empty();\n var tmp_bounding = [undefined, undefined, undefined, undefined];\n for (var i = 0, len = buffer.length; i < len; i += 2) {\n Bounding.add(tmp_bounding, buffer[i], buffer[i + 1]);\n }\n Bounding.bind(bounding, tmp_bounding);\n return bounding;\n };\n /**\n * Return adapted buffer between [-1,-1] and [1,1]\n *\n * @public\n * @static\n * @param {Float32Array} input\n * @param {EShapePrimitiveAdaptMode} mode\n * @returns {Float32Array}\n * @memberof ShapePrimitive\n */\n ShapePrimitive.adaptBuffer = function (input, mode, rect) {\n if (mode === EShapePrimitiveAdaptMode.None)\n return Float32Array.from(input);\n var output = new Float32Array(input.length);\n if (!rect) {\n rect = ShapePrimitive.getBounding(input);\n }\n var scale = rect.width >= 2 ||\n rect.height >= 2 ||\n (mode >= EShapePrimitiveAdaptMode.Fill && (rect.width < 2 || rect.height < 2))\n ? 2 / Math.max(rect.width, rect.height)\n : 1;\n var translateX = mode >= EShapePrimitiveAdaptMode.Center ? rect.cx : 0;\n var translateY = mode >= EShapePrimitiveAdaptMode.Center ? rect.cy : 0;\n for (var i = 0, len = input.length; i < len; i += 2) {\n output[i] = (input[i] - translateX) * scale;\n output[i + 1] = (input[i + 1] - translateY) * scale;\n }\n return output;\n };\n return ShapePrimitive;\n}(ShapeBase));\nexport default ShapePrimitive;\n//# sourceMappingURL=ShapePrimitive.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport Bounding from \"../math/bounding\";\nimport Shape from \"./Shape\";\n/**\n * @category Core.Shapes\n */\nvar ShapeRecursive = /** @class */ (function (_super) {\n __extends(ShapeRecursive, _super);\n /**\n * Creates an instance of ShapeRecursive.\n *\n * @param {IShapeRecursiveSettings} [settings={}]\n */\n function ShapeRecursive(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = settings.type || 'ShapeRecursive';\n _this = _super.call(this, settings) || this;\n _this.props.recursions = settings.recursions || 1;\n _this.props.recursionScale = settings.recursionScale || 2;\n _this.props.recursionVertex = settings.recursionVertex || 0;\n // this.bInner = settings.bInner ?? false\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n _this.currentGenerationRecursiveBounding = Bounding.empty();\n return _this;\n }\n /**\n * Unset buffer\n *\n * @param {boolean} [bClearIndexed=false]\n * @param {boolean} [bPropagateToParents=false]\n * @param {boolean} [bPropagateToChildren=false]\n */\n ShapeRecursive.prototype.clearBuffer = function (bClearIndexed, bPropagateToParents) {\n if (bClearIndexed === void 0) { bClearIndexed = false; }\n if (bPropagateToParents === void 0) { bPropagateToParents = true; }\n if (bClearIndexed) {\n this.shapeRecursiveBuffer = undefined;\n }\n _super.prototype.clearBuffer.call(this, bClearIndexed, bPropagateToParents);\n };\n // /**\n // * Set type of recursion\n // *\n // * @param {boolean} inner\n // */\n // public setRecursionnInner(inner: boolean): void {\n // \tthis.bInner = inner\n // \tthis.clearBuffer(true)\n // }\n /**\n *\n * @returns {boolean}\n */\n ShapeRecursive.prototype.isStatic = function () {\n return (typeof this.props.recursions !== 'function' &&\n typeof this.props.recursionScale !== 'function' &&\n typeof this.props.recursionVertex !== 'function' &&\n _super.prototype.isStatic.call(this));\n };\n /**\n *\n * @returns {boolean}\n */\n ShapeRecursive.prototype.isStaticIndexed = function () {\n return typeof this.props.recursions !== 'function' && _super.prototype.isStaticIndexed.call(this);\n };\n /**\n * Return a buffer of children shape with recursion\n *\n * @protected\n * @param {number} generateId\n * @param {ISceneChildPropArguments} propArguments\n * @returns {Float32Array}\n */\n ShapeRecursive.prototype.generateBuffer = function (generateId, propArguments) {\n if (!this.isStatic() || typeof this.shapeRecursiveBuffer === 'undefined') {\n this.bindBuffer(generateId, propArguments);\n }\n return this.shapeRecursiveBuffer;\n };\n /**\n * Generate Recoursive shape buffer\n *\n * @protected\n * @param {number} generateId\n * @param {ISceneChildPropArguments} propArguments\n */\n ShapeRecursive.prototype.bindBuffer = function (generateId, propArguments) {\n if (typeof this.shape === 'undefined') {\n this.shapeRecursiveBuffer = Shape.EMPTY_BUFFER;\n return;\n }\n var recursions = Math.floor(this.getProp('recursions', propArguments, 1));\n var recursionVertex = Math.floor(this.getProp('recursionVertex', propArguments, 0));\n var recursionScale = this.getProp('recursionScale', propArguments, 2);\n var currentRecursionRepetition = {\n index: 1,\n offset: 1,\n count: 1,\n level: { index: 1, offset: recursions > 1 ? 0 : 1, count: 1 },\n };\n if (recursions <= 1) {\n var buffer = this.generateShapeBuffer(propArguments, generateId, currentRecursionRepetition);\n this.currentGenerationRecursiveBounding = this.shape.getBounding();\n this.shapeRecursiveBuffer = buffer;\n return;\n }\n var shapeBuffer = this.generateShapeBuffer(propArguments, generateId, currentRecursionRepetition);\n var storedRecursion = [currentRecursionRepetition];\n var paretRecursionIndex = 0, added = 1;\n var tmpBounding = [undefined, undefined, undefined, undefined];\n var singleShapeBufferLength = shapeBuffer.length;\n var realVertexCount = singleShapeBufferLength / 2;\n var singleShapeVertexCount = recursionVertex <= 0 ? realVertexCount : Math.min(recursionVertex, realVertexCount);\n var recursionOffsetMultiplier = recursionVertex === 0 ? 1 : realVertexCount / Math.min(recursionVertex, realVertexCount);\n var recusiveShapeBuffer = new Float32Array(ShapeRecursive.summmation(recursions, singleShapeVertexCount) * singleShapeBufferLength);\n for (var i = 0; i < singleShapeBufferLength; i += 2) {\n recusiveShapeBuffer[i] = shapeBuffer[i];\n recusiveShapeBuffer[i + 1] = shapeBuffer[i + 1];\n Bounding.add(tmpBounding, recusiveShapeBuffer[i], recusiveShapeBuffer[i + 1]);\n }\n for (var currentRecursion = 1; currentRecursion < recursions; currentRecursion++) {\n var level_offset = recursions > 1 ? currentRecursion / (recursions - 1) : 1;\n var currentRecursionVertexCount = ShapeRecursive.summmation(currentRecursion, singleShapeVertexCount);\n var recursionBufferStartIndex = currentRecursionVertexCount * singleShapeBufferLength;\n var parentRecursion = currentRecursion - 1;\n var parentRecursionBufferStartIndex = parentRecursion === 0\n ? 0\n : ShapeRecursive.summmation(parentRecursion, singleShapeVertexCount) * singleShapeBufferLength;\n for (var currentShapeRecursionRepetition = 0, totalRecursionRepetitions = Math.pow(singleShapeVertexCount, currentRecursion); currentShapeRecursionRepetition < totalRecursionRepetitions; currentShapeRecursionRepetition++, added++) {\n currentRecursionRepetition = {\n index: currentShapeRecursionRepetition + 1,\n offset: totalRecursionRepetitions > 1 ? currentShapeRecursionRepetition / (totalRecursionRepetitions - 1) : 1,\n count: totalRecursionRepetitions,\n level: { index: currentRecursion + 1, offset: level_offset, count: recursions },\n parent: storedRecursion[paretRecursionIndex],\n };\n shapeBuffer = this.generateShapeBuffer(propArguments, generateId, currentRecursionRepetition);\n storedRecursion.push(currentRecursionRepetition);\n var shapeVertexBufferIndex = recursionBufferStartIndex + currentShapeRecursionRepetition * singleShapeBufferLength;\n // const centerVertexIndex = parentRecursionBufferStartIndex + currentShapeRecursionRepetition * 2\n var centerVertexIndex = Math.floor(parentRecursionBufferStartIndex + currentShapeRecursionRepetition * 2 * recursionOffsetMultiplier);\n centerVertexIndex = centerVertexIndex % 2 === 0 ? centerVertexIndex : centerVertexIndex + 1;\n var centerX = recusiveShapeBuffer[centerVertexIndex];\n var centerY = recusiveShapeBuffer[centerVertexIndex + 1];\n for (var i = 0, len = singleShapeBufferLength; i < len; i += 2) {\n // if (this.bInner) {\n // \tconst parentCurrentVertex =\n // \t\tparentRecursionBufferStartIndex +\n // \t\tMath.floor(currentShapeRecursionRepetition / singleShapeVertexCount) *\n // \t\t\tsingleShapeVertexCount *\n // \t\t\trecursionOffsetMultiplier *\n // \t\t\t2\n // \tconst parentX = recusiveShapeBuffer[parentCurrentVertex + i]\n // \tconst parentY = recusiveShapeBuffer[parentCurrentVertex + i + 1]\n // \trecusiveShapeBuffer[shapeVertexBufferIndex + i] = (centerX - parentX) / recursionScale + parentX\n // \trecusiveShapeBuffer[shapeVertexBufferIndex + i + 1] = (centerY - parentY) / recursionScale + parentY\n // const parentX = shapeBuffer[i] / recursionScale ** currentRecursion\n // const parentY = shapeBuffer[i + 1] / recursionScale ** currentRecursion\n // recusiveShapeBuffer[shapeVertexBufferIndex + i] = (centerX - parentX) / recursionScale + parentX\n // recusiveShapeBuffer[shapeVertexBufferIndex + i + 1] = (centerY - parentY) / recursionScale + parentY\n // } else {\n var parentXScaled = shapeBuffer[i] / Math.pow(recursionScale, currentRecursion);\n var parentYScaled = shapeBuffer[i + 1] / Math.pow(recursionScale, currentRecursion);\n recusiveShapeBuffer[shapeVertexBufferIndex + i] = centerX + parentXScaled;\n recusiveShapeBuffer[shapeVertexBufferIndex + i + 1] = centerY + parentYScaled;\n // }\n Bounding.add(tmpBounding, recusiveShapeBuffer[shapeVertexBufferIndex + i], recusiveShapeBuffer[shapeVertexBufferIndex + i + 1]);\n }\n if (added % singleShapeVertexCount === 0) {\n paretRecursionIndex += 1;\n }\n }\n }\n Bounding.bind(this.currentGenerationRecursiveBounding, tmpBounding);\n this.shapeRecursiveBuffer = recusiveShapeBuffer;\n };\n ShapeRecursive.prototype.generateShapeBuffer = function (propArguments, generateId, recursionRepetition) {\n propArguments.recursion = recursionRepetition;\n return _super.prototype.generateBuffer.call(this, generateId, propArguments);\n };\n /**\n * Add this to indexedBuffer\n *\n * @protected\n * @param {number} frameLength\n * @param {IRepetition} repetition\n * @returns {number} nextIndex\n */\n ShapeRecursive.prototype.addIndex = function (frameLength, repetition, recursion\n // singleRepetitionBounding: IShapeBounding\n ) {\n if (this.shape) {\n var propArguments = { repetition: repetition, shape: this };\n var recursions = Math.floor(this.getProp('recursions', propArguments, 1));\n var recursionVertex = Math.floor(this.getProp('recursionVertex', propArguments, 0));\n // const realFrameLength = ShapeRecursive.summmation(recursions, this.shape.getBufferLength() / 2)\n var bufferIndex = {\n shape: this,\n frameLength: frameLength,\n // singleRepetitionBounding,\n repetition: {\n type: repetition.type,\n angle: repetition.angle,\n index: repetition.index,\n count: repetition.count,\n offset: repetition.offset,\n row: {\n index: repetition.row.index,\n count: repetition.row.count,\n offset: repetition.row.offset,\n },\n col: {\n index: repetition.col.index,\n count: repetition.col.count,\n offset: repetition.col.offset,\n },\n },\n };\n if (typeof recursion !== 'undefined') {\n bufferIndex.recursion = {\n index: recursion.index,\n offset: recursion.offset,\n count: recursion.offset,\n level: recursion.level,\n };\n }\n var childIndexedBuffer = this.shape.getIndexedBuffer() || [];\n for (var childIndexed = 0, childIndexedLen = childIndexedBuffer.length; childIndexed < childIndexedLen; childIndexed++) {\n var currentIndexed = __assign({}, childIndexedBuffer[childIndexed]);\n var currentRecursionRepetition = {\n index: 1,\n offset: 1,\n count: 1,\n level: { index: 1, offset: recursions > 1 ? 0 : 1, count: recursions },\n };\n var recursionBufferIndex = __assign(__assign({}, bufferIndex), { recursion: currentRecursionRepetition });\n currentIndexed.parent = currentIndexed.parent\n ? Shape.setIndexedParent(currentIndexed.parent, recursionBufferIndex)\n : recursionBufferIndex;\n this.indexedBuffer.push(currentIndexed);\n }\n if (recursions > 1) {\n var realVertexCount = this.shape.getBufferLength(propArguments) / 2;\n var vertexCount = recursionVertex <= 0 ? realVertexCount : Math.min(recursionVertex, realVertexCount);\n var storedRecursion = this.indexedBuffer.map(function (indexed) { return [\n indexed.parent.recursion,\n ]; });\n var paretRecursionIndex = 0, added = 1;\n for (var i = 1; i < recursions; i++) {\n var level_offset = recursions > 1 ? i / (recursions - 1) : 1;\n for (var j = 0, len = Math.pow(vertexCount, i); j < len; j++, added++) {\n var recursionOffset = len > 1 ? j / (len - 1) : 1;\n for (var childIndexed = 0, childIndexedLen = childIndexedBuffer.length; childIndexed < childIndexedLen; childIndexed++) {\n var currentIndexed = __assign({}, childIndexedBuffer[childIndexed]);\n var currentRecursionRepetition = {\n index: j + 1,\n offset: recursionOffset,\n count: len,\n level: { index: i + 1, offset: level_offset, count: recursions },\n parent: storedRecursion[childIndexed][paretRecursionIndex],\n };\n var recursionBufferIndex = __assign(__assign({}, bufferIndex), { recursion: currentRecursionRepetition });\n currentIndexed.parent = currentIndexed.parent\n ? Shape.setIndexedParent(currentIndexed.parent, recursionBufferIndex)\n : recursionBufferIndex;\n this.indexedBuffer.push(currentIndexed);\n storedRecursion[childIndexed].push(currentRecursionRepetition);\n if (added % vertexCount === 0) {\n paretRecursionIndex += 1;\n }\n }\n }\n }\n }\n }\n };\n /**\n * Retturn summation value\n *\n * @static\n * @param {number} recursion\n * @param {number} vertexCount\n * @returns {number}\n */\n ShapeRecursive.summmation = function (recursion, vertexCount) {\n if (recursion === 1)\n return 1;\n var result = 1;\n for (var i = 1; i < recursion; i++)\n result += Math.pow(vertexCount, i);\n return result;\n };\n /**\n * Empty recursion repetition\n *\n * @static\n * @return {*} {IRecursionRepetition}\n */\n ShapeRecursive.getEmptyRecursion = function () {\n return {\n index: 1,\n offset: 1,\n count: 1,\n level: { index: 1, offset: 1, count: 1 },\n };\n };\n return ShapeRecursive;\n}(Shape));\nexport default ShapeRecursive;\n//# sourceMappingURL=ShapeRecursive.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PI2 } from \"../../math\";\nimport ShapeLoop from \"../ShapeLoop\";\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\n/**\n *\n * @category Core.Primitives\n * @class Circle\n * @extends {ShapeLoop}\n */\nvar Circle = /** @class */ (function (_super) {\n __extends(Circle, _super);\n /**\n * Creates an instance of Circle.\n *\n * @param {ShapeLoopSettings} [settings={}]\n * @memberof Circle\n */\n function Circle(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = 'Circle';\n settings.adaptMode = EShapePrimitiveAdaptMode.None;\n _this = _super.call(this, settings, true) || this;\n _this.loop = {\n start: 0,\n end: PI2,\n inc: function (propArguments) {\n var sideLength = _this.getRepetitionSideLength(propArguments);\n return (1 / Math.pow(sideLength[0] * sideLength[1], 0.25)) * ShapeLoop.PId2;\n },\n vertex: function (shapeLoopRepetition) { return [Math.cos(shapeLoopRepetition.angle), Math.sin(shapeLoopRepetition.angle)]; },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n return Circle;\n}(ShapeLoop));\nexport default Circle;\n//# sourceMappingURL=Circle.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport ShapeBuffer from \"../ShapeBuffer\";\n/**\n *\n * @category Core.Primitives\n * @class Line\n * @extends {ShapeBuffer}\n */\nvar Line = /** @class */ (function (_super) {\n __extends(Line, _super);\n /**\n * Creates an instance of Line.\n *\n * @param {ShapeBaseSettings} [settings={}]\n * @memberof Line\n */\n function Line(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = 'Line';\n settings.shape = [-1, 0, 1, 0];\n settings.adaptMode = EShapePrimitiveAdaptMode.None;\n settings.bClosed = false;\n _this = _super.call(this, settings) || this;\n return _this;\n }\n return Line;\n}(ShapeBuffer));\nexport default Line;\n//# sourceMappingURL=Line.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { PI2 } from \"../../math\";\nimport ShapeLoop from \"../ShapeLoop\";\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\n/**\n * Lissajous shape\n *\n * @category Core.Primitives\n * @class Lissajous\n * @extends {ShapeLoop}\n */\nvar Lissajous = /** @class */ (function (_super) {\n __extends(Lissajous, _super);\n /**\n * Creates an instance of Lissajous.\n *\n * @param {ILissajousSettings} [settings={}]\n * @memberof Lissajous\n */\n function Lissajous(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = 'Lissajous';\n settings.loopDependencies = (settings.loopDependencies || []).concat(['wx', 'wy', 'wz']);\n settings.adaptMode = EShapePrimitiveAdaptMode.None;\n _this = _super.call(this, settings, true) || this;\n _this.props.wx = settings.wx || 1;\n _this.props.wy = settings.wy || 2;\n _this.props.wz = settings.wz || 0;\n _this.loop = {\n start: 0,\n end: PI2,\n inc: function (propArguments) {\n var wx = _this.getProp('wx', propArguments);\n var wy = _this.getProp('wy', propArguments);\n var ratio = wx == wy ? ShapeLoop.PId2 : 0.5 - Math.min(49, wx + wy) * 0.01;\n var sideLength = _this.getRepetitionSideLength(propArguments);\n return (1 / Math.pow(sideLength[0] * sideLength[1], 0.25)) * ratio;\n },\n vertex: function (shapeLoopRepetition) {\n return _this.wx === _this.wy\n ? [Math.cos(shapeLoopRepetition.angle + _this.wz), Math.sin(shapeLoopRepetition.angle)]\n : [Math.cos(_this.wx * shapeLoopRepetition.angle + _this.wz), Math.sin(_this.wy * shapeLoopRepetition.angle)];\n },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n Lissajous.prototype.generateLoopBuffer = function (propArguments) {\n this.wx = this.getProp('wx', propArguments, 1);\n this.wy = this.getProp('wy', propArguments, 2);\n this.wz = this.getProp('wz', propArguments, 2);\n return _super.prototype.generateLoopBuffer.call(this, propArguments);\n };\n return Lissajous;\n}(ShapeLoop));\nexport default Lissajous;\n//# sourceMappingURL=Lissajous.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport ShapeLoop from \"../ShapeLoop\";\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport { PI2 } from \"../../math\";\n/**\n * Polygon shape\n *\n * @category Core.Primitives\n * @class Polygon\n * @extends {ShapeLoop}\n */\nvar Polygon = /** @class */ (function (_super) {\n __extends(Polygon, _super);\n function Polygon(settings) {\n if (settings === void 0) { settings = {}; }\n var _a;\n var _this = this;\n settings.type = settings.type || 'Polygon';\n settings.loopDependencies = (settings.loopDependencies || []).concat(['sideNumber']);\n settings.adaptMode = (_a = settings.adaptMode) !== null && _a !== void 0 ? _a : EShapePrimitiveAdaptMode.None;\n _this = _super.call(this, settings, true) || this;\n _this.props.sideNumber = settings.sideNumber;\n _this.loop = {\n start: 0,\n end: PI2,\n inc: function (propArguments) {\n return PI2 / _this.getProp('sideNumber', propArguments, 5);\n },\n vertex: function (shapeLoopRepetition) {\n return [Math.cos(shapeLoopRepetition.angle), Math.sin(shapeLoopRepetition.angle)];\n },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n return Polygon;\n}(ShapeLoop));\nexport default Polygon;\n//# sourceMappingURL=Polygon.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport ShapeBuffer from \"../ShapeBuffer\";\n/**\n *\n * @category Core.Primitives\n * @class Rect\n * @extends {ShapeBuffer}\n */\nvar Rect = /** @class */ (function (_super) {\n __extends(Rect, _super);\n /**\n * Creates an instance of Rect.\n *\n * @param {ShapeBaseSettings} [settings={}]\n * @memberof Rect\n */\n function Rect(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = 'Rect';\n settings.shape = [-1, -1, 1, -1, 1, 1, -1, 1];\n settings.adaptMode = EShapePrimitiveAdaptMode.None;\n _this = _super.call(this, settings) || this;\n return _this;\n }\n return Rect;\n}(ShapeBuffer));\nexport default Rect;\n//# sourceMappingURL=Rect.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport ShapeLoop from \"../ShapeLoop\";\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport { PI2 } from \"../../math\";\n/**\n * Rose shape\n *\n * @category Core.Primitives\n * @class Rose\n * @extends {ShapeLoop}\n */\nvar Rose = /** @class */ (function (_super) {\n __extends(Rose, _super);\n /**\n * Creates an instance of Rose.\n *\n * @param {IRoseSettings} [settings={}]\n * @memberof Rose\n */\n function Rose(settings) {\n if (settings === void 0) { settings = {}; }\n var _a, _b, _c;\n var _this = this;\n settings.type = 'Rose';\n settings.loopDependencies = (settings.loopDependencies || []).concat(['n', 'd']);\n settings.adaptMode = (_a = settings.adaptMode) !== null && _a !== void 0 ? _a : EShapePrimitiveAdaptMode.Scale;\n _this = _super.call(this, settings, true) || this;\n _this.props.n = (_b = settings.n) !== null && _b !== void 0 ? _b : 1;\n _this.props.d = (_c = settings.d) !== null && _c !== void 0 ? _c : 2;\n _this.loop = {\n start: 0,\n end: function (propArguments) {\n return Rose.getFinalAngleFromK(_this.getProp('n', propArguments), _this.getProp('d', propArguments));\n },\n inc: function (propArguments) {\n var n = _this.getProp('n', propArguments);\n var d = _this.getProp('d', propArguments);\n var sideLength = _this.getRepetitionSideLength(propArguments);\n var sides = Math.pow(sideLength[0] * sideLength[1], 0.45);\n var k = d < n ? n / d : 1.5;\n return PI2 / (sides * k);\n },\n vertex: function (shapeLoopRepetition) {\n var f = Math.cos(_this.k * shapeLoopRepetition.angle);\n return [f * Math.cos(shapeLoopRepetition.angle), f * Math.sin(shapeLoopRepetition.angle)];\n },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n Rose.prototype.generateLoopBuffer = function (propArguments) {\n this.k = this.getProp('n', propArguments) / this.getProp('d', propArguments);\n return _super.prototype.generateLoopBuffer.call(this, propArguments);\n };\n /**\n * Return end angle of rose\n *\n * @static\n * @param {number} n\n * @param {number} d\n * @returns {number}\n * @memberof Rose\n */\n Rose.getFinalAngleFromK = function (n, d) {\n if (n == d)\n return PI2;\n var k = n / d;\n var p = n * d;\n if (!Number.isInteger(k) && k % 0.5 == 0)\n return 4 * Math.PI;\n return Math.PI * d * (p % 2 == 0 ? 2 : 1);\n };\n return Rose;\n}(ShapeLoop));\nexport default Rose;\n//# sourceMappingURL=Rose.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport ShapeLoop from \"../ShapeLoop\";\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport { PI2 } from \"../../math\";\n/**\n * Spiral shape\n *\n * @category Core.Primitives\n * @class Spiral\n * @extends {ShapeLoop}\n */\nvar Spiral = /** @class */ (function (_super) {\n __extends(Spiral, _super);\n /**\n * Creates an instance of Spiral.\n *\n * @param {SpiralSettings} [settings={}]\n * @memberof Spiral\n */\n function Spiral(settings) {\n if (settings === void 0) { settings = {}; }\n var _a, _b, _c, _d;\n var _this = this;\n settings.type = 'Spiral';\n settings.bClosed = false;\n settings.adaptMode = (_a = settings.adaptMode) !== null && _a !== void 0 ? _a : EShapePrimitiveAdaptMode.None;\n settings.loopDependencies = (settings.loopDependencies || []).concat(['twists', 'twistsStart', 'spiral']);\n _this = _super.call(this, settings, true) || this;\n _this.props.spiral = (_b = settings.spiral) !== null && _b !== void 0 ? _b : Spiral.types.ARCHIMEDE;\n _this.props.twists = (_c = settings.twists) !== null && _c !== void 0 ? _c : 2;\n _this.props.twistsStart = (_d = settings.twistsStart) !== null && _d !== void 0 ? _d : 0;\n _this.loop = {\n start: function (propArguments) { return PI2 * _this.getProp('twistsStart', propArguments); },\n end: function (propArguments) {\n return PI2 *\n (_this.getProp('twistsStart', propArguments) + _this.getProp('twists', propArguments));\n },\n inc: function (propArguments) {\n var twists = _this.getProp('twists', propArguments);\n var rep = PI2 * twists;\n var sideLength = _this.getRepetitionSideLength(propArguments);\n var radius = 4 + Math.sqrt(sideLength[0] * sideLength[1]);\n return rep / (radius * twists);\n },\n vertex: function (shapeLoopRepetition) {\n var r = _this.r(shapeLoopRepetition.angle);\n return [r * Math.cos(shapeLoopRepetition.angle), r * Math.sin(shapeLoopRepetition.angle)];\n },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n Spiral.prototype.generateLoopBuffer = function (propArguments) {\n this.spiral = this.getProp('spiral', propArguments);\n this.r = Spiral.getRFromTSpiralType(this.spiral);\n return _super.prototype.generateLoopBuffer.call(this, propArguments);\n };\n // /**\n // * Set single or multiple props\n // *\n // * @param {(keyof ISpiralProps | ISpiralProps)} key\n // * @param {*} [value]\n // * @memberof Spiral\n // */\n // public setProp(key: keyof ISpiralProps | ISpiralProps, value?: any): void {\n // \tkey = typeof key === 'string' ? { [key]: value } : key\n // \tif (('twists' in key || 'twistsStart' in key) && this.props.loop) {\n // \t\tthis.props.loop.start = undefined\n // \t\tthis.props.loop.end = undefined\n // \t}\n // \tsuper.setProp(key as keyof IShapeLoopProps, value)\n // }\n /**\n * Point position and scale factor for spiral types\n *\n * @static\n * @param {TSpiralType} spiral\n * @returns {number}\n * @memberof Spiral\n */\n Spiral.getRFromTSpiralType = function (spiral) {\n switch (spiral) {\n case Spiral.types.ARCHIMEDE:\n return function (angle) { return angle / 10; };\n case Spiral.types.HYPERBOLIC:\n return function (angle) { return (1 / angle) * 3; };\n case Spiral.types.FERMAT:\n return function (angle) { return Math.pow(angle, 0.5) / 3; };\n case Spiral.types.LITUUS:\n return function (angle) { return Math.pow(angle, -0.5); };\n case Spiral.types.LOGARITHMIC:\n return function (angle) { return Math.pow(Math.E, (angle * 0.2)) / 10; };\n }\n return function (angle) { return angle; };\n };\n /**\n * Spural types\n *\n * @static\n * @type {{ [name in TSpiralType]: TSpiralType }}\n * @memberof Spiral\n */\n Spiral.types = {\n ARCHIMEDE: 'ARCHIMEDE',\n HYPERBOLIC: 'HYPERBOLIC',\n FERMAT: 'FERMAT',\n LITUUS: 'LITUUS',\n LOGARITHMIC: 'LOGARITHMIC',\n };\n return Spiral;\n}(ShapeLoop));\nexport default Spiral;\n//# sourceMappingURL=Spiral.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport ShapeLoop from \"../ShapeLoop\";\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport { PI2 } from \"../../math\";\n/**\n * ShperShape\n *\n * @category Core.Primitives\n * @class SuperShape\n * @extends {ShapeLoop}\n */\nvar SuperShape = /** @class */ (function (_super) {\n __extends(SuperShape, _super);\n /**\n * Creates an instance of SuperShape.\n *\n * @param {ISuperShapeSettings} [settings={}]\n * @memberof SuperShape\n */\n function SuperShape(settings) {\n if (settings === void 0) { settings = {}; }\n var _a, _b, _c, _d, _e, _f, _g;\n var _this = this;\n settings.type = 'SuperShape';\n settings.loopDependencies = (settings.loopDependencies || []).concat(['a', 'b', 'm', 'n1', 'n2', 'n3']);\n settings.adaptMode = (_a = settings.adaptMode) !== null && _a !== void 0 ? _a : EShapePrimitiveAdaptMode.Scale;\n _this = _super.call(this, settings, true) || this;\n _this.props.a = (_b = settings.a) !== null && _b !== void 0 ? _b : 1;\n _this.props.b = (_c = settings.b) !== null && _c !== void 0 ? _c : 1;\n _this.props.m = (_d = settings.m) !== null && _d !== void 0 ? _d : 6;\n _this.props.n1 = (_e = settings.n1) !== null && _e !== void 0 ? _e : 1;\n _this.props.n2 = (_f = settings.n2) !== null && _f !== void 0 ? _f : 1;\n _this.props.n3 = (_g = settings.n3) !== null && _g !== void 0 ? _g : 1;\n _this.loop = {\n start: 0,\n end: PI2,\n inc: function (propArguments) {\n var sideLength = _this.getRepetitionSideLength(propArguments);\n return Math.PI / Math.pow(sideLength[0] * sideLength[1], 0.5);\n },\n vertex: function (shapeLoopRepetition) {\n var angle = shapeLoopRepetition.angle;\n var m = (_this.m * angle) / 4;\n var a = Math.pow(Math.abs(Math.cos(m) / _this.a), _this.n2);\n var b = Math.pow(Math.abs(Math.sin(m) / _this.b), _this.n3);\n var raux = Math.pow((a + b), (1 / _this.n1));\n var r = raux === 0 ? 1 : 1 / raux;\n return [r * Math.cos(angle), r * Math.sin(angle)];\n },\n };\n _this.bStaticLoop = _this.isStaticLoop();\n _this.bStatic = _this.isStatic();\n _this.bStaticIndexed = _this.isStaticIndexed();\n return _this;\n }\n SuperShape.prototype.generateLoopBuffer = function (propArguments) {\n this.a = this.getProp('a', propArguments);\n this.b = this.getProp('b', propArguments);\n this.m = this.getProp('m', propArguments);\n this.n1 = this.getProp('n1', propArguments);\n this.n2 = this.getProp('n2', propArguments);\n this.n3 = this.getProp('n3', propArguments);\n return _super.prototype.generateLoopBuffer.call(this, propArguments);\n };\n return SuperShape;\n}(ShapeLoop));\nexport default SuperShape;\n//# sourceMappingURL=SuperShape.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { EShapePrimitiveAdaptMode } from \"../../types/shape-base\";\nimport ShapeBuffer from \"../ShapeBuffer\";\n/**\n * Triangle ShapeBuffer\n *\n * @category Core.Primitives\n */\nvar Triangle = /** @class */ (function (_super) {\n __extends(Triangle, _super);\n /**\n * Creates an instance of Triangleeee.\n *\n * @param {ShapeBaseSettings} [settings={}]\n * @memberof Triangle\n */\n function Triangle(settings) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n settings.type = 'Triangle';\n settings.shape = [-1, -1, 1, 0, -1, 1];\n settings.adaptMode = EShapePrimitiveAdaptMode.None;\n _this = _super.call(this, settings) || this;\n return _this;\n }\n return Triangle;\n}(ShapeBuffer));\nexport default Triangle;\n//# sourceMappingURL=Triangle.js.map","/**\n * Repetition type enumerator.\n *\n * @category Core.Enums\n * @internal\n */\nexport var ERepetitionType;\n(function (ERepetitionType) {\n /**\n * Defines the type of repetition of the shape,\n * in a circular way starting from the center of the scene\n * @order 1\n */\n ERepetitionType[ERepetitionType[\"Ring\"] = 1] = \"Ring\";\n /**\n * Defines the type of repetition of the shape,\n * on a nxm grid starting from the center of the scene\n * @order 2\n */\n ERepetitionType[ERepetitionType[\"Matrix\"] = 2] = \"Matrix\";\n})(ERepetitionType || (ERepetitionType = {}));\n//# sourceMappingURL=scene-child.js.map","export {};\n//# sourceMappingURL=scene.js.map","/**\n *\n *\n * @category Core.Enums\n */\nexport var EShapePrimitiveAdaptMode;\n(function (EShapePrimitiveAdaptMode) {\n /**\n * The buffer is not changed\n * @order 1\n */\n EShapePrimitiveAdaptMode[EShapePrimitiveAdaptMode[\"None\"] = 0] = \"None\";\n /**\n * The buffer is scaled in a range between [-1, -1] and [1,1]\n * @order 2\n */\n EShapePrimitiveAdaptMode[EShapePrimitiveAdaptMode[\"Scale\"] = 2] = \"Scale\";\n /**\n * The buffer is scaled in a range between [-1, -1] and [1,1] and is centered\n * @order 3\n */\n EShapePrimitiveAdaptMode[EShapePrimitiveAdaptMode[\"Center\"] = 4] = \"Center\";\n /**\n * The buffer is adapted centrally and expanded in a range between [-1, -1] and [1,1]\n * @order 4\n */\n EShapePrimitiveAdaptMode[EShapePrimitiveAdaptMode[\"Fill\"] = 8] = \"Fill\";\n})(EShapePrimitiveAdaptMode || (EShapePrimitiveAdaptMode = {}));\n//# sourceMappingURL=shape-base.js.map","export {};\n//# sourceMappingURL=shape-primitives.js.map","/**\n * Meta\n */\nexport { version, author, license } from \"./meta\";\n// Set glMatrixArrayType\nimport { glMatrix } from 'gl-matrix';\nglMatrix.setMatrixArrayType(Array);\n/**\n * Core\n */\nexport { default as Scene } from \"./core/Scene\";\nexport { default as SceneChild } from \"./core/SceneChild\";\nexport { default as Group } from \"./core/Group\";\n// Shapes\nexport { default as ShapePrimitive } from \"./core/shapes/ShapePrimitive\";\nexport { default as ShapeLoop } from \"./core/shapes/ShapeLoop\";\nexport { default as ShapeBuffer } from \"./core/shapes/ShapeBuffer\";\nexport { default as Shape } from \"./core/shapes/Shape\";\nexport { default as ShapeRecursive } from \"./core/shapes/ShapeRecursive\";\nexport { default as Line } from \"./core/shapes/primitives/Line\";\nexport { default as Triangle } from \"./core/shapes/primitives/Triangle\";\nexport { default as Rect } from \"./core/shapes/primitives/Rect\";\nexport { default as Polygon } from \"./core/shapes/primitives/Polygon\";\nexport { default as Circle } from \"./core/shapes/primitives/Circle\";\nexport { default as Rose } from \"./core/shapes/primitives/Rose\";\nexport { default as Spiral } from \"./core/shapes/primitives/Spiral\";\nexport { default as Lissajous } from \"./core/shapes/primitives/Lissajous\";\nexport { default as SuperShape } from \"./core/shapes/primitives/SuperShape\";\n// Utilities\nexport { lerp, clamp, relativeClamp, toDegrees, toRadians, now, noise, angleFromRepetition, angle2FromRepetition, distanceFromRepetition, } from \"./Utilites\";\nexport { default as Vec2 } from \"./core/math/Vec2\";\nexport { PHI, PI2, log } from \"./core/math\";\n/**\n * Services\n */\nexport { default as DrawerCanvas } from \"./services/drawers/drawer-canvas/DrawerCanvas\";\nexport { default as Animation } from \"./services/animation/Simple\";\nexport { default as Easings } from \"./services/animation/Easings\";\n//# sourceMappingURL=index-light.js.map","/**\n * Types & Interface\n */\nexport * from \"./core/types/scene\";\nexport * from \"./core/types/scene-child\";\nexport * from \"./core/types/shape-base\";\nexport * from \"./core/types/shape-primitives\";\nexport * from \"./index-light\";\nexport { default as SceneUtilities } from \"./services/scene-utilities/SceneUtilities\";\nexport { default as DrawerSVG } from \"./services/drawers/drawer-svg/DrawerSVG\";\nexport { default as Renderer } from \"./services/renderer/Renderer\";\nexport { default as JSONImporter } from \"./services/importers/JSONImporter\";\nexport { default as JSONExporter } from \"./services/exporters/JSONExporter\";\nexport { default as GCODEExporter } from \"./services/exporters/GCODEExporter\";\nexport { default as SVGExporter } from \"./services/exporters/SVGExporter\";\nexport { default as SVGImporter } from \"./services/importers/SVGImporter\";\n//# sourceMappingURL=index.js.map","var version = '%VERSION%';\nvar author = 'Gennaro Bosone ';\nvar license = '%LICENSE%';\nexport { version, author, license };\n//# sourceMappingURL=meta.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport Simple from \"./Simple\";\nimport SceneUtilitiesExtended from \"../scene-utilities/SceneUtilitiesExtended\";\nimport * as Urpflanze from \"../../index-light\";\n/**\n * @ignore\n * @internal\n * @category Services.Animation\n */\nvar Animation = {\n composeAnimation: function (scene, prop_name, animation) {\n switch (animation.type) {\n case 'simple': {\n var simpleAnimation = __assign({}, animation.value);\n simpleAnimation.from = SceneUtilitiesExtended.getTransformedValue(scene, prop_name, simpleAnimation.from);\n simpleAnimation.to = SceneUtilitiesExtended.getTransformedValue(scene, prop_name, simpleAnimation.to);\n return Simple.compose(simpleAnimation);\n }\n case 'raw': {\n var rawValue = animation.value;\n return new Function('Urpflanze', 'scene', \"\\\"use strict\\\"; return \" + rawValue.raw)(Urpflanze, scene);\n }\n // case 'random': {\n // const randomValue = SetProp.getRandomFunctionForProp(prop_name)\n // return ({ shape }) => randomValue(shape.rand())\n // }\n }\n },\n};\nexport default Animation;\n//# sourceMappingURL=Animation.js.map","/**\n * Easing functions\n *\n * @category Services.Animation\n */\nvar Easings = {\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n linear: function (time, start, end, duration) { return (end * time) / duration + start; },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duratte duration\n * @returns {number}\n */\n quadraticIn: function (time, start, end, duratte) {\n time /= duratte;\n return end * time * time + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quadraticOut: function (time, start, end, duration) {\n time /= duration;\n return -end * time * (time - 2) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quadraticInOut: function (time, start, end, duration) {\n time /= duration / 2;\n if (time < 1)\n return (end / 2) * time * time + start;\n time--;\n return (-end / 2) * (time * (time - 2) - 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n cubicIn: function (time, start, end, duration) {\n time /= duration;\n return end * time * time * time + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n cubicOut: function (time, start, end, duration) {\n time /= duration;\n time--;\n return end * (time * time * time + 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n cubicInOut: function (time, start, end, duration) {\n time /= duration / 2;\n if (time < 1)\n return (end / 2) * time * time * time + start;\n time -= 2;\n return (end / 2) * (time * time * time + 2) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quarticIn: function (time, start, end, duration) {\n time /= duration;\n return end * time * time * time * time + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quarticOut: function (time, start, end, duration) {\n time /= duration;\n time--;\n return -end * (time * time * time * time - 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quarticInOut: function (time, start, end, duration) {\n time /= duration / 2;\n if (time < 1)\n return (end / 2) * time * time * time * time + start;\n time -= 2;\n return (-end / 2) * (time * time * time * time - 2) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quinticIn: function (time, start, end, duration) {\n time /= duration;\n return end * time * time * time * time * time + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quinticOut: function (time, start, end, duration) {\n time /= duration;\n time--;\n return end * (time * time * time * time * time + 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n quinticInOut: function (time, start, end, duration) {\n time /= duration / 2;\n if (time < 1)\n return (end / 2) * time * time * time * time * time + start;\n time -= 2;\n return (end / 2) * (time * time * time * time * time + 2) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n sinusoidalIn: function (time, start, end, duration) {\n return -end * Math.cos((time / duration) * (Math.PI / 2)) + end + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n sinusoidalOut: function (time, start, end, duration) {\n return end * Math.sin((time / duration) * (Math.PI / 2)) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n sinusoidalInOut: function (time, start, end, duration) {\n return (-end / 2) * (Math.cos((Math.PI * time) / duration) - 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n exponentialIn: function (time, start, end, duration) {\n return end * Math.pow(2, 10 * (time / duration - 1)) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n exponentialOut: function (time, start, end, duration) {\n return end * (-Math.pow(2, (-10 * time) / duration) + 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n exponentialInOut: function (time, start, end, duration) {\n time /= duration / 2;\n if (time < 1)\n return (end / 2) * Math.pow(2, 10 * (time - 1)) + start;\n time--;\n return (end / 2) * (-Math.pow(2, -10 * time) + 2) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n circularIn: function (time, start, end, duration) {\n time /= duration;\n return -end * (Math.sqrt(1 - time * time) - 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n circularOut: function (time, start, end, duration) {\n time /= duration;\n time--;\n return end * Math.sqrt(1 - time * time) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @returns {number}\n */\n circularInOut: function (time, start, end, duration) {\n time /= duration / 2;\n if (time < 1)\n return (-end / 2) * (Math.sqrt(1 - time * time) - 1) + start;\n time -= 2;\n return (end / 2) * (Math.sqrt(1 - time * time) + 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @param {number} a amplitude (optional)\n * @param {number} p period (optional)\n * @return {number}\n */\n elasticIn: function (time, start, end, duration, a, p) {\n if (time == 0) {\n return start;\n }\n if ((time /= duration) == 1) {\n return start + end;\n }\n if (!p) {\n p = duration * 0.3;\n }\n var s = 0;\n if (!a || a < Math.abs(end)) {\n a = end;\n s = p / 4;\n }\n else {\n s = (p / (2 * Math.PI)) * Math.asin(end / a);\n }\n return -(a * Math.pow(2, 10 * (time -= 1)) * Math.sin(((time * duration - s) * (2 * Math.PI)) / p)) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @param {number} a amplitude (optional)\n * @param {number} p period (optional)\n * @return {number}\n */\n elasticOut: function (time, start, end, duration, a, p) {\n if (time == 0) {\n return start;\n }\n if ((time /= duration) == 1) {\n return start + end;\n }\n if (!p) {\n p = duration * 0.3;\n }\n var s = 0;\n if (!a || a < Math.abs(end)) {\n a = end;\n s = p / 4;\n }\n else {\n s = (p / (2 * Math.PI)) * Math.asin(end / a);\n }\n return a * Math.pow(2, -10 * time) * Math.sin(((time * duration - s) * (2 * Math.PI)) / p) + end + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @param {number} a amplitude (optional)\n * @param {number} p period (optional)\n * @return {number}\n */\n elasticInOut: function (time, start, end, duration, a, p) {\n if (time == 0) {\n return start;\n }\n if ((time /= duration / 2) == 2) {\n return start + end;\n }\n if (!p) {\n p = duration * (0.3 * 1.5);\n }\n var s = 0;\n if (!a || a < Math.abs(end)) {\n a = end;\n s = p / 4;\n }\n else {\n s = (p / (2 * Math.PI)) * Math.asin(end / a);\n }\n if (time < 1) {\n return -0.5 * (a * Math.pow(2, 10 * (time -= 1)) * Math.sin(((time * duration - s) * (2 * Math.PI)) / p)) + start;\n }\n return (a * Math.pow(2, -10 * (time -= 1)) * Math.sin(((time * duration - s) * (2 * Math.PI)) / p) * 0.5 + end + start);\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @param {number} s overshoot (optional)\n * @return {number}\n */\n backIn: function (time, start, end, duration, s) {\n if (typeof s == 'undefined') {\n s = 1.70158;\n }\n return end * (time /= duration) * time * ((s + 1) * time - s) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @param {number} s overshoot (optional)\n * @return {number}\n */\n backOut: function (time, start, end, duration, s) {\n if (typeof s == 'undefined') {\n s = 1.70158;\n }\n return end * ((time = time / duration - 1) * time * ((s + 1) * time + s) + 1) + start;\n },\n /**\n * @param {number} time current time\n * @param {number} start start value\n * @param {number} end end value\n * @param {number} duration duration\n * @param {number} s overshoot (optional)\n * @return {number}\n */\n backInOut: function (time, start, end, duration, s) {\n if (typeof s == 'undefined') {\n s = 1.70158;\n }\n if ((time /= duration / 2) < 1) {\n return (end / 2) * (time * time * (((s *= 1.525) + 1) * time - s)) + start;\n }\n return (end / 2) * ((time -= 2) * time * (((s *= 1.525) + 1) * time + s) + 2) + start;\n },\n /**\n * @param {number} t current time\n * @param {number} b start value\n * @param {number} c end value\n * @param {number} d duration\n * @return {number}\n */\n bounceIn: function (time, start, end, duration) {\n return end - Easings.bounceOut(duration - time, 0, end, duration) + start;\n },\n /**\n * @param {number} t current time\n * @param {number} b start value\n * @param {number} c end value\n * @param {number} d duration\n * @return {number}\n */\n bounceOut: function (time, start, end, duration) {\n if ((time /= duration) < 1 / 2.75) {\n return end * (7.5625 * time * time) + start;\n }\n else if (time < 2 / 2.75) {\n return end * (7.5625 * (time -= 1.5 / 2.75) * time + 0.75) + start;\n }\n else if (time < 2.5 / 2.75) {\n return end * (7.5625 * (time -= 2.25 / 2.75) * time + 0.9375) + start;\n }\n return end * (7.5625 * (time -= 2.625 / 2.75) * time + 0.984375) + start;\n },\n /**\n *\n *\n * @param {number} time\n * @param {number} start\n * @param {number} end\n * @param {number} duration\n * @returns\n */\n bounceInOut: function (time, start, end, duration) {\n if (time < duration / 2) {\n return Easings.bounceIn(time * 2, 0, end, duration) * 0.5 + start;\n }\n return Easings.bounceOut(time * 2 - duration, 0, end, duration) * 0.5 + end * 0.5 + start;\n },\n};\nexport default Easings;\n//# sourceMappingURL=Easings.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { parseColorAndConvert, IConvertedColor } from \"../../Color\";\nimport { toArray } from \"../../Utilites\";\nimport Easings from \"./Easings\";\n/**\n * @category Services.Animation\n */\nvar Simple = {\n loop: function (props) {\n return Simple.compose(__assign(__assign({ mode: 'sinusoidal', modeFunction: 'cos' }, props), { type: 'loop', delay: undefined }));\n },\n uncontrolledLoop: function (props) {\n return Simple.compose(__assign(__assign({ mode: 'easing', modeFunction: 'linear' }, props), { type: 'uncontrolled-loop' }));\n },\n static: function (props) {\n return Simple.compose(__assign(__assign({ mode: 'easing', modeFunction: 'linear' }, props), { type: 'static' }));\n },\n compose: function (simpleAnimation) {\n if (typeof simpleAnimation.from !== 'string' && typeof simpleAnimation.to !== 'string') {\n var bArray = Array.isArray(simpleAnimation.from) || Array.isArray(simpleAnimation.to);\n //@ts-ignore\n var from_1 = bArray ? toArray(simpleAnimation.from) : simpleAnimation.from;\n //@ts-ignore\n var to_1 = bArray ? toArray(simpleAnimation.to) : simpleAnimation.to;\n var vCallback_1 = bArray\n ? function (current_index, v) {\n var a = (simpleAnimation.invertOdd && current_index % 2 == 1 ? to_1 : from_1);\n var b = (simpleAnimation.invertOdd && current_index % 2 == 1 ? from_1 : to_1);\n return simpleAnimation.typeValue === 'int'\n ? [Math.round(a[0] + v * (b[0] - a[0])), Math.round(a[1] + v * (b[1] - a[1]))]\n : [a[0] + v * (b[0] - a[0]), a[1] + v * (b[1] - a[1])];\n }\n : function (current_index, v) {\n var a = (simpleAnimation.invertOdd && current_index % 2 == 1 ? to_1 : from_1);\n var b = (simpleAnimation.invertOdd && current_index % 2 == 1 ? from_1 : to_1);\n return simpleAnimation.typeValue === 'int' ? Math.round(a + v * (b - a)) : a + v * (b - a);\n };\n return createSimpleAnimationCallback(simpleAnimation, function (props, v) {\n return vCallback_1(props.repetition.index, v);\n });\n }\n else {\n var from_2 = parseColorAndConvert(simpleAnimation.from);\n var to_2 = parseColorAndConvert(simpleAnimation.to);\n var vCallback_2 = simpleAnimation.colorTransitionMode == 'hue' ? interpolateColorHSL : interpolateColorRGB;\n if (typeof from_2 !== 'undefined' && typeof to_2 !== 'undefined') {\n return createSimpleAnimationCallback(simpleAnimation, function (props, v) {\n var a = simpleAnimation.invertOdd && props.repetition.index % 2 == 1 ? to_2 : from_2;\n var b = simpleAnimation.invertOdd && props.repetition.index % 2 == 1 ? from_2 : to_2;\n return vCallback_2(a, b, v);\n });\n }\n return function () { return 0; };\n }\n },\n};\nfunction createSimpleAnimationCallback(animation, value) {\n var _a = animation, duration = _a.duration, type = _a.type, mode = _a.mode, modeFunction = _a.modeFunction, delay = _a.delay;\n if (type === 'static') {\n if (delay && delay > 0)\n return function SimpleAnimation(props) {\n var _a, _b, _c;\n return value(props, (((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0) <= delay\n ? 0\n : (((_b = props.shape.scene) === null || _b === void 0 ? void 0 : _b.currentTime) || 0) - delay >= duration\n ? 1\n : Easings[modeFunction]((((_c = props.shape.scene) === null || _c === void 0 ? void 0 : _c.currentTime) || 0) - delay, 0, 1, duration));\n };\n else\n return function SimpleAnimation(props) {\n var _a, _b;\n return value(props, (((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0) <= duration\n ? Easings[modeFunction](((_b = props.shape.scene) === null || _b === void 0 ? void 0 : _b.currentTime) || 0, 0, 1 - 0, duration)\n : 1);\n };\n }\n else {\n if (type === 'loop') {\n if (mode == 'sinusoidal') {\n return function SimpleAnimation(props) {\n var _a;\n var frequency = ((((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0 || 0) * 2 * Math.PI) / duration;\n return value(props, 0.5 + Math[modeFunction](frequency) * 0.5);\n };\n } /* easing */\n else {\n return function SimpleAnimation(props) {\n var _a;\n var d2 = duration / 2;\n var t = (((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0) % duration;\n return value(props, t <= d2\n ? Easings[modeFunction](t, 0, 1, d2)\n : Easings[modeFunction](d2 - (t - d2), 0, 1, d2));\n };\n }\n } // uncontrolled-loop\n else {\n if (mode == 'sinusoidal') {\n return function SimpleAnimation(props) {\n var _a;\n var time = (((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0) % (duration + delay);\n time = time <= delay ? 0 : time - delay;\n var frequency = ((time || 0) * 2 * Math.PI) / duration;\n return value(props, 0.5 + Math[modeFunction](frequency) * 0.5);\n };\n }\n else {\n if (delay && delay > 0)\n return function SimpleAnimation(props) {\n var _a;\n var time = (((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0) % (duration + delay);\n return value(props, time <= delay\n ? 0\n : time - delay >= duration\n ? 1\n : Easings[modeFunction](time - delay, 0, 1, duration));\n };\n else\n return function SimpleAnimation(props) {\n var _a;\n var time = (((_a = props.shape.scene) === null || _a === void 0 ? void 0 : _a.currentTime) || 0) % duration;\n return value(props, time <= duration ? Easings[modeFunction](time, 0, 1 - 0, duration) : 1);\n };\n }\n }\n }\n}\nfunction interpolateColorRGB(start, end, v) {\n var r = start.r + v * (end.r - start.r);\n var g = start.g + v * (end.g - start.g);\n var b = start.b + v * (end.b - start.b);\n var alpha = start.alpha + v * (end.alpha - start.alpha);\n return \"rgba(\" + Math.floor(r) + \",\" + Math.floor(g) + \",\" + Math.floor(b) + \",\" + alpha + \")\";\n}\nfunction interpolateColorHSL(start, end, v) {\n var h = start.h + v * (end.h - start.h);\n var s = start.s + v * (end.s - start.s);\n var l = start.l + v * (end.l - start.l);\n var alpha = start.alpha + v * (end.alpha - start.alpha);\n return \"hsla(\" + h + \",\" + s + \"%,\" + l + \"%,\" + alpha + \")\";\n}\nexport default Simple;\n//# sourceMappingURL=Simple.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport Scene from \"../../core/Scene\";\nimport Timeline from \"../timeline/Timeline\";\nimport SceneUtilities from \"../scene-utilities/SceneUtilities\";\nimport Emitter from \"../events/Emitter\";\nimport { parseColor } from \"../../Color\";\nimport { pmod } from \"../../core/math\";\n/**\n * Abstract Drawer\n *\n * @category Services.Drawer\n * @abstract\n * @class Drawer\n * @extends {Emitter}\n * @template IADrawerOptions\n * @template IDrawerEvents\n */\nvar Drawer = /** @class */ (function (_super) {\n __extends(Drawer, _super);\n function Drawer(scene, ratio, duration, framerate) {\n if (scene === void 0) { scene = undefined; }\n if (ratio === void 0) { ratio = undefined; }\n var _this = _super.call(this) || this;\n _this.timeline = new Timeline(duration, framerate);\n _this.ratio = ratio || (scene && scene.width && scene.height ? scene.width / scene.height : 1);\n if (scene) {\n var size = Math.max(scene.width, scene.height);\n var width = _this.ratio >= 1 ? size : size * _this.ratio;\n var height = _this.ratio >= 1 ? size / _this.ratio : size;\n scene.resize(width, height);\n _this.setScene(scene);\n }\n _this.draw_id = null;\n _this.redraw_id = null;\n _this.animation_id = null;\n _this.draw = _this.draw.bind(_this);\n _this.animate = _this.animate.bind(_this);\n _this.startAnimation = _this.startAnimation.bind(_this);\n return _this;\n }\n /**\n * Set scene\n *\n * @param {Scene} scene\n */\n Drawer.prototype.setScene = function (scene) {\n this.scene = scene;\n // if (!this.resolution && this.scene.width) this.resolution = this.scene.width\n };\n /**\n * Return scene\n *\n * @return {*} {Scene}\n */\n Drawer.prototype.getScene = function () {\n return this.scene;\n };\n /**\n * Return timeline\n *\n * @return {*} {Timeline}\n */\n Drawer.prototype.getTimeline = function () {\n return this.timeline;\n };\n /**\n * Resize scene and canvas\n *\n * @param {number} width\n * @param {number} height\n * @param {number} [ratio]\n */\n Drawer.prototype.resize = function (width, height, ratio) {\n var _this = this;\n ratio = ratio || this.ratio || width / height;\n var size = Math.max(width, height);\n width = ratio >= 1 ? size : size * ratio;\n height = ratio >= 1 ? size / ratio : size;\n this.ratio = ratio;\n if (this.scene) {\n this.scene.resize(width, height);\n Scene.walk(function (sceneChild) {\n if (sceneChild.data) {\n if (sceneChild.data.props) {\n var props_1 = sceneChild.data.props;\n Object.keys(props_1).forEach(function (name) {\n SceneUtilities.setProp(sceneChild, name, props_1[name], _this.scene);\n });\n }\n if (sceneChild.data.style) {\n var style_1 = sceneChild.data.style;\n Object.keys(style_1).forEach(function (name) {\n SceneUtilities.setDrawerProp(sceneChild, name, style_1[name], _this.scene);\n });\n }\n }\n }, this.scene);\n }\n };\n /**\n * Resize by ratio\n *\n */\n Drawer.prototype.setRatio = function (ratio) {\n if (this.scene) {\n this.resize(this.scene.width, this.scene.height, ratio);\n }\n };\n /**\n * Return drawer ratio\n */\n Drawer.prototype.getRatio = function () {\n return this.ratio;\n };\n /**\n * Set draw option\n *\n * @template K\n * @param {(K | IADrawerOptions)} name\n */\n Drawer.prototype.setOption = function (name, value) {\n if (typeof name == 'object') {\n var keys = Object.keys(name);\n for (var i = 0, len = keys.length; i < len; i++) {\n this.drawerOptions[keys[i]] = name[keys[i]];\n }\n }\n else {\n this.drawerOptions[name] = value;\n }\n };\n /**\n * Return option valie or default\n *\n * @template K\n * @param {K} name\n * @param {IADrawerOptions[K]} defaultValue\n */\n Drawer.prototype.getOption = function (name, defaultValue) {\n var _a;\n return (_a = this.drawerOptions[name]) !== null && _a !== void 0 ? _a : defaultValue;\n };\n /**\n * Return all options\n */\n Drawer.prototype.getOptions = function () {\n return this.drawerOptions;\n };\n /**\n * Internal tick animation\n */\n Drawer.prototype.animate = function (timestamp) {\n if (this.timeline.bSequenceStarted()) {\n this.animation_id = requestAnimationFrame(this.animate);\n if (this.timeline.tick(timestamp))\n this.draw();\n }\n };\n /**\n * Start animation drawing\n */\n Drawer.prototype.startAnimation = function () {\n this.stopAnimation();\n this.timeline.start();\n this.animation_id = requestAnimationFrame(this.animate);\n };\n /**\n * Stop animation drawing\n */\n Drawer.prototype.stopAnimation = function () {\n this.timeline.stop();\n if (this.animation_id)\n cancelAnimationFrame(this.animation_id);\n };\n /**\n * Pause animation drawing\n */\n Drawer.prototype.pauseAnimation = function () {\n this.timeline.pause();\n if (this.animation_id)\n cancelAnimationFrame(this.animation_id);\n };\n /**\n * Play animation drawing\n */\n Drawer.prototype.playAnimation = function () {\n this.timeline.start();\n requestAnimationFrame(this.animate);\n };\n /**\n * Redraw\n *\n * @returns {void}\n * @memberof DrawerCanvas\n */\n Drawer.prototype.redraw = function () {\n if (!this.timeline.bSequenceStarted()) {\n this.draw_id && cancelAnimationFrame(this.draw_id);\n if (typeof this.drawerOptions.ghosts === undefined || this.drawerOptions.ghosts === 0)\n this.timeline.stop();\n this.draw_id = requestAnimationFrame(this.draw);\n }\n else if (typeof this.drawerOptions.ghosts === undefined || this.drawerOptions.ghosts === 0) {\n this.stopAnimation();\n this.redraw_id && cancelAnimationFrame(this.redraw_id);\n this.redraw_id = requestAnimationFrame(this.startAnimation);\n }\n };\n /**\n * Return a style value\n *\n * @static\n * @template T\n * @param {ShapePrimitive} shape\n * @param {keyof T} key\n * @param {IDrawerPropArguments} propArguments\n * @param {*} [defaultValue]\n * @returns {*}\n */\n Drawer.getStreamDrawerProp = function (shape, key, propArguments, defaultValue) {\n var attribute = shape.style[key];\n if (typeof attribute === 'function') {\n attribute = attribute(propArguments);\n }\n return attribute !== null && attribute !== void 0 ? attribute : defaultValue;\n };\n /**\n * Each ghosts index and create drawerOptions to pass at the draw method\n *\n * @static\n * @template T\n * @param {T} drawerOptions\n * @param {Timeline} timeline\n * @param {((ghostDrawerOptions: T & { ghostIndex?: number }) => any)} ghostCallback\n */\n Drawer.eachGhosts = function (drawerOptions, timeline, ghostCallback) {\n if (drawerOptions.ghosts) {\n var ghostDrawerOptions = __assign({}, drawerOptions);\n var drawAtTime = timeline.getTime();\n var sequenceDuration = timeline.getDuration();\n var ghostRepetition = {\n offset: 0,\n index: 0,\n count: drawerOptions.ghosts,\n };\n for (var i = 1; i <= drawerOptions.ghosts; i++) {\n ghostRepetition.index = i;\n ghostRepetition.offset = ghostRepetition.index / ghostRepetition.count;\n var ghostTime = drawAtTime -\n (drawerOptions.ghostSkipFunction\n ? drawerOptions.ghostSkipFunction(ghostRepetition, drawAtTime)\n : i * drawerOptions.ghostSkipTime);\n ghostDrawerOptions.ghostIndex = i;\n ghostDrawerOptions.time = pmod(ghostTime, sequenceDuration);\n ghostCallback(ghostDrawerOptions);\n }\n }\n };\n /**\n * Create color based on ghostMultiplier\n *\n * @static\n * @param {any} color\n * @param {number} ghostMultiplier\n * @return {*} {(string | undefined)}\n */\n Drawer.ghostifyColor = function (color, ghostMultiplier) {\n if (typeof color === 'string' || typeof color === 'number') {\n var parsed = parseColor(color);\n if (parsed) {\n var ghostAlpha = parsed.alpha * ghostMultiplier;\n return parsed.type === 'rgb'\n ? \"rgba(\" + parsed.a + \",\" + parsed.b + \",\" + parsed.c + \",\" + ghostAlpha + \")\"\n : \"hsla(\" + parsed.a + \",\" + parsed.b + \"%,\" + parsed.c + \"%,\" + ghostAlpha + \")\";\n }\n }\n return color;\n };\n return Drawer;\n}(Emitter));\nexport default Drawer;\n//# sourceMappingURL=Drawer.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport Drawer from \"../Drawer\";\nimport FrameBuffer from \"./FrameBuffer\";\nimport { now } from \"../../../Utilites\";\nimport Vec2 from \"../../../core/math/Vec2\";\n/**\n *\n * @category Services.Drawer\n * @extends {Emitter}\n */\nvar DrawerCanvas = /** @class */ (function (_super) {\n __extends(DrawerCanvas, _super);\n function DrawerCanvas(scene, canvasOrContainer, drawerOptions, ratio, duration, framerate, bBuffering) {\n if (ratio === void 0) { ratio = undefined; }\n if (bBuffering === void 0) { bBuffering = false; }\n var _a, _b, _c, _d, _e;\n var _this = _super.call(this, scene, ratio, duration, framerate) || this;\n _this.bBuffering = false;\n _this.drawerOptions = {};\n _this.drawerOptions.clear = (_a = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.clear) !== null && _a !== void 0 ? _a : true;\n _this.drawerOptions.time = (_b = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.time) !== null && _b !== void 0 ? _b : 0;\n _this.drawerOptions.simmetricLines = (_c = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.simmetricLines) !== null && _c !== void 0 ? _c : 0;\n _this.drawerOptions.noBackground = (_d = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.noBackground) !== null && _d !== void 0 ? _d : false;\n _this.drawerOptions.ghosts = (drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.ghosts) || 0;\n _this.drawerOptions.ghostAlpha = (drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.ghostAlpha) === false ? false : true;\n _this.drawerOptions.ghostSkipTime = (_e = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.ghostSkipTime) !== null && _e !== void 0 ? _e : 30;\n _this.drawerOptions.ghostSkipFunction = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.ghostSkipFunction;\n _this.drawerOptions.backgroundImage = drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.backgroundImage;\n _this.drawerOptions.backgroundImageFit = (drawerOptions === null || drawerOptions === void 0 ? void 0 : drawerOptions.backgroundImageFit) || 'cover';\n _this.bBuffering = bBuffering;\n _this.buffer = new FrameBuffer();\n if ((typeof HTMLCanvasElement !== 'undefined' && canvasOrContainer instanceof HTMLCanvasElement) ||\n (typeof OffscreenCanvas !== 'undefined' && canvasOrContainer instanceof OffscreenCanvas)) {\n var canvas = canvasOrContainer;\n _this.setCanvas(canvas);\n }\n else if (canvasOrContainer) {\n var canvas = document.createElement('canvas');\n var container = canvasOrContainer;\n container.appendChild(canvas);\n _this.setCanvas(canvas);\n }\n return _this;\n }\n DrawerCanvas.prototype.setBuffering = function (bBuffering) {\n this.bBuffering = bBuffering;\n this.flushBuffer();\n };\n DrawerCanvas.prototype.getBBuffering = function () {\n return this.bBuffering;\n };\n /**\n * Set scene\n *\n * @param {Scene} scene\n * @memberof CanvasDrawer\n */\n DrawerCanvas.prototype.setScene = function (scene) {\n _super.prototype.setScene.call(this, scene);\n if (this.canvas) {\n this.setCanvas(this.canvas); // and flush\n }\n };\n /**\n * Set the canvas or append to container\n *\n * @param {(HTMLElement | HTMLCanvasElement | OffscreenCanvas)} canvasOrContainer\n * @memberof CanvasDrawer\n */\n DrawerCanvas.prototype.setCanvas = function (canvasOrContainer) {\n var canvas;\n if (typeof HTMLElement !== 'undefined' && canvasOrContainer instanceof HTMLElement) {\n if (typeof HTMLCanvasElement !== 'undefined' && canvasOrContainer instanceof HTMLCanvasElement) {\n canvas = canvasOrContainer;\n }\n else {\n canvas = (this.canvas || document.createElement('canvas'));\n while (canvasOrContainer.lastChild)\n canvasOrContainer.removeChild(canvasOrContainer.lastChild);\n canvasOrContainer.appendChild(canvas);\n }\n }\n else {\n canvas = canvasOrContainer;\n }\n this.canvas = canvas;\n this.context = this.canvas.getContext('2d', {\n alpha: true,\n desynchronized: this.bBuffering !== true,\n });\n if (this.scene) {\n this.resize(this.scene.width, this.scene.height); // and flush\n }\n };\n /**\n * Return canvas element\n *\n * @returns {(HTMLCanvasElement | OffscreenCanvas)}\n * @memberof DrawerCanvas\n */\n DrawerCanvas.prototype.getCanvas = function () {\n return this.canvas;\n };\n /**\n * Return canvas context\n *\n * @returns {(CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D | null)}\n * @memberof DrawerCanvas\n */\n DrawerCanvas.prototype.getContext = function () {\n return this.context;\n };\n /**\n * Resize scene and canvas\n *\n * @param {number} width\n * @param {number} height\n * @param {number} [ratio]\n * @memberof DrawerCanvas\n */\n DrawerCanvas.prototype.resize = function (width, height, ratio) {\n _super.prototype.resize.call(this, width, height, ratio);\n if (this.canvas && this.scene) {\n this.canvas.width = this.scene.width;\n this.canvas.height = this.scene.height;\n if (typeof HTMLCanvasElement !== 'undefined' && this.canvas instanceof HTMLCanvasElement) {\n this.canvas.style.width = this.scene.width + 'px';\n this.canvas.style.height = this.scene.height + 'px';\n }\n }\n this.flushBuffer();\n this.dispatch('drawer-canvas:resize');\n this.redraw();\n };\n DrawerCanvas.prototype.flushBuffer = function () {\n if (this.bBuffering) {\n this.buffer.flush();\n this.dispatch('drawer-canvas:buffer_flush');\n }\n };\n DrawerCanvas.prototype.getStoredFrames = function () {\n if (this.bBuffering) {\n return this.buffer.getStoredFrames();\n }\n return [];\n };\n /**\n * Set draw option\n *\n * @template K\n * @param {(K | IDrawerOptions)} name\n * @param {Required[K]} [value]\n * @memberof CanvasDrawer\n */\n DrawerCanvas.prototype.setOption = function (name, value) {\n _super.prototype.setOption.call(this, name, value);\n this.flushBuffer();\n };\n // public preload(): Promise {\n // \tif (this.bBuffering && this.scene) {\n // \t\treturn new Promise((resolve, reject) => {\n // \t\t\tthis.flushBuffer()\n // \t\t\tconst sequence = this.timeline.getSequence()\n // \t\t\tlet canvas: HTMLCanvasElement | OffscreenCanvas\n // \t\t\tif (typeof OffscreenCanvas !== 'undefined') canvas = new OffscreenCanvas(this.scene.width, this.scene.height)\n // \t\t\telse {\n // \t\t\t\tcanvas = document.createElement('canvas')\n // \t\t\t\tcanvas.width = this.scene.width\n // \t\t\t\tcanvas.height = this.scene.height\n // \t\t\t}\n // \t\t\tconst context: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D | null = canvas.getContext('2d', {\n // \t\t\t\talpha: true,\n // \t\t\t\tdesynchronized: false,\n // \t\t\t})\n // \t\t\tif (!context) reject('Create context error')\n // \t\t\tconst drawerOptions = { ...this.drawerOptions }\n // \t\t\tconst sequenceEndTime = this.timeline.getSequenceEndTime()\n // \t\t\tfor (let i = 0; i < sequence.frames; i++) {\n // \t\t\t\t// requestAnimationFrame(() => {\n // \t\t\t\tconst time = this.timeline.getFrameTime(i)\n // \t\t\t\tdrawerOptions.clear = this.drawerOptions.clear || i === 0\n // \t\t\t\tdrawerOptions.time = time\n // \t\t\t\tDrawerCanvas.draw(this.scene, context, drawerOptions, this.resolution)\n // \t\t\t\tif (drawerOptions.ghosts) {\n // \t\t\t\t\tfor (let gi = 1; gi <= drawerOptions.ghosts; gi++) {\n // \t\t\t\t\t\tconst ghostTime =\n // \t\t\t\t\t\t\ttime -\n // \t\t\t\t\t\t\t(drawerOptions.ghostSkipFunction\n // \t\t\t\t\t\t\t\t? drawerOptions.ghostSkipFunction(gi)\n // \t\t\t\t\t\t\t\t: gi * (drawerOptions.ghostSkipTime ?? 30))\n // \t\t\t\t\t\tdrawerOptions.clear = false\n // \t\t\t\t\t\tdrawerOptions.ghostIndex = gi\n // \t\t\t\t\t\tdrawerOptions.time =\n // \t\t\t\t\t\t\tghostTime < 0\n // \t\t\t\t\t\t\t\t? ghostTime + sequenceEndTime\n // \t\t\t\t\t\t\t\t: ghostTime > sequenceEndTime\n // \t\t\t\t\t\t\t\t? ghostTime % sequenceEndTime\n // \t\t\t\t\t\t\t\t: ghostTime\n // \t\t\t\t\t\tDrawerCanvas.draw(this.scene, context, drawerOptions, this.resolution)\n // \t\t\t\t\t}\n // \t\t\t\t}\n // \t\t\t\tthis.buffer.push(i, context as CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D)\n // \t\t\t\t// })\n // \t\t\t}\n // \t\t\tresolve(true)\n // \t\t})\n // \t} else {\n // \t\treturn Promise.reject()\n // \t}\n // }\n /**\n * Draw current scene\n *\n * @returns {number}\n * @memberof DrawerCanvas\n */\n DrawerCanvas.prototype.draw = function () {\n var _this = this;\n var _a;\n if (typeof this.scene === 'undefined')\n return -1;\n var draw_time = 0;\n var timeline = this.timeline;\n var drawAtTime = timeline.getTime();\n var drawerOptions = __assign(__assign({}, this.drawerOptions), { ghostIndex: undefined, clear: this.drawerOptions.clear || timeline.getCurrentFrame() <= 1, time: drawAtTime });\n var currentFrame = timeline.getFrameAtTime(drawAtTime);\n this.dispatch('drawer-canvas:before_draw', {\n currentFrame: currentFrame,\n currentTime: drawAtTime,\n });\n if (this.bBuffering && this.buffer.exist(currentFrame)) {\n (_a = this.context) === null || _a === void 0 ? void 0 : _a.putImageData(this.buffer.get(currentFrame), 0, 0);\n }\n else {\n if (drawerOptions.ghosts) {\n Drawer.eachGhosts(drawerOptions, timeline, function (ghostDrawerOptions) {\n ghostDrawerOptions.clear = drawerOptions.clear && ghostDrawerOptions.ghostIndex === 1;\n draw_time += _this.applyDraw(ghostDrawerOptions);\n });\n drawerOptions.clear = false;\n }\n draw_time += this.applyDraw(drawerOptions);\n if (this.bBuffering && this.context) {\n this.buffer.push(currentFrame, this.context);\n if (this.buffer.count() >= this.timeline.getFramesCount()) {\n this.dispatch('drawer-canvas:buffer_loaded');\n }\n }\n }\n return draw_time;\n };\n /**\n * Redraw\n *\n * @returns {void}\n * @memberof DrawerCanvas\n */\n DrawerCanvas.prototype.redraw = function () {\n if (!this.timeline.bSequenceStarted()) {\n this.draw_id && cancelAnimationFrame(this.draw_id);\n !this.drawerOptions.clear &&\n (typeof this.drawerOptions.ghosts === undefined || this.drawerOptions.ghosts === 0) &&\n this.timeline.stop();\n this.draw_id = requestAnimationFrame(this.draw);\n }\n else if (!this.drawerOptions.clear &&\n (typeof this.drawerOptions.ghosts === undefined || this.drawerOptions.ghosts === 0)) {\n this.stopAnimation();\n this.redraw_id && cancelAnimationFrame(this.redraw_id);\n this.redraw_id = requestAnimationFrame(this.startAnimation);\n }\n };\n DrawerCanvas.prototype.applyDraw = function (options) {\n var _a, _b;\n var start_time = now();\n var scene = this.scene;\n var context = this.context;\n context.globalCompositeOperation = 'source-over';\n var time = (_a = options.time) !== null && _a !== void 0 ? _a : 0;\n var simmetricLines = (_b = options.simmetricLines) !== null && _b !== void 0 ? _b : 0;\n var clear = options.clear;\n var noBackground = options.noBackground;\n var backgroundImage = options.backgroundImage;\n var bGhost = typeof options.ghosts !== 'undefined' &&\n options.ghosts > 0 &&\n typeof options.ghostIndex !== 'undefined' &&\n options.ghostIndex > 0;\n var ghostMultiplier = bGhost ? 1 - options.ghostIndex / (options.ghosts + 0.5) : 0;\n var ghostAlpha = options.ghostAlpha === true;\n var width = scene.width;\n var height = scene.height;\n var ratio = width / height;\n if (clear) {\n if (noBackground) {\n context.clearRect(0, 0, width, height);\n }\n else {\n context.fillStyle = scene.background;\n context.fillRect(0, 0, width, height);\n if (backgroundImage) {\n var sourceWidth = backgroundImage instanceof SVGImageElement ? backgroundImage.width.baseVal.value : backgroundImage.width;\n var sourceHeight = backgroundImage instanceof SVGImageElement ? backgroundImage.height.baseVal.value : backgroundImage.height;\n var sourceRatio = sourceWidth / sourceHeight;\n var x = 0, y = 0, bgWidth = width, bgHeight = height;\n if (sourceRatio !== ratio) {\n if (options.backgroundImageFit === 'contain') {\n bgWidth = ratio > sourceRatio ? (sourceWidth * height) / sourceHeight : width;\n bgHeight = ratio > sourceRatio ? height : (sourceHeight * width) / sourceWidth;\n }\n else {\n bgWidth = ratio < sourceRatio ? (sourceWidth * height) / sourceHeight : width;\n bgHeight = ratio < sourceRatio ? height : (sourceHeight * width) / sourceWidth;\n }\n x = (width - bgWidth) / 2;\n y = (height - bgHeight) / 2;\n }\n context.drawImage(backgroundImage, x, y, bgWidth, bgHeight);\n }\n }\n if (simmetricLines > 0) {\n DrawerCanvas.drawSimmetricLines(context, simmetricLines, width, height, scene.color);\n }\n }\n {\n var logFillColorWarn_1 = false;\n var logStrokeColorWarn_1 = false;\n scene.currentTime = time;\n scene.getChildren().forEach(function (sceneChild) {\n if (!sceneChild.data ||\n (!(sceneChild.data.visible === false) && !(bGhost && sceneChild.data.disableGhost === true))) {\n sceneChild.generate(time, true);\n context.save();\n sceneChild.stream(function (stream) {\n var currentIndex = stream.currentIndexing;\n var shape = currentIndex.shape;\n var propArguments = {\n canvasContext: context,\n shape: shape,\n // singleRepetitionBounding: currentIndex.singleRepetitionBounding,\n repetition: {\n type: currentIndex.repetition.type,\n angle: currentIndex.repetition.angle,\n index: currentIndex.repetition.index,\n count: currentIndex.repetition.count,\n offset: currentIndex.repetition.offset,\n row: {\n index: currentIndex.repetition.row.index,\n count: currentIndex.repetition.row.count,\n offset: currentIndex.repetition.row.offset,\n },\n col: {\n index: currentIndex.repetition.col.index,\n count: currentIndex.repetition.col.count,\n offset: currentIndex.repetition.col.offset,\n },\n },\n parent: currentIndex.parent,\n };\n var composite = Drawer.getStreamDrawerProp(shape, 'composite', propArguments, 'source-over');\n context.globalCompositeOperation = composite;\n context.beginPath();\n context.moveTo(stream.buffer[stream.frameBufferIndex], stream.buffer[stream.frameBufferIndex + 1]);\n for (var i = 2; i < stream.frameLength; i += 2) {\n context.lineTo(stream.buffer[stream.frameBufferIndex + i], stream.buffer[stream.frameBufferIndex + i + 1]);\n }\n currentIndex.shape.isClosed() && context.closePath();\n var alpha = Drawer.getStreamDrawerProp(shape, 'opacity', propArguments, 1);\n context.globalAlpha = alpha;\n var shadowColor = Drawer.getStreamDrawerProp(shape, 'shadowColor', propArguments);\n var shadowBlur = Drawer.getStreamDrawerProp(shape, 'shadowBlur', propArguments);\n var shadowOffsetX = Drawer.getStreamDrawerProp(shape, 'shadowOffsetX', propArguments);\n var shadowOffsetY = Drawer.getStreamDrawerProp(shape, 'shadowOffsetY', propArguments);\n context.shadowColor = shadowColor;\n context.shadowBlur = shadowBlur;\n shadowOffsetX && (context.shadowOffsetX = shadowOffsetX);\n shadowOffsetY && (context.shadowOffsetY = shadowOffsetY);\n var fill = Drawer.getStreamDrawerProp(shape, 'fill', propArguments);\n if (typeof fill !== 'undefined') {\n if (bGhost && ghostAlpha) {\n var color = Drawer.ghostifyColor(fill, ghostMultiplier);\n if (color) {\n fill = color;\n }\n else if (!logFillColorWarn_1) {\n console.warn(\"[Urpflanze:DrawerCanvas] Unable ghost fill color '\" + fill + \"',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tplease enter a rgba or hsla color\");\n logFillColorWarn_1 = true;\n }\n }\n context.fillStyle = fill;\n context.fill();\n }\n var stroke = Drawer.getStreamDrawerProp(shape, 'stroke', propArguments, typeof fill === 'undefined' ? scene.color : undefined);\n var lineWidth = Drawer.getStreamDrawerProp(shape, 'lineWidth', propArguments, 1);\n if (stroke) {\n if (bGhost && ghostAlpha) {\n var color = Drawer.ghostifyColor(stroke, ghostMultiplier);\n if (color) {\n stroke = color;\n }\n else if (!logStrokeColorWarn_1) {\n console.warn(\"[Urpflanze:DrawerCanvas] Unable ghost stroke color '\" + stroke + \"',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tplease enter a rgba or hsla color\");\n logStrokeColorWarn_1 = true;\n }\n lineWidth *= ghostMultiplier;\n }\n var lineJoin = Drawer.getStreamDrawerProp(shape, 'lineJoin', propArguments);\n var lineCap = Drawer.getStreamDrawerProp(shape, 'lineCap', propArguments);\n var lineDash = Drawer.getStreamDrawerProp(shape, 'lineDash', propArguments);\n var lineDashOffset = Drawer.getStreamDrawerProp(shape, 'lineDashOffset', propArguments);\n var miterLimit = Drawer.getStreamDrawerProp(shape, 'miterLimit', propArguments);\n context.setLineDash.call(context, lineDash || []);\n context.lineJoin = lineJoin;\n context.lineCap = lineCap;\n context.lineDashOffset = lineDashOffset;\n context.miterLimit = miterLimit;\n context.lineWidth = lineWidth;\n context.strokeStyle = stroke;\n context.stroke();\n }\n });\n context.restore();\n }\n });\n }\n var end_time = now();\n return end_time - start_time;\n };\n DrawerCanvas.drawSimmetricLines = function (context, simmetricLines, width, height, color) {\n var offset = Math.PI / simmetricLines;\n var size = Math.max(width, height);\n var center = [size / 2, size / 2];\n for (var i = 0; i < simmetricLines; i++) {\n var a = [-size, -size];\n var b = [size * 2, size * 2];\n var rotate = i * offset + Math.PI / 4;\n Vec2.rotateZ(a, center, rotate);\n Vec2.rotateZ(b, center, rotate);\n context.beginPath();\n context.strokeStyle = color;\n context.lineWidth = 1;\n context.moveTo(a[0], a[1]);\n context.lineTo(b[0], b[1]);\n context.stroke();\n }\n };\n return DrawerCanvas;\n}(Drawer));\nexport default DrawerCanvas;\n//# sourceMappingURL=DrawerCanvas.js.map","/**\n *\n * @category Services.Drawer\n * @class FrameBuffer\n */\nvar FrameBuffer = /** @class */ (function () {\n function FrameBuffer() {\n this.frames = {};\n }\n FrameBuffer.prototype.exist = function (frameNumber) {\n return typeof this.frames[frameNumber] !== 'undefined';\n };\n FrameBuffer.prototype.get = function (frameNumber) {\n return this.exist(frameNumber) ? this.frames[frameNumber] : null;\n };\n FrameBuffer.prototype.count = function () {\n return Object.keys(this.frames).length;\n };\n FrameBuffer.prototype.push = function (frameNumber, context) {\n this.frames[frameNumber] = context.getImageData(0, 0, context.canvas.width, context.canvas.height);\n };\n FrameBuffer.prototype.flush = function () {\n this.frames = {};\n };\n FrameBuffer.prototype.getStoredFrames = function () {\n return Object.keys(this.frames).map(function (e) { return +e; });\n };\n return FrameBuffer;\n}());\nexport default FrameBuffer;\n//# sourceMappingURL=FrameBuffer.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { parseColorAndConvert } from \"../../../Color\";\nimport { now } from \"../../../Utilites\";\nimport Drawer from \"../Drawer\";\n/**\n * Abstract drawer\n *\n * @category Services.Drawer\n * @class DrawerSVG\n * @extends {Drawer}\n */\nvar DrawerSVG = /** @class */ (function (_super) {\n __extends(DrawerSVG, _super);\n // private svgElement: SVGElement\n function DrawerSVG(scene, container, drawerOptions, ratio, \n // resolution = 0,\n duration, framerate) {\n if (drawerOptions === void 0) { drawerOptions = {}; }\n if (ratio === void 0) { ratio = undefined; }\n var _a, _b, _c;\n var _this = _super.call(this, scene, ratio, duration, framerate) || this;\n _this.container = container;\n _this.drawerOptions = {\n time: (_a = drawerOptions.time) !== null && _a !== void 0 ? _a : 0,\n decimals: drawerOptions.decimals || 2,\n noBackground: (_b = drawerOptions.noBackground) !== null && _b !== void 0 ? _b : false,\n ghosts: drawerOptions.ghosts || 0,\n ghostAlpha: drawerOptions.ghostAlpha === false ? false : true,\n ghostSkipTime: (_c = drawerOptions.ghostSkipTime) !== null && _c !== void 0 ? _c : 30,\n ghostSkipFunction: drawerOptions.ghostSkipFunction,\n };\n return _this;\n }\n /**\n * Draw current scene\n *\n * @returns {number}\n * @memberof DrawerCanvas\n */\n DrawerSVG.prototype.draw = function () {\n var _this = this;\n if (typeof this.scene === 'undefined')\n return -1;\n var drawTime = 0;\n var timeline = this.timeline;\n var drawAtTime = timeline.getTime();\n var drawerOptions = __assign(__assign({}, this.drawerOptions), { ghostIndex: undefined, time: drawAtTime });\n var currentFrame = timeline.getFrameAtTime(drawAtTime);\n this.dispatch('drawer-svg:before_draw', {\n currentFrame: currentFrame,\n currentTime: drawAtTime,\n });\n var paths = [];\n if (drawerOptions.ghosts) {\n Drawer.eachGhosts(drawerOptions, timeline, function (ghostDrawerOptions) {\n drawTime += DrawerSVG.draw(_this.scene, paths, ghostDrawerOptions);\n });\n }\n drawTime += DrawerSVG.draw(this.scene, paths, drawerOptions);\n this.appendSVGFromPaths(paths, drawerOptions);\n return drawTime;\n };\n DrawerSVG.prototype.appendSVGFromPaths = function (paths, drawerOptions) {\n if (this.scene && this.container) {\n while (this.container.lastChild)\n this.container.removeChild(this.container.lastChild);\n var svg_1 = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n svg_1.setAttribute('width', this.scene.width + '');\n svg_1.setAttribute('height', this.scene.height + '');\n svg_1.setAttribute('viewBox', \"0 0 \" + this.scene.width + \" \" + this.scene.height);\n var comm = document.createComment('Created with Urpflanze.js');\n svg_1.appendChild(comm);\n if (!drawerOptions.noBackground) {\n var background = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n background.setAttribute('width', this.scene.width + '');\n background.setAttribute('height', this.scene.height + '');\n DrawerSVG.setColor(background, 'fill', this.scene.background);\n svg_1.appendChild(background);\n }\n paths.forEach(function (path) { return svg_1.appendChild(path); });\n this.container.appendChild(svg_1);\n }\n };\n DrawerSVG.setColor = function (element, type, color) {\n if (color === 'none') {\n element.setAttribute(type, 'none');\n }\n else {\n var parsed = parseColorAndConvert(color);\n if (parsed) {\n element.setAttribute(type, \"rgb(\" + parsed.r + \", \" + parsed.g + \", \" + parsed.b + \")\");\n if (parsed.alpha !== 1) {\n var style = element.getAttribute('style') || '';\n element.setAttribute('style', style + (\" \" + type + \"-opacity: \" + parsed.alpha + \";\"));\n }\n }\n }\n };\n DrawerSVG.draw = function (scene, paths, options) {\n var _a;\n var start_time = now();\n var time = (_a = options.time) !== null && _a !== void 0 ? _a : 0;\n var decimals = options.decimals;\n var bGhost = typeof options.ghosts !== 'undefined' &&\n options.ghosts > 0 &&\n typeof options.ghostIndex !== 'undefined' &&\n options.ghostIndex > 0;\n var ghostMultiplier = bGhost ? 1 - options.ghostIndex / (options.ghosts + 0.5) : 0;\n var ghostAlpha = options.ghostAlpha === true;\n var logFillColorWarn = false;\n var logStrokeColorWarn = false;\n scene.currentTime = time;\n scene.getChildren().forEach(function (sceneChild) {\n if (!sceneChild.data ||\n !(sceneChild.data.visible === false) ||\n !(bGhost && sceneChild.data.disableGhost === true)) {\n sceneChild.generate(time, true);\n sceneChild.stream(function (stream) {\n var tempPath = [];\n var currentIndex = stream.currentIndexing;\n var shape = currentIndex.shape;\n var propArguments = {\n shape: shape,\n // singleRepetitionBounding: currentIndex.singleRepetitionBounding,\n repetition: currentIndex.repetition,\n parent: currentIndex.parent,\n };\n for (var i = 0; i < stream.frameLength; i += 2) {\n tempPath.push(stream.buffer[stream.frameBufferIndex + i].toFixed(decimals) +\n ' ' +\n stream.buffer[stream.frameBufferIndex + i + 1].toFixed(decimals));\n }\n var fill = Drawer.getStreamDrawerProp(shape, 'fill', propArguments);\n if (fill) {\n if (bGhost && ghostAlpha) {\n var color = Drawer.ghostifyColor(fill, ghostMultiplier);\n if (color) {\n fill = color;\n }\n else if (!logFillColorWarn) {\n console.warn(\"[Urpflanze:DrawerCanvas] Unable ghost fill color '\" + fill + \"',\\n\\t\\t\\t\\t please enter a rgba or hsla color\");\n logFillColorWarn = true;\n }\n }\n }\n var stroke = Drawer.getStreamDrawerProp(shape, 'stroke', propArguments, typeof fill === 'undefined' ? scene.color : undefined);\n var lineWidth = Drawer.getStreamDrawerProp(shape, 'lineWidth', propArguments, 1);\n if (stroke) {\n if (bGhost && ghostAlpha) {\n var color = Drawer.ghostifyColor(stroke, ghostMultiplier);\n if (color) {\n stroke = color;\n }\n else if (!logStrokeColorWarn) {\n console.warn(\"[Urpflanze:DrawerCanvas] Unable ghost stroke color '\" + stroke + \"',\\n\\t\\t\\t\\t please enter a rgba or hsla color\");\n logStrokeColorWarn = true;\n }\n lineWidth *= ghostMultiplier;\n }\n }\n var path = document.createElementNS('http://www.w3.org/2000/svg', 'path');\n path.setAttribute('d', \"M\" + tempPath.join(' L') + \" \" + (shape.isClosed() ? 'Z' : ''));\n DrawerSVG.setColor(path, 'fill', fill || 'none');\n if (stroke) {\n DrawerSVG.setColor(path, 'stroke', stroke);\n path.setAttribute('stroke-width', (lineWidth || 1) + '');\n }\n paths.push(path);\n });\n }\n });\n var end_time = now();\n return end_time - start_time;\n };\n return DrawerSVG;\n}(Drawer));\nexport default DrawerSVG;\n//# sourceMappingURL=DrawerSVG.js.map","/**\n * Class used for emit and dispatch events\n *\n * @category Services.Emitter\n * @abstract\n * @class Emitter\n * @template EventTypes\n */\nvar Emitter = /** @class */ (function () {\n function Emitter() {\n this.callbacks = {};\n }\n /**\n * Attach callback at event\n *\n * @param {keyof EventTypes} e\n * @param {(value: EventTypes[keyof EventTypes]) => any} callback\n * @memberof Emitter\n */\n Emitter.prototype.attach = function (e, callback) {\n if (!(e in this.callbacks)) {\n this.callbacks[e] = [];\n }\n this.callbacks[e].push(callback);\n };\n /**\n * Remove callbach listener at event\n *\n * @param {keyof EventTypes} e\n * @param {(value: EventTypes[keyof EventTypes]) => void} callback\n * @memberof Emitter\n */\n Emitter.prototype.detach = function (e, callback) {\n if (e in this.callbacks) {\n var index = this.callbacks[e].indexOf(callback);\n if (index >= 0) {\n this.callbacks[e].splice(index, 1);\n }\n }\n };\n /**\n * Dispatch event\n *\n * @param {keyof EventTypes} e\n * @param {EventTypes[keyof EventTypes]} [params]\n * @memberof Emitter\n */\n Emitter.prototype.dispatch = function (e, params) {\n if (e in this.callbacks) {\n for (var i = 0, len = this.callbacks[e].length; i < len; i++)\n if (this.callbacks[e][i](params) === false)\n break;\n }\n };\n return Emitter;\n}());\nexport default Emitter;\n//# sourceMappingURL=Emitter.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { clamp } from \"../../Utilites\";\nvar GCODEExporter = /** @class */ (function () {\n function GCODEExporter() {\n }\n GCODEExporter.parse = function (drawer, settings) {\n var scene = drawer.getScene();\n if (scene) {\n var bindedSettings = __assign(__assign({}, GCODEExporter.defaults), settings);\n return GCODEExporter.generate(scene, bindedSettings).join('\\n');\n }\n return '';\n };\n GCODEExporter.setUnit = function (unit) {\n return unit === 'inches' ? 'G20' : 'G21';\n };\n GCODEExporter.useRelativePosition = function () {\n return 'G91';\n };\n GCODEExporter.useAbsolutePosition = function () {\n return 'G90';\n };\n GCODEExporter.home = function (penUpCommand) {\n return [penUpCommand, 'G28 X0 Y0'];\n };\n GCODEExporter.round = function (value, round) {\n return Math.round(value * round) / round;\n };\n GCODEExporter.setCurrentMachinePosition = function (x, y, round) {\n return \"G28.1 X\" + this.round(x, round) + \" Y\" + this.round(y, round);\n };\n GCODEExporter.setCurrentWorkspacePosition = function (x, y, round) {\n return \"G92 X\" + this.round(x, round) + \" Y\" + this.round(y, round);\n };\n GCODEExporter.gotoTo = function (x, y, round, velocity) {\n return typeof velocity !== 'undefined'\n ? \"G1 X\" + this.round(x, round) + \" Y\" + this.round(y, round) + \" F\" + velocity\n : \"G0 X\" + this.round(x, round) + \" Y\" + this.round(y, round);\n };\n GCODEExporter.moveTo = function (penUpCommand, penDownCommand, x, y, round) {\n return [penUpCommand, this.gotoTo(x, y, round), penDownCommand];\n };\n GCODEExporter.lineTo = function (x, y, velocity, round) {\n return this.gotoTo(x, y, round, velocity);\n };\n GCODEExporter.concat = function (result, data) {\n if (typeof data === 'string')\n result.push(data);\n else\n data.forEach(function (line) { return result.push(line); });\n };\n GCODEExporter.generate = function (scene, settings) {\n // Calculate workspace area\n var workspaceWidth = settings.maxX - settings.minX;\n var workspaceHeight = settings.maxY - settings.minY;\n var workspaceRatio = workspaceWidth / workspaceHeight;\n // Calculate drawArea from scene\n var sceneRatio = scene.width / scene.height;\n var drawArea = [\n workspaceRatio > sceneRatio ? (scene.width * workspaceHeight) / scene.height : workspaceWidth,\n workspaceRatio > sceneRatio ? workspaceHeight : (scene.height * workspaceWidth) / scene.width,\n ];\n var drawAreaSceneOffset = [(workspaceWidth - drawArea[0]) / 2, (workspaceHeight - drawArea[1]) / 2];\n // Adapt drawArea to workspace\n var scale = workspaceRatio > sceneRatio ? scene.width / drawArea[0] : scene.height / drawArea[1];\n // const machineCenterPosition = [(settings.maxX + settings.minX) / 2, (settings.maxY + settings.minY) / 2]\n var gcode = [];\n this.concat(gcode, settings.penUpCommand);\n this.concat(gcode, this.setUnit(settings.unit));\n this.concat(gcode, this.useAbsolutePosition());\n this.concat(gcode, this.setCurrentMachinePosition(settings.minX, settings.minY, settings.round));\n this.concat(gcode, this.setCurrentWorkspacePosition(settings.minX, settings.minY, settings.round));\n scene.update(settings.atTime);\n var sceneChilds = scene.getChildren();\n for (var i = 0, len = sceneChilds.length; i < len; i++) {\n sceneChilds[i].generate(0, true);\n var childBuffer = sceneChilds[i].getBuffer() || [];\n var childIndexedBuffer = sceneChilds[i].getIndexedBuffer() || [];\n for (var currentBufferIndex = 0, vertexIndex = 0, len_1 = childIndexedBuffer.length; currentBufferIndex < len_1; currentBufferIndex++) {\n var currentIndexing = childIndexedBuffer[i];\n var initialPointX = clamp(settings.minX, settings.maxX, settings.minX + childBuffer[vertexIndex] / scale + drawAreaSceneOffset[0]);\n var initialPointY = clamp(settings.minY, settings.maxY, settings.minY + childBuffer[vertexIndex + 1] / scale + drawAreaSceneOffset[1]);\n this.concat(gcode, this.moveTo(settings.penUpCommand, settings.penDownCommand, initialPointX, initialPointY, settings.round));\n vertexIndex += 2;\n for (var len_2 = vertexIndex + currentIndexing.frameLength - 2; vertexIndex < len_2; vertexIndex += 2) {\n var currentX = clamp(settings.minX, settings.maxX, settings.minX + childBuffer[vertexIndex] / scale + drawAreaSceneOffset[0]);\n var currentY = clamp(settings.minY, settings.maxY, settings.minY + childBuffer[vertexIndex + 1] / scale + drawAreaSceneOffset[1]);\n this.concat(gcode, this.lineTo(currentX, currentY, settings.velocity, settings.round));\n }\n if (currentIndexing.shape.isClosed())\n this.concat(gcode, this.lineTo(initialPointX, initialPointY, settings.velocity, settings.round));\n }\n }\n this.concat(gcode, this.home(settings.penUpCommand));\n return gcode;\n };\n GCODEExporter.defaults = {\n atTime: 0,\n round: 100,\n minX: 0,\n minY: 0,\n maxX: 297,\n maxY: 210,\n velocity: 1500,\n unit: 'millimeters',\n penUpCommand: 'M3 S30',\n penDownCommand: 'M3 S0',\n };\n return GCODEExporter;\n}());\nexport default GCODEExporter;\n//# sourceMappingURL=GCODEExporter.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport Group from \"../../core/Group\";\nimport Shape from \"../../core/shapes/Shape\";\nimport ShapeBase from \"../../core/shapes/ShapeBase\";\nimport ShapeBuffer from \"../../core/shapes/ShapeBuffer\";\nimport ShapePrimitive from \"../../core/shapes/ShapePrimitive\";\nimport { parseFunction } from \"../../Utilites\";\nimport JSONImporter from \"../importers/JSONImporter\";\nimport SceneUtilities from \"../scene-utilities/SceneUtilities\";\nimport SceneChildUtilitiesData, { TSceneChildPropsDataKeys } from \"../scene-utilities/SceneChildUtilitiesData\";\n/**\n *\n * @category Services.Export/Import\n * @class JSONExporter\n */\nvar JSONExporter = /** @class */ (function () {\n function JSONExporter() {\n }\n JSONExporter.parse = function (drawer, name) {\n if (name === void 0) { name = 'EmptyProject'; }\n return JSONExporter.toString(JSONExporter.parseAsProject(drawer, name));\n };\n JSONExporter.toString = function (project) {\n return JSON.stringify(project);\n };\n JSONExporter.parseAsProject = function (drawer, name) {\n if (name === void 0) { name = 'EmptyProject'; }\n var timeline = drawer.getTimeline();\n var project = JSONImporter.createEmptyProject();\n project.name = name;\n project.clear = drawer.getOption('clear', true);\n project.ghosts = drawer.getOption('ghosts', 0);\n project.ghostSkipTime = drawer.getOption('ghostSkipTime', undefined);\n project.ghostSkipFunction = parseFunction.parse(drawer.getOption('ghostSkipFunction', undefined));\n project.ratio = drawer.getRatio();\n var _a = timeline.getSequence(), duration = _a.duration, framerate = _a.framerate;\n project.sequence = { duration: duration, framerate: framerate };\n project.scene = {};\n var scene = drawer.getScene();\n if (scene) {\n project.width = scene.width;\n project.height = scene.height;\n // project.resolution = drawer.getResolution()\n project.color = scene.color;\n project.background = scene.background;\n var sceneChilds = scene.getChildren();\n for (var i = 0, len = sceneChilds.length; i < len; i++) {\n project.scene[sceneChilds[i].id] = JSONExporter.parseSceneChild(sceneChilds[i]);\n }\n }\n return project;\n };\n JSONExporter.filterDataTye = function (data, dataType) {\n var filtered = {};\n var keys = Object.keys(data);\n for (var i = 0; i < keys.length; i++) {\n var name_1 = keys[i];\n if (name_1 in SceneChildUtilitiesData &&\n SceneChildUtilitiesData[name_1].dataType === dataType) {\n filtered[name_1] = data[name_1];\n }\n }\n return filtered;\n };\n JSONExporter.parseSceneChild = function (sceneChild, parentId, depth) {\n if (depth === void 0) { depth = 0; }\n var projectSceneChild = {\n id: sceneChild.id + '',\n type: sceneChild.type,\n name: sceneChild.name,\n order: sceneChild.order,\n data: __assign(__assign({}, JSON.parse(JSON.stringify(sceneChild.data))), { props: undefined, style: undefined }),\n // data: {},\n depth: depth,\n bPrimitive: sceneChild instanceof ShapePrimitive,\n props: {},\n style: {},\n parentId: parentId,\n };\n Object.entries(sceneChild.getProps()).forEach(function (_a) {\n var key = _a[0], value = _a[1];\n if (key in SceneChildUtilitiesData &&\n SceneChildUtilitiesData[key].dataType === 'props') {\n projectSceneChild.props[key] =\n sceneChild.data.props[key] || parseFunction.parse(value);\n }\n });\n // const props = sceneChild.getProps()\n // const propsKeys = Object.keys(props) as Array\n // for (let i = 0, len = propsKeys.length; i < len; i++) {\n // \tconst propName = propsKeys[i]\n // \tif (\n // \t\tpropName in SceneChildUtilitiesData &&\n // \t\tSceneChildUtilitiesData[propName as TSceneChildPropsDataKeys].dataType === 'props'\n // \t) {\n // \t\tprojectSceneChild.props[propName] = sceneChild.data.props[propName] || parseFunction.parse(props[propName])\n // \t}\n // }\n // for (let i = 0, len = propsKeys.length; i < len; i++) props[propsKeys[i]] = parseFunction.parse(props[propsKeys[i]])\n // projectSceneChild.props = JSONExporter.filterDataTye({ ...props, ...sceneChild.data.props }, 'props')\n if (sceneChild instanceof ShapeBuffer) {\n projectSceneChild.shape = sceneChild.shape;\n }\n if (sceneChild instanceof ShapeBase) {\n projectSceneChild.bUseParent = sceneChild.bUseParent;\n projectSceneChild.bUseRecursion = sceneChild.bUseRecursion;\n projectSceneChild.vertexCallback = parseFunction.parse(sceneChild.data.vertexCallback || sceneChild.vertexCallback);\n }\n if (sceneChild instanceof ShapePrimitive) {\n Object.entries(sceneChild.style).forEach(function (_a) {\n var key = _a[0], value = _a[1];\n if (key in SceneChildUtilitiesData &&\n SceneChildUtilitiesData[key].dataType === 'drawer') {\n projectSceneChild.style[key] =\n sceneChild.data.style[key] || parseFunction.parse(value);\n }\n });\n // const style = sceneChild.style\n // const styleKeys = Object.keys(style) as Array\n // for (let i = 0, len = styleKeys.length; i < len; i++)\n // \tstyle[styleKeys[i]] = parseFunction.parse(style[styleKeys[i]])\n // projectSceneChild.style = JSONExporter.filterDataTye({ ...style, ...sceneChild.data.style }, 'drawer')\n projectSceneChild.adaptMode = sceneChild.adaptMode;\n projectSceneChild.bClosed = sceneChild.bClosed;\n }\n else if (sceneChild instanceof Shape || sceneChild instanceof Group) {\n var children = [];\n var shapeChildren = SceneUtilities.getChildren(sceneChild);\n for (var i = 0; i < shapeChildren.length; i++)\n children.push(JSONExporter.parseSceneChild(shapeChildren[i], sceneChild.id, depth + 1));\n projectSceneChild.children = children;\n }\n return projectSceneChild;\n };\n return JSONExporter;\n}());\nexport default JSONExporter;\n//# sourceMappingURL=JSONExporter.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport DrawerSVG from \"../drawers/drawer-svg/DrawerSVG\";\nvar DEFAULT_SETTINGS = {\n size: 1080,\n quality: 1,\n time: 0,\n noBackground: true,\n};\n/**\n *\n * @category Services.Export/Import\n * @class SVGExporter\n */\nvar SVGExporter = /** @class */ (function () {\n function SVGExporter() {\n }\n SVGExporter.parse = function (drawer, settings) {\n settings = __assign(__assign({}, DEFAULT_SETTINGS), settings);\n var svg = this.parseAsSVG(drawer, settings);\n return svg.outerHTML;\n };\n SVGExporter.parseAsSVG = function (drawer, settings) {\n settings = __assign(__assign({}, DEFAULT_SETTINGS), settings);\n var scene = drawer.getScene();\n var drawerOptions = __assign(__assign({}, drawer.getOptions()), { time: settings.time, decimals: Math.floor(settings.quality * 4), noBackground: settings.noBackground });\n var container = document.createElement('div');\n var tmp = new DrawerSVG(scene, container, drawerOptions, drawer.getRatio());\n var tmpTimeline = tmp.getTimeline();\n tmpTimeline.setDuration(drawer.getTimeline().getDuration());\n tmpTimeline.setTime(drawerOptions.time || 0);\n tmp.draw();\n return container.firstChild;\n };\n return SVGExporter;\n}());\nexport default SVGExporter;\n//# sourceMappingURL=SVGExporter.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport Scene from \"../../core/Scene\";\nimport DrawerCanvas from \"../drawers/drawer-canvas/DrawerCanvas\";\nimport { parseFunction } from \"../../Utilites\";\nimport SceneUtilities from \"../scene-utilities/SceneUtilities\";\nimport { v1 as uuidv1 } from 'uuid';\nimport { version } from \"../../meta\";\n/**\n *\n * @category Services.Export/Import\n * @class JSONImporter\n */\nvar JSONImporter = /** @class */ (function () {\n function JSONImporter() {\n }\n /**\n * Parse string to DrawerCanvas\n *\n * @static\n * @param {string} project_json\n * @returns {(DrawerCanvas | null)}\n */\n JSONImporter.parse = function (project_json) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;\n if (!project_json)\n return null;\n var parsed = project_json && project_json.length > 0 ? JSON.parse(project_json) : {};\n if (!('scene' in parsed))\n return null;\n var emptyProject = JSONImporter.createEmptyProject();\n var project = {\n id: (_a = parsed.id) !== null && _a !== void 0 ? _a : emptyProject.id,\n urpflanze_version: (_b = parsed.urpflanze_version) !== null && _b !== void 0 ? _b : emptyProject.urpflanze_version,\n name: (_c = parsed.name) !== null && _c !== void 0 ? _c : emptyProject.name,\n width: (_d = parsed.width) !== null && _d !== void 0 ? _d : emptyProject.width,\n height: (_e = parsed.height) !== null && _e !== void 0 ? _e : emptyProject.height,\n resolution: (_f = parsed.resolution) !== null && _f !== void 0 ? _f : emptyProject.resolution,\n background: (_g = parsed.background) !== null && _g !== void 0 ? _g : emptyProject.background,\n color: (_h = parsed.color) !== null && _h !== void 0 ? _h : emptyProject.color,\n clear: (_j = parsed.clear) !== null && _j !== void 0 ? _j : emptyProject.clear,\n ghosts: (_k = parsed.ghosts) !== null && _k !== void 0 ? _k : emptyProject.ghosts,\n ghostSkipTime: (_l = parsed.ghostSkipTime) !== null && _l !== void 0 ? _l : emptyProject.ghostSkipTime,\n ghostSkipFunction: (_m = parsed.ghostSkipFunction) !== null && _m !== void 0 ? _m : emptyProject.ghostSkipFunction,\n ratio: (_o = parsed.ratio) !== null && _o !== void 0 ? _o : emptyProject.ratio,\n scene: parsed.scene || emptyProject.scene,\n sequence: __assign(__assign({}, emptyProject.sequence), parsed.sequence),\n };\n var drawOptions = {\n clear: project.clear,\n ghosts: project.ghosts,\n ghostSkipTime: parseFunction.unparse(project.ghostSkipTime),\n };\n var scene = new Scene({\n color: project.color,\n background: project.background,\n width: project.width,\n height: project.height,\n });\n var drawer = new DrawerCanvas(scene, undefined, drawOptions, project.ratio, project.resolution);\n var timeline = drawer.getTimeline();\n timeline.setSequence(project.sequence.duration, project.sequence.framerate);\n var sceneChilds = Object.values(project.scene || []);\n for (var i = 0, len = sceneChilds.length; i < len; i++) {\n var sceneChild = JSONImporter.parseSceneChild(sceneChilds[i], scene);\n sceneChild && scene.add(sceneChild);\n }\n return drawer;\n };\n JSONImporter.parseSceneChild = function (projectSceneChild, scene) {\n var shape = typeof projectSceneChild.shape !== 'undefined'\n ? Float32Array.from(Object.values(projectSceneChild.shape))\n : undefined;\n var settings = {\n id: projectSceneChild.id,\n name: projectSceneChild.name,\n order: projectSceneChild.order,\n // data: projectSceneChild.data,\n bUseParent: projectSceneChild.bUseParent,\n bUseRecursion: projectSceneChild.bUseRecursion,\n adaptMode: projectSceneChild.adaptMode,\n bClosed: projectSceneChild.bClosed,\n shape: shape,\n };\n var sceneChild = SceneUtilities.create(projectSceneChild.type, settings);\n if (sceneChild) {\n var props_1 = __assign({}, projectSceneChild.props);\n var propKeys = Object.keys(props_1);\n propKeys.forEach(function (propKey) {\n SceneUtilities.setProp(sceneChild, propKey, parseFunction.unparse(props_1[propKey]), scene);\n });\n var style_1 = __assign({}, projectSceneChild.style);\n var styleKeys = Object.keys(style_1);\n styleKeys.forEach(function (styleKey) {\n SceneUtilities.setDrawerProp(sceneChild, styleKey, parseFunction.unparse(style_1[styleKey]), scene);\n });\n if (typeof projectSceneChild.vertexCallback !== 'undefined')\n SceneUtilities.setSetting(sceneChild, 'vertexCallback', projectSceneChild.vertexCallback, scene);\n if (projectSceneChild.children && projectSceneChild.children.length > 0) {\n for (var i = 0, len = projectSceneChild.children.length; i < len; i++) {\n var child = JSONImporter.parseSceneChild(projectSceneChild.children[i], scene);\n child && SceneUtilities.add(sceneChild, child);\n }\n }\n return sceneChild;\n }\n console.warn(\"[Urpflanze:JSONImporter] can't import\", projectSceneChild);\n return null;\n };\n /**\n * Empty project with default value\n *\n * @static\n */\n JSONImporter.createEmptyProject = function () {\n return {\n id: uuidv1(),\n urpflanze_version: version,\n name: '',\n width: 600,\n height: 600,\n resolution: 600,\n background: '#000',\n color: '#fff',\n clear: true,\n ghosts: 0,\n ghostSkipTime: 30,\n ratio: 1,\n scene: {},\n sequence: {\n duration: 6000,\n framerate: 60,\n },\n };\n };\n return JSONImporter;\n}());\nexport default JSONImporter;\n//# sourceMappingURL=JSONImporter.js.map","var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nimport { fromTransformAttribute, fromDefinition, compose, toSVG } from 'transformation-matrix';\nimport simplify from 'simplify-js';\nimport svgpath from 'svgpath';\nimport JSONImporter from \"./JSONImporter\";\nimport DrawerCanvas from \"../drawers/drawer-canvas/DrawerCanvas\";\nimport { parseColor } from \"../../Color\";\nimport Scene from \"../../core/Scene\";\nimport ShapePrimitive from \"../../core/shapes/ShapePrimitive\";\nimport ShapeBuffer from \"../../core/shapes/ShapeBuffer\";\nimport Shape from \"../../core/shapes/Shape\";\nimport Group from \"../../core/Group\";\n/**\n *\n * @category Services.Export/Import\n * @class JSONImporter\n */\nvar SVGImporter = /** @class */ (function () {\n function SVGImporter() {\n }\n /**\n * Check passed input is valid SVG string\n *\n * @static\n * @param {string} input\n * @returns {boolean}\n */\n SVGImporter.isSVG = function (input) {\n return SVGImporter.SVG_REGEX.test(input.replace(SVGImporter.COMMENT_REGEX, ''));\n };\n /**\n * Convert string to SVGElement\n *\n * @static\n * @param {string} input\n * @returns {(SVGElement | null)}\n */\n SVGImporter.stringToSVG = function (input) {\n if (!SVGImporter.isSVG(input)) {\n console.warn('[Urpflanze:SVGImport] | Input is not valid SVG string', input);\n return null;\n }\n if (typeof DOMParser === 'undefined') {\n console.warn('[Urpflanze:SVGImport] DOMParser not defined');\n return null;\n }\n var parser = new DOMParser();\n var document = parser.parseFromString(input, 'image/svg+xml');\n return document.querySelector('svg');\n };\n /**\n * Convert SVG string into DrawerCanvas\n *\n * @static\n * @param {string} input\n * @returns {(DrawerCanvas | null)}\n */\n SVGImporter.parse = function (input, simplify) {\n if (simplify === void 0) { simplify = 0.001; }\n var svg = SVGImporter.stringToSVG(input);\n if (svg === null) {\n console.warn('[Urpflanze:SVGImport] | Cannot convet string to SVG', input);\n }\n var parsed = SVGImporter.SVGStringToBuffers(input, simplify);\n if (parsed === null) {\n console.warn('[Urpflanze:SVGImport] | Cannot convet string DrawerCanvas', input);\n return null;\n }\n var emptyProject = JSONImporter.createEmptyProject();\n var scene = new Scene({\n color: emptyProject.color,\n background: emptyProject.background,\n width: parsed.viewBox[2] - parsed.viewBox[0],\n height: parsed.viewBox[3] - parsed.viewBox[1],\n });\n var result = SVGImporter.parsedToShape(parsed);\n if (result !== null)\n scene.add(result);\n return new DrawerCanvas(scene, undefined);\n };\n /**\n * Convert SVG string to Shape or ShapeBuffer\n *\n * @static\n * @param {string} input\n * @param {number} [simplify=0.001]\n * @returns {(Shape | ShapeBuffer | null)}\n */\n SVGImporter.parseAsShape = function (input, simplify) {\n if (simplify === void 0) { simplify = 0.001; }\n var svg = SVGImporter.stringToSVG(input);\n if (svg === null) {\n console.warn('[Urpflanze:SVGImport] | Cannot convet string to SVG', input);\n }\n var parsed = SVGImporter.SVGStringToBuffers(input, simplify);\n if (parsed === null || parsed.buffers.length === 0) {\n console.warn('[Urpflanze:SVGImport] | Cannot convet string DrawerCanvas', input);\n return null;\n }\n return SVGImporter.parsedToShape(parsed);\n };\n /**\n * Convert parsed SVG to Shape or ShapeBuffer\n *\n * @static\n * @param {ISVGParsed} parsed\n * @returns {(Shape | ShapeBuffer | null)}\n */\n SVGImporter.parsedToShape = function (parsed) {\n var shapes = new Array(parsed.buffers.length);\n parsed.buffers.forEach(function (buffer) {\n shapes.push(new ShapeBuffer({\n shape: buffer.buffer,\n bClosed: buffer.closed,\n style: {\n fill: buffer.fill,\n stroke: buffer.stroke,\n lineWidth: buffer.lineWidth,\n },\n }));\n });\n if (shapes.length === 1)\n return shapes[0];\n var group = new Group();\n shapes.forEach(function (s) { return group.add(s); });\n return new Shape({ shape: group });\n };\n /**\n * Convert SVG string to buffers\n *\n * @static\n * @param {string} input\n * @param {number} [simplify=0.001]\n * @returns {(ISVGParsed | null)}\n */\n SVGImporter.SVGStringToBuffers = function (input, simplify) {\n var _a;\n if (simplify === void 0) { simplify = 0.001; }\n var svg = SVGImporter.stringToSVG(input);\n if (svg === null) {\n console.error('[Urpflanze:SVGImport] | Cannot convert string to svg', input);\n return null;\n }\n var svgFill = SVGImporter.getStyleAttr('fill', svg);\n var svgStroke = SVGImporter.getStyleAttr('stroke', svg);\n var svgLineWidth = SVGImporter.getStyleAttr('stroke-width', svg);\n var viewBox = SVGImporter.getViewbox(svg);\n var groups = svg.querySelectorAll('g');\n groups.forEach(SVGImporter.propagateGroupTransformAndStyleToChildren);\n // Get all primitive elements\n var elements = Array.from(svg.querySelectorAll('rect, circle, ellipse, line, polyline, polygon, path'));\n // Convert elements to path\n var paths = (_a = []).concat.apply(_a, elements.map(function (e) { return SVGImporter.elementToPath(e); }));\n // Convert paths to buffe of points based on viewBox\n var expMatch = Math.max(viewBox[2] - viewBox[0], viewBox[3] - viewBox[1])\n .toExponential(1)\n .match(/e(\\+?[0-9]+)/);\n var exp = Math.min(Math.pow(10, Math.max(expMatch ? +expMatch[1] : 0, 0)), 1000);\n var steps = 10 / (1000 / exp);\n var buffers = paths.map(function (path) { return SVGImporter.pathToBuffer(path, steps, viewBox); });\n // Simplify buffers\n buffers = buffers.map(function (buffer) { return SVGImporter.simpliyBuffer(buffer, simplify); });\n var result = [];\n for (var i = 0; i < buffers.length; i++) {\n var templineWidth = paths[i].getAttribute('stroke-width');\n var strokeWidth = void 0;\n if (templineWidth) {\n strokeWidth =\n templineWidth.indexOf('%') >= 0\n ? SVGImporter.fromPercentage(parseFloat(templineWidth), Math.sqrt((viewBox[2] - viewBox[0]) * (viewBox[3] - viewBox[1])))\n : parseFloat(templineWidth);\n }\n var fill = SVGImporter.getStyleAttr('fill', paths[i], svgFill ? svgFill : undefined);\n var stroke = SVGImporter.getStyleAttr('stroke', paths[i], fill ? undefined : svgStroke || 'rgba(0,0,0,0)');\n var lineWidth = strokeWidth\n ? strokeWidth\n : stroke\n ? svgLineWidth\n ? parseFloat(svgLineWidth)\n : 1\n : svgLineWidth\n ? parseFloat(svgLineWidth)\n : undefined;\n result.push({\n buffer: buffers[i],\n closed: SVGImporter.pathIsClosed(paths[i]),\n fill: fill,\n stroke: stroke,\n lineWidth: lineWidth,\n });\n }\n elements.forEach(function (e) { return e.remove(); });\n return { viewBox: viewBox, buffers: result };\n };\n /**\n * Replace 'none' to undefined\n *\n * @private\n * @static\n * @param {('fill' | 'stroke')} name\n * @param {SVGElement} path\n * @returns {(string | undefined)}\n */\n SVGImporter.getStyleAttr = function (name, element, defaultColor) {\n // get color from attribute\n var value = element.getAttribute(name);\n if (value === 'none')\n return undefined;\n if (typeof value !== 'undefined' && value !== null) {\n var parsed = parseColor(value);\n if (parsed) {\n return parsed.type === 'rgb'\n ? \"rgb(\" + parsed.a + \", \" + parsed.b + \", \" + parsed.c + \")\"\n : \"hsl(\" + parsed.a + \", \" + parsed.b + \"%, \" + parsed.c + \"%)\";\n }\n }\n // otherwise get color from style\n var styleName = name === 'stroke-width' ? 'strokeWidth' : name;\n if (typeof element.style[styleName] !== 'undefined' && element.style[styleName].length > 0) {\n return element.style[styleName];\n }\n return defaultColor;\n };\n /**\n * Return SVG viewBox\n * If it is not present, calculate it based on elements\n *\n * @static\n * @param {SVGElement} svg\n * @returns {[number, number, number, number]}\n */\n SVGImporter.getViewbox = function (svg) {\n // Check viexBox is setted\n var viewBox = svg.getAttribute('viewBox');\n if (viewBox) {\n return viewBox.split(' ').map(function (e) { return parseFloat(e); });\n }\n // Check width and height if viewBox is not setted\n var width = svg.getAttribute('width');\n var height = svg.getAttribute('height');\n if (width && height) {\n return [0, 0, parseFloat(width), parseFloat(height)];\n }\n // Calculate dimension by elements\n svg = svg.cloneNode(true);\n var elements = Array.from(svg.querySelectorAll('rect, circle, ellipse, line, polyline, polygon, path'));\n var paths = [].concat.apply([], elements.map(function (e) { return SVGImporter.elementToPath(e); }));\n if (paths.length > 0) {\n var width_1 = 0, height_1 = 0;\n for (var i = 0, len = paths.length; i < len; i++) {\n var box = ShapePrimitive.getBounding(SVGImporter.pathToBuffer(paths[i], 1));\n box.width += box.x;\n box.height += box.y;\n if (box.width > width_1)\n width_1 = box.width;\n if (box.height > height_1)\n height_1 = box.height;\n }\n return [0, 0, width_1, height_1];\n }\n return [-1, -1, 1, 1];\n };\n /**\n * Check path is closed\n *\n * @static\n * @param {SVGPathElement} path\n * @returns {boolean}\n */\n SVGImporter.pathIsClosed = function (path) {\n var _a;\n return ((_a = path.getAttribute('d')) === null || _a === void 0 ? void 0 : _a.trim().substr(-1).toLowerCase()) === 'z';\n };\n /**\n * Optimize number of points\n *\n * @static\n * @param {Float32Array} buffer\n * @param {number} [simplifyLevel=0.01]\n * @returns {Float32Array}\n */\n SVGImporter.simpliyBuffer = function (buffer, simplifyLevel) {\n if (simplifyLevel === void 0) { simplifyLevel = 0.01; }\n var simplifiedBuffer = [];\n for (var i = 0, len = buffer.length; i < len; i += 2)\n simplifiedBuffer.push({ x: buffer[i], y: buffer[i + 1] });\n var points = simplify(simplifiedBuffer, simplifyLevel, true);\n points.forEach(function (point, index) {\n buffer[index * 2] = point.x;\n buffer[index * 2 + 1] = point.y;\n });\n return buffer.subarray(0, points.length * 2);\n };\n /**\n * Convert path to buffer between [-1, 1]\n *\n * @static\n * @param {SVGPathElement} path\n * @param {number} [steps=0.01]\n * @param {*} [viewBox=[-1, -1, 1, 1]]\n * @returns {Float32Array}\n */\n SVGImporter.pathToBuffer = function (path, steps, viewBox) {\n if (steps === void 0) { steps = 0.01; }\n if (viewBox === void 0) { viewBox = [-1, -1, 1, 1]; }\n var width = viewBox[2] - viewBox[0];\n var height = viewBox[3] - viewBox[1];\n var rw = width > height ? 1 : width / height;\n var rh = width > height ? height / width : 1;\n // Apply transform matrix to path\n var transform = path.getAttribute('transform') || '';\n var matrix = [1, 0, 0, 0, 1, 0];\n if (transform.length > 0) {\n var transformMatrix = compose(fromDefinition(fromTransformAttribute(transform)));\n matrix = [\n transformMatrix.a,\n transformMatrix.b,\n transformMatrix.c,\n transformMatrix.d,\n transformMatrix.e,\n transformMatrix.f,\n ];\n }\n var pathString = svgpath(path.getAttribute('d') || '')\n .matrix(matrix)\n .toString();\n var path_length = Math.floor(path.getTotalLength());\n var buffer_length = Math.floor(path_length / steps) * 2;\n var pathFromMatrix = document.createElementNS('http://www.w3.org/2000/svg', 'path');\n pathFromMatrix.setAttribute('d', pathString);\n // Generate buffer\n var buffer = new Float32Array(buffer_length);\n for (var i = 0, j = 0; i < path_length; i += steps, j += 2) {\n var _a = pathFromMatrix.getPointAtLength(i), x = _a.x, y = _a.y;\n buffer[j] = rw * (x / width) * 2 - 1;\n buffer[j + 1] = rh * (y / height) * 2 - 1;\n if (rw < 1)\n buffer[j] += 1 - rw;\n if (rh < 1)\n buffer[j + 1] += 1 - rh;\n }\n return buffer;\n };\n /**\n * Propagate transform for apply to point in path\n *\n * @private\n * @static\n * @param {SVGGElement} g\n */\n SVGImporter.propagateGroupTransformAndStyleToChildren = function (g) {\n var gTransform = g.getAttribute('transform');\n if (gTransform && gTransform.length > 0) {\n var gMatrix_1 = compose(fromDefinition(fromTransformAttribute(gTransform)));\n var children = g.children;\n Array.from(children).forEach(function (child) {\n var transform = child.getAttribute('transform');\n if (transform && transform.length > 0) {\n var matrix = compose(fromDefinition(fromTransformAttribute(transform)));\n var finalMatrix = compose(matrix, gMatrix_1);\n transform = toSVG(finalMatrix);\n }\n child.setAttribute('transform', gTransform);\n });\n }\n var attrs = ['fill', 'stroke', 'stroke-width'];\n attrs.forEach(function (attr) {\n var value = g.getAttribute(attr);\n if (value) {\n Array.from(g.children).forEach(function (child) {\n if (child.getAttribute(attr) === null) {\n child.setAttribute(attr, value);\n }\n });\n }\n });\n };\n /**\n * Convert SVG Element to Path\n *\n * @static\n * @param {SVGElement} element\n * @returns {Array}\n */\n SVGImporter.elementToPath = function (element) {\n var transform = element.getAttribute('transform') || '';\n var fill = SVGImporter.getStyleAttr('fill', element, undefined);\n var stroke = SVGImporter.getStyleAttr('stroke', element, undefined);\n var lineWidth = SVGImporter.getStyleAttr('stroke-width', element, undefined);\n if (element.nodeName == 'path') {\n // Separate multiple path\n var d = element.getAttribute('d') || '';\n var result = svgpath(d)\n .abs()\n .toString()\n .split('M')\n .filter(function (e) { return e.length > 0; })\n .map(function (e) { return 'M' + e; });\n return result.map(function (d) {\n var path = document.createElementNS('http://www.w3.org/2000/svg', 'path');\n path.setAttribute('d', d);\n path.setAttribute('transform', transform);\n fill && path.setAttribute('fill', fill);\n stroke && path.setAttribute('stroke', stroke);\n lineWidth && path.setAttribute('lineWidth', lineWidth);\n return path;\n });\n }\n var path = document.createElementNS('http://www.w3.org/2000/svg', 'path');\n var nodeName = element.nodeName;\n if (['rect', 'ellipse', 'circle', 'line', 'polyline', 'polygon'].includes(nodeName)) {\n path.setAttribute('d', SVGImporter.CONVERSION[nodeName](element));\n path.setAttribute('transform', transform);\n fill && path.setAttribute('fill', fill);\n stroke && path.setAttribute('stroke', stroke);\n lineWidth && path.setAttribute('lineWidth', lineWidth);\n return [path];\n }\n else {\n console.warn(\"[Urpflanze:SVGImport] | Cannot convert \" + nodeName + \" to path\");\n return [];\n }\n };\n /**\n * Get percentage to number\n *\n * @private\n * @static\n * @param {(number | string)} val\n * @param {number} base\n * @returns {number}\n */\n SVGImporter.fromPercentage = function (val, base) {\n return /%$/.test(val + '') ? (parseFloat((val + '').replace('%', '')) * 100) / base : +val;\n };\n /**\n * Separate multiple array\n *\n * @private\n * @static\n * @param {(Array)} arr\n * @param {number} [size=2]\n * @returns {(Array>)}\n */\n SVGImporter.chunk = function (arr, size) {\n if (size === void 0) { size = 2; }\n var results = [];\n while (arr.length > 0)\n results.push(arr.splice(0, size));\n return results;\n };\n /**\n * Match hex color\n * @static\n */\n SVGImporter.HEX_REGEX = '#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})';\n /**\n * Match string is SVG\n * @static\n */\n SVGImporter.SVG_REGEX = /^\\s*(?:<\\?xml[^>]*>\\s*)?(?:]*\\s*(?:\\[?(?:\\s*]*>\\s*)*\\]?)*[^>]*>\\s*)?(?:]*>[^]*<\\/svg>|]*\\/\\s*>)\\s*$/i;\n /**\n * Match commments\n *\n * @static\n */\n SVGImporter.COMMENT_REGEX = //g;\n /**\n * Convert Elements to path\n *\n * @private\n * @static\n * @type {ISVGElementConversion}\n */\n SVGImporter.CONVERSION = {\n rect: function (rect) {\n var width = parseFloat(rect.getAttribute('width') || '0');\n var height = parseFloat(rect.getAttribute('height') || '0');\n var x = parseFloat(rect.getAttribute('x') || '0');\n var y = parseFloat(rect.getAttribute('y') || '0');\n var rx = rect.getAttribute('rx') || 'auto';\n var ry = rect.getAttribute('ry') || 'auto';\n if (rx === 'auto' && ry === 'auto')\n rx = ry = 0;\n else if (rx !== 'auto' && ry === 'auto')\n rx = ry = SVGImporter.fromPercentage(rx, width);\n else if (ry !== 'auto' && rx === 'auto')\n ry = rx = SVGImporter.fromPercentage(ry, height);\n else {\n rx = SVGImporter.fromPercentage(rx, width);\n ry = SVGImporter.fromPercentage(ry, height);\n }\n if (rx > width / 2)\n rx = width / 2;\n if (ry > height / 2)\n ry = height / 2;\n var hasCurves = rx > 0 && ry > 0;\n return __spreadArrays([\n \"M\" + (x + rx) + \" \" + y,\n \"H\" + (x + width - rx)\n ], (hasCurves ? [\"A\" + rx + \" \" + ry + \" 0 0 1 \" + (x + width) + \" \" + (y + ry)] : []), [\n \"V\" + (y + height - ry)\n ], (hasCurves ? [\"A\" + rx + \" \" + ry + \" 0 0 1 \" + (x + width - rx) + \" \" + (y + height)] : []), [\n \"H\" + (x + rx)\n ], (hasCurves ? [\"A\" + rx + \" \" + ry + \" 0 0 1 \" + x + \" \" + (y + height - ry)] : []), [\n \"V\" + (y + ry)\n ], (hasCurves ? [\"A\" + rx + \" \" + ry + \" 0 0 1 \" + (x + rx) + \" \" + y] : []), [\n 'Z',\n ]).join(' ');\n },\n ellipse: function (ellipse) {\n var _a, _b, _c, _d;\n var cx = parseFloat(ellipse.getAttribute('cx') || '0');\n var cy = parseFloat(ellipse.getAttribute('cy') || '0');\n var rx = parseFloat((_b = (_a = ellipse.getAttribute('rx')) !== null && _a !== void 0 ? _a : ellipse.getAttribute('r')) !== null && _b !== void 0 ? _b : '0');\n var ry = parseFloat((_d = (_c = ellipse.getAttribute('ry')) !== null && _c !== void 0 ? _c : ellipse.getAttribute('r')) !== null && _d !== void 0 ? _d : '0');\n return [\n \"M\" + (cx + rx) + \" \" + cy,\n \"A\" + rx + \" \" + ry + \" 0 0 1 \" + cx + \" \" + (cy + ry),\n \"A\" + rx + \" \" + ry + \" 0 0 1 \" + (cx - rx) + \" \" + cy,\n \"A\" + rx + \" \" + ry + \" 0 0 1 \" + (cx + rx) + \" \" + cy,\n 'Z',\n ].join(' ');\n },\n circle: function (circle) { return SVGImporter.CONVERSION.ellipse(circle); },\n line: function (line) {\n return \"M\" + (line.getAttribute('x1') || '0') + \" \" + (line.getAttribute('y1') || '0') + \" L\" + (line.getAttribute('x2') || '0') + \" \" + (line.getAttribute('y2') || '0');\n },\n polyline: function (polyline) {\n var points = polyline.getAttribute('points') || '';\n var pointsArray = points\n .trim()\n .replace(/ +/g, ' ')\n .split(' ')\n .reduce(function (arr, point) { return __spreadArrays(arr, (point.includes(',') ? point.split(',') : [point])); }, []);\n var pairs = SVGImporter.chunk(pointsArray, 2);\n return pairs.map(function (_a, i) {\n var x = _a[0], y = _a[1];\n return \"\" + (i === 0 ? 'M' : 'L') + x + \" \" + y;\n }).join(' ');\n },\n polygon: function (polygon) { return SVGImporter.CONVERSION.polyline(polygon) + ' Z'; },\n path: function (path) { return path.getAttribute('d') + ''; },\n };\n return SVGImporter;\n}());\nexport default SVGImporter;\n//# sourceMappingURL=SVGImporter.js.map","import { now } from \"../../Utilites\";\n/**\n *\n * @category Services.Renderer\n * @class Capturer\n */\nvar Capturer = /** @class */ (function () {\n function Capturer(settings) {\n if (settings === void 0) { settings = {}; }\n this.type = settings.type || 'image/jpeg';\n this.encoder = this.type === 'image/png' ? 'png' : 'jpeg';\n this.extension = this.encoder === 'jpeg' ? '.jpg' : '.png';\n this.quality = settings && settings.quality ? settings.quality : 1;\n this.started = false;\n this.promises = [];\n this.chunks = [];\n }\n Capturer.prototype.setSettings = function (settings) {\n this.type = settings.type || 'image/jpeg';\n this.encoder = this.type === 'image/png' ? 'png' : 'jpeg';\n this.extension = this.encoder === 'jpeg' ? '.jpg' : '.png';\n this.quality = settings && settings.quality ? settings.quality : 1;\n };\n Capturer.prototype.start = function (total_frames) {\n this.chunks = new Array(total_frames);\n this.promises = new Array(total_frames);\n this.started = true;\n };\n Capturer.prototype.stop = function () {\n this.chunks = [];\n this.promises = [];\n this.started = false;\n };\n Capturer.prototype.capture = function (canvas, framenumber) {\n if (this.started) {\n var type_1 = this.type;\n var quality_1 = this.quality;\n var chunks_1 = this.chunks;\n var promise = new Promise(function (resolve, reject) {\n Capturer.render(canvas, type_1, quality_1)\n .then(function (blob) {\n chunks_1[framenumber] = blob;\n resolve(framenumber);\n })\n .catch(function (e) { return reject([framenumber, e]); });\n });\n this.promises[framenumber] = promise;\n return promise;\n }\n return Promise.reject();\n };\n Capturer.prototype.save = function () {\n var _this = this;\n if (this.started) {\n return new Promise(function (resolve, reject) {\n Promise.all(_this.promises).then(function () {\n resolve(_this.chunks);\n }, function (reason) {\n reject(reason);\n });\n });\n }\n return Promise.reject('not started');\n };\n Capturer.getRenderTime = function (canvas, type, quality) {\n var startTime = now();\n return Capturer.render(canvas, type, quality).then(function () { return now() - startTime; });\n };\n Capturer.getBlob = function (canvas, type, quality) {\n return new Promise(function (resolve, reject) {\n if (canvas instanceof OffscreenCanvas)\n return canvas.convertToBlob({ type: type, quality: quality }).then(resolve).catch(reject);\n else if (canvas instanceof HTMLCanvasElement)\n return canvas.toBlob(function (blob) { return (blob ? resolve(blob) : reject()); }, type, quality);\n });\n };\n Capturer.render = function (canvas, type, quality) {\n return new Promise(function (resolve, reject) {\n var blobPromise = Capturer.getBlob(canvas, type, quality);\n blobPromise\n .then(function (blob) {\n var fileReader = new FileReader();\n fileReader.addEventListener('load', function () {\n fileReader.result && fileReader.result instanceof ArrayBuffer\n ? resolve(new Uint8Array(fileReader.result))\n : reject();\n }, { passive: true });\n fileReader.readAsArrayBuffer(blob);\n })\n .catch(function (e) { return reject(e); });\n });\n };\n return Capturer;\n}());\nexport default Capturer;\n//# sourceMappingURL=Capturer.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport * as JSZip from 'jszip';\nimport { cancelablePromise, now, ICancelablePromise } from \"../../Utilites\";\nimport Emitter from \"../events/Emitter\";\nimport Capturer from \"./Capturer\";\n/**\n *\n * @category Services.Renderer\n * @class Renderer\n * @extends {Emitter}\n */\nvar Renderer = /** @class */ (function (_super) {\n __extends(Renderer, _super);\n function Renderer() {\n var _this = _super.call(this) || this;\n _this.started = false;\n _this.capturer = new Capturer();\n return _this;\n }\n Renderer.prototype.renderImage = function (drawer, settings) {\n var _this = this;\n this.stop();\n this.started = true;\n this.capturer.setSettings(settings);\n this.capturer.start(1);\n var promise = new Promise(function (resolve, reject) {\n var bClear = drawer.getOption('clear', true);\n var timeline = drawer.getTimeline();\n var sequence = timeline.getSequence();\n if (!bClear) {\n var needFrame = settings.time >= sequence.duration ? sequence.frames : timeline.getFrameAtTime(settings.time);\n for (var i = 0; i <= needFrame; i++) {\n timeline.setFrame(i);\n drawer.draw();\n }\n }\n else {\n drawer.draw();\n }\n _this.capturer.capture(drawer.getCanvas(), 0);\n _this.capturer\n .save()\n .then(function (chunks) {\n resolve(chunks[0]);\n _this.started = false;\n })\n .catch(reject);\n });\n this.renderPromise = cancelablePromise(promise);\n return promise;\n };\n Renderer.prototype.prepareRenderAnimation = function (drawer, settings) {\n return __awaiter(this, void 0, void 0, function () {\n var startTimeDrawTime, drawTime, sequence, time, renderTime, totalTime, maxDuration, parts, frameForPart;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n startTimeDrawTime = now();\n drawer.setOption('time', 0);\n drawer.draw();\n drawTime = now() - startTimeDrawTime;\n sequence = drawer.getTimeline().getSequence();\n return [4 /*yield*/, Capturer.getRenderTime(drawer.getCanvas(), settings.type, settings.quality)];\n case 1:\n time = _a.sent();\n renderTime = time + drawTime;\n totalTime = renderTime * sequence.frames;\n maxDuration = 300;\n parts = 1 + Math.floor(totalTime / 1000 / maxDuration);\n frameForPart = Math.floor(sequence.frames / parts);\n return [2 /*return*/, {\n estimated_time: totalTime,\n total_frames: sequence.frames,\n total_parts: parts,\n forPart: frameForPart,\n }];\n }\n });\n });\n };\n Renderer.prototype.stop = function () {\n this.started = false;\n this.renderPromise && this.renderPromise.cancel();\n this.capturer.stop();\n };\n Renderer.prototype.renderAnimation = function (drawer, settings) {\n var _this = this;\n this.stop();\n this.started = true;\n var sequence = drawer.getTimeline().getSequence();\n var promise = new Promise(function (resolve, reject) {\n _this.prepareRenderAnimation(drawer, settings).then(function (startMeta) { return __awaiter(_this, void 0, void 0, function () {\n var zipParts, i, zipPart, e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n this.dispatch('renderer:start', startMeta);\n zipParts = [];\n i = 0;\n _a.label = 1;\n case 1:\n if (!(i < startMeta.total_parts)) return [3 /*break*/, 8];\n if (!this.started) return [3 /*break*/, 6];\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4 /*yield*/, this.renderAnimationPart(drawer, settings, i * startMeta.forPart, startMeta.forPart, i, sequence.frames, startMeta.total_parts)];\n case 3:\n zipPart = _a.sent();\n if (zipPart)\n zipParts.push(zipPart);\n else\n reject();\n return [3 /*break*/, 5];\n case 4:\n e_1 = _a.sent();\n reject(e_1);\n return [3 /*break*/, 5];\n case 5: return [3 /*break*/, 7];\n case 6:\n reject();\n _a.label = 7;\n case 7:\n i++;\n return [3 /*break*/, 1];\n case 8:\n resolve(zipParts);\n this.started = false;\n return [2 /*return*/];\n }\n });\n }); });\n });\n this.renderPromise = cancelablePromise(promise);\n return promise;\n };\n Renderer.prototype.renderAnimationPart = function (drawer, settings, frame_from, frame_count, part, total_frames, total_parts) {\n return __awaiter(this, void 0, void 0, function () {\n var timeline, lastRenderTime, i, current_frame, measure_start, measure_end, chunks, zip, i, len, frame_number, frameName, j, result;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n this.capturer.setSettings(settings);\n this.capturer.stop();\n this.capturer.start(frame_count);\n timeline = drawer.getTimeline();\n lastRenderTime = 0;\n i = 0;\n _a.label = 1;\n case 1:\n if (!(i < frame_count)) return [3 /*break*/, 4];\n if (!this.started)\n return [2 /*return*/, undefined];\n current_frame = i + frame_from;\n if (!(current_frame <= total_frames)) return [3 /*break*/, 3];\n measure_start = now();\n timeline.setFrame(current_frame);\n drawer.draw();\n return [4 /*yield*/, this.capturer.capture(drawer.getCanvas(), i)];\n case 2:\n _a.sent();\n measure_end = now();\n lastRenderTime = measure_end - measure_start;\n this.dispatch('renderer:render-frame', {\n frame: current_frame,\n part: part,\n forPart: frame_count,\n total_frames: total_frames,\n total_parts: total_parts,\n render_time: lastRenderTime,\n });\n _a.label = 3;\n case 3:\n i++;\n return [3 /*break*/, 1];\n case 4: return [4 /*yield*/, this.capturer.save()];\n case 5:\n chunks = _a.sent();\n if (!this.started) return [3 /*break*/, 7];\n zip = new JSZip();\n for (i = 0, len = chunks.length; i < len; i++) {\n frame_number = (i + frame_from).toString();\n frameName = '';\n for (j = frame_number.length; j <= 4; j++)\n frameName += '0';\n frameName += frame_number;\n zip.file(frameName + this.capturer.extension, chunks[i]);\n }\n return [4 /*yield*/, zip.generateAsync({ type: 'blob' })];\n case 6:\n result = _a.sent();\n if (!this.started)\n return [2 /*return*/, undefined];\n this.capturer.stop();\n return [2 /*return*/, result];\n case 7: return [2 /*return*/, undefined];\n }\n });\n });\n };\n return Renderer;\n}(Emitter));\nexport default Renderer;\n//# sourceMappingURL=Renderer.js.map","import Spiral from \"../../core/shapes/primitives/Spiral\";\nimport { EShapePrimitiveAdaptMode } from \"../../core/types/shape-base\";\nvar OptionShapePrimitiveAdaptMode = [\n { key: 'None', value: EShapePrimitiveAdaptMode.None },\n { key: 'Scale', value: EShapePrimitiveAdaptMode.Scale },\n { key: 'Center', value: EShapePrimitiveAdaptMode.Center },\n { key: 'Fill', value: EShapePrimitiveAdaptMode.Fill },\n];\nvar OptionSpiralType = [\n { key: 'ARCHIMEDE', value: Spiral.types.ARCHIMEDE },\n { key: 'FERMAT', value: Spiral.types.FERMAT },\n { key: 'HYPERBOLIC', value: Spiral.types.HYPERBOLIC },\n { key: 'LITUUS', value: Spiral.types.LITUUS },\n { key: 'LOGARITHMIC', value: Spiral.types.LOGARITHMIC },\n];\n/**\n * @category Services.Scene Utilities\n */\nvar SceneChildUtilitiesData = {\n repetitions: {\n animable: true,\n name: 'repetitions',\n label: 'Repetitions',\n type: 'range',\n min: 1,\n max: 200,\n step: 1,\n default: 1,\n default_animate: 20,\n canBArray: true,\n transformation: 'none',\n dataType: 'props',\n type_value: 'int',\n },\n distance: {\n animable: true,\n name: 'distance',\n label: 'Distance',\n type: 'range',\n min: -100,\n max: 100,\n step: 0.1,\n default: 0,\n canBArray: true,\n default_animate: 25,\n transformation: 'scene-size-percentage',\n dataType: 'props',\n },\n displace: {\n animable: true,\n name: 'displace',\n label: 'Displace',\n type: 'range',\n min: -360,\n max: 360,\n step: 1,\n default: 0,\n default_animate: 360,\n transformation: 'angle',\n dataType: 'props',\n },\n squeezeX: {\n animable: true,\n name: 'squeezeX',\n label: 'SqueezeX',\n type: 'range',\n min: -0.2,\n max: 0.2,\n step: 0.01,\n default: 0,\n default_animate: 0.1,\n transformation: 'scene-size-percentage-inverse',\n dataType: 'props',\n },\n squeezeY: {\n animable: true,\n name: 'squeezeY',\n label: 'SqueezeY',\n type: 'range',\n min: -0.2,\n max: 0.2,\n step: 0.01,\n default: 0,\n default_animate: 0.1,\n transformation: 'scene-size-percentage-inverse',\n dataType: 'props',\n },\n rotateX: {\n animable: true,\n name: 'rotateX',\n label: 'RotateX',\n type: 'range',\n min: -360,\n max: 360,\n step: 1,\n default: 0,\n default_animate: 360,\n transformation: 'angle',\n dataType: 'props',\n },\n rotateY: {\n animable: true,\n name: 'rotateY',\n label: 'RotateY',\n type: 'range',\n min: -360,\n max: 360,\n step: 1,\n default: 0,\n default_animate: 360,\n transformation: 'angle',\n dataType: 'props',\n },\n rotateZ: {\n animable: true,\n name: 'rotateZ',\n label: 'RotateZ',\n type: 'range',\n min: -360,\n max: 360,\n step: 1,\n default: 0,\n default_animate: 360,\n transformation: 'angle',\n dataType: 'props',\n },\n skewX: {\n animable: true,\n name: 'skewX',\n label: 'SkewX',\n type: 'range',\n min: -90,\n max: 90,\n step: 1,\n default: 0,\n default_animate: 1,\n transformation: 'angle',\n dataType: 'props',\n },\n skewY: {\n animable: true,\n name: 'skewY',\n label: 'SkewY',\n type: 'range',\n min: -90,\n max: 90,\n step: 1,\n default: 0,\n default_animate: 1,\n transformation: 'angle',\n dataType: 'props',\n },\n translate: {\n animable: true,\n name: 'translate',\n label: 'Translate',\n type: 'multiple-range',\n min: -100,\n max: 100,\n step: 0.1,\n default: 0,\n default_animate: 0,\n initialArray: true,\n transformation: 'scene-size-percentage',\n dataType: 'props',\n },\n scale: {\n animable: true,\n name: 'scale',\n label: 'Scale',\n type: 'multiple-range',\n min: -5,\n max: 5,\n step: 0.01,\n default: 1,\n default_animate: 3,\n transformation: 'none',\n dataType: 'props',\n },\n transformOrigin: {\n animable: true,\n name: 'transformOrigin',\n label: 'Transform Origin',\n type: 'multiple-range',\n min: -1,\n max: 1,\n step: 0.01,\n default: [0, 0],\n default_animate: [-1, 1],\n initialArray: true,\n transformation: 'none',\n dataType: 'props',\n },\n perspective: {\n animable: true,\n name: 'perspective',\n label: 'Perspective',\n type: 'range',\n min: 0,\n max: 1,\n step: 0.01,\n default: 0,\n default_animate: 0.8,\n transformation: 'none',\n dataType: 'props',\n },\n perspectiveOrigin: {\n animable: true,\n name: 'perspectiveOrigin',\n label: 'Perspective Origin',\n type: 'multiple-range',\n min: -1,\n max: 1,\n step: 0.01,\n default: [0, 0],\n default_animate: [-1, 1],\n initialArray: true,\n transformation: 'none',\n dataType: 'props',\n },\n // primitive style\n fill: {\n animable: true,\n name: 'fill',\n label: 'Fill',\n type: 'color',\n default: '#000',\n default_animate: '#fff',\n transformation: 'none',\n dataType: 'drawer',\n },\n stroke: {\n animable: true,\n name: 'stroke',\n label: 'Stroke',\n type: 'color',\n default: '#fff',\n default_animate: '#000',\n transformation: 'none',\n dataType: 'drawer',\n },\n lineWidth: {\n animable: true,\n name: 'lineWidth',\n label: 'Stroke weight',\n type: 'slider',\n min: 0,\n max: 30,\n step: 0.01,\n default: 0.1,\n default_animate: 3,\n transformation: 'scene-size-percentage',\n dataType: 'drawer',\n },\n bClosed: {\n name: 'bClosed',\n label: 'Closed',\n type: 'checkbox',\n default: undefined,\n transformation: 'none',\n dataType: 'settings',\n },\n bUseParent: {\n name: 'bUseParent',\n label: 'Use parent repetition',\n type: 'checkbox',\n default: false,\n transformation: 'none',\n dataType: 'settings',\n },\n bUseRecursion: {\n name: 'bUseRecursion',\n label: 'Use recursion repetition',\n type: 'checkbox',\n default: false,\n transformation: 'none',\n dataType: 'settings',\n },\n vertexCallback: {\n name: 'vertexCallback',\n label: 'vertexCallback',\n type: 'function',\n default: undefined,\n transformation: 'none',\n dataType: 'settings',\n },\n adaptMode: {\n name: 'adaptMode',\n label: 'Adapt',\n type: 'radio',\n options: OptionShapePrimitiveAdaptMode,\n default: undefined,\n transformation: 'none',\n dataType: 'settings',\n },\n // recursion\n recursions: {\n animable: true,\n name: 'recursion',\n label: 'Recursion',\n type: 'range',\n min: 1,\n max: 8,\n step: 1,\n default: 1,\n default_animate: 2,\n transformation: 'none',\n dataType: 'props',\n type_value: 'int',\n },\n recursionScale: {\n animable: true,\n name: 'recursionScale',\n label: 'Recursion Scale',\n type: 'range',\n min: 0.1,\n max: 5,\n step: 0.01,\n default: 1,\n default_animate: 2,\n transformation: 'none',\n dataType: 'props',\n },\n recursionVertex: {\n animable: true,\n name: 'recursionVertex',\n label: 'Recursion Vertex',\n type: 'range',\n min: 1,\n max: 100,\n step: 1,\n default: 10,\n default_animate: 20,\n transformation: 'none',\n dataType: 'props',\n type_value: 'int',\n },\n // primitive\n sideLength: {\n animable: true,\n name: 'sideLength',\n label: 'Side Length',\n type: 'multiple-range',\n min: 0.01,\n max: 100,\n step: 0.1,\n default: 10,\n default_animate: 20,\n transformation: 'scene-size-percentage',\n dataType: 'props',\n },\n // polygon\n sideNumber: {\n animable: true,\n name: 'sideNumber',\n label: 'Side Number',\n type: 'range',\n min: 1,\n max: 20,\n step: 1,\n default: 5,\n default_animate: 2,\n transformation: 'none',\n dataType: 'props',\n },\n // rose\n n: {\n animable: true,\n name: 'n',\n label: 'n',\n type: 'range',\n min: 1,\n max: 10,\n step: 1,\n default: 1,\n default_animate: 3,\n transformation: 'none',\n dataType: 'props',\n },\n d: {\n animable: true,\n name: 'd',\n label: 'd',\n type: 'range',\n min: 1,\n max: 10,\n step: 1,\n default: 2,\n default_animate: 4,\n transformation: 'none',\n dataType: 'props',\n },\n // lissajous\n wx: {\n animable: true,\n name: 'wx',\n label: 'wx',\n type: 'range',\n min: 1,\n max: 10,\n step: 1,\n default: 1,\n default_animate: 3,\n transformation: 'none',\n dataType: 'props',\n },\n wy: {\n animable: true,\n name: 'wy',\n label: 'wy',\n type: 'range',\n min: 1,\n max: 10,\n step: 1,\n default: 2,\n default_animate: 4,\n transformation: 'none',\n dataType: 'props',\n },\n wz: {\n animable: true,\n name: 'wz',\n label: 'wz',\n type: 'range',\n min: -360,\n max: 360,\n step: 1,\n default: 0,\n default_animate: 360,\n transformation: 'angle',\n dataType: 'props',\n },\n // spiral\n twists: {\n animable: true,\n name: 'twists',\n label: 'Twists',\n type: 'range',\n min: 1,\n max: 60,\n step: 0.1,\n default: 1,\n default_animate: 3,\n transformation: 'none',\n dataType: 'props',\n },\n twistsStart: {\n animable: true,\n name: 'twists_start',\n label: 'Twists start',\n type: 'range',\n min: 0,\n max: 60,\n step: 0.1,\n default: 0,\n default_animate: 1,\n transformation: 'none',\n dataType: 'props',\n },\n spiral: {\n name: 'spiral',\n label: 'Spiral type',\n type: 'select',\n options: OptionSpiralType,\n default: Spiral.types.ARCHIMEDE,\n transformation: 'none',\n dataType: 'props',\n },\n // supershape\n a: {\n animable: true,\n name: 'a',\n label: 'A',\n type: 'range',\n min: -5,\n max: 5,\n step: 0.1,\n default: 1,\n default_animate: 0.1,\n transformation: 'none',\n dataType: 'props',\n },\n b: {\n animable: true,\n name: 'b',\n label: 'B',\n type: 'range',\n min: -5,\n max: 5,\n step: 0.1,\n default: 1,\n default_animate: 0.1,\n transformation: 'none',\n dataType: 'props',\n },\n m: {\n animable: true,\n name: 'm',\n label: 'm',\n type: 'range',\n min: 1,\n max: 20,\n step: 1,\n default: 1,\n default_animate: 6,\n transformation: 'none',\n dataType: 'props',\n type_value: 'int',\n },\n n1: {\n animable: true,\n name: 'n1',\n label: 'n1',\n type: 'range',\n min: -3,\n max: 3,\n step: 0.01,\n default: 1,\n default_animate: 0.1,\n transformation: 'none',\n dataType: 'props',\n },\n n2: {\n animable: true,\n name: 'n2',\n label: 'n2',\n type: 'range',\n min: -3,\n max: 3,\n step: 0.01,\n default: 1,\n default_animate: 0.1,\n transformation: 'none',\n dataType: 'props',\n },\n n3: {\n animable: true,\n name: 'n3',\n label: 'n3',\n type: 'range',\n min: -3,\n max: 3,\n step: 0.01,\n default: 1,\n default_animate: 0.1,\n transformation: 'none',\n dataType: 'props',\n },\n // loop\n 'loop.start': {\n name: 'loop.start',\n label: 'start',\n type: 'range',\n default: undefined,\n min: 0,\n max: 100,\n step: 0.01,\n transformation: 'none',\n dataType: 'props',\n },\n 'loop.end': {\n name: 'loop.end',\n label: 'end',\n type: 'range',\n default: undefined,\n min: 0,\n max: 100,\n step: 0.01,\n transformation: 'none',\n dataType: 'props',\n },\n 'loop.inc': {\n name: 'loop.inc',\n label: 'inc',\n type: 'range',\n default: undefined,\n min: 0.01,\n max: 100,\n step: 0.01,\n transformation: 'none',\n dataType: 'props',\n },\n};\nexport default SceneChildUtilitiesData;\n//# sourceMappingURL=SceneChildUtilitiesData.js.map","var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nimport { v1 as uuidv1 } from 'uuid';\nimport SceneChild from \"../../core/SceneChild\";\n// Shapes\nimport Line from \"../../core/shapes/primitives/Line\";\nimport Triangle from \"../../core/shapes/primitives/Triangle\";\nimport Rect from \"../../core/shapes/primitives/Rect\";\nimport Polygon from \"../../core/shapes/primitives/Polygon\";\nimport Circle from \"../../core/shapes/primitives/Circle\";\nimport Rose from \"../../core/shapes/primitives/Rose\";\nimport Spiral from \"../../core/shapes/primitives/Spiral\";\nimport Lissajous from \"../../core/shapes/primitives/Lissajous\";\nimport SuperShape from \"../../core/shapes/primitives/SuperShape\";\nimport Shape from \"../../core/shapes/Shape\";\nimport ShapeRecursive from \"../../core/shapes/ShapeRecursive\";\nimport ShapePrimitive from \"../../core/shapes/ShapePrimitive\";\nimport ShapeLoop from \"../../core/shapes/ShapeLoop\";\nimport ShapeBuffer from \"../../core/shapes/ShapeBuffer\";\nimport Scene from \"../../core/Scene\";\nimport Group from \"../../core/Group\";\nimport ShapeBase from \"../../core/shapes/ShapeBase\";\nimport Animation from \"../animation/Animation\";\nimport SceneChildUtilitiesData from \"./SceneChildUtilitiesData\";\nimport SceneUtilitiesExtended from \"./SceneUtilitiesExtended\";\n/**\n *\n * @category Services.Scene Utilities\n * @class SceneUtilities\n */\nvar SceneUtilities = /** @class */ (function () {\n function SceneUtilities() {\n this.registeredSceneChilds = {};\n this.registeredSceneChilds = {\n Line: Line,\n Triangle: Triangle,\n Rect: Rect,\n Polygon: Polygon,\n Circle: Circle,\n Rose: Rose,\n Spiral: Spiral,\n Lissajous: Lissajous,\n SuperShape: SuperShape,\n Group: Group,\n Shape: Shape,\n ShapeRecursive: ShapeRecursive,\n ShapeLoop: ShapeLoop,\n ShapeBuffer: ShapeBuffer,\n };\n }\n //#region Register scene child\n /**\n * Return a list of name of registered sceneChild\n *\n * @returns {Array}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getRegistered = function () {\n return Object.keys(this.registeredSceneChilds);\n };\n /**\n * Register scene child for fast creation\n *\n * @param {string} type\n * @param {SceneChildInstance} ref\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.register = function (type, ref) {\n if (!(type in this.registeredSceneChilds)) {\n this.registeredSceneChilds[type] = ref;\n }\n else {\n console.warn(\"SceneUtilities: SceneChild \\\"\" + type + \"\\\" is already registered\");\n }\n };\n /**\n * unregister scene child\n *\n * @param {string} type\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.unregister = function (type) {\n if (type in this.registeredSceneChilds) {\n delete this.registeredSceneChilds[type];\n }\n else {\n console.warn(\"SceneUtilities: SceneChild \\\"\" + type + \"\\\" is not registered\");\n }\n };\n //#endregion\n //#region Scene manipulation\n /**\n * Logic creation of a SceneChild\n * Since scene is not passed, name are set if they are present in args or type\n *\n *\n * @param {(string | SceneChild)} item\n * @param {TSceneChildUtilitiesSettings} [setting]\n * @param {Scene} [scene]\n * @returns {(SceneChild | null)}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.create = function (item, settings, scene) {\n var _this = this;\n var _a;\n scene = scene ? scene : typeof item !== 'string' ? item.scene : undefined;\n if (item instanceof SceneChild) {\n this.getChildren(item).forEach(function (child) { return _this.create(child, undefined, scene); });\n return item;\n }\n if (item in this.registeredSceneChilds) {\n if (!settings)\n settings = {};\n settings.id = settings.id || uuidv1();\n if (!settings.name && scene)\n settings.name = item + '_' + (this.getCountSceneChildOfType(scene, item) + 1);\n if (!settings.data)\n settings.data = {};\n if (!('props' in settings.data))\n settings.data.props = {};\n if (!('style' in settings.data))\n settings.data.style = {};\n if (!('visible' in settings.data))\n settings.data.visible = true;\n // if (!('highlighted' in settings.data)) settings.data.highlighted = false\n // if (!('disableGhost' in settings.data)) settings.data.disableGhost = false\n // if (item === 'ShapeLoop') {\n // \tif (!('loop' in settings)) settings.loop = { start: 0, end: Math.PI * 2, inc: (Math.PI * 2) / 20 }\n // }\n var sceneChild = new this.registeredSceneChilds[item](settings);\n if (sceneChild && scene && this.isAPrimitive(sceneChild)) {\n this.set(sceneChild, 'sideLength', { type: 'transformable-prop', value: (_a = SceneChildUtilitiesData.sideLength) === null || _a === void 0 ? void 0 : _a.default }, scene);\n // this.setProp(\n // \tsceneChild,\n // \t'sideLength',\n // \t{ type: 'transformable-prop', value: SceneChildUtilitiesData.sideLength?.default },\n // \tscene\n // )\n }\n this.getChildren(sceneChild).forEach(function (child) { return _this.create(child); });\n return sceneChild;\n }\n console.warn(\"SceneUtilities: Creation failed. SceneChild \\\"\" + item + \"\\\" is not registered\");\n return null;\n };\n /**\n * Return number of element from a type\n *\n * @param {Scene} scene\n * @param {string} type\n * @returns {number}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getCountSceneChildOfType = function (scene, type) {\n var count = 0;\n Scene.walk(function (sceneChild) {\n count += sceneChild.type == type ? 1 : 0;\n }, scene);\n return count;\n };\n /**\n * Return a copy of sceneChild\n *\n * @param {SceneChild} sceneChild\n * @param {Scene} [scene]\n * @param {boolean} [strict]\n * @returns {(SceneChild | null)}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.copy = function (sceneChild, scene, strict) {\n var _this = this;\n if (strict === void 0) { strict = false; }\n // copy only props, without name, id\n var setting = sceneChild.getProps();\n if (sceneChild instanceof ShapeBase) {\n setting.bUseParent = sceneChild.bUseParent;\n setting.bUseRecursion = sceneChild.bUseRecursion;\n }\n if (sceneChild instanceof ShapeBuffer) {\n setting.shape = sceneChild.shape;\n }\n if (sceneChild instanceof ShapePrimitive) {\n setting.bClosed = sceneChild.bClosed;\n setting.adaptMode = sceneChild.adaptMode;\n setting.vertexCallback = sceneChild.vertexCallback;\n }\n if (sceneChild instanceof ShapeLoop) {\n setting.loopDependencies = sceneChild.loopDependencies;\n }\n if (sceneChild instanceof ShapeLoop) {\n setting.loopDependencies = sceneChild.loopDependencies;\n }\n if (strict) {\n setting.id = sceneChild.id;\n setting.name = sceneChild.name;\n setting.order = sceneChild.order;\n setting.data = JSON.parse(JSON.stringify(sceneChild.data || {}));\n }\n var copied = this.create(sceneChild.type, setting, scene);\n if (copied) {\n if (sceneChild instanceof Group) {\n sceneChild.getChildren().forEach(function (child) {\n var copiedChild = _this.copy(child, scene);\n copiedChild && copied.add(copiedChild);\n });\n }\n else if (sceneChild instanceof Shape && copied instanceof Shape && sceneChild.shape) {\n var copiedShape = this.copy(sceneChild.shape, scene);\n copiedShape && (copied.shape = copiedShape);\n }\n else if (sceneChild instanceof ShapeBuffer && copied instanceof ShapeBuffer && sceneChild.shape) {\n copied.setShape(new Float32Array(sceneChild.shape));\n }\n return copied;\n }\n console.warn(\"SceneUtilities: Copy failed.\", sceneChild);\n return null;\n };\n /**\n * Add scene child to parent.\n * Create a group if parent is Shape and has one element (not Group) inside.\n *\n * @param {(SceneChild | Scene)} parent\n * @param {(string | SceneChild)} sceneChild\n * @param {TSceneChildUtilityProps} [props]\n * @param {Scene} [scene]\n * @returns {(SceneChild | null)}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.add = function (parent, sceneChild, settings, scene) {\n var newSceneChild = null;\n if (parent instanceof Group || parent instanceof Scene) {\n newSceneChild = this.create(sceneChild, settings, scene);\n newSceneChild && parent.add(newSceneChild);\n }\n else if (parent instanceof Shape) {\n if (parent.shape == undefined) {\n newSceneChild = this.create(sceneChild, settings, scene);\n newSceneChild && parent.setShape(newSceneChild);\n }\n else if (parent.shape instanceof ShapeBase) {\n newSceneChild = this.create(sceneChild, settings, scene);\n if (newSceneChild) {\n var newGroup = this.create('Group', undefined, scene);\n var sibling = parent.shape;\n this.remove(parent, sibling);\n parent.setShape(newGroup);\n newGroup.add(sibling);\n newGroup.add(newSceneChild);\n }\n }\n else if (parent.shape instanceof Group) {\n this.add(parent.shape, sceneChild, undefined, scene);\n }\n }\n return newSceneChild;\n };\n /**\n * Remove scene child from\n *\n * @param {SceneChild} from\n * @param {SceneChild} [item]\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.remove = function (from, item) {\n if (!item) {\n // 'from' as item to remove\n if (from.scene) {\n var parent_1 = this.getParent(from);\n !parent_1 ? from.scene.removeFromId(from.id) : this.remove(parent_1, from);\n }\n else {\n console.warn(\"SceneUtilities: Remove failed. SceneChild is not added into scene\", from);\n }\n }\n else {\n if (from instanceof Group)\n from.removeFromId(item.id);\n else if (from instanceof Shape)\n from.setShape(undefined);\n }\n };\n //#endregion\n //#region Scene parent and children\n /**\n * Get Root parent\n *\n * @param {SceneChild} sceneChild\n * @returns {(SceneChild | null)}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getRootParent = function (sceneChild) {\n var parents = this.getParents(sceneChild);\n return parents.length > 0 ? parents[0] : null;\n };\n /**\n * Get first level parent\n *\n * @param {SceneChild} sceneChild\n * @returns {(SceneChild | null)}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getParent = function (sceneChild) {\n var parents = this.getParents(sceneChild);\n return parents.length > 0 ? parents[parents.length - 1] : null;\n };\n /**\n * Get all parents\n *\n * @param {SceneChild} sceneChild\n * @returns {Array}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getParents = function (sceneChild) {\n return sceneChild && sceneChild.scene ? sceneChild.scene.getParentsOfSceneChild(sceneChild) : [];\n };\n /**\n * Return children of a shape.\n * Only Group has array of children, Shape has only one child.\n *\n * @param {SceneChild} sceneChild\n * @returns {Array}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getChildren = function (sceneChild) {\n if (sceneChild instanceof Group)\n return sceneChild.getChildren();\n return sceneChild instanceof Shape && sceneChild.shape ? [sceneChild.shape] : [];\n };\n /**\n * Return only primitive children\n *\n * @param {SceneChild} sceneChild\n * @returns {Array}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getChildrenPrimitives = function (sceneChild) {\n var result = [];\n var children = this.getChildren(sceneChild);\n for (var i = 0, len = children.length; i < len; i++) {\n if (children[i] instanceof ShapePrimitive)\n result.push(children[i]);\n else\n result = result.concat.apply(result, this.getChildrenPrimitives(children[i]));\n }\n return result;\n };\n /**\n * Return a list of neighbors\n *\n * @param {SceneChild} sceneChild\n * @returns {(Array)}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getNeighbors = function (sceneChild) {\n if (sceneChild.scene) {\n var parent_2 = this.getParent(sceneChild);\n return parent_2 == null ? sceneChild.scene.getChildren() : this.getChildren(parent_2);\n }\n return [];\n };\n /**\n * Return a number of element type into a scene\n *\n * @param {Scene} scene\n * @param {string} type\n * @returns {number}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.getCountOfSceneChildType = function (scene, type) {\n var count = 0;\n Scene.walk(function (sceneChild) {\n count += sceneChild.type == type ? 1 : 0;\n }, scene);\n return count;\n };\n // /**\n // * Walk through sceneChild\n // *\n // * @param {SceneChild} sceneChild\n // * @param {(child: SceneChild) => void} callback\n // * @memberof SceneUtilities\n // */\n // walk(sceneChild: SceneChild, callback: (child: SceneChild) => void) {\n // \tcallback(sceneChild)\n // \tthis.getChildren(sceneChild).forEach(child => callback(child))\n // }\n //#endregion\n //#region checker\n /**\n * Check sceneChild is Group\n *\n * @param {SceneChild} sceneChild\n * @returns {boolean}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.isGroup = function (sceneChild) {\n return sceneChild instanceof Group;\n };\n /**\n * Check sceneChild are Shape and has a child\n *\n * @param {SceneChild} sceneChild\n * @returns {boolean}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.hasShapeChild = function (sceneChild) {\n return sceneChild instanceof Shape ? sceneChild.shape !== undefined : false;\n };\n /**\n * Check sceneChild is a ShapeBuffer an are binded\n *\n * @param {SceneChild} sceneChild\n * @returns {boolean}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.hasShapeBuffer = function (sceneChild) {\n return sceneChild instanceof ShapeBuffer;\n };\n /**\n * Check scene child is a Primitive\n *\n * @param {SceneChild} sceneChild\n * @returns {boolean}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.isAPrimitive = function (sceneChild) {\n return sceneChild instanceof ShapePrimitive;\n };\n /**\n * Check scene child is a ShapeLoop\n *\n * @param {SceneChild} sceneChild\n * @returns {boolean}\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.hasLoop = function (sceneChild) {\n return sceneChild instanceof ShapeLoop;\n };\n //#endregion\n SceneUtilities.prototype.set = function (sceneChild, name, value, scene) {\n switch (SceneChildUtilitiesData[name].dataType) {\n case 'props':\n return this.setProp(sceneChild, name, value, scene);\n case 'drawer':\n return this.setDrawerProp(sceneChild, name, value, scene);\n case 'settings':\n return this.setSetting(sceneChild, name, value, scene);\n }\n };\n /**\n * Set prop: convert animation or transformable props\n *\n * @static\n * @param {SceneChild} sceneChild\n * @param {TSceheChildUtilityPropValue} value\n * @param {Scene} scene\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.setProp = function (sceneChild, name, value, scene) {\n if (typeof sceneChild.data === 'undefined') {\n sceneChild.data = { props: {} };\n }\n else if (typeof sceneChild.data.props === 'undefined') {\n sceneChild.data.props = {};\n }\n sceneChild.clearBuffer(true, true);\n // Check LoopAnimation\n if (name === 'loop') {\n if (sceneChild instanceof ShapeLoop && SceneUtilitiesExtended.bValueLoop(value)) {\n var shapeLoopAnimation = value;\n sceneChild.data.props.loop = value;\n sceneChild.setProp('loop', SceneUtilitiesExtended.composeLoop(shapeLoopAnimation));\n // Set loopDependencies\n var dynamic = shapeLoopAnimation.dynamyc;\n var realDynamic = sceneChild.loopDependencies.indexOf('propArguments') >= 0;\n if (dynamic !== realDynamic) {\n var dependencies = __spreadArrays(sceneChild.loopDependencies);\n if (dynamic)\n !(dependencies.indexOf('propArguments') >= 0) && dependencies.push('propArguments');\n else\n dependencies.indexOf('propArguments') >= 0 && dependencies.splice(dependencies.indexOf('propArguments', 1));\n sceneChild.loopDependencies = dependencies;\n }\n }\n return;\n }\n // Check Animation\n if (SceneUtilitiesExtended.bValueAnimation(value)) {\n sceneChild.data.props[name] = value;\n sceneChild.setProp(name, Animation.composeAnimation(scene, name, value));\n return;\n }\n // Check Transormable prop\n if (SceneUtilitiesExtended.bPropInSceneChildUtilitiesData(name) &&\n SceneUtilitiesExtended.bValueTransformable(value)) {\n sceneChild.data.props[name] = value;\n sceneChild.setProp(name, SceneUtilitiesExtended.getTransformedValue(scene, name, value));\n return;\n }\n // Otherwise, set prop without transformation\n //Equivalent of: if (name in SceneChildPropsData && SceneChildPropsData[name].transformation !== 'none')\n sceneChild.setProp(name, value, true);\n delete sceneChild.data.props[name];\n // Not set to data because exporter override sceneChild.data.props on sceneChild.props (default)\n //sceneChild.data.props[name] = value\n };\n /**\n * Set prop, convert raw function, animation on transformable prop\n *\n * @static\n * @param {SceneChild} sceneChild\n * @param {TDrawerPropsExtendedKeys} name\n * @param {*} value\n * @param {Scene} scene\n * @memberof SceneUtilities\n */\n SceneUtilities.prototype.setDrawerProp = function (sceneChild, name, value, scene) {\n if (this.isAPrimitive(sceneChild)) {\n if (typeof sceneChild.data === 'undefined') {\n sceneChild.data = { style: {} };\n }\n else if (typeof sceneChild.data.style === 'undefined') {\n sceneChild.data.style = {};\n }\n if (SceneUtilitiesExtended.bValueAnimation(value)) {\n sceneChild.data.style[name] = value;\n sceneChild.style[name] = Animation.composeAnimation(scene, name, value);\n return;\n }\n // Check Transormable prop\n if (SceneUtilitiesExtended.bPropInSceneChildUtilitiesData(name) &&\n SceneUtilitiesExtended.bValueTransformable(value)) {\n sceneChild.data.style[name] = value;\n sceneChild.style[name] = SceneUtilitiesExtended.getTransformedValue(scene, name, value);\n return;\n }\n // Otherwise, set prop without transformation\n //Equivalent of: if (name in SceneChildPropsData && SceneChildPropsData[name].transformation !== 'none')\n // @ts-ignore\n sceneChild.style[name] = value;\n delete sceneChild.data.style[name];\n }\n };\n /**\n * TODO:\n * Set Args (props, drawer, other settings)\n * SceneChildPropData refactoring\n */\n SceneUtilities.prototype.setSetting = function (sceneChild, name, value, scene) {\n sceneChild.clearBuffer(true, true);\n if (name === 'vertexCallback') {\n if (sceneChild instanceof ShapeBase && SceneUtilitiesExtended.bValueVertexCallback(value)) {\n sceneChild.data.vertexCallback = value;\n sceneChild.vertexCallback = SceneUtilitiesExtended.composeVertexCallback(value);\n // If shape is static vertexCallback has no effect\n // sceneChild.bUseParent = true\n }\n return;\n }\n switch (name) {\n case 'bUseParent':\n if (sceneChild instanceof ShapeBase)\n sceneChild.bUseParent = value;\n break;\n case 'bUseRecursion':\n if (sceneChild instanceof ShapeBase)\n sceneChild.bUseRecursion = value;\n break;\n case 'bClosed':\n if (sceneChild instanceof ShapePrimitive)\n sceneChild.setClosed(value);\n break;\n case 'adaptMode':\n if (sceneChild instanceof ShapePrimitive)\n sceneChild.adapt(value);\n break;\n default:\n if (typeof sceneChild[name] !== 'undefined') {\n //@ts-ignore\n sceneChild[name] = value;\n }\n break;\n }\n };\n return SceneUtilities;\n}());\nexport default new SceneUtilities();\n//# sourceMappingURL=SceneUtilities.js.map","import { toRadians, toDegrees } from \"../../Utilites\";\nimport SceneChildUtilitiesData from \"./SceneChildUtilitiesData\";\n/**\n *\n * @category Services.Scene Utilities\n * @class SceneUtilitiesExtended\n */\nvar SceneUtilitiesExtended = /** @class */ (function () {\n function SceneUtilitiesExtended() {\n }\n //#region ShapeLoop\n SceneUtilitiesExtended.bValueLoop = function (value) {\n return (typeof value === 'object' &&\n 'start' in value &&\n 'end' in value &&\n 'inc' in value &&\n 'vertex' in value &&\n value.vertex.raw &&\n value.vertex.raw.length > 0);\n };\n SceneUtilitiesExtended.bValueVertexCallback = function (value) {\n return value && value.raw && value.raw.length > 0;\n };\n SceneUtilitiesExtended.composeVertexCallback = function (value) {\n if (value && value.raw) {\n var vertexCallback = new Function('vertex', 'vertexRepetition', SceneUtilitiesExtended.RAW_ARGUMENTS, \"return \" + value.raw);\n return vertexCallback;\n }\n };\n SceneUtilitiesExtended.composeLoop = function (loop) {\n var vertex = loop.vertex.raw\n ? new Function('shapeLoopRepetition', SceneUtilitiesExtended.RAW_ARGUMENTS, \"return \" + loop.vertex.raw)\n : undefined;\n //Todo: number -> resolve function\n return {\n start: loop.start,\n end: loop.end,\n inc: loop.inc,\n vertex: vertex,\n };\n };\n //#endregion\n // static getRandomFunctionForProp(name): (rand: number) => any {\n // const prop: ISceneChildProp = UISceneChildUtilitiesStatic.sceneChildProps[name]\n // switch (prop.type)\n // {\n // case 'multiple-range': case 'range': case 'slider':\n // return (rand: number) => {\n // const min = prop.min as number / 2\n // const max = prop.max as number / 2\n // const value = min + ((max - min) * rand)\n // return prop.bAngle ? toRadians(value) : value\n // }\n // case 'color':\n // return (rand: number) => `hsl(${Math.floor(360 * rand)}, ${Math.floor(25 + 75 * rand)}%, ${Math.floor(25 + 75 * rand)}%)`\n // default:\n // return (rand: number) => undefined\n // }\n // }\n //#endregion\n //#region Props relative to drawer\n /**\n * Check value is TAnimation\n * @param value\n */\n SceneUtilitiesExtended.bValueAnimation = function (value) {\n return (value &&\n typeof value === 'object' &&\n value.type &&\n (value.type === 'simple' || value.type === 'raw') /*|| value.type == 'random'*/);\n };\n /**\n * Check value is TTransformableProp\n * @param value\n */\n SceneUtilitiesExtended.bValueTransformable = function (value) {\n return (value !== null &&\n typeof value === 'object' &&\n typeof value.type === 'string' &&\n value.type === 'transformable-prop');\n };\n /**\n * Check the prop need transformation when set\n * @param name\n */\n SceneUtilitiesExtended.bPropInSceneChildUtilitiesData = function (name) {\n return (typeof SceneChildUtilitiesData[name] !== 'undefined' && SceneChildUtilitiesData[name].transformation !== 'none');\n };\n /**\n * Transform value\n * @param scene\n * @param name\n * @param value\n */\n SceneUtilitiesExtended.getTransformedValue = function (scene, name, value) {\n var sceneChildProp = SceneChildUtilitiesData[name];\n if (SceneUtilitiesExtended.bPropInSceneChildUtilitiesData(name) &&\n SceneUtilitiesExtended.bValueTransformable(value)) {\n value = value.value;\n var sceneX = name === 'distance' ? scene.height : scene.width;\n var sceneY = name === 'distance' ? scene.width : scene.height;\n switch (sceneChildProp.transformation) {\n case 'angle':\n if (Array.isArray(value)) {\n return [toRadians(value[0]), toRadians(value[1])];\n }\n return toRadians(value);\n case 'scene-size-percentage': {\n if (typeof scene !== 'undefined') {\n if (Array.isArray(value)) {\n return [(value[0] * sceneX) / 100, (value[1] * sceneY) / 100];\n }\n return (value * (scene.center[0] + scene.center[1])) / 100;\n }\n break;\n }\n case 'scene-size-percentage-inverse': {\n if (typeof scene !== 'undefined') {\n if (Array.isArray(value)) {\n return [(value[0] * 100) / sceneX, (value[1] * 100) / sceneY];\n }\n return (value * 100) / (scene.center[0] + scene.center[1]);\n }\n break;\n }\n }\n }\n return value;\n };\n /**\n * Transform value inverse\n * @param scene\n * @param name\n * @param value\n */\n SceneUtilitiesExtended.getTransformedValueInverse = function (scene, name, value) {\n var sceneChildProp = SceneChildUtilitiesData[name];\n if (SceneUtilitiesExtended.bPropInSceneChildUtilitiesData(name) &&\n SceneUtilitiesExtended.bValueTransformable(value)) {\n value = value.value;\n var sceneX = name === 'distance' ? scene.height : scene.width;\n var sceneY = name === 'distance' ? scene.width : scene.height;\n switch (sceneChildProp.transformation) {\n case 'angle': {\n if (Array.isArray(value)) {\n return [toDegrees(value[0]), toDegrees(value[1])];\n }\n return toDegrees(value);\n }\n case 'scene-size-percentage': {\n if (typeof scene !== 'undefined') {\n if (Array.isArray(value)) {\n return [(value[0] * 100) / sceneX, (value[1] * 100) / sceneY];\n }\n return (value * 100) / (scene.center[0] + scene.center[1]);\n }\n break;\n }\n case 'scene-size-percentage-inverse': {\n if (typeof scene !== 'undefined') {\n if (Array.isArray(value)) {\n return [(value[0] * sceneX) / 100, (value[1] * sceneY) / 100];\n }\n return (value * (scene.center[0] + scene.center[1])) / 100;\n }\n break;\n }\n }\n }\n return value;\n };\n SceneUtilitiesExtended.RAW_ARGUMENTS = '{ repetition, recursion, shape }';\n SceneUtilitiesExtended.RAW_ARGUMENTS_WITH_PARENT = '{ repetition, recursion, shape, parent }';\n return SceneUtilitiesExtended;\n}());\nexport default SceneUtilitiesExtended;\n//# sourceMappingURL=SceneUtilitiesExtended.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { pmod } from \"../../core/math\";\nimport Emitter from \"../events/Emitter\";\nimport { now } from \"../../Utilites\";\n/**\n * Is used for sequence time management.\n * It is necessary to set the duration and the number of frames per second (frame rate).\n *\n * @category Services.Timeline\n * @class Timeline\n * @extends {Emitter}\n */\nvar Timeline = /** @class */ (function (_super) {\n __extends(Timeline, _super);\n function Timeline(duration, framerate) {\n if (duration === void 0) { duration = 60000; }\n if (framerate === void 0) { framerate = 60; }\n var _this = _super.call(this) || this;\n _this.fps_samples_size = 30;\n _this.fps_samples = [];\n _this.fps_samples_index = 0;\n _this.paused_time = 0;\n _this.sequence = {\n duration: duration,\n framerate: framerate,\n frames: Math.round((duration / 1000) * framerate),\n };\n _this.tick_time = 1000 / _this.sequence.framerate;\n _this.fps = _this.sequence.framerate;\n _this.b_sequence_started = false;\n _this.current_frame = 0;\n _this.current_time = 0;\n _this.last_tick = 0;\n _this.start_time = 0;\n return _this;\n }\n //#region sequence meta\n /**\n * Return the sequence\n *\n * @returns {Sequence}\n */\n Timeline.prototype.getSequence = function () {\n return __assign({}, this.sequence);\n };\n /**\n * Set Sequence\n *\n * @param {number} duration\n * @param {number} framerate\n */\n Timeline.prototype.setSequence = function (duration, framerate) {\n this.sequence.duration = duration;\n this.sequence.framerate = framerate;\n this.tick_time = 1000 / this.sequence.framerate;\n this.sequence.frames = Math.round((this.sequence.duration / 1000) * this.sequence.framerate);\n this.dispatch('timeline:update_sequence', this.getSequence());\n };\n /**\n * Set duration of timeline\n *\n * @param {number} framerate\n */\n Timeline.prototype.setDuration = function (duration) {\n this.setSequence(duration, this.sequence.framerate);\n };\n /**\n * Get timeline duration\n *\n * @returns {number}\n */\n Timeline.prototype.getDuration = function () {\n return this.sequence.duration;\n };\n /**\n * Return framerate\n *\n * @returns {number}\n */\n Timeline.prototype.getFramerate = function () {\n return this.sequence.framerate;\n };\n /**\n * Set a framerate\n *\n * @param {number} framerate\n */\n Timeline.prototype.setFramerate = function (framerate) {\n this.setSequence(this.sequence.duration, framerate);\n };\n /**\n * Get number of frames based on duration and framerate\n *\n * @returns {number}\n */\n Timeline.prototype.getFramesCount = function () {\n return this.sequence.frames;\n };\n //#endregion meta\n //#region change status\n Timeline.prototype.bSequenceStarted = function () {\n return this.b_sequence_started;\n };\n /**\n * Start the sequence\n *\n */\n Timeline.prototype.start = function () {\n if (!this.b_sequence_started) {\n this.b_sequence_started = true;\n this.start_time = this.paused_time;\n this.dispatch('timeline:change_status', Timeline.START);\n }\n };\n /**\n * Pause the sequence\n *\n */\n Timeline.prototype.pause = function () {\n if (this.b_sequence_started) {\n this.paused_time = now();\n this.b_sequence_started = false;\n this.dispatch('timeline:change_status', Timeline.PAUSE);\n }\n };\n /**\n * Stop the sequence and reset\n *\n */\n Timeline.prototype.stop = function () {\n if (this.b_sequence_started) {\n this.b_sequence_started = false;\n this.current_time = 0;\n this.current_frame = 0;\n this.start_time = 0;\n this.paused_time = 0;\n this.dispatch('timeline:change_status', Timeline.STOP);\n }\n };\n /**\n * Animation tick\n *\n * @param {number} timestamp current timestamp\n * @returns {boolean}\n */\n Timeline.prototype.tick = function (timestamp) {\n if (this.b_sequence_started) {\n if (!this.start_time) {\n this.start_time = timestamp;\n this.last_tick = -this.tick_time;\n }\n var currentTime = timestamp - this.start_time;\n var elapsed = currentTime - this.last_tick;\n if (elapsed >= this.tick_time) {\n this.calculateFPS(1 / (elapsed / 1000));\n this.last_tick = currentTime;\n this.current_time = (currentTime - (elapsed % this.tick_time)) % this.sequence.duration;\n this.current_frame = this.getFrameAtTime(this.current_time);\n this.dispatch('timeline:progress', {\n current_frame: this.current_frame,\n current_time: this.current_time,\n fps: this.fps,\n });\n return true;\n }\n }\n return false;\n };\n /**\n * Calculate fps\n *\n * @private\n * @param {number} currentFPS\n */\n Timeline.prototype.calculateFPS = function (currentFPS) {\n var samples = this.fps_samples.length;\n if (samples > 0) {\n var average = 0;\n for (var i = 0; i < samples; i++)\n average += this.fps_samples[i];\n this.fps = Math.round(average / samples);\n }\n this.fps_samples[this.fps_samples_index] = Math.round(currentFPS);\n this.fps_samples_index = (this.fps_samples_index + 1) % this.fps_samples_size;\n };\n //#endregion\n //#region Frame and Time\n /**\n * Return current animation frame\n *\n * @returns {number}\n */\n Timeline.prototype.getCurrentFrame = function () {\n return this.current_frame;\n };\n /**\n * get the time at specific frame number\n *\n * @param {number} frame\n * @returns {number}\n */\n Timeline.prototype.getFrameTime = function (frame) {\n frame = pmod(frame, this.sequence.frames);\n return (frame * this.tick_time) % this.sequence.duration;\n };\n /**\n * Return frame number at time\n *\n * @param {number} time\n * @returns {number}\n */\n Timeline.prototype.getFrameAtTime = function (time) {\n return Math.round((time % this.sequence.duration) / this.tick_time);\n };\n /**\n * set current frame\n *\n * @param {number} frame\n */\n Timeline.prototype.setFrame = function (frame) {\n this.current_frame = pmod(frame, this.sequence.frames);\n this.current_time = this.getFrameTime(this.current_frame);\n this.dispatch('timeline:progress', {\n current_frame: this.current_frame,\n current_time: this.current_time,\n fps: this.fps,\n });\n };\n /**\n * Return tick time (based on framerate)\n *\n * @returns {number}\n */\n Timeline.prototype.getTickTime = function () {\n return this.tick_time;\n };\n /**\n * Return the current time\n *\n * @returns {number}\n */\n Timeline.prototype.getTime = function () {\n return this.current_time;\n };\n /**\n * Set animation at time\n *\n * @param {number} time\n */\n Timeline.prototype.setTime = function (time) {\n time = pmod(time, this.sequence.duration);\n this.current_time = time;\n this.current_frame = this.getFrameAtTime(time);\n this.dispatch('timeline:progress', {\n current_frame: this.current_frame,\n current_time: this.current_time,\n fps: this.fps,\n });\n };\n /**\n * Animation status started\n * @internal\n */\n Timeline.START = 'start';\n /**\n * Animation status paused\n * @internal\n */\n Timeline.PAUSE = 'pause';\n /**\n * Animation status stop\n * @internal\n */\n Timeline.STOP = 'stop';\n return Timeline;\n}(Emitter));\nexport default Timeline;\n//# sourceMappingURL=Timeline.js.map","/**\r\n * Common utilities\r\n * @module glMatrix\r\n */\n// Configuration Constants\nexport var EPSILON = 0.000001;\nexport var ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;\nexport var RANDOM = Math.random;\n/**\r\n * Sets the type of array used when creating new vectors and matrices\r\n *\r\n * @param {Float32ArrayConstructor | ArrayConstructor} type Array type, such as Float32Array or Array\r\n */\n\nexport function setMatrixArrayType(type) {\n ARRAY_TYPE = type;\n}\nvar degree = Math.PI / 180;\n/**\r\n * Convert Degree To Radian\r\n *\r\n * @param {Number} a Angle in Degrees\r\n */\n\nexport function toRadian(a) {\n return a * degree;\n}\n/**\r\n * Tests whether or not the arguments have approximately the same value, within an absolute\r\n * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less\r\n * than or equal to 1.0, and a relative tolerance is used for larger values)\r\n *\r\n * @param {Number} a The first number to test.\r\n * @param {Number} b The second number to test.\r\n * @returns {Boolean} True if the numbers are approximately equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));\n}\nif (!Math.hypot) Math.hypot = function () {\n var y = 0,\n i = arguments.length;\n\n while (i--) {\n y += arguments[i] * arguments[i];\n }\n\n return Math.sqrt(y);\n};","import * as glMatrix from \"./common.js\";\n/**\r\n * 4x4 Matrix
Format: column-major, when typed out it looks like row-major
The matrices are being post multiplied.\r\n * @module mat4\r\n */\n\n/**\r\n * Creates a new identity mat4\r\n *\r\n * @returns {mat4} a new 4x4 matrix\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(16);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n }\n\n out[0] = 1;\n out[5] = 1;\n out[10] = 1;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a new mat4 initialized with values from an existing matrix\r\n *\r\n * @param {ReadonlyMat4} a matrix to clone\r\n * @returns {mat4} a new 4x4 matrix\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Copy the values from one mat4 to another\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Create a new mat4 with the given values\r\n *\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\r\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\r\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\r\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\r\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\r\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\r\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\r\n * @returns {mat4} A new mat4\r\n */\n\nexport function fromValues(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n/**\r\n * Set the components of a mat4 to the given values\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\r\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\r\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\r\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\r\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\r\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\r\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\r\n * @returns {mat4} out\r\n */\n\nexport function set(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n/**\r\n * Set a mat4 to the identity matrix\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @returns {mat4} out\r\n */\n\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Transpose the values of a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a12 = a[6],\n a13 = a[7];\n var a23 = a[11];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a01;\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a02;\n out[9] = a12;\n out[11] = a[14];\n out[12] = a03;\n out[13] = a13;\n out[14] = a23;\n } else {\n out[0] = a[0];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a[1];\n out[5] = a[5];\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a[2];\n out[9] = a[6];\n out[10] = a[10];\n out[11] = a[14];\n out[12] = a[3];\n out[13] = a[7];\n out[14] = a[11];\n out[15] = a[15];\n }\n\n return out;\n}\n/**\r\n * Inverts a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n return out;\n}\n/**\r\n * Calculates the adjugate of a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function adjoint(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n out[0] = a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22);\n out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n out[2] = a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12);\n out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n out[5] = a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22);\n out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n out[7] = a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12);\n out[8] = a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21);\n out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n out[10] = a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11);\n out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n out[13] = a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21);\n out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n out[15] = a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11);\n return out;\n}\n/**\r\n * Calculates the determinant of a mat4\r\n *\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {Number} determinant of a\r\n */\n\nexport function determinant(a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n}\n/**\r\n * Multiplies two mat4s\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function multiply(out, a, b) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15]; // Cache only the current line of the second matrix\n\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[4];\n b1 = b[5];\n b2 = b[6];\n b3 = b[7];\n out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[8];\n b1 = b[9];\n b2 = b[10];\n b3 = b[11];\n out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[12];\n b1 = b[13];\n b2 = b[14];\n b3 = b[15];\n out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n return out;\n}\n/**\r\n * Translate a mat4 by the given vector\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to translate\r\n * @param {ReadonlyVec3} v vector to translate by\r\n * @returns {mat4} out\r\n */\n\nexport function translate(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n } else {\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a03;\n out[4] = a10;\n out[5] = a11;\n out[6] = a12;\n out[7] = a13;\n out[8] = a20;\n out[9] = a21;\n out[10] = a22;\n out[11] = a23;\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n\n return out;\n}\n/**\r\n * Scales the mat4 by the dimensions in the given vec3 not using vectorization\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to scale\r\n * @param {ReadonlyVec3} v the vec3 to scale the matrix by\r\n * @returns {mat4} out\r\n **/\n\nexport function scale(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n out[0] = a[0] * x;\n out[1] = a[1] * x;\n out[2] = a[2] * x;\n out[3] = a[3] * x;\n out[4] = a[4] * y;\n out[5] = a[5] * y;\n out[6] = a[6] * y;\n out[7] = a[7] * y;\n out[8] = a[8] * z;\n out[9] = a[9] * z;\n out[10] = a[10] * z;\n out[11] = a[11] * z;\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Rotates a mat4 by the given angle around the given axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @param {ReadonlyVec3} axis the axis to rotate around\r\n * @returns {mat4} out\r\n */\n\nexport function rotate(out, a, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n var b00, b01, b02;\n var b10, b11, b12;\n var b20, b21, b22;\n\n if (len < glMatrix.EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c;\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11]; // Construct the elements of the rotation matrix\n\n b00 = x * x * t + c;\n b01 = y * x * t + z * s;\n b02 = z * x * t - y * s;\n b10 = x * y * t - z * s;\n b11 = y * y * t + c;\n b12 = z * y * t + x * s;\n b20 = x * z * t + y * s;\n b21 = y * z * t - x * s;\n b22 = z * z * t + c; // Perform rotation-specific matrix multiplication\n\n out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the X axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateX(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[4] = a10 * c + a20 * s;\n out[5] = a11 * c + a21 * s;\n out[6] = a12 * c + a22 * s;\n out[7] = a13 * c + a23 * s;\n out[8] = a20 * c - a10 * s;\n out[9] = a21 * c - a11 * s;\n out[10] = a22 * c - a12 * s;\n out[11] = a23 * c - a13 * s;\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the Y axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateY(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[0] = a00 * c - a20 * s;\n out[1] = a01 * c - a21 * s;\n out[2] = a02 * c - a22 * s;\n out[3] = a03 * c - a23 * s;\n out[8] = a00 * s + a20 * c;\n out[9] = a01 * s + a21 * c;\n out[10] = a02 * s + a22 * c;\n out[11] = a03 * s + a23 * c;\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the Z axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateZ(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[0] = a00 * c + a10 * s;\n out[1] = a01 * c + a11 * s;\n out[2] = a02 * c + a12 * s;\n out[3] = a03 * c + a13 * s;\n out[4] = a10 * c - a00 * s;\n out[5] = a11 * c - a01 * s;\n out[6] = a12 * c - a02 * s;\n out[7] = a13 * c - a03 * s;\n return out;\n}\n/**\r\n * Creates a matrix from a vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, dest, vec);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a vector scaling\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.scale(dest, dest, vec);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {ReadonlyVec3} v Scaling vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = v[1];\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = v[2];\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a given angle around a given axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotate(dest, dest, rad, axis);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @param {ReadonlyVec3} axis the axis to rotate around\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotation(out, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n\n if (len < glMatrix.EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c; // Perform rotation-specific matrix multiplication\n\n out[0] = x * x * t + c;\n out[1] = y * x * t + z * s;\n out[2] = z * x * t - y * s;\n out[3] = 0;\n out[4] = x * y * t - z * s;\n out[5] = y * y * t + c;\n out[6] = z * y * t + x * s;\n out[7] = 0;\n out[8] = x * z * t + y * s;\n out[9] = y * z * t - x * s;\n out[10] = z * z * t + c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the X axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateX(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromXRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = c;\n out[6] = s;\n out[7] = 0;\n out[8] = 0;\n out[9] = -s;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the Y axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateY(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromYRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = c;\n out[1] = 0;\n out[2] = -s;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = s;\n out[9] = 0;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the Z axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateZ(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromZRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = 0;\n out[4] = -s;\n out[5] = c;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation and vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslation(out, q, v) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a new mat4 from a dual quat.\r\n *\r\n * @param {mat4} out Matrix\r\n * @param {ReadonlyQuat2} a Dual Quaternion\r\n * @returns {mat4} mat4 receiving operation result\r\n */\n\nexport function fromQuat2(out, a) {\n var translation = new glMatrix.ARRAY_TYPE(3);\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7];\n var magnitude = bx * bx + by * by + bz * bz + bw * bw; //Only scale if it makes sense\n\n if (magnitude > 0) {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2 / magnitude;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2 / magnitude;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2 / magnitude;\n } else {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n }\n\n fromRotationTranslation(out, a, translation);\n return out;\n}\n/**\r\n * Returns the translation vector component of a transformation\r\n * matrix. If a matrix is built with fromRotationTranslation,\r\n * the returned vector will be the same as the translation vector\r\n * originally supplied.\r\n * @param {vec3} out Vector to receive translation component\r\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\r\n * @return {vec3} out\r\n */\n\nexport function getTranslation(out, mat) {\n out[0] = mat[12];\n out[1] = mat[13];\n out[2] = mat[14];\n return out;\n}\n/**\r\n * Returns the scaling factor component of a transformation\r\n * matrix. If a matrix is built with fromRotationTranslationScale\r\n * with a normalized Quaternion paramter, the returned vector will be\r\n * the same as the scaling vector\r\n * originally supplied.\r\n * @param {vec3} out Vector to receive scaling factor component\r\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\r\n * @return {vec3} out\r\n */\n\nexport function getScaling(out, mat) {\n var m11 = mat[0];\n var m12 = mat[1];\n var m13 = mat[2];\n var m21 = mat[4];\n var m22 = mat[5];\n var m23 = mat[6];\n var m31 = mat[8];\n var m32 = mat[9];\n var m33 = mat[10];\n out[0] = Math.hypot(m11, m12, m13);\n out[1] = Math.hypot(m21, m22, m23);\n out[2] = Math.hypot(m31, m32, m33);\n return out;\n}\n/**\r\n * Returns a quaternion representing the rotational component\r\n * of a transformation matrix. If a matrix is built with\r\n * fromRotationTranslation, the returned quaternion will be the\r\n * same as the quaternion originally supplied.\r\n * @param {quat} out Quaternion to receive the rotation component\r\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\r\n * @return {quat} out\r\n */\n\nexport function getRotation(out, mat) {\n var scaling = new glMatrix.ARRAY_TYPE(3);\n getScaling(scaling, mat);\n var is1 = 1 / scaling[0];\n var is2 = 1 / scaling[1];\n var is3 = 1 / scaling[2];\n var sm11 = mat[0] * is1;\n var sm12 = mat[1] * is2;\n var sm13 = mat[2] * is3;\n var sm21 = mat[4] * is1;\n var sm22 = mat[5] * is2;\n var sm23 = mat[6] * is3;\n var sm31 = mat[8] * is1;\n var sm32 = mat[9] * is2;\n var sm33 = mat[10] * is3;\n var trace = sm11 + sm22 + sm33;\n var S = 0;\n\n if (trace > 0) {\n S = Math.sqrt(trace + 1.0) * 2;\n out[3] = 0.25 * S;\n out[0] = (sm23 - sm32) / S;\n out[1] = (sm31 - sm13) / S;\n out[2] = (sm12 - sm21) / S;\n } else if (sm11 > sm22 && sm11 > sm33) {\n S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;\n out[3] = (sm23 - sm32) / S;\n out[0] = 0.25 * S;\n out[1] = (sm12 + sm21) / S;\n out[2] = (sm31 + sm13) / S;\n } else if (sm22 > sm33) {\n S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;\n out[3] = (sm31 - sm13) / S;\n out[0] = (sm12 + sm21) / S;\n out[1] = 0.25 * S;\n out[2] = (sm23 + sm32) / S;\n } else {\n S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;\n out[3] = (sm12 - sm21) / S;\n out[0] = (sm31 + sm13) / S;\n out[1] = (sm23 + sm32) / S;\n out[2] = 0.25 * S;\n }\n\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation, vector translation and vector scale\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n * mat4.scale(dest, scale)\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @param {ReadonlyVec3} s Scaling vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslationScale(out, q, v, s) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n out[0] = (1 - (yy + zz)) * sx;\n out[1] = (xy + wz) * sx;\n out[2] = (xz - wy) * sx;\n out[3] = 0;\n out[4] = (xy - wz) * sy;\n out[5] = (1 - (xx + zz)) * sy;\n out[6] = (yz + wx) * sy;\n out[7] = 0;\n out[8] = (xz + wy) * sz;\n out[9] = (yz - wx) * sz;\n out[10] = (1 - (xx + yy)) * sz;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * mat4.translate(dest, origin);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n * mat4.scale(dest, scale)\r\n * mat4.translate(dest, negativeOrigin);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @param {ReadonlyVec3} s Scaling vector\r\n * @param {ReadonlyVec3} o The origin vector around which to scale and rotate\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslationScaleOrigin(out, q, v, s, o) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n var ox = o[0];\n var oy = o[1];\n var oz = o[2];\n var out0 = (1 - (yy + zz)) * sx;\n var out1 = (xy + wz) * sx;\n var out2 = (xz - wy) * sx;\n var out4 = (xy - wz) * sy;\n var out5 = (1 - (xx + zz)) * sy;\n var out6 = (yz + wx) * sy;\n var out8 = (xz + wy) * sz;\n var out9 = (yz - wx) * sz;\n var out10 = (1 - (xx + yy)) * sz;\n out[0] = out0;\n out[1] = out1;\n out[2] = out2;\n out[3] = 0;\n out[4] = out4;\n out[5] = out5;\n out[6] = out6;\n out[7] = 0;\n out[8] = out8;\n out[9] = out9;\n out[10] = out10;\n out[11] = 0;\n out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz);\n out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz);\n out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz);\n out[15] = 1;\n return out;\n}\n/**\r\n * Calculates a 4x4 matrix from the given quaternion\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {ReadonlyQuat} q Quaternion to create matrix from\r\n *\r\n * @returns {mat4} out\r\n */\n\nexport function fromQuat(out, q) {\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[1] = yx + wz;\n out[2] = zx - wy;\n out[3] = 0;\n out[4] = yx - wz;\n out[5] = 1 - xx - zz;\n out[6] = zy + wx;\n out[7] = 0;\n out[8] = zx + wy;\n out[9] = zy - wx;\n out[10] = 1 - xx - yy;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a frustum matrix with the given bounds\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {Number} left Left bound of the frustum\r\n * @param {Number} right Right bound of the frustum\r\n * @param {Number} bottom Bottom bound of the frustum\r\n * @param {Number} top Top bound of the frustum\r\n * @param {Number} near Near bound of the frustum\r\n * @param {Number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function frustum(out, left, right, bottom, top, near, far) {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n out[0] = near * 2 * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = near * 2 * tb;\n out[6] = 0;\n out[7] = 0;\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = far * near * 2 * nf;\n out[15] = 0;\n return out;\n}\n/**\r\n * Generates a perspective projection matrix with the given bounds.\r\n * Passing null/undefined/no value for far will generate infinite projection matrix.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {number} fovy Vertical field of view in radians\r\n * @param {number} aspect Aspect ratio. typically viewport width/height\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum, can be null or Infinity\r\n * @returns {mat4} out\r\n */\n\nexport function perspective(out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2),\n nf;\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[15] = 0;\n\n if (far != null && far !== Infinity) {\n nf = 1 / (near - far);\n out[10] = (far + near) * nf;\n out[14] = 2 * far * near * nf;\n } else {\n out[10] = -1;\n out[14] = -2 * near;\n }\n\n return out;\n}\n/**\r\n * Generates a perspective projection matrix with the given field of view.\r\n * This is primarily useful for generating projection matrices to be used\r\n * with the still experiemental WebVR API.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {Object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function perspectiveFromFieldOfView(out, fov, near, far) {\n var upTan = Math.tan(fov.upDegrees * Math.PI / 180.0);\n var downTan = Math.tan(fov.downDegrees * Math.PI / 180.0);\n var leftTan = Math.tan(fov.leftDegrees * Math.PI / 180.0);\n var rightTan = Math.tan(fov.rightDegrees * Math.PI / 180.0);\n var xScale = 2.0 / (leftTan + rightTan);\n var yScale = 2.0 / (upTan + downTan);\n out[0] = xScale;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n out[4] = 0.0;\n out[5] = yScale;\n out[6] = 0.0;\n out[7] = 0.0;\n out[8] = -((leftTan - rightTan) * xScale * 0.5);\n out[9] = (upTan - downTan) * yScale * 0.5;\n out[10] = far / (near - far);\n out[11] = -1.0;\n out[12] = 0.0;\n out[13] = 0.0;\n out[14] = far * near / (near - far);\n out[15] = 0.0;\n return out;\n}\n/**\r\n * Generates a orthogonal projection matrix with the given bounds\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {number} left Left bound of the frustum\r\n * @param {number} right Right bound of the frustum\r\n * @param {number} bottom Bottom bound of the frustum\r\n * @param {number} top Top bound of the frustum\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function ortho(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right);\n var bt = 1 / (bottom - top);\n var nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a look-at matrix with the given eye position, focal point, and up axis.\r\n * If you want a matrix that actually makes an object look at another object, you should use targetTo instead.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {ReadonlyVec3} eye Position of the viewer\r\n * @param {ReadonlyVec3} center Point the viewer is looking at\r\n * @param {ReadonlyVec3} up vec3 pointing up\r\n * @returns {mat4} out\r\n */\n\nexport function lookAt(out, eye, center, up) {\n var x0, x1, x2, y0, y1, y2, z0, z1, z2, len;\n var eyex = eye[0];\n var eyey = eye[1];\n var eyez = eye[2];\n var upx = up[0];\n var upy = up[1];\n var upz = up[2];\n var centerx = center[0];\n var centery = center[1];\n var centerz = center[2];\n\n if (Math.abs(eyex - centerx) < glMatrix.EPSILON && Math.abs(eyey - centery) < glMatrix.EPSILON && Math.abs(eyez - centerz) < glMatrix.EPSILON) {\n return identity(out);\n }\n\n z0 = eyex - centerx;\n z1 = eyey - centery;\n z2 = eyez - centerz;\n len = 1 / Math.hypot(z0, z1, z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n x0 = upy * z2 - upz * z1;\n x1 = upz * z0 - upx * z2;\n x2 = upx * z1 - upy * z0;\n len = Math.hypot(x0, x1, x2);\n\n if (!len) {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n } else {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n y0 = z1 * x2 - z2 * x1;\n y1 = z2 * x0 - z0 * x2;\n y2 = z0 * x1 - z1 * x0;\n len = Math.hypot(y0, y1, y2);\n\n if (!len) {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n } else {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a matrix that makes something look at something else.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {ReadonlyVec3} eye Position of the viewer\r\n * @param {ReadonlyVec3} center Point the viewer is looking at\r\n * @param {ReadonlyVec3} up vec3 pointing up\r\n * @returns {mat4} out\r\n */\n\nexport function targetTo(out, eye, target, up) {\n var eyex = eye[0],\n eyey = eye[1],\n eyez = eye[2],\n upx = up[0],\n upy = up[1],\n upz = up[2];\n var z0 = eyex - target[0],\n z1 = eyey - target[1],\n z2 = eyez - target[2];\n var len = z0 * z0 + z1 * z1 + z2 * z2;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n }\n\n var x0 = upy * z2 - upz * z1,\n x1 = upz * z0 - upx * z2,\n x2 = upx * z1 - upy * z0;\n len = x0 * x0 + x1 * x1 + x2 * x2;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n out[0] = x0;\n out[1] = x1;\n out[2] = x2;\n out[3] = 0;\n out[4] = z1 * x2 - z2 * x1;\n out[5] = z2 * x0 - z0 * x2;\n out[6] = z0 * x1 - z1 * x0;\n out[7] = 0;\n out[8] = z0;\n out[9] = z1;\n out[10] = z2;\n out[11] = 0;\n out[12] = eyex;\n out[13] = eyey;\n out[14] = eyez;\n out[15] = 1;\n return out;\n}\n/**\r\n * Returns a string representation of a mat4\r\n *\r\n * @param {ReadonlyMat4} a matrix to represent as a string\r\n * @returns {String} string representation of the matrix\r\n */\n\nexport function str(a) {\n return \"mat4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \", \" + a[9] + \", \" + a[10] + \", \" + a[11] + \", \" + a[12] + \", \" + a[13] + \", \" + a[14] + \", \" + a[15] + \")\";\n}\n/**\r\n * Returns Frobenius norm of a mat4\r\n *\r\n * @param {ReadonlyMat4} a the matrix to calculate Frobenius norm of\r\n * @returns {Number} Frobenius norm\r\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\n}\n/**\r\n * Adds two mat4's\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n out[9] = a[9] + b[9];\n out[10] = a[10] + b[10];\n out[11] = a[11] + b[11];\n out[12] = a[12] + b[12];\n out[13] = a[13] + b[13];\n out[14] = a[14] + b[14];\n out[15] = a[15] + b[15];\n return out;\n}\n/**\r\n * Subtracts matrix b from matrix a\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n out[9] = a[9] - b[9];\n out[10] = a[10] - b[10];\n out[11] = a[11] - b[11];\n out[12] = a[12] - b[12];\n out[13] = a[13] - b[13];\n out[14] = a[14] - b[14];\n out[15] = a[15] - b[15];\n return out;\n}\n/**\r\n * Multiply each element of the matrix by a scalar.\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to scale\r\n * @param {Number} b amount to scale the matrix's elements by\r\n * @returns {mat4} out\r\n */\n\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n out[9] = a[9] * b;\n out[10] = a[10] * b;\n out[11] = a[11] * b;\n out[12] = a[12] * b;\n out[13] = a[13] * b;\n out[14] = a[14] * b;\n out[15] = a[15] * b;\n return out;\n}\n/**\r\n * Adds two mat4's after multiplying each element of the second operand by a scalar value.\r\n *\r\n * @param {mat4} out the receiving vector\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @param {Number} scale the amount to scale b's elements by before adding\r\n * @returns {mat4} out\r\n */\n\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n out[9] = a[9] + b[9] * scale;\n out[10] = a[10] + b[10] * scale;\n out[11] = a[11] + b[11] * scale;\n out[12] = a[12] + b[12] * scale;\n out[13] = a[13] + b[13] * scale;\n out[14] = a[14] + b[14] * scale;\n out[15] = a[15] + b[15] * scale;\n return out;\n}\n/**\r\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyMat4} a The first matrix.\r\n * @param {ReadonlyMat4} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15];\n}\n/**\r\n * Returns whether or not the matrices have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyMat4} a The first matrix.\r\n * @param {ReadonlyMat4} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7];\n var a8 = a[8],\n a9 = a[9],\n a10 = a[10],\n a11 = a[11];\n var a12 = a[12],\n a13 = a[13],\n a14 = a[14],\n a15 = a[15];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n var b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7];\n var b8 = b[8],\n b9 = b[9],\n b10 = b[10],\n b11 = b[11];\n var b12 = b[12],\n b13 = b[13],\n b14 = b[14],\n b15 = b[15];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a15), Math.abs(b15));\n}\n/**\r\n * Alias for {@link mat4.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link mat4.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\n/**\r\n * 2 Dimensional Vector\r\n * @module vec2\r\n */\n\n/**\r\n * Creates a new, empty vec2\r\n *\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(2);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n }\n\n return out;\n}\n/**\r\n * Creates a new vec2 initialized with values from an existing vector\r\n *\r\n * @param {ReadonlyVec2} a vector to clone\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n/**\r\n * Creates a new vec2 initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function fromValues(x, y) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = x;\n out[1] = y;\n return out;\n}\n/**\r\n * Copy the values from one vec2 to another\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the source vector\r\n * @returns {vec2} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n/**\r\n * Set the components of a vec2 to the given values\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @returns {vec2} out\r\n */\n\nexport function set(out, x, y) {\n out[0] = x;\n out[1] = y;\n return out;\n}\n/**\r\n * Adds two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n return out;\n}\n/**\r\n * Subtracts vector b from vector a\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n return out;\n}\n/**\r\n * Multiplies two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n return out;\n}\n/**\r\n * Divides two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n return out;\n}\n/**\r\n * Math.ceil the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to ceil\r\n * @returns {vec2} out\r\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n return out;\n}\n/**\r\n * Math.floor the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to floor\r\n * @returns {vec2} out\r\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n return out;\n}\n/**\r\n * Returns the minimum of two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n return out;\n}\n/**\r\n * Returns the maximum of two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n return out;\n}\n/**\r\n * Math.round the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to round\r\n * @returns {vec2} out\r\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n return out;\n}\n/**\r\n * Scales a vec2 by a scalar number\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {vec2} out\r\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n return out;\n}\n/**\r\n * Adds two vec2's after scaling the second operand by a scalar value\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @param {Number} scale the amount to scale b by before adding\r\n * @returns {vec2} out\r\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n return out;\n}\n/**\r\n * Calculates the euclidian distance between two vec2's\r\n *\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {Number} distance between a and b\r\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return Math.hypot(x, y);\n}\n/**\r\n * Calculates the squared euclidian distance between two vec2's\r\n *\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {Number} squared distance between a and b\r\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return x * x + y * y;\n}\n/**\r\n * Calculates the length of a vec2\r\n *\r\n * @param {ReadonlyVec2} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport function length(a) {\n var x = a[0],\n y = a[1];\n return Math.hypot(x, y);\n}\n/**\r\n * Calculates the squared length of a vec2\r\n *\r\n * @param {ReadonlyVec2} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n */\n\nexport function squaredLength(a) {\n var x = a[0],\n y = a[1];\n return x * x + y * y;\n}\n/**\r\n * Negates the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to negate\r\n * @returns {vec2} out\r\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n return out;\n}\n/**\r\n * Returns the inverse of the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to invert\r\n * @returns {vec2} out\r\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n return out;\n}\n/**\r\n * Normalize a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to normalize\r\n * @returns {vec2} out\r\n */\n\nexport function normalize(out, a) {\n var x = a[0],\n y = a[1];\n var len = x * x + y * y;\n\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n return out;\n}\n/**\r\n * Calculates the dot product of two vec2's\r\n *\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {Number} dot product of a and b\r\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1];\n}\n/**\r\n * Computes the cross product of two vec2's\r\n * Note that the cross product must by definition produce a 3D vector\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function cross(out, a, b) {\n var z = a[0] * b[1] - a[1] * b[0];\n out[0] = out[1] = 0;\n out[2] = z;\n return out;\n}\n/**\r\n * Performs a linear interpolation between two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec2} out\r\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0],\n ay = a[1];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n return out;\n}\n/**\r\n * Generates a random vector with the given scale\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\r\n * @returns {vec2} out\r\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n out[0] = Math.cos(r) * scale;\n out[1] = Math.sin(r) * scale;\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to transform\r\n * @param {ReadonlyMat2} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat2(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat2d\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to transform\r\n * @param {ReadonlyMat2d} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat2d(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y + m[4];\n out[1] = m[1] * x + m[3] * y + m[5];\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat3\r\n * 3rd vector component is implicitly '1'\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to transform\r\n * @param {ReadonlyMat3} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat3(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[3] * y + m[6];\n out[1] = m[1] * x + m[4] * y + m[7];\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat4\r\n * 3rd vector component is implicitly '0'\r\n * 4th vector component is implicitly '1'\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to transform\r\n * @param {ReadonlyMat4} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0];\n var y = a[1];\n out[0] = m[0] * x + m[4] * y + m[12];\n out[1] = m[1] * x + m[5] * y + m[13];\n return out;\n}\n/**\r\n * Rotate a 2D vector\r\n * @param {vec2} out The receiving vec2\r\n * @param {ReadonlyVec2} a The vec2 point to rotate\r\n * @param {ReadonlyVec2} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec2} out\r\n */\n\nexport function rotate(out, a, b, rad) {\n //Translate point to the origin\n var p0 = a[0] - b[0],\n p1 = a[1] - b[1],\n sinC = Math.sin(rad),\n cosC = Math.cos(rad); //perform rotation and translate to correct position\n\n out[0] = p0 * cosC - p1 * sinC + b[0];\n out[1] = p0 * sinC + p1 * cosC + b[1];\n return out;\n}\n/**\r\n * Get the angle between two 2D vectors\r\n * @param {ReadonlyVec2} a The first operand\r\n * @param {ReadonlyVec2} b The second operand\r\n * @returns {Number} The angle in radians\r\n */\n\nexport function angle(a, b) {\n var x1 = a[0],\n y1 = a[1],\n x2 = b[0],\n y2 = b[1],\n // mag is the product of the magnitudes of a and b\n mag = Math.sqrt(x1 * x1 + y1 * y1) * Math.sqrt(x2 * x2 + y2 * y2),\n // mag &&.. short circuits if mag == 0\n cosine = mag && (x1 * x2 + y1 * y2) / mag; // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1\n\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n/**\r\n * Set the components of a vec2 to zero\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @returns {vec2} out\r\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n return out;\n}\n/**\r\n * Returns a string representation of a vector\r\n *\r\n * @param {ReadonlyVec2} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return \"vec2(\" + a[0] + \", \" + a[1] + \")\";\n}\n/**\r\n * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyVec2} a The first vector.\r\n * @param {ReadonlyVec2} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1];\n}\n/**\r\n * Returns whether or not the vectors have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyVec2} a The first vector.\r\n * @param {ReadonlyVec2} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1];\n var b0 = b[0],\n b1 = b[1];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1));\n}\n/**\r\n * Alias for {@link vec2.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Alias for {@link vec2.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;\n/**\r\n * Alias for {@link vec2.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link vec2.divide}\r\n * @function\r\n */\n\nexport var div = divide;\n/**\r\n * Alias for {@link vec2.distance}\r\n * @function\r\n */\n\nexport var dist = distance;\n/**\r\n * Alias for {@link vec2.squaredDistance}\r\n * @function\r\n */\n\nexport var sqrDist = squaredDistance;\n/**\r\n * Alias for {@link vec2.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Perform some operation over an array of vec2s.\r\n *\r\n * @param {Array} a the array of vectors to iterate over\r\n * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed\r\n * @param {Number} offset Number of elements to skip at the beginning of the array\r\n * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\r\n * @param {Function} fn Function to call for each vector in the array\r\n * @param {Object} [arg] additional argument to pass to fn\r\n * @returns {Array} a\r\n * @function\r\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 2;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n }\n\n return a;\n };\n}();","import * as glMatrix from \"./common.js\";\n/**\r\n * 3 Dimensional Vector\r\n * @module vec3\r\n */\n\n/**\r\n * Creates a new, empty vec3\r\n *\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(3);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n\n return out;\n}\n/**\r\n * Creates a new vec3 initialized with values from an existing vector\r\n *\r\n * @param {ReadonlyVec3} a vector to clone\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n/**\r\n * Calculates the length of a vec3\r\n *\r\n * @param {ReadonlyVec3} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return Math.hypot(x, y, z);\n}\n/**\r\n * Creates a new vec3 initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function fromValues(x, y, z) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n/**\r\n * Copy the values from one vec3 to another\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the source vector\r\n * @returns {vec3} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n/**\r\n * Set the components of a vec3 to the given values\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @returns {vec3} out\r\n */\n\nexport function set(out, x, y, z) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n/**\r\n * Adds two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n return out;\n}\n/**\r\n * Subtracts vector b from vector a\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n return out;\n}\n/**\r\n * Multiplies two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n return out;\n}\n/**\r\n * Divides two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n return out;\n}\n/**\r\n * Math.ceil the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to ceil\r\n * @returns {vec3} out\r\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n return out;\n}\n/**\r\n * Math.floor the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to floor\r\n * @returns {vec3} out\r\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n return out;\n}\n/**\r\n * Returns the minimum of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n return out;\n}\n/**\r\n * Returns the maximum of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n return out;\n}\n/**\r\n * Math.round the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to round\r\n * @returns {vec3} out\r\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n return out;\n}\n/**\r\n * Scales a vec3 by a scalar number\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {vec3} out\r\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n return out;\n}\n/**\r\n * Adds two vec3's after scaling the second operand by a scalar value\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {Number} scale the amount to scale b by before adding\r\n * @returns {vec3} out\r\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n return out;\n}\n/**\r\n * Calculates the euclidian distance between two vec3's\r\n *\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {Number} distance between a and b\r\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return Math.hypot(x, y, z);\n}\n/**\r\n * Calculates the squared euclidian distance between two vec3's\r\n *\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {Number} squared distance between a and b\r\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return x * x + y * y + z * z;\n}\n/**\r\n * Calculates the squared length of a vec3\r\n *\r\n * @param {ReadonlyVec3} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n */\n\nexport function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return x * x + y * y + z * z;\n}\n/**\r\n * Negates the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to negate\r\n * @returns {vec3} out\r\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n return out;\n}\n/**\r\n * Returns the inverse of the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to invert\r\n * @returns {vec3} out\r\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n return out;\n}\n/**\r\n * Normalize a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to normalize\r\n * @returns {vec3} out\r\n */\n\nexport function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var len = x * x + y * y + z * z;\n\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n return out;\n}\n/**\r\n * Calculates the dot product of two vec3's\r\n *\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {Number} dot product of a and b\r\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n/**\r\n * Computes the cross product of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function cross(out, a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2];\n var bx = b[0],\n by = b[1],\n bz = b[2];\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n}\n/**\r\n * Performs a linear interpolation between two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n return out;\n}\n/**\r\n * Performs a hermite interpolation with two control points\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {ReadonlyVec3} c the third operand\r\n * @param {ReadonlyVec3} d the fourth operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function hermite(out, a, b, c, d, t) {\n var factorTimes2 = t * t;\n var factor1 = factorTimes2 * (2 * t - 3) + 1;\n var factor2 = factorTimes2 * (t - 2) + t;\n var factor3 = factorTimes2 * (t - 1);\n var factor4 = factorTimes2 * (3 - 2 * t);\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n/**\r\n * Performs a bezier interpolation with two control points\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {ReadonlyVec3} c the third operand\r\n * @param {ReadonlyVec3} d the fourth operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function bezier(out, a, b, c, d, t) {\n var inverseFactor = 1 - t;\n var inverseFactorTimesTwo = inverseFactor * inverseFactor;\n var factorTimes2 = t * t;\n var factor1 = inverseFactorTimesTwo * inverseFactor;\n var factor2 = 3 * t * inverseFactorTimesTwo;\n var factor3 = 3 * factorTimes2 * inverseFactor;\n var factor4 = factorTimes2 * t;\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n/**\r\n * Generates a random vector with the given scale\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\r\n * @returns {vec3} out\r\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n var z = glMatrix.RANDOM() * 2.0 - 1.0;\n var zScale = Math.sqrt(1.0 - z * z) * scale;\n out[0] = Math.cos(r) * zScale;\n out[1] = Math.sin(r) * zScale;\n out[2] = z * scale;\n return out;\n}\n/**\r\n * Transforms the vec3 with a mat4.\r\n * 4th vector component is implicitly '1'\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to transform\r\n * @param {ReadonlyMat4} m matrix to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var w = m[3] * x + m[7] * y + m[11] * z + m[15];\n w = w || 1.0;\n out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n return out;\n}\n/**\r\n * Transforms the vec3 with a mat3.\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to transform\r\n * @param {ReadonlyMat3} m the 3x3 matrix to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformMat3(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n out[0] = x * m[0] + y * m[3] + z * m[6];\n out[1] = x * m[1] + y * m[4] + z * m[7];\n out[2] = x * m[2] + y * m[5] + z * m[8];\n return out;\n}\n/**\r\n * Transforms the vec3 with a quat\r\n * Can also be used for dual quaternions. (Multiply it with the real part)\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to transform\r\n * @param {ReadonlyQuat} q quaternion to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformQuat(out, a, q) {\n // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3];\n var x = a[0],\n y = a[1],\n z = a[2]; // var qvec = [qx, qy, qz];\n // var uv = vec3.cross([], qvec, a);\n\n var uvx = qy * z - qz * y,\n uvy = qz * x - qx * z,\n uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv);\n\n var uuvx = qy * uvz - qz * uvy,\n uuvy = qz * uvx - qx * uvz,\n uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w);\n\n var w2 = qw * 2;\n uvx *= w2;\n uvy *= w2;\n uvz *= w2; // vec3.scale(uuv, uuv, 2);\n\n uuvx *= 2;\n uuvy *= 2;\n uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv));\n\n out[0] = x + uvx + uuvx;\n out[1] = y + uvy + uuvy;\n out[2] = z + uvz + uuvz;\n return out;\n}\n/**\r\n * Rotate a 3D vector around the x-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {ReadonlyVec3} a The vec3 point to rotate\r\n * @param {ReadonlyVec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nexport function rotateX(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[0];\n r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);\n r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Rotate a 3D vector around the y-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {ReadonlyVec3} a The vec3 point to rotate\r\n * @param {ReadonlyVec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nexport function rotateY(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);\n r[1] = p[1];\n r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Rotate a 3D vector around the z-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {ReadonlyVec3} a The vec3 point to rotate\r\n * @param {ReadonlyVec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nexport function rotateZ(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);\n r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);\n r[2] = p[2]; //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Get the angle between two 3D vectors\r\n * @param {ReadonlyVec3} a The first operand\r\n * @param {ReadonlyVec3} b The second operand\r\n * @returns {Number} The angle in radians\r\n */\n\nexport function angle(a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n bx = b[0],\n by = b[1],\n bz = b[2],\n mag1 = Math.sqrt(ax * ax + ay * ay + az * az),\n mag2 = Math.sqrt(bx * bx + by * by + bz * bz),\n mag = mag1 * mag2,\n cosine = mag && dot(a, b) / mag;\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n/**\r\n * Set the components of a vec3 to zero\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @returns {vec3} out\r\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n return out;\n}\n/**\r\n * Returns a string representation of a vector\r\n *\r\n * @param {ReadonlyVec3} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return \"vec3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \")\";\n}\n/**\r\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyVec3} a The first vector.\r\n * @param {ReadonlyVec3} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];\n}\n/**\r\n * Returns whether or not the vectors have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyVec3} a The first vector.\r\n * @param {ReadonlyVec3} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2));\n}\n/**\r\n * Alias for {@link vec3.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;\n/**\r\n * Alias for {@link vec3.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link vec3.divide}\r\n * @function\r\n */\n\nexport var div = divide;\n/**\r\n * Alias for {@link vec3.distance}\r\n * @function\r\n */\n\nexport var dist = distance;\n/**\r\n * Alias for {@link vec3.squaredDistance}\r\n * @function\r\n */\n\nexport var sqrDist = squaredDistance;\n/**\r\n * Alias for {@link vec3.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Alias for {@link vec3.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Perform some operation over an array of vec3s.\r\n *\r\n * @param {Array} a the array of vectors to iterate over\r\n * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\r\n * @param {Number} offset Number of elements to skip at the beginning of the array\r\n * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\r\n * @param {Function} fn Function to call for each vector in the array\r\n * @param {Object} [arg] additional argument to pass to fn\r\n * @returns {Array} a\r\n * @function\r\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 3;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n }\n\n return a;\n };\n}();","'use strict';\nvar Mutation = global.MutationObserver || global.WebKitMutationObserver;\n\nvar scheduleDrain;\n\n{\n if (Mutation) {\n var called = 0;\n var observer = new Mutation(nextTick);\n var element = global.document.createTextNode('');\n observer.observe(element, {\n characterData: true\n });\n scheduleDrain = function () {\n element.data = (called = ++called % 2);\n };\n } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') {\n var channel = new global.MessageChannel();\n channel.port1.onmessage = nextTick;\n scheduleDrain = function () {\n channel.port2.postMessage(0);\n };\n } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) {\n scheduleDrain = function () {\n\n // Create a