pacem 0.50.0-delphi → 0.50.0-ebla

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/css/pacem-dark-content.min.css +1 -1
  2. package/dist/css/pacem-dark-shell.min.css +1 -1
  3. package/dist/css/pacem-dark.min.css +1 -1
  4. package/dist/css/pacem-light-content.min.css +1 -1
  5. package/dist/css/pacem-light-shell.min.css +1 -1
  6. package/dist/css/pacem-light.min.css +1 -1
  7. package/dist/css/pacem-phousys-content.min.css +1 -1
  8. package/dist/css/pacem-phousys-shell.min.css +1 -1
  9. package/dist/css/pacem-phousys.min.css +1 -1
  10. package/dist/js/azure-maps.d.ts +1 -1
  11. package/dist/js/pacem-2d.d.ts +1 -1
  12. package/dist/js/pacem-2d.js +1 -1
  13. package/dist/js/pacem-2d.min.js +1 -1
  14. package/dist/js/pacem-3d.d.ts +1 -1
  15. package/dist/js/pacem-3d.js +1 -1
  16. package/dist/js/pacem-3d.min.js +1 -1
  17. package/dist/js/pacem-charts.d.ts +1 -1
  18. package/dist/js/pacem-charts.js +1 -1
  19. package/dist/js/pacem-charts.min.js +1 -1
  20. package/dist/js/pacem-cms.d.ts +1 -1
  21. package/dist/js/pacem-cms.js +1 -1
  22. package/dist/js/pacem-cms.min.js +1 -1
  23. package/dist/js/pacem-core.d.ts +1 -1
  24. package/dist/js/pacem-core.js +1 -1
  25. package/dist/js/pacem-core.min.js +1 -1
  26. package/dist/js/pacem-foundation.d.ts +1 -1
  27. package/dist/js/pacem-foundation.js +1 -1
  28. package/dist/js/pacem-foundation.min.js +1 -1
  29. package/dist/js/pacem-fx.d.ts +1 -1
  30. package/dist/js/pacem-fx.js +1 -1
  31. package/dist/js/pacem-fx.min.js +1 -1
  32. package/dist/js/pacem-logging.d.ts +1 -1
  33. package/dist/js/pacem-logging.js +1 -1
  34. package/dist/js/pacem-logging.min.js +1 -1
  35. package/dist/js/pacem-maps.d.ts +1 -1
  36. package/dist/js/pacem-maps.js +1 -1
  37. package/dist/js/pacem-maps.min.js +1 -1
  38. package/dist/js/pacem-media.d.ts +1 -1
  39. package/dist/js/pacem-media.js +1 -1
  40. package/dist/js/pacem-media.min.js +1 -1
  41. package/dist/js/pacem-networking.js +1 -1
  42. package/dist/js/pacem-networking.min.js +1 -1
  43. package/dist/js/pacem-numerical.d.ts +2 -1
  44. package/dist/js/pacem-numerical.js +4 -1
  45. package/dist/js/pacem-numerical.min.js +2 -2
  46. package/dist/js/pacem-plus.d.ts +1 -1
  47. package/dist/js/pacem-plus.js +1 -1
  48. package/dist/js/pacem-plus.min.js +1 -1
  49. package/dist/js/pacem-scaffolding.d.ts +5 -5
  50. package/dist/js/pacem-scaffolding.js +11 -11
  51. package/dist/js/pacem-scaffolding.min.js +2 -2
  52. package/dist/js/pacem-ui.d.ts +1 -1
  53. package/dist/js/pacem-ui.js +1 -1
  54. package/dist/js/pacem-ui.min.js +1 -1
  55. package/dist/js/swagger-types.d.ts +1 -1
  56. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -99,6 +99,7 @@ declare namespace Pacem.Geometry.LinearAlgebra {
99
99
  class Matrix3D {
100
100
  static identity(): Matrix3D;
101
101
  static from(...args: number[]): Matrix3D;
102
+ static transpose(m: Matrix3D): Matrix3D;
102
103
  static toArray(m: Matrix3D): number[];
103
104
  static clone(m: Matrix3D): Matrix3D;
104
105
  static parse(input: string): Matrix3D;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -435,6 +435,9 @@ var Pacem;
435
435
  m44: args[15]
436
436
  };
437
437
  }
438
+ static transpose(m) {
439
+ return Matrix3D.from(m.m11, m.m21, m.m31, m.offsetX, m.m12, m.m22, m.m32, m.offsetY, m.m13, m.m23, m.m33, m.offsetZ, m.m14, m.m24, m.m34, m.m44);
440
+ }
438
441
  static toArray(m) {
439
442
  return [m.m11, m.m12, m.m13, m.m14,
440
443
  m.m21, m.m22, m.m23, m.m24,
@@ -1,6 +1,6 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
6
- var Pacem,__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(t,e,r,n,m){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!m)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!m:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?m.call(t,r):m?m.value=r:e.set(t,r),r},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(t,e,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)};!function(t){!function(e){!function(e){class Vector{static unit(t){const e={x:t.x,y:t.y};return this.normalize(e),e}static magSqr(t){return t.x*t.x+t.y*t.y}static mag(t){return Math.sqrt(Vector.magSqr(t))}static normalize(t){const e=Vector.mag(t);if(e<=0)throw"Cannot normalize a vector of length 0.";const r=1/e;t.x*=r,t.y*=r}static from(e,r){return t.Point.subtract(e,r)}static dot(t,e){return t.x*e.x+t.y*e.y}static cross(t,e){return t.x*e.y-t.y*e.x}}e.Vector=Vector}(e.LinearAlgebra||(e.LinearAlgebra={}))}(t.Geometry||(t.Geometry={}))}(Pacem||(Pacem={})),function(t){!function(e){const r=180/Math.PI,n=2*Math.PI,m=e.LinearAlgebra.Vector;function a(t){return null!=t&&"x"in t&&"number"==typeof t.x&&"y"in t&&"number"==typeof t.y}e.Utils=class Utils{static slopeRad(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}static slopeRad2(t,e){return(n+this.slopeRad(t,e))%n}static slopeDeg(t,e){return this.slopeRad(t,e)*r}static slopeDeg2(t,e){return(360+this.slopeDeg(t,e))%360}static intersect(t,e,...r){return Array.isArray(t)&&Array.isArray(e)?this._intersectSegments(t,e,!0):this._intersectRects.apply(this,arguments)}static intersectLines(t,e,r,n){let m,a;if(Array.isArray(t)&&Array.isArray(e)&&2===t.length&&2===e.length&&"number"==typeof t[0]&&"number"==typeof e[0]&&"number"==typeof t[1]&&"number"==typeof e[1]&&(r=e[0],n=e[1],e=t[1],t=t[0]),"number"==typeof t&&"number"==typeof e){m=[{x:0,y:e},{x:1,y:t+e}],a=[{x:0,y:n},{x:1,y:r+n}]}else m=t,a=e;return this._intersectSegments(m,a,!1)}static cramer(t,e){Array.isArray(t)&&(t={a:t[0],b:t[1],c:t[2]}),Array.isArray(e)&&(e={a:e[0],b:e[1],c:e[2]});let r=(t.b*e.c-t.c*e.b)/(t.b*e.a-t.a*e.b),n=(t.c*e.a-t.a*e.c)/(t.b*e.a-t.a*e.b);return{x:-r.roundoff(),y:-n.roundoff()}}static mq(t,e){let r;if(a(t)?r=t:(r=t[0],e=t[1]),r.x===e.x)return[Number.NaN,Number.NaN];const n=(e.y-r.y)/(e.x-r.x);return[n,r.y-n*r.x]}static _intersectSegments(t,e,r){const n=t[0],m=t[1],a=e[0],s=e[1],i=Math.min(n.x,m.x),o=Math.min(n.y,m.y),c=Math.max(n.x,m.x),f=c-i,u=Math.max(n.y,m.y),l=u-o,h=Math.min(a.x,s.x),y=Math.min(a.y,s.y),x=Math.max(a.x,s.x),p=x-h,g=Math.max(a.y,s.y),d=g-y;if(0===f&&0===p)return null;if(0===l&&0===d)return null;const M=t=>t.x<h||t.x>x||t.x<i||t.x>c,b=t=>t.y<y||t.y>g||t.y<o||t.y>u;var w=null;if(0===f){if(r&&(h>i||x<c))return null;const t=this.mq(a,s);w=this.cramer([1,0,-i],[t[0],-1,t[1]]),r&&b(w)&&(w=null)}else if(0===p){if(r&&(i>h||c<x))return null;const t=this.mq(n,m);w=this.cramer([t[0],-1,t[1]],[1,0,-h]),r&&b(w)&&(w=null)}else if(0===l){if(r&&(y>o||g<u))return null;const t=this.mq(a,s);w=this.cramer([0,1,-o],[t[0],-1,t[1]]),r&&M(w)&&(w=null)}else if(0===d){if(r&&(o>y||u<g))return null;const t=this.mq(n,m);w=this.cramer([t[0],-1,t[1]],[0,1,-y]),r&&M(w)&&(w=null)}else{let t;if(!r||(t=this._intersectRects({x:i,y:o,width:f,height:l},{x:h,y:y,width:p,height:d}))&&t.width>0&&t.height>0){const e=this.mq(n,m),i=this.mq(a,s),o=e[0],c=i[0],f=e[1],u=i[1];if(o!==c){let e=(w=this.cramer([o,-1,f],[c,-1,u])).x,n=w.y;r&&(e<t.x||e>t.x+t.width||n<t.y||n>t.y+t.height)&&(w=null)}}}return null===w?null:{x:w.x,y:w.y}}static _intersectRects(...e){return t.Rect.intersect.apply(this,e)}static dot(t,e){return m.dot(t,e)}static cross(t,e){return m.cross(t,e)}static distance(e,r){if(null!=(n=e)&&Array.isArray(n)&&2===n.length&&a(n[0])&&a(n[1]))return t.Point.distance(e[0],e[1]);if(a(r))return t.Point.distance(e,r);{const t=r[0],n=r[1];return Math.abs(t*e.x-e.y+n)/Math.sqrt(Math.pow(t,2)+1)}var n}static inLine(t,e){const r=m.from(e[0],t),n=m.from(t,e[1]);return this.cross(r,n).isCloseTo(0)}static inSegment(t,e){const r=Math.min(e[0].x,e[1].x),n=Math.max(e[0].x,e[1].x),m=Math.min(e[0].y,e[1].y),a=Math.max(e[0].y,e[1].y);return t.x>=r&&t.x<=n&&t.y>=m&&t.y<=a&&this.inLine(t,e)}static inTriangle(e,r){let n;for(let m=0;m<3;m++){const a=r[m],s=r[(m+1)%3],i=t.Point.subtract(s,e),o=t.Point.subtract(a,e),c=this.cross(i,o);if(m>0&&c*n<=0)return!1;n=c}return!0}static inPolygon(t,e){if(!((null==e?void 0:e.length)>=3))throw"Not enough vertices";const r=e.length;if(3===r)return this.inTriangle(t,[e[0],e[1],e[2]]);let n=Number.POSITIVE_INFINITY,m=Number.POSITIVE_INFINITY,a=0,s=0;for(let t=0;t<r;t++){const r=e[t];n=Math.min(n,r.x),m=Math.min(m,r.y),a=Math.max(a,r.x),s=Math.max(s,r.y)}if(t.x<n||t.x>a||t.y<m||t.y>s)return!1;const i=[{x:n-1,y:t.y},t];let o=0;for(let n=0;n<r;n++){const m=e[n],a=e[(n+1)%r],s=[m,a];if(m.y===t.y){const s=e[(n-1+r)%r];t.x>m.x&&(s.y-t.y)*(a.y-t.y)<0&&o++}else{if(a.y===t.y)continue;null!=this.intersect(s,i)&&o++}}return o%2==1}}}(t.Geometry||(t.Geometry={}))}(Pacem||(Pacem={})),function(t){!function(e){!function(e){const r=180/Math.PI,n=1/r;class Vector3D{static from(...t){if(3!==t.length)throw new RangeError("Must provide exactly 3 numbers");return{x:t[0],y:t[1],z:t[2]}}static parse(e){const r=t.parseAsNumericalArray(e);if(r&&3===r.length)return Vector3D.from.apply(null,r);throw new Error(`Cannot parse "${e}" as a valid Vector3D.`)}static i(){return{x:1,y:0,z:0}}static j(){return{x:0,y:1,z:0}}static k(){return{x:0,y:0,z:1}}static subtract(t,e){return{x:e.x-t.x,y:e.y-t.y,z:e.z-t.z}}static add(...t){var e={x:0,y:0,z:0};for(var r of t)e.x+=r.x,e.y+=r.y,e.z+=r.z;return e}static dot(t,e){return t.x*e.x+t.y*e.y+t.z*e.z}static cross(t,e){return{x:t.y*e.z-t.z*e.y,y:t.z*e.x-t.x*e.z,z:t.x*e.y-t.y*e.x}}static magSqr(t){return t.x*t.x+t.y*t.y+t.z*t.z}static mag(t){return Math.sqrt(Vector3D.magSqr(t))}static unit(t){const e={x:t.x,y:t.y,z:t.z};return this.normalize(e),e}static normalize(t){const e=Vector3D.mag(t);if(e<=0)throw"Cannot normalize a vector of length 0.";const r=1/e;t.x*=r,t.y*=r,t.z*=r}static angleBetween(t,e){let n;const m=Vector3D.unit(t),a=Vector3D.unit(e);if(Vector3D.dot(m,a)<0){const t={x:-m.x-a.x,y:-m.y-a.y,z:-m.z-a.z},e=Vector3D.mag(t);n=Math.PI-2*Math.asin(e/2)}else{const t={x:m.x-a.x,y:m.y-a.y,z:m.z-a.z},e=Vector3D.mag(t);n=2*Math.asin(e/2)}return r*n}}e.Vector3D=Vector3D;class Matrix3D{static identity(){return{m11:1,m12:0,m13:0,m14:0,m21:0,m22:1,m23:0,m24:0,m31:0,m32:0,m33:1,m34:0,offsetX:0,offsetY:0,offsetZ:0,m44:1}}static from(...t){if(16!==t.length)throw new RangeError("Must provide exactly 16 numbers");return{m11:t[0],m12:t[1],m13:t[2],m14:t[3],m21:t[4],m22:t[5],m23:t[6],m24:t[7],m31:t[8],m32:t[9],m33:t[10],m34:t[11],offsetX:t[12],offsetY:t[13],offsetZ:t[14],m44:t[15]}}static toArray(t){return[t.m11,t.m12,t.m13,t.m14,t.m21,t.m22,t.m23,t.m24,t.m31,t.m32,t.m33,t.m34,t.offsetX,t.offsetY,t.offsetZ,t.m44]}static clone(t){return Matrix3D.from.apply(null,Matrix3D.toArray(t))}static parse(e){const r=t.parseAsNumericalArray(e);if(r&&16===r.length)return Matrix3D.from.apply(null,r);throw new Error(`Cannot parse "${e}" as a valid Matrix3D.`)}static isIdentity(t){return 1==t.m11&&0==t.m12&&0==t.m13&&0==t.m14&&0==t.m21&&1==t.m22&&0==t.m23&&0==t.m24&&0==t.m31&&0==t.m32&&1==t.m33&&0==t.m34&&0==t.offsetX&&0==t.offsetY&&0==t.offsetZ&&1==t.m44}static isAffine(t){return 0==t.m14&&0==t.m24&&0==t.m34&&1==t.m44}static determinant(t){if(Matrix3D.isIdentity(t))return 1;if(Matrix3D.isAffine(t))return t.m11*(t.m22*t.m33-t.m32*t.m23)-t.m12*(t.m21*t.m33-t.m31*t.m23)+t.m13*(t.m21*t.m32-t.m31*t.m22);{const e=t.m13*t.m24-t.m23*t.m14,r=t.m13*t.m34-t.m33*t.m14,n=t.m13*t.m44-t.offsetZ*t.m14,m=t.m23*t.m34-t.m33*t.m24,a=t.m23*t.m44-t.offsetZ*t.m24,s=t.m33*t.m44-t.offsetZ*t.m34,i=t.m22*r-t.m32*e-t.m12*m,o=t.m12*a-t.m22*n+t.offsetY*e,c=t.m32*n-t.offsetY*r-t.m12*s,f=t.m22*s-t.m32*a+t.offsetY*m;return t.offsetX*i+t.m31*o+t.m21*c+t.m11*f}}static multiply(t,e){return Matrix3D.isIdentity(t)?e:Matrix3D.isIdentity(e)?t:Matrix3D.from(t.m11*e.m11+t.m12*e.m21+t.m13*e.m31+t.m14*e.offsetX,t.m11*e.m12+t.m12*e.m22+t.m13*e.m32+t.m14*e.offsetY,t.m11*e.m13+t.m12*e.m23+t.m13*e.m33+t.m14*e.offsetZ,t.m11*e.m14+t.m12*e.m24+t.m13*e.m34+t.m14*e.m44,t.m21*e.m11+t.m22*e.m21+t.m23*e.m31+t.m24*e.offsetX,t.m21*e.m12+t.m22*e.m22+t.m23*e.m32+t.m24*e.offsetY,t.m21*e.m13+t.m22*e.m23+t.m23*e.m33+t.m24*e.offsetZ,t.m21*e.m14+t.m22*e.m24+t.m23*e.m34+t.m24*e.m44,t.m31*e.m11+t.m32*e.m21+t.m33*e.m31+t.m34*e.offsetX,t.m31*e.m12+t.m32*e.m22+t.m33*e.m32+t.m34*e.offsetY,t.m31*e.m13+t.m32*e.m23+t.m33*e.m33+t.m34*e.offsetZ,t.m31*e.m14+t.m32*e.m24+t.m33*e.m34+t.m34*e.m44,t.offsetX*e.m11+t.offsetY*e.m21+t.offsetZ*e.m31+t.m44*e.offsetX,t.offsetX*e.m12+t.offsetY*e.m22+t.offsetZ*e.m32+t.m44*e.offsetY,t.offsetX*e.m13+t.offsetY*e.m23+t.offsetZ*e.m33+t.m44*e.offsetZ,t.offsetX*e.m14+t.offsetY*e.m24+t.offsetZ*e.m34+t.m44*e.m44)}static invert(t){if(Matrix3D.isAffine(t)){const e=t.m12*t.m23-t.m22*t.m13,r=t.m32*t.m13-t.m12*t.m33,n=t.m22*t.m33-t.m32*t.m23,m=Matrix3D.determinant(t);if(0==m)return null;const a=t.m21*t.m13-t.m11*t.m23,s=t.m11*t.m33-t.m31*t.m13,i=t.m31*t.m23-t.m21*t.m33,o=t.m11*t.m22-t.m21*t.m12,c=t.m11*t.m32-t.m31*t.m12,f=t.m11*t.offsetY-t.offsetX*t.m12,u=t.m21*t.m32-t.m31*t.m22,l=t.m21*t.offsetY-t.offsetX*t.m22,h=t.m31*t.offsetY-t.offsetX*t.m32,y=t.m23*f-t.offsetZ*o-t.m13*l,x=t.m13*h-t.m33*f+t.offsetZ*c,p=t.m33*l-t.offsetZ*u-t.m23*h,g=o,d=-c,M=u,b=1/m;return Matrix3D.from(n*b,r*b,e*b,0,i*b,s*b,a*b,0,M*b,d*b,g*b,0,p*b,x*b,y*b,1)}{const e=Matrix3D.determinant(t);if(0==e)return null;const r=t.m33*t.m44-t.m34*t.offsetZ,n=t.m32*t.m44-t.m34*t.offsetY,m=t.m31*t.m44-t.m34*t.offsetX,a=t.m32*t.offsetZ-t.m33*t.offsetY,s=t.m31*t.offsetZ-t.m33*t.offsetX,i=t.m31*t.offsetY-t.m32*t.offsetX,o=t.m33*t.m44-t.m34*t.offsetZ,c=t.m32*t.m44-t.m34*t.offsetY,f=t.m31*t.m44-t.m34*t.offsetX,u=t.m32*t.offsetZ-t.m33*t.offsetY,l=t.m31*t.offsetZ-t.m33*t.offsetX,h=t.m31*t.offsetY-t.m32*t.offsetX,y=t.m23*t.m44-t.m24*t.offsetZ,x=t.m22*t.m44-t.m24*t.offsetY,p=t.m21*t.m44-t.m24*t.offsetX,g=t.m22*t.offsetZ-t.m23*t.offsetY,d=t.m21*t.offsetZ-t.m23*t.offsetX,M=t.m21*t.offsetY-t.m22*t.offsetX,b=t.m23*t.m34-t.m24*t.m33,w=t.m22*t.m34-t.m24*t.m32,v=t.m21*t.m34-t.m24*t.m31,z=t.m22*t.m33-t.m23*t.m32,N=t.m21*t.m33-t.m23*t.m31,P=t.m21*t.m32-t.m22*t.m31,A=t.m22*r-t.m23*n+t.m24*a,D=-(t.m21*r-t.m23*m+t.m24*s),_=t.m21*n-t.m22*m+t.m24*i,C=-(t.m21*a-t.m22*s+t.m23*i),q=-(t.m12*o-t.m13*c+t.m14*u),Y=t.m11*o-t.m13*f+t.m14*l,I=-(t.m11*c-t.m12*f+t.m14*h),Z=t.m11*u-t.m12*l+t.m13*h,X=t.m12*y-t.m13*x+t.m14*g,S=-(t.m11*y-t.m13*p+t.m14*d),F=t.m11*x-t.m12*p+t.m14*M,V=-(t.m11*g-t.m12*d+t.m13*M),T=-(t.m12*b-t.m13*w+t.m14*z),E=t.m11*b-t.m13*v+t.m14*N,Q=-(t.m11*w-t.m12*v+t.m14*P),j=t.m11*z-t.m12*N+t.m13*P,G=1/e;return Matrix3D.from(A*G,q*G,X*G,T*G,D*G,Y*G,S*G,E*G,_*G,I*G,F*G,Q*G,C*G,Z*G,V*G,j*G)}}static transform(t,e){var r={x:t.x,y:t.y,z:t.z};if(!Matrix3D.isIdentity(e)){var n=r.x,m=r.y,a=r.z;if(r.x=n*e.m11+m*e.m21+a*e.m31+e.offsetX,r.y=n*e.m12+m*e.m22+a*e.m32+e.offsetY,r.z=n*e.m13+m*e.m23+a*e.m33+e.offsetZ,!Matrix3D.isAffine(e)){var s=n*e.m14+m*e.m24+a*e.m34+e.m44;0!=s&&(r.x/=s,r.y/=s,r.z/=s)}}return r}}e.Matrix3D=Matrix3D;class Quaternion{static from(...t){if(4!==t.length)throw new RangeError("Must provide exactly 4 numbers");return{x:t[0],y:t[1],z:t[2],w:t[3]}}static parse(e){const r=t.parseAsNumericalArray(e);if(r&&4===r.length)return Quaternion.from.apply(null,r);throw new Error(`Cannot parse "${e}" as a valid Quaternion.`)}static fromAxisAngle(t,e){var r=n*(e%=360),m=Vector3D.mag(t);if(0==m)throw new RangeError("Invalid argument");var a=Math.sin(.5*r)/m,s=t.x*a,i=t.y*a,o=t.z*a;return Quaternion.from(s,i,o,Math.cos(.5*r))}static fromRotationMatrix(t){const e=t.m11+t.m22+t.m33+t.m44;if(e>0){const r=.5/Math.sqrt(e),n=.25/r,m=(t.m23-t.m32)*r,a=(t.m31-t.m13)*r,s=(t.m12-t.m21)*r;return Quaternion.from(m,a,s,n)}if(t.m11>t.m22&&t.m11>t.m22){const e=.5/Math.sqrt(t.m44+t.m11-t.m22-t.m33),r=(t.m23-t.m32)*e,n=.25/e,m=(t.m12+t.m21)*e,a=(t.m31+t.m13)*e;return Quaternion.from(n,m,a,r)}if(t.m22>t.m33){const e=.5/Math.sqrt(t.m44+t.m22-t.m11-t.m33),r=(t.m23+t.m32)*e,n=.25/e,m=(t.m12+t.m21)*e,a=(t.m31-t.m13)*e;return Quaternion.from(m,n,r,a)}{const e=.5/Math.sqrt(t.m44+t.m33-t.m11-t.m22),r=(t.m23+t.m32)*e,n=.25/e,m=(t.m12-t.m21)*e,a=(t.m31-t.m13)*e;return Quaternion.from(a,r,n,m)}}static conjugate(t){return Quaternion.from(-t.x,-t.y,-t.z,t.w)}static norm(t){return t.x*t.x+t.y*t.y+t.z*t.z}static axis(t){return 0==t.x&&0==t.y&&0==t.z?Vector3D.j():Vector3D.unit(t)}static angle(t){let e=Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z),r=t.w;if(e>Number.MAX_VALUE){const n=Math.max(Math.abs(t.x),Math.max(Math.abs(t.y),Math.abs(t.z))),m=t.x/n,a=t.y/n,s=t.z/n;e=Math.sqrt(m*m+a*a+s*s),r/=n}return 114.59155902616465*Math.atan2(e,r)}static toRotationMatrix(t){var e=Matrix3D.identity(),r=t.x,n=t.y,m=t.z,a=t.w;return e.m11=1-2*n*n-2*m*m,e.m12=2*r*n+2*a*m,e.m13=2*r*m-2*a*n,e.m21=2*r*n-2*a*m,e.m22=1-2*r*r-2*m*m,e.m23=2*n*m+2*a*r,e.m31=2*a*n+2*r*m,e.m32=2*n*m-2*a*r,e.m33=1-2*r*r-2*n*n,e}static invert(t){const e=1/Quaternion.norm(t),r=Quaternion.conjugate(t);return r.x*=e,r.y*=e,r.z*=e,r.w*=e,r}static multiply(t,e){return Quaternion.from(t.w*e.x+t.x+e.w+t.y*e.z-t.z*e.y,t.w*e.y-t.x*e.z+t.y*e.w+t.z*e.x,t.w*e.z+t.x*e.y-t.y*e.x+t.z*e.w,t.w*e.w-t.x*e.x-t.y*e.y-t.z*e.z)}static dot(t,e){return Quaternion.multiply(t,Quaternion.conjugate(e)).w}}e.Quaternion=Quaternion}(e.LinearAlgebra||(e.LinearAlgebra={}))}(t.Geometry||(t.Geometry={}))}(Pacem||(Pacem={})),function(t){!function(t){function e(t){return"number"==typeof t&&(t={real:t,img:0}),t}var r;function n(t,e){const r={};return Object.defineProperty(r,"real",{value:t,writable:!1}),Object.defineProperty(r,"img",{value:e,writable:!1}),r}function m(){return r||(r=n(Number.NaN,Number.NaN))}t.Complex=class Complex{static build(t,e){return this.isComplex(t)?t:(null!=e||(e=0),"number"!=typeof t||"number"!=typeof e?m():n(t,e||0))}static add(t,r){const m=e(t),a=e(r);return n(m.real+a.real,m.img+a.img)}static subtract(t,r){const m=e(t),a=e(r);return n(m.real-a.real,m.img-a.img)}static multiply(t,r){const m=e(t),a=e(r);return n(m.real*a.real-m.img*a.img,m.real*a.img+m.img*a.real)}static divide(t,r){const a=e(t),s=e(r),i=this.absSquare(s).roundoff();if(0===i)return m();const o=1/i;return n(o*(a.real*s.real+a.img*s.img),o*(a.img*s.real-a.real*s.img))}static absSquare(t){const r=e(t);return Math.pow(r.real,2)+Math.pow(r.img,2)}static modulus(t){return Math.sqrt(this.absSquare(t))}static isComplex(t){return null!=t&&"object"==typeof t&&"real"in t&&"img"in t&&"number"==typeof t.real&&"number"==typeof t.img}static conjugate(t){return n((t=e(t)).real,0==Math.abs(t.img)?0:-t.img)}static equals(t,e){const r=this.build(t),n=this.build(e);return!(!this.isComplex(t)||!this.isComplex(e))&&(r.real===n.real&&r.img===n.img)}static get NaC(){return m()}}}(t.Mathematics||(t.Mathematics={}))}(Pacem||(Pacem={})),function(t){!function(t){!function(e){const r={};function n(e,n){const m=r[n]=r[n]||{};return m[e]=m[e]||function(e,r){const n=2*Math.PI*e/r;return t.Complex.build(Math.cos(n),Math.sin(n))}(e,n)}function m(e){const r=[],a=e.length;if(1===a)return[t.Complex.build(e[0])];const s=m(e.filter(((t,e)=>e%2==0))),i=m(e.filter(((t,e)=>e%2==1)));for(var o=0;o<a/2;o++){const e=s[o],m=t.Complex.multiply(n(o,a),i[o]);r[o]=t.Complex.add(e,m),r[o+a/2]=t.Complex.subtract(e,m)}return r}e.Fourier=class Fourier{static transform(t,e=!0){return(r=(t=t||[]).length)>0&&0==(r&r-1)?this.fft(t,e):this.dft(t,e);var r}static invert(t,e=!0){return this.idft(t||[],e)}static dft(e,r=!0){var m;const a=null===(m=e||[])||void 0===m?void 0:m.length,s=r?1/Math.sqrt(a):1,i=[];for(let r=0;r<a;r++){i.push({real:0,img:0});for(let m=0;m<a;m++){const o=n(r*m,a),c=t.Complex.multiply(e[m],o),f=t.Complex.multiply(c,s);i[r]=t.Complex.add(i[r],f)}}return i}static idft(e,r=!0){const n=e.map((e=>t.Complex.build(e.img,e.real)));return this.transform(n,r).map((e=>t.Complex.build(e.img,e.real)))}static fft(e,r=!0){const n=m(e);if(!r)return n;const a=1/Math.sqrt(e.length);return n.map((e=>t.Complex.multiply(e,a)))}}}(t.DataAnalysis||(t.DataAnalysis={}))}(t.Mathematics||(t.Mathematics={}))}(Pacem||(Pacem={})),function(t){!function(t){!function(t){const e=Math.sqrt(Math.PI);function r(t){let e,r,n;return r=Math.abs(t),e=1/(1+.5*r),n=e*Math.exp(-r*r-1.26551223+e*(1.00002368+e*(.37409196+e*(.09678418+e*(e*(.27886807+e*(e*(1.48851587+e*(.17087277*e-.82215223))-1.13520398))-.18628806))))),t>=0?n:2-n}class Gaussian{constructor(t,e){this.mean=t,this.stdev=Math.abs(e),this.variance=Math.pow(e,2)}static get normal(){return n}probabilityDensity(t){const r=this.stdev*Math.SQRT2*e;return Math.exp(-.5*Math.pow(this._z(t),2))/r}_z(t){return(t-this.mean)/this.stdev}probability(t){return.5*r(-this._z(t)/Math.SQRT2)}}t.Gaussian=Gaussian;const n=new Gaussian(0,1)}(t.DataAnalysis||(t.DataAnalysis={}))}(t.Mathematics||(t.Mathematics={}))}(Pacem||(Pacem={})),function(t){!function(t){!function(t){var e,r;class Lagrangian{constructor(...t){e.set(this,void 0),r.set(this,void 0),__classPrivateFieldSet(this,e,Array.from(t)||[],"f")}_unsafeCreate(){const t=__classPrivateFieldGet(this,e,"f")||[];let n,m="var ljs = [];\n";for(let e=0;e<t.length;e++){const r=t[e],a=r.x;if(null!=n&&n>=a)throw new Error("Invalid function provided.");n=a,m+=`ljs.push( ${r.y}`;for(let r=0;r<t.length;r++)if(r!==e){const e=t[r];m+=` * ((x - ${e.x})/${a-e.x})`}m+=");\n"}m+="return ljs.reduce((prev, next) => prev + next, 0);",__classPrivateFieldSet(this,r,new Function("x",m),"f")}_compute(t){const r=__classPrivateFieldGet(this,e,"f")||[];let n;const m=[];for(let e=0;e<r.length;e++){const a=r[e].x;if(null!=n&&n>=a)throw new Error("Invalid function provided.");n=a;let s=r[e].y;for(let n=0;n<r.length;n++)if(n!==e){const e=r[n];s*=(t-e.x)/(a-e.x)}m.push(s)}return m.reduce(((t,e)=>t+e),0)}interpolate(t){return"function"==typeof __classPrivateFieldGet(this,r,"f")?__classPrivateFieldGet(this,r,"f").apply(null,[t]):this._compute(t)}static create(...t){const e=(arguments.length>0&&Array.isArray(arguments[0])?arguments[0]:Array.from(t)).map(((t,e)=>"number"==typeof t?{x:e,y:t}:t)),r=new(Function.prototype.bind.apply(Lagrangian,[null].concat(e)));try{r._unsafeCreate()}catch(t){}return r}}e=new WeakMap,r=new WeakMap,t.Lagrangian=Lagrangian}(t.DataAnalysis||(t.DataAnalysis={}))}(t.Mathematics||(t.Mathematics={}))}(Pacem||(Pacem={})),function(t){!function(e){!function(e){const r="0123456789abcdefghijklmnopqrstuvwxyz",n="Radix out of range: possible values go between positive 1 exclusive and 36 inclusive";class Utils{static lcd(...e){if(t.NullChecker.isNullOrEmpty(e)||e.length<=1)throw"Insufficient set of numbers.";function r(t,e){return e?r(e,t%e):0===e?t:NaN}function n(t,e){return t*e/r(t,e)}let m=Math.round(e[0]);for(let t=1;t<e.length;t++)m=n(m,Math.round(e[t]));return m}static gcd(t,e){return t=Math.round(t),e=Math.round(e),0===t?e:Utils.gcd(e%t,t)}static rebaseInt(e,r,n){return t.Numbers.rebase(e,r,n)}static rebaseFloat(t,e,r,n=12){const m=Utils.rebaseFloat10ToN,a=Utils.rebaseFloatNTo10;if(10===e){const e=parseFloat(t.toString());return r%1==0?Utils.rebaseFloat10ToNIntBase(e,r,n):m(e,r,n)}if(10===r)return a(t.toString(),e,n);return m(a(t.toString(),e,n+1),r,n)}static rebaseFloatNTo10(t,e,m=12){const a=r;if(e<=1||e>a.length)throw new Error(n);const s=(null!=t?t:"0").toString().toLowerCase(),i=Number.NaN;if("0"===s)return 0;const o=/^([-+]?) *([\da-z]+)?(.[\da-z]+)?$/.exec(s);if(o.length<2)return i;const c="-"===o[1]?-1:1,f=o[2]||"0",u=o[3]||".0";let l=0,h=0;for(let t of f+u.substr(1)){const r=a.indexOf(t);if(-1===r||r>=e)return i;l+=r*Math.pow(e,f.length-h-1),h++}return c*l}static rebaseFloat10ToNIntBase(t,e,m=12){const a=r;if(e<=1||e>36)throw new Error(n);const s=e;let i=Math.abs(null!=t?t:0);if(0===i||Number.isNaN(i))return t.toString();let o=(i%1).roundoff(),c="";for(;;){let t=i/s,e=Math.floor(t),r=(i-e*s).roundoff(),n=Math.floor(r);if(c=n>=36?`[${n}]`+c:a[n]+c,e<=0)break;i=e}if(c=c.replace(/^0+/,""),c||(c="0"),0===o)return c;let f="";do{i=(o*s).roundoff();const t=Math.floor(i),e=(i-t).roundoff();t>=36?f=`[${t}]`:f+=a[t],o=e}while(!o.isCloseTo(0)&&f.length<m);return/^0*$/.test(f)?c:(Math.sign(t)<0?"-":"")+c+"."+f.replace(/0+$/,"")}static rebaseFloat10ToN(e,m,a=12){const s=r;if(m<=1||m>s.length)throw new Error(n);const i=m;let o=Math.abs(null!=e?e:0);if(0===o||Number.isNaN(o))return e.toString();let c=Math.sign(e)<0?"-":"",f=[],u=[];for(let t=0;t<20;t++)f.push("0"),u.push("0");const l=i%1==0?i:Math.ceil(i);function h(t,e,r){const n=t?f:u,m=n[e]=n[e]||"0",a=s.indexOf(m)+r,i=a%l,o=Math.floor(a/l);return n[e]=s[i],o>0&&(t?h(t,e+1,o):0===e?h(!0,0,o):h(!1,e-1,o)),o}let y=0;for(;;){const e=Math.floor(t.Numbers.log(o,i)),r=e>=0;if(h(r,r?e:Math.abs(1+e),1),o=(o-Math.pow(i,e).roundoff()).roundoff(),r||y++,0===o||y>=100){const t=c+(f.reverse().map((t=>t||"0")).join("").replace(/^0+/,"")||"0"),e=u.map((t=>t||"0")).join("").substr(0,a).replace(/0+$/,"");return/^0*$/.test(e)?t:t+"."+e}}}}e.Utils=Utils}(e.NumberTheory||(e.NumberTheory={}))}(t.Mathematics||(t.Mathematics={}))}(Pacem||(Pacem={})),function(t){!function(t){!function(t){function e(t,e=!1){const r=this._varNum(t);return Math.sqrt(r/(t.length+(e?1:0)))}t.Utils=class Utils{static sum(t){return t.reduce(((t,e)=>t+e),0)}static mean(t){return this.sum(t)/t.length}static var(t){return function(t){const e=this.mean(t);return t.reduce(((t,r)=>Math.pow(r-e,2)+t),0)}(t)/t.length}static pstdev(t){return e(t,!1)}static sstdev(t){return e(t,!0)}static gaussian(e,r){return new t.Gaussian(e,r)}}}(t.DataAnalysis||(t.DataAnalysis={}))}(t.Mathematics||(t.Mathematics={}))}(Pacem||(Pacem={}));
6
+ var Pacem,__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(t,e,r,m,n){if("m"===m)throw new TypeError("Private method is not writable");if("a"===m&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===m?n.call(t,r):n?n.value=r:e.set(t,r),r},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(t,e,r,m){if("a"===r&&!m)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!m:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?m:"a"===r?m.call(t):m?m.value:e.get(t)};!function(t){!function(e){!function(e){class Vector{static unit(t){const e={x:t.x,y:t.y};return this.normalize(e),e}static magSqr(t){return t.x*t.x+t.y*t.y}static mag(t){return Math.sqrt(Vector.magSqr(t))}static normalize(t){const e=Vector.mag(t);if(e<=0)throw"Cannot normalize a vector of length 0.";const r=1/e;t.x*=r,t.y*=r}static from(e,r){return t.Point.subtract(e,r)}static dot(t,e){return t.x*e.x+t.y*e.y}static cross(t,e){return t.x*e.y-t.y*e.x}}e.Vector=Vector}(e.LinearAlgebra||(e.LinearAlgebra={}))}(t.Geometry||(t.Geometry={}))}(Pacem||(Pacem={})),function(t){!function(e){const r=180/Math.PI,m=2*Math.PI,n=e.LinearAlgebra.Vector;function a(t){return null!=t&&"x"in t&&"number"==typeof t.x&&"y"in t&&"number"==typeof t.y}e.Utils=class Utils{static slopeRad(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}static slopeRad2(t,e){return(m+this.slopeRad(t,e))%m}static slopeDeg(t,e){return this.slopeRad(t,e)*r}static slopeDeg2(t,e){return(360+this.slopeDeg(t,e))%360}static intersect(t,e,...r){return Array.isArray(t)&&Array.isArray(e)?this._intersectSegments(t,e,!0):this._intersectRects.apply(this,arguments)}static intersectLines(t,e,r,m){let n,a;if(Array.isArray(t)&&Array.isArray(e)&&2===t.length&&2===e.length&&"number"==typeof t[0]&&"number"==typeof e[0]&&"number"==typeof t[1]&&"number"==typeof e[1]&&(r=e[0],m=e[1],e=t[1],t=t[0]),"number"==typeof t&&"number"==typeof e){n=[{x:0,y:e},{x:1,y:t+e}],a=[{x:0,y:m},{x:1,y:r+m}]}else n=t,a=e;return this._intersectSegments(n,a,!1)}static cramer(t,e){Array.isArray(t)&&(t={a:t[0],b:t[1],c:t[2]}),Array.isArray(e)&&(e={a:e[0],b:e[1],c:e[2]});let r=(t.b*e.c-t.c*e.b)/(t.b*e.a-t.a*e.b),m=(t.c*e.a-t.a*e.c)/(t.b*e.a-t.a*e.b);return{x:-r.roundoff(),y:-m.roundoff()}}static mq(t,e){let r;if(a(t)?r=t:(r=t[0],e=t[1]),r.x===e.x)return[Number.NaN,Number.NaN];const m=(e.y-r.y)/(e.x-r.x);return[m,r.y-m*r.x]}static _intersectSegments(t,e,r){const m=t[0],n=t[1],a=e[0],s=e[1],i=Math.min(m.x,n.x),o=Math.min(m.y,n.y),f=Math.max(m.x,n.x),c=f-i,u=Math.max(m.y,n.y),l=u-o,h=Math.min(a.x,s.x),y=Math.min(a.y,s.y),x=Math.max(a.x,s.x),p=x-h,g=Math.max(a.y,s.y),d=g-y;if(0===c&&0===p)return null;if(0===l&&0===d)return null;const M=t=>t.x<h||t.x>x||t.x<i||t.x>f,b=t=>t.y<y||t.y>g||t.y<o||t.y>u;var w=null;if(0===c){if(r&&(h>i||x<f))return null;const t=this.mq(a,s);w=this.cramer([1,0,-i],[t[0],-1,t[1]]),r&&b(w)&&(w=null)}else if(0===p){if(r&&(i>h||f<x))return null;const t=this.mq(m,n);w=this.cramer([t[0],-1,t[1]],[1,0,-h]),r&&b(w)&&(w=null)}else if(0===l){if(r&&(y>o||g<u))return null;const t=this.mq(a,s);w=this.cramer([0,1,-o],[t[0],-1,t[1]]),r&&M(w)&&(w=null)}else if(0===d){if(r&&(o>y||u<g))return null;const t=this.mq(m,n);w=this.cramer([t[0],-1,t[1]],[0,1,-y]),r&&M(w)&&(w=null)}else{let t;if(!r||(t=this._intersectRects({x:i,y:o,width:c,height:l},{x:h,y:y,width:p,height:d}))&&t.width>0&&t.height>0){const e=this.mq(m,n),i=this.mq(a,s),o=e[0],f=i[0],c=e[1],u=i[1];if(o!==f){let e=(w=this.cramer([o,-1,c],[f,-1,u])).x,m=w.y;r&&(e<t.x||e>t.x+t.width||m<t.y||m>t.y+t.height)&&(w=null)}}}return null===w?null:{x:w.x,y:w.y}}static _intersectRects(...e){return t.Rect.intersect.apply(this,e)}static dot(t,e){return n.dot(t,e)}static cross(t,e){return n.cross(t,e)}static distance(e,r){if(null!=(m=e)&&Array.isArray(m)&&2===m.length&&a(m[0])&&a(m[1]))return t.Point.distance(e[0],e[1]);if(a(r))return t.Point.distance(e,r);{const t=r[0],m=r[1];return Math.abs(t*e.x-e.y+m)/Math.sqrt(Math.pow(t,2)+1)}var m}static inLine(t,e){const r=n.from(e[0],t),m=n.from(t,e[1]);return this.cross(r,m).isCloseTo(0)}static inSegment(t,e){const r=Math.min(e[0].x,e[1].x),m=Math.max(e[0].x,e[1].x),n=Math.min(e[0].y,e[1].y),a=Math.max(e[0].y,e[1].y);return t.x>=r&&t.x<=m&&t.y>=n&&t.y<=a&&this.inLine(t,e)}static inTriangle(e,r){let m;for(let n=0;n<3;n++){const a=r[n],s=r[(n+1)%3],i=t.Point.subtract(s,e),o=t.Point.subtract(a,e),f=this.cross(i,o);if(n>0&&f*m<=0)return!1;m=f}return!0}static inPolygon(t,e){if(!((null==e?void 0:e.length)>=3))throw"Not enough vertices";const r=e.length;if(3===r)return this.inTriangle(t,[e[0],e[1],e[2]]);let m=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,a=0,s=0;for(let t=0;t<r;t++){const r=e[t];m=Math.min(m,r.x),n=Math.min(n,r.y),a=Math.max(a,r.x),s=Math.max(s,r.y)}if(t.x<m||t.x>a||t.y<n||t.y>s)return!1;const i=[{x:m-1,y:t.y},t];let o=0;for(let m=0;m<r;m++){const n=e[m],a=e[(m+1)%r],s=[n,a];if(n.y===t.y){const s=e[(m-1+r)%r];t.x>n.x&&(s.y-t.y)*(a.y-t.y)<0&&o++}else{if(a.y===t.y)continue;null!=this.intersect(s,i)&&o++}}return o%2==1}}}(t.Geometry||(t.Geometry={}))}(Pacem||(Pacem={})),function(t){!function(e){!function(e){const r=180/Math.PI,m=1/r;class Vector3D{static from(...t){if(3!==t.length)throw new RangeError("Must provide exactly 3 numbers");return{x:t[0],y:t[1],z:t[2]}}static parse(e){const r=t.parseAsNumericalArray(e);if(r&&3===r.length)return Vector3D.from.apply(null,r);throw new Error(`Cannot parse "${e}" as a valid Vector3D.`)}static i(){return{x:1,y:0,z:0}}static j(){return{x:0,y:1,z:0}}static k(){return{x:0,y:0,z:1}}static subtract(t,e){return{x:e.x-t.x,y:e.y-t.y,z:e.z-t.z}}static add(...t){var e={x:0,y:0,z:0};for(var r of t)e.x+=r.x,e.y+=r.y,e.z+=r.z;return e}static dot(t,e){return t.x*e.x+t.y*e.y+t.z*e.z}static cross(t,e){return{x:t.y*e.z-t.z*e.y,y:t.z*e.x-t.x*e.z,z:t.x*e.y-t.y*e.x}}static magSqr(t){return t.x*t.x+t.y*t.y+t.z*t.z}static mag(t){return Math.sqrt(Vector3D.magSqr(t))}static unit(t){const e={x:t.x,y:t.y,z:t.z};return this.normalize(e),e}static normalize(t){const e=Vector3D.mag(t);if(e<=0)throw"Cannot normalize a vector of length 0.";const r=1/e;t.x*=r,t.y*=r,t.z*=r}static angleBetween(t,e){let m;const n=Vector3D.unit(t),a=Vector3D.unit(e);if(Vector3D.dot(n,a)<0){const t={x:-n.x-a.x,y:-n.y-a.y,z:-n.z-a.z},e=Vector3D.mag(t);m=Math.PI-2*Math.asin(e/2)}else{const t={x:n.x-a.x,y:n.y-a.y,z:n.z-a.z},e=Vector3D.mag(t);m=2*Math.asin(e/2)}return r*m}}e.Vector3D=Vector3D;class Matrix3D{static identity(){return{m11:1,m12:0,m13:0,m14:0,m21:0,m22:1,m23:0,m24:0,m31:0,m32:0,m33:1,m34:0,offsetX:0,offsetY:0,offsetZ:0,m44:1}}static from(...t){if(16!==t.length)throw new RangeError("Must provide exactly 16 numbers");return{m11:t[0],m12:t[1],m13:t[2],m14:t[3],m21:t[4],m22:t[5],m23:t[6],m24:t[7],m31:t[8],m32:t[9],m33:t[10],m34:t[11],offsetX:t[12],offsetY:t[13],offsetZ:t[14],m44:t[15]}}static transpose(t){return Matrix3D.from(t.m11,t.m21,t.m31,t.offsetX,t.m12,t.m22,t.m32,t.offsetY,t.m13,t.m23,t.m33,t.offsetZ,t.m14,t.m24,t.m34,t.m44)}static toArray(t){return[t.m11,t.m12,t.m13,t.m14,t.m21,t.m22,t.m23,t.m24,t.m31,t.m32,t.m33,t.m34,t.offsetX,t.offsetY,t.offsetZ,t.m44]}static clone(t){return Matrix3D.from.apply(null,Matrix3D.toArray(t))}static parse(e){const r=t.parseAsNumericalArray(e);if(r&&16===r.length)return Matrix3D.from.apply(null,r);throw new Error(`Cannot parse "${e}" as a valid Matrix3D.`)}static isIdentity(t){return 1==t.m11&&0==t.m12&&0==t.m13&&0==t.m14&&0==t.m21&&1==t.m22&&0==t.m23&&0==t.m24&&0==t.m31&&0==t.m32&&1==t.m33&&0==t.m34&&0==t.offsetX&&0==t.offsetY&&0==t.offsetZ&&1==t.m44}static isAffine(t){return 0==t.m14&&0==t.m24&&0==t.m34&&1==t.m44}static determinant(t){if(Matrix3D.isIdentity(t))return 1;if(Matrix3D.isAffine(t))return t.m11*(t.m22*t.m33-t.m32*t.m23)-t.m12*(t.m21*t.m33-t.m31*t.m23)+t.m13*(t.m21*t.m32-t.m31*t.m22);{const e=t.m13*t.m24-t.m23*t.m14,r=t.m13*t.m34-t.m33*t.m14,m=t.m13*t.m44-t.offsetZ*t.m14,n=t.m23*t.m34-t.m33*t.m24,a=t.m23*t.m44-t.offsetZ*t.m24,s=t.m33*t.m44-t.offsetZ*t.m34,i=t.m22*r-t.m32*e-t.m12*n,o=t.m12*a-t.m22*m+t.offsetY*e,f=t.m32*m-t.offsetY*r-t.m12*s,c=t.m22*s-t.m32*a+t.offsetY*n;return t.offsetX*i+t.m31*o+t.m21*f+t.m11*c}}static multiply(t,e){return Matrix3D.isIdentity(t)?e:Matrix3D.isIdentity(e)?t:Matrix3D.from(t.m11*e.m11+t.m12*e.m21+t.m13*e.m31+t.m14*e.offsetX,t.m11*e.m12+t.m12*e.m22+t.m13*e.m32+t.m14*e.offsetY,t.m11*e.m13+t.m12*e.m23+t.m13*e.m33+t.m14*e.offsetZ,t.m11*e.m14+t.m12*e.m24+t.m13*e.m34+t.m14*e.m44,t.m21*e.m11+t.m22*e.m21+t.m23*e.m31+t.m24*e.offsetX,t.m21*e.m12+t.m22*e.m22+t.m23*e.m32+t.m24*e.offsetY,t.m21*e.m13+t.m22*e.m23+t.m23*e.m33+t.m24*e.offsetZ,t.m21*e.m14+t.m22*e.m24+t.m23*e.m34+t.m24*e.m44,t.m31*e.m11+t.m32*e.m21+t.m33*e.m31+t.m34*e.offsetX,t.m31*e.m12+t.m32*e.m22+t.m33*e.m32+t.m34*e.offsetY,t.m31*e.m13+t.m32*e.m23+t.m33*e.m33+t.m34*e.offsetZ,t.m31*e.m14+t.m32*e.m24+t.m33*e.m34+t.m34*e.m44,t.offsetX*e.m11+t.offsetY*e.m21+t.offsetZ*e.m31+t.m44*e.offsetX,t.offsetX*e.m12+t.offsetY*e.m22+t.offsetZ*e.m32+t.m44*e.offsetY,t.offsetX*e.m13+t.offsetY*e.m23+t.offsetZ*e.m33+t.m44*e.offsetZ,t.offsetX*e.m14+t.offsetY*e.m24+t.offsetZ*e.m34+t.m44*e.m44)}static invert(t){if(Matrix3D.isAffine(t)){const e=t.m12*t.m23-t.m22*t.m13,r=t.m32*t.m13-t.m12*t.m33,m=t.m22*t.m33-t.m32*t.m23,n=Matrix3D.determinant(t);if(0==n)return null;const a=t.m21*t.m13-t.m11*t.m23,s=t.m11*t.m33-t.m31*t.m13,i=t.m31*t.m23-t.m21*t.m33,o=t.m11*t.m22-t.m21*t.m12,f=t.m11*t.m32-t.m31*t.m12,c=t.m11*t.offsetY-t.offsetX*t.m12,u=t.m21*t.m32-t.m31*t.m22,l=t.m21*t.offsetY-t.offsetX*t.m22,h=t.m31*t.offsetY-t.offsetX*t.m32,y=t.m23*c-t.offsetZ*o-t.m13*l,x=t.m13*h-t.m33*c+t.offsetZ*f,p=t.m33*l-t.offsetZ*u-t.m23*h,g=o,d=-f,M=u,b=1/n;return Matrix3D.from(m*b,r*b,e*b,0,i*b,s*b,a*b,0,M*b,d*b,g*b,0,p*b,x*b,y*b,1)}{const e=Matrix3D.determinant(t);if(0==e)return null;const r=t.m33*t.m44-t.m34*t.offsetZ,m=t.m32*t.m44-t.m34*t.offsetY,n=t.m31*t.m44-t.m34*t.offsetX,a=t.m32*t.offsetZ-t.m33*t.offsetY,s=t.m31*t.offsetZ-t.m33*t.offsetX,i=t.m31*t.offsetY-t.m32*t.offsetX,o=t.m33*t.m44-t.m34*t.offsetZ,f=t.m32*t.m44-t.m34*t.offsetY,c=t.m31*t.m44-t.m34*t.offsetX,u=t.m32*t.offsetZ-t.m33*t.offsetY,l=t.m31*t.offsetZ-t.m33*t.offsetX,h=t.m31*t.offsetY-t.m32*t.offsetX,y=t.m23*t.m44-t.m24*t.offsetZ,x=t.m22*t.m44-t.m24*t.offsetY,p=t.m21*t.m44-t.m24*t.offsetX,g=t.m22*t.offsetZ-t.m23*t.offsetY,d=t.m21*t.offsetZ-t.m23*t.offsetX,M=t.m21*t.offsetY-t.m22*t.offsetX,b=t.m23*t.m34-t.m24*t.m33,w=t.m22*t.m34-t.m24*t.m32,v=t.m21*t.m34-t.m24*t.m31,z=t.m22*t.m33-t.m23*t.m32,D=t.m21*t.m33-t.m23*t.m31,N=t.m21*t.m32-t.m22*t.m31,P=t.m22*r-t.m23*m+t.m24*a,A=-(t.m21*r-t.m23*n+t.m24*s),_=t.m21*m-t.m22*n+t.m24*i,C=-(t.m21*a-t.m22*s+t.m23*i),Y=-(t.m12*o-t.m13*f+t.m14*u),q=t.m11*o-t.m13*c+t.m14*l,Z=-(t.m11*f-t.m12*c+t.m14*h),I=t.m11*u-t.m12*l+t.m13*h,X=t.m12*y-t.m13*x+t.m14*g,S=-(t.m11*y-t.m13*p+t.m14*d),F=t.m11*x-t.m12*p+t.m14*M,V=-(t.m11*g-t.m12*d+t.m13*M),T=-(t.m12*b-t.m13*w+t.m14*z),E=t.m11*b-t.m13*v+t.m14*D,Q=-(t.m11*w-t.m12*v+t.m14*N),j=t.m11*z-t.m12*D+t.m13*N,G=1/e;return Matrix3D.from(P*G,Y*G,X*G,T*G,A*G,q*G,S*G,E*G,_*G,Z*G,F*G,Q*G,C*G,I*G,V*G,j*G)}}static transform(t,e){var r={x:t.x,y:t.y,z:t.z};if(!Matrix3D.isIdentity(e)){var m=r.x,n=r.y,a=r.z;if(r.x=m*e.m11+n*e.m21+a*e.m31+e.offsetX,r.y=m*e.m12+n*e.m22+a*e.m32+e.offsetY,r.z=m*e.m13+n*e.m23+a*e.m33+e.offsetZ,!Matrix3D.isAffine(e)){var s=m*e.m14+n*e.m24+a*e.m34+e.m44;0!=s&&(r.x/=s,r.y/=s,r.z/=s)}}return r}}e.Matrix3D=Matrix3D;class Quaternion{static from(...t){if(4!==t.length)throw new RangeError("Must provide exactly 4 numbers");return{x:t[0],y:t[1],z:t[2],w:t[3]}}static parse(e){const r=t.parseAsNumericalArray(e);if(r&&4===r.length)return Quaternion.from.apply(null,r);throw new Error(`Cannot parse "${e}" as a valid Quaternion.`)}static fromAxisAngle(t,e){var r=m*(e%=360),n=Vector3D.mag(t);if(0==n)throw new RangeError("Invalid argument");var a=Math.sin(.5*r)/n,s=t.x*a,i=t.y*a,o=t.z*a;return Quaternion.from(s,i,o,Math.cos(.5*r))}static fromRotationMatrix(t){const e=t.m11+t.m22+t.m33+t.m44;if(e>0){const r=.5/Math.sqrt(e),m=.25/r,n=(t.m23-t.m32)*r,a=(t.m31-t.m13)*r,s=(t.m12-t.m21)*r;return Quaternion.from(n,a,s,m)}if(t.m11>t.m22&&t.m11>t.m22){const e=.5/Math.sqrt(t.m44+t.m11-t.m22-t.m33),r=(t.m23-t.m32)*e,m=.25/e,n=(t.m12+t.m21)*e,a=(t.m31+t.m13)*e;return Quaternion.from(m,n,a,r)}if(t.m22>t.m33){const e=.5/Math.sqrt(t.m44+t.m22-t.m11-t.m33),r=(t.m23+t.m32)*e,m=.25/e,n=(t.m12+t.m21)*e,a=(t.m31-t.m13)*e;return Quaternion.from(n,m,r,a)}{const e=.5/Math.sqrt(t.m44+t.m33-t.m11-t.m22),r=(t.m23+t.m32)*e,m=.25/e,n=(t.m12-t.m21)*e,a=(t.m31-t.m13)*e;return Quaternion.from(a,r,m,n)}}static conjugate(t){return Quaternion.from(-t.x,-t.y,-t.z,t.w)}static norm(t){return t.x*t.x+t.y*t.y+t.z*t.z}static axis(t){return 0==t.x&&0==t.y&&0==t.z?Vector3D.j():Vector3D.unit(t)}static angle(t){let e=Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z),r=t.w;if(e>Number.MAX_VALUE){const m=Math.max(Math.abs(t.x),Math.max(Math.abs(t.y),Math.abs(t.z))),n=t.x/m,a=t.y/m,s=t.z/m;e=Math.sqrt(n*n+a*a+s*s),r/=m}return 114.59155902616465*Math.atan2(e,r)}static toRotationMatrix(t){var e=Matrix3D.identity(),r=t.x,m=t.y,n=t.z,a=t.w;return e.m11=1-2*m*m-2*n*n,e.m12=2*r*m+2*a*n,e.m13=2*r*n-2*a*m,e.m21=2*r*m-2*a*n,e.m22=1-2*r*r-2*n*n,e.m23=2*m*n+2*a*r,e.m31=2*a*m+2*r*n,e.m32=2*m*n-2*a*r,e.m33=1-2*r*r-2*m*m,e}static invert(t){const e=1/Quaternion.norm(t),r=Quaternion.conjugate(t);return r.x*=e,r.y*=e,r.z*=e,r.w*=e,r}static multiply(t,e){return Quaternion.from(t.w*e.x+t.x+e.w+t.y*e.z-t.z*e.y,t.w*e.y-t.x*e.z+t.y*e.w+t.z*e.x,t.w*e.z+t.x*e.y-t.y*e.x+t.z*e.w,t.w*e.w-t.x*e.x-t.y*e.y-t.z*e.z)}static dot(t,e){return Quaternion.multiply(t,Quaternion.conjugate(e)).w}}e.Quaternion=Quaternion}(e.LinearAlgebra||(e.LinearAlgebra={}))}(t.Geometry||(t.Geometry={}))}(Pacem||(Pacem={})),function(t){!function(t){function e(t){return"number"==typeof t&&(t={real:t,img:0}),t}var r;function m(t,e){const r={};return Object.defineProperty(r,"real",{value:t,writable:!1}),Object.defineProperty(r,"img",{value:e,writable:!1}),r}function n(){return r||(r=m(Number.NaN,Number.NaN))}t.Complex=class Complex{static build(t,e){return this.isComplex(t)?t:(null!=e||(e=0),"number"!=typeof t||"number"!=typeof e?n():m(t,e||0))}static add(t,r){const n=e(t),a=e(r);return m(n.real+a.real,n.img+a.img)}static subtract(t,r){const n=e(t),a=e(r);return m(n.real-a.real,n.img-a.img)}static multiply(t,r){const n=e(t),a=e(r);return m(n.real*a.real-n.img*a.img,n.real*a.img+n.img*a.real)}static divide(t,r){const a=e(t),s=e(r),i=this.absSquare(s).roundoff();if(0===i)return n();const o=1/i;return m(o*(a.real*s.real+a.img*s.img),o*(a.img*s.real-a.real*s.img))}static absSquare(t){const r=e(t);return Math.pow(r.real,2)+Math.pow(r.img,2)}static modulus(t){return Math.sqrt(this.absSquare(t))}static isComplex(t){return null!=t&&"object"==typeof t&&"real"in t&&"img"in t&&"number"==typeof t.real&&"number"==typeof t.img}static conjugate(t){return m((t=e(t)).real,0==Math.abs(t.img)?0:-t.img)}static equals(t,e){const r=this.build(t),m=this.build(e);return!(!this.isComplex(t)||!this.isComplex(e))&&(r.real===m.real&&r.img===m.img)}static get NaC(){return n()}}}(t.Mathematics||(t.Mathematics={}))}(Pacem||(Pacem={})),function(t){!function(t){!function(e){const r={};function m(e,m){const n=r[m]=r[m]||{};return n[e]=n[e]||function(e,r){const m=2*Math.PI*e/r;return t.Complex.build(Math.cos(m),Math.sin(m))}(e,m)}function n(e){const r=[],a=e.length;if(1===a)return[t.Complex.build(e[0])];const s=n(e.filter(((t,e)=>e%2==0))),i=n(e.filter(((t,e)=>e%2==1)));for(var o=0;o<a/2;o++){const e=s[o],n=t.Complex.multiply(m(o,a),i[o]);r[o]=t.Complex.add(e,n),r[o+a/2]=t.Complex.subtract(e,n)}return r}e.Fourier=class Fourier{static transform(t,e=!0){return(r=(t=t||[]).length)>0&&0==(r&r-1)?this.fft(t,e):this.dft(t,e);var r}static invert(t,e=!0){return this.idft(t||[],e)}static dft(e,r=!0){var n;const a=null===(n=e||[])||void 0===n?void 0:n.length,s=r?1/Math.sqrt(a):1,i=[];for(let r=0;r<a;r++){i.push({real:0,img:0});for(let n=0;n<a;n++){const o=m(r*n,a),f=t.Complex.multiply(e[n],o),c=t.Complex.multiply(f,s);i[r]=t.Complex.add(i[r],c)}}return i}static idft(e,r=!0){const m=e.map((e=>t.Complex.build(e.img,e.real)));return this.transform(m,r).map((e=>t.Complex.build(e.img,e.real)))}static fft(e,r=!0){const m=n(e);if(!r)return m;const a=1/Math.sqrt(e.length);return m.map((e=>t.Complex.multiply(e,a)))}}}(t.DataAnalysis||(t.DataAnalysis={}))}(t.Mathematics||(t.Mathematics={}))}(Pacem||(Pacem={})),function(t){!function(t){!function(t){const e=Math.sqrt(Math.PI);function r(t){let e,r,m;return r=Math.abs(t),e=1/(1+.5*r),m=e*Math.exp(-r*r-1.26551223+e*(1.00002368+e*(.37409196+e*(.09678418+e*(e*(.27886807+e*(e*(1.48851587+e*(.17087277*e-.82215223))-1.13520398))-.18628806))))),t>=0?m:2-m}class Gaussian{constructor(t,e){this.mean=t,this.stdev=Math.abs(e),this.variance=Math.pow(e,2)}static get normal(){return m}probabilityDensity(t){const r=this.stdev*Math.SQRT2*e;return Math.exp(-.5*Math.pow(this._z(t),2))/r}_z(t){return(t-this.mean)/this.stdev}probability(t){return.5*r(-this._z(t)/Math.SQRT2)}}t.Gaussian=Gaussian;const m=new Gaussian(0,1)}(t.DataAnalysis||(t.DataAnalysis={}))}(t.Mathematics||(t.Mathematics={}))}(Pacem||(Pacem={})),function(t){!function(t){!function(t){var e,r;class Lagrangian{constructor(...t){e.set(this,void 0),r.set(this,void 0),__classPrivateFieldSet(this,e,Array.from(t)||[],"f")}_unsafeCreate(){const t=__classPrivateFieldGet(this,e,"f")||[];let m,n="var ljs = [];\n";for(let e=0;e<t.length;e++){const r=t[e],a=r.x;if(null!=m&&m>=a)throw new Error("Invalid function provided.");m=a,n+=`ljs.push( ${r.y}`;for(let r=0;r<t.length;r++)if(r!==e){const e=t[r];n+=` * ((x - ${e.x})/${a-e.x})`}n+=");\n"}n+="return ljs.reduce((prev, next) => prev + next, 0);",__classPrivateFieldSet(this,r,new Function("x",n),"f")}_compute(t){const r=__classPrivateFieldGet(this,e,"f")||[];let m;const n=[];for(let e=0;e<r.length;e++){const a=r[e].x;if(null!=m&&m>=a)throw new Error("Invalid function provided.");m=a;let s=r[e].y;for(let m=0;m<r.length;m++)if(m!==e){const e=r[m];s*=(t-e.x)/(a-e.x)}n.push(s)}return n.reduce(((t,e)=>t+e),0)}interpolate(t){return"function"==typeof __classPrivateFieldGet(this,r,"f")?__classPrivateFieldGet(this,r,"f").apply(null,[t]):this._compute(t)}static create(...t){const e=(arguments.length>0&&Array.isArray(arguments[0])?arguments[0]:Array.from(t)).map(((t,e)=>"number"==typeof t?{x:e,y:t}:t)),r=new(Function.prototype.bind.apply(Lagrangian,[null].concat(e)));try{r._unsafeCreate()}catch(t){}return r}}e=new WeakMap,r=new WeakMap,t.Lagrangian=Lagrangian}(t.DataAnalysis||(t.DataAnalysis={}))}(t.Mathematics||(t.Mathematics={}))}(Pacem||(Pacem={})),function(t){!function(e){!function(e){const r="0123456789abcdefghijklmnopqrstuvwxyz",m="Radix out of range: possible values go between positive 1 exclusive and 36 inclusive";class Utils{static lcd(...e){if(t.NullChecker.isNullOrEmpty(e)||e.length<=1)throw"Insufficient set of numbers.";function r(t,e){return e?r(e,t%e):0===e?t:NaN}function m(t,e){return t*e/r(t,e)}let n=Math.round(e[0]);for(let t=1;t<e.length;t++)n=m(n,Math.round(e[t]));return n}static gcd(t,e){return t=Math.round(t),e=Math.round(e),0===t?e:Utils.gcd(e%t,t)}static rebaseInt(e,r,m){return t.Numbers.rebase(e,r,m)}static rebaseFloat(t,e,r,m=12){const n=Utils.rebaseFloat10ToN,a=Utils.rebaseFloatNTo10;if(10===e){const e=parseFloat(t.toString());return r%1==0?Utils.rebaseFloat10ToNIntBase(e,r,m):n(e,r,m)}if(10===r)return a(t.toString(),e,m);return n(a(t.toString(),e,m+1),r,m)}static rebaseFloatNTo10(t,e,n=12){const a=r;if(e<=1||e>a.length)throw new Error(m);const s=(null!=t?t:"0").toString().toLowerCase(),i=Number.NaN;if("0"===s)return 0;const o=/^([-+]?) *([\da-z]+)?(.[\da-z]+)?$/.exec(s);if(o.length<2)return i;const f="-"===o[1]?-1:1,c=o[2]||"0",u=o[3]||".0";let l=0,h=0;for(let t of c+u.substr(1)){const r=a.indexOf(t);if(-1===r||r>=e)return i;l+=r*Math.pow(e,c.length-h-1),h++}return f*l}static rebaseFloat10ToNIntBase(t,e,n=12){const a=r;if(e<=1||e>36)throw new Error(m);const s=e;let i=Math.abs(null!=t?t:0);if(0===i||Number.isNaN(i))return t.toString();let o=(i%1).roundoff(),f="";for(;;){let t=i/s,e=Math.floor(t),r=(i-e*s).roundoff(),m=Math.floor(r);if(f=m>=36?`[${m}]`+f:a[m]+f,e<=0)break;i=e}if(f=f.replace(/^0+/,""),f||(f="0"),0===o)return f;let c="";do{i=(o*s).roundoff();const t=Math.floor(i),e=(i-t).roundoff();t>=36?c=`[${t}]`:c+=a[t],o=e}while(!o.isCloseTo(0)&&c.length<n);return/^0*$/.test(c)?f:(Math.sign(t)<0?"-":"")+f+"."+c.replace(/0+$/,"")}static rebaseFloat10ToN(e,n,a=12){const s=r;if(n<=1||n>s.length)throw new Error(m);const i=n;let o=Math.abs(null!=e?e:0);if(0===o||Number.isNaN(o))return e.toString();let f=Math.sign(e)<0?"-":"",c=[],u=[];for(let t=0;t<20;t++)c.push("0"),u.push("0");const l=i%1==0?i:Math.ceil(i);function h(t,e,r){const m=t?c:u,n=m[e]=m[e]||"0",a=s.indexOf(n)+r,i=a%l,o=Math.floor(a/l);return m[e]=s[i],o>0&&(t?h(t,e+1,o):0===e?h(!0,0,o):h(!1,e-1,o)),o}let y=0;for(;;){const e=Math.floor(t.Numbers.log(o,i)),r=e>=0;if(h(r,r?e:Math.abs(1+e),1),o=(o-Math.pow(i,e).roundoff()).roundoff(),r||y++,0===o||y>=100){const t=f+(c.reverse().map((t=>t||"0")).join("").replace(/^0+/,"")||"0"),e=u.map((t=>t||"0")).join("").substr(0,a).replace(/0+$/,"");return/^0*$/.test(e)?t:t+"."+e}}}}e.Utils=Utils}(e.NumberTheory||(e.NumberTheory={}))}(t.Mathematics||(t.Mathematics={}))}(Pacem||(Pacem={})),function(t){!function(t){!function(t){function e(t,e=!1){const r=this._varNum(t);return Math.sqrt(r/(t.length+(e?1:0)))}t.Utils=class Utils{static sum(t){return t.reduce(((t,e)=>t+e),0)}static mean(t){return this.sum(t)/t.length}static var(t){return function(t){const e=this.mean(t);return t.reduce(((t,r)=>Math.pow(r-e,2)+t),0)}(t)/t.length}static pstdev(t){return e(t,!1)}static sstdev(t){return e(t,!0)}static gaussian(e,r){return new t.Gaussian(e,r)}}}(t.DataAnalysis||(t.DataAnalysis={}))}(t.Mathematics||(t.Mathematics={}))}(Pacem||(Pacem={}));
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -544,10 +544,10 @@ declare namespace Pacem.Components.Scaffolding {
544
544
  apply(state: {
545
545
  [key: string]: any;
546
546
  }): void;
547
- /** Sets the current form (or the field of its having the specified name) in a pristine state. */
548
- setPristine(name?: string): void;
549
- /** Sets the current form (or the fields of its having the specified name) in a dirty state. */
550
- setDirty(name?: string): void;
547
+ /** Sets the current form (or the fields of it having the specified names) in a pristine state. */
548
+ setPristine(...names: string[]): void;
549
+ /** Sets the current form (or the fields of it having the specified names) in a dirty state. */
550
+ setDirty(...names: string[]): void;
551
551
  private _setAs;
552
552
  private _fields;
553
553
  private _validators;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.0-delphi (https://js.pacem.it)
2
+ * pacem v0.50.0-ebla (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1715,18 +1715,18 @@ disabled="{{ (#${uid}.suddenValidation && (!(#${uid}.valid && #${uid}.dirty))) |
1715
1715
  this.setDirty(name);
1716
1716
  }
1717
1717
  }
1718
- /** Sets the current form (or the field of its having the specified name) in a pristine state. */
1719
- setPristine(name) {
1720
- this._setAs(false, name);
1718
+ /** Sets the current form (or the fields of it having the specified names) in a pristine state. */
1719
+ setPristine(...names) {
1720
+ this._setAs(false, ...names);
1721
1721
  }
1722
- /** Sets the current form (or the fields of its having the specified name) in a dirty state. */
1723
- setDirty(name) {
1724
- this._setAs(true, name);
1722
+ /** Sets the current form (or the fields of it having the specified names) in a dirty state. */
1723
+ setDirty(...names) {
1724
+ this._setAs(true, ...names);
1725
1725
  }
1726
- _setAs(dirty, name) {
1727
- const hasName = !Pacem.Utils.isNullOrEmpty(name);
1726
+ _setAs(dirty, ...names) {
1727
+ const hasNames = !Pacem.Utils.isEmpty(names);
1728
1728
  for (let field in this._fields) {
1729
- if (!hasName || name === field) {
1729
+ if (!hasNames || names.indexOf(field) >= 0) {
1730
1730
  const fld = this._fields[field];
1731
1731
  if (fld instanceof Scaffolding.PacemModelElement) {
1732
1732
  dirty ? fld.setDirty() : fld.setPristine();
@@ -1734,7 +1734,7 @@ disabled="{{ (#${uid}.suddenValidation && (!(#${uid}.valid && #${uid}.dirty))) |
1734
1734
  }
1735
1735
  }
1736
1736
  for (let form of this._subForms) {
1737
- dirty ? form.setDirty(name) : form.setPristine(name);
1737
+ dirty ? form.setDirty(...names) : form.setPristine(...names);
1738
1738
  }
1739
1739
  }
1740
1740
  _checkFieldValidity(name) {