pacem 0.40.0-cosa → 0.40.0-cuzco

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 +5 -4
  16. package/dist/js/pacem-3d.min.js +2 -2
  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 +1 -1
  44. package/dist/js/pacem-numerical.js +1 -1
  45. package/dist/js/pacem-numerical.min.js +1 -1
  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 +1 -1
  50. package/dist/js/pacem-scaffolding.js +3 -3
  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 +2 -2
  55. package/dist/js/swagger-types.d.ts +1 -1
  56. package/package.json +6 -6
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -913,11 +913,12 @@ var Pacem;
913
913
  }
914
914
  return retval;
915
915
  }
916
- const threeJsVersion = '0.128.0';
916
+ const threeJsVersion = '0.152.2', lastOrditCtrlJsVersion = '0.147.0';
917
+ ;
917
918
  const consts = {
918
919
  VERSION: threeJsVersion,
919
- API_URI: `https://unpkg.com/three@${threeJsVersion}/build/three.js`,
920
- ORBIT_URI: `https://unpkg.com/three@${threeJsVersion}/examples/js/controls/OrbitControls.js`,
920
+ API_URI: `https://unpkg.com/three@${threeJsVersion}/build/three.min.js`,
921
+ ORBIT_URI: `https://unpkg.com/three@${lastOrditCtrlJsVersion}/examples/js/controls/OrbitControls.js`,
921
922
  LOADERS: [
922
923
  //`https://unpkg.com/three@${threeJsVersion}/examples/js/loaders/OBJLoader.js`,
923
924
  //`https://unpkg.com/three@${threeJsVersion}/examples/js/loaders/MTLLoader.js`,
@@ -1,6 +1,6 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
6
- var Pacem,__decorate=this&&this.__decorate||function(e,t,r,a){var i,n=arguments.length,s=n<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,r):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,a);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(n<3?i(s):n>3?i(t,r,s):i(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s},__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,r,a,i){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?i.call(e,r):i?i.value=r:t.set(e,r),r},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,r,a){if("a"===r&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?a:"a"===r?a.call(e):a?a.value:t.get(e)};!function(e){!function(t){t.Point3DConverter={convert:t=>e.Geometry.LinearAlgebra.Vector3D.parse(t),convertBack:e=>`${e.x||0} ${e.y||0} ${e.z||0}`},t.QuaternionConverter={convert:t=>e.Geometry.LinearAlgebra.Quaternion.parse(t),convertBack:e=>`${e.x||0} ${e.y||0} ${e.z||0} ${e.w||0}`}}(e.Drawing3D||(e.Drawing3D={}))}(Pacem||(Pacem={})),function(e){!function(e){!function(e){e.Pacem3DDetector=class Pacem3DDetector{constructor(){this._detected={supported:!1,info:{}};let e,t=document.createElement("canvas"),r=["webgl","experimental-webgl","moz-webgl","webkit-3d"],a=function(t){if(t)return e.getParameter(t)},i=(e,t,r)=>{let a=this._detected;(a.info[e]=a.info[e]||{})[t=(t=t.replace(/[^\w]+/g,"")).substring(0,1).toLowerCase()+t.substring(1)]=r};if(navigator.userAgent.indexOf("MSIE")>=0)try{e=window.WebGLHelper.CreateGLContext(t,"canvas")}catch(e){}else for(var n=0;n<r.length;n++)try{if(e=t.getContext(r[n]),e){i("main","Context Name",r[n]);break}}catch(e){}this._detected.supported=!!e,i("main","Platform",navigator.platform),i("main","Agent",navigator.userAgent),e&&(i("main","Vendor",a(e.VENDOR)),i("main","Version",a(e.VERSION)),i("main","Renderer",a(e.RENDERER)),i("main","Shading Language Version",a(e.SHADING_LANGUAGE_VERSION)),i("bits","Rgba Bits",a(e.RED_BITS)+", "+a(e.GREEN_BITS)+", "+a(e.BLUE_BITS)+", "+a(e.ALPHA_BITS)),i("bits","Depth Bits",a(e.DEPTH_BITS)),i("shader","Max Vertex Attribs",a(e.MAX_VERTEX_ATTRIBS)),i("shader","Max Vertex Texture Image Units",a(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS)),i("shader","Max Varying Vectors",a(e.MAX_VARYING_VECTORS)),i("shader","Max Uniform Vectors",a(e.MAX_VERTEX_UNIFORM_VECTORS)),i("tex","Max Combined Texture Image Units",a(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),i("tex","Max Texture Size",a(e.MAX_TEXTURE_SIZE)),i("tex","Max Cube Map Texture Size",a(e.MAX_CUBE_MAP_TEXTURE_SIZE)),i("tex","Num. Compressed Texture Formats",a(e.COMPRESSED_TEXTURE_FORMATS)),i("misc","Max Render Buffer Size",a(e.MAX_RENDERBUFFER_SIZE)),i("misc","Max Viewport Dimensions",a(e.MAX_VIEWPORT_DIMS)),i("misc","Aliased Line Width Range",a(e.ALIASED_LINE_WIDTH_RANGE)),i("misc","Aliased Point Size Range",a(e.ALIASED_POINT_SIZE_RANGE)),i("misc","Supported Extensions",e.getSupportedExtensions()||[]))}get info(){return this._detected.info}get supported(){return this._detected.supported}}}(e.Drawing3D||(e.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){class NodeGeometry{constructor(e=[]){this.positions=e}barycenter(){const t=this.positions;var r={x:0,y:0,z:0};if(!e.Utils.isNullOrEmpty(t)){for(var a=t.length,i=0;i<t.length;i++){var n=t[i];r.x+=n.x,r.y+=n.y,r.z+=n.z}var s=1*a;r.x/=s,r.y/=s,r.z/=s}return r}boundingBox(){const t=this.positions,r={minX:1/0,minY:1/0,minZ:1/0,maxX:-1/0,maxY:-1/0,maxZ:-1/0};if(!e.Utils.isNullOrEmpty(t))for(var a=0;a<t.length;a++){var i=t[a];r.minX=Math.min(r.minX,i.x),r.minY=Math.min(r.minY,i.y),r.minZ=Math.min(r.minZ,i.z),r.maxX=Math.max(r.maxX,i.x),r.maxY=Math.max(r.maxY,i.y),r.maxZ=Math.max(r.maxZ,i.z)}return r}}t.NodeGeometry=NodeGeometry;t.LineGeometry=class LineGeometry extends NodeGeometry{};t.MeshGeometry=class MeshGeometry extends NodeGeometry{constructor(e,t,r=[],a=[]){super(e),this.triangleIndices=t,this.textureCoordinates=r,this.normals=a}}}(e.Drawing3D||(e.Drawing3D={}))}(Pacem||(Pacem={})),function(e){!function(t){var r;function a(t){return!e.Utils.isNull(t)&&"render"in t&&"function"==typeof t.render}function i(t){return!e.Utils.isNull(t)&&"stage"in t&&a(t.stage)}function n(e){return"transformMatrix"in e&&i(e)}t.isStage=a,t.isRenderable=i,t.isUi3DObject=n,t.isMesh=function(e){return n(e)&&"geometry"in e},t.isGroup=function(t){return n(t)&&"items"in t&&!e.Utils.isNullOrEmpty(t.items)},t.computeSharpVertexNormals=function(t){const r=[];if(!e.Utils.isNullOrEmpty(t)){const a=t.triangleIndices;if(a.length%3!=0)throw new RangeError(`Invalid mesh geometry: ${a.length} is not multiple of 3.`);for(let i=2;i<a.length;i+=3){const n=a[i-2],s=a[i-1],o=a[i],c=t.positions[n],l=t.positions[s],m=t.positions[o],h=e.Geometry.LinearAlgebra.Vector3D.subtract(c,l),p=e.Geometry.LinearAlgebra.Vector3D.subtract(c,m),d=e.Geometry.LinearAlgebra.Vector3D.cross(p,h),u=e.Geometry.LinearAlgebra.Vector3D.unit(d);r.push(u,u,u)}}t.normals=r};class UI3DEvent extends e.CustomUIEvent{constructor(e,t,a,i){super(e,t,a),r.set(this,void 0),__classPrivateFieldSet(this,r,i,"f")}get point(){return __classPrivateFieldGet(this,r,"f")}}r=new WeakMap,t.UI3DEvent=UI3DEvent;t.DragEvent=class DragEvent extends UI3DEvent{};t.RenderableEvent=class RenderableEvent extends UI3DEvent{constructor(e,t,r,a){super(e,{detail:t,bubbles:!0,cancelable:!0},r,a)}}}(e.Drawing3D||(e.Drawing3D={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(r){var a;r.TAG_MIDDLE_NAME="3d",r.DEG2RAD=Math.PI/180;const i={OBJECT_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-object",LIGHT_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-light",CAMERA_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-camera",LINE_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-line",MESH_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-mesh",GROUP_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-group",DEFAULT_COORDS:{x:0,y:0,z:0}};let n;!function(e){e.Position="position",e.Transform="transform",e.Geometry="geometry",e.Children="children",e.Material="material",e.Light="light",e.Camera="camera"}(n=r.StalePropertyFlag||(r.StalePropertyFlag={}));class RenderableElement extends t.PacemCrossItemsContainerElement{constructor(){super(...arguments),a.set(this,[]),this.position=i.DEFAULT_COORDS}validate(e){return!1}findContainer(){return this.parent||this.stage}get stage(){return this._scene=this._scene||e.CustomElementUtils.findAncestorOfType(this,r.Pacem3DElement)}get parent(){return this._drawableParent=this._drawableParent||e.CustomElementUtils.findAncestor(this,(e=>e instanceof RenderableElement))}get flags(){return __classPrivateFieldGet(this,a,"f")}disconnectedCallback(){delete this._scene,delete this._drawableParent,super.disconnectedCallback()}propertyChangedCallback(e,t,r,a){switch(super.propertyChangedCallback(e,t,r,a),e){case"hide":this.setAsDirty();break;case"items":this.setAsDirty(n.Children);break;case"position":this.setAsDirty(n.Position)}}setAsDirty(...e){for(let t of e)this.flags.includes(t)||this.flags.push(t);this.stage?.render(this)}}a=new WeakMap,__decorate([e.Watch({emit:!1,converter:e.Drawing3D.Point3DConverter})],RenderableElement.prototype,"position",void 0),__decorate([e.Watch({emit:!1,reflectBack:!0,converter:e.PropertyConverters.String})],RenderableElement.prototype,"tag",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],RenderableElement.prototype,"inert",void 0),r.RenderableElement=RenderableElement;class Ui3DElement extends RenderableElement{propertyChangedCallback(e,t,r,a){switch(super.propertyChangedCallback(e,t,r,a),e){case"transformMatrix":this.setAsDirty(n.Transform);break;case"rotate":case"scaleX":case"scaleY":case"translateX":case"translateY":this._computeTransformMatrix()}}_computeTransformMatrix(){const t=e.Utils.isNull(this.rotate)?e.Geometry.LinearAlgebra.Matrix3D.identity():e.Geometry.LinearAlgebra.Quaternion.toRotationMatrix(this.rotate);this.translateX&&(t.offsetX=this.translateX),this.translateY&&(t.offsetY=this.translateY),this.translateZ&&(t.offsetZ=this.translateZ),this.scaleX&&(t.m11=this.scaleX),this.scaleY&&(t.m22=this.scaleY),this.scaleZ&&(t.m33=this.scaleZ),this.transformMatrix=t}}__decorate([e.Watch({emit:!1,converter:e.Drawing3D.QuaternionConverter})],Ui3DElement.prototype,"rotate",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"scaleX",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"scaleY",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"scaleZ",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"translateX",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"translateY",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"translateZ",void 0),__decorate([e.Watch({emit:!1})],Ui3DElement.prototype,"transformMatrix",void 0),r.Ui3DElement=Ui3DElement;let s=class Pacem3DGroupElement extends Ui3DElement{validate(e){return e instanceof RenderableElement}};s=__decorate([e.CustomElement({tagName:i.GROUP_SELECTOR})],s),r.Pacem3DGroupElement=s;let o=class Pacem3DMeshElement extends Ui3DElement{propertyChangedCallback(e,t,r,a){switch(super.propertyChangedCallback(e,t,r,a),e){case"geometry":this.setAsDirty(n.Geometry);break;case"material":case"backMaterial":this.setAsDirty(n.Material)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],o.prototype,"geometry",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],o.prototype,"material",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],o.prototype,"backMaterial",void 0),o=__decorate([e.CustomElement({tagName:i.MESH_SELECTOR})],o),r.Pacem3DMeshElement=o;let c=class Pacem3DObjectElement extends Ui3DElement{propertyChangedCallback(e,t,r,a){super.propertyChangedCallback(e,t,r,a),"content"!==e&&"type"!==e||this.setAsDirty(n.Geometry,n.Material)}};__decorate([e.Watch({emit:!1})],c.prototype,"content",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],c.prototype,"type",void 0),c=__decorate([e.CustomElement({tagName:i.OBJECT_SELECTOR})],c),r.Pacem3DObjectElement=c;let l=class Pacem3DLightElement extends RenderableElement{constructor(){super(...arguments),this.intensity=.25,this.target=i.DEFAULT_COORDS,this.color="#fff",this.type="omni"}propertyChangedCallback(e,t,r,a){switch(super.propertyChangedCallback(e,t,r,a),e){case"type":case"color":case"intensity":case"target":this.setAsDirty(n.Light)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],l.prototype,"intensity",void 0),__decorate([e.Watch({emit:!1,converter:e.Drawing3D.Point3DConverter})],l.prototype,"target",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],l.prototype,"color",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],l.prototype,"type",void 0),l=__decorate([e.CustomElement({tagName:i.LIGHT_SELECTOR})],l),r.Pacem3DLightElement=l;let m=class Pacem3DCameraElement extends RenderableElement{constructor(){super(...arguments),this.fov=45,this.aspect=1.78,this.near=.1,this.far=1e3,this.type="perspective",this.lookAt=i.DEFAULT_COORDS}propertyChangedCallback(e,t,r,a){switch(super.propertyChangedCallback(e,t,r,a),e){case"fov":case"aspect":case"near":case"far":case"type":case"lookAt":this.setAsDirty(n.Camera)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],m.prototype,"fov",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],m.prototype,"aspect",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],m.prototype,"near",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],m.prototype,"far",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],m.prototype,"type",void 0),__decorate([e.Watch({emit:!1,converter:e.Drawing3D.Point3DConverter})],m.prototype,"lookAt",void 0),m=__decorate([e.CustomElement({tagName:i.CAMERA_SELECTOR})],m),r.Pacem3DCameraElement=m;class Pacem3DAdapterElement extends t.PacemEventTarget{}r.Pacem3DAdapterElement=Pacem3DAdapterElement}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(r){var a;let i=class Pacem3DElement extends t.PacemItemsContainerElement{constructor(){super(...arguments),this._addHandler=e=>{this._add(e.target)},this._clickHandler=t=>{let r=this;if(!r.interactive||e.Utils.isNull(r._lastHitResult))return;const a=t.type.replace(/^mouse/,""),i=r._lastHitResult,n=i.object,s=i.point;this._itemDispatch(n,s,a,t)},this._moveHandler=t=>{let r=this;if(!r.adapter||!r.interactive)return;const a=r._resizer.currentSize;let i=r.adapter.raycast({x:t.pageX-a.left,y:t.pageY-a.top},a);if(i!=r._lastHitResult){if(i?.object!=r._lastHitResult?.object){const a=i?.object,n=r._lastHitResult?.object,s=i?.point;e.Utils.isNull(n)||this._itemDispatch(n,s,"out",t),e.Utils.isNull(a)||this._itemDispatch(a,s,"over",t)}r._lastHitResult=i}},a.set(this,void 0),this._resizeHandler=r=>{const i=__classPrivateFieldSet(this,a,r.detail,"f"),n=this.adapter;e.Utils.isNull(n)||(this.adapter.invalidateSize(i),this.dispatchEvent(new t.ResizeEvent(i)))}}validate(e){return e instanceof r.RenderableElement}get stage(){return this._container}get scene(){return this.adapter&&this.adapter.scene}register(t){const r=super.register(t);return r&&(this._add(t),t.addEventListener(e.PropertyChangeEventName,this._addHandler,!1)),r}unregister(t){const r=super.unregister(t);return r&&(t.removeEventListener(e.PropertyChangeEventName,this._addHandler,!1),this._erase(t)),r}_add(e){this.adapter&&this.adapter.addItem(e)}_erase(e){this.adapter&&this.adapter.removeItem(e)}_initializeAdapter(t,r){return new Promise(((a,i)=>{e.Utils.isNull(t)||this.items.forEach((e=>t.removeItem(e))),e.Utils.isNull(this._container)||e.Utils.isNull(r)||r.initialize(this).then((e=>{this.items.forEach((e=>this._add(e)))}),(t=>{this.log(e.Logging.LogLevel.Error,t?.toString())})),a()}))}propertyChangedCallback(t,r,a,i){super.propertyChangedCallback(t,r,a,i),e.Utils.isNull(this._container)||"adapter"!==t||i||this._initializeAdapter(r,a)}viewActivatedCallback(){super.viewActivatedCallback();const e=this._container,t=this._resizer;t.addEventListener("resize",this._resizeHandler,!1),t.target=e,this._initializeAdapter(null,this.adapter).then((t=>{e.addEventListener("mousemove",this._moveHandler,!1),e.addEventListener("click",this._clickHandler,!1),e.addEventListener("mouseup",this._clickHandler,!1),e.addEventListener("mousedown",this._clickHandler,!1),this.render()}))}_itemDispatch(t,r,a,i){if(!e.Utils.isNull(t)){var n,s,o;i instanceof Event?s=i:n={item:t,offset:i},"string"==typeof a?o=a:(o=a.type,s=a.originalEvent);const l=r,m=()=>i instanceof Event?new e.Drawing3D.RenderableEvent(o,t,s,l):new e.Drawing3D.DragEvent(o,{detail:n,cancelable:o===e.UI.DragDropEventType.Init||o===e.UI.DragDropEventType.Drag},s,l),h=i instanceof Event?new e.Drawing3D.RenderableEvent("item"+o,t,s,l):new e.Drawing3D.DragEvent("item"+o,{detail:n,cancelable:o===e.UI.DragDropEventType.Init||o===e.UI.DragDropEventType.Drag},s,l);var c=!1;if(t instanceof EventTarget){const e=m();t.dispatchEvent(e),c=e.defaultPrevented}return t.stage.dispatchEvent(h),c||h.defaultPrevented}return!1}disconnectedCallback(){const t=this._resizer,r=this._container;e.Utils.isNull(r)||(r.removeEventListener("click",this._clickHandler,!1),r.removeEventListener("mouseup",this._clickHandler,!1),r.removeEventListener("mousedown",this._clickHandler,!1),r.removeEventListener("mousemove",this._moveHandler,!1)),e.Utils.isNull(t)||t.removeEventListener("resize",this._resizeHandler,!1),super.disconnectedCallback()}get size(){return __classPrivateFieldGet(this,a,"f")}render(t,r){if(e.Utils.isNull(t)){if(requestAnimationFrame((()=>this.render())),!this.disabled&&!e.Utils.isNull(this.adapter)){let e=new CustomEvent("prerender",{detail:{scene:this.adapter.scene},cancelable:!0});this.dispatchEvent(e),e.defaultPrevented||(this.adapter.render(),this.dispatchEvent(new CustomEvent("render",{detail:{scene:this.adapter.scene}})))}}else{const r=this.adapter;e.Utils.isNull(r)||r.updateItem(t)}}};a=new WeakMap,__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],i.prototype,"interactive",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],i.prototype,"orbit",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Element})],i.prototype,"adapter",void 0),__decorate([e.ViewChild(`.${e.PCSS}-3d`)],i.prototype,"_container",void 0),__decorate([e.ViewChild(e.P+"-resize")],i.prototype,"_resizer",void 0),i=__decorate([e.CustomElement({tagName:e.P+"-"+r.TAG_MIDDLE_NAME,shadow:e.Defaults.USE_SHADOW_ROOT,template:`<${e.P}-resize watch-position="true"></${e.P}-resize><div class="${e.PCSS}-3d"></div><${e.P}-content></${e.P}-content>`})],i),r.Pacem3DElement=i}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(e){let t;function r(e){return"shader"in e}!function(e){e.Basic="basic",e.Lambert="lambert",e.Phong="phong",e.Standard="standard",e.Line="line"}(t=e.KnownShader||(e.KnownShader={})),e.isMaterial=r,e.isBasicMaterial=function(e){return r(e)&&e.shader===t.Basic},e.isLineMaterial=function(e){return r(e)&&e.shader===t.Line},e.isLambertMaterial=function(e){return r(e)&&e.shader===t.Lambert},e.isPhongMaterial=function(e){return r(e)&&e.shader===t.Phong},e.isStandardMaterial=function(e){return r(e)&&e.shader===t.Standard}}(e.Drawing3D||(e.Drawing3D={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(r){var a;class MaterialElement extends t.PacemEventTarget{constructor(e){super(),a.set(this,void 0),__classPrivateFieldSet(this,a,e,"f")}get shader(){return __classPrivateFieldGet(this,a,"f")}propertyChangedCallback(e,t,r,a){if(super.propertyChangedCallback(e,t,r,a),!a)switch(e){case"opacity":case"wireframe":case"color":case"visible":case"map":this.updateMaterial()}}viewActivatedCallback(){super.viewActivatedCallback(),this.updateMaterial()}updateMaterial(){this.material=this.createMaterial()}createMaterial(){return{opacity:this.opacity??1,wireframe:this.wireframe??!1,color:this.color||e.Utils.Css.getVariableValue(`--${e.PCSS}-color-primary`),visible:this.visible??!0,map:this.map,shader:this.shader}}}a=new WeakMap,__decorate([e.Watch()],MaterialElement.prototype,"material",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],MaterialElement.prototype,"opacity",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],MaterialElement.prototype,"wireframe",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],MaterialElement.prototype,"color",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],MaterialElement.prototype,"visible",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],MaterialElement.prototype,"map",void 0),r.MaterialElement=MaterialElement}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){function r(e){const t=[];for(let a of e)"x"in(r=a)&&"number"==typeof r.x&&"y"in r&&"number"==typeof r.y&&"z"in r&&"number"==typeof r.z?t.push(a.x,a.y,a.z):t.push(a.x,a.y);var r;return t}const a="0.128.0",i={VERSION:a,API_URI:`https://unpkg.com/three@${a}/build/three.js`,ORBIT_URI:`https://unpkg.com/three@${a}/examples/js/controls/OrbitControls.js`,LOADERS:[],DEFAULT_MATERIAL:function(){return new THREE.MeshStandardMaterial({color:"#069",flatShading:!0})}};function n(t){if(e.Utils.isNull(t))return null;const r={color:t.color,opacity:t.opacity??1,transparent:!0,wireframe:t.wireframe??!1,visible:t.visible??!0},a=e.Utils.extend({},r,{wireframe:t.wireframe??!1}),i=e=>(t.map&&(e.map=(new THREE.TextureLoader).load(t.map,(t=>{e.needsUpdate=!0}))),e);if(e.Drawing3D.isStandardMaterial(t)){return i(new THREE.MeshStandardMaterial(e.Utils.extend(a,{roughness:t.roughness,metalness:t.metalness,emissive:t.emissiveColor,flatShading:t.flatShading,refractionRatio:t.refractionRatio})))}if(e.Drawing3D.isPhongMaterial(t)){return i(new THREE.MeshPhongMaterial(e.Utils.extend(a,{shininess:t.shininess,emissive:t.emissiveColor,flatShading:t.flatShading,specular:t.specularColor,reflectivity:t.reflectivity,refractionRatio:t.refractionRatio})))}if(e.Drawing3D.isLambertMaterial(t)){return i(new THREE.MeshLambertMaterial(e.Utils.extend(a,{emissive:t.emissiveColor,reflectivity:t.reflectivity,refractionRatio:t.refractionRatio})))}if(e.Drawing3D.isLineMaterial(t)){const a=t.dashArray&&t.dashArray[0]||null,i=t.dashArray&&t.dashArray.length>1&&t.dashArray[1]||a,n=e.Utils.extend(r,{linecap:t.lineCap??"round",linejoin:t.lineJoin??"round",linewidth:t.lineWidth??1});return e.Utils.isNullOrEmpty(t.dashArray)?new THREE.LineBasicMaterial(n):new THREE.LineDashedMaterial(e.Utils.extend({dashSize:a,gapSize:i},n))}if(e.Drawing3D.isMaterial(t)){return i(new THREE.MeshBasicMaterial(a))}return null}function s(t){if(e.Utils.isNullOrEmpty(t.content))throw new Error("Missing content.");{const e=t.type?.toLowerCase();if("obj"===e){return(new THREE.OBJLoader).parse(t.content)}return(new THREE.ObjectLoader).parse(t.content)}}function o(t){if(e.Utils.isNullOrEmpty(t.geometry))return null;return new(t.geometry instanceof e.Drawing3D.LineGeometry?THREE.Line:THREE.Mesh)}function c(){return"THREE"in window}let l=class Pacem3DThreeAdapterElement extends t.Pacem3DAdapterElement{constructor(){super(...arguments),this._renderer=null,this._camera=null,this._scene=null,this._orbitCtrls=null,this._objects=new WeakMap,this._dict={},this._orbitControlsDelegate=e=>{},this._ensureAndRefresh=(a,c,l)=>{if(c.matrixAutoUpdate=!1,c.visible=!a.hide){if(e.Drawing3D.isMesh(a)){let s=c;if(a.flags.indexOf(t.StalePropertyFlag.Geometry)>=0){s.geometry.dispose();const t=o(a);t.constructor.name!==s.constructor.name&&(l.remove(c),delete this._dict[c.id],c=s=t),s.geometry=function(t){const a=new THREE.BufferGeometry,i=r(t.positions);if(a.setAttribute("position",new THREE.Float32BufferAttribute(i,3)),t instanceof e.Drawing3D.MeshGeometry){e.Utils.isNullOrEmpty(t.triangleIndices)||a.setIndex(t.triangleIndices);const i=r(t.positions);a.setAttribute("position",new THREE.Float32BufferAttribute(i,3));const n=r(t.textureCoordinates);if(a.setAttribute("uv",new THREE.Float32BufferAttribute(n,2)),e.Utils.isNullOrEmpty(t.normals))a.computeVertexNormals();else{const e=r(t.normals);a.setAttribute("normal",new THREE.Float32BufferAttribute(e,3))}}return a}(a.geometry)}if(a.flags.indexOf(t.StalePropertyFlag.Material)>=0){if(e.Utils.isArray(s.material))for(let e of s.material)e.dispose();else s.material.dispose();s.material=function(t,r,a){const i=a,s=[],o=n(t);if(e.Utils.isNull(o)||(o.side=THREE.FrontSide,s.push(o)),!e.Utils.isNull(r))if(r==t)o.side=THREE.DoubleSide;else{const t=n(r);e.Utils.isNull(t)||(t.side=THREE.BackSide,s.push(t))}return i&&s.length>1?s:o}(a.material)||i.DEFAULT_MATERIAL()}}else if(a instanceof t.Pacem3DObjectElement&&(a.flags.indexOf(t.StalePropertyFlag.Material)>=0||a.flags.indexOf(t.StalePropertyFlag.Geometry)>=0))c.parent&&c.parent.remove(c),c=s(a);else if(a instanceof t.Pacem3DGroupElement){if(a.flags.indexOf(t.StalePropertyFlag.Children)>=0){for(let e=c.children.length-1;e>=0;e--){const t=c.children[e];c.remove(t)}for(let e of a.items)this._addOrUpdateItem(e,c)}}else if(a instanceof t.Pacem3DLightElement){const e=c;a.flags.indexOf(t.StalePropertyFlag.Light)>=0&&(e.color=new THREE.Color(a.color),e.intensity=a.intensity)}let h=a.position;if(e.Drawing3D.isUi3DObject(a)&&!e.Utils.isNull(a.transformMatrix)&&(a.flags.indexOf(t.StalePropertyFlag.Position)>=0||a.flags.indexOf(t.StalePropertyFlag.Transform)>=0)){const t=e.Geometry.LinearAlgebra.Matrix3D.from(1,0,0,0,0,1,0,0,0,0,1,0,h.x,h.y,h.z,1),r=e.Geometry.LinearAlgebra.Matrix3D.multiply(a.transformMatrix,t);THREE.Matrix4.prototype.set.apply(c.matrix,[(m=r).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])}else a.flags.indexOf(t.StalePropertyFlag.Position)>=0&&(c.position.set(h.x,h.y,h.z),c.updateMatrix())}var m;return c.userData=a.tag,e.Utils.isNull(l.getObjectById(c.id))&&(l.add(c),this._dict[c.id]=a),a.flags.splice(0),c}}dispose(e){}project(t){if(e.Utils.isNull(this._camera)||e.Utils.isNull(this._stage))return null;const r=new THREE.Vector3(t.x,t.y,t.z),a=this._stage.width/2,i=this._stage.height/2,n=r.project(this._camera);return{x:n.x*a+a,y:-n.y*i+i}}zoomFit(...t){return new Promise(((r,a)=>{const i=this._camera,n=this._objects,s=t.filter((e=>n.has(e))).map((e=>n.get(e)));(e.Utils.isNull(i)||e.Utils.isNullOrEmpty(s))&&r(),function(t,r,a,i=1.333){const n=new THREE.Box3;for(const e of a)n.expandByObject(e);const s=n.getSize(new THREE.Vector3),o=n.getCenter(new THREE.Vector3),c=Math.max(s.x,s.y,s.z)/(2*Math.atan(Math.PI*t.fov/360)),l=c/t.aspect,m=i*Math.max(c,l),h=!e.Utils.isNull(r);var p;h&&(p=r.target.clone().sub(t.position).normalize().multiplyScalar(m),r.maxDistance=10*m,r.target.copy(o)),t.near=m/100,t.far=100*m,t.updateProjectionMatrix(),h&&(t.position.copy(r.target).sub(p),r.update())}(i,this._orbitCtrls,s),r()}))}get scene(){return this._scene}raycast(t,r){if(c()&&!e.Utils.isNull(this._camera)){const e=this._camera,a=new THREE.Vector2(t.x/r.width*2-1,-t.y/r.height*2+1),i=new THREE.Raycaster;i.setFromCamera(a,e);const n=i.intersectObjects(this._scene.children,!0);let s,o,c=0;for(;n.length>c&&(o=n[c++])&&(s=o.object);){if(this._dict[s.id].inert)continue;const e=o.point,t={x:e.x,y:e.y,z:e.z};return{object:this._dict[s.id],point:t}}}return null}async initialize(t){if(!e.Utils.isNull(this._stage))return this._stage;this._3d=t;const r=t.stage,a=this._stage=document.createElement("canvas");r.innerHTML="",r.appendChild(a),await e.CustomElementUtils.importjs(i.API_URI),await async function(...e){const t=Date.now();var r=!1;do{r=c();for(let t of e)r&&=t();r||await new Promise((e=>setTimeout(e,500)))}while(!r&&Date.now()-t<3e4);if(!r)throw new Error("The wait for THREE adapter initialization timed out.")}(),await Promise.all([e.CustomElementUtils.importjs(i.ORBIT_URI)].concat(i.LOADERS.map((t=>e.CustomElementUtils.importjs(t))))),this._scene=new THREE.Scene,this.invalidateSize(t.size);let n=this._stage.width,s=this._stage.height,o={canvas:a,antialias:!0,stencil:!1,alpha:!0};return this._renderer=new THREE.WebGLRenderer(o),this._renderer.setSize(n,s),this.orbit=t.orbit,a}_setCamera(e){this._camera=e,this.invalidateSize(this._3d.size),this._disposeOrbitControls(),this.orbit&&this._initOrbitControls()}propertyChangedCallback(e,t,r,a){super.propertyChangedCallback(e,t,r,a),"orbit"===e&&(!0===r?this._initOrbitControls():this._disposeOrbitControls())}_initOrbitControls(){const t=this._camera;if(e.Utils.isNull(this._3d)||e.Utils.isNull(t))return;(this._orbitCtrls=new THREE.OrbitControls(t,this._3d.stage)).addEventListener("change",this._orbitControlsDelegate)}_disposeOrbitControls(){const t=this._orbitCtrls;e.Utils.isNull(t)||(t.removeEventListener("change",this._orbitControlsDelegate),t.dispose())}invalidateSize(t){if(!c()||e.Utils.isNull(t))return;let r=t.width,a=t.height;this._stage.width=r,this._stage.height=a;let i=this._camera;i instanceof THREE.PerspectiveCamera&&(i.aspect=r/a,i.updateProjectionMatrix()),this._renderer&&this._renderer.setSize(r,a)}removeItem(t){const r=this._objects,a=r.get(t);e.Utils.isNull(a)||(this._scene.remove(a),delete this._dict[a.id],r.delete(t))}updateItem(e){this._addOrUpdateItem(e)}addItem(e){this._addOrUpdateItem(e)}_addOrUpdateItem(r,a=this._scene){if(c()&&!e.Utils.isNull(a))if(r instanceof t.Pacem3DCameraElement){if("perspective"===r.type){if(this._camera instanceof THREE.PerspectiveCamera)var i=this._camera;else i=new THREE.PerspectiveCamera;const t=new THREE.Vector3(r.lookAt.x,r.lookAt.y,r.lookAt.z);i.lookAt(t),i.fov=r.fov,i.aspect=r.aspect,i.near=r.near,i.far=r.far,i.position.set(r.position.x,r.position.y,r.position.z),this._setCamera(i);const a=this._orbitCtrls;e.Utils.isNull(a)||a.object!==i||(a.target=t,a.update())}}else if(this._objects.has(r)){const e=this._objects.get(r),t=this._ensureAndRefresh(r,e,a);t!=e&&this._objects.set(r,t)}else{const e=e=>{e&&(e=this._ensureAndRefresh(r,e,a),this._objects.set(r,e))};if(r instanceof t.Pacem3DObjectElement){e(s(r))}else if(r instanceof t.Pacem3DMeshElement){e(o(r))}else if(r instanceof t.Pacem3DLightElement){const t=function(e){var t;if("spot"===e.type){const r=new THREE.SpotLight;r.target.position.set(e.target.x,e.target.y,e.target.z),t=r}else t=new THREE.PointLight;return t}(r);e(t)}else if(r instanceof t.Pacem3DGroupElement){e(new THREE.Group)}}}render(){this._camera&&this._renderer.render(this._scene,this._camera)}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],l.prototype,"orbit",void 0),l=__decorate([e.CustomElement({tagName:e.P+"-3d-three-adapter"})],l),t.Pacem3DThreeAdapterElement=l}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){let r=class BasicMaterialElement extends t.MaterialElement{constructor(){super(e.Drawing3D.KnownShader.Basic)}};r=__decorate([e.CustomElement({tagName:`${e.P}-${t.TAG_MIDDLE_NAME}-material-basic`})],r),t.BasicMaterialElement=r}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){let r=class LambertMaterialElement extends t.MaterialElement{constructor(){super(e.Drawing3D.KnownShader.Lambert)}createMaterial(){return e.Utils.extend({emissiveColor:this.emissiveColor||"#000",reflectivity:this.reflectivity??0,refractionRatio:this.refractionRatio??0},super.createMaterial())}propertyChangedCallback(e,t,r,a){if(super.propertyChangedCallback(e,t,r,a),!a)switch(e){case"emissiveColor":case"reflectivity":case"refractionRatio":this.updateMaterial()}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"emissiveColor",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"reflectivity",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"refractionRatio",void 0),r=__decorate([e.CustomElement({tagName:`${e.P}-${t.TAG_MIDDLE_NAME}-material-lambert`})],r),t.LambertMaterialElement=r}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){let r=class LineMaterialElement extends t.MaterialElement{constructor(){super(e.Drawing3D.KnownShader.Line)}createMaterial(){return e.Utils.extend({lineWidth:this.lineWidth??1,lineJoin:this.lineJoin??"round",lineCap:this.lineCap??"round",dashArray:this.dashArray},super.createMaterial())}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"lineWidth",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"lineJoin",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"lineCap",void 0),__decorate([e.Watch({emit:!1,converter:{convert:e=>e?.split(",").map((e=>parseInt(e))).filter((e=>!Number.isNaN(e))),convertBack:e=>e?.join(",")}})],r.prototype,"dashArray",void 0),r=__decorate([e.CustomElement({tagName:`${e.P}-${t.TAG_MIDDLE_NAME}-material-line`})],r),t.LineMaterialElement=r}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){let r=class PhongMaterialElement extends t.MaterialElement{constructor(){super(e.Drawing3D.KnownShader.Phong)}createMaterial(){return e.Utils.extend({emissiveColor:this.emissiveColor||"#000",reflectivity:this.reflectivity??0,refractionRatio:this.refractionRatio??0,specularColor:this.specularColor||"#000",shininess:this.shininess??0,flatShading:this.flatShading??!0},super.createMaterial())}propertyChangedCallback(e,t,r,a){if(super.propertyChangedCallback(e,t,r,a),!a)switch(e){case"emissiveColor":case"reflectivity":case"refractionRatio":case"specularColor":case"shininess":case"flatShading":this.updateMaterial()}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"emissiveColor",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"reflectivity",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"refractionRatio",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"specularColor",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"shininess",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],r.prototype,"flatShading",void 0),r=__decorate([e.CustomElement({tagName:`${e.P}-${t.TAG_MIDDLE_NAME}-material-phong`})],r),t.PhongMaterialElement=r}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){let r=class StandardMaterialElement extends t.MaterialElement{constructor(){super(e.Drawing3D.KnownShader.Standard)}createMaterial(){return e.Utils.extend({emissiveColor:this.emissiveColor||"#000",refractionRatio:this.refractionRatio??0,metalness:this.metalness??0,roughness:this.roughness??0,flatShading:this.flatShading??!1},super.createMaterial())}propertyChangedCallback(e,t,r,a){if(super.propertyChangedCallback(e,t,r,a),!a)switch(e){case"emissiveColor":case"roughness":case"metalness":case"refractionRatio":case"flatShading":this.updateMaterial()}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"emissiveColor",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"refractionRatio",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"roughness",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"metalness",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],r.prototype,"flatShading",void 0),r=__decorate([e.CustomElement({tagName:`${e.P}-${t.TAG_MIDDLE_NAME}-material-standard`})],r),t.StandardMaterialElement=r}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){class OBJParser{static parse(r){const a=[],i=/^v((\s+-?[\d\.]+){3})/gm;let n=i.exec(r);for(;n&&n.length;)a.push(t.Point3DConverter.convert(n[1])),n=i.exec(r);const s=[],o=/^vt((\s+-?[\d\.]+){2})/gm;for(n=o.exec(r);n&&n.length;)s.push(e.Point.parse(n[1])),n=o.exec(r);const c=new Array(s.length),l=[],m=/^vn((\s+-?[\d\.]+){3})/gm;for(n=m.exec(r);n&&n.length;)l.push(t.Point3DConverter.convert(n[1])),n=m.exec(r);const h=new Array(l.length),p=[],d=/^f((\s+([\d]+\/[\d]+\/[\d]+)){3,})/gm;for(n=d.exec(r);n&&n.length;){const e=/([\d]+)\/([\d]+)\/([\d]+)/g,t=n[1];let i=e.exec(t),o=0;for(var u,y,v,_,g,f,E=p.length;i&&i.length;)o>2&&(p.push(a[u]),c[E]=s[y],h[E]=l[v],E++,p.push(a[_]),c[E]=s[g],h[E]=l[f],E++),_=parseInt(i[1])-1,g=parseInt(i[2])-1,f=parseInt(i[3])-1,p.push(a[_]),c[E]=s[g],h[E]=l[f],0===o&&(u=_,y=g,v=f),o++,E++,i=e.exec(t);n=d.exec(r)}return new t.MeshGeometry(p,[],c,h)}}__decorate([e.Transformer("parse3D")],class Parser3D{static parseGeometry(e,t){if("obj"===t.toLowerCase())return OBJParser.parse(e);throw new Error(`Type '${t}' is not supported.`)}},"parseGeometry",null)}(e.Drawing3D||(e.Drawing3D={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(r){class Pacem3DPrimitiveElement extends t.PacemEventTarget{viewActivatedCallback(){super.viewActivatedCallback(),e.Utils.isNull(this.geometry)&&(this.geometry=this.createDefaultGeometry())}}__decorate([e.Watch({converter:e.PropertyConverters.Json})],Pacem3DPrimitiveElement.prototype,"geometry",void 0),r.Pacem3DPrimitiveElement=Pacem3DPrimitiveElement}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;let a=r=class PacemBoxElement extends t.Pacem3DPrimitiveElement{static createMeshGeometry(t,r,a,i,n,s){const o=t||1,c=r||1,l=a||1,m=i||1,h=n||1,p=s||1,d=[],u=[],y=[];for(var v=0;v<=h;v++)for(var _=c/2-c*(1*v)/(1*h),g=0;g<=p;g++)for(var f=-l/2+l*(1*g)/(1*p),E=0;E<=m;E++){var D=-o/2+o*(1*E)/(1*m);0!=E&&E!=m&&0!=g&&g!=p&&0!=v&&v!=h||d.push({x:D,y:_,z:f})}var C=function(e,t,r){for(var a=1e-5,i=0;i<d.length;i++){var n=d[i];if(Math.abs(n.x-e)<a&&Math.abs(n.y-t)<a&&Math.abs(n.z-r)<a)return i}return-1},P=function(e,t,r,a,i,n,s,o){y.push(e),y.push(t),y.push(r),y.push(e),y.push(r),y.push(a),u.push({x:i,y:o}),u.push({x:s,y:o}),u.push({x:s,y:n}),u.push({x:i,y:o}),u.push({x:s,y:n}),u.push({x:i,y:n})};for(g=0;g<p;g++){_=c/2,f=-l/2+l*(1*g)/(1*p);var M=-l/2+l*(1*(g+1))/(1*p);for(E=0;E<m;E++){var b=-o/2+1*(E+1)*o/(1*m);P(C(D=-o/2+1*E*o/(1*m),_,M),C(b,_,M),C(b,_,f),C(D,_,f),1*E/(1*m),1-1*g/(1*p),1*(E+1)/(1*m),1-1*(g+1)/(1*p))}}for(v=0;v<h;v++){_=c/2-1*v*c/(1*h);var w=c/2-(v+1)*c/(1*h);for(f=-l/2,E=0;E<m;E++){b=o/2-(E+1)*o/(1*m);P(C(D=o/2-1*E*o/(1*m),w,f),C(b,w,f),C(b,_,f),C(D,_,f),1*E/(1*m),1-1*v/(1*h),(E+1)/(1*m),1-(v+1)/(1*h))}}for(v=0;v<h;v++)for(_=c/2-1*v*c/(1*h),w=c/2-(v+1)*c/(1*h),D=-o/2,g=0;g<p;g++){M=-l/2+(g+1)*l/(1*p);P(C(D,w,f=-l/2+g*l/(1*p)),C(D,w,M),C(D,_,M),C(D,_,f),1*g/(1*p),1-v/(1*h),(g+1)/(1*p),1-(v+1)/(1*h))}for(v=0;v<h;v++)for(_=c/2-v*c/(1*h),w=c/2-(v+1)*c/(1*h),f=l/2,E=0;E<m;E++){b=-o/2+(E+1)*o/(1*m);P(C(D=-o/2+E*o/(1*m),w,f),C(b,w,f),C(b,_,f),C(D,_,f),1*E/(1*m),1-1*v/(1*h),(E+1)/(1*m),1-(v+1)/(1*h))}for(v=0;v<h;v++)for(_=c/2-v*c/(1*h),w=c/2-(v+1)*c/(1*h),D=o/2,g=0;g<p;g++){M=l/2-(g+1)*l/(1*p);P(C(D,w,f=l/2-g*l/(1*p)),C(D,w,M),C(D,_,M),C(D,_,f),1*g/(1*p),1-1*v/(1*h),(g+1)/(1*p),1-(v+1)/(1*h))}for(g=0;g<p;g++)for(_=-c/2,f=l/2-l*g/(1*p),M=l/2-l*(g+1)/(1*p),E=0;E<m;E++){b=-o/2+(E+1)*o/(1*m);P(C(D=-o/2+E*o/(1*m),_,M),C(b,_,M),C(b,_,f),C(D,_,f),1*E/(1*m),1-1*g/(1*p),(E+1)/(1*m),1-(g+1)/(1*p))}const x=new e.Drawing3D.MeshGeometry(d,y,u);return e.Drawing3D.computeSharpVertexNormals(x),x}createDefaultGeometry(){return r.createMeshGeometry()}propertyChangedCallback(e,t,a,i){switch(super.propertyChangedCallback(e,t,a,i),e){case"width":case"height":case"depth":case"widthSegments":case"heightSegments":case"depthSegments":this.geometry=r.createMeshGeometry(this.width,this.height,this.depth,this.widthSegments,this.heightSegments,this.depthSegments)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"width",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"height",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"depth",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"widthSegments",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"heightSegments",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"depthSegments",void 0),a=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-box"})],a),t.PacemBoxElement=a}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;let a=r=class PacemCylinderElement extends t.Pacem3DPrimitiveElement{static createMeshGeometry(r,a,i,n,s){const o=r||1;a||=1,i||=18,n||=5,s||=1;const c=[],l=[],m=[],h=t.DEG2RAD*(360/i);c.push({x:0,y:a,z:0}),c.push({x:0,y:0,z:0});const p=o/s;for(let e=1;e<=s;e++)for(var d=p*e,u=0;u<i;u++){const t=2+2*i*(e-1),r=0==u?t+2*(i-1):t+2*(u-1),n=t+2*u,p=Math.cos(h*u),y=-Math.sin(h*u),v=Math.cos(h*(u-1)),_=-Math.sin(h*(u-1)),g=d*p,f=d*y,E={x:g,y:a,z:f},D={x:g,y:0,z:f};c.push(E),c.push(D);const C=.5*d/o,P=p*C,M=y*C,b=v*C,w=_*C;if(1==e){const e=[0,r,n],t=[1,n+1,r+1],a=[{x:.5,y:.5},{x:.5+b,y:.5-w},{x:.5+P,y:.5-M}],i=[{x:.5,y:.5},{x:.5+P,y:.5+M},{x:.5+b,y:.5+w}];Array.prototype.push.apply(m,e),Array.prototype.push.apply(m,t);for(let e=0;e<a.length;e++)l.push(a[e]);for(let e=0;e<i.length;e++)l.push(i[e])}else{const t=2+2*i*(e-2),a=0==u?t+2*(i-1):t+2*(u-1),o=t+2*u,c=(e-1)/s*.5,h=p*c,d=y*c,g=v*c,f=_*c,E={x:.5+b,y:.5-w},D={x:.5+P,y:.5-M},C={x:.5+h,y:.5-d},x={x:.5+g,y:.5-f},A={x:.5+b,y:.5+w},N={x:.5+P,y:.5+M},R={x:.5+h,y:.5+d},S={x:.5+g,y:.5+f};m.push(r),m.push(n),m.push(a),m.push(a),m.push(n),m.push(o),m.push(o+1),m.push(n+1),m.push(r+1),m.push(o+1),m.push(r+1),m.push(a+1),l.push(E),l.push(D),l.push(x),l.push(x),l.push(D),l.push(C),l.push(R),l.push(N),l.push(A),l.push(R),l.push(A),l.push(S)}}const y=2+2*i*s,v=2+2*i*(s-1),_=1/i,g=1/n;for(let e=1;e<=n;e++)for(let t=0;t<i;t++){if(e!=n){var f=o*Math.cos(h*t),E=-o*Math.sin(h*t),D=a*e/n;c.push({x:f,y:D,z:E})}const r=0==t?i-1:t-1,s=1==e?v+2*r+1:y+i*(e-2)+r,p=1==e?v+2*t+1:y+i*(e-2)+t,d=e==n?v+2*t:y+i*(e-1)+t,u=r*_,C=(e-1)*g,P=0==t?1:t*_,M=e*g,b={x:u,y:C},w={x:P,y:C},x={x:P,y:M},A={x:u,y:M};m.push(s),m.push(p),m.push(d),l.push(b),l.push(w),l.push(x),l.push(b),l.push(x),l.push(A)}return new e.Drawing3D.MeshGeometry(c,m,l)}createDefaultGeometry(){return r.createMeshGeometry()}propertyChangedCallback(e,t,a,i){switch(super.propertyChangedCallback(e,t,a,i),e){case"radius":case"height":case"sides":case"heightSegments":case"capSegments":this.geometry=r.createMeshGeometry(this.radius,this.height,this.sides,this.heightSegments,this.capSegments)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"radius",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"height",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"sides",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"heightSegments",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"capSegments",void 0),a=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-cylinder"})],a),t.PacemCylinderElement=a}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;const a=[{x:0,y:0,z:0},{x:0,y:1,z:0}];let i=r=class PacemLineElement extends t.Pacem3DPrimitiveElement{static createLineGeometry(t){return new e.Drawing3D.LineGeometry(t||a)}createDefaultGeometry(){return r.createLineGeometry()}propertyChangedCallback(e,t,a,i){if(super.propertyChangedCallback(e,t,a,i),"positions"===e)this.geometry=r.createLineGeometry(a)}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],i.prototype,"positions",void 0),i=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-line"})],i),t.PacemLineElement=i}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;let a=r=class PacemPlaneElement extends t.Pacem3DPrimitiveElement{static createMeshGeometry(t,r,a,i){t||=1,r||=1,a||=4,i||=4;const n=[],s=[],o=[],c=[],l=e.Geometry.LinearAlgebra.Vector3D.from(0,0,1);for(let e=0;e<=i;e++)for(let m=0;m<=a;m++){const h=-t/2+m*t/(1*a),p=0,d=-r/2+e*r/(1*i);if(n.push({x:h,y:p,z:d}),e<i&&m<a){const t=a+1,r=(m+1)/(1*a),n=1*m/(1*a),h=1-(e+1)/(1*i),p=1-1*e/(1*i);o.push((e+1)*t+m),o.push((e+1)*t+m+1),o.push(e*t+m+1),o.push((e+1)*t+m),o.push(e*t+m+1),o.push(e*t+m),s.push({x:n,y:h}),s.push({x:r,y:h}),s.push({x:r,y:p}),s.push({x:n,y:h}),s.push({x:r,y:p}),s.push({x:n,y:p}),c.push(l,l,l,l,l,l)}}return new e.Drawing3D.MeshGeometry(n,o,s,c)}createDefaultGeometry(){return r.createMeshGeometry()}propertyChangedCallback(e,t,a,i){switch(super.propertyChangedCallback(e,t,a,i),e){case"width":case"length":case"widthSegments":case"lengthSegments":this.geometry=r.createMeshGeometry(this.width,this.length,this.widthSegments,this.lengthSegments)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"width",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"length",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"widthSegments",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"lengthSegments",void 0),a=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-plane"})],a),t.PacemPlaneElement=a}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r,a,i,n,s;const o=function(e){const t=/([\d.-]+)/i;var r=t.exec(e);const a=[];for(;null!=r;){const i=r[0],n=parseFloat(i);a.push(n),e=e.replace(i,""),r=t.exec(e)}return a},c=e.Geometry.LinearAlgebra.Vector3D;class PolyhedronElement extends t.Pacem3DPrimitiveElement{propertyChangedCallback(e,t,r,a){super.propertyChangedCallback(e,t,r,a),"radius"===e&&this._assignMeshGeometry(r)}_assignMeshGeometry(e){this.geometry=this.createMeshGeometry(e>0?e:1)}createDefaultGeometry(){return this.createMeshGeometry(1)}}__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],PolyhedronElement.prototype,"radius",void 0),t.PolyhedronElement=PolyhedronElement;let l=r=class PacemTetrahedronElement extends PolyhedronElement{static createMeshGeometry(t){t||=1;const r="0 0.5774 -0.8165, 0 0.5774 0.8165, 0.8165 -0.5774 0, -0.8165 -0.5774 0".split(","),a=[];for(let e=0;e<r.length;e++){const i=r[e],n=o(i);a.push({x:n[0]*t,y:n[1]*t,z:n[2]*t})}const i="0.5 0.9995, 0.5 0.0004995, 0.0004995 0.5, 0.9995 0.5, 0.5 0.0004995, 0.9995 0.5, 0.5 0.9995, 0.0004995 0.5, 0.9995 0.5, 0.5 0.9995, 0.0004995 0.5, 0.5 0.0004995".split(","),n=[4,5,6,7,8,9,10,11,0,3,2,1],s=[];for(let e=0;e<n.length;e++){const t=o(i[n[e]]);s.push({x:t[0],y:t[1]})}const c=new e.Drawing3D.MeshGeometry(a,[1,2,0,2,3,0,3,1,0,3,2,1],s);return e.Drawing3D.computeSharpVertexNormals(c),c}createMeshGeometry(e=this.radius){return r.createMeshGeometry(e)}};l=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-tetrahedron"})],l),t.PacemTetrahedronElement=l;let m=a=class PacemOctahedronElement extends PolyhedronElement{static createMeshGeometry(t){t||=1;const r=[6,7,8,9,10,11,12,13,14,15,16,0,17,18,19,20,21,1,2,22,23,4,3,5],a="0 0.7071 -0.7071, 0 0.7071 0.7071, 1 0 0, 0 -0.7071 -0.7071, -1 0 0, 0 -0.7071 0.7071".split(","),i=[];for(let e=0;e<a.length;e++){const r=a[e],n=o(r);i.push({x:n[0]*t,y:n[1]*t,z:n[2]*t})}const n="0.5 0.9995, 0.5 0.9995, 0.0004995 0.5, 0.5 0.9995, 0.9995 0.5, 0.5 0.0004995, 0.5 0.0004995, 0.9995 0.5, 0.5 0.9995, 0.0004995 0.5, 0.5 0.0004995, 0.5 0.9995, 0.5 0.0004995, 0.9995 0.5, 0.5 0.9995, 0.0004995 0.5, 0.5 0.0004995, 0.0004995 0.5, 0.5 0.0004995, 0.5 0.9995, 0.5 0.0004995, 0.9995 0.5, 0.5 0.0004995, 0.5 0.9995".split(","),s=[];for(let e=0;e<r.length;e++){const t=o(n[r[e]]);s.push({x:t[0],y:t[1]})}const c=new e.Drawing3D.MeshGeometry(i,[1,2,0,2,3,0,3,4,0,4,1,0,4,5,1,5,2,1,2,5,3,4,3,5],s);return e.Drawing3D.computeSharpVertexNormals(c),c}createMeshGeometry(e=this.radius){return a.createMeshGeometry(e)}};m=a=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-octahedron"})],m),t.PacemOctahedronElement=m;let h=i=class PacemHexahedronElement extends PolyhedronElement{static createMeshGeometry(t){t||=1;const r=2*t*(1/Math.sqrt(3));return e.Components.Drawing3D.PacemBoxElement.createMeshGeometry(r,r,r)}createMeshGeometry(e=this.radius){return i.createMeshGeometry(e)}};h=i=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-hexahedron"})],h),t.PacemHexahedronElement=h;let p=n=class PacemIcosahedronElement extends PolyhedronElement{static createMeshGeometry(t){t||=1;const r=[12,13,14,15,16,17,18,19,20,21,22,23,24,25,0,26,27,28,29,30,31,32,33,1,34,35,36,2,37,38,39,40,41,42,43,7,44,45,46,8,47,48,49,50,51,52,53,9,54,55,3,10,56,57,6,58,59,5,4,11],a="0 0.850651 -0.525731, 0 0.850651 0.525731, 0.850651 0.525731 0, 0.525731 0 -0.850651, -0.525731 0 -0.850651, -0.850651 0.525731 0, -0.525731 0 0.850651, 0.525731 0 0.850651, 0.850651 -0.525731 0, 0 -0.850651 0.525731, 0 -0.850651 -0.525731, -0.850651 -0.525731 0".split(","),i=[];for(let e=0;e<a.length;e++){const r=a[e],n=o(r);i.push({x:n[0]*t,y:n[1]*t,z:n[2]*t})}const n="0.5 0.808708, 0.5 0.999501, 0.5 0.808708, 0.191292 0.5, 0.000499547 0.5, 0.5 0.808708, 0.9995 0.5, 0.808708 0.5,0.000499487 0.5, 0.5 0.191292, 0.5 0.000499487, 0.5 0.191292,0.5 0.191292, 0.999501 0.5, 0.5 0.808708, 0.5 0.808708,0.9995 0.5, 0.808708 0.999501, 0.191292 0.5, 0.808708 0.5,0.5 0.999501, 0.808708 0.5, 0.999501 0.808708, 0.5 0.999501,0.000499487 0.5, 0.5 0.191292, 0.5 0.808708, 0.9995 0.5,0.808708 0.999501, 0.191292 0.5, 0.808708 0.5, 0.5 0.999501,0.808708 0.5, 0.999501 0.808708, 0.5 0.808708, 0.5 0.191292,0.9995 0.5, 0.000499547 0.5, 0.5 0.191292, 0.191292 0.5,0.5 0.000499487, 0.808708 0.5, 0.5 0.000499487, 0.999501 0.191292,0.5 0.191292, 0.808708 0.000499487, 0.9995 0.5, 0.5 0.191292,0.5 0.808708, 0.9995 0.5, 0.5 0.191292, 0.808708 0.000499487,0.999501 0.5, 0.5 0.808708, 0.5 0.000499487, 0.808708 0.5,0.999501 0.191292, 0.808708 0.5, 0.5 0.808708, 0.5 0.191292".split(","),s=[];for(let e=0;e<r.length;e++){const t=o(n[r[e]]);s.push({x:t[0],y:t[1]})}const c=new e.Drawing3D.MeshGeometry(i,[1,2,0,2,3,0,3,4,0,4,5,0,5,1,0,5,6,1,6,7,1,7,2,1,2,8,3,2,7,8,6,9,7,9,8,7,8,10,3,8,9,10,6,11,9,11,10,9,10,4,3,10,11,4,6,5,11,5,4,11],s);return e.Drawing3D.computeSharpVertexNormals(c),c}createMeshGeometry(e=this.radius){return n.createMeshGeometry(e)}};p=n=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-icosahedron"})],p),t.PacemIcosahedronElement=p;let d=s=class PacemDodecahedronElement extends PolyhedronElement{static createMeshGeometry(t){t||=1;const r=[c.from(.356822*t,.934172*t,0*t),c.from(-.356822*t,.934172*t,0*t),c.from(.57735*t,.57735*t,-.57735*t),c.from(0*t,.356822*t,-.934172*t),c.from(-.57735*t,.57735*t,-.57735*t),c.from(-.57735*t,.57735*t,.57735*t),c.from(0*t,.356822*t,.934172*t),c.from(.57735*t,.57735*t,.57735*t),c.from(.934172*t,0*t,-.356822*t),c.from(.934172*t,0*t,.356822*t),c.from(0*t,-.356822*t,.934172*t),c.from(.57735*t,-.57735*t,.57735*t),c.from(.57735*t,-.57735*t,-.57735*t),c.from(.356822*t,-.934172*t,0*t),c.from(-.57735*t,-.57735*t,.57735*t),c.from(-.356822*t,-.934172*t,0*t),c.from(0*t,-.356822*t,-.934172*t),c.from(-.57735*t,-.57735*t,-.57735*t),c.from(-.934172*t,0*t,.356822*t),c.from(-.934172*t,0*t,-.356822*t)],a=[20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,0,46,47,48,49,50,51,7,52,53,54,55,56,57,58,59,60,61,9,62,63,64,65,66,67,11,68,69,70,71,72,73,74,75,76,77,13,78,79,80,81,82,83,15,84,85,86,87,88,89,90,91,92,93,17,94,95,96,97,98,99,19,1,4,100,14,101,102,10,103,18,6,5,104,2,105,106,8,107,3,12,16],i="0.5 0.999501, 0.5 0.999501, 0.191292 0.808708, 0.5 0.690792, 0.191292 0.808708, 0.191292 0.808708, 0.5 0.690792, 0.808708 0.808708, 0.000499517 0.5, 0.309208 0.5, 0.5 0.309208, 0.191292 0.191292, 0.191292 0.191292, 0.309208 0.5, 0.191292 0.191292, 0.5 0.000499517, 0.5 0.309208, 0.808708 0.191292, 0.000499517 0.5, 0.309208 0.5, 0.690792 0.5, 0.808708 0.808708, 0.5 0.999501, 0.690792 0.5, 0.5 0.999501, 0.191292 0.808708, 0.690792 0.5, 0.191292 0.808708, 0.309208 0.5, 0.309208 0.5, 0.191292 0.191292, 0.5 0.000499517, 0.309208 0.5, 0.5 0.000499517, 0.808708 0.191292, 0.309208 0.5, 0.808708 0.191292, 0.690792 0.5, 0.191292 0.808708, 0.309208 0.5, 0.690792 0.5, 0.191292 0.808708, 0.690792 0.5, 0.808708 0.808708, 0.191292 0.808708, 0.808708 0.808708, 0.808708 0.808708, 0.5 0.690792, 0.5 0.309208, 0.808708 0.808708, 0.5 0.309208, 0.808708 0.191292, 0.808708 0.191292, 0.9995 0.5, 0.191292 0.191292, 0.5 0.000499517, 0.808708 0.191292, 0.191292 0.191292, 0.808708 0.191292, 0.690792 0.5, 0.191292 0.191292, 0.690792 0.5, 0.191292 0.191292, 0.5 0.000499517, 0.808708 0.191292, 0.191292 0.191292, 0.808708 0.191292, 0.690792 0.5, 0.690792 0.5, 0.309208 0.5, 0.690792 0.5, 0.808708 0.808708, 0.5 0.999501, 0.690792 0.5, 0.5 0.999501, 0.191292 0.808708, 0.690792 0.5, 0.191292 0.808708, 0.5 0.000499517, 0.808708 0.191292, 0.690792 0.5, 0.5 0.000499517, 0.690792 0.5, 0.309208 0.5, 0.309208 0.5, 0.191292 0.191292, 0.9995 0.5, 0.808708 0.808708, 0.5 0.690792, 0.9995 0.5, 0.5 0.690792, 0.5 0.309208, 0.9995 0.5, 0.5 0.309208, 0.309208 0.5, 0.690792 0.5, 0.808708 0.808708, 0.309208 0.5, 0.808708 0.808708, 0.5 0.999501, 0.000499517 0.5, 0.5 0.309208, 0.000499517 0.5, 0.5 0.690792, 0.5 0.690792, 0.000499517 0.5, 0.5 0.690792, 0.191292 0.191292".split(","),n=[];for(let e=0;e<a.length;e++){const t=o(i[a[e]]);n.push({x:t[0],y:t[1]})}const s=new e.Drawing3D.MeshGeometry(r,[0,2,3,0,3,4,0,4,1,1,5,6,1,6,7,1,7,0,7,9,8,7,8,2,7,2,0,7,6,10,7,10,11,7,11,9,11,13,12,11,12,8,11,8,9,11,10,14,11,14,15,11,15,13,15,17,16,15,16,12,15,12,13,15,14,18,15,18,19,15,19,17,19,4,3,19,3,16,19,16,17,19,18,5,19,5,1,19,1,4,18,14,10,18,10,6,18,6,5,3,2,8,3,8,12,3,12,16],n);return e.Drawing3D.computeSharpVertexNormals(s),s}createMeshGeometry(e=this.radius){return s.createMeshGeometry(e)}};d=s=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-dodecahedron"})],d),t.PacemDodecahedronElement=d}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;let a=r=class PacemSphereElement extends t.Pacem3DPrimitiveElement{static createMeshGeometry(r,a){const i=[],n=[],s=[],o=r||1,c=a||8,l=t.DEG2RAD*(360/c),m=c%2==0?c/2:(c-1)/2;i.push({x:0,y:o,z:0});for(let e=1;e<m;e++){const t=l*e,r=Math.cos(t),a=Math.sin(t),h=1-1*e/m;for(let t=0;t<c;t++){const p=l*t-Math.PI/2,d=o*a*Math.cos(p),u=o*r,y=o*a*Math.sin(p);i.push({x:d,y:u,z:y});const v=0==t?c-1:t-1,_=0==t?0:1-1*t/c,g=1-1*v/c;if(1==e)s.push(1+t),s.push(1+v),s.push(0),n.push({x:_,y:h}),n.push({x:g,y:h}),n.push({x:.5,y:1});else{s.push((e-1)*c+t+1),s.push((e-1)*c+v+1),s.push((e-2)*c+v+1),s.push((e-1)*c+t+1),s.push((e-2)*c+v+1),s.push((e-2)*c+t+1);const r=1-(e-1)/m;n.push({x:_,y:h}),n.push({x:g,y:h}),n.push({x:g,y:r}),n.push({x:_,y:h}),n.push({x:g,y:r}),n.push({x:_,y:r})}}}i.push({x:0,y:-o,z:0});const h=i.length-1;for(let e=0;e<c;e++){const t=m-2,r=0==e?c-1:e-1,a=0==e?0:1-1*e/c,i=1-1*r/c,o=1-(t+1)/m;s.push(h),s.push(t*c+1+r),s.push(t*c+1+e),n.push({x:.5,y:0}),n.push({x:i,y:o}),n.push({x:a,y:o})}return new e.Drawing3D.MeshGeometry(i,s,n)}createDefaultGeometry(){return r.createMeshGeometry()}propertyChangedCallback(e,t,a,i){switch(super.propertyChangedCallback(e,t,a,i),e){case"radius":case"segments":this.geometry=r.createMeshGeometry(this.radius,this.segments)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"radius",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"segments",void 0),a=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-sphere"})],a),t.PacemSphereElement=a}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;let a=r=class PacemTorusElement extends t.Pacem3DPrimitiveElement{static createMeshGeometry(r,a,i,n){const s=[],o=[],c=[];i||=24,n||=12;const l=t.DEG2RAD*(360/i),m=t.DEG2RAD*(360/n),h=r||1,p=a||.25;for(let e=0;e<i;e++){const t=l*e-Math.PI/2,r=Math.sin(t),a=Math.cos(t);for(let t=0;t<n;t++){const l=m*t+Math.PI,d=Math.cos(l),u=h*a+p*d*a,y=p*Math.sin(l),v=h*r+p*d*r;s.push({x:u,y:y,z:v});const _=e>0?e-1:i-1,g=t>0?t-1:n-1,f=0==e?0:1-1*e/i,E=t>0?1*t/n:1,D=e>0?1-(e-1)/i:1/i,C=t>0?(t-1)/n:1-1/n;c.push(e*n+g),c.push(_*n+g),c.push(_*n+t),c.push(e*n+g),c.push(_*n+t),c.push(e*n+t),o.push({x:f,y:C}),o.push({x:D,y:C}),o.push({x:D,y:E}),o.push({x:f,y:C}),o.push({x:D,y:E}),o.push({x:f,y:E})}}return new e.Drawing3D.MeshGeometry(s,c,o)}createDefaultGeometry(){return r.createMeshGeometry()}propertyChangedCallback(e,t,a,i){switch(super.propertyChangedCallback(e,t,a,i),e){case"radius":case"innerRadius":case"segments":case"sides":this.geometry=r.createMeshGeometry(this.radius,this.innerRadius,this.segments,this.sides)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"radius",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"innerRadius",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"segments",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"sides",void 0),a=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-torus"})],a),t.PacemTorusElement=a}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={}));
6
+ var Pacem,__decorate=this&&this.__decorate||function(e,t,r,a){var i,n=arguments.length,s=n<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,r):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,a);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(n<3?i(s):n>3?i(t,r,s):i(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s},__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,r,a,i){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?i.call(e,r):i?i.value=r:t.set(e,r),r},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,r,a){if("a"===r&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?a:"a"===r?a.call(e):a?a.value:t.get(e)};!function(e){!function(t){t.Point3DConverter={convert:t=>e.Geometry.LinearAlgebra.Vector3D.parse(t),convertBack:e=>`${e.x||0} ${e.y||0} ${e.z||0}`},t.QuaternionConverter={convert:t=>e.Geometry.LinearAlgebra.Quaternion.parse(t),convertBack:e=>`${e.x||0} ${e.y||0} ${e.z||0} ${e.w||0}`}}(e.Drawing3D||(e.Drawing3D={}))}(Pacem||(Pacem={})),function(e){!function(e){!function(e){e.Pacem3DDetector=class Pacem3DDetector{constructor(){this._detected={supported:!1,info:{}};let e,t=document.createElement("canvas"),r=["webgl","experimental-webgl","moz-webgl","webkit-3d"],a=function(t){if(t)return e.getParameter(t)},i=(e,t,r)=>{let a=this._detected;(a.info[e]=a.info[e]||{})[t=(t=t.replace(/[^\w]+/g,"")).substring(0,1).toLowerCase()+t.substring(1)]=r};if(navigator.userAgent.indexOf("MSIE")>=0)try{e=window.WebGLHelper.CreateGLContext(t,"canvas")}catch(e){}else for(var n=0;n<r.length;n++)try{if(e=t.getContext(r[n]),e){i("main","Context Name",r[n]);break}}catch(e){}this._detected.supported=!!e,i("main","Platform",navigator.platform),i("main","Agent",navigator.userAgent),e&&(i("main","Vendor",a(e.VENDOR)),i("main","Version",a(e.VERSION)),i("main","Renderer",a(e.RENDERER)),i("main","Shading Language Version",a(e.SHADING_LANGUAGE_VERSION)),i("bits","Rgba Bits",a(e.RED_BITS)+", "+a(e.GREEN_BITS)+", "+a(e.BLUE_BITS)+", "+a(e.ALPHA_BITS)),i("bits","Depth Bits",a(e.DEPTH_BITS)),i("shader","Max Vertex Attribs",a(e.MAX_VERTEX_ATTRIBS)),i("shader","Max Vertex Texture Image Units",a(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS)),i("shader","Max Varying Vectors",a(e.MAX_VARYING_VECTORS)),i("shader","Max Uniform Vectors",a(e.MAX_VERTEX_UNIFORM_VECTORS)),i("tex","Max Combined Texture Image Units",a(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),i("tex","Max Texture Size",a(e.MAX_TEXTURE_SIZE)),i("tex","Max Cube Map Texture Size",a(e.MAX_CUBE_MAP_TEXTURE_SIZE)),i("tex","Num. Compressed Texture Formats",a(e.COMPRESSED_TEXTURE_FORMATS)),i("misc","Max Render Buffer Size",a(e.MAX_RENDERBUFFER_SIZE)),i("misc","Max Viewport Dimensions",a(e.MAX_VIEWPORT_DIMS)),i("misc","Aliased Line Width Range",a(e.ALIASED_LINE_WIDTH_RANGE)),i("misc","Aliased Point Size Range",a(e.ALIASED_POINT_SIZE_RANGE)),i("misc","Supported Extensions",e.getSupportedExtensions()||[]))}get info(){return this._detected.info}get supported(){return this._detected.supported}}}(e.Drawing3D||(e.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){class NodeGeometry{constructor(e=[]){this.positions=e}barycenter(){const t=this.positions;var r={x:0,y:0,z:0};if(!e.Utils.isNullOrEmpty(t)){for(var a=t.length,i=0;i<t.length;i++){var n=t[i];r.x+=n.x,r.y+=n.y,r.z+=n.z}var s=1*a;r.x/=s,r.y/=s,r.z/=s}return r}boundingBox(){const t=this.positions,r={minX:1/0,minY:1/0,minZ:1/0,maxX:-1/0,maxY:-1/0,maxZ:-1/0};if(!e.Utils.isNullOrEmpty(t))for(var a=0;a<t.length;a++){var i=t[a];r.minX=Math.min(r.minX,i.x),r.minY=Math.min(r.minY,i.y),r.minZ=Math.min(r.minZ,i.z),r.maxX=Math.max(r.maxX,i.x),r.maxY=Math.max(r.maxY,i.y),r.maxZ=Math.max(r.maxZ,i.z)}return r}}t.NodeGeometry=NodeGeometry;t.LineGeometry=class LineGeometry extends NodeGeometry{};t.MeshGeometry=class MeshGeometry extends NodeGeometry{constructor(e,t,r=[],a=[]){super(e),this.triangleIndices=t,this.textureCoordinates=r,this.normals=a}}}(e.Drawing3D||(e.Drawing3D={}))}(Pacem||(Pacem={})),function(e){!function(t){var r;function a(t){return!e.Utils.isNull(t)&&"render"in t&&"function"==typeof t.render}function i(t){return!e.Utils.isNull(t)&&"stage"in t&&a(t.stage)}function n(e){return"transformMatrix"in e&&i(e)}t.isStage=a,t.isRenderable=i,t.isUi3DObject=n,t.isMesh=function(e){return n(e)&&"geometry"in e},t.isGroup=function(t){return n(t)&&"items"in t&&!e.Utils.isNullOrEmpty(t.items)},t.computeSharpVertexNormals=function(t){const r=[];if(!e.Utils.isNullOrEmpty(t)){const a=t.triangleIndices;if(a.length%3!=0)throw new RangeError(`Invalid mesh geometry: ${a.length} is not multiple of 3.`);for(let i=2;i<a.length;i+=3){const n=a[i-2],s=a[i-1],o=a[i],c=t.positions[n],l=t.positions[s],m=t.positions[o],h=e.Geometry.LinearAlgebra.Vector3D.subtract(c,l),p=e.Geometry.LinearAlgebra.Vector3D.subtract(c,m),d=e.Geometry.LinearAlgebra.Vector3D.cross(p,h),u=e.Geometry.LinearAlgebra.Vector3D.unit(d);r.push(u,u,u)}}t.normals=r};class UI3DEvent extends e.CustomUIEvent{constructor(e,t,a,i){super(e,t,a),r.set(this,void 0),__classPrivateFieldSet(this,r,i,"f")}get point(){return __classPrivateFieldGet(this,r,"f")}}r=new WeakMap,t.UI3DEvent=UI3DEvent;t.DragEvent=class DragEvent extends UI3DEvent{};t.RenderableEvent=class RenderableEvent extends UI3DEvent{constructor(e,t,r,a){super(e,{detail:t,bubbles:!0,cancelable:!0},r,a)}}}(e.Drawing3D||(e.Drawing3D={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(r){var a;r.TAG_MIDDLE_NAME="3d",r.DEG2RAD=Math.PI/180;const i={OBJECT_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-object",LIGHT_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-light",CAMERA_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-camera",LINE_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-line",MESH_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-mesh",GROUP_SELECTOR:e.P+"-"+r.TAG_MIDDLE_NAME+"-group",DEFAULT_COORDS:{x:0,y:0,z:0}};let n;!function(e){e.Position="position",e.Transform="transform",e.Geometry="geometry",e.Children="children",e.Material="material",e.Light="light",e.Camera="camera"}(n=r.StalePropertyFlag||(r.StalePropertyFlag={}));class RenderableElement extends t.PacemCrossItemsContainerElement{constructor(){super(...arguments),a.set(this,[]),this.position=i.DEFAULT_COORDS}validate(e){return!1}findContainer(){return this.parent||this.stage}get stage(){return this._scene=this._scene||e.CustomElementUtils.findAncestorOfType(this,r.Pacem3DElement)}get parent(){return this._drawableParent=this._drawableParent||e.CustomElementUtils.findAncestor(this,(e=>e instanceof RenderableElement))}get flags(){return __classPrivateFieldGet(this,a,"f")}disconnectedCallback(){delete this._scene,delete this._drawableParent,super.disconnectedCallback()}propertyChangedCallback(e,t,r,a){switch(super.propertyChangedCallback(e,t,r,a),e){case"hide":this.setAsDirty();break;case"items":this.setAsDirty(n.Children);break;case"position":this.setAsDirty(n.Position)}}setAsDirty(...e){for(let t of e)this.flags.includes(t)||this.flags.push(t);this.stage?.render(this)}}a=new WeakMap,__decorate([e.Watch({emit:!1,converter:e.Drawing3D.Point3DConverter})],RenderableElement.prototype,"position",void 0),__decorate([e.Watch({emit:!1,reflectBack:!0,converter:e.PropertyConverters.String})],RenderableElement.prototype,"tag",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],RenderableElement.prototype,"inert",void 0),r.RenderableElement=RenderableElement;class Ui3DElement extends RenderableElement{propertyChangedCallback(e,t,r,a){switch(super.propertyChangedCallback(e,t,r,a),e){case"transformMatrix":this.setAsDirty(n.Transform);break;case"rotate":case"scaleX":case"scaleY":case"translateX":case"translateY":this._computeTransformMatrix()}}_computeTransformMatrix(){const t=e.Utils.isNull(this.rotate)?e.Geometry.LinearAlgebra.Matrix3D.identity():e.Geometry.LinearAlgebra.Quaternion.toRotationMatrix(this.rotate);this.translateX&&(t.offsetX=this.translateX),this.translateY&&(t.offsetY=this.translateY),this.translateZ&&(t.offsetZ=this.translateZ),this.scaleX&&(t.m11=this.scaleX),this.scaleY&&(t.m22=this.scaleY),this.scaleZ&&(t.m33=this.scaleZ),this.transformMatrix=t}}__decorate([e.Watch({emit:!1,converter:e.Drawing3D.QuaternionConverter})],Ui3DElement.prototype,"rotate",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"scaleX",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"scaleY",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"scaleZ",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"translateX",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"translateY",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],Ui3DElement.prototype,"translateZ",void 0),__decorate([e.Watch({emit:!1})],Ui3DElement.prototype,"transformMatrix",void 0),r.Ui3DElement=Ui3DElement;let s=class Pacem3DGroupElement extends Ui3DElement{validate(e){return e instanceof RenderableElement}};s=__decorate([e.CustomElement({tagName:i.GROUP_SELECTOR})],s),r.Pacem3DGroupElement=s;let o=class Pacem3DMeshElement extends Ui3DElement{propertyChangedCallback(e,t,r,a){switch(super.propertyChangedCallback(e,t,r,a),e){case"geometry":this.setAsDirty(n.Geometry);break;case"material":case"backMaterial":this.setAsDirty(n.Material)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],o.prototype,"geometry",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],o.prototype,"material",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],o.prototype,"backMaterial",void 0),o=__decorate([e.CustomElement({tagName:i.MESH_SELECTOR})],o),r.Pacem3DMeshElement=o;let c=class Pacem3DObjectElement extends Ui3DElement{propertyChangedCallback(e,t,r,a){super.propertyChangedCallback(e,t,r,a),"content"!==e&&"type"!==e||this.setAsDirty(n.Geometry,n.Material)}};__decorate([e.Watch({emit:!1})],c.prototype,"content",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],c.prototype,"type",void 0),c=__decorate([e.CustomElement({tagName:i.OBJECT_SELECTOR})],c),r.Pacem3DObjectElement=c;let l=class Pacem3DLightElement extends RenderableElement{constructor(){super(...arguments),this.intensity=.25,this.target=i.DEFAULT_COORDS,this.color="#fff",this.type="omni"}propertyChangedCallback(e,t,r,a){switch(super.propertyChangedCallback(e,t,r,a),e){case"type":case"color":case"intensity":case"target":this.setAsDirty(n.Light)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],l.prototype,"intensity",void 0),__decorate([e.Watch({emit:!1,converter:e.Drawing3D.Point3DConverter})],l.prototype,"target",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],l.prototype,"color",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],l.prototype,"type",void 0),l=__decorate([e.CustomElement({tagName:i.LIGHT_SELECTOR})],l),r.Pacem3DLightElement=l;let m=class Pacem3DCameraElement extends RenderableElement{constructor(){super(...arguments),this.fov=45,this.aspect=1.78,this.near=.1,this.far=1e3,this.type="perspective",this.lookAt=i.DEFAULT_COORDS}propertyChangedCallback(e,t,r,a){switch(super.propertyChangedCallback(e,t,r,a),e){case"fov":case"aspect":case"near":case"far":case"type":case"lookAt":this.setAsDirty(n.Camera)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],m.prototype,"fov",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],m.prototype,"aspect",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],m.prototype,"near",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],m.prototype,"far",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],m.prototype,"type",void 0),__decorate([e.Watch({emit:!1,converter:e.Drawing3D.Point3DConverter})],m.prototype,"lookAt",void 0),m=__decorate([e.CustomElement({tagName:i.CAMERA_SELECTOR})],m),r.Pacem3DCameraElement=m;class Pacem3DAdapterElement extends t.PacemEventTarget{}r.Pacem3DAdapterElement=Pacem3DAdapterElement}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(r){var a;let i=class Pacem3DElement extends t.PacemItemsContainerElement{constructor(){super(...arguments),this._addHandler=e=>{this._add(e.target)},this._clickHandler=t=>{let r=this;if(!r.interactive||e.Utils.isNull(r._lastHitResult))return;const a=t.type.replace(/^mouse/,""),i=r._lastHitResult,n=i.object,s=i.point;this._itemDispatch(n,s,a,t)},this._moveHandler=t=>{let r=this;if(!r.adapter||!r.interactive)return;const a=r._resizer.currentSize;let i=r.adapter.raycast({x:t.pageX-a.left,y:t.pageY-a.top},a);if(i!=r._lastHitResult){if(i?.object!=r._lastHitResult?.object){const a=i?.object,n=r._lastHitResult?.object,s=i?.point;e.Utils.isNull(n)||this._itemDispatch(n,s,"out",t),e.Utils.isNull(a)||this._itemDispatch(a,s,"over",t)}r._lastHitResult=i}},a.set(this,void 0),this._resizeHandler=r=>{const i=__classPrivateFieldSet(this,a,r.detail,"f"),n=this.adapter;e.Utils.isNull(n)||(this.adapter.invalidateSize(i),this.dispatchEvent(new t.ResizeEvent(i)))}}validate(e){return e instanceof r.RenderableElement}get stage(){return this._container}get scene(){return this.adapter&&this.adapter.scene}register(t){const r=super.register(t);return r&&(this._add(t),t.addEventListener(e.PropertyChangeEventName,this._addHandler,!1)),r}unregister(t){const r=super.unregister(t);return r&&(t.removeEventListener(e.PropertyChangeEventName,this._addHandler,!1),this._erase(t)),r}_add(e){this.adapter&&this.adapter.addItem(e)}_erase(e){this.adapter&&this.adapter.removeItem(e)}_initializeAdapter(t,r){return new Promise(((a,i)=>{e.Utils.isNull(t)||this.items.forEach((e=>t.removeItem(e))),e.Utils.isNull(this._container)||e.Utils.isNull(r)||r.initialize(this).then((e=>{this.items.forEach((e=>this._add(e)))}),(t=>{this.log(e.Logging.LogLevel.Error,t?.toString())})),a()}))}propertyChangedCallback(t,r,a,i){super.propertyChangedCallback(t,r,a,i),e.Utils.isNull(this._container)||"adapter"!==t||i||this._initializeAdapter(r,a)}viewActivatedCallback(){super.viewActivatedCallback();const e=this._container,t=this._resizer;t.addEventListener("resize",this._resizeHandler,!1),t.target=e,this._initializeAdapter(null,this.adapter).then((t=>{e.addEventListener("mousemove",this._moveHandler,!1),e.addEventListener("click",this._clickHandler,!1),e.addEventListener("mouseup",this._clickHandler,!1),e.addEventListener("mousedown",this._clickHandler,!1),this.render()}))}_itemDispatch(t,r,a,i){if(!e.Utils.isNull(t)){var n,s,o;i instanceof Event?s=i:n={item:t,offset:i},"string"==typeof a?o=a:(o=a.type,s=a.originalEvent);const l=r,m=()=>i instanceof Event?new e.Drawing3D.RenderableEvent(o,t,s,l):new e.Drawing3D.DragEvent(o,{detail:n,cancelable:o===e.UI.DragDropEventType.Init||o===e.UI.DragDropEventType.Drag},s,l),h=i instanceof Event?new e.Drawing3D.RenderableEvent("item"+o,t,s,l):new e.Drawing3D.DragEvent("item"+o,{detail:n,cancelable:o===e.UI.DragDropEventType.Init||o===e.UI.DragDropEventType.Drag},s,l);var c=!1;if(t instanceof EventTarget){const e=m();t.dispatchEvent(e),c=e.defaultPrevented}return t.stage.dispatchEvent(h),c||h.defaultPrevented}return!1}disconnectedCallback(){const t=this._resizer,r=this._container;e.Utils.isNull(r)||(r.removeEventListener("click",this._clickHandler,!1),r.removeEventListener("mouseup",this._clickHandler,!1),r.removeEventListener("mousedown",this._clickHandler,!1),r.removeEventListener("mousemove",this._moveHandler,!1)),e.Utils.isNull(t)||t.removeEventListener("resize",this._resizeHandler,!1),super.disconnectedCallback()}get size(){return __classPrivateFieldGet(this,a,"f")}render(t,r){if(e.Utils.isNull(t)){if(requestAnimationFrame((()=>this.render())),!this.disabled&&!e.Utils.isNull(this.adapter)){let e=new CustomEvent("prerender",{detail:{scene:this.adapter.scene},cancelable:!0});this.dispatchEvent(e),e.defaultPrevented||(this.adapter.render(),this.dispatchEvent(new CustomEvent("render",{detail:{scene:this.adapter.scene}})))}}else{const r=this.adapter;e.Utils.isNull(r)||r.updateItem(t)}}};a=new WeakMap,__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],i.prototype,"interactive",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],i.prototype,"orbit",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Element})],i.prototype,"adapter",void 0),__decorate([e.ViewChild(`.${e.PCSS}-3d`)],i.prototype,"_container",void 0),__decorate([e.ViewChild(e.P+"-resize")],i.prototype,"_resizer",void 0),i=__decorate([e.CustomElement({tagName:e.P+"-"+r.TAG_MIDDLE_NAME,shadow:e.Defaults.USE_SHADOW_ROOT,template:`<${e.P}-resize watch-position="true"></${e.P}-resize><div class="${e.PCSS}-3d"></div><${e.P}-content></${e.P}-content>`})],i),r.Pacem3DElement=i}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(e){let t;function r(e){return"shader"in e}!function(e){e.Basic="basic",e.Lambert="lambert",e.Phong="phong",e.Standard="standard",e.Line="line"}(t=e.KnownShader||(e.KnownShader={})),e.isMaterial=r,e.isBasicMaterial=function(e){return r(e)&&e.shader===t.Basic},e.isLineMaterial=function(e){return r(e)&&e.shader===t.Line},e.isLambertMaterial=function(e){return r(e)&&e.shader===t.Lambert},e.isPhongMaterial=function(e){return r(e)&&e.shader===t.Phong},e.isStandardMaterial=function(e){return r(e)&&e.shader===t.Standard}}(e.Drawing3D||(e.Drawing3D={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(r){var a;class MaterialElement extends t.PacemEventTarget{constructor(e){super(),a.set(this,void 0),__classPrivateFieldSet(this,a,e,"f")}get shader(){return __classPrivateFieldGet(this,a,"f")}propertyChangedCallback(e,t,r,a){if(super.propertyChangedCallback(e,t,r,a),!a)switch(e){case"opacity":case"wireframe":case"color":case"visible":case"map":this.updateMaterial()}}viewActivatedCallback(){super.viewActivatedCallback(),this.updateMaterial()}updateMaterial(){this.material=this.createMaterial()}createMaterial(){return{opacity:this.opacity??1,wireframe:this.wireframe??!1,color:this.color||e.Utils.Css.getVariableValue(`--${e.PCSS}-color-primary`),visible:this.visible??!0,map:this.map,shader:this.shader}}}a=new WeakMap,__decorate([e.Watch()],MaterialElement.prototype,"material",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],MaterialElement.prototype,"opacity",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],MaterialElement.prototype,"wireframe",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],MaterialElement.prototype,"color",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],MaterialElement.prototype,"visible",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],MaterialElement.prototype,"map",void 0),r.MaterialElement=MaterialElement}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){function r(e){const t=[];for(let a of e)"x"in(r=a)&&"number"==typeof r.x&&"y"in r&&"number"==typeof r.y&&"z"in r&&"number"==typeof r.z?t.push(a.x,a.y,a.z):t.push(a.x,a.y);var r;return t}const a="0.152.2",i={VERSION:a,API_URI:`https://unpkg.com/three@${a}/build/three.min.js`,ORBIT_URI:"https://unpkg.com/three@0.147.0/examples/js/controls/OrbitControls.js",LOADERS:[],DEFAULT_MATERIAL:function(){return new THREE.MeshStandardMaterial({color:"#069",flatShading:!0})}};function n(t){if(e.Utils.isNull(t))return null;const r={color:t.color,opacity:t.opacity??1,transparent:!0,wireframe:t.wireframe??!1,visible:t.visible??!0},a=e.Utils.extend({},r,{wireframe:t.wireframe??!1}),i=e=>(t.map&&(e.map=(new THREE.TextureLoader).load(t.map,(t=>{e.needsUpdate=!0}))),e);if(e.Drawing3D.isStandardMaterial(t)){return i(new THREE.MeshStandardMaterial(e.Utils.extend(a,{roughness:t.roughness,metalness:t.metalness,emissive:t.emissiveColor,flatShading:t.flatShading,refractionRatio:t.refractionRatio})))}if(e.Drawing3D.isPhongMaterial(t)){return i(new THREE.MeshPhongMaterial(e.Utils.extend(a,{shininess:t.shininess,emissive:t.emissiveColor,flatShading:t.flatShading,specular:t.specularColor,reflectivity:t.reflectivity,refractionRatio:t.refractionRatio})))}if(e.Drawing3D.isLambertMaterial(t)){return i(new THREE.MeshLambertMaterial(e.Utils.extend(a,{emissive:t.emissiveColor,reflectivity:t.reflectivity,refractionRatio:t.refractionRatio})))}if(e.Drawing3D.isLineMaterial(t)){const a=t.dashArray&&t.dashArray[0]||null,i=t.dashArray&&t.dashArray.length>1&&t.dashArray[1]||a,n=e.Utils.extend(r,{linecap:t.lineCap??"round",linejoin:t.lineJoin??"round",linewidth:t.lineWidth??1});return e.Utils.isNullOrEmpty(t.dashArray)?new THREE.LineBasicMaterial(n):new THREE.LineDashedMaterial(e.Utils.extend({dashSize:a,gapSize:i},n))}if(e.Drawing3D.isMaterial(t)){return i(new THREE.MeshBasicMaterial(a))}return null}function s(t){if(e.Utils.isNullOrEmpty(t.content))throw new Error("Missing content.");{const e=t.type?.toLowerCase();if("obj"===e){return(new THREE.OBJLoader).parse(t.content)}return(new THREE.ObjectLoader).parse(t.content)}}function o(t){if(e.Utils.isNullOrEmpty(t.geometry))return null;return new(t.geometry instanceof e.Drawing3D.LineGeometry?THREE.Line:THREE.Mesh)}function c(){return"THREE"in window}let l=class Pacem3DThreeAdapterElement extends t.Pacem3DAdapterElement{constructor(){super(...arguments),this._renderer=null,this._camera=null,this._scene=null,this._orbitCtrls=null,this._objects=new WeakMap,this._dict={},this._orbitControlsDelegate=e=>{},this._ensureAndRefresh=(a,c,l)=>{if(c.matrixAutoUpdate=!1,c.visible=!a.hide){if(e.Drawing3D.isMesh(a)){let s=c;if(a.flags.indexOf(t.StalePropertyFlag.Geometry)>=0){s.geometry.dispose();const t=o(a);t.constructor.name!==s.constructor.name&&(l.remove(c),delete this._dict[c.id],c=s=t),s.geometry=function(t){const a=new THREE.BufferGeometry,i=r(t.positions);if(a.setAttribute("position",new THREE.Float32BufferAttribute(i,3)),t instanceof e.Drawing3D.MeshGeometry){e.Utils.isNullOrEmpty(t.triangleIndices)||a.setIndex(t.triangleIndices);const i=r(t.positions);a.setAttribute("position",new THREE.Float32BufferAttribute(i,3));const n=r(t.textureCoordinates);if(a.setAttribute("uv",new THREE.Float32BufferAttribute(n,2)),e.Utils.isNullOrEmpty(t.normals))a.computeVertexNormals();else{const e=r(t.normals);a.setAttribute("normal",new THREE.Float32BufferAttribute(e,3))}}return a}(a.geometry)}if(a.flags.indexOf(t.StalePropertyFlag.Material)>=0){if(e.Utils.isArray(s.material))for(let e of s.material)e.dispose();else s.material.dispose();s.material=function(t,r,a){const i=a,s=[],o=n(t);if(e.Utils.isNull(o)||(o.side=THREE.FrontSide,s.push(o)),!e.Utils.isNull(r))if(r==t)o.side=THREE.DoubleSide;else{const t=n(r);e.Utils.isNull(t)||(t.side=THREE.BackSide,s.push(t))}return i&&s.length>1?s:o}(a.material)||i.DEFAULT_MATERIAL()}}else if(a instanceof t.Pacem3DObjectElement&&(a.flags.indexOf(t.StalePropertyFlag.Material)>=0||a.flags.indexOf(t.StalePropertyFlag.Geometry)>=0))c.parent&&c.parent.remove(c),c=s(a);else if(a instanceof t.Pacem3DGroupElement){if(a.flags.indexOf(t.StalePropertyFlag.Children)>=0){for(let e=c.children.length-1;e>=0;e--){const t=c.children[e];c.remove(t)}for(let e of a.items)this._addOrUpdateItem(e,c)}}else if(a instanceof t.Pacem3DLightElement){const e=c;a.flags.indexOf(t.StalePropertyFlag.Light)>=0&&(e.color=new THREE.Color(a.color),e.intensity=a.intensity)}let h=a.position;if(e.Drawing3D.isUi3DObject(a)&&!e.Utils.isNull(a.transformMatrix)&&(a.flags.indexOf(t.StalePropertyFlag.Position)>=0||a.flags.indexOf(t.StalePropertyFlag.Transform)>=0)){const t=e.Geometry.LinearAlgebra.Matrix3D.from(1,0,0,0,0,1,0,0,0,0,1,0,h.x,h.y,h.z,1),r=e.Geometry.LinearAlgebra.Matrix3D.multiply(a.transformMatrix,t);THREE.Matrix4.prototype.set.apply(c.matrix,[(m=r).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])}else a.flags.indexOf(t.StalePropertyFlag.Position)>=0&&(c.position.set(h.x,h.y,h.z),c.updateMatrix())}var m;return c.userData=a.tag,e.Utils.isNull(l.getObjectById(c.id))&&(l.add(c),this._dict[c.id]=a),a.flags.splice(0),c}}dispose(e){}project(t){if(e.Utils.isNull(this._camera)||e.Utils.isNull(this._stage))return null;const r=new THREE.Vector3(t.x,t.y,t.z),a=this._stage.width/2,i=this._stage.height/2,n=r.project(this._camera);return{x:n.x*a+a,y:-n.y*i+i}}zoomFit(...t){return new Promise(((r,a)=>{const i=this._camera,n=this._objects,s=t.filter((e=>n.has(e))).map((e=>n.get(e)));(e.Utils.isNull(i)||e.Utils.isNullOrEmpty(s))&&r(),function(t,r,a,i=1.333){const n=new THREE.Box3;for(const e of a)n.expandByObject(e);const s=n.getSize(new THREE.Vector3),o=n.getCenter(new THREE.Vector3),c=Math.max(s.x,s.y,s.z)/(2*Math.atan(Math.PI*t.fov/360)),l=c/t.aspect,m=i*Math.max(c,l),h=!e.Utils.isNull(r);var p;h&&(p=r.target.clone().sub(t.position).normalize().multiplyScalar(m),r.maxDistance=10*m,r.target.copy(o)),t.near=m/100,t.far=100*m,t.updateProjectionMatrix(),h&&(t.position.copy(r.target).sub(p),r.update())}(i,this._orbitCtrls,s),r()}))}get scene(){return this._scene}raycast(t,r){if(c()&&!e.Utils.isNull(this._camera)){const e=this._camera,a=new THREE.Vector2(t.x/r.width*2-1,-t.y/r.height*2+1),i=new THREE.Raycaster;i.setFromCamera(a,e);const n=i.intersectObjects(this._scene.children,!0);let s,o,c=0;for(;n.length>c&&(o=n[c++])&&(s=o.object);){if(this._dict[s.id].inert)continue;const e=o.point,t={x:e.x,y:e.y,z:e.z};return{object:this._dict[s.id],point:t}}}return null}async initialize(t){if(!e.Utils.isNull(this._stage))return this._stage;this._3d=t;const r=t.stage,a=this._stage=document.createElement("canvas");r.innerHTML="",r.appendChild(a),await e.CustomElementUtils.importjs(i.API_URI),await async function(...e){const t=Date.now();var r=!1;do{r=c();for(let t of e)r&&=t();r||await new Promise((e=>setTimeout(e,500)))}while(!r&&Date.now()-t<3e4);if(!r)throw new Error("The wait for THREE adapter initialization timed out.")}(),await Promise.all([e.CustomElementUtils.importjs(i.ORBIT_URI)].concat(i.LOADERS.map((t=>e.CustomElementUtils.importjs(t))))),this._scene=new THREE.Scene,this.invalidateSize(t.size);let n=this._stage.width,s=this._stage.height,o={canvas:a,antialias:!0,stencil:!1,alpha:!0};return this._renderer=new THREE.WebGLRenderer(o),this._renderer.setSize(n,s),this.orbit=t.orbit,a}_setCamera(e){this._camera=e,this.invalidateSize(this._3d.size),this._disposeOrbitControls(),this.orbit&&this._initOrbitControls()}propertyChangedCallback(e,t,r,a){super.propertyChangedCallback(e,t,r,a),"orbit"===e&&(!0===r?this._initOrbitControls():this._disposeOrbitControls())}_initOrbitControls(){const t=this._camera;if(e.Utils.isNull(this._3d)||e.Utils.isNull(t))return;(this._orbitCtrls=new THREE.OrbitControls(t,this._3d.stage)).addEventListener("change",this._orbitControlsDelegate)}_disposeOrbitControls(){const t=this._orbitCtrls;e.Utils.isNull(t)||(t.removeEventListener("change",this._orbitControlsDelegate),t.dispose())}invalidateSize(t){if(!c()||e.Utils.isNull(t))return;let r=t.width,a=t.height;this._stage.width=r,this._stage.height=a;let i=this._camera;i instanceof THREE.PerspectiveCamera&&(i.aspect=r/a,i.updateProjectionMatrix()),this._renderer&&this._renderer.setSize(r,a)}removeItem(t){const r=this._objects,a=r.get(t);e.Utils.isNull(a)||(this._scene.remove(a),delete this._dict[a.id],r.delete(t))}updateItem(e){this._addOrUpdateItem(e)}addItem(e){this._addOrUpdateItem(e)}_addOrUpdateItem(r,a=this._scene){if(c()&&!e.Utils.isNull(a))if(r instanceof t.Pacem3DCameraElement){if("perspective"===r.type){if(this._camera instanceof THREE.PerspectiveCamera)var i=this._camera;else i=new THREE.PerspectiveCamera;const t=new THREE.Vector3(r.lookAt.x,r.lookAt.y,r.lookAt.z);i.lookAt(t),i.fov=r.fov,i.aspect=r.aspect,i.near=r.near,i.far=r.far,i.position.set(r.position.x,r.position.y,r.position.z),this._setCamera(i);const a=this._orbitCtrls;e.Utils.isNull(a)||a.object!==i||(a.target=t,a.update())}}else if(this._objects.has(r)){const e=this._objects.get(r),t=this._ensureAndRefresh(r,e,a);t!=e&&this._objects.set(r,t)}else{const e=e=>{e&&(e=this._ensureAndRefresh(r,e,a),this._objects.set(r,e))};if(r instanceof t.Pacem3DObjectElement){e(s(r))}else if(r instanceof t.Pacem3DMeshElement){e(o(r))}else if(r instanceof t.Pacem3DLightElement){const t=function(e){var t;if("spot"===e.type){const r=new THREE.SpotLight;r.target.position.set(e.target.x,e.target.y,e.target.z),t=r}else t=new THREE.PointLight;return t}(r);e(t)}else if(r instanceof t.Pacem3DGroupElement){e(new THREE.Group)}}}render(){this._camera&&this._renderer.render(this._scene,this._camera)}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],l.prototype,"orbit",void 0),l=__decorate([e.CustomElement({tagName:e.P+"-3d-three-adapter"})],l),t.Pacem3DThreeAdapterElement=l}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){let r=class BasicMaterialElement extends t.MaterialElement{constructor(){super(e.Drawing3D.KnownShader.Basic)}};r=__decorate([e.CustomElement({tagName:`${e.P}-${t.TAG_MIDDLE_NAME}-material-basic`})],r),t.BasicMaterialElement=r}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){let r=class LambertMaterialElement extends t.MaterialElement{constructor(){super(e.Drawing3D.KnownShader.Lambert)}createMaterial(){return e.Utils.extend({emissiveColor:this.emissiveColor||"#000",reflectivity:this.reflectivity??0,refractionRatio:this.refractionRatio??0},super.createMaterial())}propertyChangedCallback(e,t,r,a){if(super.propertyChangedCallback(e,t,r,a),!a)switch(e){case"emissiveColor":case"reflectivity":case"refractionRatio":this.updateMaterial()}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"emissiveColor",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"reflectivity",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"refractionRatio",void 0),r=__decorate([e.CustomElement({tagName:`${e.P}-${t.TAG_MIDDLE_NAME}-material-lambert`})],r),t.LambertMaterialElement=r}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){let r=class LineMaterialElement extends t.MaterialElement{constructor(){super(e.Drawing3D.KnownShader.Line)}createMaterial(){return e.Utils.extend({lineWidth:this.lineWidth??1,lineJoin:this.lineJoin??"round",lineCap:this.lineCap??"round",dashArray:this.dashArray},super.createMaterial())}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"lineWidth",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"lineJoin",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"lineCap",void 0),__decorate([e.Watch({emit:!1,converter:{convert:e=>e?.split(",").map((e=>parseInt(e))).filter((e=>!Number.isNaN(e))),convertBack:e=>e?.join(",")}})],r.prototype,"dashArray",void 0),r=__decorate([e.CustomElement({tagName:`${e.P}-${t.TAG_MIDDLE_NAME}-material-line`})],r),t.LineMaterialElement=r}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){let r=class PhongMaterialElement extends t.MaterialElement{constructor(){super(e.Drawing3D.KnownShader.Phong)}createMaterial(){return e.Utils.extend({emissiveColor:this.emissiveColor||"#000",reflectivity:this.reflectivity??0,refractionRatio:this.refractionRatio??0,specularColor:this.specularColor||"#000",shininess:this.shininess??0,flatShading:this.flatShading??!0},super.createMaterial())}propertyChangedCallback(e,t,r,a){if(super.propertyChangedCallback(e,t,r,a),!a)switch(e){case"emissiveColor":case"reflectivity":case"refractionRatio":case"specularColor":case"shininess":case"flatShading":this.updateMaterial()}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"emissiveColor",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"reflectivity",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"refractionRatio",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"specularColor",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"shininess",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],r.prototype,"flatShading",void 0),r=__decorate([e.CustomElement({tagName:`${e.P}-${t.TAG_MIDDLE_NAME}-material-phong`})],r),t.PhongMaterialElement=r}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){let r=class StandardMaterialElement extends t.MaterialElement{constructor(){super(e.Drawing3D.KnownShader.Standard)}createMaterial(){return e.Utils.extend({emissiveColor:this.emissiveColor||"#000",refractionRatio:this.refractionRatio??0,metalness:this.metalness??0,roughness:this.roughness??0,flatShading:this.flatShading??!1},super.createMaterial())}propertyChangedCallback(e,t,r,a){if(super.propertyChangedCallback(e,t,r,a),!a)switch(e){case"emissiveColor":case"roughness":case"metalness":case"refractionRatio":case"flatShading":this.updateMaterial()}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"emissiveColor",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"refractionRatio",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"roughness",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"metalness",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],r.prototype,"flatShading",void 0),r=__decorate([e.CustomElement({tagName:`${e.P}-${t.TAG_MIDDLE_NAME}-material-standard`})],r),t.StandardMaterialElement=r}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){class OBJParser{static parse(r){const a=[],i=/^v((\s+-?[\d\.]+){3})/gm;let n=i.exec(r);for(;n&&n.length;)a.push(t.Point3DConverter.convert(n[1])),n=i.exec(r);const s=[],o=/^vt((\s+-?[\d\.]+){2})/gm;for(n=o.exec(r);n&&n.length;)s.push(e.Point.parse(n[1])),n=o.exec(r);const c=new Array(s.length),l=[],m=/^vn((\s+-?[\d\.]+){3})/gm;for(n=m.exec(r);n&&n.length;)l.push(t.Point3DConverter.convert(n[1])),n=m.exec(r);const h=new Array(l.length),p=[],d=/^f((\s+([\d]+\/[\d]+\/[\d]+)){3,})/gm;for(n=d.exec(r);n&&n.length;){const e=/([\d]+)\/([\d]+)\/([\d]+)/g,t=n[1];let i=e.exec(t),o=0;for(var u,y,v,_,g,f,E=p.length;i&&i.length;)o>2&&(p.push(a[u]),c[E]=s[y],h[E]=l[v],E++,p.push(a[_]),c[E]=s[g],h[E]=l[f],E++),_=parseInt(i[1])-1,g=parseInt(i[2])-1,f=parseInt(i[3])-1,p.push(a[_]),c[E]=s[g],h[E]=l[f],0===o&&(u=_,y=g,v=f),o++,E++,i=e.exec(t);n=d.exec(r)}return new t.MeshGeometry(p,[],c,h)}}__decorate([e.Transformer("parse3D")],class Parser3D{static parseGeometry(e,t){if("obj"===t.toLowerCase())return OBJParser.parse(e);throw new Error(`Type '${t}' is not supported.`)}},"parseGeometry",null)}(e.Drawing3D||(e.Drawing3D={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(r){class Pacem3DPrimitiveElement extends t.PacemEventTarget{viewActivatedCallback(){super.viewActivatedCallback(),e.Utils.isNull(this.geometry)&&(this.geometry=this.createDefaultGeometry())}}__decorate([e.Watch({converter:e.PropertyConverters.Json})],Pacem3DPrimitiveElement.prototype,"geometry",void 0),r.Pacem3DPrimitiveElement=Pacem3DPrimitiveElement}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;let a=r=class PacemBoxElement extends t.Pacem3DPrimitiveElement{static createMeshGeometry(t,r,a,i,n,s){const o=t||1,c=r||1,l=a||1,m=i||1,h=n||1,p=s||1,d=[],u=[],y=[];for(var v=0;v<=h;v++)for(var _=c/2-c*(1*v)/(1*h),g=0;g<=p;g++)for(var f=-l/2+l*(1*g)/(1*p),E=0;E<=m;E++){var D=-o/2+o*(1*E)/(1*m);0!=E&&E!=m&&0!=g&&g!=p&&0!=v&&v!=h||d.push({x:D,y:_,z:f})}var C=function(e,t,r){for(var a=1e-5,i=0;i<d.length;i++){var n=d[i];if(Math.abs(n.x-e)<a&&Math.abs(n.y-t)<a&&Math.abs(n.z-r)<a)return i}return-1},P=function(e,t,r,a,i,n,s,o){y.push(e),y.push(t),y.push(r),y.push(e),y.push(r),y.push(a),u.push({x:i,y:o}),u.push({x:s,y:o}),u.push({x:s,y:n}),u.push({x:i,y:o}),u.push({x:s,y:n}),u.push({x:i,y:n})};for(g=0;g<p;g++){_=c/2,f=-l/2+l*(1*g)/(1*p);var M=-l/2+l*(1*(g+1))/(1*p);for(E=0;E<m;E++){var b=-o/2+1*(E+1)*o/(1*m);P(C(D=-o/2+1*E*o/(1*m),_,M),C(b,_,M),C(b,_,f),C(D,_,f),1*E/(1*m),1-1*g/(1*p),1*(E+1)/(1*m),1-1*(g+1)/(1*p))}}for(v=0;v<h;v++){_=c/2-1*v*c/(1*h);var w=c/2-(v+1)*c/(1*h);for(f=-l/2,E=0;E<m;E++){b=o/2-(E+1)*o/(1*m);P(C(D=o/2-1*E*o/(1*m),w,f),C(b,w,f),C(b,_,f),C(D,_,f),1*E/(1*m),1-1*v/(1*h),(E+1)/(1*m),1-(v+1)/(1*h))}}for(v=0;v<h;v++)for(_=c/2-1*v*c/(1*h),w=c/2-(v+1)*c/(1*h),D=-o/2,g=0;g<p;g++){M=-l/2+(g+1)*l/(1*p);P(C(D,w,f=-l/2+g*l/(1*p)),C(D,w,M),C(D,_,M),C(D,_,f),1*g/(1*p),1-v/(1*h),(g+1)/(1*p),1-(v+1)/(1*h))}for(v=0;v<h;v++)for(_=c/2-v*c/(1*h),w=c/2-(v+1)*c/(1*h),f=l/2,E=0;E<m;E++){b=-o/2+(E+1)*o/(1*m);P(C(D=-o/2+E*o/(1*m),w,f),C(b,w,f),C(b,_,f),C(D,_,f),1*E/(1*m),1-1*v/(1*h),(E+1)/(1*m),1-(v+1)/(1*h))}for(v=0;v<h;v++)for(_=c/2-v*c/(1*h),w=c/2-(v+1)*c/(1*h),D=o/2,g=0;g<p;g++){M=l/2-(g+1)*l/(1*p);P(C(D,w,f=l/2-g*l/(1*p)),C(D,w,M),C(D,_,M),C(D,_,f),1*g/(1*p),1-1*v/(1*h),(g+1)/(1*p),1-(v+1)/(1*h))}for(g=0;g<p;g++)for(_=-c/2,f=l/2-l*g/(1*p),M=l/2-l*(g+1)/(1*p),E=0;E<m;E++){b=-o/2+(E+1)*o/(1*m);P(C(D=-o/2+E*o/(1*m),_,M),C(b,_,M),C(b,_,f),C(D,_,f),1*E/(1*m),1-1*g/(1*p),(E+1)/(1*m),1-(g+1)/(1*p))}const x=new e.Drawing3D.MeshGeometry(d,y,u);return e.Drawing3D.computeSharpVertexNormals(x),x}createDefaultGeometry(){return r.createMeshGeometry()}propertyChangedCallback(e,t,a,i){switch(super.propertyChangedCallback(e,t,a,i),e){case"width":case"height":case"depth":case"widthSegments":case"heightSegments":case"depthSegments":this.geometry=r.createMeshGeometry(this.width,this.height,this.depth,this.widthSegments,this.heightSegments,this.depthSegments)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"width",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"height",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"depth",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"widthSegments",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"heightSegments",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"depthSegments",void 0),a=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-box"})],a),t.PacemBoxElement=a}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;let a=r=class PacemCylinderElement extends t.Pacem3DPrimitiveElement{static createMeshGeometry(r,a,i,n,s){const o=r||1;a||=1,i||=18,n||=5,s||=1;const c=[],l=[],m=[],h=t.DEG2RAD*(360/i);c.push({x:0,y:a,z:0}),c.push({x:0,y:0,z:0});const p=o/s;for(let e=1;e<=s;e++)for(var d=p*e,u=0;u<i;u++){const t=2+2*i*(e-1),r=0==u?t+2*(i-1):t+2*(u-1),n=t+2*u,p=Math.cos(h*u),y=-Math.sin(h*u),v=Math.cos(h*(u-1)),_=-Math.sin(h*(u-1)),g=d*p,f=d*y,E={x:g,y:a,z:f},D={x:g,y:0,z:f};c.push(E),c.push(D);const C=.5*d/o,P=p*C,M=y*C,b=v*C,w=_*C;if(1==e){const e=[0,r,n],t=[1,n+1,r+1],a=[{x:.5,y:.5},{x:.5+b,y:.5-w},{x:.5+P,y:.5-M}],i=[{x:.5,y:.5},{x:.5+P,y:.5+M},{x:.5+b,y:.5+w}];Array.prototype.push.apply(m,e),Array.prototype.push.apply(m,t);for(let e=0;e<a.length;e++)l.push(a[e]);for(let e=0;e<i.length;e++)l.push(i[e])}else{const t=2+2*i*(e-2),a=0==u?t+2*(i-1):t+2*(u-1),o=t+2*u,c=(e-1)/s*.5,h=p*c,d=y*c,g=v*c,f=_*c,E={x:.5+b,y:.5-w},D={x:.5+P,y:.5-M},C={x:.5+h,y:.5-d},x={x:.5+g,y:.5-f},A={x:.5+b,y:.5+w},N={x:.5+P,y:.5+M},R={x:.5+h,y:.5+d},S={x:.5+g,y:.5+f};m.push(r),m.push(n),m.push(a),m.push(a),m.push(n),m.push(o),m.push(o+1),m.push(n+1),m.push(r+1),m.push(o+1),m.push(r+1),m.push(a+1),l.push(E),l.push(D),l.push(x),l.push(x),l.push(D),l.push(C),l.push(R),l.push(N),l.push(A),l.push(R),l.push(A),l.push(S)}}const y=2+2*i*s,v=2+2*i*(s-1),_=1/i,g=1/n;for(let e=1;e<=n;e++)for(let t=0;t<i;t++){if(e!=n){var f=o*Math.cos(h*t),E=-o*Math.sin(h*t),D=a*e/n;c.push({x:f,y:D,z:E})}const r=0==t?i-1:t-1,s=1==e?v+2*r+1:y+i*(e-2)+r,p=1==e?v+2*t+1:y+i*(e-2)+t,d=e==n?v+2*t:y+i*(e-1)+t,u=r*_,C=(e-1)*g,P=0==t?1:t*_,M=e*g,b={x:u,y:C},w={x:P,y:C},x={x:P,y:M},A={x:u,y:M};m.push(s),m.push(p),m.push(d),l.push(b),l.push(w),l.push(x),l.push(b),l.push(x),l.push(A)}return new e.Drawing3D.MeshGeometry(c,m,l)}createDefaultGeometry(){return r.createMeshGeometry()}propertyChangedCallback(e,t,a,i){switch(super.propertyChangedCallback(e,t,a,i),e){case"radius":case"height":case"sides":case"heightSegments":case"capSegments":this.geometry=r.createMeshGeometry(this.radius,this.height,this.sides,this.heightSegments,this.capSegments)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"radius",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"height",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"sides",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"heightSegments",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"capSegments",void 0),a=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-cylinder"})],a),t.PacemCylinderElement=a}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;const a=[{x:0,y:0,z:0},{x:0,y:1,z:0}];let i=r=class PacemLineElement extends t.Pacem3DPrimitiveElement{static createLineGeometry(t){return new e.Drawing3D.LineGeometry(t||a)}createDefaultGeometry(){return r.createLineGeometry()}propertyChangedCallback(e,t,a,i){if(super.propertyChangedCallback(e,t,a,i),"positions"===e)this.geometry=r.createLineGeometry(a)}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],i.prototype,"positions",void 0),i=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-line"})],i),t.PacemLineElement=i}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;let a=r=class PacemPlaneElement extends t.Pacem3DPrimitiveElement{static createMeshGeometry(t,r,a,i){t||=1,r||=1,a||=4,i||=4;const n=[],s=[],o=[],c=[],l=e.Geometry.LinearAlgebra.Vector3D.from(0,0,1);for(let e=0;e<=i;e++)for(let m=0;m<=a;m++){const h=-t/2+m*t/(1*a),p=0,d=-r/2+e*r/(1*i);if(n.push({x:h,y:p,z:d}),e<i&&m<a){const t=a+1,r=(m+1)/(1*a),n=1*m/(1*a),h=1-(e+1)/(1*i),p=1-1*e/(1*i);o.push((e+1)*t+m),o.push((e+1)*t+m+1),o.push(e*t+m+1),o.push((e+1)*t+m),o.push(e*t+m+1),o.push(e*t+m),s.push({x:n,y:h}),s.push({x:r,y:h}),s.push({x:r,y:p}),s.push({x:n,y:h}),s.push({x:r,y:p}),s.push({x:n,y:p}),c.push(l,l,l,l,l,l)}}return new e.Drawing3D.MeshGeometry(n,o,s,c)}createDefaultGeometry(){return r.createMeshGeometry()}propertyChangedCallback(e,t,a,i){switch(super.propertyChangedCallback(e,t,a,i),e){case"width":case"length":case"widthSegments":case"lengthSegments":this.geometry=r.createMeshGeometry(this.width,this.length,this.widthSegments,this.lengthSegments)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"width",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"length",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"widthSegments",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"lengthSegments",void 0),a=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-plane"})],a),t.PacemPlaneElement=a}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r,a,i,n,s;const o=function(e){const t=/([\d.-]+)/i;var r=t.exec(e);const a=[];for(;null!=r;){const i=r[0],n=parseFloat(i);a.push(n),e=e.replace(i,""),r=t.exec(e)}return a},c=e.Geometry.LinearAlgebra.Vector3D;class PolyhedronElement extends t.Pacem3DPrimitiveElement{propertyChangedCallback(e,t,r,a){super.propertyChangedCallback(e,t,r,a),"radius"===e&&this._assignMeshGeometry(r)}_assignMeshGeometry(e){this.geometry=this.createMeshGeometry(e>0?e:1)}createDefaultGeometry(){return this.createMeshGeometry(1)}}__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],PolyhedronElement.prototype,"radius",void 0),t.PolyhedronElement=PolyhedronElement;let l=r=class PacemTetrahedronElement extends PolyhedronElement{static createMeshGeometry(t){t||=1;const r="0 0.5774 -0.8165, 0 0.5774 0.8165, 0.8165 -0.5774 0, -0.8165 -0.5774 0".split(","),a=[];for(let e=0;e<r.length;e++){const i=r[e],n=o(i);a.push({x:n[0]*t,y:n[1]*t,z:n[2]*t})}const i="0.5 0.9995, 0.5 0.0004995, 0.0004995 0.5, 0.9995 0.5, 0.5 0.0004995, 0.9995 0.5, 0.5 0.9995, 0.0004995 0.5, 0.9995 0.5, 0.5 0.9995, 0.0004995 0.5, 0.5 0.0004995".split(","),n=[4,5,6,7,8,9,10,11,0,3,2,1],s=[];for(let e=0;e<n.length;e++){const t=o(i[n[e]]);s.push({x:t[0],y:t[1]})}const c=new e.Drawing3D.MeshGeometry(a,[1,2,0,2,3,0,3,1,0,3,2,1],s);return e.Drawing3D.computeSharpVertexNormals(c),c}createMeshGeometry(e=this.radius){return r.createMeshGeometry(e)}};l=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-tetrahedron"})],l),t.PacemTetrahedronElement=l;let m=a=class PacemOctahedronElement extends PolyhedronElement{static createMeshGeometry(t){t||=1;const r=[6,7,8,9,10,11,12,13,14,15,16,0,17,18,19,20,21,1,2,22,23,4,3,5],a="0 0.7071 -0.7071, 0 0.7071 0.7071, 1 0 0, 0 -0.7071 -0.7071, -1 0 0, 0 -0.7071 0.7071".split(","),i=[];for(let e=0;e<a.length;e++){const r=a[e],n=o(r);i.push({x:n[0]*t,y:n[1]*t,z:n[2]*t})}const n="0.5 0.9995, 0.5 0.9995, 0.0004995 0.5, 0.5 0.9995, 0.9995 0.5, 0.5 0.0004995, 0.5 0.0004995, 0.9995 0.5, 0.5 0.9995, 0.0004995 0.5, 0.5 0.0004995, 0.5 0.9995, 0.5 0.0004995, 0.9995 0.5, 0.5 0.9995, 0.0004995 0.5, 0.5 0.0004995, 0.0004995 0.5, 0.5 0.0004995, 0.5 0.9995, 0.5 0.0004995, 0.9995 0.5, 0.5 0.0004995, 0.5 0.9995".split(","),s=[];for(let e=0;e<r.length;e++){const t=o(n[r[e]]);s.push({x:t[0],y:t[1]})}const c=new e.Drawing3D.MeshGeometry(i,[1,2,0,2,3,0,3,4,0,4,1,0,4,5,1,5,2,1,2,5,3,4,3,5],s);return e.Drawing3D.computeSharpVertexNormals(c),c}createMeshGeometry(e=this.radius){return a.createMeshGeometry(e)}};m=a=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-octahedron"})],m),t.PacemOctahedronElement=m;let h=i=class PacemHexahedronElement extends PolyhedronElement{static createMeshGeometry(t){t||=1;const r=2*t*(1/Math.sqrt(3));return e.Components.Drawing3D.PacemBoxElement.createMeshGeometry(r,r,r)}createMeshGeometry(e=this.radius){return i.createMeshGeometry(e)}};h=i=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-hexahedron"})],h),t.PacemHexahedronElement=h;let p=n=class PacemIcosahedronElement extends PolyhedronElement{static createMeshGeometry(t){t||=1;const r=[12,13,14,15,16,17,18,19,20,21,22,23,24,25,0,26,27,28,29,30,31,32,33,1,34,35,36,2,37,38,39,40,41,42,43,7,44,45,46,8,47,48,49,50,51,52,53,9,54,55,3,10,56,57,6,58,59,5,4,11],a="0 0.850651 -0.525731, 0 0.850651 0.525731, 0.850651 0.525731 0, 0.525731 0 -0.850651, -0.525731 0 -0.850651, -0.850651 0.525731 0, -0.525731 0 0.850651, 0.525731 0 0.850651, 0.850651 -0.525731 0, 0 -0.850651 0.525731, 0 -0.850651 -0.525731, -0.850651 -0.525731 0".split(","),i=[];for(let e=0;e<a.length;e++){const r=a[e],n=o(r);i.push({x:n[0]*t,y:n[1]*t,z:n[2]*t})}const n="0.5 0.808708, 0.5 0.999501, 0.5 0.808708, 0.191292 0.5, 0.000499547 0.5, 0.5 0.808708, 0.9995 0.5, 0.808708 0.5,0.000499487 0.5, 0.5 0.191292, 0.5 0.000499487, 0.5 0.191292,0.5 0.191292, 0.999501 0.5, 0.5 0.808708, 0.5 0.808708,0.9995 0.5, 0.808708 0.999501, 0.191292 0.5, 0.808708 0.5,0.5 0.999501, 0.808708 0.5, 0.999501 0.808708, 0.5 0.999501,0.000499487 0.5, 0.5 0.191292, 0.5 0.808708, 0.9995 0.5,0.808708 0.999501, 0.191292 0.5, 0.808708 0.5, 0.5 0.999501,0.808708 0.5, 0.999501 0.808708, 0.5 0.808708, 0.5 0.191292,0.9995 0.5, 0.000499547 0.5, 0.5 0.191292, 0.191292 0.5,0.5 0.000499487, 0.808708 0.5, 0.5 0.000499487, 0.999501 0.191292,0.5 0.191292, 0.808708 0.000499487, 0.9995 0.5, 0.5 0.191292,0.5 0.808708, 0.9995 0.5, 0.5 0.191292, 0.808708 0.000499487,0.999501 0.5, 0.5 0.808708, 0.5 0.000499487, 0.808708 0.5,0.999501 0.191292, 0.808708 0.5, 0.5 0.808708, 0.5 0.191292".split(","),s=[];for(let e=0;e<r.length;e++){const t=o(n[r[e]]);s.push({x:t[0],y:t[1]})}const c=new e.Drawing3D.MeshGeometry(i,[1,2,0,2,3,0,3,4,0,4,5,0,5,1,0,5,6,1,6,7,1,7,2,1,2,8,3,2,7,8,6,9,7,9,8,7,8,10,3,8,9,10,6,11,9,11,10,9,10,4,3,10,11,4,6,5,11,5,4,11],s);return e.Drawing3D.computeSharpVertexNormals(c),c}createMeshGeometry(e=this.radius){return n.createMeshGeometry(e)}};p=n=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-icosahedron"})],p),t.PacemIcosahedronElement=p;let d=s=class PacemDodecahedronElement extends PolyhedronElement{static createMeshGeometry(t){t||=1;const r=[c.from(.356822*t,.934172*t,0*t),c.from(-.356822*t,.934172*t,0*t),c.from(.57735*t,.57735*t,-.57735*t),c.from(0*t,.356822*t,-.934172*t),c.from(-.57735*t,.57735*t,-.57735*t),c.from(-.57735*t,.57735*t,.57735*t),c.from(0*t,.356822*t,.934172*t),c.from(.57735*t,.57735*t,.57735*t),c.from(.934172*t,0*t,-.356822*t),c.from(.934172*t,0*t,.356822*t),c.from(0*t,-.356822*t,.934172*t),c.from(.57735*t,-.57735*t,.57735*t),c.from(.57735*t,-.57735*t,-.57735*t),c.from(.356822*t,-.934172*t,0*t),c.from(-.57735*t,-.57735*t,.57735*t),c.from(-.356822*t,-.934172*t,0*t),c.from(0*t,-.356822*t,-.934172*t),c.from(-.57735*t,-.57735*t,-.57735*t),c.from(-.934172*t,0*t,.356822*t),c.from(-.934172*t,0*t,-.356822*t)],a=[20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,0,46,47,48,49,50,51,7,52,53,54,55,56,57,58,59,60,61,9,62,63,64,65,66,67,11,68,69,70,71,72,73,74,75,76,77,13,78,79,80,81,82,83,15,84,85,86,87,88,89,90,91,92,93,17,94,95,96,97,98,99,19,1,4,100,14,101,102,10,103,18,6,5,104,2,105,106,8,107,3,12,16],i="0.5 0.999501, 0.5 0.999501, 0.191292 0.808708, 0.5 0.690792, 0.191292 0.808708, 0.191292 0.808708, 0.5 0.690792, 0.808708 0.808708, 0.000499517 0.5, 0.309208 0.5, 0.5 0.309208, 0.191292 0.191292, 0.191292 0.191292, 0.309208 0.5, 0.191292 0.191292, 0.5 0.000499517, 0.5 0.309208, 0.808708 0.191292, 0.000499517 0.5, 0.309208 0.5, 0.690792 0.5, 0.808708 0.808708, 0.5 0.999501, 0.690792 0.5, 0.5 0.999501, 0.191292 0.808708, 0.690792 0.5, 0.191292 0.808708, 0.309208 0.5, 0.309208 0.5, 0.191292 0.191292, 0.5 0.000499517, 0.309208 0.5, 0.5 0.000499517, 0.808708 0.191292, 0.309208 0.5, 0.808708 0.191292, 0.690792 0.5, 0.191292 0.808708, 0.309208 0.5, 0.690792 0.5, 0.191292 0.808708, 0.690792 0.5, 0.808708 0.808708, 0.191292 0.808708, 0.808708 0.808708, 0.808708 0.808708, 0.5 0.690792, 0.5 0.309208, 0.808708 0.808708, 0.5 0.309208, 0.808708 0.191292, 0.808708 0.191292, 0.9995 0.5, 0.191292 0.191292, 0.5 0.000499517, 0.808708 0.191292, 0.191292 0.191292, 0.808708 0.191292, 0.690792 0.5, 0.191292 0.191292, 0.690792 0.5, 0.191292 0.191292, 0.5 0.000499517, 0.808708 0.191292, 0.191292 0.191292, 0.808708 0.191292, 0.690792 0.5, 0.690792 0.5, 0.309208 0.5, 0.690792 0.5, 0.808708 0.808708, 0.5 0.999501, 0.690792 0.5, 0.5 0.999501, 0.191292 0.808708, 0.690792 0.5, 0.191292 0.808708, 0.5 0.000499517, 0.808708 0.191292, 0.690792 0.5, 0.5 0.000499517, 0.690792 0.5, 0.309208 0.5, 0.309208 0.5, 0.191292 0.191292, 0.9995 0.5, 0.808708 0.808708, 0.5 0.690792, 0.9995 0.5, 0.5 0.690792, 0.5 0.309208, 0.9995 0.5, 0.5 0.309208, 0.309208 0.5, 0.690792 0.5, 0.808708 0.808708, 0.309208 0.5, 0.808708 0.808708, 0.5 0.999501, 0.000499517 0.5, 0.5 0.309208, 0.000499517 0.5, 0.5 0.690792, 0.5 0.690792, 0.000499517 0.5, 0.5 0.690792, 0.191292 0.191292".split(","),n=[];for(let e=0;e<a.length;e++){const t=o(i[a[e]]);n.push({x:t[0],y:t[1]})}const s=new e.Drawing3D.MeshGeometry(r,[0,2,3,0,3,4,0,4,1,1,5,6,1,6,7,1,7,0,7,9,8,7,8,2,7,2,0,7,6,10,7,10,11,7,11,9,11,13,12,11,12,8,11,8,9,11,10,14,11,14,15,11,15,13,15,17,16,15,16,12,15,12,13,15,14,18,15,18,19,15,19,17,19,4,3,19,3,16,19,16,17,19,18,5,19,5,1,19,1,4,18,14,10,18,10,6,18,6,5,3,2,8,3,8,12,3,12,16],n);return e.Drawing3D.computeSharpVertexNormals(s),s}createMeshGeometry(e=this.radius){return s.createMeshGeometry(e)}};d=s=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-dodecahedron"})],d),t.PacemDodecahedronElement=d}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;let a=r=class PacemSphereElement extends t.Pacem3DPrimitiveElement{static createMeshGeometry(r,a){const i=[],n=[],s=[],o=r||1,c=a||8,l=t.DEG2RAD*(360/c),m=c%2==0?c/2:(c-1)/2;i.push({x:0,y:o,z:0});for(let e=1;e<m;e++){const t=l*e,r=Math.cos(t),a=Math.sin(t),h=1-1*e/m;for(let t=0;t<c;t++){const p=l*t-Math.PI/2,d=o*a*Math.cos(p),u=o*r,y=o*a*Math.sin(p);i.push({x:d,y:u,z:y});const v=0==t?c-1:t-1,_=0==t?0:1-1*t/c,g=1-1*v/c;if(1==e)s.push(1+t),s.push(1+v),s.push(0),n.push({x:_,y:h}),n.push({x:g,y:h}),n.push({x:.5,y:1});else{s.push((e-1)*c+t+1),s.push((e-1)*c+v+1),s.push((e-2)*c+v+1),s.push((e-1)*c+t+1),s.push((e-2)*c+v+1),s.push((e-2)*c+t+1);const r=1-(e-1)/m;n.push({x:_,y:h}),n.push({x:g,y:h}),n.push({x:g,y:r}),n.push({x:_,y:h}),n.push({x:g,y:r}),n.push({x:_,y:r})}}}i.push({x:0,y:-o,z:0});const h=i.length-1;for(let e=0;e<c;e++){const t=m-2,r=0==e?c-1:e-1,a=0==e?0:1-1*e/c,i=1-1*r/c,o=1-(t+1)/m;s.push(h),s.push(t*c+1+r),s.push(t*c+1+e),n.push({x:.5,y:0}),n.push({x:i,y:o}),n.push({x:a,y:o})}return new e.Drawing3D.MeshGeometry(i,s,n)}createDefaultGeometry(){return r.createMeshGeometry()}propertyChangedCallback(e,t,a,i){switch(super.propertyChangedCallback(e,t,a,i),e){case"radius":case"segments":this.geometry=r.createMeshGeometry(this.radius,this.segments)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"radius",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"segments",void 0),a=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-sphere"})],a),t.PacemSphereElement=a}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){var r;let a=r=class PacemTorusElement extends t.Pacem3DPrimitiveElement{static createMeshGeometry(r,a,i,n){const s=[],o=[],c=[];i||=24,n||=12;const l=t.DEG2RAD*(360/i),m=t.DEG2RAD*(360/n),h=r||1,p=a||.25;for(let e=0;e<i;e++){const t=l*e-Math.PI/2,r=Math.sin(t),a=Math.cos(t);for(let t=0;t<n;t++){const l=m*t+Math.PI,d=Math.cos(l),u=h*a+p*d*a,y=p*Math.sin(l),v=h*r+p*d*r;s.push({x:u,y:y,z:v});const _=e>0?e-1:i-1,g=t>0?t-1:n-1,f=0==e?0:1-1*e/i,E=t>0?1*t/n:1,D=e>0?1-(e-1)/i:1/i,C=t>0?(t-1)/n:1-1/n;c.push(e*n+g),c.push(_*n+g),c.push(_*n+t),c.push(e*n+g),c.push(_*n+t),c.push(e*n+t),o.push({x:f,y:C}),o.push({x:D,y:C}),o.push({x:D,y:E}),o.push({x:f,y:C}),o.push({x:D,y:E}),o.push({x:f,y:E})}}return new e.Drawing3D.MeshGeometry(s,c,o)}createDefaultGeometry(){return r.createMeshGeometry()}propertyChangedCallback(e,t,a,i){switch(super.propertyChangedCallback(e,t,a,i),e){case"radius":case"innerRadius":case"segments":case"sides":this.geometry=r.createMeshGeometry(this.radius,this.innerRadius,this.segments,this.sides)}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"radius",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"innerRadius",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"segments",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],a.prototype,"sides",void 0),a=r=__decorate([e.CustomElement({tagName:e.P+"-"+t.TAG_MIDDLE_NAME+"-primitive-torus"})],a),t.PacemTorusElement=a}(t.Drawing3D||(t.Drawing3D={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={}));
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.40.0-cosa (https://js.pacem.it)
2
+ * pacem v0.40.0-cuzco (https://js.pacem.it)
3
3
  * Copyright 2023 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */