parapoly-runtime 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,4 +4,4 @@
4
4
  * Copyright 2010-2025 Three.js Authors
5
5
  * SPDX-License-Identifier: MIT
6
6
  */
7
- const n=1e3,r=1001,i=1002,s=2300,a=2301,c=2302,u=2400,_=2401,p=2402,l="srgb",h="srgb-linear",d="linear",f="srgb",y=2e3,m=2001;class g{addEventListener(t,e){void 0===this._listeners&&(this._listeners={});const o=this._listeners;void 0===o[t]&&(o[t]=[]),-1===o[t].indexOf(e)&&o[t].push(e)}hasEventListener(t,e){const o=this._listeners;return void 0!==o&&(void 0!==o[t]&&-1!==o[t].indexOf(e))}removeEventListener(t,e){const o=this._listeners;if(void 0===o)return;const n=o[t];if(void 0!==n){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}dispatchEvent(t){const e=this._listeners;if(void 0===e)return;const o=e[t.type];if(void 0!==o){t.target=this;const e=o.slice(0);for(let o=0,n=e.length;o<n;o++)e[o].call(this,t);t.target=null}}}const v=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];Math.PI,Math.PI;function w(){const t=4294967295*Math.random()|0,e=4294967295*Math.random()|0,o=4294967295*Math.random()|0,n=4294967295*Math.random()|0;return(v[255&t]+v[t>>8&255]+v[t>>16&255]+v[t>>24&255]+"-"+v[255&e]+v[e>>8&255]+"-"+v[e>>16&15|64]+v[e>>24&255]+"-"+v[63&o|128]+v[o>>8&255]+"-"+v[o>>16&255]+v[o>>24&255]+v[255&n]+v[n>>8&255]+v[n>>16&255]+v[n>>24&255]).toLowerCase()}function b(t,e,o){return Math.max(e,Math.min(o,t))}function C(t,e){return(t%e+e)%e}function x(t,e,o){return(1-o)*t+o*e}class P{constructor(t=0,e=0){P.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,o=this.y,n=t.elements;return this.x=n[0]*e+n[3]*o+n[6],this.y=n[1]*e+n[4]*o+n[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=b(this.x,t.x,e.x),this.y=b(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=b(this.x,t,e),this.y=b(this.y,t,e),this}clampLength(t,e){const o=this.length();return this.divideScalar(o||1).multiplyScalar(b(o,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const o=this.dot(t)/e;return Math.acos(b(o,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,o=this.y-t.y;return e*e+o*o}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,o){return this.x=t.x+(e.x-t.x)*o,this.y=t.y+(e.y-t.y)*o,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const o=Math.cos(e),n=Math.sin(e),r=this.x-t.x,i=this.y-t.y;return this.x=r*o-i*n+t.x,this.y=r*n+i*o+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class S{constructor(t=0,e=0,o=0,n=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=o,this._w=n}static slerpFlat(t,e,o,n,r,i,s){let a=o[n+0],c=o[n+1],u=o[n+2],_=o[n+3];const p=r[i+0],l=r[i+1],h=r[i+2],d=r[i+3];if(0===s)return t[e+0]=a,t[e+1]=c,t[e+2]=u,void(t[e+3]=_);if(1===s)return t[e+0]=p,t[e+1]=l,t[e+2]=h,void(t[e+3]=d);if(_!==d||a!==p||c!==l||u!==h){let t=1-s;const e=a*p+c*l+u*h+_*d,o=e>=0?1:-1,n=1-e*e;if(n>Number.EPSILON){const r=Math.sqrt(n),i=Math.atan2(r,e*o);t=Math.sin(t*i)/r,s=Math.sin(s*i)/r}const r=s*o;if(a=a*t+p*r,c=c*t+l*r,u=u*t+h*r,_=_*t+d*r,t===1-s){const t=1/Math.sqrt(a*a+c*c+u*u+_*_);a*=t,c*=t,u*=t,_*=t}}t[e]=a,t[e+1]=c,t[e+2]=u,t[e+3]=_}static multiplyQuaternionsFlat(t,e,o,n,r,i){const s=o[n],a=o[n+1],c=o[n+2],u=o[n+3],_=r[i],p=r[i+1],l=r[i+2],h=r[i+3];return t[e]=s*h+u*_+a*l-c*p,t[e+1]=a*h+u*p+c*_-s*l,t[e+2]=c*h+u*l+s*p-a*_,t[e+3]=u*h-s*_-a*p-c*l,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,o,n){return this._x=t,this._y=e,this._z=o,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const o=t._x,n=t._y,r=t._z,i=t._order,s=Math.cos,a=Math.sin,c=s(o/2),u=s(n/2),_=s(r/2),p=a(o/2),l=a(n/2),h=a(r/2);switch(i){case"XYZ":this._x=p*u*_+c*l*h,this._y=c*l*_-p*u*h,this._z=c*u*h+p*l*_,this._w=c*u*_-p*l*h;break;case"YXZ":this._x=p*u*_+c*l*h,this._y=c*l*_-p*u*h,this._z=c*u*h-p*l*_,this._w=c*u*_+p*l*h;break;case"ZXY":this._x=p*u*_-c*l*h,this._y=c*l*_+p*u*h,this._z=c*u*h+p*l*_,this._w=c*u*_-p*l*h;break;case"ZYX":this._x=p*u*_-c*l*h,this._y=c*l*_+p*u*h,this._z=c*u*h-p*l*_,this._w=c*u*_+p*l*h;break;case"YZX":this._x=p*u*_+c*l*h,this._y=c*l*_+p*u*h,this._z=c*u*h-p*l*_,this._w=c*u*_-p*l*h;break;case"XZY":this._x=p*u*_-c*l*h,this._y=c*l*_-p*u*h,this._z=c*u*h+p*l*_,this._w=c*u*_+p*l*h;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+i)}return!0===e&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const o=e/2,n=Math.sin(o);return this._x=t.x*n,this._y=t.y*n,this._z=t.z*n,this._w=Math.cos(o),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,o=e[0],n=e[4],r=e[8],i=e[1],s=e[5],a=e[9],c=e[2],u=e[6],_=e[10],p=o+s+_;if(p>0){const t=.5/Math.sqrt(p+1);this._w=.25/t,this._x=(u-a)*t,this._y=(r-c)*t,this._z=(i-n)*t}else if(o>s&&o>_){const t=2*Math.sqrt(1+o-s-_);this._w=(u-a)/t,this._x=.25*t,this._y=(n+i)/t,this._z=(r+c)/t}else if(s>_){const t=2*Math.sqrt(1+s-o-_);this._w=(r-c)/t,this._x=(n+i)/t,this._y=.25*t,this._z=(a+u)/t}else{const t=2*Math.sqrt(1+_-o-s);this._w=(i-n)/t,this._x=(r+c)/t,this._y=(a+u)/t,this._z=.25*t}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let o=t.dot(e)+1;return o<Number.EPSILON?(o=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=o):(this._x=0,this._y=-t.z,this._z=t.y,this._w=o)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=o),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(b(this.dot(t),-1,1)))}rotateTowards(t,e){const o=this.angleTo(t);if(0===o)return this;const n=Math.min(1,e/o);return this.slerp(t,n),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const o=t._x,n=t._y,r=t._z,i=t._w,s=e._x,a=e._y,c=e._z,u=e._w;return this._x=o*u+i*s+n*c-r*a,this._y=n*u+i*a+r*s-o*c,this._z=r*u+i*c+o*a-n*s,this._w=i*u-o*s-n*a-r*c,this._onChangeCallback(),this}slerp(t,e){if(0===e)return this;if(1===e)return this.copy(t);const o=this._x,n=this._y,r=this._z,i=this._w;let s=i*t._w+o*t._x+n*t._y+r*t._z;if(s<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,s=-s):this.copy(t),s>=1)return this._w=i,this._x=o,this._y=n,this._z=r,this;const a=1-s*s;if(a<=Number.EPSILON){const t=1-e;return this._w=t*i+e*this._w,this._x=t*o+e*this._x,this._y=t*n+e*this._y,this._z=t*r+e*this._z,this.normalize(),this}const c=Math.sqrt(a),u=Math.atan2(c,s),_=Math.sin((1-e)*u)/c,p=Math.sin(e*u)/c;return this._w=i*_+this._w*p,this._x=o*_+this._x*p,this._y=n*_+this._y*p,this._z=r*_+this._z*p,this._onChangeCallback(),this}slerpQuaternions(t,e,o){return this.copy(t).slerp(e,o)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),o=Math.random(),n=Math.sqrt(1-o),r=Math.sqrt(o);return this.set(n*Math.sin(t),n*Math.cos(t),r*Math.sin(e),r*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class k{constructor(t=0,e=0,o=0){k.prototype.isVector3=!0,this.x=t,this.y=e,this.z=o}set(t,e,o){return void 0===o&&(o=this.z),this.x=t,this.y=e,this.z=o,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(O.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(O.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,o=this.y,n=this.z,r=t.elements;return this.x=r[0]*e+r[3]*o+r[6]*n,this.y=r[1]*e+r[4]*o+r[7]*n,this.z=r[2]*e+r[5]*o+r[8]*n,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,o=this.y,n=this.z,r=t.elements,i=1/(r[3]*e+r[7]*o+r[11]*n+r[15]);return this.x=(r[0]*e+r[4]*o+r[8]*n+r[12])*i,this.y=(r[1]*e+r[5]*o+r[9]*n+r[13])*i,this.z=(r[2]*e+r[6]*o+r[10]*n+r[14])*i,this}applyQuaternion(t){const e=this.x,o=this.y,n=this.z,r=t.x,i=t.y,s=t.z,a=t.w,c=2*(i*n-s*o),u=2*(s*e-r*n),_=2*(r*o-i*e);return this.x=e+a*c+i*_-s*u,this.y=o+a*u+s*c-r*_,this.z=n+a*_+r*u-i*c,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,o=this.y,n=this.z,r=t.elements;return this.x=r[0]*e+r[4]*o+r[8]*n,this.y=r[1]*e+r[5]*o+r[9]*n,this.z=r[2]*e+r[6]*o+r[10]*n,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=b(this.x,t.x,e.x),this.y=b(this.y,t.y,e.y),this.z=b(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=b(this.x,t,e),this.y=b(this.y,t,e),this.z=b(this.z,t,e),this}clampLength(t,e){const o=this.length();return this.divideScalar(o||1).multiplyScalar(b(o,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,o){return this.x=t.x+(e.x-t.x)*o,this.y=t.y+(e.y-t.y)*o,this.z=t.z+(e.z-t.z)*o,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const o=t.x,n=t.y,r=t.z,i=e.x,s=e.y,a=e.z;return this.x=n*a-r*s,this.y=r*i-o*a,this.z=o*s-n*i,this}projectOnVector(t){const e=t.lengthSq();if(0===e)return this.set(0,0,0);const o=t.dot(this)/e;return this.copy(t).multiplyScalar(o)}projectOnPlane(t){return E.copy(this).projectOnVector(t),this.sub(E)}reflect(t){return this.sub(E.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const o=this.dot(t)/e;return Math.acos(b(o,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,o=this.y-t.y,n=this.z-t.z;return e*e+o*o+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,o){const n=Math.sin(e)*t;return this.x=n*Math.sin(o),this.y=Math.cos(e)*t,this.z=n*Math.cos(o),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,o){return this.x=t*Math.sin(e),this.y=o,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),o=this.setFromMatrixColumn(t,1).length(),n=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=o,this.z=n,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,4*e)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,3*e)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=2*Math.random()-1,o=Math.sqrt(1-e*e);return this.x=o*Math.cos(t),this.y=e,this.z=o*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const E=new k,O=new S;class N{constructor(t,e,o,n,r,i,s,a,c){N.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==t&&this.set(t,e,o,n,r,i,s,a,c)}set(t,e,o,n,r,i,s,a,c){const u=this.elements;return u[0]=t,u[1]=n,u[2]=s,u[3]=e,u[4]=r,u[5]=a,u[6]=o,u[7]=i,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,o=t.elements;return e[0]=o[0],e[1]=o[1],e[2]=o[2],e[3]=o[3],e[4]=o[4],e[5]=o[5],e[6]=o[6],e[7]=o[7],e[8]=o[8],this}extractBasis(t,e,o){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),o.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const o=t.elements,n=e.elements,r=this.elements,i=o[0],s=o[3],a=o[6],c=o[1],u=o[4],_=o[7],p=o[2],l=o[5],h=o[8],d=n[0],f=n[3],y=n[6],m=n[1],g=n[4],v=n[7],w=n[2],b=n[5],C=n[8];return r[0]=i*d+s*m+a*w,r[3]=i*f+s*g+a*b,r[6]=i*y+s*v+a*C,r[1]=c*d+u*m+_*w,r[4]=c*f+u*g+_*b,r[7]=c*y+u*v+_*C,r[2]=p*d+l*m+h*w,r[5]=p*f+l*g+h*b,r[8]=p*y+l*v+h*C,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],o=t[1],n=t[2],r=t[3],i=t[4],s=t[5],a=t[6],c=t[7],u=t[8];return e*i*u-e*s*c-o*r*u+o*s*a+n*r*c-n*i*a}invert(){const t=this.elements,e=t[0],o=t[1],n=t[2],r=t[3],i=t[4],s=t[5],a=t[6],c=t[7],u=t[8],_=u*i-s*c,p=s*a-u*r,l=c*r-i*a,h=e*_+o*p+n*l;if(0===h)return this.set(0,0,0,0,0,0,0,0,0);const d=1/h;return t[0]=_*d,t[1]=(n*c-u*o)*d,t[2]=(s*o-n*i)*d,t[3]=p*d,t[4]=(u*e-n*a)*d,t[5]=(n*r-s*e)*d,t[6]=l*d,t[7]=(o*a-c*e)*d,t[8]=(i*e-o*r)*d,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,o,n,r,i,s){const a=Math.cos(r),c=Math.sin(r);return this.set(o*a,o*c,-o*(a*i+c*s)+i+t,-n*c,n*a,-n*(-c*i+a*s)+s+e,0,0,1),this}scale(t,e){return this.premultiply(j.makeScale(t,e)),this}rotate(t){return this.premultiply(j.makeRotation(-t)),this}translate(t,e){return this.premultiply(j.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),o=Math.sin(t);return this.set(e,-o,0,o,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,o=t.elements;for(let t=0;t<9;t++)if(e[t]!==o[t])return!1;return!0}fromArray(t,e=0){for(let o=0;o<9;o++)this.elements[o]=t[o+e];return this}toArray(t=[],e=0){const o=this.elements;return t[e]=o[0],t[e+1]=o[1],t[e+2]=o[2],t[e+3]=o[3],t[e+4]=o[4],t[e+5]=o[5],t[e+6]=o[6],t[e+7]=o[7],t[e+8]=o[8],t}clone(){return(new this.constructor).fromArray(this.elements)}}const j=new N;Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;function F(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}const T={};function M(t){t in T||(T[t]=!0,console.warn(t))}const A=(new N).set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),D=(new N).set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function B(){const t={enabled:!0,workingColorSpace:h,spaces:{},convert:function(t,e,o){return!1!==this.enabled&&e!==o&&e&&o?(this.spaces[e].transfer===f&&(t.r=R(t.r),t.g=R(t.g),t.b=R(t.b)),this.spaces[e].primaries!==this.spaces[o].primaries&&(t.applyMatrix3(this.spaces[e].toXYZ),t.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===f&&(t.r=z(t.r),t.g=z(t.g),t.b=z(t.b)),t):t},workingToColorSpace:function(t,e){return this.convert(t,this.workingColorSpace,e)},colorSpaceToWorking:function(t,e){return this.convert(t,e,this.workingColorSpace)},getPrimaries:function(t){return this.spaces[t].primaries},getTransfer:function(t){return""===t?d:this.spaces[t].transfer},getLuminanceCoefficients:function(t,e=this.workingColorSpace){return t.fromArray(this.spaces[e].luminanceCoefficients)},define:function(t){Object.assign(this.spaces,t)},_getMatrix:function(t,e,o){return t.copy(this.spaces[e].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(t){return this.spaces[t].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(t=this.workingColorSpace){return this.spaces[t].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(e,o){return M("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),t.workingToColorSpace(e,o)},toWorkingColorSpace:function(e,o){return M("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),t.colorSpaceToWorking(e,o)}},e=[.64,.33,.3,.6,.15,.06],o=[.2126,.7152,.0722],n=[.3127,.329];return t.define({[h]:{primaries:e,whitePoint:n,transfer:d,toXYZ:A,fromXYZ:D,luminanceCoefficients:o,workingColorSpaceConfig:{unpackColorSpace:l},outputColorSpaceConfig:{drawingBufferColorSpace:l}},[l]:{primaries:e,whitePoint:n,transfer:f,toXYZ:A,fromXYZ:D,luminanceCoefficients:o,outputColorSpaceConfig:{drawingBufferColorSpace:l}}}),t}const I=B();function R(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function z(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}let L;class U{static getDataURL(t,e="image/png"){if(/^data:/i.test(t.src))return t.src;if("undefined"==typeof HTMLCanvasElement)return t.src;let o;if(t instanceof HTMLCanvasElement)o=t;else{void 0===L&&(L=F("canvas")),L.width=t.width,L.height=t.height;const e=L.getContext("2d");t instanceof ImageData?e.putImageData(t,0,0):e.drawImage(t,0,0,t.width,t.height),o=L}return o.toDataURL(e)}static sRGBToLinear(t){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const e=F("canvas");e.width=t.width,e.height=t.height;const o=e.getContext("2d");o.drawImage(t,0,0,t.width,t.height);const n=o.getImageData(0,0,t.width,t.height),r=n.data;for(let t=0;t<r.length;t++)r[t]=255*R(r[t]/255);return o.putImageData(n,0,0),e}if(t.data){const e=t.data.slice(0);for(let t=0;t<e.length;t++)e instanceof Uint8Array||e instanceof Uint8ClampedArray?e[t]=Math.floor(255*R(e[t]/255)):e[t]=R(e[t]);return{data:e,width:t.width,height:t.height}}return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}}let W=0;class G{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:W++}),this.uuid=w(),this.data=t,this.dataReady=!0,this.version=0}getSize(t){const e=this.data;return e instanceof HTMLVideoElement?t.set(e.videoWidth,e.videoHeight):null!==e?t.set(e.width,e.height,e.depth||0):t.set(0,0,0),t}set needsUpdate(t){!0===t&&this.version++}toJSON(t){const e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.images[this.uuid])return t.images[this.uuid];const o={uuid:this.uuid,url:""},n=this.data;if(null!==n){let t;if(Array.isArray(n)){t=[];for(let e=0,o=n.length;e<o;e++)n[e].isDataTexture?t.push(Z(n[e].image)):t.push(Z(n[e]))}else t=Z(n);o.url=t}return e||(t.images[this.uuid]=o),o}}function Z(t){return"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?U.getDataURL(t):t.data?{data:Array.from(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let q=0;const V=new k;class J extends g{constructor(t=J.DEFAULT_IMAGE,e=J.DEFAULT_MAPPING,o=1001,n=1001,r=1006,i=1008,s=1023,a=1009,c=J.DEFAULT_ANISOTROPY,u=""){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:q++}),this.uuid=w(),this.name="",this.source=new G(t),this.mipmaps=[],this.mapping=e,this.channel=0,this.wrapS=o,this.wrapT=n,this.magFilter=r,this.minFilter=i,this.anisotropy=c,this.format=s,this.internalFormat=null,this.type=a,this.offset=new P(0,0),this.repeat=new P(1,1),this.center=new P(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new N,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(V).x}get height(){return this.source.getSize(V).y}get depth(){return this.source.getSize(V).z}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return(new this.constructor).copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(const e in t){const o=t[e];if(void 0===o){console.warn(`THREE.Texture.setValues(): parameter '${e}' has value of undefined.`);continue}const n=this[e];void 0!==n?n&&o&&n.isVector2&&o.isVector2||n&&o&&n.isVector3&&o.isVector3||n&&o&&n.isMatrix3&&o.isMatrix3?n.copy(o):this[e]=o:console.warn(`THREE.Texture.setValues(): property '${e}' does not exist.`)}}toJSON(t){const e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];const o={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(o.userData=this.userData),e||(t.textures[this.uuid]=o),o}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(300!==this.mapping)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case n:t.x=t.x-Math.floor(t.x);break;case r:t.x=t.x<0?0:1;break;case i:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case n:t.y=t.y-Math.floor(t.y);break;case r:t.y=t.y<0?0:1;break;case i:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){!0===t&&this.pmremVersion++}}J.DEFAULT_IMAGE=null,J.DEFAULT_MAPPING=300,J.DEFAULT_ANISOTROPY=1;Symbol.iterator;class K{constructor(t,e,o,n,r,i,s,a,c,u,_,p,l,h,d,f){K.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==t&&this.set(t,e,o,n,r,i,s,a,c,u,_,p,l,h,d,f)}set(t,e,o,n,r,i,s,a,c,u,_,p,l,h,d,f){const y=this.elements;return y[0]=t,y[4]=e,y[8]=o,y[12]=n,y[1]=r,y[5]=i,y[9]=s,y[13]=a,y[2]=c,y[6]=u,y[10]=_,y[14]=p,y[3]=l,y[7]=h,y[11]=d,y[15]=f,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new K).fromArray(this.elements)}copy(t){const e=this.elements,o=t.elements;return e[0]=o[0],e[1]=o[1],e[2]=o[2],e[3]=o[3],e[4]=o[4],e[5]=o[5],e[6]=o[6],e[7]=o[7],e[8]=o[8],e[9]=o[9],e[10]=o[10],e[11]=o[11],e[12]=o[12],e[13]=o[13],e[14]=o[14],e[15]=o[15],this}copyPosition(t){const e=this.elements,o=t.elements;return e[12]=o[12],e[13]=o[13],e[14]=o[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,o){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),o.setFromMatrixColumn(this,2),this}makeBasis(t,e,o){return this.set(t.x,e.x,o.x,0,t.y,e.y,o.y,0,t.z,e.z,o.z,0,0,0,0,1),this}extractRotation(t){const e=this.elements,o=t.elements,n=1/H.setFromMatrixColumn(t,0).length(),r=1/H.setFromMatrixColumn(t,1).length(),i=1/H.setFromMatrixColumn(t,2).length();return e[0]=o[0]*n,e[1]=o[1]*n,e[2]=o[2]*n,e[3]=0,e[4]=o[4]*r,e[5]=o[5]*r,e[6]=o[6]*r,e[7]=0,e[8]=o[8]*i,e[9]=o[9]*i,e[10]=o[10]*i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,o=t.x,n=t.y,r=t.z,i=Math.cos(o),s=Math.sin(o),a=Math.cos(n),c=Math.sin(n),u=Math.cos(r),_=Math.sin(r);if("XYZ"===t.order){const t=i*u,o=i*_,n=s*u,r=s*_;e[0]=a*u,e[4]=-a*_,e[8]=c,e[1]=o+n*c,e[5]=t-r*c,e[9]=-s*a,e[2]=r-t*c,e[6]=n+o*c,e[10]=i*a}else if("YXZ"===t.order){const t=a*u,o=a*_,n=c*u,r=c*_;e[0]=t+r*s,e[4]=n*s-o,e[8]=i*c,e[1]=i*_,e[5]=i*u,e[9]=-s,e[2]=o*s-n,e[6]=r+t*s,e[10]=i*a}else if("ZXY"===t.order){const t=a*u,o=a*_,n=c*u,r=c*_;e[0]=t-r*s,e[4]=-i*_,e[8]=n+o*s,e[1]=o+n*s,e[5]=i*u,e[9]=r-t*s,e[2]=-i*c,e[6]=s,e[10]=i*a}else if("ZYX"===t.order){const t=i*u,o=i*_,n=s*u,r=s*_;e[0]=a*u,e[4]=n*c-o,e[8]=t*c+r,e[1]=a*_,e[5]=r*c+t,e[9]=o*c-n,e[2]=-c,e[6]=s*a,e[10]=i*a}else if("YZX"===t.order){const t=i*a,o=i*c,n=s*a,r=s*c;e[0]=a*u,e[4]=r-t*_,e[8]=n*_+o,e[1]=_,e[5]=i*u,e[9]=-s*u,e[2]=-c*u,e[6]=o*_+n,e[10]=t-r*_}else if("XZY"===t.order){const t=i*a,o=i*c,n=s*a,r=s*c;e[0]=a*u,e[4]=-_,e[8]=c*u,e[1]=t*_+r,e[5]=i*u,e[9]=o*_-n,e[2]=n*_-o,e[6]=s*u,e[10]=r*_+t}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(Y,t,Q)}lookAt(t,e,o){const n=this.elements;return et.subVectors(t,e),0===et.lengthSq()&&(et.z=1),et.normalize(),$.crossVectors(o,et),0===$.lengthSq()&&(1===Math.abs(o.z)?et.x+=1e-4:et.z+=1e-4,et.normalize(),$.crossVectors(o,et)),$.normalize(),tt.crossVectors(et,$),n[0]=$.x,n[4]=tt.x,n[8]=et.x,n[1]=$.y,n[5]=tt.y,n[9]=et.y,n[2]=$.z,n[6]=tt.z,n[10]=et.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const o=t.elements,n=e.elements,r=this.elements,i=o[0],s=o[4],a=o[8],c=o[12],u=o[1],_=o[5],p=o[9],l=o[13],h=o[2],d=o[6],f=o[10],y=o[14],m=o[3],g=o[7],v=o[11],w=o[15],b=n[0],C=n[4],x=n[8],P=n[12],S=n[1],k=n[5],E=n[9],O=n[13],N=n[2],j=n[6],F=n[10],T=n[14],M=n[3],A=n[7],D=n[11],B=n[15];return r[0]=i*b+s*S+a*N+c*M,r[4]=i*C+s*k+a*j+c*A,r[8]=i*x+s*E+a*F+c*D,r[12]=i*P+s*O+a*T+c*B,r[1]=u*b+_*S+p*N+l*M,r[5]=u*C+_*k+p*j+l*A,r[9]=u*x+_*E+p*F+l*D,r[13]=u*P+_*O+p*T+l*B,r[2]=h*b+d*S+f*N+y*M,r[6]=h*C+d*k+f*j+y*A,r[10]=h*x+d*E+f*F+y*D,r[14]=h*P+d*O+f*T+y*B,r[3]=m*b+g*S+v*N+w*M,r[7]=m*C+g*k+v*j+w*A,r[11]=m*x+g*E+v*F+w*D,r[15]=m*P+g*O+v*T+w*B,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],o=t[4],n=t[8],r=t[12],i=t[1],s=t[5],a=t[9],c=t[13],u=t[2],_=t[6],p=t[10],l=t[14];return t[3]*(+r*a*_-n*c*_-r*s*p+o*c*p+n*s*l-o*a*l)+t[7]*(+e*a*l-e*c*p+r*i*p-n*i*l+n*c*u-r*a*u)+t[11]*(+e*c*_-e*s*l-r*i*_+o*i*l+r*s*u-o*c*u)+t[15]*(-n*s*u-e*a*_+e*s*p+n*i*_-o*i*p+o*a*u)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,o){const n=this.elements;return t.isVector3?(n[12]=t.x,n[13]=t.y,n[14]=t.z):(n[12]=t,n[13]=e,n[14]=o),this}invert(){const t=this.elements,e=t[0],o=t[1],n=t[2],r=t[3],i=t[4],s=t[5],a=t[6],c=t[7],u=t[8],_=t[9],p=t[10],l=t[11],h=t[12],d=t[13],f=t[14],y=t[15],m=_*f*c-d*p*c+d*a*l-s*f*l-_*a*y+s*p*y,g=h*p*c-u*f*c-h*a*l+i*f*l+u*a*y-i*p*y,v=u*d*c-h*_*c+h*s*l-i*d*l-u*s*y+i*_*y,w=h*_*a-u*d*a-h*s*p+i*d*p+u*s*f-i*_*f,b=e*m+o*g+n*v+r*w;if(0===b)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const C=1/b;return t[0]=m*C,t[1]=(d*p*r-_*f*r-d*n*l+o*f*l+_*n*y-o*p*y)*C,t[2]=(s*f*r-d*a*r+d*n*c-o*f*c-s*n*y+o*a*y)*C,t[3]=(_*a*r-s*p*r-_*n*c+o*p*c+s*n*l-o*a*l)*C,t[4]=g*C,t[5]=(u*f*r-h*p*r+h*n*l-e*f*l-u*n*y+e*p*y)*C,t[6]=(h*a*r-i*f*r-h*n*c+e*f*c+i*n*y-e*a*y)*C,t[7]=(i*p*r-u*a*r+u*n*c-e*p*c-i*n*l+e*a*l)*C,t[8]=v*C,t[9]=(h*_*r-u*d*r-h*o*l+e*d*l+u*o*y-e*_*y)*C,t[10]=(i*d*r-h*s*r+h*o*c-e*d*c-i*o*y+e*s*y)*C,t[11]=(u*s*r-i*_*r-u*o*c+e*_*c+i*o*l-e*s*l)*C,t[12]=w*C,t[13]=(u*d*n-h*_*n+h*o*p-e*d*p-u*o*f+e*_*f)*C,t[14]=(h*s*n-i*d*n-h*o*a+e*d*a+i*o*f-e*s*f)*C,t[15]=(i*_*n-u*s*n+u*o*a-e*_*a-i*o*p+e*s*p)*C,this}scale(t){const e=this.elements,o=t.x,n=t.y,r=t.z;return e[0]*=o,e[4]*=n,e[8]*=r,e[1]*=o,e[5]*=n,e[9]*=r,e[2]*=o,e[6]*=n,e[10]*=r,e[3]*=o,e[7]*=n,e[11]*=r,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],o=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,o,n))}makeTranslation(t,e,o){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,o,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),o=Math.sin(t);return this.set(1,0,0,0,0,e,-o,0,0,o,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),o=Math.sin(t);return this.set(e,0,o,0,0,1,0,0,-o,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),o=Math.sin(t);return this.set(e,-o,0,0,o,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const o=Math.cos(e),n=Math.sin(e),r=1-o,i=t.x,s=t.y,a=t.z,c=r*i,u=r*s;return this.set(c*i+o,c*s-n*a,c*a+n*s,0,c*s+n*a,u*s+o,u*a-n*i,0,c*a-n*s,u*a+n*i,r*a*a+o,0,0,0,0,1),this}makeScale(t,e,o){return this.set(t,0,0,0,0,e,0,0,0,0,o,0,0,0,0,1),this}makeShear(t,e,o,n,r,i){return this.set(1,o,r,0,t,1,i,0,e,n,1,0,0,0,0,1),this}compose(t,e,o){const n=this.elements,r=e._x,i=e._y,s=e._z,a=e._w,c=r+r,u=i+i,_=s+s,p=r*c,l=r*u,h=r*_,d=i*u,f=i*_,y=s*_,m=a*c,g=a*u,v=a*_,w=o.x,b=o.y,C=o.z;return n[0]=(1-(d+y))*w,n[1]=(l+v)*w,n[2]=(h-g)*w,n[3]=0,n[4]=(l-v)*b,n[5]=(1-(p+y))*b,n[6]=(f+m)*b,n[7]=0,n[8]=(h+g)*C,n[9]=(f-m)*C,n[10]=(1-(p+d))*C,n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,this}decompose(t,e,o){const n=this.elements;let r=H.set(n[0],n[1],n[2]).length();const i=H.set(n[4],n[5],n[6]).length(),s=H.set(n[8],n[9],n[10]).length();this.determinant()<0&&(r=-r),t.x=n[12],t.y=n[13],t.z=n[14],X.copy(this);const a=1/r,c=1/i,u=1/s;return X.elements[0]*=a,X.elements[1]*=a,X.elements[2]*=a,X.elements[4]*=c,X.elements[5]*=c,X.elements[6]*=c,X.elements[8]*=u,X.elements[9]*=u,X.elements[10]*=u,e.setFromRotationMatrix(X),o.x=r,o.y=i,o.z=s,this}makePerspective(t,e,o,n,r,i,s=2e3){const a=this.elements,c=2*r/(e-t),u=2*r/(o-n),_=(e+t)/(e-t),p=(o+n)/(o-n);let l,h;if(s===y)l=-(i+r)/(i-r),h=-2*i*r/(i-r);else{if(s!==m)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);l=-i/(i-r),h=-i*r/(i-r)}return a[0]=c,a[4]=0,a[8]=_,a[12]=0,a[1]=0,a[5]=u,a[9]=p,a[13]=0,a[2]=0,a[6]=0,a[10]=l,a[14]=h,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(t,e,o,n,r,i,s=2e3){const a=this.elements,c=1/(e-t),u=1/(o-n),_=1/(i-r),p=(e+t)*c,l=(o+n)*u;let h,d;if(s===y)h=(i+r)*_,d=-2*_;else{if(s!==m)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);h=r*_,d=-1*_}return a[0]=2*c,a[4]=0,a[8]=0,a[12]=-p,a[1]=0,a[5]=2*u,a[9]=0,a[13]=-l,a[2]=0,a[6]=0,a[10]=d,a[14]=-h,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(t){const e=this.elements,o=t.elements;for(let t=0;t<16;t++)if(e[t]!==o[t])return!1;return!0}fromArray(t,e=0){for(let o=0;o<16;o++)this.elements[o]=t[o+e];return this}toArray(t=[],e=0){const o=this.elements;return t[e]=o[0],t[e+1]=o[1],t[e+2]=o[2],t[e+3]=o[3],t[e+4]=o[4],t[e+5]=o[5],t[e+6]=o[6],t[e+7]=o[7],t[e+8]=o[8],t[e+9]=o[9],t[e+10]=o[10],t[e+11]=o[11],t[e+12]=o[12],t[e+13]=o[13],t[e+14]=o[14],t[e+15]=o[15],t}}const H=new k,X=new K,Y=new k(0,0,0),Q=new k(1,1,1),$=new k,tt=new k,et=new k,ot=new K,nt=new S;class rt{constructor(t=0,e=0,o=0,n=rt.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=o,this._order=n}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,o,n=this._order){return this._x=t,this._y=e,this._z=o,this._order=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,o=!0){const n=t.elements,r=n[0],i=n[4],s=n[8],a=n[1],c=n[5],u=n[9],_=n[2],p=n[6],l=n[10];switch(e){case"XYZ":this._y=Math.asin(b(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-u,l),this._z=Math.atan2(-i,r)):(this._x=Math.atan2(p,c),this._z=0);break;case"YXZ":this._x=Math.asin(-b(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(s,l),this._z=Math.atan2(a,c)):(this._y=Math.atan2(-_,r),this._z=0);break;case"ZXY":this._x=Math.asin(b(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-_,l),this._z=Math.atan2(-i,c)):(this._y=0,this._z=Math.atan2(a,r));break;case"ZYX":this._y=Math.asin(-b(_,-1,1)),Math.abs(_)<.9999999?(this._x=Math.atan2(p,l),this._z=Math.atan2(a,r)):(this._x=0,this._z=Math.atan2(-i,c));break;case"YZX":this._z=Math.asin(b(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-_,r)):(this._x=0,this._y=Math.atan2(s,l));break;case"XZY":this._z=Math.asin(-b(i,-1,1)),Math.abs(i)<.9999999?(this._x=Math.atan2(p,c),this._y=Math.atan2(s,r)):(this._x=Math.atan2(-u,l),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,!0===o&&this._onChangeCallback(),this}setFromQuaternion(t,e,o){return ot.makeRotationFromQuaternion(t),this.setFromRotationMatrix(ot,e,o)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return nt.setFromEuler(this),this.setFromQuaternion(nt,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}rt.DEFAULT_ORDER="XYZ";class it{constructor(){this.mask=1}set(t){this.mask=1<<t>>>0}enable(t){this.mask|=1<<t}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t}disable(t){this.mask&=~(1<<t)}disableAll(){this.mask=0}test(t){return 0!==(this.mask&t.mask)}isEnabled(t){return!!(this.mask&1<<t)}}let st=0;const at=new k,ct=new S,ut=new K,_t=new k,pt=new k,lt=new k,ht=new S,dt=new k(1,0,0),ft=new k(0,1,0),yt=new k(0,0,1),mt={type:"added"},gt={type:"removed"},vt={type:"childadded",child:null},wt={type:"childremoved",child:null};class bt extends g{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:st++}),this.uuid=w(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=bt.DEFAULT_UP.clone();const t=new k,e=new rt,o=new S,n=new k(1,1,1);e._onChange(function(){o.setFromEuler(e,!1)}),o._onChange(function(){e.setFromQuaternion(o,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:o},scale:{configurable:!0,enumerable:!0,value:n},modelViewMatrix:{value:new K},normalMatrix:{value:new N}}),this.matrix=new K,this.matrixWorld=new K,this.matrixAutoUpdate=bt.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=bt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new it,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return ct.setFromAxisAngle(t,e),this.quaternion.multiply(ct),this}rotateOnWorldAxis(t,e){return ct.setFromAxisAngle(t,e),this.quaternion.premultiply(ct),this}rotateX(t){return this.rotateOnAxis(dt,t)}rotateY(t){return this.rotateOnAxis(ft,t)}rotateZ(t){return this.rotateOnAxis(yt,t)}translateOnAxis(t,e){return at.copy(t).applyQuaternion(this.quaternion),this.position.add(at.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(dt,t)}translateY(t){return this.translateOnAxis(ft,t)}translateZ(t){return this.translateOnAxis(yt,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(ut.copy(this.matrixWorld).invert())}lookAt(t,e,o){t.isVector3?_t.copy(t):_t.set(t,e,o);const n=this.parent;this.updateWorldMatrix(!0,!1),pt.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ut.lookAt(pt,_t,this.up):ut.lookAt(_t,pt,this.up),this.quaternion.setFromRotationMatrix(ut),n&&(ut.extractRotation(n.matrixWorld),ct.setFromRotationMatrix(ut),this.quaternion.premultiply(ct.invert()))}add(t){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(mt),vt.child=t,this.dispatchEvent(vt),vt.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.remove(arguments[t]);return this}const e=this.children.indexOf(t);return-1!==e&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(gt),wt.child=t,this.dispatchEvent(wt),wt.child=null),this}removeFromParent(){const t=this.parent;return null!==t&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),ut.copy(this.matrixWorld).invert(),null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),ut.multiply(t.parent.matrixWorld)),t.applyMatrix4(ut),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(mt),vt.child=t,this.dispatchEvent(vt),vt.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let o=0,n=this.children.length;o<n;o++){const n=this.children[o].getObjectByProperty(t,e);if(void 0!==n)return n}}getObjectsByProperty(t,e,o=[]){this[t]===e&&o.push(this);const n=this.children;for(let r=0,i=n.length;r<i;r++)n[r].getObjectsByProperty(t,e,o);return o}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(pt,t,lt),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(pt,ht,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);const e=this.children;for(let o=0,n=e.length;o<n;o++)e[o].traverse(t)}traverseVisible(t){if(!1===this.visible)return;t(this);const e=this.children;for(let o=0,n=e.length;o<n;o++)e[o].traverseVisible(t)}traverseAncestors(t){const e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(!0===this.matrixWorldAutoUpdate&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);const e=this.children;for(let o=0,n=e.length;o<n;o++){e[o].updateMatrixWorld(t)}}updateWorldMatrix(t,e){const o=this.parent;if(!0===t&&null!==o&&o.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),!0===this.matrixWorldAutoUpdate&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),!0===e){const t=this.children;for(let e=0,o=t.length;e<o;e++){t[e].updateWorldMatrix(!1,!0)}}}toJSON(t){const e=void 0===t||"string"==typeof t,o={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},o.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const n={};function r(e,o){return void 0===e[o.uuid]&&(e[o.uuid]=o.toJSON(t)),o.uuid}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),!0===this.castShadow&&(n.castShadow=!0),!0===this.receiveShadow&&(n.receiveShadow=!0),!1===this.visible&&(n.visible=!1),!1===this.frustumCulled&&(n.frustumCulled=!1),0!==this.renderOrder&&(n.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),n.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(n.matrixAutoUpdate=!1),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(n.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(n.type="BatchedMesh",n.perObjectFrustumCulled=this.perObjectFrustumCulled,n.sortObjects=this.sortObjects,n.drawRanges=this._drawRanges,n.reservedRanges=this._reservedRanges,n.geometryInfo=this._geometryInfo.map(t=>({...t,boundingBox:t.boundingBox?t.boundingBox.toJSON():void 0,boundingSphere:t.boundingSphere?t.boundingSphere.toJSON():void 0})),n.instanceInfo=this._instanceInfo.map(t=>({...t})),n.availableInstanceIds=this._availableInstanceIds.slice(),n.availableGeometryIds=this._availableGeometryIds.slice(),n.nextIndexStart=this._nextIndexStart,n.nextVertexStart=this._nextVertexStart,n.geometryCount=this._geometryCount,n.maxInstanceCount=this._maxInstanceCount,n.maxVertexCount=this._maxVertexCount,n.maxIndexCount=this._maxIndexCount,n.geometryInitialized=this._geometryInitialized,n.matricesTexture=this._matricesTexture.toJSON(t),n.indirectTexture=this._indirectTexture.toJSON(t),null!==this._colorsTexture&&(n.colorsTexture=this._colorsTexture.toJSON(t)),null!==this.boundingSphere&&(n.boundingSphere=this.boundingSphere.toJSON()),null!==this.boundingBox&&(n.boundingBox=this.boundingBox.toJSON())),this.isScene)this.background&&(this.background.isColor?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(n.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.geometry=r(t.geometries,this.geometry);const e=this.geometry.parameters;if(void 0!==e&&void 0!==e.shapes){const o=e.shapes;if(Array.isArray(o))for(let e=0,n=o.length;e<n;e++){const n=o[e];r(t.shapes,n)}else r(t.shapes,o)}}if(this.isSkinnedMesh&&(n.bindMode=this.bindMode,n.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(r(t.skeletons,this.skeleton),n.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const e=[];for(let o=0,n=this.material.length;o<n;o++)e.push(r(t.materials,this.material[o]));n.material=e}else n.material=r(t.materials,this.material);if(this.children.length>0){n.children=[];for(let e=0;e<this.children.length;e++)n.children.push(this.children[e].toJSON(t).object)}if(this.animations.length>0){n.animations=[];for(let e=0;e<this.animations.length;e++){const o=this.animations[e];n.animations.push(r(t.animations,o))}}if(e){const e=i(t.geometries),n=i(t.materials),r=i(t.textures),s=i(t.images),a=i(t.shapes),c=i(t.skeletons),u=i(t.animations),_=i(t.nodes);e.length>0&&(o.geometries=e),n.length>0&&(o.materials=n),r.length>0&&(o.textures=r),s.length>0&&(o.images=s),a.length>0&&(o.shapes=a),c.length>0&&(o.skeletons=c),u.length>0&&(o.animations=u),_.length>0&&(o.nodes=_)}return o.object=n,o;function i(t){const e=[];for(const o in t){const n=t[o];delete n.metadata,e.push(n)}return e}}clone(t){return(new this.constructor).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(let e=0;e<t.children.length;e++){const o=t.children[e];this.add(o.clone())}return this}}bt.DEFAULT_UP=new k(0,1,0),bt.DEFAULT_MATRIX_AUTO_UPDATE=!0,bt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Ct={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},xt={h:0,s:0,l:0},Pt={h:0,s:0,l:0};function St(t,e,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+6*(e-t)*o:o<.5?e:o<2/3?t+6*(e-t)*(2/3-o):t}class kt{constructor(t,e,o){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,o)}set(t,e,o){if(void 0===e&&void 0===o){const e=t;e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e)}else this.setRGB(t,e,o);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=l){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,I.colorSpaceToWorking(this,e),this}setRGB(t,e,o,n=I.workingColorSpace){return this.r=t,this.g=e,this.b=o,I.colorSpaceToWorking(this,n),this}setHSL(t,e,o,n=I.workingColorSpace){if(t=C(t,1),e=b(e,0,1),o=b(o,0,1),0===e)this.r=this.g=this.b=o;else{const n=o<=.5?o*(1+e):o+e-o*e,r=2*o-n;this.r=St(r,n,t+1/3),this.g=St(r,n,t),this.b=St(r,n,t-1/3)}return I.colorSpaceToWorking(this,n),this}setStyle(t,e=l){function o(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let n;if(n=/^(\w+)\(([^\)]*)\)/.exec(t)){let r;const i=n[1],s=n[2];switch(i){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return o(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,e);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return o(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,e);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return o(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(t)){const o=n[1],r=o.length;if(3===r)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,e);if(6===r)return this.setHex(parseInt(o,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=l){const o=Ct[t.toLowerCase()];return void 0!==o?this.setHex(o,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=R(t.r),this.g=R(t.g),this.b=R(t.b),this}copyLinearToSRGB(t){return this.r=z(t.r),this.g=z(t.g),this.b=z(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=l){return I.workingToColorSpace(Et.copy(this),t),65536*Math.round(b(255*Et.r,0,255))+256*Math.round(b(255*Et.g,0,255))+Math.round(b(255*Et.b,0,255))}getHexString(t=l){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=I.workingColorSpace){I.workingToColorSpace(Et.copy(this),e);const o=Et.r,n=Et.g,r=Et.b,i=Math.max(o,n,r),s=Math.min(o,n,r);let a,c;const u=(s+i)/2;if(s===i)a=0,c=0;else{const t=i-s;switch(c=u<=.5?t/(i+s):t/(2-i-s),i){case o:a=(n-r)/t+(n<r?6:0);break;case n:a=(r-o)/t+2;break;case r:a=(o-n)/t+4}a/=6}return t.h=a,t.s=c,t.l=u,t}getRGB(t,e=I.workingColorSpace){return I.workingToColorSpace(Et.copy(this),e),t.r=Et.r,t.g=Et.g,t.b=Et.b,t}getStyle(t=l){I.workingToColorSpace(Et.copy(this),t);const e=Et.r,o=Et.g,n=Et.b;return t!==l?`color(${t} ${e.toFixed(3)} ${o.toFixed(3)} ${n.toFixed(3)})`:`rgb(${Math.round(255*e)},${Math.round(255*o)},${Math.round(255*n)})`}offsetHSL(t,e,o){return this.getHSL(xt),this.setHSL(xt.h+t,xt.s+e,xt.l+o)}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,o){return this.r=t.r+(e.r-t.r)*o,this.g=t.g+(e.g-t.g)*o,this.b=t.b+(e.b-t.b)*o,this}lerpHSL(t,e){this.getHSL(xt),t.getHSL(Pt);const o=x(xt.h,Pt.h,e),n=x(xt.s,Pt.s,e),r=x(xt.l,Pt.l,e);return this.setHSL(o,n,r),this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){const e=this.r,o=this.g,n=this.b,r=t.elements;return this.r=r[0]*e+r[3]*o+r[6]*n,this.g=r[1]*e+r[4]*o+r[7]*n,this.b=r[2]*e+r[5]*o+r[8]*n,this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Et=new kt;kt.NAMES=Ct;const Ot=new k,Nt=new k,jt=new N;class Ft{constructor(t=new k(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,o,n){return this.normal.set(t,e,o),this.constant=n,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,o){const n=Ot.subVectors(o,e).cross(Nt.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(n,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e){const o=t.delta(Ot),n=this.normal.dot(o);if(0===n)return 0===this.distanceToPoint(t.start)?e.copy(t.start):null;const r=-(t.start.dot(this.normal)+this.constant)/n;return r<0||r>1?null:e.copy(t.start).addScaledVector(o,r)}intersectsLine(t){const e=this.distanceToPoint(t.start),o=this.distanceToPoint(t.end);return e<0&&o>0||o<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const o=e||jt.getNormalMatrix(t),n=this.coplanarPoint(Ot).applyMatrix4(t),r=this.normal.applyMatrix3(o).normalize();return this.constant=-n.dot(r),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return(new this.constructor).copy(this)}}function Tt(t,e){return t&&t.constructor!==e?"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t):t}function Mt(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}class At{constructor(t,e,o,n){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==n?n:new e.constructor(o),this.sampleValues=e,this.valueSize=o,this.settings=null,this.DefaultSettings_={}}evaluate(t){const e=this.parameterPositions;let o=this._cachedIndex,n=e[o],r=e[o-1];t:{e:{let i;o:{n:if(!(t<n)){for(let i=o+2;;){if(void 0===n){if(t<r)break n;return o=e.length,this._cachedIndex=o,this.copySampleValue_(o-1)}if(o===i)break;if(r=n,n=e[++o],t<n)break e}i=e.length;break o}if(!(t>=r)){const s=e[1];t<s&&(o=2,r=s);for(let i=o-2;;){if(void 0===r)return this._cachedIndex=0,this.copySampleValue_(0);if(o===i)break;if(n=r,r=e[--o-1],t>=r)break e}i=o,o=0;break o}break t}for(;o<i;){const n=o+i>>>1;t<e[n]?i=n:o=n+1}if(n=e[o],r=e[o-1],void 0===r)return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===n)return o=e.length,this._cachedIndex=o,this.copySampleValue_(o-1)}this._cachedIndex=o,this.intervalChanged_(o,r,n)}return this.interpolate_(o,r,t,n)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(t){const e=this.resultBuffer,o=this.sampleValues,n=this.valueSize,r=t*n;for(let t=0;t!==n;++t)e[t]=o[r+t];return e}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class Dt extends At{constructor(t,e,o,n){super(t,e,o,n),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:u,endingEnd:u}}intervalChanged_(t,e,o){const n=this.parameterPositions;let r=t-2,i=t+1,s=n[r],a=n[i];if(void 0===s)switch(this.getSettings_().endingStart){case _:r=t,s=2*e-o;break;case p:r=n.length-2,s=e+n[r]-n[r+1];break;default:r=t,s=o}if(void 0===a)switch(this.getSettings_().endingEnd){case _:i=t,a=2*o-e;break;case p:i=1,a=o+n[1]-n[0];break;default:i=t-1,a=e}const c=.5*(o-e),u=this.valueSize;this._weightPrev=c/(e-s),this._weightNext=c/(a-o),this._offsetPrev=r*u,this._offsetNext=i*u}interpolate_(t,e,o,n){const r=this.resultBuffer,i=this.sampleValues,s=this.valueSize,a=t*s,c=a-s,u=this._offsetPrev,_=this._offsetNext,p=this._weightPrev,l=this._weightNext,h=(o-e)/(n-e),d=h*h,f=d*h,y=-p*f+2*p*d-p*h,m=(1+p)*f+(-1.5-2*p)*d+(-.5+p)*h+1,g=(-1-l)*f+(1.5+l)*d+.5*h,v=l*f-l*d;for(let t=0;t!==s;++t)r[t]=y*i[u+t]+m*i[c+t]+g*i[a+t]+v*i[_+t];return r}}class Bt extends At{constructor(t,e,o,n){super(t,e,o,n)}interpolate_(t,e,o,n){const r=this.resultBuffer,i=this.sampleValues,s=this.valueSize,a=t*s,c=a-s,u=(o-e)/(n-e),_=1-u;for(let t=0;t!==s;++t)r[t]=i[c+t]*_+i[a+t]*u;return r}}class It extends At{constructor(t,e,o,n){super(t,e,o,n)}interpolate_(t){return this.copySampleValue_(t-1)}}class Rt{constructor(t,e,o,n){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Tt(e,this.TimeBufferType),this.values=Tt(o,this.ValueBufferType),this.setInterpolation(n||this.DefaultInterpolation)}static toJSON(t){const e=t.constructor;let o;if(e.toJSON!==this.toJSON)o=e.toJSON(t);else{o={name:t.name,times:Tt(t.times,Array),values:Tt(t.values,Array)};const e=t.getInterpolation();e!==t.DefaultInterpolation&&(o.interpolation=e)}return o.type=t.ValueTypeName,o}InterpolantFactoryMethodDiscrete(t){return new It(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new Bt(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new Dt(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let e;switch(t){case s:e=this.InterpolantFactoryMethodDiscrete;break;case a:e=this.InterpolantFactoryMethodLinear;break;case c:e=this.InterpolantFactoryMethodSmooth}if(void 0===e){const e="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(e);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",e),this}return this.createInterpolant=e,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return s;case this.InterpolantFactoryMethodLinear:return a;case this.InterpolantFactoryMethodSmooth:return c}}getValueSize(){return this.values.length/this.times.length}shift(t){if(0!==t){const e=this.times;for(let o=0,n=e.length;o!==n;++o)e[o]+=t}return this}scale(t){if(1!==t){const e=this.times;for(let o=0,n=e.length;o!==n;++o)e[o]*=t}return this}trim(t,e){const o=this.times,n=o.length;let r=0,i=n-1;for(;r!==n&&o[r]<t;)++r;for(;-1!==i&&o[i]>e;)--i;if(++i,0!==r||i!==n){r>=i&&(i=Math.max(i,1),r=i-1);const t=this.getValueSize();this.times=o.slice(r,i),this.values=this.values.slice(r*t,i*t)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const o=this.times,n=this.values,r=o.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let i=null;for(let e=0;e!==r;e++){const n=o[e];if("number"==typeof n&&isNaN(n)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,e,n),t=!1;break}if(null!==i&&i>n){console.error("THREE.KeyframeTrack: Out of order keys.",this,e,n,i),t=!1;break}i=n}if(void 0!==n&&Mt(n))for(let e=0,o=n.length;e!==o;++e){const o=n[e];if(isNaN(o)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,e,o),t=!1;break}}return t}optimize(){const t=this.times.slice(),e=this.values.slice(),o=this.getValueSize(),n=this.getInterpolation()===c,r=t.length-1;let i=1;for(let s=1;s<r;++s){let r=!1;const a=t[s];if(a!==t[s+1]&&(1!==s||a!==t[0]))if(n)r=!0;else{const t=s*o,n=t-o,i=t+o;for(let s=0;s!==o;++s){const o=e[t+s];if(o!==e[n+s]||o!==e[i+s]){r=!0;break}}}if(r){if(s!==i){t[i]=t[s];const n=s*o,r=i*o;for(let t=0;t!==o;++t)e[r+t]=e[n+t]}++i}}if(r>0){t[i]=t[r];for(let t=r*o,n=i*o,s=0;s!==o;++s)e[n+s]=e[t+s];++i}return i!==t.length?(this.times=t.slice(0,i),this.values=e.slice(0,i*o)):(this.times=t,this.values=e),this}clone(){const t=this.times.slice(),e=this.values.slice(),o=new(0,this.constructor)(this.name,t,e);return o.createInterpolant=this.createInterpolant,o}}Rt.prototype.ValueTypeName="",Rt.prototype.TimeBufferType=Float32Array,Rt.prototype.ValueBufferType=Float32Array,Rt.prototype.DefaultInterpolation=a;class zt extends Rt{constructor(t,e,o){super(t,e,o)}}zt.prototype.ValueTypeName="bool",zt.prototype.ValueBufferType=Array,zt.prototype.DefaultInterpolation=s,zt.prototype.InterpolantFactoryMethodLinear=void 0,zt.prototype.InterpolantFactoryMethodSmooth=void 0;class Lt extends Rt{constructor(t,e,o,n){super(t,e,o,n)}}Lt.prototype.ValueTypeName="color";class Ut extends Rt{constructor(t,e,o,n){super(t,e,o,n)}}Ut.prototype.ValueTypeName="number";class Wt extends At{constructor(t,e,o,n){super(t,e,o,n)}interpolate_(t,e,o,n){const r=this.resultBuffer,i=this.sampleValues,s=this.valueSize,a=(o-e)/(n-e);let c=t*s;for(let t=c+s;c!==t;c+=4)S.slerpFlat(r,0,i,c-s,i,c,a);return r}}class Gt extends Rt{constructor(t,e,o,n){super(t,e,o,n)}InterpolantFactoryMethodLinear(t){return new Wt(this.times,this.values,this.getValueSize(),t)}}Gt.prototype.ValueTypeName="quaternion",Gt.prototype.InterpolantFactoryMethodSmooth=void 0;class Zt extends Rt{constructor(t,e,o){super(t,e,o)}}Zt.prototype.ValueTypeName="string",Zt.prototype.ValueBufferType=Array,Zt.prototype.DefaultInterpolation=s,Zt.prototype.InterpolantFactoryMethodLinear=void 0,Zt.prototype.InterpolantFactoryMethodSmooth=void 0;class qt extends Rt{constructor(t,e,o,n){super(t,e,o,n)}}qt.prototype.ValueTypeName="vector";class Vt{constructor(t,e,o){const n=this;let r,i=!1,s=0,a=0;const c=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=o,this.itemStart=function(t){a++,!1===i&&void 0!==n.onStart&&n.onStart(t,s,a),i=!0},this.itemEnd=function(t){s++,void 0!==n.onProgress&&n.onProgress(t,s,a),s===a&&(i=!1,void 0!==n.onLoad&&n.onLoad())},this.itemError=function(t){void 0!==n.onError&&n.onError(t)},this.resolveURL=function(t){return r?r(t):t},this.setURLModifier=function(t){return r=t,this},this.addHandler=function(t,e){return c.push(t,e),this},this.removeHandler=function(t){const e=c.indexOf(t);return-1!==e&&c.splice(e,2),this},this.getHandler=function(t){for(let e=0,o=c.length;e<o;e+=2){const o=c[e],n=c[e+1];if(o.global&&(o.lastIndex=0),o.test(t))return n}return null}}}const Jt=new Vt;class Kt{constructor(t){this.manager=void 0!==t?t:Jt,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,e){const o=this;return new Promise(function(n,r){o.load(t,n,e,r)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}}Kt.DEFAULT_MATERIAL_NAME="__DEFAULT";Error;new WeakMap;const Ht="\\[\\]\\.:\\/",Xt=new RegExp("["+Ht+"]","g"),Yt="[^"+Ht+"]",Qt="[^"+Ht.replace("\\.","")+"]",$t=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",Yt)+/(WCOD+)?/.source.replace("WCOD",Qt)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Yt)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Yt)+"$"),te=["material","materials","bones","map"];class ee{constructor(t,e,o){this.path=e,this.parsedPath=o||ee.parseTrackName(e),this.node=ee.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,o){return t&&t.isAnimationObjectGroup?new ee.Composite(t,e,o):new ee(t,e,o)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(Xt,"")}static parseTrackName(t){const e=$t.exec(t);if(null===e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const o={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},n=o.nodeName&&o.nodeName.lastIndexOf(".");if(void 0!==n&&-1!==n){const t=o.nodeName.substring(n+1);-1!==te.indexOf(t)&&(o.nodeName=o.nodeName.substring(0,n),o.objectName=t)}if(null===o.propertyName||0===o.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return o}static findNode(t,e){if(void 0===e||""===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){const o=t.skeleton.getBoneByName(e);if(void 0!==o)return o}if(t.children){const o=function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.name===e||r.uuid===e)return r;const i=o(r.children);if(i)return i}return null},n=o(t.children);if(n)return n}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,e){t[e]=this.targetObject[this.propertyName]}_getValue_array(t,e){const o=this.resolvedProperty;for(let n=0,r=o.length;n!==r;++n)t[e++]=o[n]}_getValue_arrayElement(t,e){t[e]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,e){this.resolvedProperty.toArray(t,e)}_setValue_direct(t,e){this.targetObject[this.propertyName]=t[e]}_setValue_direct_setNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,e){const o=this.resolvedProperty;for(let n=0,r=o.length;n!==r;++n)o[n]=t[e++]}_setValue_array_setNeedsUpdate(t,e){const o=this.resolvedProperty;for(let n=0,r=o.length;n!==r;++n)o[n]=t[e++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,e){const o=this.resolvedProperty;for(let n=0,r=o.length;n!==r;++n)o[n]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,e){this.resolvedProperty[this.propertyIndex]=t[e]}_setValue_arrayElement_setNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,e){this.resolvedProperty.fromArray(t,e)}_setValue_fromArray_setNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,e){this.bind(),this.getValue(t,e)}_setValue_unbound(t,e){this.bind(),this.setValue(t,e)}bind(){let t=this.node;const e=this.parsedPath,o=e.objectName,n=e.propertyName;let r=e.propertyIndex;if(t||(t=ee.findNode(this.rootNode,e.nodeName),this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t)return void console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");if(o){let n=e.objectIndex;switch(o){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(let e=0;e<t.length;e++)if(t[e].name===n){n=e;break}break;case"map":if("map"in t){t=t.map;break}if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.map)return void console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);t=t.material.map;break;default:if(void 0===t[o])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[o]}if(void 0!==n){if(void 0===t[n])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[n]}}const i=t[n];if(void 0===i){const o=e.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+o+"."+n+" but it wasn't found.",t)}let s=this.Versioning.None;this.targetObject=t,!0===t.isMaterial?s=this.Versioning.NeedsUpdate:!0===t.isObject3D&&(s=this.Versioning.MatrixWorldNeedsUpdate);let a=this.BindingType.Direct;if(void 0!==r){if("morphTargetInfluences"===n){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==t.morphTargetDictionary[r]&&(r=t.morphTargetDictionary[r])}a=this.BindingType.ArrayElement,this.resolvedProperty=i,this.propertyIndex=r}else void 0!==i.fromArray&&void 0!==i.toArray?(a=this.BindingType.HasFromToArray,this.resolvedProperty=i):Array.isArray(i)?(a=this.BindingType.EntireArray,this.resolvedProperty=i):this.propertyName=n;this.getValue=this.GetterByBindingType[a],this.setValue=this.SetterByBindingTypeAndVersioning[a][s]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}ee.Composite=class{constructor(t,e,o){const n=o||ee.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,n)}getValue(t,e){this.bind();const o=this._targetGroup.nCachedObjects_,n=this._bindings[o];void 0!==n&&n.getValue(t,e)}setValue(t,e){const o=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=o.length;n!==r;++n)o[n].setValue(t,e)}bind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,o=t.length;e!==o;++e)t[e].bind()}unbind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,o=t.length;e!==o;++e)t[e].unbind()}},ee.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},ee.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},ee.prototype.GetterByBindingType=[ee.prototype._getValue_direct,ee.prototype._getValue_array,ee.prototype._getValue_arrayElement,ee.prototype._getValue_toArray],ee.prototype.SetterByBindingTypeAndVersioning=[[ee.prototype._setValue_direct,ee.prototype._setValue_direct_setNeedsUpdate,ee.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[ee.prototype._setValue_array,ee.prototype._setValue_array_setNeedsUpdate,ee.prototype._setValue_array_setMatrixWorldNeedsUpdate],[ee.prototype._setValue_arrayElement,ee.prototype._setValue_arrayElement_setNeedsUpdate,ee.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[ee.prototype._setValue_fromArray,ee.prototype._setValue_fromArray_setNeedsUpdate,ee.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];new Float32Array(1);"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"177"}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="177")},5556:(t,e,o)=>{o.d(e,{W:()=>u});var n,r=o(347),i=o(7160),s=o(6994),a=o(5361),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.position=new a.Pq0,e.rotation=new a.PTz,e.scale=new a.Pq0(1,1,1),e.className=i.Z.TransformComponent,e}return c(e,t),e.prototype.set_position=function(t){this.position.copy(t)},e.prototype.get_position=function(){return this.position},e.prototype.set_rotation=function(t){this.rotation.copy(t)},e.prototype.get_rotation=function(){return this.rotation},e.prototype.set_scale=function(t){this.scale.copy(t)},e.prototype.get_scale=function(){return this.scale},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.position=this.position.toArray(),o.rotation=this.rotation.toArray(),o.scale=this.scale.toArray(),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.position.fromArray(e.position),this.rotation.fromArray(e.rotation),this.scale.fromArray(e.scale))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.TransformComponent,e.create,t)},e}(s.u)},5574:(t,e,o)=>{o.d(e,{Q:()=>u});var n=o(8575),r=o(3124),i=o(4040),s=o(7073),a=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},c=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},u=function(){function t(){}return t.load_editor_resource=function(t,e){console.log("load_editor_resource",e);var o=null;switch(t){case n.c.part3d:(o=new i.c).parse_data(e);break;case n.c.block3d:case n.c.code3d:(o=new r.k).parse_data(e);break;case n.c.sketch3d:(o=new s.J).parse_data(e)}return o},t.load_json=function(t){return a(this,void 0,void 0,function(){return c(this,function(e){return[2,new Promise(function(e,o){var n=new XMLHttpRequest;n.open("GET",t,!0),n.onload=function(){200===n.status&&e(JSON.parse(n.responseText))},n.send()})]})})},t.load_text=function(t){return a(this,void 0,void 0,function(){return c(this,function(e){return[2,new Promise(function(e,o){var n=new XMLHttpRequest;n.open("GET",t,!0),n.onload=function(){200===n.status&&e(n.responseText)},n.send()})]})})},t.load_image=function(t){return a(this,void 0,void 0,function(){return c(this,function(e){return[2,new Promise(function(e,o){var n=new Image;n.onload=function(){e(n)},n.src=t})]})})},t.load_resource=function(t,e){return a(this,void 0,void 0,function(){return c(this,function(o){return[2,new Promise(function(o,n){var r=new XMLHttpRequest;r.open("GET",t,!0),r.responseType=e,r.onload=function(){200===r.status&&o(r.response)},r.send()})]})})},t.get_resource_type_by_postfix=function(t){switch(t){case n.y.jhasm3d:return n.c.assembly3d;case n.y.jhprt3d:return n.c.part3d;case n.y.jhbk3d:return n.c.block3d;case n.y.jhsketch3d:return n.c.sketch3d;case n.y.js:return n.c.js;case n.y.txt:return n.c.text;case n.y.step:return n.c.step;case n.y.json:return n.c.json;default:return n.c.none}},t.get_resource_postfix_by_type=function(t){switch(t){case n.c.assembly3d:return n.y.jhasm3d;case n.c.part3d:return n.y.jhprt3d;case n.c.block3d:return n.y.jhbk3d;case n.c.code3d:return n.y.jhjs3d;case n.c.sketch3d:return n.y.jhsketch3d;case n.c.js:return n.y.js;case n.c.text:return n.y.txt;case n.c.step:return n.y.step;case n.c.json:return n.y.json;default:return n.y.none}},t}()},5590:(t,e,o)=>{o.d(e,{a:()=>n});var n=function(){function t(){}return t.create_ParaPolyGeomBSplineParams=function(e,o,n,r){void 0===r&&(r=!1),(e=e||[]).length<2&&(e=[{x:0,y:0,z:0},{x:1,y:1,z:0}]);var i=t.getKnots(n,e.length,o,r),s=i.knots;n=i.degree,console.log("================knots_params:",i);for(var a=new parapoly_engine.ParaPolyDataVector3Array,c=new parapoly_engine.ParaPolyDoubleArray,u=new parapoly_engine.ParaPolyDoubleArray,_=new parapoly_engine.ParaPolyIntArray,p=[],l=[],h=0;h<e.length;h++){var d=e[h];p.push(d)}for(h=0;h<p.length;h++){var f=new parapoly_engine.ParaPolyDataVector3;null==(d=p[h]).x||null==d.x?f.set(d[0],d[1],d[2]):f.set(d.x,d.y,d.z),a.pushValue(f),c.pushValue(1)}for(h=0;h<s.length;h++){var y=s[h];u.pushValue(y),l.push(1)}o||(l[0]=n+1,l[l.length-1]=n+1),r&&(l[0]=2,l[l.length-1]=2);for(h=0;h<l.length;h++){var m=l[h];_.pushValue(m)}return{poles_arr:a,weights_arr:c,knots_arr:u,multiplicities_arr:_,degree:n,is_closed:o}},t.getKnots=function(e,o,n,r){void 0===r&&(r=!1);var i,s=[];r?i=o:n?(o<e&&(e=o),i=o+1):(o<=e&&(e=o-1),i=o-e+1);for(var a=0;a<i;a++){var c=a/(i-1);s.push(t.clamp_number(c,0,1))}return{knots:s,degree:e}},t.clamp_number=function(t,e,o){return Math.max(e,Math.min(o,t))},t}()},5638:(t,e,o)=>{o.d(e,{R:()=>u});var n,r=o(347),i=o(7160),s=o(8268),a=o(631),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.edges=6,e.radius=2,e.height=2,e.className=i.Z.FeatureSetPrismComponent,e.feature_type=a.y.FeatureSetPrism,e}return c(e,t),e.prototype.set_edges=function(t){this.edges=t},e.prototype.get_edges=function(){return this.edges},e.prototype.set_radius=function(t){this.radius=t},e.prototype.get_radius=function(){return this.radius},e.prototype.set_height=function(t){this.height=t},e.prototype.get_height=function(){return this.height},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.edges=this.edges,o.radius=this.radius,o.height=this.height,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.edges=e.edges,this.radius=e.radius,this.height=e.height)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.FeatureSetPrismComponent,e.create,t)},e}(s.x)},5759:(t,e,o)=>{o.d(e,{n:()=>_});var n,r=o(347),i=o(7160),s=o(1072),a=o(6994),c=o(5361),u=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),_=function(t){function e(){var e=t.call(this)||this;return e.base_color=new c.Q1f,e.opacity=1,e.metalness=0,e.roughness=0,e.material_name="",e.className=i.Z.MaterialComponent,e}return u(e,t),e.prototype.set_base_color=function(t){this.base_color=t},e.prototype.get_base_color=function(){return this.base_color},e.prototype.set_opacity=function(t){this.opacity=t},e.prototype.get_opacity=function(){return this.opacity},e.prototype.set_metalness=function(t){this.metalness=t},e.prototype.get_metalness=function(){return this.metalness},e.prototype.set_roughness=function(t){this.roughness=t},e.prototype.get_roughness=function(){return this.roughness},e.prototype.set_material_name=function(t){this.material_name=t},e.prototype.get_material_name=function(){return this.material_name},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.base_color=this.base_color.toArray(),o.opacity=this.opacity,o.metalness=this.metalness,o.roughness=this.roughness,o.material_name=s.J.clearStringIfIsEmpty(this.material_name),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.base_color.fromArray(e.base_color),this.opacity=s.J.isEmpty(e.opacity)?1:e.opacity,this.metalness=e.metalness,this.roughness=e.roughness,this.material_name=s.J.readToStringIfIsEmpty(e.material_name))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.MaterialComponent,e.create,t)},e}(a.u)},5841:(t,e,o)=>{o.d(e,{k:()=>u});var n,r=o(347),i=o(7160),s=o(2444),a=o(5361),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.center=new a.Pq0(0,0,0),e.radius=1,e.start_angle=0,e.end_angle=1*Math.PI,e.direction=s.T.default_geom_direction_in_sketch.clone(),e.className=i.Z.SkGeomArcComponent,e}return c(e,t),e.prototype.set_center=function(t){this.center.copy(t)},e.prototype.get_center=function(){return this.center},e.prototype.set_radius=function(t){this.radius=t},e.prototype.get_radius=function(){return this.radius},e.prototype.set_start_angle=function(t){this.start_angle=t},e.prototype.get_start_angle=function(){return this.start_angle},e.prototype.set_end_angle=function(t){this.end_angle=t},e.prototype.get_end_angle=function(){return this.end_angle},e.prototype.set_direction=function(t){this.direction.copy(t)},e.prototype.get_direction=function(){return this.direction},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.center=this.center.toArray(),o.radius=this.radius,o.start_angle=this.start_angle,o.end_angle=this.end_angle,o.direction=this.direction.toArray(),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.center.fromArray(e.center),this.radius=e.radius,this.start_angle=e.start_angle,this.end_angle=e.end_angle,this.direction.fromArray(e.direction))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.SkGeomArcComponent,e.create,t)},e}(s.T)},5874:(t,e,o)=>{o.d(e,{Q:()=>r});var n=o(8575),r=function(){function t(){this.res_type=n.c.none,this.default_line_deflection=.3,this.default_angle_deflection=30*Math.PI/180}return t.prototype.get_resource_type=function(){return this.res_type},t.prototype.parse_data=function(t){},t.prototype.get_line_deflection=function(){return this.default_line_deflection},t.prototype.get_angle_deflection=function(){return this.default_angle_deflection},t.prototype.get_label=function(){return""},t}()},5984:(t,e,o)=>{o.d(e,{H:()=>u});var n,r=o(347),i=o(7160),s=o(8268),a=o(631),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.radius=1,e.className=i.Z.FeatureSetSphereComponent,e.feature_type=a.y.FeatureSetSphere,e}return c(e,t),e.prototype.set_radius=function(t){this.radius=t},e.prototype.get_radius=function(){return this.radius},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.radius=this.radius,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.radius=e.radius)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.FeatureSetSphereComponent,e.create,t)},e}(s.x)},6499:(t,e,o)=>{var n;o.d(e,{s:()=>n}),function(t){t.none="none",t.running="running",t.finished="finished",t.error="error"}(n||(n={}))},6542:(t,e,o)=>{var n;o.d(e,{T:()=>n}),function(t){t.x="x",t.y="y",t.z="z"}(n||(n={}))},6775:(t,e,o)=>{o.d(e,{q:()=>u});var n,r=o(347),i=o(7160),s=o(2444),a=o(5361),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.point=new a.Pq0(0,0,0),e.className=i.Z.SkGeomPointComponent,e}return c(e,t),e.prototype.set_point=function(t){this.point.copy(t)},e.prototype.get_point=function(){return this.point},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.point=this.point.toArray(),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.point.fromArray(e.point))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.SkGeomPointComponent,e.create,t)},e}(s.T)},6792:(t,e,o)=>{o.d(e,{H:()=>p});var n,r=o(9017),i=o(347),s=o(7160),a=o(1289),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},_=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},p=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=s.Z.FeatureNodeSetWedge,o.component=new r.m,o.addComponent(o.component),o}return c(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.set_values=function(t,e,o){this.component.set_x_length(t),this.component.set_y_length(e),this.component.set_z_length(o),this.make_topo_shape()},e.prototype.run=function(t){return u(this,void 0,void 0,function(){return _(this,function(t){return this.make_topo_shape(),[2]})})},e.prototype.make_topo_shape=function(){var t=this.component.get_x_length(),e=this.component.get_y_length(),o=t,n=this.component.get_z_length(),r=e,i=t,s=parapoly_engine.ParaPolyShapeMaker.wedge(0,0,0,0,0,o,r,n,i,0);this.set_topo_shape(s)},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(s.Z.FeatureSetWedgeComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),i.X.register(s.Z.FeatureNodeSetWedge,e.create,t)},e}(a.o)},6994:(t,e,o)=>{o.d(e,{O:()=>n,u:()=>a});var n,r=o(347),i=o(7160),s=o(1072);!function(t){t.ComponentValueChanged="ComponentValueChanged"}(n||(n={}));var a=function(){function t(){this.id="",this.id=s.J.generateUUID(),this.className=i.Z.Component,this.name="",this.tag=null,this.mShowComponent=!0}return t.prototype.set_parent=function(t){this.parent=t},t.prototype.get_parent=function(){return this.parent},t.prototype.set_id=function(t){this.id=t},t.prototype.get_id=function(){return this.id},t.prototype.set_name=function(t){this.name=t},t.prototype.get_name=function(){return this.name},t.prototype.showComponent=function(){return this.mShowComponent},t.prototype.getClassName=function(){return this.className},t.prototype.to_json=function(t){var e={};return e.className=this.getClassName(),e.id=this.id,e.name=s.J.clearStringIfIsEmpty(this.name),e.tag=s.J.clearStringIfIsEmpty(this.tag),e},t.prototype.clone=function(e,o){return t.create(this.to_json(o),e)},t.create=function(e,o){var n=new t;return n.read_from_json(e,o),n},t.prototype.read_from_json=function(t,e){t&&(this.id=(null==e?void 0:e.clearId)?s.J.generateUUID():t.id,this.name=t.name,this.tag=t.tag)},t.register=function(e){void 0===e&&(e=!1),r.X.register(i.Z.Component,t.create,e)},t}()},7073:(t,e,o)=>{o.d(e,{J:()=>c});var n,r=o(7160),i=o(8575),s=o(4855),a=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),c=function(t){function e(){var e=t.call(this)||this;return e.res_type=i.c.sketch3d,e}return a(e,t),e.prototype.parse_data=function(e){if(t.prototype.parse_data.call(this,e),this.root_sprite){var o=this.root_sprite.getChildByName("Stage");if(o)for(var n=o.getChildrenLength(),i=0;i<n;i++){var s=o.getChildByIndex(i);if(s.getClassName()==r.Z.SkContainerNode){this.sk_container_node=s;break}}this.sk_container_node||console.warn("Sketch3dEditorResource parse_data error: sk_container_node is null")}else console.warn("Sketch3dEditorResource parse_data error: root_sprite is null")},e.prototype.get_sk_container_node=function(){return this.sk_container_node},e}(s.v)},7079:(t,e,o)=>{o.d(e,{C:()=>p});var n,r=o(5984),i=o(347),s=o(7160),a=o(1289),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},_=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},p=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=s.Z.FeatureNodeSetSphere,o.component=new r.H,o.addComponent(o.component),o}return c(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.set_values=function(t){this.component.set_radius(t),this.make_topo_shape()},e.prototype.run=function(t){return u(this,void 0,void 0,function(){return _(this,function(t){return this.make_topo_shape(),[2]})})},e.prototype.make_topo_shape=function(){var t=this.component.get_radius(),e=parapoly_engine.ParaPolyShapeMaker.sphere(t,-90,90,360);this.set_topo_shape(e)},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(s.Z.FeatureSetSphereComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),i.X.register(s.Z.FeatureNodeSetSphere,e.create,t)},e}(a.o)},7160:(t,e,o)=>{var n;o.d(e,{Z:()=>n}),function(t){t.Unknown="Unknown",t.Node="Node",t.Sprite="Sprite",t.Component="Component",t.Ax2Component="Ax2Component",t.BlockCodeComponent="BlockCodeComponent",t.BooleanComponent="BooleanComponent",t.InfoComponent="InfoComponent",t.MaterialComponent="MaterialComponent",t.MeshComponent="MeshComponent",t.MetaComponent="MetaComponent",t.ShapeComponent="ShapeComponent",t.TransformComponent="TransformComponent",t.FeatureBaseComponent="FeatureBaseComponent",t.FeatureMiscComponent="FeatureMiscComponent",t.FeatureBooleanComponent="FeatureBooleanComponent",t.FeatureChamferComponent="FeatureChamferComponent",t.FeatureDeleteComponent="FeatureDeleteComponent",t.FeatureDraftComponent="FeatureDraftComponent",t.FeatureExtrudeComponent="FeatureExtrudeComponent",t.FeatureFilletComponent="FeatureFilletComponent",t.FeatureHelixComponent="FeatureHelixComponent",t.FeatureMirrorComponent="FeatureMirrorComponent",t.FeatureRevolveComponent="FeatureRevolveComponent",t.FeatureNodeRevolve="FeatureNodeRevolve",t.FeatureShellComponent="FeatureShellComponent",t.FeatureSweepComponent="FeatureSweepComponent",t.FeatureNodeSweep="FeatureNodeSweep",t.FeatureTransformComponent="FeatureTransformComponent",t.FeatureSetBoxComponent="FeatureSetBoxComponent",t.FeatureSetConeComponent="FeatureSetConeComponent",t.FeatureSetCylinderComponent="FeatureSetCylinderComponent",t.FeatureSetEllipsoidComponent="FeatureSetEllipsoidComponent",t.FeatureSetPrismComponent="FeatureSetPrismComponent",t.FeatureSetStepComponent="FeatureSetStepComponent",t.FeatureSetSphereComponent="FeatureSetSphereComponent",t.FeatureSetTorusComponent="FeatureSetTorusComponent",t.FeatureSetTrapezoidComponent="FeatureSetTrapezoidComponent",t.FeatureSetWedgeComponent="FeatureSetWedgeComponent",t.Scene3dComponent="Scene3dComponent",t.BoxMeshComponent="BoxMeshComponent",t.PlaneMeshComponent="PlaneMeshComponent",t.SphereMeshComponent="SphereMeshComponent",t.Camera3dComponent="Camera3dComponent",t.OrthographicCameraComponent="OrthographicCameraComponent",t.AmbientLightComponent="AmbientLightComponent",t.DirectionalLightComponent="DirectionalLightComponent",t.PointLightComponent="PointLightComponent",t.SpotLightComponent="SpotLightComponent",t.WorkSpaceSettingComponent="WorkSpaceSettingComponent",t.SkGeomBaseComponent="SkGeomBaseComponent",t.SkGeomPointComponent="SkGeomPointComponent",t.SkGeomLineComponent="SkGeomLineComponent",t.SkGeomCircleComponent="SkGeomCircleComponent",t.SkGeomEllipseComponent="SkGeomEllipseComponent",t.SkGeomArcComponent="SkGeomArcComponent",t.SkGeomArcOfEllipseComponent="SkGeomArcOfEllipseComponent",t.SkGeomBSplineComponent="SkGeomBSplineComponent",t.SkConstraintComponent="SkConstraintComponent",t.TopoShapeComponent="TopoShapeComponent",t.FeatureContainerNode="FeatureContainerNode",t.FeatureNodeBase="FeatureNodeBase",t.FeatureNodeSetBox="FeatureNodeSetBox",t.FeatureNodeSetCone="FeatureNodeSetCone",t.FeatureNodeSetCylinder="FeatureNodeSetCylinder",t.FeatureNodeSetEllipsoid="FeatureNodeSetEllipsoid",t.FeatureNodeSetPrism="FeatureNodeSetPrism",t.FeatureNodeSetStep="FeatureNodeSetStep",t.FeatureNodeSetSphere="FeatureNodeSetSphere",t.FeatureNodeSetTorus="FeatureNodeSetTorus",t.FeatureNodeSetTrapezoid="FeatureNodeSetTrapezoid",t.FeatureNodeSetWedge="FeatureNodeSetWedge",t.FeatureNodeBoolean="FeatureNodeBoolean",t.FeatureNodeChamfer="FeatureNodeChamfer",t.FeatureNodeDelete="FeatureNodeDelete",t.FeatureNodeDraft="FeatureNodeDraft",t.FeatureNodeExtrude="FeatureNodeExtrude",t.FeatureNodeFillet="FeatureNodeFillet",t.FeatureNodeHelix="FeatureNodeHelix",t.FeatureNodeShell="FeatureNodeShell",t.FeatureNodeMirror="FeatureNodeMirror",t.SkContainerNode="SkContainerNode",t.SkGeomBaseNode="SkGeomBaseNode",t.SkGeomPointNode="SkGeomPointNode",t.SkGeomLineNode="SkGeomLineNode",t.SkGeomCircleNode="SkGeomCircleNode",t.SkGeomEllipseNode="SkGeomEllipseNode",t.SkGeomArcNode="SkGeomArcNode",t.SkGeomBSplineNode="SkGeomBSplineNode",t.FeatureNodeTransform="FeatureNodeTransform",t.SkConstraintNode="SkConstraintNode",t.FeatureTopoItem="FeatureTopoItem"}(n||(n={}))},7211:(t,e,o)=>{o.d(e,{W:()=>u});var n,r=o(3304),i=o(347),s=o(7160),a=o(7885),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=s.Z.SkConstraintNode,o.component=new r.RN,o.addComponent(o.component),o}return c(e,t),e.prototype.get_type=function(){return this.component.Type},e.prototype.get_value=function(){return this.component.Value},e.prototype.get_first=function(){return this.component.First},e.prototype.get_first_pos=function(){return this.component.FirstPos},e.prototype.get_second=function(){return this.component.Second},e.prototype.get_second_pos=function(){return this.component.SecondPos},e.prototype.get_third=function(){return this.component.Third},e.prototype.get_third_pos=function(){return this.component.ThirdPos},e.prototype.set_constraint=function(t){t&&(this.component.Value=t.Value,this.component.Type=t.Type,this.component.AlignmentType=t.AlignmentType,this.component.Name=t.Name,this.component.First=t.First,this.component.FirstPos=t.FirstPos,this.component.Second=t.Second,this.component.SecondPos=t.SecondPos,this.component.Third=t.Third,this.component.ThirdPos=t.ThirdPos,this.component.LabelDistance=t.LabelDistance,this.component.LabelPosition=t.LabelPosition,this.component.isDriving=t.isDriving,this.component.InternalAlignmentIndex=t.InternalAlignmentIndex,this.component.isInVirtualSpace=t.isInVirtualSpace,this.component.isActive=t.isActive,this.component.mId=t.mId)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(s.Z.SkConstraintComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),i.X.register(s.Z.SkConstraintNode,e.create,t)},e}(a.b)},7308:(t,e,o)=>{o.d(e,{S:()=>u});var n,r=o(347),i=o(7160),s=o(1072),a=o(6994),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.label="",e.object_name="",e.visible=!0,e.locked=!1,e.enabled=!0,e.dirty=!0,e.className=i.Z.InfoComponent,e}return c(e,t),e.prototype.set_label=function(t){this.label=t},e.prototype.get_label=function(){return this.label},e.prototype.set_object_name=function(t){this.object_name=t},e.prototype.get_object_name=function(){return this.object_name},e.prototype.set_visible=function(t){this.visible=t},e.prototype.get_visible=function(){return this.visible},e.prototype.set_locked=function(t){this.locked=t},e.prototype.get_locked=function(){return this.locked},e.prototype.set_enabled=function(t){this.enabled=t},e.prototype.get_enabled=function(){return this.enabled},e.prototype.set_dirty=function(t){this.dirty=t},e.prototype.get_dirty=function(){return this.dirty},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.label=s.J.clearStringIfIsEmpty(this.label),o.object_name=s.J.clearStringIfIsEmpty(this.object_name),o.visible=this.visible,o.locked=this.locked,o.enabled=this.enabled,o.dirty=this.dirty,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.label=e.label||"",this.object_name=e.object_name||"",this.visible=e.visible,this.locked=e.locked,this.enabled=e.enabled,this.dirty=e.dirty)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.InfoComponent,e.create,t)},e}(a.u)},7640:(t,e,o)=>{o.d(e,{e:()=>u});var n,r=o(347),i=o(7160),s=o(6499),a=o(6994),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.running_state=s.s.none,e.building_dirty=!0,e.className=i.Z.FeatureMiscComponent,e}return c(e,t),e.prototype.get_building_dirty=function(){return this.building_dirty},e.prototype.set_building_dirty=function(t){this.building_dirty=t},e.prototype.get_op_feature_node_id=function(){return this.op_feature_node_id},e.prototype.set_op_feature_node_id=function(t){this.op_feature_node_id=t},e.prototype.get_running_state=function(){return this.running_state},e.prototype.set_running_state=function(t){this.running_state=t},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.running_state=this.running_state,o.op_feature_node_id=this.op_feature_node_id,o.building_dirty=this.building_dirty,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.running_state=e.running_state,this.op_feature_node_id=e.op_feature_node_id,this.building_dirty=!0)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.FeatureMiscComponent,e.create,t)},e}(a.u)},7864:(t,e,o)=>{o.d(e,{p:()=>_});var n,r=o(347),i=o(7160),s=o(2928),a=o(2444),c=o(5361),u=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),_=function(t){function e(){var e=t.call(this)||this;return e.poles=[],e.weights=[],e.knots=[],e.multiplicities=[],e.degree=3,e.is_closed=!1,e.checkrational=!1,e.curve_type=s.H.basis_spline,e.className=i.Z.SkGeomBSplineComponent,e}return u(e,t),e.prototype.add_pole=function(t){t&&this.poles.push(t)},e.prototype.set_poles=function(t){this.poles=t},e.prototype.get_poles=function(){return this.poles},e.prototype.set_weights=function(t){this.weights=t},e.prototype.get_weights=function(){return this.weights},e.prototype.set_knots=function(t){this.knots=t},e.prototype.get_knots=function(){return this.knots},e.prototype.set_multiplicities=function(t){this.multiplicities=t},e.prototype.get_multiplicities=function(){return this.multiplicities},e.prototype.set_degree=function(t){this.degree=t},e.prototype.get_degree=function(){return this.degree},e.prototype.set_is_closed=function(t){this.is_closed=t},e.prototype.get_is_closed=function(){return this.is_closed},e.prototype.set_checkrational=function(t){this.checkrational=t},e.prototype.get_checkrational=function(){return this.checkrational},e.prototype.set_curve_type=function(t){this.curve_type=t},e.prototype.get_curve_type=function(){return this.curve_type},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.poles=this.poles.map(function(t){return t.toArray()}),o.weights=this.weights,o.knots=this.knots,o.multiplicities=this.multiplicities,o.degree=this.degree,o.is_closed=this.is_closed,o.checkrational=this.checkrational,o.curve_type=this.curve_type,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.poles=e.poles.map(function(t){return(new c.Pq0).fromArray(t)}),this.weights=e.weights,this.knots=e.knots,this.multiplicities=e.multiplicities,this.degree=e.degree,this.is_closed=e.is_closed,this.checkrational=e.checkrational,this.curve_type=e.curve_type)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.SkGeomBSplineComponent,e.create,t)},e}(a.T)},7866:(t,e,o)=>{o.d(e,{B:()=>_});var n,r=o(331),i=o(347),s=o(7160),a=o(5361),c=o(5255),u=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),_=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=s.Z.SkGeomEllipseNode,o.component=new r.A,o.addComponent(o.component),o.create_geom_native(),o}return u(e,t),e.prototype.set_values=function(t,e,o,n){this.component.set_center(t),this.component.set_major_radius(e),this.component.set_minor_radius(o),this.component.set_direction(n),this.write_to_geom_native()},e.prototype.update_value_from_geom_native=function(e){t.prototype.update_value_from_geom_native.call(this,e),e||console.error("SkGeomEllipseNode update_value_from_geom_native geom_native is null");var o=e.get_center(),n=e.get_major_radius(),r=e.get_minor_radius(),i=e.get_direction();this.set_values(new a.Pq0(o.x,o.y,o.z),n,r,new a.Pq0(i.x,i.y,i.z))},e.prototype.create_geom_native=function(){var t=new parapoly_engine.ParaPolyGeom_Ellipse;t.setId(this.id),this.geom_native=t;var e=new parapoly_engine.ParaPolyGeom_Topo_Ellipse;e.setId(this.id),this.geom_topo_native=e},e.prototype.write_to_geom_native=function(){if(this.geom_native){var t=this.component.get_center(),e=this.component.get_major_radius(),o=this.component.get_minor_radius(),n=this.component.get_direction(),r=new parapoly_engine.Vector3(t.x,t.y,t.z),i=new parapoly_engine.Vector3(n.x,n.y,n.z);this.geom_native.set(r,e,o,i),this.geom_topo_native.set(r,e,o,i);var s=this.getId();this.geom_native.setId(s),this.geom_topo_native.setId(s)}},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(s.Z.SkGeomEllipseComponent),this.write_to_geom_native())},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),i.X.register(s.Z.SkGeomEllipseNode,e.create,t)},e}(c.i)},7885:(t,e,o)=>{o.d(e,{b:()=>s});var n=o(347),r=o(7160),i=o(1072),s=function(){function t(t){void 0===t&&(t=""),this.id="",this.name="",this.tag=null,this.className=r.Z.Node,this.components=[],this.children=[],this.parent=null,this.memoryVisible=!0,this.id=i.J.generateUUID(),this.name=t}return t.prototype.setMemoryVisible=function(t){this.memoryVisible=t},t.prototype.getMemoryVisible=function(){return this.memoryVisible},t.prototype.getId=function(){return this.id},t.prototype.setId=function(t){this.id=t},t.prototype.getName=function(){return this.name},t.prototype.setName=function(t){this.name=t},t.prototype.getTag=function(){return this.tag},t.prototype.setTag=function(t){this.tag=t},t.prototype.getClassName=function(){return this.className},t.prototype.getParent=function(){return this.parent},t.prototype.setParent=function(t){this.parent=t},t.prototype.getComponents=function(){return this.components},t.prototype.getChildren=function(){return this.children},t.prototype.get_topo_shape=function(){return null},t.prototype.get_transform_component=function(){return null},t.prototype.get_enabled_op=function(){return!1},t.prototype.addComponent=function(t){t&&(t.set_parent(this),this.components.push(t))},t.prototype.removeComponent=function(t){var e=this.components.indexOf(t);e>=0&&(t.set_parent(null),this.components.splice(e,1))},t.prototype.hasComponent=function(t){return this.components.indexOf(t)>=0},t.prototype.addChild=function(t,e){void 0===e&&(e=-1),t&&(t.setParent(this),e>=0?this.children.splice(e,0,t):this.children.push(t))},t.prototype.removeChildAt=function(t){if(t>=0&&t<this.children.length){var e=this.children[t];e&&(e.setParent(null),this.children.splice(t,1))}},t.prototype.removeChild=function(t){if(t){var e=this.children.indexOf(t);e>=0&&(t.setParent(null),this.children.splice(e,1))}},t.prototype.hasChild=function(t){return this.children.indexOf(t)>=0},t.prototype.getComponentByClassName=function(t){for(var e=0;e<this.components.length;e++)if(this.components[e].getClassName()==t)return this.components[e]},t.prototype.getComponentByName=function(t){for(var e=0;e<this.components.length;e++)if(this.components[e].get_name()==t)return this.components[e]},t.prototype.getChildByName=function(t,e){return void 0===e&&(e=!1),this.findChildBy_Id_Or_Name("name",t,e)},t.prototype.getChildIndex=function(t){return this.children.indexOf(t)},t.prototype.getChildById=function(t,e){return void 0===e&&(e=!1),this.findChildBy_Id_Or_Name("id",t,e)},t.prototype.findChildBy_Id_Or_Name=function(t,e,o){if(void 0===o&&(o=!1),null!=e)for(var n=null,r=0;r<this.children.length;r++){var i=this.children[r],s=void 0;if("id"==t?s=i.getId():"name"==t&&(s=i.getName()),s==e)return n=i;if(o&&(n=i.findChildBy_Id_Or_Name(t,e,o)))return n}},t.prototype.getChildrenLength=function(){return this.children.length},t.prototype.getComponentsLength=function(){return this.components.length},t.prototype.getComponentByIndex=function(t){return this.components[t]},t.prototype.getChildByIndex=function(t){return this.children[t]},t.prototype.clearComponents=function(){this.components=[]},t.prototype.clearChildren=function(){this.children=[]},t.visit_node=function(e,o,n){if(void 0===o&&(o=null),void 0===n&&(n=null),e){o&&o(e);for(var r=0;r<e.getChildrenLength();r++){var i=e.getChildByIndex(r);i&&t.visit_node(i,o,n)}n&&n(e)}},t.prototype.to_json=function(t){void 0===t&&(t=null);var e={};e.className=this.className,e.id=this.id,e.name=i.J.clearStringIfIsEmpty(this.name),e.tag=i.J.clearStringIfIsEmpty(this.tag),e.components=[];for(var o=0;o<this.components.length;o++){var n=this.components[o];e.components.push(n.to_json(t))}e.children=[];for(o=0;o<this.children.length;o++)e.children.push(this.children[o].to_json(t));return e},t.prototype.clone=function(e,o){return void 0===e&&(e=null),void 0===o&&(o=null),t.create(this.to_json(o),e)},t.create=function(e,o){void 0===o&&(o=null);var n=new t;return n.read_from_json(e,o),n},t.prototype.read_from_json=function(t,e){if(void 0===e&&(e=null),t){e=e||{},this.id=e.clearId?i.J.generateUUID():t.id,this.name=t.name,this.tag=t.tag,this.components=[];for(var o=0;o<t.components.length;o++){var r=t.components[o],s=n.X.create(r.className,r,e);this.addComponent(s)}this.children=[];for(o=0;o<t.children.length;o++){var a=t.children[o],c=n.X.create(a.className,a,e);this.addChild(c)}}},t.register=function(e){void 0===e&&(e=!1),n.X.register(r.Z.Node,t.create,e)},t}()},8023:(t,e,o)=>{o.d(e,{i:()=>u});var n,r=o(347),i=o(7160),s=o(2444),a=o(5361),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.center=new a.Pq0(0,0,0),e.radius=1,e.direction=s.T.default_geom_direction_in_sketch.clone(),e.className=i.Z.SkGeomCircleComponent,e}return c(e,t),e.prototype.set_center=function(t){this.center.copy(t)},e.prototype.get_center=function(){return this.center},e.prototype.set_radius=function(t){this.radius=t},e.prototype.get_radius=function(){return this.radius},e.prototype.set_direction=function(t){this.direction.copy(t)},e.prototype.get_direction=function(){return this.direction},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.center=this.center.toArray(),o.radius=this.radius,o.direction=this.direction.toArray(),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.center.fromArray(e.center),this.radius=e.radius,this.direction.fromArray(e.direction))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.SkGeomCircleComponent,e.create,t)},e}(s.T)},8063:(t,e,o)=>{o.d(e,{V:()=>c});var n,r=o(347),i=o(7160),s=o(6994),a=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),c=function(t){function e(){var o=t.call(this)||this;return o.className=i.Z.MetaComponent,o.line_deflection=e.default_line_deflection,o.angle_deflection=e.default_angle_deflection,o}return a(e,t),e.prototype.set_line_deflection=function(t){this.line_deflection=t},e.prototype.get_line_deflection=function(){return this.line_deflection},e.prototype.set_angle_deflection=function(t){this.angle_deflection=t},e.prototype.get_angle_deflection=function(){return this.angle_deflection},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.line_deflection=this.line_deflection,o.angle_deflection=this.angle_deflection,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.line_deflection=e.line_deflection,this.angle_deflection=e.angle_deflection)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.MetaComponent,e.create,t)},e.default_line_deflection=.3,e.default_angle_deflection=10*Math.PI/180,e}(s.u)},8268:(t,e,o)=>{o.d(e,{x:()=>u});var n,r=o(347),i=o(7160),s=o(631),a=o(6994),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.feature_type=s.y.FeatureBase,e.className=i.Z.FeatureBaseComponent,e}return c(e,t),e.prototype.get_feature_type=function(){return this.feature_type},e.prototype.isFeatureComponent=function(){return!0},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_type=this.feature_type,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_type=e.feature_type)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.FeatureBaseComponent,e.create,t)},e}(a.u)},8297:(t,e,o)=>{var n;o.d(e,{E:()=>n}),function(t){t.union="union",t.difference="difference",t.intersection="intersection"}(n||(n={}))},8575:(t,e,o)=>{var n,r;o.d(e,{c:()=>n,y:()=>r}),function(t){t.none="none",t.step="step",t.step_link="step_link",t.assembly3d="assembly3d",t.parapoly3d="parapoly3d",t.part3d="part3d",t.block3d="block3d",t.code3d="code3d",t.sketch3d="sketch3d",t.js="js",t.json="json",t.text="text"}(n||(n={})),function(t){t.none="none",t.jhasm3d="jhasm3d",t.jhprt3d="jhprt3d",t.jhbk3d="jhbk3d",t.jhjs3d="jhjs3d",t.jhsketch3d="jhsketch3d",t.js="js",t.json="json",t.txt="txt",t.step="step"}(r||(r={}))},8625:(t,e,o)=>{o.d(e,{Y:()=>p});var n,r=o(9506),i=o(347),s=o(7160),a=o(1289),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},_=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},p=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=s.Z.FeatureNodeSetTorus,o.component=new r.t,o.addComponent(o.component),o}return c(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.set_values=function(t,e){this.component.set_radius1(t),this.component.set_radius2(e),this.make_topo_shape()},e.prototype.run=function(t){return u(this,void 0,void 0,function(){return _(this,function(t){return this.make_topo_shape(),[2]})})},e.prototype.make_topo_shape=function(){var t=this.component.get_radius1(),e=this.component.get_radius2(),o=parapoly_engine.ParaPolyShapeMaker.torus(t,e,-180,180,360);this.set_topo_shape(o)},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(s.Z.FeatureSetTorusComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),i.X.register(s.Z.FeatureNodeSetTorus,e.create,t)},e}(a.o)},8699:(t,e,o)=>{o.d(e,{w:()=>l});var n,r=o(7864),i=o(347),s=o(7160),a=o(5255),c=o(2928),u=o(5062),_=o(5590),p=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=s.Z.SkGeomBSplineNode,o.component=new r.p,o.addComponent(o.component),o.create_geom_native(),o}return p(e,t),e.prototype.set_degree=function(t){this.component.set_degree(t)},e.prototype.set_is_closed=function(t){this.component.set_is_closed(t)},e.prototype.add_pole=function(t){this.component.add_pole(t)},e.prototype.get_poles=function(){return this.component.get_poles()},e.prototype.set_values_by_poles=function(t){if(t){var e=this.component.get_is_closed(),o=this.component.get_degree(),n=_.a.create_ParaPolyGeomBSplineParams(t,e,o);t=u.k.convert_to_vector3_array(n.poles_arr);var r=u.k.convert_to_number_array(n.weights_arr),i=u.k.convert_to_number_array(n.knots_arr),s=u.k.convert_to_number_array(n.multiplicities_arr);o=n.degree,this.set_values(t,r,i,s,o,e)}},e.prototype.set_values=function(t,e,o,n,r,i,s,a){void 0===r&&(r=3),void 0===i&&(i=!1),void 0===s&&(s=!1),void 0===a&&(a=c.H.basis_spline),this.component.set_poles(t),this.component.set_weights(e),this.component.set_knots(o),this.component.set_multiplicities(n),this.component.set_degree(r),this.component.set_is_closed(i),this.component.set_checkrational(s),this.component.set_curve_type(a),this.write_to_geom_native()},e.prototype.update_value_from_geom_native=function(e){t.prototype.update_value_from_geom_native.call(this,e),e||console.error("SkGeomBSplineNode.update_value_from_geom_native: geom_native is null");var o=u.k.convert_to_vector3_array(e.getPolesArray()),n=u.k.convert_to_number_array(e.getWeightsArray()),r=u.k.convert_to_number_array(e.getKnotsArray()),i=u.k.convert_to_number_array(e.getMultiplicitiesArray()),s=e.getDegree(),a=e.getPeriodic(),c=e.getCheckrational(),_=e.getCurveType();this.set_values(o,n,r,i,s,a,c,_)},e.prototype.create_geom_native=function(){var t=new parapoly_engine.ParaPolyGeom_BSpline;t.setId(this.id),this.geom_native=t;var e=new parapoly_engine.ParaPolyGeom_Topo_BSpline;e.setId(this.id),this.geom_topo_native=e},e.prototype.write_to_geom_native=function(){var t=this.geom_native;if(!t)return console.error("SkGeomBSplineNode.write_to_geom_native: geom_native is null"),null;var e=this.component.get_poles(),o=this.component.get_weights(),n=this.component.get_knots(),r=this.component.get_multiplicities(),i=this.component.get_degree(),s=this.component.get_is_closed(),a=this.component.get_checkrational(),c=this.component.get_curve_type(),_=u.k.convert_to_native_vector3_array(e),p=u.k.convert_to_native_double_array(o),l=u.k.convert_to_native_double_array(n),h=u.k.convert_to_native_int_array(r);t.setValues(_,p,l,h,i,s,a,c),this.geom_topo_native.setValues(_,p,l,h,i,s,a,c);var d=this.getId();this.geom_native.setId(d),this.geom_topo_native.setId(d)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(s.Z.SkGeomBSplineComponent),this.write_to_geom_native())},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),i.X.register(s.Z.SkGeomBSplineNode,e.create,t)},e}(a.i)},8873:(t,e,o)=>{o.d(e,{a:()=>p});var n,r=o(9162),i=o(347),s=o(7160),a=o(1289),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},_=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},p=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=s.Z.FeatureNodeSetEllipsoid,o.component=new r.P,o.addComponent(o.component),o}return c(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.set_values=function(t,e,o){this.component.set_radius_x(t),this.component.set_radius_y(e),this.component.set_radius_z(o),this.make_topo_shape()},e.prototype.run=function(t){return u(this,void 0,void 0,function(){return _(this,function(t){return this.make_topo_shape(),[2]})})},e.prototype.make_topo_shape=function(){var t=this.component.get_radius_x(),e=this.component.get_radius_y(),o=this.component.get_radius_z(),n=parapoly_engine.ParaPolyShapeMaker.ellipsoid(t,e,o,-90,90,360);this.set_topo_shape(n)},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(s.Z.FeatureSetEllipsoidComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),i.X.register(s.Z.FeatureNodeSetEllipsoid,e.create,t)},e}(a.o)},8892:(t,e,o)=>{o.d(e,{S:()=>i});var n=o(7160),r=o(1072),i=function(){function t(){}return t.readSprite=function(e,o,n){if(void 0===o&&(o=null),void 0===n&&(n=!1),e){var r=t.convert(e,n);o&&o.addChild(r);for(var i=e.getChildrenLength(),s=0;s<i;s++){var a=e.getChildByIndex(s);t.readSprite(a,r,n)}return r}},t.convert=function(e,o){if(void 0===o&&(o=!1),e){var r=!0;e.getClassName()===n.Z.SkContainerNode&&o&&(r=!1);e.getComponentByClassName(n.Z.InfoComponent);var i=e.getComponentByClassName(n.Z.TransformComponent),s=e.getComponentByClassName(n.Z.TopoShapeComponent),a=e.getComponentByClassName(n.Z.MaterialComponent),c=e.getName();c=c||e.getId();var u=new parapoly_engine.ParaPolyNode(c);if(console.log("================name:",c),r&&i){var _=new parapoly_engine.ParaPolyTransformComponent;t.readTransformComponent(_,i),u.addComponent(_)}if(r&&s)if(!s.get_archived()){var p=new parapoly_engine.ParaPolyShapeComponent;t.readTopoShapeComponent(p,s),u.addComponent(p)}if(r&&a){var l=new parapoly_engine.ParaPolyMaterialComponent;t.readMaterialComponent(l,a),u.addComponent(l)}return u}},t.readTransformComponent=function(t,e){if(t&&e){var o=e.get_position(),n=e.get_scale(),r=e.get_rotation();t.x=o.x,t.y=o.y,t.z=o.z,t.scale_x=n.x,t.scale_y=n.y,t.scale_z=n.z,t.q_x=r.x,t.q_y=r.y,t.q_z=r.z,t.q_w=r.w}},t.readTopoShapeComponent=function(t,e){if(t&&e){var o=e.get_topo_shape();o&&t.setParaPolyTopoShape(o)}},t.readMaterialComponent=function(t,e){if(t&&e){var o=e.get_base_color(),n=(e.get_opacity(),e.get_metalness()),i=e.get_roughness(),s=e.get_material_name(),a=r.J.stringToNativeCharArray(s),c=new parapoly_engine.ParaPolyDoubleArray;c.pushValue(o.r),c.pushValue(o.g),c.pushValue(o.b),t.setMaterialName(a),t.setBaseColor(c),t.metallic=n,t.roughness=i}},t}()},9017:(t,e,o)=>{o.d(e,{m:()=>u});var n,r=o(347),i=o(7160),s=o(8268),a=o(631),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.x_length=1,e.y_length=1,e.z_length=1,e.className=i.Z.FeatureSetWedgeComponent,e.feature_type=a.y.FeatureSetWedge,e}return c(e,t),e.prototype.set_x_length=function(t){this.x_length=t},e.prototype.get_x_length=function(){return this.x_length},e.prototype.set_y_length=function(t){this.y_length=t},e.prototype.get_y_length=function(){return this.y_length},e.prototype.set_z_length=function(t){this.z_length=t},e.prototype.get_z_length=function(){return this.z_length},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.x_length=this.x_length,o.y_length=this.y_length,o.z_length=this.z_length,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.x_length=e.x_length,this.y_length=e.y_length,this.z_length=e.z_length)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.FeatureSetWedgeComponent,e.create,t)},e}(s.x)},9162:(t,e,o)=>{o.d(e,{P:()=>u});var n,r=o(347),i=o(7160),s=o(8268),a=o(631),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.radius_x=4,e.radius_y=2,e.radius_z=2,e.className=i.Z.FeatureSetEllipsoidComponent,e.feature_type=a.y.FeatureSetEllipsoid,e}return c(e,t),e.prototype.set_radius_x=function(t){this.radius_x=t},e.prototype.get_radius_x=function(){return this.radius_x},e.prototype.set_radius_y=function(t){this.radius_y=t},e.prototype.get_radius_y=function(){return this.radius_y},e.prototype.set_radius_z=function(t){this.radius_z=t},e.prototype.get_radius_z=function(){return this.radius_z},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.radius_x=this.radius_x,o.radius_y=this.radius_y,o.radius_z=this.radius_z,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.radius_x=e.radius_x,this.radius_y=e.radius_y,this.radius_z=e.radius_z)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.FeatureSetEllipsoidComponent,e.create,t)},e}(s.x)},9175:(t,e,o)=>{o.d(e,{O:()=>i});var n=o(3027),r=o(1400),i=function(){function t(){}return t.tessellate_node=function(e,o,i){if(e){var s=e;if(s.get_topo_shape){var a=s.get_topo_shape();if(a){var c=s.get_topo_shape_component();if(c){for(var u=new Array,_=new Array,p=new Array,l=new parapoly_engine.ParaPolyShapeTessellate(a,o,i),h=new parapoly_engine.ParaPolyTopoExplorer(a),d=h.getFaceCount(),f=h.getEdgeCount(),y=h.getPointCount(),m=0;m<d;m++){var g=h.getFace(m),v=l.getFaceMeshComponent(g),w=new n.F;w.meshType=r.T.face,w.real_index=g.getRealIndex(),t.read_native_mesh_component(v,w),u.push(w)}for(m=0;m<f;m++){var b=h.getEdge(m),C=l.getEdgeMeshComponent(b),x=new n.F;x.meshType=r.T.edge,x.real_index=b.getRealIndex(),t.read_native_mesh_component(C,x),_.push(x)}for(m=0;m<y;m++){var P=h.getPoint(m),S=l.getPointMeshComponent(P),k=new n.F;k.meshType=r.T.point,k.real_index=P.getRealIndex(),t.read_native_mesh_component(S,k),p.push(k)}c.set_facesMesh(u),c.set_edgesMesh(_),c.set_pointsMesh(p),s.set_tessellated(!0)}else console.warn("topoShapeComponent is null")}else console.warn("topo_shape is null")}else console.warn("feature_node.get_topo_shape is null")}else console.warn("node is null")},t.read_native_mesh_component=function(t,e){if(t&&e){for(var o=t.vertices(),n=t.indices(),r=t.colors(),i=t.normals(),s=t.lines(),a=t.points(),c=o.getCount(),u=i.getCount(),_=n.getCount(),p=r.getCount(),l=s.getCount(),h=a.getCount(),d=new Array(c),f=new Array(u),y=new Array(_),m=new Array(p),g=new Array(l),v=new Array(h),w=0;w<c;w++)d[w]=o.getValue(w);for(w=0;w<u;w++)f[w]=i.getValue(w);for(w=0;w<_;w++)y[w]=n.getValue(w);for(w=0;w<p;w++)m[w]=r.getValue(w);for(w=0;w<l;w++)g[w]=s.getValue(w);for(w=0;w<h;w++)v[w]=a.getValue(w);e.vertices=d,e.normals=f,e.indices=y,e.colors=m,e.lines=g,e.points=v}},t}()},9281:(t,e,o)=>{o.d(e,{Q:()=>u});var n,r=o(347),i=o(7160),s=o(8268),a=o(631),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.top_w=2,e.bottom_w=10,e.hight=10,e.depth=.5,e.className=i.Z.FeatureSetTrapezoidComponent,e.feature_type=a.y.FeatureSetTrapezoid,e}return c(e,t),e.prototype.set_top_w=function(t){this.top_w=t},e.prototype.get_top_w=function(){return this.top_w},e.prototype.set_bottom_w=function(t){this.bottom_w=t},e.prototype.get_bottom_w=function(){return this.bottom_w},e.prototype.set_hight=function(t){this.hight=t},e.prototype.get_hight=function(){return this.hight},e.prototype.set_depth=function(t){this.depth=t},e.prototype.get_depth=function(){return this.depth},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.top_w=this.top_w,o.bottom_w=this.bottom_w,o.hight=this.hight,o.depth=this.depth,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.top_w=e.top_w,this.bottom_w=e.bottom_w,this.hight=e.hight,this.depth=e.depth)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.FeatureSetTrapezoidComponent,e.create,t)},e}(s.x)},9333:(t,e,o)=>{o.d(e,{M:()=>p});var n,r=o(5638),i=o(347),s=o(7160),a=o(1289),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},_=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},p=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=s.Z.FeatureNodeSetPrism,o.component=new r.R,o.addComponent(o.component),o}return c(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.set_values=function(t,e,o){this.component.set_edges(t),this.component.set_radius(e),this.component.set_height(o),this.make_topo_shape()},e.prototype.run=function(t){return u(this,void 0,void 0,function(){return _(this,function(t){return this.make_topo_shape(),[2]})})},e.prototype.make_topo_shape=function(){var t=this.component.get_edges(),e=this.component.get_radius(),o=this.component.get_height(),n=parapoly_engine.ParaPolyShapeMaker.prism(t,e,o);this.set_topo_shape(n)},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(s.Z.FeatureSetPrismComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),i.X.register(s.Z.FeatureNodeSetPrism,e.create,t)},e}(a.o)},9375:(t,e,o)=>{o.d(e,{Y:()=>M});var n,r=o(4467),i=o(5759),s=o(347),a=o(7885),c=o(7160),u=o(5361),_=o(7308),p=o(632),l=o(6499),h=o(7640),d=o(2226),f=o(7211),y=o(3304),m=o(718),g=o(2508),v=o(9856),w=o(1934),b=o(7866),C=o(8699),x=o(9471),P=o(615),S=o(4291),k=o(1072),E=o(4991),O=o(3401),N=o(261),j=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),F=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},T=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},M=function(t){function e(o){void 0===o&&(o="");var n=t.call(this,o)||this;return n.m_running_state=l.s.none,n.className=c.Z.SkContainerNode,n.info_component=new _.S,n.ax2_component=new r.v,n.material_component=new i.n,n.misc_component=new h.e,n.topo_shape_component=new p.t,n.addComponent(n.info_component),n.addComponent(n.ax2_component),n.addComponent(n.material_component),n.addComponent(n.misc_component),n.addComponent(n.topo_shape_component),n.m_default_ax2=new d.g(new u.Pq0(0,0,0),e.fixed_direction),n.geoms=new a.b("Geoms"),n.constraints=new a.b("Constraints"),n.addChild(n.geoms),n.addChild(n.constraints),n.sketchObject=new parapoly_engine.SketchObject,n.toPoint=new parapoly_engine.Vector3,n}return j(e,t),e.prototype.clear_topo_shape_component=function(){this.topo_shape_component.clear()},e.prototype.set_building_dirty=function(t){this.misc_component.set_building_dirty(t)},e.prototype.get_building_dirty=function(){return this.misc_component.get_building_dirty()},e.prototype.set_op_feature_node_id=function(t){this.misc_component.set_op_feature_node_id(t)},e.prototype.get_op_feature_node_id=function(){return this.misc_component.get_op_feature_node_id()},e.prototype.set_dirty=function(t){this.info_component.set_dirty(t)},e.prototype.get_dirty=function(){return this.info_component.get_dirty()},e.prototype.get_sketch_object=function(){return this.sketchObject},e.prototype.move_point=function(t,e,o,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),o){this.toPoint.set(o.x,o.y,o.z);var i=this.sketchObject.movePoint(t,e,this.toPoint,n,r);console.log("move_point ret:",i)}},e.prototype.solve=function(t){void 0===t&&(t=!1),this.sketchObject&&this.sketchObject.solve(t)},e.prototype.clear=function(){var t=this.get_geoms(),e=this.get_constraints();t.clearChildren(),e.clearChildren(),this.sketchObject=new parapoly_engine.SketchObject},e.prototype.sync_geoms_data=function(){if(this.sketchObject){var t=this.get_geoms(),e=this.get_constraints();t.clearChildren(),e.clearChildren();var o=this.sketchObject.getCompleteGeometryArray(),n=o.getCount();console.log("============sync geoms cnt:",n);for(var r=0;r<n;r++){var i=o.getValue(r),s=i.getName();i=this.convert_native_geom_type(i);var a=void 0;switch(s){case P.w.ParaPolyGeom_Point:a=new m.N;break;case P.w.ParaPolyGeom_Line:a=new g.l;break;case P.w.ParaPolyGeom_Arc:a=new v.n;break;case P.w.ParaPolyGeom_Circle:a=new w.n;break;case P.w.ParaPolyGeom_Ellipse:case P.w.ParaPolyGeom_ArcOfEllipse:a=new b.B;break;case P.w.ParaPolyGeom_BSpline:a=new C.w}a?(a.set_geom_id(r),a.update_value_from_geom_native(i),t.addChild(a),i.setId(a.getId()),a.get_geom_native().setGeomId(r)):console.warn("sync_geoms_data: geom_node is null",s,r)}}else console.error("sync_geoms_data: sketchObject is null")},e.prototype.update_geoms_data=function(t){if(void 0===t&&(t=!1),this.sketchObject){if(t)this.sync_geoms_data();else{var e=this.get_geoms(),o=this.sketchObject.getCompleteGeometryArray(),n=o.getCount();console.log("============geoms cnt:",n);for(var r=0;r<n;r++){var i=o.getValue(r),s=i.getId(),a=i.getName();i=this.convert_native_geom_type(i);var c=e.getChildById(s);if(c){if(c){console.log("geom id:",s,a);var u=c.get_geom_id();i||console.warn("update_geoms_data: geom_native is null",a,r,u,s),u!=r&&console.warn("update_geoms_data: geom_id != i",u,r),c.update_value_from_geom_native(i)}}else console.warn("update_geoms_data: geom_node is null",a,r,s)}}var _=this.get_constraints();_.clearChildren();var p=this.sketchObject.getConstraintCount();console.log("============constraint cnt:",p);for(r=0;r<p;r++){var l=this.sketchObject.getConstraint(r),h=this.constraintToJson(l),d=new f.W;d.set_constraint(h),_.addChild(d)}}else console.error("update_geoms_data: sketchObject is null")},e.prototype.convert_native_geom_type=function(t){if(t){var e=t.getName();switch(e){case P.w.ParaPolyGeom_Point:return parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_Point(t);case P.w.ParaPolyGeom_Line:return parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_Line(t);case P.w.ParaPolyGeom_Arc:return parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_Arc(t);case P.w.ParaPolyGeom_Circle:return parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_Circle(t);case P.w.ParaPolyGeom_Ellipse:return parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_Ellipse(t);case P.w.ParaPolyGeom_ArcOfEllipse:return parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_ArcOfEllipse(t);case P.w.ParaPolyGeom_BSpline:return parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_BSpline(t)}console.warn("convert_native_geom_type: unknown geom type:",e)}},e.prototype.bspline_exposeInternalGeometry=function(t){this.sketchObject&&this.sketchObject.exposeInternalGeometry(t)},e.prototype.get_geom_node_by_geom_id=function(t){var e=this.get_geoms();if(e)for(var o=0;o<e.getChildrenLength();o++){var n=e.getChildByIndex(o);if(n.get_geom_id()==t)return n}},e.prototype.get_geom_node_by_id=function(t){var e=this.get_geoms();if(e)return e.getChildById(t)},e.prototype.add_geom_node=function(t,e){if(void 0===e&&(e=!0),t){var o=t.getId();e&&this.geoms.addChild(t);var n=t.get_geom_native();if(n){var r=this.sketchObject.addGeometry(n);r<0&&console.error("add_geom_node: geom_id < 0"),t.set_geom_id(r),n.setGeomId(r)}else console.error("add_geom_node: native_geom is null",o)}},e.prototype.remove_geom_node=function(t){if(t){var e=t.get_geom_id();this.geoms.removeChild(t);var o=t.get_geom_native();if(o)o.getGeomId()!=e&&console.warn("remove_geom_node: geom_id_native != geom_id");else console.warn("remove_geom_node: native_geom is null");console.log("remove_geom_node:",e);var n=new parapoly_engine.ParaPolyIntArray;n.pushValue(e);var r=this.sketchObject.delGeometriesArray(n);console.log("remove_geom_node: ret:",r)}},e.prototype.get_geoms=function(){return this.geoms},e.prototype.get_constraints=function(){return this.constraints},e.prototype.get_plane=function(){var t=this.ax2_component.get_direction();return new u.Zcv(t,0)},e.transform_native_shape=function(t,e){if(!t||t.isNull()||!e)return null;var o=e.get_ax2_transform(),n=new u.Pq0,r=new u.PTz,i=new u.Pq0;return o.decompose(n,r,i),t.rotate(r.x,r.y,r.z,r.w),t},e.prototype.get_ax2_transform=function(t){void 0===t&&(t=!1);var e=this.ax2_component.get_center(),o=this.ax2_component.get_direction(),n=new d.g(e,o),r=d.g.getRotationBetween(this.m_default_ax2,n),i=new u.kn4,s=new u.Pq0(1,1,1);return i.compose(e,r,s),t&&(i=i.invert()),i},e.prototype.get_archived=function(){return this.topo_shape_component.get_archived()},e.prototype.set_archived=function(t){this.topo_shape_component.set_archived(t)},e.prototype.get_visible=function(){return this.info_component.get_visible()},e.prototype.set_visible=function(t){this.info_component.set_visible(t)},e.prototype.run=function(){return F(this,arguments,void 0,function(t){return void 0===t&&(t=null),T(this,function(t){return this.make_topo_shape(),[2]})})},e.prototype.get_running_state=function(){var t;return null===(t=this.misc_component)||void 0===t?void 0:t.get_running_state()},e.prototype.set_running_state=function(t){this.misc_component.set_running_state(t)},e.prototype.to_wires_shape=function(){var t=this.get_label()||this.getId(),e=this.convertToNativeSketchNode(t);return parapoly_engine.ParaPolyShapeMaker.to_wires_shape(e)},e.prototype.make_topo_shape=function(){var t=this.to_wires_shape();t&&!t.isNull()?this.set_topo_shape(t):console.log("wires_shape is null")},e.prototype.set_tessellated=function(t){this.topo_shape_component.set_tessellated(t)},e.prototype.get_topo_shape_component=function(){return this.topo_shape_component},e.prototype.set_topo_shape=function(t){this.topo_shape_component.set_topo_shape(t)},e.prototype.get_topo_shape=function(){return this.topo_shape_component.get_topo_shape()},e.prototype.get_ax2_component=function(){return this.ax2_component},e.prototype.set_label=function(t){this.info_component.set_label(t)},e.prototype.get_label=function(){return this.info_component.get_label()},e.prototype.set_ax2=function(t,e){this.ax2_component.set_center(t),this.ax2_component.set_direction(e)},e.prototype.get_ax2=function(){return{center:this.ax2_component.get_center(),direction:this.ax2_component.get_direction()}},e.prototype.set_color=function(t){var e=new u.Q1f(t);this.material_component.set_base_color(e)},e.prototype.get_color=function(){return this.material_component.get_base_color().getHexString()},e.prototype.convertToNativeSketchNode=function(t){var e=new parapoly_engine.ParaPolyNode(t),o=this.get_geoms();if(!o)return e;for(var n=0;n<o.getChildrenLength();n++){var r=o.getChildByIndex(n);if(r){var i=r.get_geom_topo_native();if(i){var s=i.getInternal(),a=i.getIsConstruction();if(!s&&!a){var c=new parapoly_engine.ParaPolyNode(t+"_"+n);c.addComponent(i),e.addChild(c)}}}}return e},e.prototype.to_json=function(e){return void 0===e&&(e=null),t.prototype.to_json.call(this,e)},e.prototype.export_to_dxf_or_svg=function(t){void 0===t&&(t="dxf");var e,o=this.sketchObject.getCompleteGeometryArray(),n=new parapoly_engine.ParaPolyGeomArray,r=o.getCount();console.log("export_to_dxf_or_svg cnt:",r);for(var i=0;i<r;i++){var s=o.getValue(i),a=s.getInternal(),c=s.getIsConstruction();console.log("is_internal:",i,a,c),a||c||n.pushValue(s)}if("dxf"==t){var u=(new S.i).export(n);e=k.J.nativeCharArrayToString(u)}else{e=(new E.k).export(n)}return e},e.prototype.create_geom_node_by_native_geom=function(t){if(t){var e=null;switch(t.getName()){case P.w.ParaPolyGeom_Point:var o=parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_Point(t);(e=new m.N).update_value_from_geom_native(o);break;case P.w.ParaPolyGeom_Line:o=parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_Line(t);(e=new g.l).update_value_from_geom_native(o);break;case P.w.ParaPolyGeom_Arc:o=parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_Arc(t);(e=new v.n).update_value_from_geom_native(o);break;case P.w.ParaPolyGeom_Circle:o=parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_Circle(t);(e=new w.n).update_value_from_geom_native(o);break;case P.w.ParaPolyGeom_Ellipse:o=parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_Ellipse(t);(e=new b.B).update_value_from_geom_native(o);break;case P.w.ParaPolyGeom_BSpline:o=parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_BSpline(t);(e=new C.w).update_value_from_geom_native(o)}return e}},e.prototype.load_from_svg=function(t){if(t){this.clear();var e=(new N.I).load(t);if(e){for(var o=e.getCount(),n=new parapoly_engine.ParaPolyIntArray,r=0;r<o;r++){var i=e.getValue(r),s=this.create_geom_node_by_native_geom(i);if(s){this.add_geom_node(s);var a=s.get_geom_id();n.pushValue(a)}}var c=new g.l;c.set_values(new u.Pq0(0,0,0),new u.Pq0(1,0,0),new u.Pq0(0,0,1)),this.add_geom_node(c);var _=c.get_geom_id();this.sketchObject.symmetricCopy(n,_),n.pushValue(_),this.sketchObject.delGeometriesArray(n),this.sync_geoms_data()}}},e.prototype.load_from_dxf=function(t){if(t){this.clear();var e=new O.U;e.load(t);var o=e.native_loader,n=o.getGeomCnt();console.log("load_from_dxf cnt:",n);for(var r=0;r<n;r++){var i=o.getGeomByIndex(r),s=this.create_geom_node_by_native_geom(i);s&&this.add_geom_node(s)}}},e.prototype.constraintToJson=function(t){if(t)return{Value:t.getValue(),Type:t.getType(),AlignmentType:t.getAlignmentType(),Name:t.getName(),First:t.getFirst(),FirstPos:t.getFirstPos(),Second:t.getSecond(),SecondPos:t.getSecondPos(),Third:t.getThird(),ThirdPos:t.getThirdPos(),LabelDistance:t.getLabelDistance(),LabelPosition:t.getLabelPosition(),isDriving:t.getDriving(),InternalAlignmentIndex:t.getInternalAlignmentIndex(),isInVirtualSpace:t.getInVirtualSpace(),isActive:t.getActive(),mId:t.getId()}},e.prototype.read_from_json=function(e,o){if(e){if(t.prototype.read_from_json.call(this,e,o),this.info_component=this.getComponentByClassName(c.Z.InfoComponent),this.ax2_component=this.getComponentByClassName(c.Z.Ax2Component),this.material_component=this.getComponentByClassName(c.Z.MaterialComponent),this.misc_component=this.getComponentByClassName(c.Z.FeatureMiscComponent),this.topo_shape_component=this.getComponentByClassName(c.Z.TopoShapeComponent),this.sketchObject=new parapoly_engine.SketchObject,this.geoms=this.getChildByName("Geoms"),this.geoms)for(var n=0;n<this.geoms.getChildrenLength();n++){(r=this.geoms.getChildByIndex(n))&&this.add_geom_node(r,!1)}if(this.constraints=this.getChildByName("Constraints"),this.constraints)for(n=0;n<this.constraints.getChildrenLength();n++){var r;if(r=this.constraints.getChildByIndex(n)){var i=r.component;i&&this.add_constraint(i)}}}},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),s.X.register(c.Z.SkContainerNode,e.create,t)},e.prototype.add_constraint_coincident=function(t,e,o,n){var r={Type:x.uF.Coincident,First:o,FirstPos:n,Second:t,SecondPos:e};if(!this.sketchObject.isP1P2CoincidentConstraint(r.First,(0,y.u0)(r.FirstPos),r.Second,(0,y.u0)(r.SecondPos)))return this.add_constraint(r);console.error("can't add redundant constraint:",r)},e.prototype.add_constraint_distance_point_to_point=function(t,e,o,n,r){var i={Type:x.uF.Distance,First:t,FirstPos:e,Second:o,SecondPos:n,Value:r};return this.add_constraint(i)},e.prototype.add_constraint_distance_line=function(t,e){var o={Type:x.uF.Distance,First:t,Value:e};return this.add_constraint(o)},e.prototype.add_constraint_distance_point_to_line=function(t,e,o,n){var r={Type:x.uF.Distance,First:t,FirstPos:e,Second:o,Value:n};return this.add_constraint(r)},e.prototype.add_constraint_distance_h_line=function(t,e){var o={Type:x.uF.DistanceX,First:t,Value:e};return this.add_constraint(o)},e.prototype.add_constraint_distance_h_point_to_point=function(t,e,o){var n={Type:x.uF.DistanceX,First:t,FirstPos:x.lg.start,Second:e,SecondPos:x.lg.start,Value:o};return this.add_constraint(n)},e.prototype.add_constraint_distance_h_advanced=function(t,e,o,n,r){var i={Type:x.uF.DistanceX,First:t,FirstPos:e,Second:o,SecondPos:n,Value:r};return this.add_constraint(i)},e.prototype.add_constraint_distance_h_point_on_fixed_x=function(t,e,o){var n={Type:x.uF.DistanceX,First:t,FirstPos:e,Value:o};return this.add_constraint(n)},e.prototype.add_constraint_distance_v_line=function(t,e){var o={Type:x.uF.DistanceY,First:t,Value:e};return this.add_constraint(o)},e.prototype.add_constraint_distance_v_point_to_point=function(t,e,o){var n={Type:x.uF.DistanceY,First:t,FirstPos:x.lg.start,Second:e,SecondPos:x.lg.start,Value:o};return this.add_constraint(n)},e.prototype.add_constraint_distance_v_advanced=function(t,e,o,n,r){var i={Type:x.uF.DistanceY,First:t,FirstPos:e,Second:o,SecondPos:n,Value:r};return this.add_constraint(i)},e.prototype.add_constraint_distance_v_point_on_fixed_y=function(t,e,o){var n={Type:x.uF.DistanceY,First:t,FirstPos:e,Value:o};return this.add_constraint(n)},e.prototype.add_constraint_distance_circle_to_circle=function(t,e,o){var n={Type:x.uF.Distance,First:t,Second:e,Value:o};return this.add_constraint(n)},e.prototype.add_constraint_distance_ellipse_to_ellipse=function(t,e,o){return this.add_constraint_distance_circle_to_circle(t,e,o)},e.prototype.add_constraint_radius=function(t,e){var o={Type:x.uF.Radius,First:t,Value:e};return this.add_constraint(o)},e.prototype.add_constraint_diameter=function(t,e){var o={Type:x.uF.Diameter,First:t,Value:e};return this.add_constraint(o)},e.prototype.add_constraint_parallel_line_to_line=function(t,e){var o={Type:x.uF.Parallel,First:t,Second:e};return this.add_constraint(o)},e.prototype.add_constraint_horizontal_line=function(t){var e={Type:x.uF.Horizontal,First:t};return this.add_constraint(e)},e.prototype.add_constraint_horizontal_point_to_point=function(t,e,o,n){var r={Type:x.uF.Horizontal,First:t,FirstPos:e,Second:o,SecondPos:n};return this.add_constraint(r)},e.prototype.add_constraint_vertical_line=function(t){var e={Type:x.uF.Vertical,First:t};return this.add_constraint(e)},e.prototype.add_constraint_vertical_point_to_point=function(t,e,o,n){var r={Type:x.uF.Vertical,First:t,FirstPos:e,Second:o,SecondPos:n};return this.add_constraint(r)},e.prototype.add_constraint_equal=function(t,e){var o={Type:x.uF.Equal,First:t,Second:e};return this.add_constraint(o)},e.prototype.add_constraint_perpendicular_line_to_line=function(t,e){var o={Type:x.uF.Perpendicular,First:t,Second:e};return this.add_constraint(o)},e.prototype.add_constraint_symmetric_point_line_point=function(t,e,o,n,r){var i={Type:x.uF.Symmetric,First:t,FirstPos:e,Second:n,SecondPos:r,Third:o};return this.add_constraint(i)},e.prototype.add_constraint_symmetric_point_point_point=function(t,e,o,n,r,i){var s={Type:x.uF.Symmetric,First:t,FirstPos:e,Second:r,SecondPos:i,Third:o,ThirdPos:n};return this.add_constraint(s)},e.prototype.add_constraint_angle_line=function(t,e){var o={Type:x.uF.Angle,First:t,Value:e};return this.add_constraint(o)},e.prototype.add_constraint_angle_line_to_line=function(t,e,o){var n={Type:x.uF.Angle,First:t,Second:e,Value:o};return this.add_constraint(n)},e.prototype.add_constraint_angle_line_to_line_with_point=function(t,e,o,n,r){var i={Type:x.uF.Angle,First:t,FirstPos:e,Second:o,SecondPos:n,Value:r};return this.add_constraint(i)},e.prototype.add_constraint_angle_advanced=function(t,e,o,n,r,i,s){var a={Type:x.uF.Angle,First:t,FirstPos:e,Second:o,SecondPos:n,Third:r,ThirdPos:i,Value:s};return this.add_constraint(a)},e.prototype.add_constraint_tangent=function(t,e){var o={Type:x.uF.Tangent,First:t,Second:e};return this.add_constraint(o)},e.prototype.add_constraint_tangent_advanced=function(t,e,o,n,r,i){void 0===r&&(r=null),void 0===i&&(i=x.lg.none);var s={Type:x.uF.Tangent,First:t,FirstPos:e,Second:o,SecondPos:n,Third:r,ThirdPos:i};return this.add_constraint(s)},e.prototype.add_constraint_point_on_object=function(t,e,o){var n={Type:x.uF.PointOnObject,First:t,FirstPos:e,Second:o};return this.add_constraint(n)},e.prototype.add_constraint_point_on_bspline=function(t,e,o,n){var r={Type:x.uF.PointOnObject,First:t,FirstPos:e,Second:o,Value:n};return this.add_constraint(r)},e.prototype.add_constraint_control_point_to_bspline=function(t,e,o,n){var r={Type:x.uF.InternalAlignment,AlignmentType:x.XP.BSplineControlPoint,First:t,FirstPos:e,Second:o,InternalAlignmentIndex:n};return this.add_constraint(r)},e.prototype.add_constraint_knot_point_to_bspline=function(t,e,o,n){var r={Type:x.uF.InternalAlignment,AlignmentType:x.XP.BSplineKnotPoint,First:t,FirstPos:e,Second:o,InternalAlignmentIndex:n};return this.add_constraint(r)},e.prototype.isEmpty=function(t){return null==t||null==t},e.prototype.remove_constraints=function(t,e){void 0===e&&(e=!0),t=t||[];for(var o=new parapoly_engine.ParaPolyIntArray,n=0;n<t.length;n++)o.pushValue(t[n]);this.sketchObject.delConstraintsArray(o,e)},e.prototype.add_constraint=function(t){t=t||{};var e=new parapoly_engine.ConstraintObject;return this.isEmpty(t.Value)||e.setValue(t.Value),this.isEmpty(t.Type)||e.setType(t.Type),this.isEmpty(t.AlignmentType)||e.setAlignmentType(t.AlignmentType),this.isEmpty(t.Name)||e.setName(t.Name),this.isEmpty(t.First)||e.setFirst(t.First),this.isEmpty(t.FirstPos)||e.setFirstPos(t.FirstPos),this.isEmpty(t.Second)||e.setSecond(t.Second),this.isEmpty(t.SecondPos)||e.setSecondPos(t.SecondPos),this.isEmpty(t.Third)||e.setThird(t.Third),this.isEmpty(t.ThirdPos)||e.setThirdPos(t.ThirdPos),this.isEmpty(t.LabelDistance)||e.setLabelDistance(t.LabelDistance),this.isEmpty(t.LabelPosition)||e.setLabelPosition(t.LabelPosition),this.isEmpty(t.isDriving)||e.setDriving(t.isDriving),this.isEmpty(t.InternalAlignmentIndex)||e.setInternalAlignmentIndex(t.InternalAlignmentIndex),this.isEmpty(t.isInVirtualSpace)||e.setInVirtualSpace(t.isInVirtualSpace),this.isEmpty(t.isActive)||e.setActive(t.isActive),this.isEmpty(t.mId)||e.setId(t.mId),this.sketchObject.addConstraint(e)},e.fixed_direction=new u.Pq0(0,0,1),e}(a.b)},9471:(t,e,o)=>{var n,r,i,s;o.d(e,{XC:()=>i,XP:()=>r,lg:()=>s,uF:()=>n}),function(t){t[t.None=0]="None",t[t.Coincident=1]="Coincident",t[t.Horizontal=2]="Horizontal",t[t.Vertical=3]="Vertical",t[t.Parallel=4]="Parallel",t[t.Tangent=5]="Tangent",t[t.Distance=6]="Distance",t[t.DistanceX=7]="DistanceX",t[t.DistanceY=8]="DistanceY",t[t.Angle=9]="Angle",t[t.Perpendicular=10]="Perpendicular",t[t.Radius=11]="Radius",t[t.Equal=12]="Equal",t[t.PointOnObject=13]="PointOnObject",t[t.Symmetric=14]="Symmetric",t[t.InternalAlignment=15]="InternalAlignment",t[t.SnellsLaw=16]="SnellsLaw",t[t.Block=17]="Block",t[t.Diameter=18]="Diameter",t[t.Weight=19]="Weight",t[t.NumConstraintTypes=20]="NumConstraintTypes"}(n||(n={})),function(t){t[t.Undef=0]="Undef",t[t.EllipseMajorDiameter=1]="EllipseMajorDiameter",t[t.EllipseMinorDiameter=2]="EllipseMinorDiameter",t[t.EllipseFocus1=3]="EllipseFocus1",t[t.EllipseFocus2=4]="EllipseFocus2",t[t.HyperbolaMajor=5]="HyperbolaMajor",t[t.HyperbolaMinor=6]="HyperbolaMinor",t[t.HyperbolaFocus=7]="HyperbolaFocus",t[t.ParabolaFocus=8]="ParabolaFocus",t[t.BSplineControlPoint=9]="BSplineControlPoint",t[t.BSplineKnotPoint=10]="BSplineKnotPoint",t[t.ParabolaFocalAxis=11]="ParabolaFocalAxis",t[t.NumInternalAlignmentType=12]="NumInternalAlignmentType"}(r||(r={})),function(t){t[t.RtPnt=-1]="RtPnt",t[t.HAxis=-1]="HAxis",t[t.VAxis=-2]="VAxis",t[t.RefExt=-3]="RefExt",t[t.GeoUndef=-2e3]="GeoUndef"}(i||(i={})),function(t){t[t.none=0]="none",t[t.start=1]="start",t[t.end=2]="end",t[t.mid=3]="mid"}(s||(s={}))},9506:(t,e,o)=>{o.d(e,{t:()=>u});var n,r=o(347),i=o(7160),s=o(8268),a=o(631),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.radius1=10,e.radius2=.5,e.className=i.Z.FeatureSetTorusComponent,e.feature_type=a.y.FeatureSetTorus,e}return c(e,t),e.prototype.set_radius1=function(t){this.radius1=t},e.prototype.get_radius1=function(){return this.radius1},e.prototype.set_radius2=function(t){this.radius2=t},e.prototype.get_radius2=function(){return this.radius2},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.radius1=this.radius1,o.radius2=this.radius2,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.radius1=e.radius1,this.radius2=e.radius2)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.FeatureSetTorusComponent,e.create,t)},e}(s.x)},9757:(t,e,o)=>{o.d(e,{W:()=>u});var n,r=o(347),i=o(7160),s=o(2444),a=o(5361),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.start_point=new a.Pq0(0,0,0),e.end_point=new a.Pq0(1,1,0),e.direction=s.T.default_geom_direction_in_sketch.clone(),e.className=i.Z.SkGeomLineComponent,e}return c(e,t),e.prototype.set_start_point=function(t){this.start_point.copy(t)},e.prototype.get_start_point=function(){return this.start_point},e.prototype.set_end_point=function(t){this.end_point.copy(t)},e.prototype.get_end_point=function(){return this.end_point},e.prototype.set_direction=function(t){this.direction.copy(t)},e.prototype.get_direction=function(){return this.direction},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.start_point=this.start_point.toArray(),o.end_point=this.end_point.toArray(),o.direction=this.direction.toArray(),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.start_point.fromArray(e.start_point),this.end_point.fromArray(e.end_point),this.direction.fromArray(e.direction))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.SkGeomLineComponent,e.create,t)},e}(s.T)},9856:(t,e,o)=>{o.d(e,{n:()=>_});var n,r=o(5841),i=o(347),s=o(7160),a=o(5361),c=o(5255),u=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),_=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=s.Z.SkGeomArcNode,o.component=new r.k,o.addComponent(o.component),o.create_geom_native(),o}return u(e,t),e.prototype.set_values=function(t,e,o,n,r){this.component.set_center(t),this.component.set_radius(e),this.component.set_start_angle(o),this.component.set_end_angle(n),this.component.set_direction(r),this.write_to_geom_native()},e.prototype.update_value_from_geom_native=function(e){t.prototype.update_value_from_geom_native.call(this,e),e||console.error("SkGeomArcNode update_value_from_geom_native geom_native is null");var o=e.getCenter(),n=e.getRadius(),r=e.getStartAngle(),i=e.getEndAngle(),s=e.getDirection();this.set_values(new a.Pq0(o.x,o.y,o.z),n,r,i,new a.Pq0(s.x,s.y,s.z))},e.prototype.create_geom_native=function(){var t=new parapoly_engine.ParaPolyGeom_Arc;t.setId(this.id),this.geom_native=t;var e=new parapoly_engine.ParaPolyGeom_Topo_Arc;e.setId(this.id),this.geom_topo_native=e},e.prototype.write_to_geom_native=function(){if(this.geom_native){var t=this.component.get_center(),e=this.component.get_radius(),o=this.component.get_start_angle(),n=this.component.get_end_angle(),r=this.component.get_direction(),i=new parapoly_engine.Vector3(t.x,t.y,t.z),s=new parapoly_engine.Vector3(r.x,r.y,r.z);this.geom_native.set(i,e,o,n,s),this.geom_topo_native.set(i,e,o,n,s);var a=this.getId();this.geom_native.setId(a),this.geom_topo_native.setId(a)}},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(s.Z.SkGeomArcComponent),this.write_to_geom_native())},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),i.X.register(s.Z.SkGeomArcNode,e.create,t)},e}(c.i)},9985:(t,e,o)=>{o.d(e,{k:()=>u});var n,r=o(347),i=o(7160),s=o(8268),a=o(631),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.radius=1,e.height=10,e.className=i.Z.FeatureSetCylinderComponent,e.feature_type=a.y.FeatureSetCylinder,e}return c(e,t),e.prototype.set_radius=function(t){this.radius=t},e.prototype.get_radius=function(){return this.radius},e.prototype.set_height=function(t){this.height=t},e.prototype.get_height=function(){return this.height},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.radius=this.radius,o.height=this.height,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.radius=e.radius,this.height=e.height)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.FeatureSetCylinderComponent,e.create,t)},e}(s.x)}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var o=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](o,o.exports,__webpack_require__),o.exports}__webpack_require__.d=(t,e)=>{for(var o in e)__webpack_require__.o(e,o)&&!__webpack_require__.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{AmbientLightComponent:()=>AmbientLightComponent,ArMediaInputTypes:()=>ArMediaInputTypes,ArScreenAspectRatioTypes:()=>ArScreenAspectRatioTypes,AssimpExporter:()=>AssimpExporter,Ax2:()=>Ax2.g,Ax2Component:()=>Ax2Component.v,BSplineHelper:()=>BSplineHelper.a,BaseEditorResource:()=>BaseEditorResource.v,BaseResource:()=>BaseResource.Q,Block3dEditorResource:()=>Block3dEditorResource.k,BlockCodeComponent:()=>BlockCodeComponent,BooleanComponent:()=>BooleanComponent.A,BooleanTypes:()=>BooleanTypes.E,BoxMeshComponent:()=>BoxMeshComponent,Camera3dComponent:()=>Camera3dComponent,ClassFactory:()=>ClassFactory.X,ClassNames:()=>ClassNames.Z,Code3dBundler:()=>Code3dBundler,Code3dModuleExecutor:()=>Code3dModuleExecutor,Code3dModuleResolver:()=>Code3dModuleResolver,Code3dResource:()=>Code3dResource,Code3dStaticAnalyzer:()=>Code3dStaticAnalyzer,CodeTypeExtensions:()=>CodeTypes.K1,CodeTypes:()=>CodeTypes.f7,Component:()=>Component.u,ComponentEvent:()=>Component.O,ConstraintType:()=>Constraint.uF,DirectionTypes:()=>DirectionTypes.T,DirectionalLightComponent:()=>DirectionalLightComponent,DisplayMode:()=>DisplayMode,DxfExporter:()=>DxfExporter.i,DxfLoader:()=>DxfLoader.U,EditorEditMode:()=>EditorEditMode,EditorEventInput:()=>EditorEventInput,EditorEventInput_check_file_exist:()=>EditorEventInput_check_file_exist,EditorEventInput_delete_file:()=>EditorEventInput_delete_file,EditorEventInput_duplicate_file:()=>EditorEventInput_duplicate_file,EditorEventInput_file_list:()=>EditorEventInput_file_list,EditorEventInput_load_document:()=>EditorEventInput_load_document,EditorEventInput_load_file:()=>EditorEventInput_load_file,EditorEventInput_load_json:()=>EditorEventInput_load_json,EditorEventInput_move_files:()=>EditorEventInput_move_files,EditorEventInput_new_file:()=>EditorEventInput_new_file,EditorEventInput_paste_file:()=>EditorEventInput_paste_file,EditorEventInput_rename_file:()=>EditorEventInput_rename_file,EditorEventInput_save_document:()=>EditorEventInput_save_document,EditorEventInput_save_file:()=>EditorEventInput_save_file,EditorEventInput_save_json:()=>EditorEventInput_save_json,EditorEventManager:()=>EditorEventManager,EditorEventOutput:()=>EditorEventOutput,EditorEventOutput_check_file_exist:()=>EditorEventOutput_check_file_exist,EditorEventOutput_delete_file:()=>EditorEventOutput_delete_file,EditorEventOutput_duplicate_file:()=>EditorEventOutput_duplicate_file,EditorEventOutput_file_list:()=>EditorEventOutput_file_list,EditorEventOutput_load_document:()=>EditorEventOutput_load_document,EditorEventOutput_load_file:()=>EditorEventOutput_load_file,EditorEventOutput_load_json:()=>EditorEventOutput_load_json,EditorEventOutput_move_files:()=>EditorEventOutput_move_files,EditorEventOutput_new_file:()=>EditorEventOutput_new_file,EditorEventOutput_paste_file:()=>EditorEventOutput_paste_file,EditorEventOutput_rename_file:()=>EditorEventOutput_rename_file,EditorEventOutput_save_document:()=>EditorEventOutput_save_document,EditorEventOutput_save_file:()=>EditorEventOutput_save_file,EditorEventOutput_save_json:()=>EditorEventOutput_save_json,EditorEventTypes:()=>EditorEventTypes,EditorEventTypesList:()=>EditorEventTypesList,EventDispatcher:()=>EventDispatcher,FeatureBaseComponent:()=>FeatureBaseComponent.x,FeatureBooleanComponent:()=>FeatureBooleanComponent,FeatureChamferComponent:()=>FeatureChamferComponent,FeatureContainerNode:()=>FeatureContainerNode,FeatureDeleteComponent:()=>FeatureDeleteComponent,FeatureDraftComponent:()=>FeatureDraftComponent,FeatureExtrudeComponent:()=>FeatureExtrudeComponent,FeatureFilletComponent:()=>FeatureFilletComponent,FeatureHelixComponent:()=>FeatureHelixComponent,FeatureInspectorFactory:()=>FeatureInspectorFactory,FeatureMirrorComponent:()=>FeatureMirrorComponent,FeatureMiscComponent:()=>FeatureMiscComponent.e,FeatureNodeBase:()=>FeatureNodeBase.o,FeatureNodeBoolean:()=>FeatureNodeBoolean,FeatureNodeChamfer:()=>FeatureNodeChamfer,FeatureNodeDelete:()=>FeatureNodeDelete,FeatureNodeDraft:()=>FeatureNodeDraft,FeatureNodeExtrude:()=>FeatureNodeExtrude,FeatureNodeFillet:()=>FeatureNodeFillet,FeatureNodeHelix:()=>FeatureNodeHelix,FeatureNodeMirror:()=>FeatureNodeMirror,FeatureNodeRevolve:()=>FeatureNodeRevolve,FeatureNodeSetBox:()=>FeatureNodeSetBox.I,FeatureNodeSetCone:()=>FeatureNodeSetCone._,FeatureNodeSetCylinder:()=>FeatureNodeSetCylinder.l,FeatureNodeSetEllipsoid:()=>FeatureNodeSetEllipsoid.a,FeatureNodeSetPrism:()=>FeatureNodeSetPrism.M,FeatureNodeSetSphere:()=>FeatureNodeSetSphere.C,FeatureNodeSetStep:()=>FeatureNodeSetStep,FeatureNodeSetTorus:()=>FeatureNodeSetTorus.Y,FeatureNodeSetTrapezoid:()=>FeatureNodeSetTrapezoid.H,FeatureNodeSetWedge:()=>FeatureNodeSetWedge.H,FeatureNodeShell:()=>FeatureNodeShell,FeatureNodeSweep:()=>FeatureNodeSweep,FeatureNodeTransform:()=>FeatureNodeTransform,FeatureRevolveComponent:()=>FeatureRevolveComponent,FeatureRunningStates:()=>FeatureRunningStates.s,FeatureSetBoxComponent:()=>FeatureSetBoxComponent.R,FeatureSetConeComponent:()=>FeatureSetConeComponent.d,FeatureSetCylinderComponent:()=>FeatureSetCylinderComponent.k,FeatureSetEllipsoidComponent:()=>FeatureSetEllipsoidComponent.P,FeatureSetPrismComponent:()=>FeatureSetPrismComponent.R,FeatureSetSphereComponent:()=>FeatureSetSphereComponent.H,FeatureSetStepComponent:()=>FeatureSetStepComponent,FeatureSetTorusComponent:()=>FeatureSetTorusComponent.t,FeatureSetTrapezoidComponent:()=>FeatureSetTrapezoidComponent.Q,FeatureSetWedgeComponent:()=>FeatureSetWedgeComponent.m,FeatureShellComponent:()=>FeatureShellComponent,FeatureSweepComponent:()=>FeatureSweepComponent,FeatureTopoItem:()=>FeatureTopoItem,FeatureTransformComponent:()=>FeatureTransformComponent,FeatureTypes:()=>FeatureTypes.y,FileOptions:()=>FileOptions,FileProtocol:()=>FileProtocol,GeoEnum:()=>Constraint.XC,GeomTypes:()=>GeomTypes.w,GltfExporter:()=>GltfExporter,Helix_Axis:()=>Helix_Axis,Helix_Mode:()=>Helix_Mode,ImportTypes:()=>ImportTypes,InfoComponent:()=>InfoComponent.S,InspectorFactory:()=>InspectorFactory,InternalAlignmentType:()=>Constraint.XP,LogTypes:()=>LogTypes.U,MaterialComponent:()=>MaterialComponent.n,MemoryFileProvider:()=>MemoryFileProvider,MeshComponent:()=>MeshComponent.F,MeshTypes:()=>MeshTypes.T,MetaComponent:()=>MetaComponent.V,NativeNodeToFeatureNode:()=>NativeNodeToFeatureNode.F,Node:()=>Node.b,ObjectConverter:()=>ObjectConverter.k,OrthographicCameraComponent:()=>OrthographicCameraComponent,ParaPolyRuntimeApp:()=>ParaPolyRuntimeApp,ParaPolyRuntimeAppEvent:()=>ParaPolyRuntimeAppEvent,ParaXExporter:()=>ParaXExporter,Part3dCodeExporter:()=>Part3dCodeExporter,Part3dEditorResource:()=>Part3dEditorResource.c,PartBlock3dDocument:()=>PartBlock3dDocument.z,PartTessellate:()=>PartTessellate.O,PlaneMeshComponent:()=>PlaneMeshComponent,PlaneTypes:()=>PlaneTypes,PlatformTypes:()=>PlatformTypes,PointLightComponent:()=>PointLightComponent,PointPos:()=>Constraint.lg,ProjectTypes:()=>ProjectTypes,ProjectionMode:()=>ProjectionMode,ResourceManager:()=>ResourceManager.Q,ResourcePostfix:()=>ResourceTypes.y,ResourceTypes:()=>ResourceTypes.c,Scene3dCameraControlMode:()=>Scene3dCameraControlMode,Scene3dCameraViewMode:()=>Scene3dCameraViewMode,Scene3dComponent:()=>Scene3dComponent,ScreenRatioList:()=>ScreenRatioList,SelectionMode:()=>SelectionMode,ShapeComponent:()=>ShapeComponent,SkConstraintComponent:()=>SkConstraintComponent.RN,SkConstraintNode:()=>SkConstraintNode.W,SkContainerNode:()=>SkContainerNode.Y,SkGeomArcComponent:()=>SkGeomArcComponent.k,SkGeomArcNode:()=>SkGeomArcNode.n,SkGeomBSplineComponent:()=>SkGeomBSplineComponent.p,SkGeomBSplineNode:()=>SkGeomBSplineNode.w,SkGeomBaseComponent:()=>SkGeomBaseComponent.T,SkGeomBaseNode:()=>SkGeomBaseNode.i,SkGeomCircleComponent:()=>SkGeomCircleComponent.i,SkGeomCircleNode:()=>SkGeomCircleNode.n,SkGeomEllipseComponent:()=>SkGeomEllipseComponent.A,SkGeomEllipseNode:()=>SkGeomEllipseNode.B,SkGeomLineComponent:()=>SkGeomLineComponent.W,SkGeomLineNode:()=>SkGeomLineNode.l,SkGeomPointComponent:()=>SkGeomPointComponent.q,SkGeomPointNode:()=>SkGeomPointNode.N,Sketch3dEditorResource:()=>Sketch3dEditorResource.J,SketchCodeExporter:()=>SketchCodeExporter,SphereMeshComponent:()=>SphereMeshComponent,SplineTypes:()=>SplineTypes.H,SpotLightComponent:()=>SpotLightComponent,Sprite:()=>Sprite,SpriteHelper:()=>SpriteHelper,SpriteToNativeNode:()=>SpriteToNativeNode.S,StepExporter:()=>StepExporter,SvgExporter:()=>SvgExporter.k,SvgLoader:()=>SvgLoader.I,Text2CADFacade:()=>Text2CADFacade,TopoIdTypes:()=>TopoIdTypes,TopoShapeComponent:()=>TopoShapeComponent.t,TransformComponent:()=>TransformComponent.W,Util:()=>Util.J,WorkSpaceSettingComponent:()=>WorkSpaceSettingComponent,buildCode3dProject:()=>buildCode3dProject,codeTypesToArray:()=>CodeTypes.l0,computeOutputFilename:()=>computeOutputFilename,convertInternelTypeToPointPos:()=>SkConstraintComponent.E7,convertPointPosToInternelType:()=>SkConstraintComponent.u0,getCodeTypeLabel:()=>CodeTypes.Oc,get_screen_info_by_ratio_type:()=>get_screen_info_by_ratio_type,register_all_components:()=>register_all_components});var PartBlock3dDocument=__webpack_require__(944),BooleanTypes=__webpack_require__(8297),PlaneTypes;!function(t){t.all="xyz",t.x="x",t.y="y",t.z="z",t.xy="xy",t.xz="xz",t.zy="zy",t.yz="yz"}(PlaneTypes||(PlaneTypes={}));var DirectionTypes=__webpack_require__(6542),Node=__webpack_require__(7885),__assign=function(){return __assign=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},__assign.apply(this,arguments)},__spreadArray=function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||(n||(n=Array.prototype.slice.call(e,0,r)),n[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))};function toBooleanType(t){switch(t){case"union":default:return BooleanTypes.E.union;case"cut":return BooleanTypes.E.difference;case"common":return BooleanTypes.E.intersection}}function toPlaneType(t){switch(t){case"xy":default:return PlaneTypes.xy;case"xz":return PlaneTypes.xz;case"yz":return PlaneTypes.yz}}function toDirectionType(t){switch(t){case"x":return DirectionTypes.T.x;case"y":return DirectionTypes.T.y;default:return DirectionTypes.T.z}}var Text2CADFacade=function(){function t(){this._lastNodeName="",this._parameters=[],this._lastBuildResult=null,this.doc=new PartBlock3dDocument.z("root")}return t.prototype.box=function(t,e,o,n,r){return void 0===r&&(r="#888888"),this.doc.box(toBooleanType(t),e,o,n,r),this._lastNodeName=this._getLastNodeName(),this._lastNodeName},t.prototype.sphere=function(t,e,o){return void 0===o&&(o="#888888"),this.doc.sphere(toBooleanType(t),e,o),this._lastNodeName=this._getLastNodeName(),this._lastNodeName},t.prototype.cylinder=function(t,e,o,n){return void 0===n&&(n="#888888"),this.doc.cylinder(toBooleanType(t),e,o,n),this._lastNodeName=this._getLastNodeName(),this._lastNodeName},t.prototype.cone=function(t,e,o,n,r){return void 0===r&&(r="#888888"),this.doc.cone(toBooleanType(t),e,o,n,r),this._lastNodeName=this._getLastNodeName(),this._lastNodeName},t.prototype.torus=function(t,e,o,n){return void 0===n&&(n="#888888"),this.doc.torus(toBooleanType(t),e,o,n),this._lastNodeName=this._getLastNodeName(),this._lastNodeName},t.prototype.prism=function(t,e,o,n,r){return void 0===r&&(r="#888888"),this.doc.prism(toBooleanType(t),e,o,n,r),this._lastNodeName=this._getLastNodeName(),this._lastNodeName},t.prototype.ellipsoid=function(t,e,o,n,r){return void 0===r&&(r="#888888"),this.doc.ellipsoid(toBooleanType(t),e,o,n,r),this._lastNodeName=this._getLastNodeName(),this._lastNodeName},t.prototype.wedge=function(t,e,o,n,r){return void 0===r&&(r="#888888"),this.doc.wedge(toBooleanType(t),e,o,n,r),this._lastNodeName=this._getLastNodeName(),this._lastNodeName},t.prototype.trapezoid=function(t,e,o,n,r,i){return void 0===i&&(i="#888888"),this.doc.trapezoid(toBooleanType(t),e,o,n,r,i),this._lastNodeName=this._getLastNodeName(),this._lastNodeName},t.prototype.push_group=function(t,e){void 0===e&&(e="#888888"),this.doc.push_node(toBooleanType(t),"",e,!0)},t.prototype.pop_group=function(){this.doc.pop_node()},t.prototype.select=function(t){var e=this.doc.get_root_node().getChildByName(t,!0);return e&&(this.doc.selected_node=e),this},t.prototype.select_last=function(){return this._lastNodeName&&this.select(this._lastNodeName),this},t.prototype.translate=function(t,e,o){return this.doc.translate(t,e,o),this},t.prototype.rotate=function(t,e){return this.doc.rotate(t,e),this},t.prototype.scale=function(t,e,o){return this.doc.scale(t,e,o),this},t.prototype.fillet=function(t,e){return void 0===e&&(e="xy"),this.doc.fillet(t,toPlaneType(e)),this},t.prototype.fillet_edges=function(t,e){return this.doc.fillet_by_edge(t,e),this},t.prototype.chamfer=function(t,e){return void 0===e&&(e="xy"),this.doc.chamfer(t,toPlaneType(e)),this},t.prototype.chamfer_edges=function(t,e){return this.doc.chamfer_by_edge(t,e),this},t.prototype.shell=function(t,e,o){return void 0===e&&(e=0),void 0===o&&(o=!0),this.doc.shell(t,e,o),this},t.prototype.mirror=function(t,e,o){return void 0===o&&(o="#888888"),this.doc.mirror(toBooleanType(t),toPlaneType(e),o),this},t.prototype.begin_sketch=function(t){return void 0===t&&(t="xy"),this.doc.start_sketch("",toPlaneType(t)),this},t.prototype.sk_line=function(t,e,o,n){return this.doc.line_segment(t,e,0,o,n,0),this},t.prototype.sk_circle=function(t,e,o){return this.doc.circle(t,e,0,o),this},t.prototype.sk_arc=function(t,e,o,n,r){return this.doc.arc(t,e,0,o,n,r,!0),this},t.prototype.sk_ellipse=function(t,e,o,n){return this.doc.ellipse(t,e,0,o,n),this},t.prototype.sk_begin_bspline=function(t){return void 0===t&&(t=!1),this.doc.start_bspline(t),this},t.prototype.sk_add_pole=function(t,e){return this.doc.add_pole(t,e,0),this},t.prototype.sk_end_bspline=function(){return this.doc.end_bspline(),this},t.prototype.end_sketch=function(){return this.doc.end_sketch(),this},t.prototype.extrude=function(t,e,o,n){return void 0===o&&(o="#888888"),void 0===n&&(n=!0),this.doc.extrude(toBooleanType(t),e,o,n,[]),this._lastNodeName=this._getLastNodeName(),this},t.prototype.revolve=function(t,e,o,n,r){return void 0===o&&(o="z"),void 0===n&&(n="#888888"),void 0===r&&(r=!0),this.doc.revolve(toBooleanType(t),e,toDirectionType(o),n,r,[]),this._lastNodeName=this._getLastNodeName(),this},t.prototype.param=function(t,e,o){return this._parameters.push(__assign({name:t,value:e,type:"number"==typeof e?"number":"string"},o)),e},t.prototype.param_value=function(t){var e=this._parameters.find(function(e){return e.name===t});if(e)return e.value;throw new Error('Parameter "'.concat(t,'" not found. Register it with doc.param() first.'))},t.prototype.build=function(){var t=this.doc.get_root_node(),e=t.getChildren()||[],o={};if(Node.b.visit_node(t,function(t){t.get_color&&(o[t.getId()]="#"+t.get_color())}),e.length>0){var n=e[0];n.get_color&&t.set_color("#"+n.get_color())}t.get_enabled_op&&(t.set_enabled_op(!0),this.doc.run_node(t),t.set_enabled_op(!1)),this.doc.tessellate();var r=[];return Node.b.visit_node(t,function(t){if(t.get_topo_shape_component){var e=t.get_topo_shape_component();if(e&&(!e.get_archived||!e.get_archived()))for(var o=e.get_facesMesh()||[],n=t.get_color?"#"+t.get_color():"#888888",i=0,s=o;i<s.length;i++){var a=s[i];a.vertices&&a.vertices.length>0&&r.push({vertices:Array.from(a.vertices),normals:Array.from(a.normals),indices:Array.from(a.indices),color:n})}}}),this._lastBuildResult={meshes:r,parameters:__spreadArray([],this._parameters,!0),json:this.doc.to_json()},this._lastBuildResult},t.prototype.getLastBuildResult=function(){return this._lastBuildResult},t.prototype.getDocument=function(){return this.doc},t.prototype._getLastNodeName=function(){var t=this.doc.get_root_node().getChildren();return t.length>0?t[t.length-1].getName():""},t}(),__awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},__generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},EventDispatcher=function(){function t(){this._unique_maps={}}return t.prototype.clear=function(){this._listeners={},this._unique_maps={}},t.prototype.addEventListener=function(t,e,o){void 0===o&&(o=null),void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),o&&this._unique_maps[o]||(-1===n[t].indexOf(e)&&n[t].push(e),o&&(this._unique_maps[o]=e))},t.prototype.hasEventListener=function(t,e){if(void 0===this._listeners)return!1;var o=this._listeners;return void 0!==o[t]&&-1!==o[t].indexOf(e)},t.prototype.removeEventListener=function(t,e){if(void 0!==this._listeners){var o=this._listeners[t];if(void 0!==o){var n=o.indexOf(e);-1!==n&&o.splice(n,1)}}},t.prototype.dispatchEvent=function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var o=e.slice(0),n=0,r=o.length;n<r;n++)o[n].call(this,t);t.target=null}}},t.prototype.asyncDispatchEvent=function(t){return __awaiter(this,void 0,void 0,function(){var e,o,n,r,i;return __generator(this,function(s){switch(s.label){case 0:if(void 0===this._listeners)return[2];if(e=this._listeners,void 0===(o=e[t.type]))return[3,5];t.target=this,n=o.slice(0),r=0,i=n.length,s.label=1;case 1:return r<i?[4,n[r].call(this,t)]:[3,4];case 2:s.sent(),s.label=3;case 3:return r++,[3,1];case 4:t.target=null,s.label=5;case 5:return[2]}})})},t.prototype.hasListener=function(){return this._listeners&&Object.keys(this._listeners).length>0},t}(),ParaPolyRuntimeAppEvent;!function(t){t.on_log="on_log"}(ParaPolyRuntimeAppEvent||(ParaPolyRuntimeAppEvent={}));var ParaPolyRuntimeApp=function(){function t(){this.eventDispatcher=new EventDispatcher,console.log("ParaPolyRuntimeApp constructor")}return Object.defineProperty(t,"instance",{get:function(){return null===t.m_instance&&(t.m_instance=new t),t.m_instance},enumerable:!1,configurable:!0}),t.m_instance=null,t}(),Component=__webpack_require__(6994),Ax2Component=__webpack_require__(4467),BooleanComponent=__webpack_require__(116),ClassFactory=__webpack_require__(347),ClassNames=__webpack_require__(7160),__extends=(extendStatics=function(t,e){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},extendStatics(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),extendStatics,BlockCodeComponent=function(t){function e(){var e=t.call(this)||this;return e.codes={},e.className=ClassNames.Z.BlockCodeComponent,e}return __extends(e,t),e.prototype.set_codes=function(t){this.codes=t},e.prototype.get_codes=function(){return this.codes},e.prototype.setCodesByType=function(t,e){void 0===e&&(e=""),t&&(this.codes[t]=e)},e.prototype.getCodesByType=function(t){if(t)return this.codes[t]},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.codes=Object.assign({},this.codes),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.codes=Object.assign({},e.codes))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.BlockCodeComponent,e.create,t)},e}(Component.u),InfoComponent=__webpack_require__(7308),MaterialComponent=__webpack_require__(5759),MeshComponent=__webpack_require__(3027),MetaComponent=__webpack_require__(8063),ShapeComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),ShapeComponent=function(t){function e(){var e=t.call(this)||this;return e.className=ClassNames.Z.ShapeComponent,e.clear(),e}return ShapeComponent_extends(e,t),e.prototype.clear=function(){this.faces_mesh=[],this.edges_mesh=[],this.points_mesh=[]},e.prototype.get_faces_mesh=function(){return this.faces_mesh},e.prototype.set_faces_mesh=function(t){this.faces_mesh=t},e.prototype.get_edges_mesh=function(){return this.edges_mesh},e.prototype.set_edges_mesh=function(t){this.edges_mesh=t},e.prototype.get_points_mesh=function(){return this.points_mesh},e.prototype.set_points_mesh=function(t){this.points_mesh=t},e.prototype.write_meshes_to_json=function(t,e){var o=[];if(t)for(var n=0,r=t;n<r.length;n++){var i=r[n];o.push(i.to_json(e))}return o},e.prototype.read_meshes_from_json=function(t,e){var o=[];if(t)for(var n=0,r=t;n<r.length;n++){var i=r[n],s=MeshComponent.F.create(i,e);o.push(s)}return o},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.faces_mesh=this.write_meshes_to_json(this.faces_mesh,e),o.edges_mesh=this.write_meshes_to_json(this.edges_mesh,e),o.points_mesh=this.write_meshes_to_json(this.points_mesh,e),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.faces_mesh=this.read_meshes_from_json(e.faces_mesh,o),this.edges_mesh=this.read_meshes_from_json(e.edges_mesh,o),this.points_mesh=this.read_meshes_from_json(e.points_mesh,o))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.ShapeComponent,e.create,t)},e}(Component.u),TransformComponent=__webpack_require__(5556),FeatureBaseComponent=__webpack_require__(8268),FeatureMiscComponent=__webpack_require__(7640),FeatureTypes=__webpack_require__(631),FeatureTopoItem=function(){function t(){this.feature_id="",this.feature_index=-1,this.face_index=-1,this.edge_index=-1,this.vertex_index=-1,this.sketch_index=-1,this.className=ClassNames.Z.FeatureTopoItem}return t.prototype.get_composed_value=function(){return"".concat(this.feature_id,"_").concat(this.face_index,"_").concat(this.edge_index,"_").concat(this.vertex_index,"_").concat(this.sketch_index)},t.prototype.set_feature_id=function(t){this.feature_id=t},t.prototype.get_feature_id=function(){return this.feature_id},t.prototype.set_feature_index=function(t){this.feature_index=t},t.prototype.get_feature_index=function(){return this.feature_index},t.prototype.set_face_index=function(t){this.face_index=t},t.prototype.get_face_index=function(){return this.face_index},t.prototype.set_edge_index=function(t){this.edge_index=t},t.prototype.get_edge_index=function(){return this.edge_index},t.prototype.set_vertex_index=function(t){this.vertex_index=t},t.prototype.get_vertex_index=function(){return this.vertex_index},t.prototype.set_sketch_index=function(t){this.sketch_index=t},t.prototype.get_sketch_index=function(){return this.sketch_index},t.prototype.to_json=function(t){var e={};return e.feature_id=this.feature_id,e.feature_index=this.feature_index,e.face_index=this.face_index,e.edge_index=this.edge_index,e.vertex_index=this.vertex_index,e.sketch_index=this.sketch_index,e},t.prototype.read_from_json=function(t,e){t&&(this.feature_id=t.feature_id,this.feature_index=t.feature_index,this.face_index=t.face_index,this.edge_index=t.edge_index,this.vertex_index=t.vertex_index,this.sketch_index=t.sketch_index)},t.prototype.clone=function(e,o){return t.create(this.to_json(o),e)},t.create=function(e,o){var n=new t;return n.read_from_json(e,o),n},t.register=function(e){void 0===e&&(e=!1),ClassFactory.X.register(ClassNames.Z.FeatureTopoItem,t.create,e)},t}(),FeatureBooleanComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureBooleanComponent=function(t){function e(){var e=t.call(this)||this;return e.target_feature_topo_items=[],e.tool_feature_topo_items=[],e.operation=BooleanTypes.E.union,e.keep_tool=!1,e.className=ClassNames.Z.FeatureBooleanComponent,e.feature_type=FeatureTypes.y.FeatureBoolean,e}return FeatureBooleanComponent_extends(e,t),e.prototype.get_target_feature_topo_items=function(){return this.target_feature_topo_items},e.prototype.set_target_feature_topo_items=function(t){this.target_feature_topo_items=t},e.prototype.get_tool_feature_topo_items=function(){return this.tool_feature_topo_items},e.prototype.set_tool_feature_topo_items=function(t){this.tool_feature_topo_items=t},e.prototype.set_operation=function(t){this.operation=t},e.prototype.get_operation=function(){return this.operation},e.prototype.set_keep_tool=function(t){this.keep_tool=t},e.prototype.get_keep_tool=function(){return this.keep_tool},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.target_part_index_list=this.target_feature_topo_items.map(function(t){return t.to_json(e)}),o.tool_part_index_list=this.tool_feature_topo_items.map(function(t){return t.to_json(e)}),o.operation=this.operation,o.keep_tool=this.keep_tool,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.target_feature_topo_items=e.target_part_index_list.map(function(t){return FeatureTopoItem.create(t,o)}),this.tool_feature_topo_items=e.tool_part_index_list.map(function(t){return FeatureTopoItem.create(t,o)}),this.operation=e.operation,this.keep_tool=e.keep_tool)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureBooleanComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureChamferComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureChamferComponent=function(t){function e(){var e=t.call(this)||this;return e.feature_topo_items=[],e.value=.1,e.className=ClassNames.Z.FeatureChamferComponent,e.feature_type=FeatureTypes.y.FeatureChamfer,e}return FeatureChamferComponent_extends(e,t),e.prototype.get_feature_topo_items=function(){return this.feature_topo_items},e.prototype.set_feature_topo_items=function(t){this.feature_topo_items=t},e.prototype.set_value=function(t){this.value=t},e.prototype.get_value=function(){return this.value},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_topo_items=this.feature_topo_items.map(function(t){return t.to_json(e)}),o.value=this.value,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_topo_items=e.feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.value=e.value)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureChamferComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureDeleteComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureDeleteComponent=function(t){function e(){var e=t.call(this)||this;return e.feature_topo_items=[],e.className=ClassNames.Z.FeatureDeleteComponent,e.feature_type=FeatureTypes.y.FeatureDelete,e}return FeatureDeleteComponent_extends(e,t),e.prototype.get_feature_topo_items=function(){return this.feature_topo_items},e.prototype.set_feature_topo_items=function(t){this.feature_topo_items=t},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_topo_items=this.feature_topo_items.map(function(t){return t.to_json(e)}),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_topo_items=e.feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureDeleteComponent,e.create,t)},e}(FeatureBaseComponent.x),three_core=__webpack_require__(5361),FeatureDraftComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureDraftComponent=function(t){function e(){var e=t.call(this)||this;return e.feature_topo_items=[],e.value=.1,e.reverse=!1,e.center=new three_core.Pq0(0,0,0),e.direction=new three_core.Pq0(0,1,0),e.className=ClassNames.Z.FeatureDraftComponent,e.feature_type=FeatureTypes.y.FeatureDraft,e}return FeatureDraftComponent_extends(e,t),e.prototype.set_feature_topo_items=function(t){this.feature_topo_items=t},e.prototype.get_feature_topo_items=function(){return this.feature_topo_items},e.prototype.set_value=function(t){this.value=t},e.prototype.get_value=function(){return this.value},e.prototype.set_reverse=function(t){this.reverse=t},e.prototype.get_reverse=function(){return this.reverse},e.prototype.set_center=function(t){this.center.copy(t)},e.prototype.get_center=function(){return this.center},e.prototype.set_direction=function(t){this.direction.copy(t)},e.prototype.get_direction=function(){return this.direction},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_topo_items=this.feature_topo_items.map(function(t){return t.to_json(e)}),o.value=this.value,o.reverse=this.reverse,o.center=this.center.toArray(),o.direction=this.direction.toArray(),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_topo_items=e.feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.value=e.value,this.reverse=e.reverse,this.center.fromArray(e.center),this.direction.fromArray(e.direction))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureDraftComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureExtrudeComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureExtrudeComponent=function(t){function e(){var e=t.call(this)||this;return e.feature_topo_items=[],e.value=1,e.solid=!0,e.keep_original=!0,e.direction=new three_core.Pq0(0,1,0),e.className=ClassNames.Z.FeatureExtrudeComponent,e.feature_type=FeatureTypes.y.FeatureExtrude,e}return FeatureExtrudeComponent_extends(e,t),e.prototype.set_feature_topo_items=function(t){this.feature_topo_items=t},e.prototype.get_feature_topo_items=function(){return this.feature_topo_items},e.prototype.set_value=function(t){this.value=t},e.prototype.get_value=function(){return this.value},e.prototype.set_solid=function(t){this.solid=t},e.prototype.get_solid=function(){return this.solid},e.prototype.set_keep_original=function(t){this.keep_original=t},e.prototype.get_keep_original=function(){return this.keep_original},e.prototype.set_direction=function(t){this.direction.copy(t)},e.prototype.get_direction=function(){return this.direction},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_topo_items=this.feature_topo_items.map(function(t){return t.to_json(e)}),o.value=this.value,o.solid=this.solid,o.keep_original=this.keep_original,o.direction=this.direction.toArray(),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_topo_items=e.feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.value=e.value,this.solid=e.solid,this.keep_original=e.keep_original,this.direction.fromArray(e.direction))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureExtrudeComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureFilletComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureFilletComponent=function(t){function e(){var e=t.call(this)||this;return e.feature_topo_items=[],e.value=.1,e.className=ClassNames.Z.FeatureFilletComponent,e.feature_type=FeatureTypes.y.FeatureFillet,e}return FeatureFilletComponent_extends(e,t),e.prototype.get_feature_topo_items=function(){return this.feature_topo_items},e.prototype.set_feature_topo_items=function(t){this.feature_topo_items=t},e.prototype.set_value=function(t){this.value=t},e.prototype.get_value=function(){return this.value},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_topo_items=this.feature_topo_items.map(function(t){return t.to_json(e)}),o.value=this.value,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_topo_items=e.feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.value=e.value)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureFilletComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureHelixComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Helix_Mode,Helix_Axis;!function(t){t[t.PitchHeightAngle=0]="PitchHeightAngle",t[t.PitchTurnsAngle=1]="PitchTurnsAngle",t[t.HeightTurnsAngle=2]="HeightTurnsAngle",t[t.HeightTurnsGrowth=3]="HeightTurnsGrowth"}(Helix_Mode||(Helix_Mode={})),function(t){t[t.NormalSketch=0]="NormalSketch",t[t.VerticalSketch=1]="VerticalSketch",t[t.HorizontalSketch=2]="HorizontalSketch",t[t.BaseX=3]="BaseX",t[t.BaseY=4]="BaseY",t[t.BaseZ=5]="BaseZ"}(Helix_Axis||(Helix_Axis={}));var FeatureHelixComponent=function(t){function e(){var e=t.call(this)||this;return e.feature_topo_items=[],e.mode=Helix_Mode.PitchHeightAngle,e.axis=Helix_Axis.NormalSketch,e.pitch=30,e.height=90,e.angle=0,e.left_hand=!1,e.reversed=!1,e.solid=!0,e.className=ClassNames.Z.FeatureHelixComponent,e.feature_type=FeatureTypes.y.FeatureHelix,e}return FeatureHelixComponent_extends(e,t),e.prototype.get_feature_topo_items=function(){return this.feature_topo_items},e.prototype.set_feature_topo_items=function(t){this.feature_topo_items=t},e.prototype.get_mode=function(){return this.mode},e.prototype.set_mode=function(t){this.mode=t},e.prototype.get_axis=function(){return this.axis},e.prototype.set_axis=function(t){this.axis=t},e.prototype.get_pitch=function(){return this.pitch},e.prototype.set_pitch=function(t){this.pitch=t},e.prototype.get_height=function(){return this.height},e.prototype.set_height=function(t){this.height=t},e.prototype.get_angle=function(){return this.angle},e.prototype.set_angle=function(t){this.angle=t},e.prototype.get_left_hand=function(){return this.left_hand},e.prototype.set_left_hand=function(t){this.left_hand=t},e.prototype.get_reversed=function(){return this.reversed},e.prototype.set_reversed=function(t){this.reversed=t},e.prototype.get_solid=function(){return this.solid},e.prototype.set_solid=function(t){this.solid=t},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_topo_items=this.feature_topo_items.map(function(t){return t.to_json(e)}),o.mode=this.mode,o.axis=this.axis,o.pitch=this.pitch,o.height=this.height,o.angle=this.angle,o.left_hand=this.left_hand,o.reversed=this.reversed,o.solid=this.solid,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_topo_items=e.feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.mode=e.mode,this.axis=e.axis,this.pitch=e.pitch,this.height=e.height,this.angle=e.angle,this.left_hand=e.left_hand,this.reversed=e.reversed,this.solid=e.solid)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureHelixComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureMirrorComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureMirrorComponent=function(t){function e(){var e=t.call(this)||this;return e.feature_topo_items=[],e.center=new three_core.Pq0(0,0,0),e.direction=new three_core.Pq0(0,1,0),e.keep_tool=!0,e.className=ClassNames.Z.FeatureMirrorComponent,e.feature_type=FeatureTypes.y.FeatureMirror,e}return FeatureMirrorComponent_extends(e,t),e.prototype.get_feature_topo_items=function(){return this.feature_topo_items},e.prototype.set_feature_topo_items=function(t){this.feature_topo_items=t},e.prototype.set_keep_tool=function(t){this.keep_tool=t},e.prototype.get_keep_tool=function(){return this.keep_tool},e.prototype.set_center=function(t){this.center.copy(t)},e.prototype.get_center=function(){return this.center},e.prototype.set_direction=function(t){this.direction.copy(t)},e.prototype.get_direction=function(){return this.direction},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_topo_items=this.feature_topo_items.map(function(t){return t.to_json(e)}),o.center=this.center.toArray(),o.direction=this.direction.toArray(),o.keep_tool=this.keep_tool,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_topo_items=e.feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.center.fromArray(e.center),this.direction.fromArray(e.direction),this.keep_tool=e.keep_tool)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureMirrorComponent,e.create,t)},e}(FeatureBaseComponent.x),Ax2=__webpack_require__(2226),FeatureRevolveComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureRevolveComponent=function(t){function e(){var e=t.call(this)||this;return e.feature_topo_items=[],e.value=360,e.solid=!0,e.ax2=new Ax2.g,e.className=ClassNames.Z.FeatureRevolveComponent,e.feature_type=FeatureTypes.y.FeatureRevolve,e}return FeatureRevolveComponent_extends(e,t),e.prototype.get_feature_topo_items=function(){return this.feature_topo_items},e.prototype.set_feature_topo_items=function(t){this.feature_topo_items=t},e.prototype.get_value=function(){return this.value},e.prototype.set_value=function(t){this.value=t},e.prototype.get_solid=function(){return this.solid},e.prototype.set_solid=function(t){this.solid=t},e.prototype.get_ax2=function(){return this.ax2},e.prototype.set_ax2=function(t){this.ax2=t},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_topo_items=this.feature_topo_items.map(function(t){return t.to_json(e)}),o.value=this.value,o.solid=this.solid,o.ax2=this.ax2.toArray(),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_topo_items=e.feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.value=e.value,this.solid=e.solid,this.ax2.fromArray(e.ax2))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureRevolveComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureShellComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureShellComponent=function(t){function e(){var e=t.call(this)||this;return e.feature_topo_items=[],e.value=.1,e.inward=!0,e.className=ClassNames.Z.FeatureShellComponent,e.feature_type=FeatureTypes.y.FeatureShell,e}return FeatureShellComponent_extends(e,t),e.prototype.get_feature_topo_items=function(){return this.feature_topo_items},e.prototype.set_feature_topo_items=function(t){this.feature_topo_items=t},e.prototype.set_value=function(t){this.value=t},e.prototype.get_value=function(){return this.value},e.prototype.set_inward=function(t){this.inward=t},e.prototype.get_inward=function(){return this.inward},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_topo_items=this.feature_topo_items.map(function(t){return t.to_json(e)}),o.value=this.value,o.inward=this.inward,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_topo_items=e.feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.value=e.value,this.inward=e.inward)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureShellComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureSweepComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureSweepComponent=function(t){function e(){var e=t.call(this)||this;return e.path_feature_topo_items=[],e.profile_feature_topo_items=[],e.solid=!0,e.className=ClassNames.Z.FeatureSweepComponent,e.feature_type=FeatureTypes.y.FeatureSweep,e}return FeatureSweepComponent_extends(e,t),e.prototype.get_path_feature_topo_items=function(){return this.path_feature_topo_items},e.prototype.set_path_feature_topo_items=function(t){this.path_feature_topo_items=t},e.prototype.get_profile_feature_topo_items=function(){return this.profile_feature_topo_items},e.prototype.set_profile_feature_topo_items=function(t){this.profile_feature_topo_items=t},e.prototype.get_solid=function(){return this.solid},e.prototype.set_solid=function(t){this.solid=t},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.profile_feature_topo_items=this.profile_feature_topo_items.map(function(t){return t.to_json(e)}),o.path_feature_topo_items=this.path_feature_topo_items.map(function(t){return t.to_json(e)}),o.solid=this.solid,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.profile_feature_topo_items=e.profile_feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.path_feature_topo_items=e.path_feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.solid=e.solid)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureSweepComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureTransformComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureTransformComponent=function(t){function e(){var e=t.call(this)||this;return e.feature_topo_items=[],e.position=new three_core.Pq0(0,0,0),e.scale=new three_core.Pq0(1,1,1),e.rotation=new three_core.PTz,e.className=ClassNames.Z.FeatureTransformComponent,e.feature_type=FeatureTypes.y.FeatureTransform,e}return FeatureTransformComponent_extends(e,t),e.prototype.get_feature_topo_items=function(){return this.feature_topo_items},e.prototype.set_feature_topo_items=function(t){this.feature_topo_items=t},e.prototype.set_position=function(t){this.position.copy(t)},e.prototype.get_position=function(){return this.position},e.prototype.set_scale=function(t){this.scale.copy(t)},e.prototype.get_scale=function(){return this.scale},e.prototype.set_rotation=function(t){this.rotation.copy(t)},e.prototype.get_rotation=function(){return this.rotation},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_topo_items=this.feature_topo_items.map(function(t){return t.to_json(e)}),o.position=this.position.toArray(),o.scale=this.scale.toArray(),o.rotation=this.rotation.toArray(),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_topo_items=e.feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.position.fromArray(e.position),this.scale.fromArray(e.scale),this.rotation.fromArray(e.rotation))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureTransformComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureSetBoxComponent=__webpack_require__(2502),FeatureSetConeComponent=__webpack_require__(5118),FeatureSetCylinderComponent=__webpack_require__(9985),FeatureSetEllipsoidComponent=__webpack_require__(9162),FeatureSetPrismComponent=__webpack_require__(5638),FeatureSetStepComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureSetStepComponent=function(t){function e(){var e=t.call(this)||this;return e.content=new Uint8Array,e.file_name="",e.className=ClassNames.Z.FeatureSetStepComponent,e.feature_type=FeatureTypes.y.FeatureSetStep,e}return FeatureSetStepComponent_extends(e,t),e.prototype.set_content=function(t){this.content=t},e.prototype.get_content=function(){return this.content},e.prototype.set_file_name=function(t){this.file_name=t},e.prototype.get_file_name=function(){return this.file_name},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e),n=Array.from(this.content);return o.content=n,o.file_name=this.file_name,o},e.prototype.read_from_json=function(e,o){if(e){t.prototype.read_from_json.call(this,e,o),this.feature_type===FeatureTypes.y.FeatureSetBox&&(this.feature_type=FeatureTypes.y.FeatureSetStep);var n=e.content;this.content=new Uint8Array(n),this.file_name=e.file_name}},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureSetStepComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureSetSphereComponent=__webpack_require__(5984),FeatureSetTorusComponent=__webpack_require__(9506),FeatureSetTrapezoidComponent=__webpack_require__(9281),FeatureSetWedgeComponent=__webpack_require__(9017),DisplayMode,ProjectionMode,Scene3dCameraControlMode,Scene3dCameraViewMode,SelectionMode,EditorEditMode;!function(t){t.wireframe="wireframe",t.shading="shading",t.shadingBoundary="shadingBoundary",t.unshaded="unshaded",t.translucent="translucent",t.translucentSingleColor="translucentSingleColor",t.shadingSufaceBoundary="shadingSufaceBoundary",t.featurePreview="featurePreview"}(DisplayMode||(DisplayMode={})),function(t){t.perspective="perspective",t.orthographic="orthographic"}(ProjectionMode||(ProjectionMode={})),function(t){t.orbit="orbit",t.trackball="trackball"}(Scene3dCameraControlMode||(Scene3dCameraControlMode={})),function(t){t.reset="reset",t.fit="fit",t.isometric="isometric",t.front="front",t.back="back",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Scene3dCameraViewMode||(Scene3dCameraViewMode={})),function(t){t.body="body",t.face_edge="face_edge"}(SelectionMode||(SelectionMode={})),function(t){t.FeaturePartEdit="FeaturePartEdit",t.FeatureSketchEdit="FeatureSketchEdit"}(EditorEditMode||(EditorEditMode={}));var Scene3dComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Scene3dComponent=function(t){function e(){var e=t.call(this)||this;return e.show_renderer_info=!0,e.show_view_helper=!0,e.show_axis=!0,e.show_grid=!0,e.grid_spacing=10,e.display_mode=DisplayMode.shadingBoundary,e.selection_mode=SelectionMode.face_edge,e.projection_mode=ProjectionMode.perspective,e.camera_mode=Scene3dCameraControlMode.orbit,e.sketch_grid_spacing=10,e.sketch_snap=!0,e.sketch_show_grid=!0,e.sketch_show_ruler=!0,e.camera_position=null,e.camera_target=null,e.camera_zoom=1,e.show_control_info=!0,e.show_ruler=!0,e.className=ClassNames.Z.Scene3dComponent,e}return Scene3dComponent_extends(e,t),e.prototype.set_show_control_info=function(t){this.show_control_info=t},e.prototype.get_show_control_info=function(){return this.show_control_info},e.prototype.set_show_renderer_info=function(t){this.show_renderer_info=t},e.prototype.get_show_renderer_info=function(){return this.show_renderer_info},e.prototype.set_show_view_helper=function(t){this.show_view_helper=t},e.prototype.get_show_view_helper=function(){return this.show_view_helper},e.prototype.set_show_axis=function(t){this.show_axis=t},e.prototype.get_show_axis=function(){return this.show_axis},e.prototype.set_show_grid=function(t){this.show_grid=t},e.prototype.get_show_grid=function(){return this.show_grid},e.prototype.set_grid_spacing=function(t){this.grid_spacing=t},e.prototype.get_grid_spacing=function(){return this.grid_spacing},e.prototype.set_display_mode=function(t){this.display_mode=t},e.prototype.get_display_mode=function(){return this.display_mode},e.prototype.set_selection_mode=function(t){this.selection_mode=t},e.prototype.get_selection_mode=function(){return this.selection_mode},e.prototype.set_projection_mode=function(t){this.projection_mode=t},e.prototype.get_projection_mode=function(){return this.projection_mode},e.prototype.set_camera_mode=function(t){this.camera_mode=t},e.prototype.get_camera_mode=function(){return this.camera_mode},e.prototype.set_sketch_grid_spacing=function(t){this.sketch_grid_spacing=t},e.prototype.get_sketch_grid_spacing=function(){return this.sketch_grid_spacing},e.prototype.set_sketch_snap=function(t){this.sketch_snap=t},e.prototype.get_sketch_snap=function(){return this.sketch_snap},e.prototype.set_sketch_show_grid=function(t){this.sketch_show_grid=t},e.prototype.get_sketch_show_grid=function(){return this.sketch_show_grid},e.prototype.set_sketch_show_ruler=function(t){this.sketch_show_ruler=t},e.prototype.get_sketch_show_ruler=function(){return this.sketch_show_ruler},e.prototype.set_show_ruler=function(t){this.show_ruler=t},e.prototype.get_show_ruler=function(){return this.show_ruler},e.prototype.set_camera_position=function(t){this.camera_position=t},e.prototype.get_camera_position=function(){return this.camera_position},e.prototype.set_camera_target=function(t){this.camera_target=t},e.prototype.get_camera_target=function(){return this.camera_target},e.prototype.set_camera_zoom=function(t){this.camera_zoom=t},e.prototype.get_camera_zoom=function(){return this.camera_zoom},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.show_renderer_info=this.show_renderer_info,o.show_view_helper=this.show_view_helper,o.show_axis=this.show_axis,o.show_grid=this.show_grid,o.grid_spacing=this.grid_spacing,o.display_mode=this.display_mode,o.selection_mode=this.selection_mode,o.projection_mode=this.projection_mode,o.camera_mode=this.camera_mode,o.sketch_grid_spacing=this.sketch_grid_spacing,o.sketch_snap=this.sketch_snap,o.sketch_show_grid=this.sketch_show_grid,o.sketch_show_ruler=this.sketch_show_ruler,o.camera_position=this.camera_position,o.camera_target=this.camera_target,o.camera_zoom=this.camera_zoom,o.show_control_info=this.show_control_info,o.show_ruler=this.show_ruler,o},e.prototype.read_from_json=function(e,o){var n,r,i,s,a;e&&(t.prototype.read_from_json.call(this,e,o),this.show_renderer_info=e.show_renderer_info,this.show_view_helper=e.show_view_helper,this.show_axis=e.show_axis,this.show_grid=e.show_grid,this.grid_spacing=e.grid_spacing,this.display_mode=e.display_mode,this.selection_mode=e.selection_mode,this.projection_mode=e.projection_mode,this.camera_mode=e.camera_mode,this.sketch_grid_spacing=e.sketch_grid_spacing,this.sketch_snap=e.sketch_snap,this.sketch_show_grid=e.sketch_show_grid,this.sketch_show_ruler=null===(n=e.sketch_show_ruler)||void 0===n||n,this.camera_position=null!==(r=e.camera_position)&&void 0!==r?r:null,this.camera_target=null!==(i=e.camera_target)&&void 0!==i?i:null,this.camera_zoom=null!==(s=e.camera_zoom)&&void 0!==s?s:1,this.show_control_info=e.show_control_info,this.show_ruler=null===(a=e.show_ruler)||void 0===a||a)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.Scene3dComponent,e.create,t)},e}(Component.u),BoxMeshComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),BoxMeshComponent=function(t){function e(){var e=t.call(this)||this;return e.x_length=1,e.y_length=1,e.z_length=1,e.className=ClassNames.Z.BoxMeshComponent,e}return BoxMeshComponent_extends(e,t),e.prototype.get_x_length=function(){return this.x_length},e.prototype.set_x_length=function(t){this.x_length=t},e.prototype.get_y_length=function(){return this.y_length},e.prototype.set_y_length=function(t){this.y_length=t},e.prototype.get_z_length=function(){return this.z_length},e.prototype.set_z_length=function(t){this.z_length=t},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.x_length=this.x_length,o.y_length=this.y_length,o.z_length=this.z_length,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.x_length=e.x_length||1,this.y_length=e.y_length||1,this.z_length=e.z_length||1)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.BoxMeshComponent,e.create,t)},e}(Component.u),PlaneMeshComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),PlaneMeshComponent=function(t){function e(){var e=t.call(this)||this;return e.className=ClassNames.Z.PlaneMeshComponent,e}return PlaneMeshComponent_extends(e,t),e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&t.prototype.read_from_json.call(this,e,o)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.PlaneMeshComponent,e.create,t)},e}(Component.u),SphereMeshComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),SphereMeshComponent=function(t){function e(){var e=t.call(this)||this;return e.radius=1,e.className=ClassNames.Z.SphereMeshComponent,e}return SphereMeshComponent_extends(e,t),e.prototype.get_radius=function(){return this.radius},e.prototype.set_radius=function(t){this.radius=t},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.radius=this.radius,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.radius=e.radius||1)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.SphereMeshComponent,e.create,t)},e}(Component.u),Camera3dComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Camera3dComponent=function(t){function e(){var e=t.call(this)||this;return e.className=ClassNames.Z.Camera3dComponent,e}return Camera3dComponent_extends(e,t),e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&t.prototype.read_from_json.call(this,e,o)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.Camera3dComponent,e.create,t)},e}(Component.u),OrthographicCameraComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),OrthographicCameraComponent=function(t){function e(){var e=t.call(this)||this;return e.left=-10,e.right=10,e.top=10,e.bottom=-10,e.near=.1,e.far=1e3,e.zoom=1,e.className=ClassNames.Z.OrthographicCameraComponent,e}return OrthographicCameraComponent_extends(e,t),e.prototype.set_value_by_w_size=function(t,e){var o=(t=(t=Math.abs(t))<=0?2:t)/2,n=o/(e=(e=Math.abs(e))<=0?1:e);this.left=-o,this.right=o,this.top=n,this.bottom=-n},e.prototype.get_w_size=function(){return Math.abs(this.right-this.left)},e.prototype.set_left=function(t){this.left=t},e.prototype.get_left=function(){return this.left},e.prototype.set_right=function(t){this.right=t},e.prototype.get_right=function(){return this.right},e.prototype.set_top=function(t){this.top=t},e.prototype.get_top=function(){return this.top},e.prototype.set_bottom=function(t){this.bottom=t},e.prototype.get_bottom=function(){return this.bottom},e.prototype.set_near=function(t){this.near=t},e.prototype.get_near=function(){return this.near},e.prototype.set_far=function(t){this.far=t},e.prototype.get_far=function(){return this.far},e.prototype.set_zoom=function(t){this.zoom=t},e.prototype.get_zoom=function(){return this.zoom},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.left=this.left,o.right=this.right,o.top=this.top,o.bottom=this.bottom,o.near=this.near,o.far=this.far,o.zoom=this.zoom,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.OrthographicCameraComponent,e.create,t)},e}(Component.u),AmbientLightComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),AmbientLightComponent=function(t){function e(){var e=t.call(this)||this;return e.className=ClassNames.Z.AmbientLightComponent,e}return AmbientLightComponent_extends(e,t),e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&t.prototype.read_from_json.call(this,e,o)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.AmbientLightComponent,e.create,t)},e}(Component.u),DirectionalLightComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),DirectionalLightComponent=function(t){function e(){var e=t.call(this)||this;return e.className=ClassNames.Z.DirectionalLightComponent,e}return DirectionalLightComponent_extends(e,t),e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&t.prototype.read_from_json.call(this,e,o)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.DirectionalLightComponent,e.create,t)},e}(Component.u),PointLightComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),PointLightComponent=function(t){function e(){var e=t.call(this)||this;return e.className=ClassNames.Z.PointLightComponent,e}return PointLightComponent_extends(e,t),e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&t.prototype.read_from_json.call(this,e,o)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.PointLightComponent,e.create,t)},e}(Component.u),SpotLightComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),SpotLightComponent=function(t){function e(){var e=t.call(this)||this;return e.className=ClassNames.Z.SpotLightComponent,e}return SpotLightComponent_extends(e,t),e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&t.prototype.read_from_json.call(this,e,o)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.SpotLightComponent,e.create,t)},e}(Component.u),WorkSpaceSettingComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),WorkSpaceSettingComponent=function(t){function e(){var e=t.call(this)||this;return e.console_log_show_info=!0,e.console_log_show_warning=!0,e.console_log_show_error=!0,e.console_log_show_debug=!0,e.console_log_show_time=!0,e.console_log_show_level=!0,e.treeview_expanded_keys=[],e.last_opened_project_type="",e.last_opened_project_id="",e.last_opened_file_name="",e.className=ClassNames.Z.WorkSpaceSettingComponent,e}return WorkSpaceSettingComponent_extends(e,t),e.prototype.get_console_log_show_info=function(){return this.console_log_show_info},e.prototype.set_console_log_show_info=function(t){this.console_log_show_info=t},e.prototype.get_console_log_show_warning=function(){return this.console_log_show_warning},e.prototype.set_console_log_show_warning=function(t){this.console_log_show_warning=t},e.prototype.get_console_log_show_error=function(){return this.console_log_show_error},e.prototype.set_console_log_show_error=function(t){this.console_log_show_error=t},e.prototype.get_console_log_show_debug=function(){return this.console_log_show_debug},e.prototype.set_console_log_show_debug=function(t){this.console_log_show_debug=t},e.prototype.get_console_log_show_time=function(){return this.console_log_show_time},e.prototype.set_console_log_show_time=function(t){this.console_log_show_time=t},e.prototype.get_console_log_show_level=function(){return this.console_log_show_level},e.prototype.set_console_log_show_level=function(t){this.console_log_show_level=t},e.prototype.get_treeview_expanded_keys=function(){return this.treeview_expanded_keys},e.prototype.set_treeview_expanded_keys=function(t){this.treeview_expanded_keys=t},e.prototype.get_last_opened_project_type=function(){return this.last_opened_project_type},e.prototype.set_last_opened_project_type=function(t){this.last_opened_project_type=t},e.prototype.get_last_opened_project_id=function(){return this.last_opened_project_id},e.prototype.set_last_opened_project_id=function(t){this.last_opened_project_id=t},e.prototype.get_last_opened_file_name=function(){return this.last_opened_file_name},e.prototype.set_last_opened_file_name=function(t){this.last_opened_file_name=t},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.console_log_show_info=this.console_log_show_info,o.console_log_show_warning=this.console_log_show_warning,o.console_log_show_error=this.console_log_show_error,o.console_log_show_debug=this.console_log_show_debug,o.console_log_show_time=this.console_log_show_time,o.console_log_show_level=this.console_log_show_level,o.treeview_expanded_keys=this.treeview_expanded_keys,o.last_opened_project_type=this.last_opened_project_type,o.last_opened_project_id=this.last_opened_project_id,o.last_opened_file_name=this.last_opened_file_name,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.console_log_show_info=e.console_log_show_info,this.console_log_show_warning=e.console_log_show_warning,this.console_log_show_error=e.console_log_show_error,this.console_log_show_debug=e.console_log_show_debug,this.console_log_show_time=e.console_log_show_time,this.console_log_show_level=e.console_log_show_level,this.treeview_expanded_keys=e.treeview_expanded_keys,this.last_opened_project_type=e.last_opened_project_type,this.last_opened_project_id=e.last_opened_project_id,this.last_opened_file_name=e.last_opened_file_name)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.WorkSpaceSettingComponent,e.create,t)},e}(Component.u),SkGeomArcComponent=__webpack_require__(5841),SkGeomBaseComponent=__webpack_require__(2444),SkGeomBSplineComponent=__webpack_require__(7864),SkGeomCircleComponent=__webpack_require__(8023),SkGeomEllipseComponent=__webpack_require__(331),SkGeomLineComponent=__webpack_require__(9757),SkGeomPointComponent=__webpack_require__(6775),SkConstraintComponent=__webpack_require__(3304),TopoShapeComponent=__webpack_require__(632),NativeNodeToFeatureNode=__webpack_require__(1387),ObjectConverter=__webpack_require__(5062),SpriteToNativeNode=__webpack_require__(8892),EditorEventTypes;!function(t){t.load_json="load_json",t.save_json="save_json",t.load_document="load_document",t.save_document="save_document"}(EditorEventTypes||(EditorEventTypes={}));var EditorEventTypesList=[EditorEventTypes.load_json,EditorEventTypes.save_json,EditorEventTypes.load_document,EditorEventTypes.save_document],EditorEventInput=function(){function t(){}return t.prototype.to_json=function(){return{}},t}(),EditorEventManager=function(){function t(){}return Object.defineProperty(t,"instance",{get:function(){return t.m_instance||(t.m_instance=new t),t.m_instance},enumerable:!1,configurable:!0}),t.prototype.set_connection=function(t){this.connection=t},t.prototype.get_connection=function(){return this.connection},t}(),EditorEventOutput=function(){function t(){this.successful=!1,this.message=""}return t.prototype.to_json=function(){return{successful:this.successful,message:this.message}},t}(),EditorEvent_load_document_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_load_document=function(t){function e(){return t.call(this)||this}return EditorEvent_load_document_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.filePath=this.filePath,e.id=this.id,e},e}(EditorEventInput),EditorEventOutput_load_document=function(t){function e(){return t.call(this)||this}return EditorEvent_load_document_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.content=this.content,e},e}(EditorEventOutput),EditorEvent_load_json_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_load_json=function(t){function e(){return t.call(this)||this}return EditorEvent_load_json_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.file_path=this.file_path,e},e}(EditorEventInput),EditorEventOutput_load_json=function(t){function e(){return t.call(this)||this}return EditorEvent_load_json_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.content=this.content,e},e}(EditorEventOutput),EditorEvent_save_document_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_save_document=function(t){function e(){return t.call(this)||this}return EditorEvent_save_document_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.projectType=this.projectType,e.id=this.id,e.name=this.name,e.content=this.content,e.filename=this.filename,e.previewImg_filename=this.previewImg_filename,e.previewImgContent=this.previewImgContent,e.preview3DContent=this.preview3DContent,e},e}(EditorEventInput),EditorEventOutput_save_document=function(t){function e(){return t.call(this)||this}return EditorEvent_save_document_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.new_id=this.new_id,e},e}(EditorEventOutput),EditorEvent_save_json_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_save_json=function(t){function e(){return t.call(this)||this}return EditorEvent_save_json_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.file_path=this.file_path,e.content=this.content,e},e}(EditorEventInput),EditorEventOutput_save_json=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return EditorEvent_save_json_extends(e,t),e}(EditorEventOutput),EditorEvent_file_list_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_file_list=function(t){function e(){return t.call(this)||this}return EditorEvent_file_list_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.id=this.id,e.path=this.path,e},e}(EditorEventInput),EditorEventOutput_file_list=function(t){function e(){return t.call(this)||this}return EditorEvent_file_list_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.files=this.files,e},e}(EditorEventOutput),EditorEvent_check_file_exist_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_check_file_exist=function(t){function e(){return t.call(this)||this}return EditorEvent_check_file_exist_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.id=this.id,e.path=this.path,e},e}(EditorEventInput),EditorEventOutput_check_file_exist=function(t){function e(){return t.call(this)||this}return EditorEvent_check_file_exist_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.exist=this.exist,e},e}(EditorEventOutput),EditorEvent_new_file_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_new_file=function(t){function e(){return t.call(this)||this}return EditorEvent_new_file_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.id=this.id,e.filename=this.filename,e.isFolder=this.isFolder,e},e}(EditorEventInput),EditorEventOutput_new_file=function(t){function e(){return t.call(this)||this}return EditorEvent_new_file_extends(e,t),e.prototype.to_json=function(){return t.prototype.to_json.call(this)},e}(EditorEventOutput),EditorEvent_load_file_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_load_file=function(t){function e(){return t.call(this)||this}return EditorEvent_load_file_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.id=this.id,e.filePath=this.filePath,e},e}(EditorEventInput),EditorEventOutput_load_file=function(t){function e(){return t.call(this)||this}return EditorEvent_load_file_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.content=this.content,e},e}(EditorEventOutput),EditorEvent_save_file_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_save_file=function(t){function e(){return t.call(this)||this}return EditorEvent_save_file_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.id=this.id,e.filename=this.filename,e.content=this.content,e},e}(EditorEventInput),EditorEventOutput_save_file=function(t){function e(){return t.call(this)||this}return EditorEvent_save_file_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.new_id=this.new_id,e},e}(EditorEventOutput),EditorEvent_rename_file_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_rename_file=function(t){function e(){return t.call(this)||this}return EditorEvent_rename_file_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.id=this.id,e.from_filename=this.from_filename,e.to_filename=this.to_filename,e},e}(EditorEventInput),EditorEventOutput_rename_file=function(t){function e(){return t.call(this)||this}return EditorEvent_rename_file_extends(e,t),e.prototype.to_json=function(){return t.prototype.to_json.call(this)},e}(EditorEventOutput),EditorEvent_delete_file_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_delete_file=function(t){function e(){return t.call(this)||this}return EditorEvent_delete_file_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.path=this.path,e},e}(EditorEventInput),EditorEventOutput_delete_file=function(t){function e(){return t.call(this)||this}return EditorEvent_delete_file_extends(e,t),e.prototype.to_json=function(){return t.prototype.to_json.call(this)},e}(EditorEventOutput),EditorEvent_duplicate_file_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_duplicate_file=function(t){function e(){return t.call(this)||this}return EditorEvent_duplicate_file_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.from_filename=this.from_filename,e.to_filename=this.to_filename,e},e}(EditorEventInput),EditorEventOutput_duplicate_file=function(t){function e(){return t.call(this)||this}return EditorEvent_duplicate_file_extends(e,t),e.prototype.to_json=function(){return t.prototype.to_json.call(this)},e}(EditorEventOutput),EditorEvent_paste_file_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_paste_file=function(t){function e(){return t.call(this)||this}return EditorEvent_paste_file_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.id=this.id,e.type=this.type,e.sourcePath=this.sourcePath,e.filePath=this.filePath,e},e}(EditorEventInput),EditorEventOutput_paste_file=function(t){function e(){return t.call(this)||this}return EditorEvent_paste_file_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.data=this.data,e},e}(EditorEventOutput),EditorEvent_move_files_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_move_files=function(t){function e(){return t.call(this)||this}return EditorEvent_move_files_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.id=this.id,e.filePaths=this.filePaths,e.target=this.target,e.type=this.type,e},e}(EditorEventInput),EditorEventOutput_move_files=function(t){function e(){return t.call(this)||this}return EditorEvent_move_files_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.destPaths=this.destPaths,e},e}(EditorEventOutput),AssimpExporter=function(){function t(t){void 0===t&&(t=!1),this.is_native_node=!1,this.is_native_node=t}return t.prototype.export=function(t,e,o,n,r){void 0===n&&(n=1),void 0===r&&(r="stl");var i=this.is_native_node?t:SpriteToNativeNode.S.readSprite(t,null,!0);return new parapoly_engine.ParaPolyExporterForAssimp(e,o,n).ExportToCharArray(i,r)},t}(),DxfExporter=__webpack_require__(4291),DxfLoader=__webpack_require__(3401),Util=__webpack_require__(1072),GltfExporter=function(){function t(t){void 0===t&&(t=!1),this.is_native_node=!1,this.is_native_node=t}return t.prototype.export=function(t,e,o,n,r,i,s){void 0===e&&(e=.5),void 0===o&&(o=.5),void 0===n&&(n=!0),void 0===r&&(r=!0),void 0===i&&(i=1),void 0===s&&(s=!1);var a=this.is_native_node?t:SpriteToNativeNode.S.readSprite(t,null,!0),c=new parapoly_engine.ParaPolyExporterGltf(a,e,o,n,r,!0,i,s).exportToCharArray();return s?Util.J.nativeCharArrayToUint8Array(c):Util.J.nativeCharArrayToString(c)},t}(),ParaXExporter=function(){function t(t){void 0===t&&(t=!1),this.is_native_node=!1,this.is_native_node=t}return t.prototype.export=function(t,e,o,n,r,i){void 0===e&&(e=.5),void 0===o&&(o=.5),void 0===n&&(n=!1),void 0===r&&(r=1),void 0===i&&(i=null);var s=this.is_native_node?t:SpriteToNativeNode.S.readSprite(t,null,!0),a=new parapoly_engine.ParaPolyExporterParaX(s,e,o,n,r).exportToCharArray(),c=Util.J.nativeCharArrayToUint8Array(a);if(i){var u=new Uint8Array(i.length+c.length);return u.set(i,0),u.set(c,i.length),u}return c},t}(),StepExporter=function(){function t(t){void 0===t&&(t=!1),this.is_native_node=!1,this.is_native_node=t}return t.prototype.export=function(t){var e=this.is_native_node?t:SpriteToNativeNode.S.readSprite(t,null,!0),o=(new parapoly_engine.ParaPolyExporterXCAF).exportStep(e);return Util.J.nativeCharArrayToString(o)},t}(),SvgExporter=__webpack_require__(4991),SvgLoader=__webpack_require__(261),inspectors={},InspectorFactory=function(){function t(){}return t.regist=function(t){t&&t.className&&(inspectors[t.className]||(inspectors[t.className]=t))},t.get=function(t){if(t)return inspectors[t]},t.get_title=function(e){var o=t.get(e);if(o)return o.title},t.get_icon=function(e){var o=t.get(e);if(o)return o.icon},t}(),Sprite_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Sprite=function(t){function e(e){void 0===e&&(e=null);var o=t.call(this,e)||this;return o.className=ClassNames.Z.Sprite,o}return Sprite_extends(e,t),e.prototype.clone=function(t,o){return void 0===t&&(t=null),void 0===o&&(o=null),e.create(this.to_json(o),t)},e.create=function(t,o){void 0===o&&(o=null);var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.Sprite,e.create,t)},e}(Node.b),FeatureContainerNode_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureContainerNode=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureContainerNode,o.info_component=new InfoComponent.S,o.addComponent(o.info_component),o}return FeatureContainerNode_extends(e,t),e.prototype.find_edges_or_faces_index_by_first_topo_item=function(t,e){if(t){var o=t[0];if(o){var n=o.get_feature_id(),r=this.find_feature_node_by_id(n,e);if(r){var i=[],s=[],a=o.get_edge_index(),c=o.get_face_index();a>=0&&i.push(a),c>=0&&s.push(c);for(var u=1;u<t.length;u++){var _=t[u];if(_){var p=_.get_feature_id(),l=this.find_feature_node_by_id(p,e);if(l&&r.getId()==l.getId()){var h=_.get_edge_index(),d=_.get_face_index();h>=0&&i.push(h),d>=0&&s.push(d)}}}return{first_found_node:r,edges_index:i,faces_indes:s}}}}},e.prototype.find_feature_node_by_id=function(t,e){for(var o=0;o<this.getChildrenLength();o++){var n=this.getChildByIndex(o);if(n.getId()===t&&o<e)return n}},e.prototype.is_same_child=function(t,e){var o=this.getChildById(t),n=this.getChildByIndex(e);return!(!o||!n)&&o===n},e.prototype.set_label=function(t){this.info_component.set_label(t)},e.prototype.get_label=function(){return this.info_component.get_label()},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.info_component=this.getComponentByClassName(ClassNames.Z.InfoComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.prototype.markDirtyFrom=function(t){for(var e=this.getChildrenLength(),o=t;o<e;o++){var n=this.getChildByIndex(o);n&&n.set_building_dirty&&n.set_building_dirty(!0)}},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureContainerNode,e.create,t)},e}(Node.b),FeatureNodeBase=__webpack_require__(1289),FeatureNodeSetBox=__webpack_require__(2773),FeatureNodeSetCone=__webpack_require__(1941),FeatureNodeSetCylinder=__webpack_require__(448),FeatureNodeSetEllipsoid=__webpack_require__(8873),FeatureNodeSetPrism=__webpack_require__(9333),FeatureRunningStates=__webpack_require__(6499),FeatureNodeSetStep_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeSetStep_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeSetStep_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeSetStep=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeSetStep,o.component=new FeatureSetStepComponent,o.addComponent(o.component),o.parapolyEasyStep=new parapoly_engine.ParaPolyEasyStep,o}return FeatureNodeSetStep_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.set_values=function(t){var e=Util.J.stringToUint8Array(t),o=new Uint8Array(e);this.component.set_content(o),this.make_topo_shape()},e.prototype.run=function(t){return FeatureNodeSetStep_awaiter(this,void 0,void 0,function(){return FeatureNodeSetStep_generator(this,function(t){return this.set_running_state(FeatureRunningStates.s.running),this.make_topo_shape(),this.set_running_state(FeatureRunningStates.s.finished),[2]})})},e.prototype.make_topo_shape=function(){var t=this.component.get_content(),e=Util.J.arrayToNativeCharArray(t),o=this.parapolyEasyStep.readCharArrayToShape(e);this.set_topo_shape(o)},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureSetStepComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeSetStep,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeSetSphere=__webpack_require__(7079),FeatureNodeSetTorus=__webpack_require__(8625),FeatureNodeSetTrapezoid=__webpack_require__(2072),FeatureNodeSetWedge=__webpack_require__(6792),FeatureNodeBoolean_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeBoolean_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeBoolean_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeBoolean=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeBoolean,o.component=new FeatureBooleanComponent,o.addComponent(o.component),o}return FeatureNodeBoolean_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeBoolean_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_,p,l,h,d,f,y,m,g,v,w;return FeatureNodeBoolean_generator(this,function(b){if(!t)return[2];if(!(e=t.feature_container))return[2];if(o=this.component.get_target_feature_topo_items(),n=this.component.get_tool_feature_topo_items(),!o||!n)return[2];if(0==o.length||0==n.length)return[2];for(this.archive_nodes(!1,e,o),this.archive_nodes(!1,e,n),r=this.component.get_operation(),i=this.component.get_keep_tool(),s=[],a=[],l=0;l<o.length;l++){if(c=o[l],u=c.get_feature_id(),c.get_feature_index(),f=e.getChildIndex(this),!(_=e.find_feature_node_by_id(u,f)))return this.set_running_state(FeatureRunningStates.s.error),[2];if(!(p=_.get_topo_shape())||p.isNull())return this.set_running_state(FeatureRunningStates.s.error),[2];p=p.clone(),s.push(p)}for(l=0;l<n.length;l++){if(h=n[l],d=h.get_feature_id(),h.get_feature_index(),f=e.getChildIndex(this),!(y=e.find_feature_node_by_id(d,f)))return this.set_running_state(FeatureRunningStates.s.error),[2];if(!(m=y.get_topo_shape())||m.isNull())return this.set_running_state(FeatureRunningStates.s.error),[2];m=m.clone(),a.push(m)}return g=this.op_shapes(s,BooleanTypes.E.union),v=this.op_shapes(a,BooleanTypes.E.union),!(w=this.op_shapes([g,v],r))||w.isNull()?(console.warn("FeatureNodeBoolean: boolean operation failed"),this.set_running_state(FeatureRunningStates.s.error),[2]):(this.set_topo_shape(w),this.archive_nodes(!0,e,o),i||this.archive_nodes(!0,e,n),[2])})})},e.prototype.archive_nodes=function(t,e,o){if(e&&o)for(var n=0;n<o.length;n++){var r=o[n].get_feature_id(),i=e.getChildById(r);i?(i.set_archived(t),t?i.set_op_feature_node_id(this.getId()):i.set_op_feature_node_id(null)):console.warn("FeatureNodeBoolean: node not found by id: "+r)}},e.prototype.op_shapes=function(t,e){if(t){for(var o=t[0],n=1;n<t.length;n++){var r=t[n];o&&!o.isNull()&&r&&!r.isNull()&&(e==BooleanTypes.E.union?o=parapoly_engine.ParaPolyShapeMaker.fuse(o,r):e==BooleanTypes.E.difference?o=parapoly_engine.ParaPolyShapeMaker.cut(o,r):e==BooleanTypes.E.intersection&&(o=parapoly_engine.ParaPolyShapeMaker.common(o,r)))}return o}},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureBooleanComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeBoolean,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeChamfer_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeChamfer_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeChamfer_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeChamfer=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeChamfer,o.component=new FeatureChamferComponent,o.addComponent(o.component),o}return FeatureNodeChamfer_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeChamfer_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_,p;return FeatureNodeChamfer_generator(this,function(l){if(!(e=t.feature_container))return[2];if(!(o=this.component.get_feature_topo_items()))return[2];if(n=e.getChildIndex(this),r=e.find_edges_or_faces_index_by_first_topo_item(o,n)||{},!(i=r.first_found_node))return this.set_running_state(FeatureRunningStates.s.error),[2];if(!i.get_topo_shape)return this.set_running_state(FeatureRunningStates.s.error),[2];for(i.set_archived(!1),i.set_op_feature_node_id(null),s=i.get_topo_shape(),a=this.component.get_value(),c=new parapoly_engine.ParaPolyIntArray,u=r.edges_index||[],_=0;_<u.length;_++)c.pushValue(u[_]);return!(p=parapoly_engine.ParaPolyShapeMaker.chamfer(s,a,c))||p.isNull()?(this.set_running_state(FeatureRunningStates.s.error),[2]):(i.set_archived(!0),i.set_op_feature_node_id(this.getId()),this.set_topo_shape(p),[2])})})},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureChamferComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeChamfer,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeDelete_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeDelete_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeDelete_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeDelete=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeDelete,o.component=new FeatureDeleteComponent,o.addComponent(o.component),o}return FeatureNodeDelete_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeDelete_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s;return FeatureNodeDelete_generator(this,function(a){return t&&(e=t.feature_container)&&(o=this.component.get_feature_topo_items())&&(n=o[0])?(r=n.get_feature_id(),n.get_feature_index(),i=e.getChildIndex(this),(s=e.find_feature_node_by_id(r,i))&&s.get_topo_shape?(s.set_archived(!0),s.set_op_feature_node_id(this.getId()),[2]):(this.set_running_state(FeatureRunningStates.s.error),[2])):[2]})})},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureDeleteComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeDelete,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeDraft_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeDraft_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeDraft_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeDraft=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeDraft,o.component=new FeatureDraftComponent,o.addComponent(o.component),o}return FeatureNodeDraft_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeDraft_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_,p,l,h,d;return FeatureNodeDraft_generator(this,function(f){if(!t)return[2];if(!(e=t.feature_container))return[2];if(!(o=this.component.get_feature_topo_items()))return[2];if(!(n=o[0]))return[2];if(r=n.get_feature_id(),n.get_feature_index(),i=e.getChildIndex(this),!(s=e.find_feature_node_by_id(r,i)))return this.set_running_state(FeatureRunningStates.s.error),[2];if(!s.get_topo_shape)return this.set_running_state(FeatureRunningStates.s.error),[2];if(s.set_archived(!1),s.set_op_feature_node_id(null),a=this.component.get_value(),c=this.component.get_reverse(),u=this.component.get_center(),_=this.component.get_direction(),(p=n.get_face_index())>=0){if((l=new parapoly_engine.ParaPolyIntArray).pushValue(p),h=s.get_topo_shape(),!(d=parapoly_engine.ParaPolyShapeMaker.draft_shape(h,a,u.x,u.y,u.z,_.x,_.y,_.z,l,c))||d.isNull())return this.set_running_state(FeatureRunningStates.s.error),[2];s.set_archived(!0),s.set_op_feature_node_id(this.getId()),s.get_topo_shape_component().set_topo_shape(d)}return[2]})})},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureDraftComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeDraft,e.create,t)},e}(FeatureNodeBase.o),SkContainerNode=__webpack_require__(9375),FeatureNodeExtrude_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeExtrude_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeExtrude_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeExtrude=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeExtrude,o.component=new FeatureExtrudeComponent,o.addComponent(o.component),o}return FeatureNodeExtrude_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeExtrude_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_,p,l,h,d,f,y,m;return FeatureNodeExtrude_generator(this,function(g){if(!t)return[2];if(!(e=t.feature_container))return[2];if(!(o=this.component.get_feature_topo_items()))return[2];if(!(n=o[0]))return[2];if(this.set_running_state(FeatureRunningStates.s.running),r=n.get_feature_id(),n.get_feature_index(),i=n.get_face_index(),s=e.getChildIndex(this),!(a=e.find_feature_node_by_id(r,s)))return this.set_running_state(FeatureRunningStates.s.error),[2];if(!a.get_topo_shape)return this.set_running_state(FeatureRunningStates.s.error),[2];if(a.set_archived(!1),a.set_op_feature_node_id(null),c=this.component.get_value(),u=this.component.get_direction(),_=this.component.get_solid(),p=this.component.get_keep_original(),l=a.getClassName(),h=new three_core.Pq0(0,0,1),l==ClassNames.Z.SkContainerNode){if(!(f=(d=a).to_wires_shape())||f.isNull())return console.warn("FeatureNodeExtrude: to wires shape failed"),this.set_running_state(FeatureRunningStates.s.error),[2];if(!(m=parapoly_engine.ParaPolyShapeMaker.extrude_shape(f,c,h.x,h.y,h.z,_))||m.isNull())return console.warn("FeatureNodeExtrude: extrude shape failed"),this.set_running_state(FeatureRunningStates.s.error),[2];p||(d.set_archived(!0),d.set_op_feature_node_id(this.getId())),m=SkContainerNode.Y.transform_native_shape(m,d),this.set_topo_shape(m)}else{if(y=a.get_topo_shape(),!(m=parapoly_engine.ParaPolyShapeMaker.extrude(y,c,i,u.x,u.y,u.z,_,!0))||m.isNull())return console.warn("FeatureNodeExtrude: extrude shape failed"),this.set_running_state(FeatureRunningStates.s.error),[2];p||(a.set_archived(!0),a.set_op_feature_node_id(this.getId())),this.set_topo_shape(m)}return this.set_running_state(FeatureRunningStates.s.finished),[2]})})},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureExtrudeComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeExtrude,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeFillet_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeFillet_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeFillet_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeFillet=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeFillet,o.component=new FeatureFilletComponent,o.addComponent(o.component),o}return FeatureNodeFillet_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeFillet_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_,p;return FeatureNodeFillet_generator(this,function(l){if(!(e=t.feature_container))return[2];if(!(o=this.component.get_feature_topo_items()))return[2];if(n=e.getChildIndex(this),r=e.find_edges_or_faces_index_by_first_topo_item(o,n)||{},!(i=r.first_found_node))return this.set_running_state(FeatureRunningStates.s.error),[2];if(!i.get_topo_shape)return this.set_running_state(FeatureRunningStates.s.error),[2];for(i.set_archived(!1),i.set_op_feature_node_id(null),s=i.get_topo_shape(),a=this.component.get_value(),c=new parapoly_engine.ParaPolyIntArray,u=r.edges_index||[],_=0;_<u.length;_++)c.pushValue(u[_]);return!(p=parapoly_engine.ParaPolyShapeMaker.fillet(s,a,c))||p.isNull()?(this.set_running_state(FeatureRunningStates.s.error),[2]):(i.set_archived(!0),i.set_op_feature_node_id(this.getId()),this.set_topo_shape(p),[2])})})},e.prototype.make_topo_shape=function(){},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureFilletComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeFillet,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeHelix_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeHelix_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeHelix_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeHelix=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeHelix,o.component=new FeatureHelixComponent,o.addComponent(o.component),o}return FeatureNodeHelix_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeHelix_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_,p,l,h,d,f,y,m;return FeatureNodeHelix_generator(this,function(g){return t&&(e=t.feature_container)&&(o=this.component.get_feature_topo_items())&&(n=o[0])?(r=n.get_feature_id(),i=e.getChildIndex(this),(s=e.find_feature_node_by_id(r,i))&&s.get_topo_shape?(s.set_archived(!1),s.set_op_feature_node_id(null),s.getClassName()!=ClassNames.Z.SkContainerNode||!(c=(a=s).to_wires_shape())||c.isNull()?(this.set_running_state(FeatureRunningStates.s.error),[2]):(u=this.component.get_axis(),_=this.component.get_mode(),p=this.component.get_pitch(),l=this.component.get_height(),h=this.component.get_angle(),d=this.component.get_left_hand(),f=this.component.get_reversed(),y=this.component.get_solid(),!(m=parapoly_engine.ParaPolyShapeMaker.helix_shape(c,u,_,p,l,h,d,f,y))||m.isNull()?(this.set_running_state(FeatureRunningStates.s.error),[2]):(m=SkContainerNode.Y.transform_native_shape(m,a),this.set_topo_shape(m),[2]))):(this.set_running_state(FeatureRunningStates.s.error),[2])):[2]})})},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureHelixComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeHelix,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeMirror_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeMirror_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeMirror_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeMirror=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeMirror,o.component=new FeatureMirrorComponent,o.addComponent(o.component),o}return FeatureNodeMirror_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeMirror_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_,p;return FeatureNodeMirror_generator(this,function(l){return t&&(e=t.feature_container)&&(o=this.component.get_feature_topo_items())&&(n=o[0])?(r=n.get_feature_id(),n.get_feature_index(),i=e.getChildIndex(this),(s=e.find_feature_node_by_id(r,i))&&s.get_topo_shape?(s.set_archived(!1),s.set_op_feature_node_id(null),a=this.component.get_center(),c=this.component.get_direction(),u=this.component.get_keep_tool(),_=s.get_topo_shape(),!(p=parapoly_engine.ParaPolyShapeMaker.mirror_shape(_,a.x,a.y,a.z,c.x,c.y,c.z))||p.isNull()?(this.set_running_state(FeatureRunningStates.s.error),[2]):(u||(s.set_archived(!0),s.set_op_feature_node_id(this.getId())),this.set_topo_shape(p),[2])):(this.set_running_state(FeatureRunningStates.s.error),[2])):[2]})})},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureMirrorComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeMirror,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeRevolve_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeRevolve_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeRevolve_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeRevolve=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeRevolve,o.component=new FeatureRevolveComponent,o.addComponent(o.component),o}return FeatureNodeRevolve_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeRevolve_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_,p,l,h,d,f;return FeatureNodeRevolve_generator(this,function(y){return t&&(e=t.feature_container)&&(o=this.component.get_feature_topo_items())&&(n=o[0])?(r=n.get_feature_id(),n.get_feature_index(),i=e.getChildIndex(this),(s=e.find_feature_node_by_id(r,i))&&s.get_topo_shape?(a=this.component.get_value(),c=this.component.get_ax2(),u=c.point,_=c.mainDir,p=this.component.get_solid(),(l=s.getClassName())!==ClassNames.Z.SkContainerNode?(console.warn("FeatureNodeRevolve: invalid class name: "+l),this.set_running_state(FeatureRunningStates.s.error),[2]):!(d=(h=s).to_wires_shape())||d.isNull()?(console.warn("FeatureNodeRevolve: to wires shape failed"),this.set_running_state(FeatureRunningStates.s.error),[2]):(d=SkContainerNode.Y.transform_native_shape(d,h),!(f=parapoly_engine.ParaPolyShapeMaker.revolve_shape(d,a,u.x,u.y,u.z,_.x,_.y,_.z,p))||f.isNull()?(console.log("revolve_shape is null"),this.set_running_state(FeatureRunningStates.s.error),[2]):(this.set_topo_shape(f),[2]))):(this.set_running_state(FeatureRunningStates.s.error),[2])):[2]})})},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureRevolveComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeRevolve,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeShell_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeShell_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeShell_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeShell=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeShell,o.component=new FeatureShellComponent,o.addComponent(o.component),o}return FeatureNodeShell_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeShell_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_,p;return FeatureNodeShell_generator(this,function(l){return(e=t.feature_container)&&(o=this.component.get_feature_topo_items())&&(n=o[0])?(r=n.get_feature_id(),n.get_feature_index(),i=e.getChildIndex(this),(s=e.find_feature_node_by_id(r,i))&&s.get_topo_shape?(s.set_archived(!1),s.set_op_feature_node_id(null),a=s.get_topo_shape(),c=this.component.get_value(),u=this.component.get_inward(),_=n.get_face_index(),!(p=parapoly_engine.ParaPolyShapeMaker.shell_shape(a,c,_,u))||p.isNull()?(this.set_running_state(FeatureRunningStates.s.error),[2]):(s.set_archived(!0),s.set_op_feature_node_id(this.getId()),this.set_topo_shape(p),[2])):(this.set_running_state(FeatureRunningStates.s.error),[2])):[2]})})},e.prototype.make_topo_shape=function(){},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureShellComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeShell,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeSweep_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeSweep_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeSweep_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeSweep=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeSweep,o.component=new FeatureSweepComponent,o.addComponent(o.component),o}return FeatureNodeSweep_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.get_first_node=function(t,e){if(!t||!e)return null;var o=e[0];if(!o)return null;var n=o.get_feature_id(),r=t.getChildIndex(this);return t.find_feature_node_by_id(n,r)},e.prototype.run=function(t){return FeatureNodeSweep_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_,p;return FeatureNodeSweep_generator(this,function(l){return t&&(e=t.feature_container)?(o=this.component.get_path_feature_topo_items(),n=this.component.get_profile_feature_topo_items(),r=this.get_first_node(e,o),i=this.get_first_node(e,n),r&&i?(s=r.getClassName(),a=i.getClassName(),s!==ClassNames.Z.SkContainerNode?(console.warn("FeatureNodeSweep: invalid path class name: "+s),this.set_running_state(FeatureRunningStates.s.error),[2]):a!==ClassNames.Z.SkContainerNode?(console.warn("FeatureNodeSweep: invalid profile class name: "+a),this.set_running_state(FeatureRunningStates.s.error),[2]):(c=r.to_wires_shape(),u=i.to_wires_shape(),c&&u?(u=SkContainerNode.Y.transform_native_shape(u,i),c=SkContainerNode.Y.transform_native_shape(c,r),_=this.component.get_solid(),!(p=parapoly_engine.ParaPolyShapeMaker.sweep_shape(c,u,_))||p.isNull()?(console.log("sweep_shape is null"),this.set_running_state(FeatureRunningStates.s.error),[2]):(this.set_topo_shape(p),[2])):(console.warn("FeatureNodeSweep: invalid path or profile shape"),this.set_running_state(FeatureRunningStates.s.error),[2]))):(console.warn("FeatureNodeSweep: node not found"),this.set_running_state(FeatureRunningStates.s.error),[2])):[2]})})},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureSweepComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeSweep,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeTransform_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeTransform_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeTransform_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeTransform=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeTransform,o.component=new FeatureTransformComponent,o.addComponent(o.component),o}return FeatureNodeTransform_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeTransform_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_;return FeatureNodeTransform_generator(this,function(p){return t&&(e=t.feature_container)&&(o=this.component.get_feature_topo_items())&&(n=o[0])?(r=n.get_feature_id(),n.get_feature_index(),i=e.getChildIndex(this),(s=e.find_feature_node_by_id(r,i))&&s.get_topo_shape?(s.set_archived(!1),s.set_op_feature_node_id(null),(a=s.get_topo_shape())?(a=a.clone(),c=this.component.get_scale(),u=this.component.get_rotation(),_=this.component.get_position(),a.scale(c.x,c.y,c.z),a.rotate(u.x,u.y,u.z,u.w),a.translate(_.x,_.y,_.z),s.set_archived(!0),s.set_op_feature_node_id(this.getId()),this.set_topo_shape(a),[2]):(this.set_running_state(FeatureRunningStates.s.error),[2])):(this.set_running_state(FeatureRunningStates.s.error),[2])):[2]})})},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureTransformComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeTransform,e.create,t)},e}(FeatureNodeBase.o),SkGeomArcNode=__webpack_require__(9856),SkGeomBaseNode=__webpack_require__(5255),SkGeomBSplineNode=__webpack_require__(8699),SkGeomCircleNode=__webpack_require__(1934),SkGeomEllipseNode=__webpack_require__(7866),SkGeomLineNode=__webpack_require__(2508),SkGeomPointNode=__webpack_require__(718),SkConstraintNode=__webpack_require__(7211),register_all_components=function(){Component.u.register(),Ax2Component.v.register(),BooleanComponent.A.register(),BlockCodeComponent.register(),InfoComponent.S.register(),MaterialComponent.n.register(),MeshComponent.F.register(),MetaComponent.V.register(),ShapeComponent.register(),TransformComponent.W.register(),FeatureBaseComponent.x.register(),FeatureMiscComponent.e.register(),FeatureBooleanComponent.register(),FeatureChamferComponent.register(),FeatureDeleteComponent.register(),FeatureDraftComponent.register(),FeatureExtrudeComponent.register(),FeatureFilletComponent.register(),FeatureHelixComponent.register(),FeatureMirrorComponent.register(),FeatureRevolveComponent.register(),FeatureShellComponent.register(),FeatureSweepComponent.register(),FeatureTransformComponent.register(),FeatureSetBoxComponent.R.register(),FeatureSetConeComponent.d.register(),FeatureSetCylinderComponent.k.register(),FeatureSetEllipsoidComponent.P.register(),FeatureSetPrismComponent.R.register(),FeatureSetStepComponent.register(),FeatureSetSphereComponent.H.register(),FeatureSetTorusComponent.t.register(),FeatureSetTrapezoidComponent.Q.register(),FeatureSetWedgeComponent.m.register(),SkGeomArcComponent.k.register(),SkGeomBaseComponent.T.register(),SkGeomBSplineComponent.p.register(),SkGeomCircleComponent.i.register(),SkGeomEllipseComponent.A.register(),SkGeomLineComponent.W.register(),SkGeomPointComponent.q.register(),SkConstraintComponent.RN.register(),Scene3dComponent.register(),BoxMeshComponent.register(),PlaneMeshComponent.register(),SphereMeshComponent.register(),Camera3dComponent.register(),OrthographicCameraComponent.register(),AmbientLightComponent.register(),DirectionalLightComponent.register(),PointLightComponent.register(),SpotLightComponent.register(),WorkSpaceSettingComponent.register(),TopoShapeComponent.t.register(),Node.b.register(),Sprite.register(),FeatureContainerNode.register(),FeatureNodeBase.o.register(),FeatureNodeSetBox.I.register(),FeatureNodeSetCone._.register(),FeatureNodeSetCylinder.l.register(),FeatureNodeSetEllipsoid.a.register(),FeatureNodeSetPrism.M.register(),FeatureNodeSetStep.register(),FeatureNodeSetSphere.C.register(),FeatureNodeSetTorus.Y.register(),FeatureNodeSetTrapezoid.H.register(),FeatureNodeSetWedge.H.register(),FeatureNodeBoolean.register(),FeatureNodeChamfer.register(),FeatureNodeDelete.register(),FeatureNodeDraft.register(),FeatureNodeExtrude.register(),FeatureNodeFillet.register(),FeatureNodeHelix.register(),FeatureNodeMirror.register(),FeatureNodeRevolve.register(),FeatureNodeShell.register(),FeatureNodeSweep.register(),FeatureNodeTransform.register(),SkContainerNode.Y.register(),SkGeomArcNode.n.register(),SkGeomBaseNode.i.register(),SkGeomBSplineNode.w.register(),SkGeomCircleNode.n.register(),SkGeomEllipseNode.B.register(),SkGeomLineNode.l.register(),SkGeomPointNode.N.register(),SkConstraintNode.W.register(),FeatureTopoItem.register()},BSplineHelper=__webpack_require__(5590),SpriteHelper=function(){function t(){}return t.findParentMaterialComponent=function(e){if(e){var o=e.getComponentByClassName(ClassNames.Z.MaterialComponent);return o||t.findParentMaterialComponent(e.getParent())}},t}(),PartTessellate=__webpack_require__(9175),FeatureInspectorFactory_inspectors={},FeatureInspectorFactory=function(){function t(){}return t.regist=function(t){t&&t.className&&(FeatureInspectorFactory_inspectors[t.className]||(FeatureInspectorFactory_inspectors[t.className]=t))},t.get=function(t){if(t)return FeatureInspectorFactory_inspectors[t]},t.get_title=function(e){var o=t.get(e);if(o)return o.title},t.get_icon=function(e){var o=t.get(e);if(o)return o.icon},t}(),BaseResource=__webpack_require__(5874),BaseEditorResource=__webpack_require__(4855),Block3dEditorResource=__webpack_require__(3124),ResourceTypes=__webpack_require__(8575),Code3dEditorResource_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Code3dResource=function(t){function e(){var e=t.call(this)||this;return e.res_type=ResourceTypes.c.code3d,e}return Code3dEditorResource_extends(e,t),e}(Block3dEditorResource.k),Part3dEditorResource=__webpack_require__(4040),Sketch3dEditorResource=__webpack_require__(7073),ResourceManager=__webpack_require__(5574),ArScreenAspectRatioTypes,ArMediaInputTypes;!function(t){t.original="original",t.ratio_16_9="ratio_16_9",t.ratio_4_3="ratio_4_3",t.ratio_2_1="ratio_2_1",t.ratio_9_16="ratio_9_16",t.ratio_1_1="ratio_1_1",t.ratio_3_4="ratio_3_4"}(ArScreenAspectRatioTypes||(ArScreenAspectRatioTypes={})),function(t){t.camera="camera",t.video="video",t.image="image",t.canvas="canvas",t.none="none"}(ArMediaInputTypes||(ArMediaInputTypes={}));var ScreenRatioList=[{name:"9:16",ratio_type:ArScreenAspectRatioTypes.ratio_9_16,ratio:9/16,description:"TikTok",width:1080,height:1920},{name:"1:1",ratio_type:ArScreenAspectRatioTypes.ratio_1_1,ratio:1,description:"Instagram",width:1024,height:1024},{name:"3:4",ratio_type:ArScreenAspectRatioTypes.ratio_3_4,ratio:3/4,width:1080,height:1440},{name:"16:9",ratio_type:ArScreenAspectRatioTypes.ratio_16_9,ratio:16/9,description:"Youtube",width:1920,height:1080},{name:"4:3",ratio_type:ArScreenAspectRatioTypes.ratio_4_3,ratio:4/3,description:"Facebook",width:1440,height:1080},{name:"2:1",ratio_type:ArScreenAspectRatioTypes.ratio_2_1,ratio:2,width:1920,height:960}];function get_screen_info_by_ratio_type(t){return ScreenRatioList.find(function(e){return e.ratio_type===t})}var CodeTypes=__webpack_require__(3272),Constraint=__webpack_require__(9471),FileOptions,FileProtocol;!function(t){t.new="new",t.open="open",t.save="save",t.saveAs="saveAs",t.setting="setting",t.importStep="importStep",t.importEditorLayout="importEditorLayout",t.viewLua="viewLua",t.viewJs="viewJs",t.exportLua="exportLua",t.exportJs="exportJs",t.copyLua="copyLua",t.copyJs="copyJs",t.customExport="customExport",t.exportJson="exportJson",t.exportDocument="exportDocument",t.exportKonvaDocument="exportKonvaDocument",t.exportMujocoDocument="exportMujocoDocument",t.exportAssembly3dDocument="exportAssembly3dDocument",t.exportPartBlock3dDocument="exportPartBlock3dDocument",t.exportPart3dDocument="exportPart3dDocument",t.exportParaX="exportParaX",t.exportGltf="exportGltf",t.exportGltfSwapZ="exportGltfSwapZ",t.exportStl="exportStl",t.exportStlSwapZ="exportStlSwapZ",t.exportFbx="exportFbx",t.exportFbxSwapZ="exportFbxSwapZ",t.exportFbxa="exportFbxa",t.exportFbxaSwapZ="exportFbxaSwapZ",t.exportObj="exportObj",t.exportObjSwapZ="exportObjSwapZ",t.exportDocData="exportDocData",t.exportLog="exportLog",t.exportBlocklyPngs="exportBlocklyPngs",t.export3mf="export3mf",t.exportStep="exportStep",t.exportIges="exportIges",t.makePreview="makePreview",t.changeLanguage="changeLanguage",t.layout_default="layout_default",t.layout_tall="layout_tall",t.layout_right="layout_right",t.importLayout="importLayout",t.exportLayout="exportLayout",t.resetLayout="resetLayout",t.clearCache="clearCache",t.importAsObject="importAsObject",t.exportBlocklyXml="exportBlocklyXml",t.importSvg="importSvg",t.importDxf="importDxf",t.exportSvg="exportSvg",t.exportDxf="exportDxf",t.copySketchSvg="copySketchSvg",t.viewSketchSvg="viewSketchSvg",t.copySketchWireScript="copySketchWireScript",t.viewSketchWireScript="viewSketchWireScript",t.copySketchExtrudeScript="copySketchExtrudeScript",t.viewSketchExtrudeScript="viewSketchExtrudeScript",t.copySketchRevolveScript="copySketchRevolveScript",t.viewSketchRevolveScript="viewSketchRevolveScript",t.exportSketch3dJs="exportSketch3dJs",t.exportPart3dJs="exportPart3dJs"}(FileOptions||(FileOptions={})),function(t){var e;function o(t){return t.startsWith("http://")?e.http:t.startsWith("https://")?e.https:t.startsWith("file://")?e.file:t.startsWith("file_id://")?e.file_id:e.unknown}!function(t){t.http="http",t.https="https",t.file="file",t.file_id="file_id",t.unknown="unknown"}(e=t.FileProtocolTypes||(t.FileProtocolTypes={})),t.getFileProtocolType=o,t.isWebProtocol=function(t){return t===e.http||t===e.https},t.getFilePath=function(t){if(o(t)==e.file)return t.replace("file://","")},t.getFileId=function(t){if(o(t)==e.file_id)return t.replace("file_id://","")}}(FileProtocol||(FileProtocol={}));var GeomTypes=__webpack_require__(615),ImportTypes,TopoIdTypes;!function(t){t.none="none",t.readAsText="readAsText",t.readAsDataURL="readAsDataURL",t.readAsArrayBuffer="readAsArrayBuffer",t.readAsBinaryString="readAsBinaryString"}(ImportTypes||(ImportTypes={})),function(t){t.feature="feature",t.body="body",t.face="face",t.edge="edge",t.part_face="part_face",t.part_edge="part_edge"}(TopoIdTypes||(TopoIdTypes={}));var LogTypes=__webpack_require__(995),MeshTypes=__webpack_require__(1400),PlatformTypes,ProjectTypes;!function(t){t.web="web",t.playground="playground",t.electron="electron",t.cloud="cloud",t.vscode="vscode",t.custom_web="custom_web"}(PlatformTypes||(PlatformTypes={})),function(t){t.none="none",t.unknown="unknown",t.collection="collection",t.part="part",t.part_old="part_old",t.assistant="assistant",t.blockcad="blockcad",t.codecad="codecad",t.classicad="classicad",t.classic_codecad="classic_codecad",t.design="design",t.sketch="sketch",t.draft="draft",t.assembly="assembly",t.studio="studio",t.creator="creator",t.doc_text="doc_text",t.part3d="part3d",t.block3d="block3d",t.code3d="code3d",t.parapoly3d="parapoly3d",t.sketch3d="sketch3d",t.assembly3d="assembly3d"}(ProjectTypes||(ProjectTypes={}));var SplineTypes=__webpack_require__(2928),Code3dModuleExecutor=function(){function t(t){this.cache=new Map,this.resolveStack=[],this.fileProvider=t}return t.prototype.execute=function(t,e){var o=this,n=t+"|"+JSON.stringify(e||{});if(this.cache.has(n))return this.cache.get(n);if(this.resolveStack.indexOf(t)>=0){var r=this.resolveStack.concat(t).join(" → ");throw new Error("Circular dependency detected: "+r)}this.resolveStack.push(t);try{var i=this.fileProvider.readFile(t);if(!i)throw new Error("Module not found: "+t);var s=new Function("use","PartBlock3dDocument","\n ".concat(i,"\n return main;\n "))(function(e,n){var r=o.fileProvider.resolveRelativePath(t,e);return o.execute(r,n)},globalThis.PartBlock3dDocument||self.PartBlock3dDocument)(e);return this.cache.set(n,s),s}finally{this.resolveStack.pop()}},t.prototype.clearCache=function(){this.cache.clear()},t}(),Code3dModuleResolver=function(){function t(t){this.fileProvider=t,this.executor=new Code3dModuleExecutor(t)}return t.prototype.run=function(t,e){return this.executor.clearCache(),this.executor.execute(t,e)},t.prototype.getFileProvider=function(){return this.fileProvider},t}(),MemoryFileProvider=function(){function t(t){for(var e in this.files=new Map,t){var o=this.normalizePath(e);this.files.set(o,t[e])}}return t.prototype.readFile=function(t){var e=this.normalizePath(t);return this.files.get(e)||""},t.prototype.resolveRelativePath=function(t,e){if(e.startsWith("./")||e.startsWith("../")){var o=this.getDirectory(t),n=this.joinPath(o,e);return this.normalizePath(n)}return this.normalizePath(e)},t.prototype.listFiles=function(){return Array.from(this.files.keys())},t.prototype.getDirectory=function(t){var e=t.replace(/\\/g,"/").split("/");return e.pop(),e.join("/")},t.prototype.joinPath=function(t,e){for(var o=t.split("/").filter(function(t){return""!==t}),n=0,r=e.split("/");n<r.length;n++){var i=r[n];"."!==i&&""!==i&&(".."===i?o.pop():o.push(i))}return"./"+o.join("/")},t.prototype.normalizePath=function(t){(t=t.replace(/\\/g,"/")).startsWith("./")||t.startsWith("../")||(t="./"+t);for(var e=[],o=0,n=t.split("/");o<n.length;o++){var r=n[o];"."===r?0===e.length&&e.push("."):".."===r?e.length>1&&e.pop():e.push(r)}return e.join("/")},t}(),Code3dStaticAnalyzer=function(){function t(){}return t.extractDependencies=function(t){for(var e,o=[],n=/use\s*\(\s*["']([^"']+)["']/g;null!==(e=n.exec(t));){var r=e[1];o.indexOf(r)<0&&o.push(r)}return o},t.buildDependencyGraph=function(e,o,n){for(var r=new Map,i=[o],s=new Set;i.length>0;){var a=i.shift();if(!s.has(a)){s.add(a);var c=e[a];if(!c)throw new Error("File not found: "+a);for(var u=[],_=0,p=t.extractDependencies(c);_<p.length;_++){var l=n(a,p[_]);u.push(l),s.has(l)||i.push(l)}r.set(a,u)}}return r},t.topologicalSort=function(t){var e=[],o=new Set,n=new Set,r=function(i){if(!o.has(i)){if(n.has(i))throw new Error("Circular dependency detected involving: "+i);n.add(i);for(var s=0,a=t.get(i)||[];s<a.length;s++){var c=a[s];r(c)}n.delete(i),o.add(i),e.push(i)}},i=[];t.forEach(function(t,e){i.push(e)});for(var s=0,a=i;s<a.length;s++){var c=a[s];r(c)}return e},t}(),Code3dBundler=function(){function t(t,e){this.config=t,this.files=e}return t.prototype.resolvePath=function(t,e){if(e.startsWith("./")||e.startsWith("../")){for(var o=this.getDirectory(t).split("/").filter(function(t){return""!==t&&"."!==t}),n=0,r=e.split("/");n<r.length;n++){var i=r[n];"."!==i&&""!==i&&(".."===i?o.pop():o.push(i))}return"./"+o.join("/")}return e},t.prototype.getDirectory=function(t){var e=t.replace(/\\/g,"/").split("/");return e.pop(),e.join("/")},t.prototype.bundle=function(){var t=this,e="./"+this.config.main,o={};for(var n in this.files){var r=n.replace(/\\/g,"/");r.startsWith("./")||(r="./"+r),o[r]=this.files[n]}var i=Code3dStaticAnalyzer.buildDependencyGraph(o,e,function(e,o){return t.resolvePath(e,o)}),s=Code3dStaticAnalyzer.topologicalSort(i);return this.generateOutput(s,o,e)},t.prototype.generateOutput=function(e,o,n){var r=this,i=[];i.push("let main = function() {"),i.push(" const __modules = {};"),i.push(" const __cache = {};"),i.push("");for(var s=0,a=e;s<a.length;s++){var c=a[s];if(c!==n){var u=o[c],_=t.rewriteUsePaths(u,c,function(t,e){return r.resolvePath(t,e)}),p=this.extractFunctionBody(_);i.push(' __modules["'.concat(c,'"] = function(params) {')),i.push(" ".concat(p)),i.push(" };"),i.push("")}}i.push(" function use(path, params) {"),i.push(' let key = path + "|" + JSON.stringify(params || {});'),i.push(" if (__cache[key]) return __cache[key];"),i.push(' if (!__modules[path]) throw new Error("Module not found: " + path);'),i.push(" __cache[key] = __modules[path](params);"),i.push(" return __cache[key];"),i.push(" }"),i.push("");var l=o[n],h=t.rewriteUsePaths(l,n,function(t,e){return r.resolvePath(t,e)}),d=this.extractFunctionBody(h);return i.push(" // --- entry ---"),i.push(" ".concat(d)),i.push("}"),i.join("\n")},t.prototype.extractFunctionBody=function(t){var e=t.match(/let\s+main\s*=\s*function\s*\([^)]*\)\s*\{/);if(!e)return t;for(var o=e.index+e[0].length,n=1,r=o,i=o;i<t.length;i++)if("{"===t[i])n++;else if("}"===t[i]&&0===--n){r=i;break}return t.substring(o,r).trim()},t.rewriteUsePaths=function(t,e,o){return t.replace(/use\s*\(\s*["']([^"']+)["']/g,function(t,n){var r=o(e,n);return'use("'.concat(r,'"')})},t}(),code3dProjectBuilder_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},code3dProjectBuilder_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};function extractDependencies(t){for(var e=[],o=0,n=t.split("\n");o<n.length;o++){var r=n[o];if(!r.trim().startsWith("//"))for(var i=/use\s*\(\s*["']([^"']+)["']/g,s=void 0;null!==(s=i.exec(r));)e.indexOf(s[1])<0&&e.push(s[1])}return e}function isUrl(t){return t.startsWith("http://")||t.startsWith("https://")}function isAbsolutePath(t){return!!/^[a-zA-Z]:[/\\]/.test(t)||!!t.startsWith("/")}function resolvePath(t,e){if(isUrl(e))return e;if(isAbsolutePath(e))return e.replace(/\\/g,"/");if(e.startsWith("./")||e.startsWith("../")){var o=t.replace(/\\/g,"/").split("/");o.pop();for(var n=0,r=e.split("/");n<r.length;n++){var i=r[n];"."!==i&&""!==i&&(".."===i?o.pop():o.push(i))}return"./"+o.filter(function(t){return""!==t&&"."!==t}).join("/")}return e}function fetchUrl(t){return code3dProjectBuilder_awaiter(this,void 0,void 0,function(){var e;return code3dProjectBuilder_generator(this,function(o){switch(o.label){case 0:return[4,fetch(t)];case 1:if(!(e=o.sent()).ok)throw new Error("HTTP ".concat(e.status," for ").concat(t));return[2,e.text()]}})})}function buildDependencyGraph(t,e,o,n){return code3dProjectBuilder_awaiter(this,void 0,void 0,function(){var r,i,s,a,c,u,_,p,l,h,d,f;return code3dProjectBuilder_generator(this,function(y){switch(y.label){case 0:r=new Map,i=[e],s=new Set,y.label=1;case 1:return i.length>0?(a=i.shift(),s.has(a)?[3,1]:(s.add(a),t[a]||!isUrl(a)?[3,3]:(null==o||o("下载远程文件: ".concat(a)),[4,fetchUrl(a)]))):[3,6];case 2:65279===(c=y.sent()).charCodeAt(0)&&(c=c.slice(1)),t[a]=c,y.label=3;case 3:return t[a]||!n?[3,5]:(null==o||o("加载文件: ".concat(a)),[4,n(a)]);case 4:(c=y.sent())&&(t[a]=65279===c.charCodeAt(0)?c.slice(1):c),y.label=5;case 5:if(!t[a]&&isAbsolutePath(a))throw new Error("不支持绝对路径: ".concat(a));if(!(u=t[a]))throw new Error("文件未找到: "+a);if(a.endsWith(".part3d")||a.endsWith(".block3d")||a.endsWith(".part3d.js")||a.endsWith(".sketch3d.js"))return r.set(a,[]),[3,1];for(_=extractDependencies(u),p=[],l=0,h=_;l<h.length;l++)d=h[l],f=resolvePath(a,d),p.push(f),s.has(f)||i.push(f);return r.set(a,p),[3,1];case 6:return[2,r]}})})}function topologicalSort(t){var e=[],o=new Set,n=new Set;function r(i){if(!o.has(i)){if(n.has(i))throw new Error("检测到循环依赖: "+i);n.add(i);for(var s=0,a=t.get(i)||[];s<a.length;s++){r(a[s])}n.delete(i),o.add(i),e.push(i)}}for(var i=0,s=Array.from(t.keys());i<s.length;i++){r(s[i])}return e}function rewriteUsePaths(t,e){return t.replace(/use\s*\(\s*["']([^"']+)["']/g,function(t,o){var n=resolvePath(e,o);return"use(".concat(JSON.stringify(n))})}function extractFunctionBody(t){var e=t.match(/let\s+main\s*=\s*function\s*\([^)]*\)\s*\{/);if(!e)return t;for(var o=e.index+e[0].length,n=1,r=o,i=o;i<t.length;i++)if("{"===t[i])n++;else if("}"===t[i]&&0===--n){r=i;break}return t.substring(o,r).trim()}function checkSyntax(t,e){var o=[];if(!/let\s+main\s*=\s*function/.test(t))return o.push({line:1,column:1,message:"缺少 main 函数定义 (需要 'let main = function(...) { ... }')"}),o;var n=extractFunctionBody(t);/return\s+/.test(n)||o.push({line:null,column:null,message:"main 函数没有 return 语句"});try{var r="(function(params, use, PartBlock3dDocument) { ".concat(n," })");new Function(r)}catch(t){var i=t.message;o.push({line:null,column:null,message:i})}return o}function generateBundle(t,e,o){var n="./"+t.main,r=[];for(var i in r.push("let main = function() {"),r.push(" const __modules = {};"),r.push(" const __cache = {};"),r.push(""),e)if(i.endsWith(".part3d")){var s=JSON.stringify(e[i]),a=i.replace(/\\/g,"/");r.push(" __modules[".concat(JSON.stringify(a),"] = function(params) {")),r.push(" let recompile = params?.recompile !== undefined ? params.recompile : false;"),r.push(" let color = params?.color;"),r.push(" return PartBlock3dDocument.create_doc_from_part3d(".concat(s,", recompile, color);")),r.push(" };"),r.push("")}for(var i in e)if(i.endsWith(".block3d")){s=JSON.stringify(e[i]),a=i.replace(/\\/g,"/");r.push(" __modules[".concat(JSON.stringify(a),"] = function(params) {")),r.push(" return PartBlock3dDocument.create_doc_from_block3d(".concat(s,");")),r.push(" };"),r.push("")}for(var c=0,u=o;c<u.length;c++){var _=u[c];if(_!==n&&(!_.endsWith(".part3d")&&!_.endsWith(".block3d"))){var p=extractFunctionBody(rewriteUsePaths(e[_],_)).replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${");r.push(" __modules[".concat(JSON.stringify(_),'] = new Function("params", "use", "PartBlock3dDocument", `').concat(p,"`);")),r.push("")}}r.push(" function use(path, params) {"),r.push(' let key = path + "|" + JSON.stringify(params || {});'),r.push(" if (__cache[key]) return __cache[key];"),r.push(' if (!__modules[path]) throw new Error("Module not found: " + path);'),r.push(" if (typeof postMessage === 'function') {"),r.push(" let label = (path.endsWith('.part3d') || path.endsWith('.block3d')) ? '加载资源: ' : '编译模块: ';"),r.push(" try { postMessage({ cmd: 'log', log_type: 'debug', message: label + path }); } catch(e) {}"),r.push(" }"),r.push(" try {"),r.push(" __cache[key] = __modules[path](params, use, PartBlock3dDocument);"),r.push(" } catch(e) {"),r.push(" let lineInfo = '';"),r.push(" var stack = e.stack || '';"),r.push(" var m = stack.match(/<anonymous>:(\\\\d+):(\\\\d+)/);"),r.push(" if (m) lineInfo = ' (行 ' + (parseInt(m[1]) - 1) + ', 列 ' + m[2] + ')';"),r.push(" throw new Error('[' + path + lineInfo + '] ' + e.message);"),r.push(" }"),r.push(" return __cache[key];"),r.push(" }"),r.push("");var l=extractFunctionBody(rewriteUsePaths(e[n],n));return r.push(" // --- entry ---"),r.push(" ".concat(l)),r.push("}"),r.join("\n")}function computeOutputFilename(t,e){var o,n=(null===(o=t.build)||void 0===o?void 0:o.filename)||t.name;return(n=n.replace(/\.code3d\.js\.bin$/,"").replace(/\.code3d\.js$/,"").replace(/\.code3d$/,""))+(e?".code3d.js.bin":".code3d.js")}function buildCode3dProject(t,e,o,n){return code3dProjectBuilder_awaiter(this,void 0,void 0,function(){var r,i,s,a,c,u,_,p,l,h,d,f,y,m,g,v,w,b,C,x,P,S,k,E,O,N,j,F,T,M,A,D,B,I,R;return code3dProjectBuilder_generator(this,function(z){switch(z.label){case 0:return r="./"+e.main,i=[],t[r]||!n?[3,2]:(null==o||o("加载主文件: ".concat(r)),[4,n(r)]);case 1:(s=z.sent())&&(t[r]=65279===s.charCodeAt(0)?s.slice(1):s),z.label=2;case 2:return t[r]?(null==o||o("开始编译项目: ".concat(e.name)),null==o||o("分析依赖..."),[4,buildDependencyGraph(t,r,o,n)]):[2,{output:"",binOutput:null,result:{success:!1,errors:["主文件不存在: ".concat(e.main)]}}];case 3:for(a=z.sent(),c=topologicalSort(a),null==o||o("依赖分析完成, ".concat(c.length," 个模块")),null==o||o("语法检查..."),u=0,_=c;u<_.length;u++)if((p=_[u]).endsWith(".code3d.js")||p.endsWith(".part3d.js")||p.endsWith(".sketch3d.js"))for(l=checkSyntax(t[p],p),h=0,d=l;h<d.length;h++)f=d[h],y=f.line?" (行 ".concat(f.line,")"):"",i.push("".concat(p).concat(y,": ").concat(f.message));if(i.length>0)return[2,{output:"",binOutput:null,result:{success:!1,errors:i}}];if(null==o||o("语法检查通过"),null==o||o("生成 bundle..."),m=generateBundle(e,t,c),g=(new TextEncoder).encode(m).length,v=!1!==(null===(I=e.build)||void 0===I?void 0:I.bin),w=null,!v)return[3,7];null==o||o("压缩生成 .bin..."),b=(new TextEncoder).encode(m),C=new CompressionStream("gzip"),(x=C.writable.getWriter()).write(b),x.close(),P=C.readable.getReader(),S=[],z.label=4;case 4:return[4,P.read()];case 5:return k=z.sent(),E=k.done,O=k.value,E?[3,6]:(S.push(O),[3,4]);case 6:for(N=S.reduce(function(t,e){return t+e.length},0),w=new Uint8Array(N),j=0,F=0,T=S;F<T.length;F++)M=T[F],w.set(M,j),j+=M.length;z.label=7;case 7:return A=(null===(R=e.build)||void 0===R?void 0:R.output)||"dist",D=computeOutputFilename(e,v),B=A+"/"+D,null==o||o("编译完成"),[2,{output:m,binOutput:w,result:{success:!0,outputPath:B,isBin:v,jsSize:g,binSize:null==w?void 0:w.length}}]}})})}var Part3dCodeExporter=function(){function t(){}return t.export=function(e,o){if(void 0===o&&(o="#ffffff"),!e)return"let main = function() {\n return new PartBlock3dDocument();\n};";var n=t.export_feature_summary(e),r=t.export_executable_calls(e,o),i=[];i.push("let main = function() {"),i.push(" let block3d_doc = new PartBlock3dDocument();"),i.push(""),i.push(" // Helpers for operation nodes that target older features."),i.push(" let __id_to_name = {};"),i.push(" let __saved_shapes = {}; // shapes saved before Boolean deletes nodes"),i.push(" let __record_name = function(feature_id) {"),i.push(" if (!feature_id) return;"),i.push(" try {"),i.push(" let n = block3d_doc?.selected_node?.getName?.();"),i.push(" if (n) __id_to_name[feature_id] = n;"),i.push(" } catch (e) {}"),i.push(" };"),i.push(" let __select_feature = function(feature_id) {"),i.push(" let name = __id_to_name[feature_id];"),i.push(" if (!name) return false;"),i.push(" let node = block3d_doc.get_root_node()?.getChildByName?.(name, true);"),i.push(" if (!node) return false;"),i.push(" block3d_doc.selected_node = node;"),i.push(" return true;"),i.push(" };"),i.push(""),i.push(" // Feature summary (readable preview)");for(var s=0,a=n;s<a.length;s++){var c=a[s];i.push(" ".concat(c))}i.push(""),i.push(" // Executable export");for(var u=0,_=r;u<_.length;u++){c=_[u];i.push(" ".concat(c))}return i.push(""),i.push(" return block3d_doc;"),i.push("};"),i.join("\n")},t.export_feature_summary=function(e){var o=[],n=e.getChildrenLength();o.push("// Feature count: ".concat(n));for(var r=0;r<n;r++){var i=e.getChildByIndex(r);i&&o.push(t.summarize_feature_node(r,i))}return o},t.export_executable_calls=function(e,o){var n,r,i,s,a,c,u,_,p,l,h,d,f,y,m,g,v,w,b,C,x,P,S,k,E,O,N,j,F,T,M,A,D,B,I,R,z,L,U,W,G,Z,q,V,J,K,H,X,Y,Q,$,tt,et,ot,nt,rt,it,st,at,ct,ut,_t,pt,lt,ht,dt,ft,yt,mt,gt,vt,wt,bt,Ct,xt,Pt,St,kt,Et,Ot,Nt,jt,Ft,Tt,Mt,At,Dt,Bt,It,Rt,zt,Lt,Ut,Wt,Gt,Zt,qt,Vt,Jt,Kt,Ht,Xt,Yt,Qt,$t,te,ee,oe,ne,re,ie,se,ae,ce;void 0===o&&(o="#ffffff");for(var ue=[],_e=e.getChildrenLength(),pe=new Map,le=new Set,he=0;he<_e;he++){var de=e.getChildByIndex(he);if(de){var fe=de.getId?de.getId():"",ye=de.getClassName?de.getClassName():"",me=de.get_feature_component?de.get_feature_component():null,ge=de.get_op?de.get_op():"union",ve=de.get_color?de.get_color():o;if(ve&&!ve.startsWith("#")&&(ve="#"+ve),ye.indexOf("FeatureNodeSetBox")>=0)ue.push("block3d_doc.box(".concat(JSON.stringify(ge),", ").concat(t.n(null===(n=null==me?void 0:me.get_x_length)||void 0===n?void 0:n.call(me)),", ").concat(t.n(null===(r=null==me?void 0:me.get_y_length)||void 0===r?void 0:r.call(me)),", ").concat(t.n(null===(i=null==me?void 0:me.get_z_length)||void 0===i?void 0:i.call(me)),", ").concat(JSON.stringify(ve),");")),t.append_transform_lines(ue,de),ue.push("__record_name(".concat(JSON.stringify(fe),");"));else if(ye.indexOf("FeatureNodeSetCylinder")>=0)ue.push("block3d_doc.cylinder(".concat(JSON.stringify(ge),", ").concat(t.n(null===(s=null==me?void 0:me.get_radius)||void 0===s?void 0:s.call(me)),", ").concat(t.n(null===(a=null==me?void 0:me.get_height)||void 0===a?void 0:a.call(me)),", ").concat(JSON.stringify(ve),");")),t.append_transform_lines(ue,de),ue.push("__record_name(".concat(JSON.stringify(fe),");"));else if(ye.indexOf("FeatureNodeSetSphere")>=0)ue.push("block3d_doc.sphere(".concat(JSON.stringify(ge),", ").concat(t.n(null===(c=null==me?void 0:me.get_radius)||void 0===c?void 0:c.call(me)),", ").concat(JSON.stringify(ve),");")),t.append_transform_lines(ue,de),ue.push("__record_name(".concat(JSON.stringify(fe),");"));else if(ye.indexOf("FeatureNodeSetCone")>=0)ue.push("block3d_doc.cone(".concat(JSON.stringify(ge),", ").concat(t.n(null===(u=null==me?void 0:me.get_top_radius)||void 0===u?void 0:u.call(me)),", ").concat(t.n(null===(_=null==me?void 0:me.get_bottom_radius)||void 0===_?void 0:_.call(me)),", ").concat(t.n(null===(p=null==me?void 0:me.get_height)||void 0===p?void 0:p.call(me)),", ").concat(JSON.stringify(ve),");")),t.append_transform_lines(ue,de),ue.push("__record_name(".concat(JSON.stringify(fe),");"));else if(ye.indexOf("FeatureNodeSetTorus")>=0)ue.push("block3d_doc.torus(".concat(JSON.stringify(ge),", ").concat(t.n(null===(l=null==me?void 0:me.get_radius1)||void 0===l?void 0:l.call(me)),", ").concat(t.n(null===(h=null==me?void 0:me.get_radius2)||void 0===h?void 0:h.call(me)),", ").concat(JSON.stringify(ve),");")),t.append_transform_lines(ue,de),ue.push("__record_name(".concat(JSON.stringify(fe),");"));else if(ye.indexOf("FeatureNodeSetPrism")>=0)ue.push("block3d_doc.prism(".concat(JSON.stringify(ge),", ").concat(t.n(null===(d=null==me?void 0:me.get_edges)||void 0===d?void 0:d.call(me)),", ").concat(t.n(null===(f=null==me?void 0:me.get_radius)||void 0===f?void 0:f.call(me)),", ").concat(t.n(null===(y=null==me?void 0:me.get_height)||void 0===y?void 0:y.call(me)),", ").concat(JSON.stringify(ve),");")),t.append_transform_lines(ue,de),ue.push("__record_name(".concat(JSON.stringify(fe),");"));else if(ye.indexOf("FeatureNodeSetEllipsoid")>=0)ue.push("block3d_doc.ellipsoid(".concat(JSON.stringify(ge),", ").concat(t.n(null===(m=null==me?void 0:me.get_radius_x)||void 0===m?void 0:m.call(me)),", ").concat(t.n(null===(g=null==me?void 0:me.get_radius_y)||void 0===g?void 0:g.call(me)),", ").concat(t.n(null===(v=null==me?void 0:me.get_radius_z)||void 0===v?void 0:v.call(me)),", ").concat(JSON.stringify(ve),");")),t.append_transform_lines(ue,de),ue.push("__record_name(".concat(JSON.stringify(fe),");"));else if(ye.indexOf("FeatureNodeSetWedge")>=0)ue.push("block3d_doc.wedge(".concat(JSON.stringify(ge),", ").concat(t.n(null===(w=null==me?void 0:me.get_x_length)||void 0===w?void 0:w.call(me)),", ").concat(t.n(null===(b=null==me?void 0:me.get_y_length)||void 0===b?void 0:b.call(me)),", ").concat(t.n(null===(C=null==me?void 0:me.get_z_length)||void 0===C?void 0:C.call(me)),", ").concat(JSON.stringify(ve),");")),t.append_transform_lines(ue,de),ue.push("__record_name(".concat(JSON.stringify(fe),");"));else if(ye.indexOf("FeatureNodeSetTrapezoid")>=0)ue.push("block3d_doc.trapezoid(".concat(JSON.stringify(ge),", ").concat(t.n(null===(x=null==me?void 0:me.get_top_w)||void 0===x?void 0:x.call(me)),", ").concat(t.n(null===(P=null==me?void 0:me.get_bottom_w)||void 0===P?void 0:P.call(me)),", ").concat(t.n(null===(S=null==me?void 0:me.get_hight)||void 0===S?void 0:S.call(me)),", ").concat(t.n(null===(k=null==me?void 0:me.get_depth)||void 0===k?void 0:k.call(me)),", ").concat(JSON.stringify(ve),");")),t.append_transform_lines(ue,de),ue.push("__record_name(".concat(JSON.stringify(fe),");"));else if(ye.indexOf("FeatureNodeSetStep")>=0){var we=null===(E=null==me?void 0:me.get_content)||void 0===E?void 0:E.call(me),be=t.step_payload_base64(we);ue.push("block3d_doc.import_step_shape_by_string(".concat(JSON.stringify(ge),", ").concat(JSON.stringify(be),", true, ").concat(JSON.stringify(ve),");")),ue.push("__record_name(".concat(JSON.stringify(fe),");"))}else if(ye.indexOf("SkContainerNode")>=0){pe.set(fe,de),ue.push.apply(ue,t.export_sketch_lines(de)),ue.push("__record_name(".concat(JSON.stringify(fe),");"));var Ce=!!de.get_archived&&de.get_archived(),xe=de.get_op_feature_node_id?de.get_op_feature_node_id():null,Pe=!de.get_visible||de.get_visible();(Ce||xe)&&ue.push("block3d_doc.selected_node.set_archived(true);"),Pe||ue.push("block3d_doc.selected_node.set_visible(false);")}else if(ye.indexOf("FeatureNodeExtrude")>=0){var Se=(null===(j=null==(mo=null===(N=null===(O=null==me?void 0:me.get_feature_topo_items)||void 0===O?void 0:O.call(me))||void 0===N?void 0:N[0])?void 0:mo.get_feature_id)||void 0===j?void 0:j.call(mo))||"",ke=null!==(T=null===(F=null==mo?void 0:mo.get_face_index)||void 0===F?void 0:F.call(mo))&&void 0!==T?T:-1,Ee=null===(M=null==me?void 0:me.get_value)||void 0===M?void 0:M.call(me),Oe=null===(A=null==me?void 0:me.get_direction)||void 0===A?void 0:A.call(me),Ne=null===(D=null==me?void 0:me.get_solid)||void 0===D?void 0:D.call(me),je=null===(B=null==me?void 0:me.get_keep_original)||void 0===B?void 0:B.call(me);if(pe.has(Se))Se&&le.has(Se)&&pe.has(Se)&&(ue.push("// Re-emit consumed sketch for feature [".concat(he,"]")),ue.push.apply(ue,t.export_sketch_lines(pe.get(Se))),ue.push("__record_name(".concat(JSON.stringify(Se),");"))),Se&&le.add(Se),ue.push("(function() {"),ue.push(" let target_name = __id_to_name[".concat(JSON.stringify(Se),"];")),ue.push(' if (!target_name) { console.warn("[part3d.js #'.concat(he," Extrude ").concat(fe.substring(0,8),"] target_name not found for sketch ").concat(Se.substring(0,8),'"); return; }')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let node = root.getChildByName(target_name, true);"),ue.push(' if (!node || !node.to_wires_shape) { console.warn("[part3d.js #'.concat(he," Extrude ").concat(fe.substring(0,8),'] sketch node not found or no to_wires_shape"); return; }')),ue.push(" node.set_archived(false);"),ue.push(" node.set_op_feature_node_id(null);"),ue.push(" let wires_shape = node.to_wires_shape();"),ue.push(' if (!wires_shape || wires_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Extrude ").concat(fe.substring(0,8),'] to_wires_shape failed"); return; }')),ue.push(" let extrude_shape = parapoly_engine.ParaPolyShapeMaker.extrude_shape(wires_shape, ".concat(t.n(Ee),", 0, 0, 1, ").concat(Ne?"true":"false",");")),ue.push(' if (!extrude_shape || extrude_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Extrude ").concat(fe.substring(0,8),'] extrude_shape failed"); return; }')),ue.push(" if (node.constructor && node.constructor.transform_native_shape) {"),ue.push(" extrude_shape = node.constructor.transform_native_shape(extrude_shape, node);"),ue.push(" }"),je||(ue.push(" node.set_archived(true);"),ue.push(" node.set_op_feature_node_id(".concat(JSON.stringify(fe),");"))),ue.push(" let result_node = block3d_doc.push_node(".concat(JSON.stringify(ge),", ").concat(JSON.stringify("extrude_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result_node.set_topo_shape(extrude_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push("})();");else{var Fe=t.n(null!==(I=null==Oe?void 0:Oe.x)&&void 0!==I?I:0),Te=t.n(null!==(R=null==Oe?void 0:Oe.y)&&void 0!==R?R:0),Me=t.n(null!==(z=null==Oe?void 0:Oe.z)&&void 0!==z?z:1);ue.push("(function() {"),ue.push(" let target_name = __id_to_name[".concat(JSON.stringify(Se),"];")),ue.push(' if (!target_name) { console.warn("[part3d.js #'.concat(he," Extrude ").concat(fe.substring(0,8),"] target_name not found for face extrusion ").concat(Se.substring(0,8),'"); return; }')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let node = root.getChildByName(target_name, true);"),ue.push(" let topo_shape;"),ue.push(" if (node && node.get_topo_shape) {"),ue.push(" topo_shape = node.get_topo_shape();"),ue.push(" } else if (__saved_shapes[target_name]) {"),ue.push(" topo_shape = __saved_shapes[target_name].shape;"),ue.push(' } else { console.warn("[part3d.js #'.concat(he," Extrude ").concat(fe.substring(0,8),'] target node not found and no saved shape"); return; }')),ue.push(' if (!topo_shape || topo_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Extrude ").concat(fe.substring(0,8),'] target shape is null"); return; }')),ue.push(" if (node) { node.set_archived(false); node.set_op_feature_node_id(null); }"),ue.push(" let extrude_shape = parapoly_engine.ParaPolyShapeMaker.extrude(topo_shape, ".concat(t.n(Ee),", ").concat(t.n(ke),", ").concat(Fe,", ").concat(Te,", ").concat(Me,", ").concat(Ne?"true":"false",", true);")),ue.push(' if (!extrude_shape || extrude_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Extrude ").concat(fe.substring(0,8),'] face extrude failed"); return; }')),je||ue.push(" if (node) { node.set_archived(true); node.set_op_feature_node_id(".concat(JSON.stringify(fe),"); }")),ue.push(" let result_node = block3d_doc.push_node(".concat(JSON.stringify(ge),", ").concat(JSON.stringify("extrude_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result_node.set_topo_shape(extrude_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push("})();")}}else if(ye.indexOf("FeatureNodeRevolve")>=0){Se=(null===(W=null==(mo=null===(U=null===(L=null==me?void 0:me.get_feature_topo_items)||void 0===L?void 0:L.call(me))||void 0===U?void 0:U[0])?void 0:mo.get_feature_id)||void 0===W?void 0:W.call(mo))||"";var Ae=null===(G=null==me?void 0:me.get_ax2)||void 0===G?void 0:G.call(me),De=(null===(Z=null==Ae?void 0:Ae.point)||void 0===Z?void 0:Z.toArray)?Ae.point.toArray():[0,0,0],Be=(null===(q=null==Ae?void 0:Ae.mainDir)||void 0===q?void 0:q.toArray)?Ae.mainDir.toArray():[0,0,1],Ie=(Ne=null===(V=null==me?void 0:me.get_solid)||void 0===V?void 0:V.call(me),null===(J=null==me?void 0:me.get_value)||void 0===J?void 0:J.call(me));Se&&le.has(Se)&&pe.has(Se)&&(ue.push("// Re-emit consumed sketch for feature [".concat(he,"]")),ue.push.apply(ue,t.export_sketch_lines(pe.get(Se))),ue.push("__record_name(".concat(JSON.stringify(Se),");"))),Se&&le.add(Se),ue.push("(function() {"),ue.push(" let target_name = __id_to_name[".concat(JSON.stringify(Se),"];")),ue.push(' if (!target_name) { console.warn("[part3d.js #'.concat(he," Revolve ").concat(fe.substring(0,8),"] target_name not found for sketch ").concat(Se.substring(0,8),'"); return; }')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let node = root.getChildByName(target_name, true);"),ue.push(' if (!node || !node.to_wires_shape) { console.warn("[part3d.js #'.concat(he," Revolve ").concat(fe.substring(0,8),'] sketch node not found or no to_wires_shape"); return; }')),ue.push(" let wires_shape = node.to_wires_shape();"),ue.push(' if (!wires_shape || wires_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Revolve ").concat(fe.substring(0,8),'] to_wires_shape failed"); return; }')),ue.push(" if (node.constructor && node.constructor.transform_native_shape) {"),ue.push(" wires_shape = node.constructor.transform_native_shape(wires_shape, node);"),ue.push(" }"),ue.push(" let revolve_shape = parapoly_engine.ParaPolyShapeMaker.revolve_shape(wires_shape, ".concat(t.n(Ie),", ").concat(t.n(De[0]),", ").concat(t.n(De[1]),", ").concat(t.n(De[2]),", ").concat(t.n(Be[0]),", ").concat(t.n(Be[1]),", ").concat(t.n(Be[2]),", ").concat(Ne?"true":"false",");")),ue.push(' if (!revolve_shape || revolve_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Revolve ").concat(fe.substring(0,8),'] revolve_shape failed"); return; }')),ue.push(" let result_node = block3d_doc.push_node(".concat(JSON.stringify(ge),", ").concat(JSON.stringify("revolve_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result_node.set_topo_shape(revolve_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push("})();")}else if(ye.indexOf("FeatureNodeSweep")>=0){var Re=null===(H=null===(K=null==me?void 0:me.get_profile_feature_topo_items)||void 0===K?void 0:K.call(me))||void 0===H?void 0:H[0],ze=null===(Y=null===(X=null==me?void 0:me.get_path_feature_topo_items)||void 0===X?void 0:X.call(me))||void 0===Y?void 0:Y[0],Le=(null===(Q=null==Re?void 0:Re.get_feature_id)||void 0===Q?void 0:Q.call(Re))||"",Ue=(null===($=null==ze?void 0:ze.get_feature_id)||void 0===$?void 0:$.call(ze))||"";Ne=null===(tt=null==me?void 0:me.get_solid)||void 0===tt?void 0:tt.call(me);ue.push("(function() {"),ue.push(" let profile_name = __id_to_name[".concat(JSON.stringify(Le),"];")),ue.push(" let path_name = __id_to_name[".concat(JSON.stringify(Ue),"];")),ue.push(' if (!profile_name || !path_name) { console.warn("[part3d.js #'.concat(he," Sweep ").concat(fe.substring(0,8),"] profile/path name missing: profile=").concat(Le.substring(0,8),", path=").concat(Ue.substring(0,8),'"); return; }')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let profile_node = root.getChildByName(profile_name, true);"),ue.push(" let path_node = root.getChildByName(path_name, true);"),ue.push(' if (!profile_node || !profile_node.to_wires_shape) { console.warn("[part3d.js #'.concat(he," Sweep ").concat(fe.substring(0,8),'] profile sketch not found"); return; }')),ue.push(' if (!path_node || !path_node.to_wires_shape) { console.warn("[part3d.js #'.concat(he," Sweep ").concat(fe.substring(0,8),'] path sketch not found"); return; }')),ue.push(" let profile_wires = profile_node.to_wires_shape();"),ue.push(" let path_wires = path_node.to_wires_shape();"),ue.push(' if (!profile_wires || profile_wires.isNull()) { console.warn("[part3d.js #'.concat(he," Sweep ").concat(fe.substring(0,8),'] profile to_wires_shape failed"); return; }')),ue.push(' if (!path_wires || path_wires.isNull()) { console.warn("[part3d.js #'.concat(he," Sweep ").concat(fe.substring(0,8),'] path to_wires_shape failed"); return; }')),ue.push(" if (profile_node.constructor && profile_node.constructor.transform_native_shape) {"),ue.push(" profile_wires = profile_node.constructor.transform_native_shape(profile_wires, profile_node);"),ue.push(" }"),ue.push(" if (path_node.constructor && path_node.constructor.transform_native_shape) {"),ue.push(" path_wires = path_node.constructor.transform_native_shape(path_wires, path_node);"),ue.push(" }"),ue.push(" let sweep_shape = parapoly_engine.ParaPolyShapeMaker.sweep_shape(path_wires, profile_wires, ".concat(Ne?"true":"false",");")),ue.push(' if (!sweep_shape || sweep_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Sweep ").concat(fe.substring(0,8),'] sweep_shape failed"); return; }')),ue.push(" let result_node = block3d_doc.push_node(".concat(JSON.stringify(ge),", ").concat(JSON.stringify("sweep_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result_node.set_topo_shape(sweep_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push("})();")}else if(ye.indexOf("FeatureNodeHelix")>=0){Se=(null===(nt=null==(mo=null===(ot=null===(et=null==me?void 0:me.get_feature_topo_items)||void 0===et?void 0:et.call(me))||void 0===ot?void 0:ot[0])?void 0:mo.get_feature_id)||void 0===nt?void 0:nt.call(mo))||"";var We=null===(rt=null==me?void 0:me.get_axis)||void 0===rt?void 0:rt.call(me),Ge=null===(it=null==me?void 0:me.get_mode)||void 0===it?void 0:it.call(me),Ze=null===(st=null==me?void 0:me.get_pitch)||void 0===st?void 0:st.call(me),qe=null===(at=null==me?void 0:me.get_height)||void 0===at?void 0:at.call(me),Ve=null===(ct=null==me?void 0:me.get_angle)||void 0===ct?void 0:ct.call(me),Je=null===(ut=null==me?void 0:me.get_left_hand)||void 0===ut?void 0:ut.call(me),Ke=null===(_t=null==me?void 0:me.get_reversed)||void 0===_t?void 0:_t.call(me);Ne=null===(pt=null==me?void 0:me.get_solid)||void 0===pt?void 0:pt.call(me);ue.push("(function() {"),ue.push(" let target_name = __id_to_name[".concat(JSON.stringify(Se),"];")),ue.push(' if (!target_name) { console.warn("[part3d.js #'.concat(he," Helix ").concat(fe.substring(0,8),"] target_name not found for sketch ").concat(Se.substring(0,8),'"); return; }')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let node = root.getChildByName(target_name, true);"),ue.push(' if (!node || !node.to_wires_shape) { console.warn("[part3d.js #'.concat(he," Helix ").concat(fe.substring(0,8),'] sketch node not found or no to_wires_shape"); return; }')),ue.push(" node.set_archived(false);"),ue.push(" node.set_op_feature_node_id(null);"),ue.push(" let wires_shape = node.to_wires_shape();"),ue.push(' if (!wires_shape || wires_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Helix ").concat(fe.substring(0,8),'] to_wires_shape failed"); return; }')),ue.push(" let helix_shape = parapoly_engine.ParaPolyShapeMaker.helix_shape(wires_shape, ".concat(t.n(We),", ").concat(t.n(Ge),", ").concat(t.n(Ze),", ").concat(t.n(qe),", ").concat(t.n(Ve),", ").concat(Je?"true":"false",", ").concat(Ke?"true":"false",", ").concat(Ne?"true":"false",");")),ue.push(' if (!helix_shape || helix_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Helix ").concat(fe.substring(0,8),'] helix_shape failed"); return; }')),ue.push(" if (node.constructor && node.constructor.transform_native_shape) {"),ue.push(" helix_shape = node.constructor.transform_native_shape(helix_shape, node);"),ue.push(" }"),ue.push(" let result_node = block3d_doc.push_node(".concat(JSON.stringify(ge),", ").concat(JSON.stringify("helix_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result_node.set_topo_shape(helix_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push("})();")}else if(ye.indexOf("FeatureNodeFillet")>=0){var He=t.extract_edges_and_target(null===(lt=null==me?void 0:me.get_feature_topo_items)||void 0===lt?void 0:lt.call(me));Ie=null===(ht=null==me?void 0:me.get_value)||void 0===ht?void 0:ht.call(me);ue.push("(function() {"),ue.push(" let target_name = __id_to_name[".concat(JSON.stringify(He.target_id),"];")),ue.push(' if (!target_name) { console.warn("[part3d.js #'.concat(he," Fillet ").concat(fe.substring(0,8),"] target_name not found: ").concat((He.target_id||"").substring(0,8),'"); return; }')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let node = root.getChildByName(target_name, true);"),ue.push(" let topo_shape;"),ue.push(" if (node && node.get_topo_shape) {"),ue.push(" topo_shape = node.get_topo_shape();"),ue.push(" } else if (__saved_shapes[target_name]) {"),ue.push(" topo_shape = __saved_shapes[target_name].shape;"),ue.push(' } else { console.warn("[part3d.js #'.concat(he," Fillet ").concat(fe.substring(0,8),'] target not found"); return; }')),ue.push(' if (!topo_shape || topo_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Fillet ").concat(fe.substring(0,8),'] target shape is null"); return; }')),ue.push(" if (node) { node.set_archived(false); node.set_op_feature_node_id(null); }"),ue.push(" let edge_arr = new parapoly_engine.ParaPolyIntArray();");for(var Xe=0,Ye=He.edges;Xe<Ye.length;Xe++){var Qe=Ye[Xe];ue.push(" edge_arr.pushValue(".concat(t.n(Qe),");"))}ue.push(" let result_shape = parapoly_engine.ParaPolyShapeMaker.fillet(topo_shape, ".concat(t.n(Ie),", edge_arr);")),ue.push(' if (!result_shape || result_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Fillet ").concat(fe.substring(0,8),'] fillet failed"); return; }')),ue.push(" if (node) { node.set_archived(true); node.set_op_feature_node_id(".concat(JSON.stringify(fe),"); }")),ue.push(" let result_node = block3d_doc.push_node(".concat(JSON.stringify(ge),", ").concat(JSON.stringify("fillet_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result_node.set_topo_shape(result_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push("})();")}else if(ye.indexOf("FeatureNodeChamfer")>=0){He=t.extract_edges_and_target(null===(dt=null==me?void 0:me.get_feature_topo_items)||void 0===dt?void 0:dt.call(me)),Ie=null===(ft=null==me?void 0:me.get_value)||void 0===ft?void 0:ft.call(me);ue.push("(function() {"),ue.push(" let target_name = __id_to_name[".concat(JSON.stringify(He.target_id),"];")),ue.push(' if (!target_name) { console.warn("[part3d.js #'.concat(he," Chamfer ").concat(fe.substring(0,8),"] target_name not found: ").concat((He.target_id||"").substring(0,8),'"); return; }')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let node = root.getChildByName(target_name, true);"),ue.push(" let topo_shape;"),ue.push(" if (node && node.get_topo_shape) {"),ue.push(" topo_shape = node.get_topo_shape();"),ue.push(" } else if (__saved_shapes[target_name]) {"),ue.push(" topo_shape = __saved_shapes[target_name].shape;"),ue.push(' } else { console.warn("[part3d.js #'.concat(he," Chamfer ").concat(fe.substring(0,8),'] target not found"); return; }')),ue.push(' if (!topo_shape || topo_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Chamfer ").concat(fe.substring(0,8),'] target shape is null"); return; }')),ue.push(" if (node) { node.set_archived(false); node.set_op_feature_node_id(null); }"),ue.push(" let edge_arr = new parapoly_engine.ParaPolyIntArray();");for(var $e=0,to=He.edges;$e<to.length;$e++){Qe=to[$e];ue.push(" edge_arr.pushValue(".concat(t.n(Qe),");"))}ue.push(" let result_shape = parapoly_engine.ParaPolyShapeMaker.chamfer(topo_shape, ".concat(t.n(Ie),", edge_arr);")),ue.push(' if (!result_shape || result_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Chamfer ").concat(fe.substring(0,8),'] chamfer failed"); return; }')),ue.push(" if (node) { node.set_archived(true); node.set_op_feature_node_id(".concat(JSON.stringify(fe),"); }")),ue.push(" let result_node = block3d_doc.push_node(".concat(JSON.stringify(ge),", ").concat(JSON.stringify("chamfer_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result_node.set_topo_shape(result_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push("})();")}else if(ye.indexOf("FeatureNodeShell")>=0){var eo=(null===(gt=null==(mo=null===(mt=null===(yt=null==me?void 0:me.get_feature_topo_items)||void 0===yt?void 0:yt.call(me))||void 0===mt?void 0:mt[0])?void 0:mo.get_feature_id)||void 0===gt?void 0:gt.call(mo))||"",oo=(ke=null!==(wt=null===(vt=null==mo?void 0:mo.get_face_index)||void 0===vt?void 0:vt.call(mo))&&void 0!==wt?wt:0,Ie=null===(bt=null==me?void 0:me.get_value)||void 0===bt?void 0:bt.call(me),null===(Ct=null==me?void 0:me.get_inward)||void 0===Ct?void 0:Ct.call(me));ue.push("(function() {"),ue.push(" let target_name = __id_to_name[".concat(JSON.stringify(eo),"];")),ue.push(' if (!target_name) { console.warn("[part3d.js #'.concat(he," Shell ").concat(fe.substring(0,8),"] target_name not found: ").concat(eo.substring(0,8),'"); return; }')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let node = root.getChildByName(target_name, true);"),ue.push(" let topo_shape;"),ue.push(" if (node && node.get_topo_shape) {"),ue.push(" topo_shape = node.get_topo_shape();"),ue.push(" } else if (__saved_shapes[target_name]) {"),ue.push(" topo_shape = __saved_shapes[target_name].shape;"),ue.push(' } else { console.warn("[part3d.js #'.concat(he," Shell ").concat(fe.substring(0,8),'] target not found"); return; }')),ue.push(' if (!topo_shape || topo_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Shell ").concat(fe.substring(0,8),'] target shape is null"); return; }')),ue.push(" if (node) { node.set_archived(false); node.set_op_feature_node_id(null); }"),ue.push(" let result_shape = parapoly_engine.ParaPolyShapeMaker.shell_shape(topo_shape, ".concat(t.n(Ie),", ").concat(t.n(ke),", ").concat(oo?"true":"false",");")),ue.push(' if (!result_shape || result_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Shell ").concat(fe.substring(0,8),'] shell_shape failed"); return; }')),ue.push(" if (node) { node.set_archived(true); node.set_op_feature_node_id(".concat(JSON.stringify(fe),"); }")),ue.push(" let result_node = block3d_doc.push_node(".concat(JSON.stringify(ge),", ").concat(JSON.stringify("shell_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result_node.set_topo_shape(result_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push("})();")}else if(ye.indexOf("FeatureNodeDraft")>=0){var no=t.extract_faces_and_target(null===(xt=null==me?void 0:me.get_feature_topo_items)||void 0===xt?void 0:xt.call(me)),ro=(De=(null===(St=null===(Pt=null==me?void 0:me.get_center)||void 0===Pt?void 0:Pt.call(me))||void 0===St?void 0:St.toArray)?me.get_center().toArray():[0,0,0],Be=(null===(Et=null===(kt=null==me?void 0:me.get_direction)||void 0===kt?void 0:kt.call(me))||void 0===Et?void 0:Et.toArray)?me.get_direction().toArray():[0,0,1],Ie=null===(Ot=null==me?void 0:me.get_value)||void 0===Ot?void 0:Ot.call(me),null===(Nt=null==me?void 0:me.get_reverse)||void 0===Nt?void 0:Nt.call(me));ue.push("(function() {"),ue.push(" let target_name = __id_to_name[".concat(JSON.stringify(no.target_id),"];")),ue.push(' if (!target_name) { console.warn("[part3d.js #'.concat(he," Draft ").concat(fe.substring(0,8),"] target_name not found: ").concat((no.target_id||"").substring(0,8),'"); return; }')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let node = root.getChildByName(target_name, true);"),ue.push(" let topo_shape;"),ue.push(" if (node && node.get_topo_shape) {"),ue.push(" topo_shape = node.get_topo_shape();"),ue.push(" } else if (__saved_shapes[target_name]) {"),ue.push(" topo_shape = __saved_shapes[target_name].shape;"),ue.push(' } else { console.warn("[part3d.js #'.concat(he," Draft ").concat(fe.substring(0,8),'] target not found"); return; }')),ue.push(' if (!topo_shape || topo_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Draft ").concat(fe.substring(0,8),'] target shape is null"); return; }')),ue.push(" if (node) { node.set_archived(false); node.set_op_feature_node_id(null); }"),ue.push(" let face_arr = new parapoly_engine.ParaPolyIntArray();");for(var io=0,so=no.faces;io<so.length;io++){var ao=so[io];ue.push(" face_arr.pushValue(".concat(t.n(ao),");"))}ue.push(" let result_shape = parapoly_engine.ParaPolyShapeMaker.draft_shape(topo_shape, ".concat(t.n(Ie),", ").concat(t.n(De[0]),", ").concat(t.n(De[1]),", ").concat(t.n(De[2]),", ").concat(t.n(Be[0]),", ").concat(t.n(Be[1]),", ").concat(t.n(Be[2]),", face_arr, ").concat(ro?"true":"false",");")),ue.push(' if (!result_shape || result_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Draft ").concat(fe.substring(0,8),'] draft_shape failed"); return; }')),ue.push(" if (node) { node.set_archived(true); node.set_op_feature_node_id(".concat(JSON.stringify(fe),"); }")),ue.push(" let result_node = block3d_doc.push_node(".concat(JSON.stringify(ge),", ").concat(JSON.stringify("draft_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result_node.set_topo_shape(result_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push("})();")}else if(ye.indexOf("FeatureNodeMirror")>=0){var co=(null===(Tt=null==(mo=null===(Ft=null===(jt=null==me?void 0:me.get_feature_topo_items)||void 0===jt?void 0:jt.call(me))||void 0===Ft?void 0:Ft[0])?void 0:mo.get_feature_id)||void 0===Tt?void 0:Tt.call(mo))||"";De=(null===(At=null===(Mt=null==me?void 0:me.get_center)||void 0===Mt?void 0:Mt.call(me))||void 0===At?void 0:At.toArray)?me.get_center().toArray():[0,0,0],Be=(null===(Bt=null===(Dt=null==me?void 0:me.get_direction)||void 0===Dt?void 0:Dt.call(me))||void 0===Bt?void 0:Bt.toArray)?me.get_direction().toArray():[0,0,1];ue.push("(function() {"),ue.push(" let target_name = __id_to_name[".concat(JSON.stringify(co),"];")),ue.push(' console.log("[part3d.js #'.concat(he," Mirror ").concat(fe.substring(0,8),"] target_id=").concat(co.substring(0,8),', target_name=", target_name);')),ue.push(' if (!target_name) { console.warn("[part3d.js #'.concat(he," Mirror ").concat(fe.substring(0,8),'] NO target_name"); return; }')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let node = root.getChildByName(target_name, true);"),ue.push(" let topo_shape;"),ue.push(" if (node && node.get_topo_shape) {"),ue.push(" topo_shape = node.get_topo_shape();"),ue.push(" } else if (__saved_shapes[target_name]) {"),ue.push(" topo_shape = __saved_shapes[target_name].shape;"),ue.push(' } else { console.warn("[part3d.js #'.concat(he," Mirror ").concat(fe.substring(0,8),'] node NOT found and no saved shape"); return; }')),ue.push(' console.log("[part3d.js #'.concat(he," Mirror ").concat(fe.substring(0,8),'] topo_shape null?", !topo_shape || topo_shape.isNull());')),ue.push(" if (!topo_shape || topo_shape.isNull()) return;"),ue.push(" let mirror_shape = parapoly_engine.ParaPolyShapeMaker.mirror_shape(topo_shape, ".concat(t.n(De[0]),", ").concat(t.n(De[1]),", ").concat(t.n(De[2]),", ").concat(t.n(Be[0]),", ").concat(t.n(Be[1]),", ").concat(t.n(Be[2]),");")),ue.push(' console.log("[part3d.js #'.concat(he," Mirror ").concat(fe.substring(0,8),'] mirror_shape null?", !mirror_shape || mirror_shape.isNull());')),ue.push(" if (!mirror_shape || mirror_shape.isNull()) return;"),ue.push(" let result = block3d_doc.push_node(".concat(JSON.stringify(ge),", ").concat(JSON.stringify("mirror_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result.set_topo_shape(mirror_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push("})();")}else if(ye.indexOf("FeatureNodeDelete")>=0){Se=(null===(zt=null==(mo=null===(Rt=null===(It=null==me?void 0:me.get_feature_topo_items)||void 0===It?void 0:It.call(me))||void 0===Rt?void 0:Rt[0])?void 0:mo.get_feature_id)||void 0===zt?void 0:zt.call(mo))||"";ue.push("if (__id_to_name[".concat(JSON.stringify(Se),"]) {")),ue.push(" block3d_doc.delete_node(__id_to_name[".concat(JSON.stringify(Se),"]);")),ue.push("}"),ue.push("__record_name(".concat(JSON.stringify(fe),");"))}else if(ye.indexOf("FeatureNodeBoolean")>=0){var uo=(null===(Lt=null==me?void 0:me.get_target_feature_topo_items)||void 0===Lt?void 0:Lt.call(me))||[],_o=(null===(Ut=null==me?void 0:me.get_tool_feature_topo_items)||void 0===Ut?void 0:Ut.call(me))||[],po=(null===(Wt=null==me?void 0:me.get_operation)||void 0===Wt?void 0:Wt.call(me))||"union",lo=(null===(Gt=null==me?void 0:me.get_keep_tool)||void 0===Gt?void 0:Gt.call(me))||!1,ho=uo.map(function(t){var e;return(null===(e=null==t?void 0:t.get_feature_id)||void 0===e?void 0:e.call(t))||""}),fo=_o.map(function(t){var e;return(null===(e=null==t?void 0:t.get_feature_id)||void 0===e?void 0:e.call(t))||""}),yo="difference"===po?"cut":"intersection"===po?"common":"fuse";ue.push("// Boolean (".concat(po,"): targets=[").concat(ho.map(function(t){return JSON.stringify(t)}).join(","),"], tools=[").concat(fo.map(function(t){return JSON.stringify(t)}).join(","),"]")),ue.push("(function() {"),ue.push(" let target_names = [".concat(ho.map(function(t){return"__id_to_name[".concat(JSON.stringify(t),"]")}).join(", "),"].filter(Boolean);")),ue.push(" let tool_names = [".concat(fo.map(function(t){return"__id_to_name[".concat(JSON.stringify(t),"]")}).join(", "),"].filter(Boolean);")),ue.push(' console.log("[part3d.js #'.concat(he," Boolean ").concat(fe.substring(0,8),"] (").concat(po,') target_names=", target_names, "tool_names=", tool_names);')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let target_nodes = target_names.map(function(name) { return root.getChildByName(name, true); }).filter(Boolean);"),ue.push(" let tool_nodes = tool_names.map(function(name) { return root.getChildByName(name, true); }).filter(Boolean);"),ue.push(' console.log("[part3d.js #'.concat(he," Boolean ").concat(fe.substring(0,8),'] found target_nodes=", target_nodes.length, "tool_nodes=", tool_nodes.length);')),ue.push(' if (target_nodes.length === 0 || tool_nodes.length === 0) { console.warn("[part3d.js #'.concat(he," Boolean ").concat(fe.substring(0,8),'] EARLY EXIT - missing nodes"); return; }')),ue.push(" // Clone shapes directly (matching FeatureNodeBoolean.run - no TC application)"),ue.push(' let target_shapes = target_nodes.map(function(nd) { let s = nd.get_topo_shape(); console.log("[part3d.js #'.concat(he," Boolean ").concat(fe.substring(0,8),'] target shape null?", !s || s.isNull()); return s ? s.clone() : null; }).filter(Boolean);')),ue.push(' let tool_shapes = tool_nodes.map(function(nd) { let s = nd.get_topo_shape(); console.log("[part3d.js #'.concat(he," Boolean ").concat(fe.substring(0,8),'] tool shape null?", !s || s.isNull()); return s ? s.clone() : null; }).filter(Boolean);')),ue.push(' if (target_shapes.length === 0 || tool_shapes.length === 0) { console.warn("[part3d.js #'.concat(he," Boolean ").concat(fe.substring(0,8),'] EARLY EXIT - null shapes"); return; }')),ue.push(" // Merge target shapes via fuse"),ue.push(" let merged_target_shape = target_shapes[0];"),ue.push(" for (let i = 1; i < target_shapes.length; i++) {"),ue.push(" merged_target_shape = parapoly_engine.ParaPolyShapeMaker.fuse(merged_target_shape, target_shapes[i]);"),ue.push(" }"),ue.push(" // Merge tool shapes via fuse"),ue.push(" let merged_tool_shape = tool_shapes[0];"),ue.push(" for (let i = 1; i < tool_shapes.length; i++) {"),ue.push(" merged_tool_shape = parapoly_engine.ParaPolyShapeMaker.fuse(merged_tool_shape, tool_shapes[i]);"),ue.push(" }"),ue.push(' console.log("[part3d.js #'.concat(he," Boolean ").concat(fe.substring(0,8),'] merged_target null?", !merged_target_shape || merged_target_shape.isNull(), "merged_tool null?", !merged_tool_shape || merged_tool_shape.isNull());')),ue.push(" // Final boolean operation"),ue.push(" let result_shape = parapoly_engine.ParaPolyShapeMaker[".concat(JSON.stringify(yo),"](merged_target_shape, merged_tool_shape);")),ue.push(' console.log("[part3d.js #'.concat(he," Boolean ").concat(fe.substring(0,8),'] result null?", !result_shape || result_shape.isNull());')),ue.push(" if (result_shape && !result_shape.isNull()) {"),ue.push(' let result_node = block3d_doc.push_node("union", '.concat(JSON.stringify("boolean_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result_node.set_topo_shape(result_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" // Save shapes before removing consumed originals"),ue.push(" target_names.forEach(function(name) { let nd = root.getChildByName(name, true); if (nd && nd.get_topo_shape) __saved_shapes[name] = { shape: nd.get_topo_shape(), tc: null }; });"),lo||ue.push(" tool_names.forEach(function(name) { let nd = root.getChildByName(name, true); if (nd && nd.get_topo_shape) __saved_shapes[name] = { shape: nd.get_topo_shape(), tc: null }; });"),ue.push(" // Remove consumed originals"),ue.push(" target_names.forEach(function(name) { block3d_doc.delete_node(name); });"),lo||ue.push(" tool_names.forEach(function(name) { block3d_doc.delete_node(name); });"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push(' } else { console.warn("[part3d.js #'.concat(he," Boolean ").concat(fe.substring(0,8),'] FAILED - result is null/empty"); }')),ue.push("})();")}else if(ye.indexOf("FeatureNodeTransform")>=0){Se=(null===(Vt=null==(mo=null===(qt=null===(Zt=null==me?void 0:me.get_feature_topo_items)||void 0===Zt?void 0:Zt.call(me))||void 0===qt?void 0:qt[0])?void 0:mo.get_feature_id)||void 0===Vt?void 0:Vt.call(mo))||"";var mo,go=null===(Jt=null==me?void 0:me.get_position)||void 0===Jt?void 0:Jt.call(me),vo=null===(Kt=null==me?void 0:me.get_rotation)||void 0===Kt?void 0:Kt.call(me),wo=null===(Ht=null==me?void 0:me.get_scale)||void 0===Ht?void 0:Ht.call(me);ue.push("if (__select_feature(".concat(JSON.stringify(Se),")) {")),ue.push(" let __nd = block3d_doc.selected_node;"),ue.push(" let __sh = __nd.get_topo_shape().clone();"),ue.push(' console.log("[part3d.js #'.concat(he," Transform ").concat(fe.substring(0,8),"] target=").concat(Se.substring(0,8),', shape null?", !__sh || __sh.isNull(), "translate=(').concat(t.n(null!==(Xt=null==go?void 0:go.x)&&void 0!==Xt?Xt:0),",").concat(t.n(null!==(Yt=null==go?void 0:go.y)&&void 0!==Yt?Yt:0),",").concat(t.n(null!==(Qt=null==go?void 0:go.z)&&void 0!==Qt?Qt:0),')");')),ue.push(" __sh.scale(".concat(t.n(null!==($t=null==wo?void 0:wo.x)&&void 0!==$t?$t:1),", ").concat(t.n(null!==(te=null==wo?void 0:wo.y)&&void 0!==te?te:1),", ").concat(t.n(null!==(ee=null==wo?void 0:wo.z)&&void 0!==ee?ee:1),");")),ue.push(" __sh.rotate(".concat(t.n(null!==(oe=null==vo?void 0:vo.x)&&void 0!==oe?oe:0),", ").concat(t.n(null!==(ne=null==vo?void 0:vo.y)&&void 0!==ne?ne:0),", ").concat(t.n(null!==(re=null==vo?void 0:vo.z)&&void 0!==re?re:0),", ").concat(t.n(null!==(ie=null==vo?void 0:vo.w)&&void 0!==ie?ie:1),");")),ue.push(" __sh.translate(".concat(t.n(null!==(se=null==go?void 0:go.x)&&void 0!==se?se:0),", ").concat(t.n(null!==(ae=null==go?void 0:go.y)&&void 0!==ae?ae:0),", ").concat(t.n(null!==(ce=null==go?void 0:go.z)&&void 0!==ce?ce:0),");")),ue.push(" __nd.set_topo_shape(__sh);"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push('} else { console.warn("[part3d.js #'.concat(he," Transform ").concat(fe.substring(0,8),"] target NOT FOUND: ").concat(Se.substring(0,8),'"); }'))}else ue.push("// Unsupported node in executable export: ".concat(JSON.stringify(ye)," (kept by fallback rebuild)."))}}return ue},t.export_sketch_lines=function(e){var o,n,r,i,s,a,c,u,_,p,l,h,d,f,y,m,g,v,w,b,C,x,P,S,k,E,O,N,j=[],F=e.getName?e.getName():"sketch",T=e.get_ax2?e.get_ax2():null,M=(null===(o=null==T?void 0:T.center)||void 0===o?void 0:o.toArray)?T.center.toArray():[0,0,0],A=(null===(n=null==T?void 0:T.direction)||void 0===n?void 0:n.toArray)?T.direction.toArray():[0,0,1];j.push("block3d_doc.start_sketch(".concat(JSON.stringify(F),", [").concat(t.n(M[0]),", ").concat(t.n(M[1]),", ").concat(t.n(M[2]),", ").concat(t.n(A[0]),", ").concat(t.n(A[1]),", ").concat(t.n(A[2]),"]);"));for(var D=e.get_geoms?e.get_geoms():null,B=(null==D?void 0:D.getChildren)?D.getChildren():[],I=0;I<B.length;I++){var R=B[I];if(R&&(!R.get_is_internal||!R.get_is_internal())){var z=R.getClassName?R.getClassName():"";if(z.indexOf("SkGeomPointNode")>=0){var L=null===(i=null===(r=R.component)||void 0===r?void 0:r.get_point)||void 0===i?void 0:i.call(r);j.push("block3d_doc.point(".concat(t.n(null==L?void 0:L.x),", ").concat(t.n(null==L?void 0:L.y),", ").concat(t.n(null==L?void 0:L.z),");"))}else if(z.indexOf("SkGeomLineNode")>=0){var U=null===(a=null===(s=R.component)||void 0===s?void 0:s.get_start_point)||void 0===a?void 0:a.call(s),W=null===(u=null===(c=R.component)||void 0===c?void 0:c.get_end_point)||void 0===u?void 0:u.call(c);j.push("block3d_doc.line_segment(".concat(t.n(null==U?void 0:U.x),", ").concat(t.n(null==U?void 0:U.y),", ").concat(t.n(null==U?void 0:U.z),", ").concat(t.n(null==W?void 0:W.x),", ").concat(t.n(null==W?void 0:W.y),", ").concat(t.n(null==W?void 0:W.z),");"))}else if(z.indexOf("SkGeomCircleNode")>=0){var G=null===(p=null===(_=R.component)||void 0===_?void 0:_.get_center)||void 0===p?void 0:p.call(_),Z=null===(h=null===(l=R.component)||void 0===l?void 0:l.get_radius)||void 0===h?void 0:h.call(l);j.push("block3d_doc.circle(".concat(t.n(null==G?void 0:G.x),", ").concat(t.n(null==G?void 0:G.y),", ").concat(t.n(null==G?void 0:G.z),", ").concat(t.n(Z),");"))}else if(z.indexOf("SkGeomEllipseNode")>=0){G=null===(f=null===(d=R.component)||void 0===d?void 0:d.get_center)||void 0===f?void 0:f.call(d);var q=null===(m=null===(y=R.component)||void 0===y?void 0:y.get_major_radius)||void 0===m?void 0:m.call(y),V=null===(v=null===(g=R.component)||void 0===g?void 0:g.get_minor_radius)||void 0===v?void 0:v.call(g);j.push("block3d_doc.ellipse(".concat(t.n(null==G?void 0:G.x),", ").concat(t.n(null==G?void 0:G.y),", ").concat(t.n(null==G?void 0:G.z),", ").concat(t.n(q),", ").concat(t.n(V),");"))}else if(z.indexOf("SkGeomArcNode")>=0){G=null===(b=null===(w=R.component)||void 0===w?void 0:w.get_center)||void 0===b?void 0:b.call(w),Z=null===(x=null===(C=R.component)||void 0===C?void 0:C.get_radius)||void 0===x?void 0:x.call(C);var J=(null===(S=null===(P=R.component)||void 0===P?void 0:P.get_start_angle)||void 0===S?void 0:S.call(P))||0,K=(null===(E=null===(k=R.component)||void 0===k?void 0:k.get_end_angle)||void 0===E?void 0:E.call(k))||0;j.push("block3d_doc.arc(".concat(t.n(null==G?void 0:G.x),", ").concat(t.n(null==G?void 0:G.y),", ").concat(t.n(null==G?void 0:G.z),", ").concat(t.n(Z),", ").concat(t.n(180*J/Math.PI),", ").concat(t.n(180*K/Math.PI),");"))}else if(z.indexOf("SkGeomBSplineNode")>=0){var H=R.get_poles?R.get_poles():[],X=(null===(N=null===(O=R.component)||void 0===O?void 0:O.get_is_closed)||void 0===N?void 0:N.call(O))||!1;j.push("block3d_doc.start_bspline(".concat(X?"true":"false",");"));for(var Y=0;Y<H.length;Y++){L=H[Y];j.push("block3d_doc.add_pole(".concat(t.n(null==L?void 0:L.x),", ").concat(t.n(null==L?void 0:L.y),", ").concat(t.n(null==L?void 0:L.z),");"))}j.push("block3d_doc.end_bspline();")}}}return j.push("block3d_doc.end_sketch();"),j},t.append_transform_lines=function(e,o){var n=o.get_transform_component?o.get_transform_component():null;if(n){var r=n.get_position?n.get_position():null;r&&(Math.abs(r.x)>1e-9||Math.abs(r.y)>1e-9||Math.abs(r.z)>1e-9)&&e.push("block3d_doc.translate(".concat(t.n(r.x),", ").concat(t.n(r.y),", ").concat(t.n(r.z),");"));var i=n.get_rotation?n.get_rotation():null;i&&(Math.abs(i.x)>1e-9||Math.abs(i.y)>1e-9||Math.abs(i.z)>1e-9||Math.abs(i.w-1)>1e-9)&&e.push("block3d_doc.rotate_by_quaternion(".concat(t.n(i.x),", ").concat(t.n(i.y),", ").concat(t.n(i.z),", ").concat(t.n(i.w),");"));var s=n.get_scale?n.get_scale():null;s&&(Math.abs(s.x-1)>1e-9||Math.abs(s.y-1)>1e-9||Math.abs(s.z-1)>1e-9)&&e.push("block3d_doc.scale(".concat(t.n(s.x),", ").concat(t.n(s.y),", ").concat(t.n(s.z),");"))}},t.extract_edges_and_target=function(t){var e,o,n,r,i="",s=[];if(!t||0===t.length)return{target_id:i,edges:s};i=(null===(o=null===(e=t[0])||void 0===e?void 0:e.get_feature_id)||void 0===o?void 0:o.call(e))||"";for(var a=0;a<t.length;a++){var c=null===(r=null===(n=t[a])||void 0===n?void 0:n.get_edge_index)||void 0===r?void 0:r.call(n);null!=c&&c>=0&&s.push(c)}return{target_id:i,edges:s}},t.extract_faces_and_target=function(t){var e,o,n,r,i="",s=[];if(!t||0===t.length)return{target_id:i,faces:s};i=(null===(o=null===(e=t[0])||void 0===e?void 0:e.get_feature_id)||void 0===o?void 0:o.call(e))||"";for(var a=0;a<t.length;a++){var c=null===(r=null===(n=t[a])||void 0===n?void 0:n.get_face_index)||void 0===r?void 0:r.call(n);null!=c&&c>=0&&s.push(c)}return{target_id:i,faces:s}},t.step_payload_base64=function(t){var e=Array.from(t||[]),o={data:JSON.stringify(e)};return btoa(JSON.stringify(o))},t.n=function(t){if(null==t||Number.isNaN(t))return"0";var e=Number(t);return Math.abs(e)<1e-12?"0":String(e)},t.summarize_feature_node=function(e,o){var n=o.getClassName?o.getClassName():"UnknownNode",r=o.get_label?o.get_label():o.getName?o.getName():"",i=o.get_op?o.get_op():"",s=o.get_color?o.get_color():"",a=o.get_feature_component?o.get_feature_component():null,c=t.summarize_feature_component(a),u=[];return u.push("[".concat(e,"] ").concat(n)),r&&u.push("label=".concat(JSON.stringify(r))),i&&u.push("op=".concat(i)),s&&u.push("color=".concat(s)),c&&u.push(c),"// ".concat(u.join(" | "))},t.summarize_feature_component=function(e){var o,n,r,i,s,a,c,u,_,p,l,h,d,f,y,m,g,v,w,b,C,x,P,S,k,E,O,N,j,F,T,M,A,D;if(!e)return"";var B=[];t.push_if_defined(B,"x",null===(o=e.get_x_length)||void 0===o?void 0:o.call(e)),t.push_if_defined(B,"y",null===(n=e.get_y_length)||void 0===n?void 0:n.call(e)),t.push_if_defined(B,"z",null===(r=e.get_z_length)||void 0===r?void 0:r.call(e)),t.push_if_defined(B,"radius",null===(i=e.get_radius)||void 0===i?void 0:i.call(e)),t.push_if_defined(B,"radius1",null===(s=e.get_radius1)||void 0===s?void 0:s.call(e)),t.push_if_defined(B,"radius2",null===(a=e.get_radius2)||void 0===a?void 0:a.call(e)),t.push_if_defined(B,"top_radius",null===(c=e.get_top_radius)||void 0===c?void 0:c.call(e)),t.push_if_defined(B,"bottom_radius",null===(u=e.get_bottom_radius)||void 0===u?void 0:u.call(e)),t.push_if_defined(B,"height",null===(_=e.get_height)||void 0===_?void 0:_.call(e)),t.push_if_defined(B,"top_w",null===(p=e.get_top_w)||void 0===p?void 0:p.call(e)),t.push_if_defined(B,"bottom_w",null===(l=e.get_bottom_w)||void 0===l?void 0:l.call(e)),t.push_if_defined(B,"depth",null===(h=e.get_depth)||void 0===h?void 0:h.call(e)),t.push_if_defined(B,"hight",null===(d=e.get_hight)||void 0===d?void 0:d.call(e)),t.push_if_defined(B,"edges",null===(f=e.get_edges)||void 0===f?void 0:f.call(e)),t.push_if_defined(B,"value",null===(y=e.get_value)||void 0===y?void 0:y.call(e)),t.push_if_defined(B,"solid",null===(m=e.get_solid)||void 0===m?void 0:m.call(e)),t.push_if_defined(B,"inward",null===(g=e.get_inward)||void 0===g?void 0:g.call(e)),t.push_if_defined(B,"reverse",null===(v=e.get_reverse)||void 0===v?void 0:v.call(e)),t.push_if_defined(B,"keep_original",null===(w=e.get_keep_original)||void 0===w?void 0:w.call(e)),t.push_if_defined(B,"keep_tool",null===(b=e.get_keep_tool)||void 0===b?void 0:b.call(e)),t.push_if_defined(B,"operation",null===(C=e.get_operation)||void 0===C?void 0:C.call(e)),t.push_if_defined(B,"mode",null===(x=e.get_mode)||void 0===x?void 0:x.call(e)),t.push_if_defined(B,"axis",null===(P=e.get_axis)||void 0===P?void 0:P.call(e)),t.push_if_defined(B,"pitch",null===(S=e.get_pitch)||void 0===S?void 0:S.call(e)),t.push_if_defined(B,"angle",null===(k=e.get_angle)||void 0===k?void 0:k.call(e)),t.push_if_defined(B,"left_hand",null===(E=e.get_left_hand)||void 0===E?void 0:E.call(e)),t.push_if_defined(B,"reversed",null===(O=e.get_reversed)||void 0===O?void 0:O.call(e)),t.push_if_defined(B,"step_bytes",null===(j=null===(N=e.get_content)||void 0===N?void 0:N.call(e))||void 0===j?void 0:j.length);var I=null===(F=e.get_feature_topo_items)||void 0===F?void 0:F.call(e);(null==I?void 0:I.length)&&B.push("topo_items=".concat(I.length));var R=null===(T=e.get_path_feature_topo_items)||void 0===T?void 0:T.call(e);(null==R?void 0:R.length)&&B.push("path_items=".concat(R.length));var z=null===(M=e.get_profile_feature_topo_items)||void 0===M?void 0:M.call(e);(null==z?void 0:z.length)&&B.push("profile_items=".concat(z.length));var L=null===(A=e.get_target_feature_topo_items)||void 0===A?void 0:A.call(e);(null==L?void 0:L.length)&&B.push("target_items=".concat(L.length));var U=null===(D=e.get_tool_feature_topo_items)||void 0===D?void 0:D.call(e);return(null==U?void 0:U.length)&&B.push("tool_items=".concat(U.length)),B.join(", ")},t.push_if_defined=function(e,o,n){null!=n&&e.push("".concat(o,"=").concat(t.to_simple_value(n)))},t.to_simple_value=function(e){if("number"==typeof e)return String(Math.round(1e4*e)/1e4);if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return JSON.stringify(e);if(Array.isArray(e)){var o=e.map(function(e){return t.to_simple_value(e)});return"[".concat(o.join(","),"]")}return e&&"object"==typeof e?e.toArray?t.to_simple_value(e.toArray()):JSON.stringify(e):String(e)},t}(),SketchCodeExporter=function(){function t(){}return t.export=function(e){var o,n,r=[];r.push("// This .sketch3d.js file contains exactly ONE sketch (start_sketch/end_sketch pair)."),r.push("// All geometry and constraints belong to this single sketch context."),r.push("let main = function() {"),r.push(" let block3d_doc = new PartBlock3dDocument();");var i=e.get_ax2(),s=(null===(o=null==i?void 0:i.center)||void 0===o?void 0:o.toArray)?i.center.toArray():[0,0,0],a=(null===(n=null==i?void 0:i.direction)||void 0===n?void 0:n.toArray)?i.direction.toArray():[0,0,1];r.push(' block3d_doc.start_sketch("sketch", ['.concat(t.n(s[0]),", ").concat(t.n(s[1]),", ").concat(t.n(s[2]),", ").concat(t.n(a[0]),", ").concat(t.n(a[1]),", ").concat(t.n(a[2]),"]);")),r.push("");for(var c=e.get_geoms().getChildren(),u=new Map,_=0;_<c.length;_++){var p=c[_],l=p.className,h=p.get_geom_id();if(!p.get_is_internal||!p.get_is_internal()){var d="g".concat(h);if(u.set(h,d),l===ClassNames.Z.SkGeomPointNode){var f=p.component.get_point();r.push(" let ".concat(d," = block3d_doc.point(").concat(t.n(f.x),", ").concat(t.n(f.y),", ").concat(t.n(f.z),");"))}else if(l===ClassNames.Z.SkGeomLineNode){var y=p.component.get_start_point(),m=p.component.get_end_point();r.push(" let ".concat(d," = block3d_doc.line_segment(").concat(t.n(y.x),", ").concat(t.n(y.y),", ").concat(t.n(y.z),", ").concat(t.n(m.x),", ").concat(t.n(m.y),", ").concat(t.n(m.z),");"))}else if(l===ClassNames.Z.SkGeomCircleNode){var g=p.component.get_center(),v=p.component.get_radius();r.push(" let ".concat(d," = block3d_doc.circle(").concat(t.n(g.x),", ").concat(t.n(g.y),", ").concat(t.n(g.z),", ").concat(t.n(v),");"))}else if(l===ClassNames.Z.SkGeomEllipseNode){var w=p.component.get_center(),b=p.component.get_major_radius(),C=p.component.get_minor_radius();r.push(" let ".concat(d," = block3d_doc.ellipse(").concat(t.n(w.x),", ").concat(t.n(w.y),", ").concat(t.n(w.z),", ").concat(t.n(b),", ").concat(t.n(C),");"))}else if(l===ClassNames.Z.SkGeomArcNode){var x=p.component.get_center(),P=(v=p.component.get_radius(),p.component.get_start_angle()),S=p.component.get_end_angle();r.push(" let ".concat(d," = block3d_doc.arc(").concat(t.n(x.x),", ").concat(t.n(x.y),", ").concat(t.n(x.z),", ").concat(t.n(v),", ").concat(t.n(180*P/Math.PI),", ").concat(t.n(180*S/Math.PI),");"))}else if(l===ClassNames.Z.SkGeomBSplineNode){var k=p.get_poles(),E=p.component.get_is_closed();r.push(" block3d_doc.start_bspline(".concat(E,");"));for(var O=0,N=k;O<N.length;O++){f=N[O];r.push(" block3d_doc.add_pole(".concat(t.n(f.x),", ").concat(t.n(f.y),", ").concat(t.n(f.z),");"))}r.push(" block3d_doc.end_bspline();"),u.delete(h)}}}var j=e.get_constraints().getChildren();j.length>0&&(r.push(""),r.push(" // Constraints"));for(_=0;_<j.length;_++){var F=j[_],T=F.get_type(),M=F.get_first(),A=F.get_first_pos(),D=F.get_second(),B=F.get_second_pos(),I=F.get_value();if(T!==Constraint.uF.InternalAlignment){var R=t.exportConstraint(T,M,A,D,B,I,u);R&&r.push(" ".concat(R))}}return r.push(""),r.push(" block3d_doc.end_sketch();"),r.push(" return block3d_doc;"),r.push("};"),r.join("\n")},t.n=function(t){if(null==t||Number.isNaN(t))return"0";var e=Number(t);return Math.abs(e)<1e-12?"0":String(e)},t.pp=function(t){switch(t){case Constraint.lg.none:return"PointPos.none";case Constraint.lg.start:return"PointPos.start";case Constraint.lg.end:return"PointPos.end";case Constraint.lg.mid:return"PointPos.mid";default:return"PointPos.none"}},t.gv=function(t,e){return e.get(t)||String(t)},t.exportConstraint=function(e,o,n,r,i,s,a){var c=t.gv(o,a),u=t.gv(r,a),_=t.pp(n),p=t.pp(i);switch(e){case Constraint.uF.Coincident:return"block3d_doc.constraint_coincident(".concat(u,", ").concat(p,", ").concat(c,", ").concat(_,");");case Constraint.uF.Horizontal:return void 0!==r&&r>=0&&n!==Constraint.lg.none?"block3d_doc.constraint_horizontal_points(".concat(c,", ").concat(_,", ").concat(u,", ").concat(p,");"):"block3d_doc.constraint_horizontal(".concat(c,");");case Constraint.uF.Vertical:return void 0!==r&&r>=0&&n!==Constraint.lg.none?"block3d_doc.constraint_vertical_points(".concat(c,", ").concat(_,", ").concat(u,", ").concat(p,");"):"block3d_doc.constraint_vertical(".concat(c,");");case Constraint.uF.Distance:return void 0!==r&&r>=0?n!==Constraint.lg.none&&i!==Constraint.lg.none?"block3d_doc.constraint_distance_points(".concat(c,", ").concat(_,", ").concat(u,", ").concat(p,", ").concat(s,");"):"block3d_doc.constraint_distance_point_to_line(".concat(c,", ").concat(_,", ").concat(u,", ").concat(s,");"):"block3d_doc.constraint_distance(".concat(c,", ").concat(s,");");case Constraint.uF.DistanceX:return void 0!==r&&r>=0?"block3d_doc.constraint_distance_h_points(".concat(c,", ").concat(_,", ").concat(u,", ").concat(p,", ").concat(s,");"):"block3d_doc.constraint_distance_h(".concat(c,", ").concat(s,");");case Constraint.uF.DistanceY:return void 0!==r&&r>=0?"block3d_doc.constraint_distance_v_points(".concat(c,", ").concat(_,", ").concat(u,", ").concat(p,", ").concat(s,");"):"block3d_doc.constraint_distance_v(".concat(c,", ").concat(s,");");case Constraint.uF.Radius:return"block3d_doc.constraint_radius(".concat(c,", ").concat(s,");");case Constraint.uF.Diameter:return"block3d_doc.constraint_diameter(".concat(c,", ").concat(s,");");case Constraint.uF.Parallel:return"block3d_doc.constraint_parallel(".concat(c,", ").concat(u,");");case Constraint.uF.Perpendicular:return"block3d_doc.constraint_perpendicular(".concat(c,", ").concat(u,");");case Constraint.uF.Equal:return"block3d_doc.constraint_equal(".concat(c,", ").concat(u,");");case Constraint.uF.Tangent:return"block3d_doc.constraint_tangent(".concat(c,", ").concat(u,");");case Constraint.uF.Angle:return void 0!==r&&r>=0?"block3d_doc.constraint_angle_lines(".concat(c,", ").concat(u,", ").concat(s,");"):"block3d_doc.constraint_angle(".concat(c,", ").concat(s,");");case Constraint.uF.PointOnObject:return"block3d_doc.constraint_point_on_object(".concat(c,", ").concat(_,", ").concat(u,");");case Constraint.uF.Symmetric:return"block3d_doc.constraint_symmetric(".concat(c,", ").concat(_,", ").concat(r,", ").concat(u,", ").concat(p,");");default:return"// Unsupported constraint type: ".concat(e)}},t}();return __webpack_exports__})());
7
+ const n=1e3,r=1001,i=1002,s=2300,a=2301,c=2302,u=2400,_=2401,p=2402,l="srgb",h="srgb-linear",d="linear",f="srgb",y=2e3,m=2001;class g{addEventListener(t,e){void 0===this._listeners&&(this._listeners={});const o=this._listeners;void 0===o[t]&&(o[t]=[]),-1===o[t].indexOf(e)&&o[t].push(e)}hasEventListener(t,e){const o=this._listeners;return void 0!==o&&(void 0!==o[t]&&-1!==o[t].indexOf(e))}removeEventListener(t,e){const o=this._listeners;if(void 0===o)return;const n=o[t];if(void 0!==n){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}dispatchEvent(t){const e=this._listeners;if(void 0===e)return;const o=e[t.type];if(void 0!==o){t.target=this;const e=o.slice(0);for(let o=0,n=e.length;o<n;o++)e[o].call(this,t);t.target=null}}}const v=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];Math.PI,Math.PI;function w(){const t=4294967295*Math.random()|0,e=4294967295*Math.random()|0,o=4294967295*Math.random()|0,n=4294967295*Math.random()|0;return(v[255&t]+v[t>>8&255]+v[t>>16&255]+v[t>>24&255]+"-"+v[255&e]+v[e>>8&255]+"-"+v[e>>16&15|64]+v[e>>24&255]+"-"+v[63&o|128]+v[o>>8&255]+"-"+v[o>>16&255]+v[o>>24&255]+v[255&n]+v[n>>8&255]+v[n>>16&255]+v[n>>24&255]).toLowerCase()}function b(t,e,o){return Math.max(e,Math.min(o,t))}function C(t,e){return(t%e+e)%e}function x(t,e,o){return(1-o)*t+o*e}class P{constructor(t=0,e=0){P.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,o=this.y,n=t.elements;return this.x=n[0]*e+n[3]*o+n[6],this.y=n[1]*e+n[4]*o+n[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=b(this.x,t.x,e.x),this.y=b(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=b(this.x,t,e),this.y=b(this.y,t,e),this}clampLength(t,e){const o=this.length();return this.divideScalar(o||1).multiplyScalar(b(o,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const o=this.dot(t)/e;return Math.acos(b(o,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,o=this.y-t.y;return e*e+o*o}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,o){return this.x=t.x+(e.x-t.x)*o,this.y=t.y+(e.y-t.y)*o,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const o=Math.cos(e),n=Math.sin(e),r=this.x-t.x,i=this.y-t.y;return this.x=r*o-i*n+t.x,this.y=r*n+i*o+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class S{constructor(t=0,e=0,o=0,n=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=o,this._w=n}static slerpFlat(t,e,o,n,r,i,s){let a=o[n+0],c=o[n+1],u=o[n+2],_=o[n+3];const p=r[i+0],l=r[i+1],h=r[i+2],d=r[i+3];if(0===s)return t[e+0]=a,t[e+1]=c,t[e+2]=u,void(t[e+3]=_);if(1===s)return t[e+0]=p,t[e+1]=l,t[e+2]=h,void(t[e+3]=d);if(_!==d||a!==p||c!==l||u!==h){let t=1-s;const e=a*p+c*l+u*h+_*d,o=e>=0?1:-1,n=1-e*e;if(n>Number.EPSILON){const r=Math.sqrt(n),i=Math.atan2(r,e*o);t=Math.sin(t*i)/r,s=Math.sin(s*i)/r}const r=s*o;if(a=a*t+p*r,c=c*t+l*r,u=u*t+h*r,_=_*t+d*r,t===1-s){const t=1/Math.sqrt(a*a+c*c+u*u+_*_);a*=t,c*=t,u*=t,_*=t}}t[e]=a,t[e+1]=c,t[e+2]=u,t[e+3]=_}static multiplyQuaternionsFlat(t,e,o,n,r,i){const s=o[n],a=o[n+1],c=o[n+2],u=o[n+3],_=r[i],p=r[i+1],l=r[i+2],h=r[i+3];return t[e]=s*h+u*_+a*l-c*p,t[e+1]=a*h+u*p+c*_-s*l,t[e+2]=c*h+u*l+s*p-a*_,t[e+3]=u*h-s*_-a*p-c*l,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,o,n){return this._x=t,this._y=e,this._z=o,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const o=t._x,n=t._y,r=t._z,i=t._order,s=Math.cos,a=Math.sin,c=s(o/2),u=s(n/2),_=s(r/2),p=a(o/2),l=a(n/2),h=a(r/2);switch(i){case"XYZ":this._x=p*u*_+c*l*h,this._y=c*l*_-p*u*h,this._z=c*u*h+p*l*_,this._w=c*u*_-p*l*h;break;case"YXZ":this._x=p*u*_+c*l*h,this._y=c*l*_-p*u*h,this._z=c*u*h-p*l*_,this._w=c*u*_+p*l*h;break;case"ZXY":this._x=p*u*_-c*l*h,this._y=c*l*_+p*u*h,this._z=c*u*h+p*l*_,this._w=c*u*_-p*l*h;break;case"ZYX":this._x=p*u*_-c*l*h,this._y=c*l*_+p*u*h,this._z=c*u*h-p*l*_,this._w=c*u*_+p*l*h;break;case"YZX":this._x=p*u*_+c*l*h,this._y=c*l*_+p*u*h,this._z=c*u*h-p*l*_,this._w=c*u*_-p*l*h;break;case"XZY":this._x=p*u*_-c*l*h,this._y=c*l*_-p*u*h,this._z=c*u*h+p*l*_,this._w=c*u*_+p*l*h;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+i)}return!0===e&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const o=e/2,n=Math.sin(o);return this._x=t.x*n,this._y=t.y*n,this._z=t.z*n,this._w=Math.cos(o),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,o=e[0],n=e[4],r=e[8],i=e[1],s=e[5],a=e[9],c=e[2],u=e[6],_=e[10],p=o+s+_;if(p>0){const t=.5/Math.sqrt(p+1);this._w=.25/t,this._x=(u-a)*t,this._y=(r-c)*t,this._z=(i-n)*t}else if(o>s&&o>_){const t=2*Math.sqrt(1+o-s-_);this._w=(u-a)/t,this._x=.25*t,this._y=(n+i)/t,this._z=(r+c)/t}else if(s>_){const t=2*Math.sqrt(1+s-o-_);this._w=(r-c)/t,this._x=(n+i)/t,this._y=.25*t,this._z=(a+u)/t}else{const t=2*Math.sqrt(1+_-o-s);this._w=(i-n)/t,this._x=(r+c)/t,this._y=(a+u)/t,this._z=.25*t}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let o=t.dot(e)+1;return o<Number.EPSILON?(o=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=o):(this._x=0,this._y=-t.z,this._z=t.y,this._w=o)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=o),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(b(this.dot(t),-1,1)))}rotateTowards(t,e){const o=this.angleTo(t);if(0===o)return this;const n=Math.min(1,e/o);return this.slerp(t,n),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const o=t._x,n=t._y,r=t._z,i=t._w,s=e._x,a=e._y,c=e._z,u=e._w;return this._x=o*u+i*s+n*c-r*a,this._y=n*u+i*a+r*s-o*c,this._z=r*u+i*c+o*a-n*s,this._w=i*u-o*s-n*a-r*c,this._onChangeCallback(),this}slerp(t,e){if(0===e)return this;if(1===e)return this.copy(t);const o=this._x,n=this._y,r=this._z,i=this._w;let s=i*t._w+o*t._x+n*t._y+r*t._z;if(s<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,s=-s):this.copy(t),s>=1)return this._w=i,this._x=o,this._y=n,this._z=r,this;const a=1-s*s;if(a<=Number.EPSILON){const t=1-e;return this._w=t*i+e*this._w,this._x=t*o+e*this._x,this._y=t*n+e*this._y,this._z=t*r+e*this._z,this.normalize(),this}const c=Math.sqrt(a),u=Math.atan2(c,s),_=Math.sin((1-e)*u)/c,p=Math.sin(e*u)/c;return this._w=i*_+this._w*p,this._x=o*_+this._x*p,this._y=n*_+this._y*p,this._z=r*_+this._z*p,this._onChangeCallback(),this}slerpQuaternions(t,e,o){return this.copy(t).slerp(e,o)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),o=Math.random(),n=Math.sqrt(1-o),r=Math.sqrt(o);return this.set(n*Math.sin(t),n*Math.cos(t),r*Math.sin(e),r*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class k{constructor(t=0,e=0,o=0){k.prototype.isVector3=!0,this.x=t,this.y=e,this.z=o}set(t,e,o){return void 0===o&&(o=this.z),this.x=t,this.y=e,this.z=o,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(O.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(O.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,o=this.y,n=this.z,r=t.elements;return this.x=r[0]*e+r[3]*o+r[6]*n,this.y=r[1]*e+r[4]*o+r[7]*n,this.z=r[2]*e+r[5]*o+r[8]*n,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,o=this.y,n=this.z,r=t.elements,i=1/(r[3]*e+r[7]*o+r[11]*n+r[15]);return this.x=(r[0]*e+r[4]*o+r[8]*n+r[12])*i,this.y=(r[1]*e+r[5]*o+r[9]*n+r[13])*i,this.z=(r[2]*e+r[6]*o+r[10]*n+r[14])*i,this}applyQuaternion(t){const e=this.x,o=this.y,n=this.z,r=t.x,i=t.y,s=t.z,a=t.w,c=2*(i*n-s*o),u=2*(s*e-r*n),_=2*(r*o-i*e);return this.x=e+a*c+i*_-s*u,this.y=o+a*u+s*c-r*_,this.z=n+a*_+r*u-i*c,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,o=this.y,n=this.z,r=t.elements;return this.x=r[0]*e+r[4]*o+r[8]*n,this.y=r[1]*e+r[5]*o+r[9]*n,this.z=r[2]*e+r[6]*o+r[10]*n,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=b(this.x,t.x,e.x),this.y=b(this.y,t.y,e.y),this.z=b(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=b(this.x,t,e),this.y=b(this.y,t,e),this.z=b(this.z,t,e),this}clampLength(t,e){const o=this.length();return this.divideScalar(o||1).multiplyScalar(b(o,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,o){return this.x=t.x+(e.x-t.x)*o,this.y=t.y+(e.y-t.y)*o,this.z=t.z+(e.z-t.z)*o,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const o=t.x,n=t.y,r=t.z,i=e.x,s=e.y,a=e.z;return this.x=n*a-r*s,this.y=r*i-o*a,this.z=o*s-n*i,this}projectOnVector(t){const e=t.lengthSq();if(0===e)return this.set(0,0,0);const o=t.dot(this)/e;return this.copy(t).multiplyScalar(o)}projectOnPlane(t){return E.copy(this).projectOnVector(t),this.sub(E)}reflect(t){return this.sub(E.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const o=this.dot(t)/e;return Math.acos(b(o,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,o=this.y-t.y,n=this.z-t.z;return e*e+o*o+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,o){const n=Math.sin(e)*t;return this.x=n*Math.sin(o),this.y=Math.cos(e)*t,this.z=n*Math.cos(o),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,o){return this.x=t*Math.sin(e),this.y=o,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),o=this.setFromMatrixColumn(t,1).length(),n=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=o,this.z=n,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,4*e)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,3*e)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=2*Math.random()-1,o=Math.sqrt(1-e*e);return this.x=o*Math.cos(t),this.y=e,this.z=o*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const E=new k,O=new S;class N{constructor(t,e,o,n,r,i,s,a,c){N.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==t&&this.set(t,e,o,n,r,i,s,a,c)}set(t,e,o,n,r,i,s,a,c){const u=this.elements;return u[0]=t,u[1]=n,u[2]=s,u[3]=e,u[4]=r,u[5]=a,u[6]=o,u[7]=i,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,o=t.elements;return e[0]=o[0],e[1]=o[1],e[2]=o[2],e[3]=o[3],e[4]=o[4],e[5]=o[5],e[6]=o[6],e[7]=o[7],e[8]=o[8],this}extractBasis(t,e,o){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),o.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const o=t.elements,n=e.elements,r=this.elements,i=o[0],s=o[3],a=o[6],c=o[1],u=o[4],_=o[7],p=o[2],l=o[5],h=o[8],d=n[0],f=n[3],y=n[6],m=n[1],g=n[4],v=n[7],w=n[2],b=n[5],C=n[8];return r[0]=i*d+s*m+a*w,r[3]=i*f+s*g+a*b,r[6]=i*y+s*v+a*C,r[1]=c*d+u*m+_*w,r[4]=c*f+u*g+_*b,r[7]=c*y+u*v+_*C,r[2]=p*d+l*m+h*w,r[5]=p*f+l*g+h*b,r[8]=p*y+l*v+h*C,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],o=t[1],n=t[2],r=t[3],i=t[4],s=t[5],a=t[6],c=t[7],u=t[8];return e*i*u-e*s*c-o*r*u+o*s*a+n*r*c-n*i*a}invert(){const t=this.elements,e=t[0],o=t[1],n=t[2],r=t[3],i=t[4],s=t[5],a=t[6],c=t[7],u=t[8],_=u*i-s*c,p=s*a-u*r,l=c*r-i*a,h=e*_+o*p+n*l;if(0===h)return this.set(0,0,0,0,0,0,0,0,0);const d=1/h;return t[0]=_*d,t[1]=(n*c-u*o)*d,t[2]=(s*o-n*i)*d,t[3]=p*d,t[4]=(u*e-n*a)*d,t[5]=(n*r-s*e)*d,t[6]=l*d,t[7]=(o*a-c*e)*d,t[8]=(i*e-o*r)*d,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,o,n,r,i,s){const a=Math.cos(r),c=Math.sin(r);return this.set(o*a,o*c,-o*(a*i+c*s)+i+t,-n*c,n*a,-n*(-c*i+a*s)+s+e,0,0,1),this}scale(t,e){return this.premultiply(j.makeScale(t,e)),this}rotate(t){return this.premultiply(j.makeRotation(-t)),this}translate(t,e){return this.premultiply(j.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),o=Math.sin(t);return this.set(e,-o,0,o,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,o=t.elements;for(let t=0;t<9;t++)if(e[t]!==o[t])return!1;return!0}fromArray(t,e=0){for(let o=0;o<9;o++)this.elements[o]=t[o+e];return this}toArray(t=[],e=0){const o=this.elements;return t[e]=o[0],t[e+1]=o[1],t[e+2]=o[2],t[e+3]=o[3],t[e+4]=o[4],t[e+5]=o[5],t[e+6]=o[6],t[e+7]=o[7],t[e+8]=o[8],t}clone(){return(new this.constructor).fromArray(this.elements)}}const j=new N;Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;function F(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}const T={};function M(t){t in T||(T[t]=!0,console.warn(t))}const A=(new N).set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),B=(new N).set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function D(){const t={enabled:!0,workingColorSpace:h,spaces:{},convert:function(t,e,o){return!1!==this.enabled&&e!==o&&e&&o?(this.spaces[e].transfer===f&&(t.r=R(t.r),t.g=R(t.g),t.b=R(t.b)),this.spaces[e].primaries!==this.spaces[o].primaries&&(t.applyMatrix3(this.spaces[e].toXYZ),t.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===f&&(t.r=z(t.r),t.g=z(t.g),t.b=z(t.b)),t):t},workingToColorSpace:function(t,e){return this.convert(t,this.workingColorSpace,e)},colorSpaceToWorking:function(t,e){return this.convert(t,e,this.workingColorSpace)},getPrimaries:function(t){return this.spaces[t].primaries},getTransfer:function(t){return""===t?d:this.spaces[t].transfer},getLuminanceCoefficients:function(t,e=this.workingColorSpace){return t.fromArray(this.spaces[e].luminanceCoefficients)},define:function(t){Object.assign(this.spaces,t)},_getMatrix:function(t,e,o){return t.copy(this.spaces[e].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(t){return this.spaces[t].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(t=this.workingColorSpace){return this.spaces[t].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(e,o){return M("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),t.workingToColorSpace(e,o)},toWorkingColorSpace:function(e,o){return M("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),t.colorSpaceToWorking(e,o)}},e=[.64,.33,.3,.6,.15,.06],o=[.2126,.7152,.0722],n=[.3127,.329];return t.define({[h]:{primaries:e,whitePoint:n,transfer:d,toXYZ:A,fromXYZ:B,luminanceCoefficients:o,workingColorSpaceConfig:{unpackColorSpace:l},outputColorSpaceConfig:{drawingBufferColorSpace:l}},[l]:{primaries:e,whitePoint:n,transfer:f,toXYZ:A,fromXYZ:B,luminanceCoefficients:o,outputColorSpaceConfig:{drawingBufferColorSpace:l}}}),t}const I=D();function R(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function z(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}let L;class U{static getDataURL(t,e="image/png"){if(/^data:/i.test(t.src))return t.src;if("undefined"==typeof HTMLCanvasElement)return t.src;let o;if(t instanceof HTMLCanvasElement)o=t;else{void 0===L&&(L=F("canvas")),L.width=t.width,L.height=t.height;const e=L.getContext("2d");t instanceof ImageData?e.putImageData(t,0,0):e.drawImage(t,0,0,t.width,t.height),o=L}return o.toDataURL(e)}static sRGBToLinear(t){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const e=F("canvas");e.width=t.width,e.height=t.height;const o=e.getContext("2d");o.drawImage(t,0,0,t.width,t.height);const n=o.getImageData(0,0,t.width,t.height),r=n.data;for(let t=0;t<r.length;t++)r[t]=255*R(r[t]/255);return o.putImageData(n,0,0),e}if(t.data){const e=t.data.slice(0);for(let t=0;t<e.length;t++)e instanceof Uint8Array||e instanceof Uint8ClampedArray?e[t]=Math.floor(255*R(e[t]/255)):e[t]=R(e[t]);return{data:e,width:t.width,height:t.height}}return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}}let W=0;class G{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:W++}),this.uuid=w(),this.data=t,this.dataReady=!0,this.version=0}getSize(t){const e=this.data;return e instanceof HTMLVideoElement?t.set(e.videoWidth,e.videoHeight):null!==e?t.set(e.width,e.height,e.depth||0):t.set(0,0,0),t}set needsUpdate(t){!0===t&&this.version++}toJSON(t){const e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.images[this.uuid])return t.images[this.uuid];const o={uuid:this.uuid,url:""},n=this.data;if(null!==n){let t;if(Array.isArray(n)){t=[];for(let e=0,o=n.length;e<o;e++)n[e].isDataTexture?t.push(Z(n[e].image)):t.push(Z(n[e]))}else t=Z(n);o.url=t}return e||(t.images[this.uuid]=o),o}}function Z(t){return"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?U.getDataURL(t):t.data?{data:Array.from(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let q=0;const V=new k;class J extends g{constructor(t=J.DEFAULT_IMAGE,e=J.DEFAULT_MAPPING,o=1001,n=1001,r=1006,i=1008,s=1023,a=1009,c=J.DEFAULT_ANISOTROPY,u=""){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:q++}),this.uuid=w(),this.name="",this.source=new G(t),this.mipmaps=[],this.mapping=e,this.channel=0,this.wrapS=o,this.wrapT=n,this.magFilter=r,this.minFilter=i,this.anisotropy=c,this.format=s,this.internalFormat=null,this.type=a,this.offset=new P(0,0),this.repeat=new P(1,1),this.center=new P(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new N,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(V).x}get height(){return this.source.getSize(V).y}get depth(){return this.source.getSize(V).z}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return(new this.constructor).copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(const e in t){const o=t[e];if(void 0===o){console.warn(`THREE.Texture.setValues(): parameter '${e}' has value of undefined.`);continue}const n=this[e];void 0!==n?n&&o&&n.isVector2&&o.isVector2||n&&o&&n.isVector3&&o.isVector3||n&&o&&n.isMatrix3&&o.isMatrix3?n.copy(o):this[e]=o:console.warn(`THREE.Texture.setValues(): property '${e}' does not exist.`)}}toJSON(t){const e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];const o={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(o.userData=this.userData),e||(t.textures[this.uuid]=o),o}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(300!==this.mapping)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case n:t.x=t.x-Math.floor(t.x);break;case r:t.x=t.x<0?0:1;break;case i:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case n:t.y=t.y-Math.floor(t.y);break;case r:t.y=t.y<0?0:1;break;case i:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){!0===t&&this.pmremVersion++}}J.DEFAULT_IMAGE=null,J.DEFAULT_MAPPING=300,J.DEFAULT_ANISOTROPY=1;Symbol.iterator;class K{constructor(t,e,o,n,r,i,s,a,c,u,_,p,l,h,d,f){K.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==t&&this.set(t,e,o,n,r,i,s,a,c,u,_,p,l,h,d,f)}set(t,e,o,n,r,i,s,a,c,u,_,p,l,h,d,f){const y=this.elements;return y[0]=t,y[4]=e,y[8]=o,y[12]=n,y[1]=r,y[5]=i,y[9]=s,y[13]=a,y[2]=c,y[6]=u,y[10]=_,y[14]=p,y[3]=l,y[7]=h,y[11]=d,y[15]=f,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new K).fromArray(this.elements)}copy(t){const e=this.elements,o=t.elements;return e[0]=o[0],e[1]=o[1],e[2]=o[2],e[3]=o[3],e[4]=o[4],e[5]=o[5],e[6]=o[6],e[7]=o[7],e[8]=o[8],e[9]=o[9],e[10]=o[10],e[11]=o[11],e[12]=o[12],e[13]=o[13],e[14]=o[14],e[15]=o[15],this}copyPosition(t){const e=this.elements,o=t.elements;return e[12]=o[12],e[13]=o[13],e[14]=o[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,o){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),o.setFromMatrixColumn(this,2),this}makeBasis(t,e,o){return this.set(t.x,e.x,o.x,0,t.y,e.y,o.y,0,t.z,e.z,o.z,0,0,0,0,1),this}extractRotation(t){const e=this.elements,o=t.elements,n=1/H.setFromMatrixColumn(t,0).length(),r=1/H.setFromMatrixColumn(t,1).length(),i=1/H.setFromMatrixColumn(t,2).length();return e[0]=o[0]*n,e[1]=o[1]*n,e[2]=o[2]*n,e[3]=0,e[4]=o[4]*r,e[5]=o[5]*r,e[6]=o[6]*r,e[7]=0,e[8]=o[8]*i,e[9]=o[9]*i,e[10]=o[10]*i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,o=t.x,n=t.y,r=t.z,i=Math.cos(o),s=Math.sin(o),a=Math.cos(n),c=Math.sin(n),u=Math.cos(r),_=Math.sin(r);if("XYZ"===t.order){const t=i*u,o=i*_,n=s*u,r=s*_;e[0]=a*u,e[4]=-a*_,e[8]=c,e[1]=o+n*c,e[5]=t-r*c,e[9]=-s*a,e[2]=r-t*c,e[6]=n+o*c,e[10]=i*a}else if("YXZ"===t.order){const t=a*u,o=a*_,n=c*u,r=c*_;e[0]=t+r*s,e[4]=n*s-o,e[8]=i*c,e[1]=i*_,e[5]=i*u,e[9]=-s,e[2]=o*s-n,e[6]=r+t*s,e[10]=i*a}else if("ZXY"===t.order){const t=a*u,o=a*_,n=c*u,r=c*_;e[0]=t-r*s,e[4]=-i*_,e[8]=n+o*s,e[1]=o+n*s,e[5]=i*u,e[9]=r-t*s,e[2]=-i*c,e[6]=s,e[10]=i*a}else if("ZYX"===t.order){const t=i*u,o=i*_,n=s*u,r=s*_;e[0]=a*u,e[4]=n*c-o,e[8]=t*c+r,e[1]=a*_,e[5]=r*c+t,e[9]=o*c-n,e[2]=-c,e[6]=s*a,e[10]=i*a}else if("YZX"===t.order){const t=i*a,o=i*c,n=s*a,r=s*c;e[0]=a*u,e[4]=r-t*_,e[8]=n*_+o,e[1]=_,e[5]=i*u,e[9]=-s*u,e[2]=-c*u,e[6]=o*_+n,e[10]=t-r*_}else if("XZY"===t.order){const t=i*a,o=i*c,n=s*a,r=s*c;e[0]=a*u,e[4]=-_,e[8]=c*u,e[1]=t*_+r,e[5]=i*u,e[9]=o*_-n,e[2]=n*_-o,e[6]=s*u,e[10]=r*_+t}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(Y,t,Q)}lookAt(t,e,o){const n=this.elements;return et.subVectors(t,e),0===et.lengthSq()&&(et.z=1),et.normalize(),$.crossVectors(o,et),0===$.lengthSq()&&(1===Math.abs(o.z)?et.x+=1e-4:et.z+=1e-4,et.normalize(),$.crossVectors(o,et)),$.normalize(),tt.crossVectors(et,$),n[0]=$.x,n[4]=tt.x,n[8]=et.x,n[1]=$.y,n[5]=tt.y,n[9]=et.y,n[2]=$.z,n[6]=tt.z,n[10]=et.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const o=t.elements,n=e.elements,r=this.elements,i=o[0],s=o[4],a=o[8],c=o[12],u=o[1],_=o[5],p=o[9],l=o[13],h=o[2],d=o[6],f=o[10],y=o[14],m=o[3],g=o[7],v=o[11],w=o[15],b=n[0],C=n[4],x=n[8],P=n[12],S=n[1],k=n[5],E=n[9],O=n[13],N=n[2],j=n[6],F=n[10],T=n[14],M=n[3],A=n[7],B=n[11],D=n[15];return r[0]=i*b+s*S+a*N+c*M,r[4]=i*C+s*k+a*j+c*A,r[8]=i*x+s*E+a*F+c*B,r[12]=i*P+s*O+a*T+c*D,r[1]=u*b+_*S+p*N+l*M,r[5]=u*C+_*k+p*j+l*A,r[9]=u*x+_*E+p*F+l*B,r[13]=u*P+_*O+p*T+l*D,r[2]=h*b+d*S+f*N+y*M,r[6]=h*C+d*k+f*j+y*A,r[10]=h*x+d*E+f*F+y*B,r[14]=h*P+d*O+f*T+y*D,r[3]=m*b+g*S+v*N+w*M,r[7]=m*C+g*k+v*j+w*A,r[11]=m*x+g*E+v*F+w*B,r[15]=m*P+g*O+v*T+w*D,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],o=t[4],n=t[8],r=t[12],i=t[1],s=t[5],a=t[9],c=t[13],u=t[2],_=t[6],p=t[10],l=t[14];return t[3]*(+r*a*_-n*c*_-r*s*p+o*c*p+n*s*l-o*a*l)+t[7]*(+e*a*l-e*c*p+r*i*p-n*i*l+n*c*u-r*a*u)+t[11]*(+e*c*_-e*s*l-r*i*_+o*i*l+r*s*u-o*c*u)+t[15]*(-n*s*u-e*a*_+e*s*p+n*i*_-o*i*p+o*a*u)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,o){const n=this.elements;return t.isVector3?(n[12]=t.x,n[13]=t.y,n[14]=t.z):(n[12]=t,n[13]=e,n[14]=o),this}invert(){const t=this.elements,e=t[0],o=t[1],n=t[2],r=t[3],i=t[4],s=t[5],a=t[6],c=t[7],u=t[8],_=t[9],p=t[10],l=t[11],h=t[12],d=t[13],f=t[14],y=t[15],m=_*f*c-d*p*c+d*a*l-s*f*l-_*a*y+s*p*y,g=h*p*c-u*f*c-h*a*l+i*f*l+u*a*y-i*p*y,v=u*d*c-h*_*c+h*s*l-i*d*l-u*s*y+i*_*y,w=h*_*a-u*d*a-h*s*p+i*d*p+u*s*f-i*_*f,b=e*m+o*g+n*v+r*w;if(0===b)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const C=1/b;return t[0]=m*C,t[1]=(d*p*r-_*f*r-d*n*l+o*f*l+_*n*y-o*p*y)*C,t[2]=(s*f*r-d*a*r+d*n*c-o*f*c-s*n*y+o*a*y)*C,t[3]=(_*a*r-s*p*r-_*n*c+o*p*c+s*n*l-o*a*l)*C,t[4]=g*C,t[5]=(u*f*r-h*p*r+h*n*l-e*f*l-u*n*y+e*p*y)*C,t[6]=(h*a*r-i*f*r-h*n*c+e*f*c+i*n*y-e*a*y)*C,t[7]=(i*p*r-u*a*r+u*n*c-e*p*c-i*n*l+e*a*l)*C,t[8]=v*C,t[9]=(h*_*r-u*d*r-h*o*l+e*d*l+u*o*y-e*_*y)*C,t[10]=(i*d*r-h*s*r+h*o*c-e*d*c-i*o*y+e*s*y)*C,t[11]=(u*s*r-i*_*r-u*o*c+e*_*c+i*o*l-e*s*l)*C,t[12]=w*C,t[13]=(u*d*n-h*_*n+h*o*p-e*d*p-u*o*f+e*_*f)*C,t[14]=(h*s*n-i*d*n-h*o*a+e*d*a+i*o*f-e*s*f)*C,t[15]=(i*_*n-u*s*n+u*o*a-e*_*a-i*o*p+e*s*p)*C,this}scale(t){const e=this.elements,o=t.x,n=t.y,r=t.z;return e[0]*=o,e[4]*=n,e[8]*=r,e[1]*=o,e[5]*=n,e[9]*=r,e[2]*=o,e[6]*=n,e[10]*=r,e[3]*=o,e[7]*=n,e[11]*=r,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],o=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,o,n))}makeTranslation(t,e,o){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,o,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),o=Math.sin(t);return this.set(1,0,0,0,0,e,-o,0,0,o,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),o=Math.sin(t);return this.set(e,0,o,0,0,1,0,0,-o,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),o=Math.sin(t);return this.set(e,-o,0,0,o,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const o=Math.cos(e),n=Math.sin(e),r=1-o,i=t.x,s=t.y,a=t.z,c=r*i,u=r*s;return this.set(c*i+o,c*s-n*a,c*a+n*s,0,c*s+n*a,u*s+o,u*a-n*i,0,c*a-n*s,u*a+n*i,r*a*a+o,0,0,0,0,1),this}makeScale(t,e,o){return this.set(t,0,0,0,0,e,0,0,0,0,o,0,0,0,0,1),this}makeShear(t,e,o,n,r,i){return this.set(1,o,r,0,t,1,i,0,e,n,1,0,0,0,0,1),this}compose(t,e,o){const n=this.elements,r=e._x,i=e._y,s=e._z,a=e._w,c=r+r,u=i+i,_=s+s,p=r*c,l=r*u,h=r*_,d=i*u,f=i*_,y=s*_,m=a*c,g=a*u,v=a*_,w=o.x,b=o.y,C=o.z;return n[0]=(1-(d+y))*w,n[1]=(l+v)*w,n[2]=(h-g)*w,n[3]=0,n[4]=(l-v)*b,n[5]=(1-(p+y))*b,n[6]=(f+m)*b,n[7]=0,n[8]=(h+g)*C,n[9]=(f-m)*C,n[10]=(1-(p+d))*C,n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,this}decompose(t,e,o){const n=this.elements;let r=H.set(n[0],n[1],n[2]).length();const i=H.set(n[4],n[5],n[6]).length(),s=H.set(n[8],n[9],n[10]).length();this.determinant()<0&&(r=-r),t.x=n[12],t.y=n[13],t.z=n[14],X.copy(this);const a=1/r,c=1/i,u=1/s;return X.elements[0]*=a,X.elements[1]*=a,X.elements[2]*=a,X.elements[4]*=c,X.elements[5]*=c,X.elements[6]*=c,X.elements[8]*=u,X.elements[9]*=u,X.elements[10]*=u,e.setFromRotationMatrix(X),o.x=r,o.y=i,o.z=s,this}makePerspective(t,e,o,n,r,i,s=2e3){const a=this.elements,c=2*r/(e-t),u=2*r/(o-n),_=(e+t)/(e-t),p=(o+n)/(o-n);let l,h;if(s===y)l=-(i+r)/(i-r),h=-2*i*r/(i-r);else{if(s!==m)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);l=-i/(i-r),h=-i*r/(i-r)}return a[0]=c,a[4]=0,a[8]=_,a[12]=0,a[1]=0,a[5]=u,a[9]=p,a[13]=0,a[2]=0,a[6]=0,a[10]=l,a[14]=h,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(t,e,o,n,r,i,s=2e3){const a=this.elements,c=1/(e-t),u=1/(o-n),_=1/(i-r),p=(e+t)*c,l=(o+n)*u;let h,d;if(s===y)h=(i+r)*_,d=-2*_;else{if(s!==m)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);h=r*_,d=-1*_}return a[0]=2*c,a[4]=0,a[8]=0,a[12]=-p,a[1]=0,a[5]=2*u,a[9]=0,a[13]=-l,a[2]=0,a[6]=0,a[10]=d,a[14]=-h,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(t){const e=this.elements,o=t.elements;for(let t=0;t<16;t++)if(e[t]!==o[t])return!1;return!0}fromArray(t,e=0){for(let o=0;o<16;o++)this.elements[o]=t[o+e];return this}toArray(t=[],e=0){const o=this.elements;return t[e]=o[0],t[e+1]=o[1],t[e+2]=o[2],t[e+3]=o[3],t[e+4]=o[4],t[e+5]=o[5],t[e+6]=o[6],t[e+7]=o[7],t[e+8]=o[8],t[e+9]=o[9],t[e+10]=o[10],t[e+11]=o[11],t[e+12]=o[12],t[e+13]=o[13],t[e+14]=o[14],t[e+15]=o[15],t}}const H=new k,X=new K,Y=new k(0,0,0),Q=new k(1,1,1),$=new k,tt=new k,et=new k,ot=new K,nt=new S;class rt{constructor(t=0,e=0,o=0,n=rt.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=o,this._order=n}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,o,n=this._order){return this._x=t,this._y=e,this._z=o,this._order=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,o=!0){const n=t.elements,r=n[0],i=n[4],s=n[8],a=n[1],c=n[5],u=n[9],_=n[2],p=n[6],l=n[10];switch(e){case"XYZ":this._y=Math.asin(b(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-u,l),this._z=Math.atan2(-i,r)):(this._x=Math.atan2(p,c),this._z=0);break;case"YXZ":this._x=Math.asin(-b(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(s,l),this._z=Math.atan2(a,c)):(this._y=Math.atan2(-_,r),this._z=0);break;case"ZXY":this._x=Math.asin(b(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-_,l),this._z=Math.atan2(-i,c)):(this._y=0,this._z=Math.atan2(a,r));break;case"ZYX":this._y=Math.asin(-b(_,-1,1)),Math.abs(_)<.9999999?(this._x=Math.atan2(p,l),this._z=Math.atan2(a,r)):(this._x=0,this._z=Math.atan2(-i,c));break;case"YZX":this._z=Math.asin(b(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-_,r)):(this._x=0,this._y=Math.atan2(s,l));break;case"XZY":this._z=Math.asin(-b(i,-1,1)),Math.abs(i)<.9999999?(this._x=Math.atan2(p,c),this._y=Math.atan2(s,r)):(this._x=Math.atan2(-u,l),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,!0===o&&this._onChangeCallback(),this}setFromQuaternion(t,e,o){return ot.makeRotationFromQuaternion(t),this.setFromRotationMatrix(ot,e,o)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return nt.setFromEuler(this),this.setFromQuaternion(nt,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}rt.DEFAULT_ORDER="XYZ";class it{constructor(){this.mask=1}set(t){this.mask=1<<t>>>0}enable(t){this.mask|=1<<t}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t}disable(t){this.mask&=~(1<<t)}disableAll(){this.mask=0}test(t){return 0!==(this.mask&t.mask)}isEnabled(t){return!!(this.mask&1<<t)}}let st=0;const at=new k,ct=new S,ut=new K,_t=new k,pt=new k,lt=new k,ht=new S,dt=new k(1,0,0),ft=new k(0,1,0),yt=new k(0,0,1),mt={type:"added"},gt={type:"removed"},vt={type:"childadded",child:null},wt={type:"childremoved",child:null};class bt extends g{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:st++}),this.uuid=w(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=bt.DEFAULT_UP.clone();const t=new k,e=new rt,o=new S,n=new k(1,1,1);e._onChange(function(){o.setFromEuler(e,!1)}),o._onChange(function(){e.setFromQuaternion(o,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:o},scale:{configurable:!0,enumerable:!0,value:n},modelViewMatrix:{value:new K},normalMatrix:{value:new N}}),this.matrix=new K,this.matrixWorld=new K,this.matrixAutoUpdate=bt.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=bt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new it,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return ct.setFromAxisAngle(t,e),this.quaternion.multiply(ct),this}rotateOnWorldAxis(t,e){return ct.setFromAxisAngle(t,e),this.quaternion.premultiply(ct),this}rotateX(t){return this.rotateOnAxis(dt,t)}rotateY(t){return this.rotateOnAxis(ft,t)}rotateZ(t){return this.rotateOnAxis(yt,t)}translateOnAxis(t,e){return at.copy(t).applyQuaternion(this.quaternion),this.position.add(at.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(dt,t)}translateY(t){return this.translateOnAxis(ft,t)}translateZ(t){return this.translateOnAxis(yt,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(ut.copy(this.matrixWorld).invert())}lookAt(t,e,o){t.isVector3?_t.copy(t):_t.set(t,e,o);const n=this.parent;this.updateWorldMatrix(!0,!1),pt.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ut.lookAt(pt,_t,this.up):ut.lookAt(_t,pt,this.up),this.quaternion.setFromRotationMatrix(ut),n&&(ut.extractRotation(n.matrixWorld),ct.setFromRotationMatrix(ut),this.quaternion.premultiply(ct.invert()))}add(t){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(mt),vt.child=t,this.dispatchEvent(vt),vt.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.remove(arguments[t]);return this}const e=this.children.indexOf(t);return-1!==e&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(gt),wt.child=t,this.dispatchEvent(wt),wt.child=null),this}removeFromParent(){const t=this.parent;return null!==t&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),ut.copy(this.matrixWorld).invert(),null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),ut.multiply(t.parent.matrixWorld)),t.applyMatrix4(ut),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(mt),vt.child=t,this.dispatchEvent(vt),vt.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let o=0,n=this.children.length;o<n;o++){const n=this.children[o].getObjectByProperty(t,e);if(void 0!==n)return n}}getObjectsByProperty(t,e,o=[]){this[t]===e&&o.push(this);const n=this.children;for(let r=0,i=n.length;r<i;r++)n[r].getObjectsByProperty(t,e,o);return o}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(pt,t,lt),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(pt,ht,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);const e=this.children;for(let o=0,n=e.length;o<n;o++)e[o].traverse(t)}traverseVisible(t){if(!1===this.visible)return;t(this);const e=this.children;for(let o=0,n=e.length;o<n;o++)e[o].traverseVisible(t)}traverseAncestors(t){const e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(!0===this.matrixWorldAutoUpdate&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);const e=this.children;for(let o=0,n=e.length;o<n;o++){e[o].updateMatrixWorld(t)}}updateWorldMatrix(t,e){const o=this.parent;if(!0===t&&null!==o&&o.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),!0===this.matrixWorldAutoUpdate&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),!0===e){const t=this.children;for(let e=0,o=t.length;e<o;e++){t[e].updateWorldMatrix(!1,!0)}}}toJSON(t){const e=void 0===t||"string"==typeof t,o={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},o.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const n={};function r(e,o){return void 0===e[o.uuid]&&(e[o.uuid]=o.toJSON(t)),o.uuid}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),!0===this.castShadow&&(n.castShadow=!0),!0===this.receiveShadow&&(n.receiveShadow=!0),!1===this.visible&&(n.visible=!1),!1===this.frustumCulled&&(n.frustumCulled=!1),0!==this.renderOrder&&(n.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),n.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(n.matrixAutoUpdate=!1),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(n.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(n.type="BatchedMesh",n.perObjectFrustumCulled=this.perObjectFrustumCulled,n.sortObjects=this.sortObjects,n.drawRanges=this._drawRanges,n.reservedRanges=this._reservedRanges,n.geometryInfo=this._geometryInfo.map(t=>({...t,boundingBox:t.boundingBox?t.boundingBox.toJSON():void 0,boundingSphere:t.boundingSphere?t.boundingSphere.toJSON():void 0})),n.instanceInfo=this._instanceInfo.map(t=>({...t})),n.availableInstanceIds=this._availableInstanceIds.slice(),n.availableGeometryIds=this._availableGeometryIds.slice(),n.nextIndexStart=this._nextIndexStart,n.nextVertexStart=this._nextVertexStart,n.geometryCount=this._geometryCount,n.maxInstanceCount=this._maxInstanceCount,n.maxVertexCount=this._maxVertexCount,n.maxIndexCount=this._maxIndexCount,n.geometryInitialized=this._geometryInitialized,n.matricesTexture=this._matricesTexture.toJSON(t),n.indirectTexture=this._indirectTexture.toJSON(t),null!==this._colorsTexture&&(n.colorsTexture=this._colorsTexture.toJSON(t)),null!==this.boundingSphere&&(n.boundingSphere=this.boundingSphere.toJSON()),null!==this.boundingBox&&(n.boundingBox=this.boundingBox.toJSON())),this.isScene)this.background&&(this.background.isColor?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(n.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.geometry=r(t.geometries,this.geometry);const e=this.geometry.parameters;if(void 0!==e&&void 0!==e.shapes){const o=e.shapes;if(Array.isArray(o))for(let e=0,n=o.length;e<n;e++){const n=o[e];r(t.shapes,n)}else r(t.shapes,o)}}if(this.isSkinnedMesh&&(n.bindMode=this.bindMode,n.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(r(t.skeletons,this.skeleton),n.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const e=[];for(let o=0,n=this.material.length;o<n;o++)e.push(r(t.materials,this.material[o]));n.material=e}else n.material=r(t.materials,this.material);if(this.children.length>0){n.children=[];for(let e=0;e<this.children.length;e++)n.children.push(this.children[e].toJSON(t).object)}if(this.animations.length>0){n.animations=[];for(let e=0;e<this.animations.length;e++){const o=this.animations[e];n.animations.push(r(t.animations,o))}}if(e){const e=i(t.geometries),n=i(t.materials),r=i(t.textures),s=i(t.images),a=i(t.shapes),c=i(t.skeletons),u=i(t.animations),_=i(t.nodes);e.length>0&&(o.geometries=e),n.length>0&&(o.materials=n),r.length>0&&(o.textures=r),s.length>0&&(o.images=s),a.length>0&&(o.shapes=a),c.length>0&&(o.skeletons=c),u.length>0&&(o.animations=u),_.length>0&&(o.nodes=_)}return o.object=n,o;function i(t){const e=[];for(const o in t){const n=t[o];delete n.metadata,e.push(n)}return e}}clone(t){return(new this.constructor).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(let e=0;e<t.children.length;e++){const o=t.children[e];this.add(o.clone())}return this}}bt.DEFAULT_UP=new k(0,1,0),bt.DEFAULT_MATRIX_AUTO_UPDATE=!0,bt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Ct={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},xt={h:0,s:0,l:0},Pt={h:0,s:0,l:0};function St(t,e,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+6*(e-t)*o:o<.5?e:o<2/3?t+6*(e-t)*(2/3-o):t}class kt{constructor(t,e,o){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,o)}set(t,e,o){if(void 0===e&&void 0===o){const e=t;e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e)}else this.setRGB(t,e,o);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=l){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,I.colorSpaceToWorking(this,e),this}setRGB(t,e,o,n=I.workingColorSpace){return this.r=t,this.g=e,this.b=o,I.colorSpaceToWorking(this,n),this}setHSL(t,e,o,n=I.workingColorSpace){if(t=C(t,1),e=b(e,0,1),o=b(o,0,1),0===e)this.r=this.g=this.b=o;else{const n=o<=.5?o*(1+e):o+e-o*e,r=2*o-n;this.r=St(r,n,t+1/3),this.g=St(r,n,t),this.b=St(r,n,t-1/3)}return I.colorSpaceToWorking(this,n),this}setStyle(t,e=l){function o(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let n;if(n=/^(\w+)\(([^\)]*)\)/.exec(t)){let r;const i=n[1],s=n[2];switch(i){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return o(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,e);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return o(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,e);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return o(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(t)){const o=n[1],r=o.length;if(3===r)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,e);if(6===r)return this.setHex(parseInt(o,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=l){const o=Ct[t.toLowerCase()];return void 0!==o?this.setHex(o,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=R(t.r),this.g=R(t.g),this.b=R(t.b),this}copyLinearToSRGB(t){return this.r=z(t.r),this.g=z(t.g),this.b=z(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=l){return I.workingToColorSpace(Et.copy(this),t),65536*Math.round(b(255*Et.r,0,255))+256*Math.round(b(255*Et.g,0,255))+Math.round(b(255*Et.b,0,255))}getHexString(t=l){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=I.workingColorSpace){I.workingToColorSpace(Et.copy(this),e);const o=Et.r,n=Et.g,r=Et.b,i=Math.max(o,n,r),s=Math.min(o,n,r);let a,c;const u=(s+i)/2;if(s===i)a=0,c=0;else{const t=i-s;switch(c=u<=.5?t/(i+s):t/(2-i-s),i){case o:a=(n-r)/t+(n<r?6:0);break;case n:a=(r-o)/t+2;break;case r:a=(o-n)/t+4}a/=6}return t.h=a,t.s=c,t.l=u,t}getRGB(t,e=I.workingColorSpace){return I.workingToColorSpace(Et.copy(this),e),t.r=Et.r,t.g=Et.g,t.b=Et.b,t}getStyle(t=l){I.workingToColorSpace(Et.copy(this),t);const e=Et.r,o=Et.g,n=Et.b;return t!==l?`color(${t} ${e.toFixed(3)} ${o.toFixed(3)} ${n.toFixed(3)})`:`rgb(${Math.round(255*e)},${Math.round(255*o)},${Math.round(255*n)})`}offsetHSL(t,e,o){return this.getHSL(xt),this.setHSL(xt.h+t,xt.s+e,xt.l+o)}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,o){return this.r=t.r+(e.r-t.r)*o,this.g=t.g+(e.g-t.g)*o,this.b=t.b+(e.b-t.b)*o,this}lerpHSL(t,e){this.getHSL(xt),t.getHSL(Pt);const o=x(xt.h,Pt.h,e),n=x(xt.s,Pt.s,e),r=x(xt.l,Pt.l,e);return this.setHSL(o,n,r),this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){const e=this.r,o=this.g,n=this.b,r=t.elements;return this.r=r[0]*e+r[3]*o+r[6]*n,this.g=r[1]*e+r[4]*o+r[7]*n,this.b=r[2]*e+r[5]*o+r[8]*n,this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Et=new kt;kt.NAMES=Ct;const Ot=new k,Nt=new k,jt=new N;class Ft{constructor(t=new k(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,o,n){return this.normal.set(t,e,o),this.constant=n,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,o){const n=Ot.subVectors(o,e).cross(Nt.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(n,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e){const o=t.delta(Ot),n=this.normal.dot(o);if(0===n)return 0===this.distanceToPoint(t.start)?e.copy(t.start):null;const r=-(t.start.dot(this.normal)+this.constant)/n;return r<0||r>1?null:e.copy(t.start).addScaledVector(o,r)}intersectsLine(t){const e=this.distanceToPoint(t.start),o=this.distanceToPoint(t.end);return e<0&&o>0||o<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const o=e||jt.getNormalMatrix(t),n=this.coplanarPoint(Ot).applyMatrix4(t),r=this.normal.applyMatrix3(o).normalize();return this.constant=-n.dot(r),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return(new this.constructor).copy(this)}}function Tt(t,e){return t&&t.constructor!==e?"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t):t}function Mt(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}class At{constructor(t,e,o,n){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==n?n:new e.constructor(o),this.sampleValues=e,this.valueSize=o,this.settings=null,this.DefaultSettings_={}}evaluate(t){const e=this.parameterPositions;let o=this._cachedIndex,n=e[o],r=e[o-1];t:{e:{let i;o:{n:if(!(t<n)){for(let i=o+2;;){if(void 0===n){if(t<r)break n;return o=e.length,this._cachedIndex=o,this.copySampleValue_(o-1)}if(o===i)break;if(r=n,n=e[++o],t<n)break e}i=e.length;break o}if(!(t>=r)){const s=e[1];t<s&&(o=2,r=s);for(let i=o-2;;){if(void 0===r)return this._cachedIndex=0,this.copySampleValue_(0);if(o===i)break;if(n=r,r=e[--o-1],t>=r)break e}i=o,o=0;break o}break t}for(;o<i;){const n=o+i>>>1;t<e[n]?i=n:o=n+1}if(n=e[o],r=e[o-1],void 0===r)return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===n)return o=e.length,this._cachedIndex=o,this.copySampleValue_(o-1)}this._cachedIndex=o,this.intervalChanged_(o,r,n)}return this.interpolate_(o,r,t,n)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(t){const e=this.resultBuffer,o=this.sampleValues,n=this.valueSize,r=t*n;for(let t=0;t!==n;++t)e[t]=o[r+t];return e}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class Bt extends At{constructor(t,e,o,n){super(t,e,o,n),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:u,endingEnd:u}}intervalChanged_(t,e,o){const n=this.parameterPositions;let r=t-2,i=t+1,s=n[r],a=n[i];if(void 0===s)switch(this.getSettings_().endingStart){case _:r=t,s=2*e-o;break;case p:r=n.length-2,s=e+n[r]-n[r+1];break;default:r=t,s=o}if(void 0===a)switch(this.getSettings_().endingEnd){case _:i=t,a=2*o-e;break;case p:i=1,a=o+n[1]-n[0];break;default:i=t-1,a=e}const c=.5*(o-e),u=this.valueSize;this._weightPrev=c/(e-s),this._weightNext=c/(a-o),this._offsetPrev=r*u,this._offsetNext=i*u}interpolate_(t,e,o,n){const r=this.resultBuffer,i=this.sampleValues,s=this.valueSize,a=t*s,c=a-s,u=this._offsetPrev,_=this._offsetNext,p=this._weightPrev,l=this._weightNext,h=(o-e)/(n-e),d=h*h,f=d*h,y=-p*f+2*p*d-p*h,m=(1+p)*f+(-1.5-2*p)*d+(-.5+p)*h+1,g=(-1-l)*f+(1.5+l)*d+.5*h,v=l*f-l*d;for(let t=0;t!==s;++t)r[t]=y*i[u+t]+m*i[c+t]+g*i[a+t]+v*i[_+t];return r}}class Dt extends At{constructor(t,e,o,n){super(t,e,o,n)}interpolate_(t,e,o,n){const r=this.resultBuffer,i=this.sampleValues,s=this.valueSize,a=t*s,c=a-s,u=(o-e)/(n-e),_=1-u;for(let t=0;t!==s;++t)r[t]=i[c+t]*_+i[a+t]*u;return r}}class It extends At{constructor(t,e,o,n){super(t,e,o,n)}interpolate_(t){return this.copySampleValue_(t-1)}}class Rt{constructor(t,e,o,n){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Tt(e,this.TimeBufferType),this.values=Tt(o,this.ValueBufferType),this.setInterpolation(n||this.DefaultInterpolation)}static toJSON(t){const e=t.constructor;let o;if(e.toJSON!==this.toJSON)o=e.toJSON(t);else{o={name:t.name,times:Tt(t.times,Array),values:Tt(t.values,Array)};const e=t.getInterpolation();e!==t.DefaultInterpolation&&(o.interpolation=e)}return o.type=t.ValueTypeName,o}InterpolantFactoryMethodDiscrete(t){return new It(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new Dt(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new Bt(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let e;switch(t){case s:e=this.InterpolantFactoryMethodDiscrete;break;case a:e=this.InterpolantFactoryMethodLinear;break;case c:e=this.InterpolantFactoryMethodSmooth}if(void 0===e){const e="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(e);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",e),this}return this.createInterpolant=e,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return s;case this.InterpolantFactoryMethodLinear:return a;case this.InterpolantFactoryMethodSmooth:return c}}getValueSize(){return this.values.length/this.times.length}shift(t){if(0!==t){const e=this.times;for(let o=0,n=e.length;o!==n;++o)e[o]+=t}return this}scale(t){if(1!==t){const e=this.times;for(let o=0,n=e.length;o!==n;++o)e[o]*=t}return this}trim(t,e){const o=this.times,n=o.length;let r=0,i=n-1;for(;r!==n&&o[r]<t;)++r;for(;-1!==i&&o[i]>e;)--i;if(++i,0!==r||i!==n){r>=i&&(i=Math.max(i,1),r=i-1);const t=this.getValueSize();this.times=o.slice(r,i),this.values=this.values.slice(r*t,i*t)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const o=this.times,n=this.values,r=o.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let i=null;for(let e=0;e!==r;e++){const n=o[e];if("number"==typeof n&&isNaN(n)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,e,n),t=!1;break}if(null!==i&&i>n){console.error("THREE.KeyframeTrack: Out of order keys.",this,e,n,i),t=!1;break}i=n}if(void 0!==n&&Mt(n))for(let e=0,o=n.length;e!==o;++e){const o=n[e];if(isNaN(o)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,e,o),t=!1;break}}return t}optimize(){const t=this.times.slice(),e=this.values.slice(),o=this.getValueSize(),n=this.getInterpolation()===c,r=t.length-1;let i=1;for(let s=1;s<r;++s){let r=!1;const a=t[s];if(a!==t[s+1]&&(1!==s||a!==t[0]))if(n)r=!0;else{const t=s*o,n=t-o,i=t+o;for(let s=0;s!==o;++s){const o=e[t+s];if(o!==e[n+s]||o!==e[i+s]){r=!0;break}}}if(r){if(s!==i){t[i]=t[s];const n=s*o,r=i*o;for(let t=0;t!==o;++t)e[r+t]=e[n+t]}++i}}if(r>0){t[i]=t[r];for(let t=r*o,n=i*o,s=0;s!==o;++s)e[n+s]=e[t+s];++i}return i!==t.length?(this.times=t.slice(0,i),this.values=e.slice(0,i*o)):(this.times=t,this.values=e),this}clone(){const t=this.times.slice(),e=this.values.slice(),o=new(0,this.constructor)(this.name,t,e);return o.createInterpolant=this.createInterpolant,o}}Rt.prototype.ValueTypeName="",Rt.prototype.TimeBufferType=Float32Array,Rt.prototype.ValueBufferType=Float32Array,Rt.prototype.DefaultInterpolation=a;class zt extends Rt{constructor(t,e,o){super(t,e,o)}}zt.prototype.ValueTypeName="bool",zt.prototype.ValueBufferType=Array,zt.prototype.DefaultInterpolation=s,zt.prototype.InterpolantFactoryMethodLinear=void 0,zt.prototype.InterpolantFactoryMethodSmooth=void 0;class Lt extends Rt{constructor(t,e,o,n){super(t,e,o,n)}}Lt.prototype.ValueTypeName="color";class Ut extends Rt{constructor(t,e,o,n){super(t,e,o,n)}}Ut.prototype.ValueTypeName="number";class Wt extends At{constructor(t,e,o,n){super(t,e,o,n)}interpolate_(t,e,o,n){const r=this.resultBuffer,i=this.sampleValues,s=this.valueSize,a=(o-e)/(n-e);let c=t*s;for(let t=c+s;c!==t;c+=4)S.slerpFlat(r,0,i,c-s,i,c,a);return r}}class Gt extends Rt{constructor(t,e,o,n){super(t,e,o,n)}InterpolantFactoryMethodLinear(t){return new Wt(this.times,this.values,this.getValueSize(),t)}}Gt.prototype.ValueTypeName="quaternion",Gt.prototype.InterpolantFactoryMethodSmooth=void 0;class Zt extends Rt{constructor(t,e,o){super(t,e,o)}}Zt.prototype.ValueTypeName="string",Zt.prototype.ValueBufferType=Array,Zt.prototype.DefaultInterpolation=s,Zt.prototype.InterpolantFactoryMethodLinear=void 0,Zt.prototype.InterpolantFactoryMethodSmooth=void 0;class qt extends Rt{constructor(t,e,o,n){super(t,e,o,n)}}qt.prototype.ValueTypeName="vector";class Vt{constructor(t,e,o){const n=this;let r,i=!1,s=0,a=0;const c=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=o,this.itemStart=function(t){a++,!1===i&&void 0!==n.onStart&&n.onStart(t,s,a),i=!0},this.itemEnd=function(t){s++,void 0!==n.onProgress&&n.onProgress(t,s,a),s===a&&(i=!1,void 0!==n.onLoad&&n.onLoad())},this.itemError=function(t){void 0!==n.onError&&n.onError(t)},this.resolveURL=function(t){return r?r(t):t},this.setURLModifier=function(t){return r=t,this},this.addHandler=function(t,e){return c.push(t,e),this},this.removeHandler=function(t){const e=c.indexOf(t);return-1!==e&&c.splice(e,2),this},this.getHandler=function(t){for(let e=0,o=c.length;e<o;e+=2){const o=c[e],n=c[e+1];if(o.global&&(o.lastIndex=0),o.test(t))return n}return null}}}const Jt=new Vt;class Kt{constructor(t){this.manager=void 0!==t?t:Jt,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,e){const o=this;return new Promise(function(n,r){o.load(t,n,e,r)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}}Kt.DEFAULT_MATERIAL_NAME="__DEFAULT";Error;new WeakMap;const Ht="\\[\\]\\.:\\/",Xt=new RegExp("["+Ht+"]","g"),Yt="[^"+Ht+"]",Qt="[^"+Ht.replace("\\.","")+"]",$t=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",Yt)+/(WCOD+)?/.source.replace("WCOD",Qt)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Yt)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Yt)+"$"),te=["material","materials","bones","map"];class ee{constructor(t,e,o){this.path=e,this.parsedPath=o||ee.parseTrackName(e),this.node=ee.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,o){return t&&t.isAnimationObjectGroup?new ee.Composite(t,e,o):new ee(t,e,o)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(Xt,"")}static parseTrackName(t){const e=$t.exec(t);if(null===e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const o={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},n=o.nodeName&&o.nodeName.lastIndexOf(".");if(void 0!==n&&-1!==n){const t=o.nodeName.substring(n+1);-1!==te.indexOf(t)&&(o.nodeName=o.nodeName.substring(0,n),o.objectName=t)}if(null===o.propertyName||0===o.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return o}static findNode(t,e){if(void 0===e||""===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){const o=t.skeleton.getBoneByName(e);if(void 0!==o)return o}if(t.children){const o=function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.name===e||r.uuid===e)return r;const i=o(r.children);if(i)return i}return null},n=o(t.children);if(n)return n}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,e){t[e]=this.targetObject[this.propertyName]}_getValue_array(t,e){const o=this.resolvedProperty;for(let n=0,r=o.length;n!==r;++n)t[e++]=o[n]}_getValue_arrayElement(t,e){t[e]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,e){this.resolvedProperty.toArray(t,e)}_setValue_direct(t,e){this.targetObject[this.propertyName]=t[e]}_setValue_direct_setNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,e){const o=this.resolvedProperty;for(let n=0,r=o.length;n!==r;++n)o[n]=t[e++]}_setValue_array_setNeedsUpdate(t,e){const o=this.resolvedProperty;for(let n=0,r=o.length;n!==r;++n)o[n]=t[e++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,e){const o=this.resolvedProperty;for(let n=0,r=o.length;n!==r;++n)o[n]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,e){this.resolvedProperty[this.propertyIndex]=t[e]}_setValue_arrayElement_setNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,e){this.resolvedProperty.fromArray(t,e)}_setValue_fromArray_setNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,e){this.bind(),this.getValue(t,e)}_setValue_unbound(t,e){this.bind(),this.setValue(t,e)}bind(){let t=this.node;const e=this.parsedPath,o=e.objectName,n=e.propertyName;let r=e.propertyIndex;if(t||(t=ee.findNode(this.rootNode,e.nodeName),this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t)return void console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");if(o){let n=e.objectIndex;switch(o){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(let e=0;e<t.length;e++)if(t[e].name===n){n=e;break}break;case"map":if("map"in t){t=t.map;break}if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.map)return void console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);t=t.material.map;break;default:if(void 0===t[o])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[o]}if(void 0!==n){if(void 0===t[n])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[n]}}const i=t[n];if(void 0===i){const o=e.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+o+"."+n+" but it wasn't found.",t)}let s=this.Versioning.None;this.targetObject=t,!0===t.isMaterial?s=this.Versioning.NeedsUpdate:!0===t.isObject3D&&(s=this.Versioning.MatrixWorldNeedsUpdate);let a=this.BindingType.Direct;if(void 0!==r){if("morphTargetInfluences"===n){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==t.morphTargetDictionary[r]&&(r=t.morphTargetDictionary[r])}a=this.BindingType.ArrayElement,this.resolvedProperty=i,this.propertyIndex=r}else void 0!==i.fromArray&&void 0!==i.toArray?(a=this.BindingType.HasFromToArray,this.resolvedProperty=i):Array.isArray(i)?(a=this.BindingType.EntireArray,this.resolvedProperty=i):this.propertyName=n;this.getValue=this.GetterByBindingType[a],this.setValue=this.SetterByBindingTypeAndVersioning[a][s]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}ee.Composite=class{constructor(t,e,o){const n=o||ee.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,n)}getValue(t,e){this.bind();const o=this._targetGroup.nCachedObjects_,n=this._bindings[o];void 0!==n&&n.getValue(t,e)}setValue(t,e){const o=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=o.length;n!==r;++n)o[n].setValue(t,e)}bind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,o=t.length;e!==o;++e)t[e].bind()}unbind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,o=t.length;e!==o;++e)t[e].unbind()}},ee.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},ee.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},ee.prototype.GetterByBindingType=[ee.prototype._getValue_direct,ee.prototype._getValue_array,ee.prototype._getValue_arrayElement,ee.prototype._getValue_toArray],ee.prototype.SetterByBindingTypeAndVersioning=[[ee.prototype._setValue_direct,ee.prototype._setValue_direct_setNeedsUpdate,ee.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[ee.prototype._setValue_array,ee.prototype._setValue_array_setNeedsUpdate,ee.prototype._setValue_array_setMatrixWorldNeedsUpdate],[ee.prototype._setValue_arrayElement,ee.prototype._setValue_arrayElement_setNeedsUpdate,ee.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[ee.prototype._setValue_fromArray,ee.prototype._setValue_fromArray_setNeedsUpdate,ee.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];new Float32Array(1);"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"177"}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="177")},5556:(t,e,o)=>{o.d(e,{W:()=>u});var n,r=o(347),i=o(7160),s=o(6994),a=o(5361),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.position=new a.Pq0,e.rotation=new a.PTz,e.scale=new a.Pq0(1,1,1),e.className=i.Z.TransformComponent,e}return c(e,t),e.prototype.set_position=function(t){this.position.copy(t)},e.prototype.get_position=function(){return this.position},e.prototype.set_rotation=function(t){this.rotation.copy(t)},e.prototype.get_rotation=function(){return this.rotation},e.prototype.set_scale=function(t){this.scale.copy(t)},e.prototype.get_scale=function(){return this.scale},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.position=this.position.toArray(),o.rotation=this.rotation.toArray(),o.scale=this.scale.toArray(),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.position.fromArray(e.position),this.rotation.fromArray(e.rotation),this.scale.fromArray(e.scale))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.TransformComponent,e.create,t)},e}(s.u)},5574:(t,e,o)=>{o.d(e,{Q:()=>u});var n=o(8575),r=o(3124),i=o(4040),s=o(7073),a=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},c=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},u=function(){function t(){}return t.load_editor_resource=function(t,e){console.log("load_editor_resource",e);var o=null;switch(t){case n.c.part3d:(o=new i.c).parse_data(e);break;case n.c.block3d:case n.c.code3d:(o=new r.k).parse_data(e);break;case n.c.sketch3d:(o=new s.J).parse_data(e)}return o},t.load_json=function(t){return a(this,void 0,void 0,function(){return c(this,function(e){return[2,new Promise(function(e,o){var n=new XMLHttpRequest;n.open("GET",t,!0),n.onload=function(){200===n.status&&e(JSON.parse(n.responseText))},n.send()})]})})},t.load_text=function(t){return a(this,void 0,void 0,function(){return c(this,function(e){return[2,new Promise(function(e,o){var n=new XMLHttpRequest;n.open("GET",t,!0),n.onload=function(){200===n.status&&e(n.responseText)},n.send()})]})})},t.load_image=function(t){return a(this,void 0,void 0,function(){return c(this,function(e){return[2,new Promise(function(e,o){var n=new Image;n.onload=function(){e(n)},n.src=t})]})})},t.load_resource=function(t,e){return a(this,void 0,void 0,function(){return c(this,function(o){return[2,new Promise(function(o,n){var r=new XMLHttpRequest;r.open("GET",t,!0),r.responseType=e,r.onload=function(){200===r.status&&o(r.response)},r.send()})]})})},t.get_resource_type_by_postfix=function(t){switch(t){case n.y.jhasm3d:return n.c.assembly3d;case n.y.jhprt3d:return n.c.part3d;case n.y.jhbk3d:return n.c.block3d;case n.y.jhsketch3d:return n.c.sketch3d;case n.y.js:return n.c.js;case n.y.txt:return n.c.text;case n.y.step:return n.c.step;case n.y.json:return n.c.json;default:return n.c.none}},t.get_resource_postfix_by_type=function(t){switch(t){case n.c.assembly3d:return n.y.jhasm3d;case n.c.part3d:return n.y.jhprt3d;case n.c.block3d:return n.y.jhbk3d;case n.c.code3d:return n.y.jhjs3d;case n.c.sketch3d:return n.y.jhsketch3d;case n.c.js:return n.y.js;case n.c.text:return n.y.txt;case n.c.step:return n.y.step;case n.c.json:return n.y.json;default:return n.y.none}},t}()},5590:(t,e,o)=>{o.d(e,{a:()=>n});var n=function(){function t(){}return t.create_ParaPolyGeomBSplineParams=function(e,o,n,r){void 0===r&&(r=!1),(e=e||[]).length<2&&(e=[{x:0,y:0,z:0},{x:1,y:1,z:0}]);var i=t.getKnots(n,e.length,o,r),s=i.knots;n=i.degree,console.log("================knots_params:",i);for(var a=new parapoly_engine.ParaPolyDataVector3Array,c=new parapoly_engine.ParaPolyDoubleArray,u=new parapoly_engine.ParaPolyDoubleArray,_=new parapoly_engine.ParaPolyIntArray,p=[],l=[],h=0;h<e.length;h++){var d=e[h];p.push(d)}for(h=0;h<p.length;h++){var f=new parapoly_engine.ParaPolyDataVector3;null==(d=p[h]).x||null==d.x?f.set(d[0],d[1],d[2]):f.set(d.x,d.y,d.z),a.pushValue(f),c.pushValue(1)}for(h=0;h<s.length;h++){var y=s[h];u.pushValue(y),l.push(1)}o||(l[0]=n+1,l[l.length-1]=n+1),r&&(l[0]=2,l[l.length-1]=2);for(h=0;h<l.length;h++){var m=l[h];_.pushValue(m)}return{poles_arr:a,weights_arr:c,knots_arr:u,multiplicities_arr:_,degree:n,is_closed:o}},t.getKnots=function(e,o,n,r){void 0===r&&(r=!1);var i,s=[];r?i=o:n?(o<e&&(e=o),i=o+1):(o<=e&&(e=o-1),i=o-e+1);for(var a=0;a<i;a++){var c=a/(i-1);s.push(t.clamp_number(c,0,1))}return{knots:s,degree:e}},t.clamp_number=function(t,e,o){return Math.max(e,Math.min(o,t))},t}()},5638:(t,e,o)=>{o.d(e,{R:()=>u});var n,r=o(347),i=o(7160),s=o(8268),a=o(631),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.edges=6,e.radius=2,e.height=2,e.className=i.Z.FeatureSetPrismComponent,e.feature_type=a.y.FeatureSetPrism,e}return c(e,t),e.prototype.set_edges=function(t){this.edges=t},e.prototype.get_edges=function(){return this.edges},e.prototype.set_radius=function(t){this.radius=t},e.prototype.get_radius=function(){return this.radius},e.prototype.set_height=function(t){this.height=t},e.prototype.get_height=function(){return this.height},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.edges=this.edges,o.radius=this.radius,o.height=this.height,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.edges=e.edges,this.radius=e.radius,this.height=e.height)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.FeatureSetPrismComponent,e.create,t)},e}(s.x)},5759:(t,e,o)=>{o.d(e,{n:()=>_});var n,r=o(347),i=o(7160),s=o(1072),a=o(6994),c=o(5361),u=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),_=function(t){function e(){var e=t.call(this)||this;return e.base_color=new c.Q1f,e.opacity=1,e.metalness=0,e.roughness=0,e.material_name="",e.className=i.Z.MaterialComponent,e}return u(e,t),e.prototype.set_base_color=function(t){this.base_color=t},e.prototype.get_base_color=function(){return this.base_color},e.prototype.set_opacity=function(t){this.opacity=t},e.prototype.get_opacity=function(){return this.opacity},e.prototype.set_metalness=function(t){this.metalness=t},e.prototype.get_metalness=function(){return this.metalness},e.prototype.set_roughness=function(t){this.roughness=t},e.prototype.get_roughness=function(){return this.roughness},e.prototype.set_material_name=function(t){this.material_name=t},e.prototype.get_material_name=function(){return this.material_name},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.base_color=this.base_color.toArray(),o.opacity=this.opacity,o.metalness=this.metalness,o.roughness=this.roughness,o.material_name=s.J.clearStringIfIsEmpty(this.material_name),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.base_color.fromArray(e.base_color),this.opacity=s.J.isEmpty(e.opacity)?1:e.opacity,this.metalness=e.metalness,this.roughness=e.roughness,this.material_name=s.J.readToStringIfIsEmpty(e.material_name))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.MaterialComponent,e.create,t)},e}(a.u)},5841:(t,e,o)=>{o.d(e,{k:()=>u});var n,r=o(347),i=o(7160),s=o(2444),a=o(5361),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.center=new a.Pq0(0,0,0),e.radius=1,e.start_angle=0,e.end_angle=1*Math.PI,e.direction=s.T.default_geom_direction_in_sketch.clone(),e.className=i.Z.SkGeomArcComponent,e}return c(e,t),e.prototype.set_center=function(t){this.center.copy(t)},e.prototype.get_center=function(){return this.center},e.prototype.set_radius=function(t){this.radius=t},e.prototype.get_radius=function(){return this.radius},e.prototype.set_start_angle=function(t){this.start_angle=t},e.prototype.get_start_angle=function(){return this.start_angle},e.prototype.set_end_angle=function(t){this.end_angle=t},e.prototype.get_end_angle=function(){return this.end_angle},e.prototype.set_direction=function(t){this.direction.copy(t)},e.prototype.get_direction=function(){return this.direction},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.center=this.center.toArray(),o.radius=this.radius,o.start_angle=this.start_angle,o.end_angle=this.end_angle,o.direction=this.direction.toArray(),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.center.fromArray(e.center),this.radius=e.radius,this.start_angle=e.start_angle,this.end_angle=e.end_angle,this.direction.fromArray(e.direction))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.SkGeomArcComponent,e.create,t)},e}(s.T)},5874:(t,e,o)=>{o.d(e,{Q:()=>r});var n=o(8575),r=function(){function t(){this.res_type=n.c.none,this.default_line_deflection=.3,this.default_angle_deflection=30*Math.PI/180}return t.prototype.get_resource_type=function(){return this.res_type},t.prototype.parse_data=function(t){},t.prototype.get_line_deflection=function(){return this.default_line_deflection},t.prototype.get_angle_deflection=function(){return this.default_angle_deflection},t.prototype.get_label=function(){return""},t}()},5984:(t,e,o)=>{o.d(e,{H:()=>u});var n,r=o(347),i=o(7160),s=o(8268),a=o(631),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.radius=1,e.className=i.Z.FeatureSetSphereComponent,e.feature_type=a.y.FeatureSetSphere,e}return c(e,t),e.prototype.set_radius=function(t){this.radius=t},e.prototype.get_radius=function(){return this.radius},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.radius=this.radius,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.radius=e.radius)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.FeatureSetSphereComponent,e.create,t)},e}(s.x)},6499:(t,e,o)=>{var n;o.d(e,{s:()=>n}),function(t){t.none="none",t.running="running",t.finished="finished",t.error="error"}(n||(n={}))},6542:(t,e,o)=>{var n;o.d(e,{T:()=>n}),function(t){t.x="x",t.y="y",t.z="z"}(n||(n={}))},6775:(t,e,o)=>{o.d(e,{q:()=>u});var n,r=o(347),i=o(7160),s=o(2444),a=o(5361),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.point=new a.Pq0(0,0,0),e.className=i.Z.SkGeomPointComponent,e}return c(e,t),e.prototype.set_point=function(t){this.point.copy(t)},e.prototype.get_point=function(){return this.point},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.point=this.point.toArray(),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.point.fromArray(e.point))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.SkGeomPointComponent,e.create,t)},e}(s.T)},6792:(t,e,o)=>{o.d(e,{H:()=>p});var n,r=o(9017),i=o(347),s=o(7160),a=o(1289),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},_=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},p=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=s.Z.FeatureNodeSetWedge,o.component=new r.m,o.addComponent(o.component),o}return c(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.set_values=function(t,e,o){this.component.set_x_length(t),this.component.set_y_length(e),this.component.set_z_length(o),this.make_topo_shape()},e.prototype.run=function(t){return u(this,void 0,void 0,function(){return _(this,function(t){return this.make_topo_shape(),[2]})})},e.prototype.make_topo_shape=function(){var t=this.component.get_x_length(),e=this.component.get_y_length(),o=t,n=this.component.get_z_length(),r=e,i=t,s=parapoly_engine.ParaPolyShapeMaker.wedge(0,0,0,0,0,o,r,n,i,0);this.set_topo_shape(s)},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(s.Z.FeatureSetWedgeComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),i.X.register(s.Z.FeatureNodeSetWedge,e.create,t)},e}(a.o)},6994:(t,e,o)=>{o.d(e,{O:()=>n,u:()=>a});var n,r=o(347),i=o(7160),s=o(1072);!function(t){t.ComponentValueChanged="ComponentValueChanged"}(n||(n={}));var a=function(){function t(){this.id="",this.id=s.J.generateUUID(),this.className=i.Z.Component,this.name="",this.tag=null,this.mShowComponent=!0}return t.prototype.set_parent=function(t){this.parent=t},t.prototype.get_parent=function(){return this.parent},t.prototype.set_id=function(t){this.id=t},t.prototype.get_id=function(){return this.id},t.prototype.set_name=function(t){this.name=t},t.prototype.get_name=function(){return this.name},t.prototype.showComponent=function(){return this.mShowComponent},t.prototype.getClassName=function(){return this.className},t.prototype.to_json=function(t){var e={};return e.className=this.getClassName(),e.id=this.id,e.name=s.J.clearStringIfIsEmpty(this.name),e.tag=s.J.clearStringIfIsEmpty(this.tag),e},t.prototype.clone=function(e,o){return t.create(this.to_json(o),e)},t.create=function(e,o){var n=new t;return n.read_from_json(e,o),n},t.prototype.read_from_json=function(t,e){t&&(this.id=(null==e?void 0:e.clearId)?s.J.generateUUID():t.id,this.name=t.name,this.tag=t.tag)},t.register=function(e){void 0===e&&(e=!1),r.X.register(i.Z.Component,t.create,e)},t}()},7073:(t,e,o)=>{o.d(e,{J:()=>c});var n,r=o(7160),i=o(8575),s=o(4855),a=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),c=function(t){function e(){var e=t.call(this)||this;return e.res_type=i.c.sketch3d,e}return a(e,t),e.prototype.parse_data=function(e){if(t.prototype.parse_data.call(this,e),this.root_sprite){var o=this.root_sprite.getChildByName("Stage");if(o)for(var n=o.getChildrenLength(),i=0;i<n;i++){var s=o.getChildByIndex(i);if(s.getClassName()==r.Z.SkContainerNode){this.sk_container_node=s;break}}this.sk_container_node||console.warn("Sketch3dEditorResource parse_data error: sk_container_node is null")}else console.warn("Sketch3dEditorResource parse_data error: root_sprite is null")},e.prototype.get_sk_container_node=function(){return this.sk_container_node},e}(s.v)},7079:(t,e,o)=>{o.d(e,{C:()=>p});var n,r=o(5984),i=o(347),s=o(7160),a=o(1289),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},_=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},p=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=s.Z.FeatureNodeSetSphere,o.component=new r.H,o.addComponent(o.component),o}return c(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.set_values=function(t){this.component.set_radius(t),this.make_topo_shape()},e.prototype.run=function(t){return u(this,void 0,void 0,function(){return _(this,function(t){return this.make_topo_shape(),[2]})})},e.prototype.make_topo_shape=function(){var t=this.component.get_radius(),e=parapoly_engine.ParaPolyShapeMaker.sphere(t,-90,90,360);this.set_topo_shape(e)},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(s.Z.FeatureSetSphereComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),i.X.register(s.Z.FeatureNodeSetSphere,e.create,t)},e}(a.o)},7160:(t,e,o)=>{var n;o.d(e,{Z:()=>n}),function(t){t.Unknown="Unknown",t.Node="Node",t.Sprite="Sprite",t.Component="Component",t.Ax2Component="Ax2Component",t.BlockCodeComponent="BlockCodeComponent",t.BooleanComponent="BooleanComponent",t.InfoComponent="InfoComponent",t.MaterialComponent="MaterialComponent",t.MeshComponent="MeshComponent",t.MetaComponent="MetaComponent",t.ShapeComponent="ShapeComponent",t.TransformComponent="TransformComponent",t.FeatureBaseComponent="FeatureBaseComponent",t.FeatureMiscComponent="FeatureMiscComponent",t.FeatureBooleanComponent="FeatureBooleanComponent",t.FeatureChamferComponent="FeatureChamferComponent",t.FeatureDeleteComponent="FeatureDeleteComponent",t.FeatureDraftComponent="FeatureDraftComponent",t.FeatureExtrudeComponent="FeatureExtrudeComponent",t.FeatureFilletComponent="FeatureFilletComponent",t.FeatureHelixComponent="FeatureHelixComponent",t.FeatureMirrorComponent="FeatureMirrorComponent",t.FeatureRevolveComponent="FeatureRevolveComponent",t.FeatureNodeRevolve="FeatureNodeRevolve",t.FeatureShellComponent="FeatureShellComponent",t.FeatureSweepComponent="FeatureSweepComponent",t.FeatureNodeSweep="FeatureNodeSweep",t.FeatureTransformComponent="FeatureTransformComponent",t.FeatureSetBoxComponent="FeatureSetBoxComponent",t.FeatureSetConeComponent="FeatureSetConeComponent",t.FeatureSetCylinderComponent="FeatureSetCylinderComponent",t.FeatureSetEllipsoidComponent="FeatureSetEllipsoidComponent",t.FeatureSetPrismComponent="FeatureSetPrismComponent",t.FeatureSetStepComponent="FeatureSetStepComponent",t.FeatureSetSphereComponent="FeatureSetSphereComponent",t.FeatureSetTorusComponent="FeatureSetTorusComponent",t.FeatureSetTrapezoidComponent="FeatureSetTrapezoidComponent",t.FeatureSetWedgeComponent="FeatureSetWedgeComponent",t.Scene3dComponent="Scene3dComponent",t.BoxMeshComponent="BoxMeshComponent",t.PlaneMeshComponent="PlaneMeshComponent",t.SphereMeshComponent="SphereMeshComponent",t.Camera3dComponent="Camera3dComponent",t.OrthographicCameraComponent="OrthographicCameraComponent",t.AmbientLightComponent="AmbientLightComponent",t.DirectionalLightComponent="DirectionalLightComponent",t.PointLightComponent="PointLightComponent",t.SpotLightComponent="SpotLightComponent",t.WorkSpaceSettingComponent="WorkSpaceSettingComponent",t.SkGeomBaseComponent="SkGeomBaseComponent",t.SkGeomPointComponent="SkGeomPointComponent",t.SkGeomLineComponent="SkGeomLineComponent",t.SkGeomCircleComponent="SkGeomCircleComponent",t.SkGeomEllipseComponent="SkGeomEllipseComponent",t.SkGeomArcComponent="SkGeomArcComponent",t.SkGeomArcOfEllipseComponent="SkGeomArcOfEllipseComponent",t.SkGeomBSplineComponent="SkGeomBSplineComponent",t.SkConstraintComponent="SkConstraintComponent",t.TopoShapeComponent="TopoShapeComponent",t.FeatureContainerNode="FeatureContainerNode",t.FeatureNodeBase="FeatureNodeBase",t.FeatureNodeSetBox="FeatureNodeSetBox",t.FeatureNodeSetCone="FeatureNodeSetCone",t.FeatureNodeSetCylinder="FeatureNodeSetCylinder",t.FeatureNodeSetEllipsoid="FeatureNodeSetEllipsoid",t.FeatureNodeSetPrism="FeatureNodeSetPrism",t.FeatureNodeSetStep="FeatureNodeSetStep",t.FeatureNodeSetSphere="FeatureNodeSetSphere",t.FeatureNodeSetTorus="FeatureNodeSetTorus",t.FeatureNodeSetTrapezoid="FeatureNodeSetTrapezoid",t.FeatureNodeSetWedge="FeatureNodeSetWedge",t.FeatureNodeBoolean="FeatureNodeBoolean",t.FeatureNodeChamfer="FeatureNodeChamfer",t.FeatureNodeDelete="FeatureNodeDelete",t.FeatureNodeDraft="FeatureNodeDraft",t.FeatureNodeExtrude="FeatureNodeExtrude",t.FeatureNodeFillet="FeatureNodeFillet",t.FeatureNodeHelix="FeatureNodeHelix",t.FeatureNodeShell="FeatureNodeShell",t.FeatureNodeMirror="FeatureNodeMirror",t.SkContainerNode="SkContainerNode",t.SkGeomBaseNode="SkGeomBaseNode",t.SkGeomPointNode="SkGeomPointNode",t.SkGeomLineNode="SkGeomLineNode",t.SkGeomCircleNode="SkGeomCircleNode",t.SkGeomEllipseNode="SkGeomEllipseNode",t.SkGeomArcNode="SkGeomArcNode",t.SkGeomBSplineNode="SkGeomBSplineNode",t.FeatureNodeTransform="FeatureNodeTransform",t.SkConstraintNode="SkConstraintNode",t.FeatureTopoItem="FeatureTopoItem"}(n||(n={}))},7211:(t,e,o)=>{o.d(e,{W:()=>u});var n,r=o(3304),i=o(347),s=o(7160),a=o(7885),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=s.Z.SkConstraintNode,o.component=new r.RN,o.addComponent(o.component),o}return c(e,t),e.prototype.get_type=function(){return this.component.Type},e.prototype.get_value=function(){return this.component.Value},e.prototype.get_first=function(){return this.component.First},e.prototype.get_first_pos=function(){return this.component.FirstPos},e.prototype.get_second=function(){return this.component.Second},e.prototype.get_second_pos=function(){return this.component.SecondPos},e.prototype.get_third=function(){return this.component.Third},e.prototype.get_third_pos=function(){return this.component.ThirdPos},e.prototype.set_constraint=function(t){t&&(this.component.Value=t.Value,this.component.Type=t.Type,this.component.AlignmentType=t.AlignmentType,this.component.Name=t.Name,this.component.First=t.First,this.component.FirstPos=t.FirstPos,this.component.Second=t.Second,this.component.SecondPos=t.SecondPos,this.component.Third=t.Third,this.component.ThirdPos=t.ThirdPos,this.component.LabelDistance=t.LabelDistance,this.component.LabelPosition=t.LabelPosition,this.component.isDriving=t.isDriving,this.component.InternalAlignmentIndex=t.InternalAlignmentIndex,this.component.isInVirtualSpace=t.isInVirtualSpace,this.component.isActive=t.isActive,this.component.mId=t.mId)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(s.Z.SkConstraintComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),i.X.register(s.Z.SkConstraintNode,e.create,t)},e}(a.b)},7308:(t,e,o)=>{o.d(e,{S:()=>u});var n,r=o(347),i=o(7160),s=o(1072),a=o(6994),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.label="",e.object_name="",e.visible=!0,e.locked=!1,e.enabled=!0,e.dirty=!0,e.className=i.Z.InfoComponent,e}return c(e,t),e.prototype.set_label=function(t){this.label=t},e.prototype.get_label=function(){return this.label},e.prototype.set_object_name=function(t){this.object_name=t},e.prototype.get_object_name=function(){return this.object_name},e.prototype.set_visible=function(t){this.visible=t},e.prototype.get_visible=function(){return this.visible},e.prototype.set_locked=function(t){this.locked=t},e.prototype.get_locked=function(){return this.locked},e.prototype.set_enabled=function(t){this.enabled=t},e.prototype.get_enabled=function(){return this.enabled},e.prototype.set_dirty=function(t){this.dirty=t},e.prototype.get_dirty=function(){return this.dirty},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.label=s.J.clearStringIfIsEmpty(this.label),o.object_name=s.J.clearStringIfIsEmpty(this.object_name),o.visible=this.visible,o.locked=this.locked,o.enabled=this.enabled,o.dirty=this.dirty,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.label=e.label||"",this.object_name=e.object_name||"",this.visible=e.visible,this.locked=e.locked,this.enabled=e.enabled,this.dirty=e.dirty)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.InfoComponent,e.create,t)},e}(a.u)},7640:(t,e,o)=>{o.d(e,{e:()=>u});var n,r=o(347),i=o(7160),s=o(6499),a=o(6994),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.running_state=s.s.none,e.building_dirty=!0,e.className=i.Z.FeatureMiscComponent,e}return c(e,t),e.prototype.get_building_dirty=function(){return this.building_dirty},e.prototype.set_building_dirty=function(t){this.building_dirty=t},e.prototype.get_op_feature_node_id=function(){return this.op_feature_node_id},e.prototype.set_op_feature_node_id=function(t){this.op_feature_node_id=t},e.prototype.get_running_state=function(){return this.running_state},e.prototype.set_running_state=function(t){this.running_state=t},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.running_state=this.running_state,o.op_feature_node_id=this.op_feature_node_id,o.building_dirty=this.building_dirty,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.running_state=e.running_state,this.op_feature_node_id=e.op_feature_node_id,this.building_dirty=!0)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.FeatureMiscComponent,e.create,t)},e}(a.u)},7864:(t,e,o)=>{o.d(e,{p:()=>_});var n,r=o(347),i=o(7160),s=o(2928),a=o(2444),c=o(5361),u=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),_=function(t){function e(){var e=t.call(this)||this;return e.poles=[],e.weights=[],e.knots=[],e.multiplicities=[],e.degree=3,e.is_closed=!1,e.checkrational=!1,e.curve_type=s.H.basis_spline,e.className=i.Z.SkGeomBSplineComponent,e}return u(e,t),e.prototype.add_pole=function(t){t&&this.poles.push(t)},e.prototype.set_poles=function(t){this.poles=t},e.prototype.get_poles=function(){return this.poles},e.prototype.set_weights=function(t){this.weights=t},e.prototype.get_weights=function(){return this.weights},e.prototype.set_knots=function(t){this.knots=t},e.prototype.get_knots=function(){return this.knots},e.prototype.set_multiplicities=function(t){this.multiplicities=t},e.prototype.get_multiplicities=function(){return this.multiplicities},e.prototype.set_degree=function(t){this.degree=t},e.prototype.get_degree=function(){return this.degree},e.prototype.set_is_closed=function(t){this.is_closed=t},e.prototype.get_is_closed=function(){return this.is_closed},e.prototype.set_checkrational=function(t){this.checkrational=t},e.prototype.get_checkrational=function(){return this.checkrational},e.prototype.set_curve_type=function(t){this.curve_type=t},e.prototype.get_curve_type=function(){return this.curve_type},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.poles=this.poles.map(function(t){return t.toArray()}),o.weights=this.weights,o.knots=this.knots,o.multiplicities=this.multiplicities,o.degree=this.degree,o.is_closed=this.is_closed,o.checkrational=this.checkrational,o.curve_type=this.curve_type,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.poles=e.poles.map(function(t){return(new c.Pq0).fromArray(t)}),this.weights=e.weights,this.knots=e.knots,this.multiplicities=e.multiplicities,this.degree=e.degree,this.is_closed=e.is_closed,this.checkrational=e.checkrational,this.curve_type=e.curve_type)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.SkGeomBSplineComponent,e.create,t)},e}(a.T)},7866:(t,e,o)=>{o.d(e,{B:()=>_});var n,r=o(331),i=o(347),s=o(7160),a=o(5361),c=o(5255),u=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),_=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=s.Z.SkGeomEllipseNode,o.component=new r.A,o.addComponent(o.component),o.create_geom_native(),o}return u(e,t),e.prototype.set_values=function(t,e,o,n){this.component.set_center(t),this.component.set_major_radius(e),this.component.set_minor_radius(o),this.component.set_direction(n),this.write_to_geom_native()},e.prototype.update_value_from_geom_native=function(e){t.prototype.update_value_from_geom_native.call(this,e),e||console.error("SkGeomEllipseNode update_value_from_geom_native geom_native is null");var o=e.get_center(),n=e.get_major_radius(),r=e.get_minor_radius(),i=e.get_direction();this.set_values(new a.Pq0(o.x,o.y,o.z),n,r,new a.Pq0(i.x,i.y,i.z))},e.prototype.create_geom_native=function(){var t=new parapoly_engine.ParaPolyGeom_Ellipse;t.setId(this.id),this.geom_native=t;var e=new parapoly_engine.ParaPolyGeom_Topo_Ellipse;e.setId(this.id),this.geom_topo_native=e},e.prototype.write_to_geom_native=function(){if(this.geom_native){var t=this.component.get_center(),e=this.component.get_major_radius(),o=this.component.get_minor_radius(),n=this.component.get_direction(),r=new parapoly_engine.Vector3(t.x,t.y,t.z),i=new parapoly_engine.Vector3(n.x,n.y,n.z);this.geom_native.set(r,e,o,i),this.geom_topo_native.set(r,e,o,i);var s=this.getId();this.geom_native.setId(s),this.geom_topo_native.setId(s)}},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(s.Z.SkGeomEllipseComponent),this.write_to_geom_native())},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),i.X.register(s.Z.SkGeomEllipseNode,e.create,t)},e}(c.i)},7885:(t,e,o)=>{o.d(e,{b:()=>s});var n=o(347),r=o(7160),i=o(1072),s=function(){function t(t){void 0===t&&(t=""),this.id="",this.name="",this.tag=null,this.className=r.Z.Node,this.components=[],this.children=[],this.parent=null,this.memoryVisible=!0,this.id=i.J.generateUUID(),this.name=t}return t.prototype.setMemoryVisible=function(t){this.memoryVisible=t},t.prototype.getMemoryVisible=function(){return this.memoryVisible},t.prototype.getId=function(){return this.id},t.prototype.setId=function(t){this.id=t},t.prototype.getName=function(){return this.name},t.prototype.setName=function(t){this.name=t},t.prototype.getTag=function(){return this.tag},t.prototype.setTag=function(t){this.tag=t},t.prototype.getClassName=function(){return this.className},t.prototype.getParent=function(){return this.parent},t.prototype.setParent=function(t){this.parent=t},t.prototype.getComponents=function(){return this.components},t.prototype.getChildren=function(){return this.children},t.prototype.get_topo_shape=function(){return null},t.prototype.get_transform_component=function(){return null},t.prototype.get_enabled_op=function(){return!1},t.prototype.addComponent=function(t){t&&(t.set_parent(this),this.components.push(t))},t.prototype.removeComponent=function(t){var e=this.components.indexOf(t);e>=0&&(t.set_parent(null),this.components.splice(e,1))},t.prototype.hasComponent=function(t){return this.components.indexOf(t)>=0},t.prototype.addChild=function(t,e){void 0===e&&(e=-1),t&&(t.setParent(this),e>=0?this.children.splice(e,0,t):this.children.push(t))},t.prototype.removeChildAt=function(t){if(t>=0&&t<this.children.length){var e=this.children[t];e&&(e.setParent(null),this.children.splice(t,1))}},t.prototype.removeChild=function(t){if(t){var e=this.children.indexOf(t);e>=0&&(t.setParent(null),this.children.splice(e,1))}},t.prototype.hasChild=function(t){return this.children.indexOf(t)>=0},t.prototype.getComponentByClassName=function(t){for(var e=0;e<this.components.length;e++)if(this.components[e].getClassName()==t)return this.components[e]},t.prototype.getComponentByName=function(t){for(var e=0;e<this.components.length;e++)if(this.components[e].get_name()==t)return this.components[e]},t.prototype.getChildByName=function(t,e){return void 0===e&&(e=!1),this.findChildBy_Id_Or_Name("name",t,e)},t.prototype.getChildIndex=function(t){return this.children.indexOf(t)},t.prototype.getChildById=function(t,e){return void 0===e&&(e=!1),this.findChildBy_Id_Or_Name("id",t,e)},t.prototype.findChildBy_Id_Or_Name=function(t,e,o){if(void 0===o&&(o=!1),null!=e)for(var n=null,r=0;r<this.children.length;r++){var i=this.children[r],s=void 0;if("id"==t?s=i.getId():"name"==t&&(s=i.getName()),s==e)return n=i;if(o&&(n=i.findChildBy_Id_Or_Name(t,e,o)))return n}},t.prototype.getChildrenLength=function(){return this.children.length},t.prototype.getComponentsLength=function(){return this.components.length},t.prototype.getComponentByIndex=function(t){return this.components[t]},t.prototype.getChildByIndex=function(t){return this.children[t]},t.prototype.clearComponents=function(){this.components=[]},t.prototype.clearChildren=function(){this.children=[]},t.visit_node=function(e,o,n){if(void 0===o&&(o=null),void 0===n&&(n=null),e){o&&o(e);for(var r=0;r<e.getChildrenLength();r++){var i=e.getChildByIndex(r);i&&t.visit_node(i,o,n)}n&&n(e)}},t.prototype.to_json=function(t){void 0===t&&(t=null);var e={};e.className=this.className,e.id=this.id,e.name=i.J.clearStringIfIsEmpty(this.name),e.tag=i.J.clearStringIfIsEmpty(this.tag),e.components=[];for(var o=0;o<this.components.length;o++){var n=this.components[o];e.components.push(n.to_json(t))}e.children=[];for(o=0;o<this.children.length;o++)e.children.push(this.children[o].to_json(t));return e},t.prototype.clone=function(e,o){return void 0===e&&(e=null),void 0===o&&(o=null),t.create(this.to_json(o),e)},t.create=function(e,o){void 0===o&&(o=null);var n=new t;return n.read_from_json(e,o),n},t.prototype.read_from_json=function(t,e){if(void 0===e&&(e=null),t){e=e||{},this.id=e.clearId?i.J.generateUUID():t.id,this.name=t.name,this.tag=t.tag,this.components=[];for(var o=0;o<t.components.length;o++){var r=t.components[o],s=n.X.create(r.className,r,e);this.addComponent(s)}this.children=[];for(o=0;o<t.children.length;o++){var a=t.children[o],c=n.X.create(a.className,a,e);this.addChild(c)}}},t.register=function(e){void 0===e&&(e=!1),n.X.register(r.Z.Node,t.create,e)},t}()},8023:(t,e,o)=>{o.d(e,{i:()=>u});var n,r=o(347),i=o(7160),s=o(2444),a=o(5361),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.center=new a.Pq0(0,0,0),e.radius=1,e.direction=s.T.default_geom_direction_in_sketch.clone(),e.className=i.Z.SkGeomCircleComponent,e}return c(e,t),e.prototype.set_center=function(t){this.center.copy(t)},e.prototype.get_center=function(){return this.center},e.prototype.set_radius=function(t){this.radius=t},e.prototype.get_radius=function(){return this.radius},e.prototype.set_direction=function(t){this.direction.copy(t)},e.prototype.get_direction=function(){return this.direction},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.center=this.center.toArray(),o.radius=this.radius,o.direction=this.direction.toArray(),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.center.fromArray(e.center),this.radius=e.radius,this.direction.fromArray(e.direction))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.SkGeomCircleComponent,e.create,t)},e}(s.T)},8063:(t,e,o)=>{o.d(e,{V:()=>c});var n,r=o(347),i=o(7160),s=o(6994),a=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),c=function(t){function e(){var o=t.call(this)||this;return o.className=i.Z.MetaComponent,o.line_deflection=e.default_line_deflection,o.angle_deflection=e.default_angle_deflection,o}return a(e,t),e.prototype.set_line_deflection=function(t){this.line_deflection=t},e.prototype.get_line_deflection=function(){return this.line_deflection},e.prototype.set_angle_deflection=function(t){this.angle_deflection=t},e.prototype.get_angle_deflection=function(){return this.angle_deflection},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.line_deflection=this.line_deflection,o.angle_deflection=this.angle_deflection,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.line_deflection=e.line_deflection,this.angle_deflection=e.angle_deflection)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.MetaComponent,e.create,t)},e.default_line_deflection=.3,e.default_angle_deflection=10*Math.PI/180,e}(s.u)},8268:(t,e,o)=>{o.d(e,{x:()=>u});var n,r=o(347),i=o(7160),s=o(631),a=o(6994),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.feature_type=s.y.FeatureBase,e.className=i.Z.FeatureBaseComponent,e}return c(e,t),e.prototype.get_feature_type=function(){return this.feature_type},e.prototype.isFeatureComponent=function(){return!0},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_type=this.feature_type,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_type=e.feature_type)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.FeatureBaseComponent,e.create,t)},e}(a.u)},8297:(t,e,o)=>{var n;o.d(e,{E:()=>n}),function(t){t.union="union",t.difference="difference",t.intersection="intersection"}(n||(n={}))},8575:(t,e,o)=>{var n,r;o.d(e,{c:()=>n,y:()=>r}),function(t){t.none="none",t.step="step",t.step_link="step_link",t.assembly3d="assembly3d",t.parapoly3d="parapoly3d",t.part3d="part3d",t.block3d="block3d",t.code3d="code3d",t.sketch3d="sketch3d",t.js="js",t.json="json",t.text="text"}(n||(n={})),function(t){t.none="none",t.jhasm3d="jhasm3d",t.jhprt3d="jhprt3d",t.jhbk3d="jhbk3d",t.jhjs3d="jhjs3d",t.jhsketch3d="jhsketch3d",t.js="js",t.json="json",t.txt="txt",t.step="step"}(r||(r={}))},8625:(t,e,o)=>{o.d(e,{Y:()=>p});var n,r=o(9506),i=o(347),s=o(7160),a=o(1289),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},_=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},p=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=s.Z.FeatureNodeSetTorus,o.component=new r.t,o.addComponent(o.component),o}return c(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.set_values=function(t,e){this.component.set_radius1(t),this.component.set_radius2(e),this.make_topo_shape()},e.prototype.run=function(t){return u(this,void 0,void 0,function(){return _(this,function(t){return this.make_topo_shape(),[2]})})},e.prototype.make_topo_shape=function(){var t=this.component.get_radius1(),e=this.component.get_radius2(),o=parapoly_engine.ParaPolyShapeMaker.torus(t,e,-180,180,360);this.set_topo_shape(o)},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(s.Z.FeatureSetTorusComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),i.X.register(s.Z.FeatureNodeSetTorus,e.create,t)},e}(a.o)},8699:(t,e,o)=>{o.d(e,{w:()=>l});var n,r=o(7864),i=o(347),s=o(7160),a=o(5255),c=o(2928),u=o(5062),_=o(5590),p=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=s.Z.SkGeomBSplineNode,o.component=new r.p,o.addComponent(o.component),o.create_geom_native(),o}return p(e,t),e.prototype.set_degree=function(t){this.component.set_degree(t)},e.prototype.set_is_closed=function(t){this.component.set_is_closed(t)},e.prototype.add_pole=function(t){this.component.add_pole(t)},e.prototype.get_poles=function(){return this.component.get_poles()},e.prototype.set_values_by_poles=function(t){if(t){var e=this.component.get_is_closed(),o=this.component.get_degree(),n=_.a.create_ParaPolyGeomBSplineParams(t,e,o);t=u.k.convert_to_vector3_array(n.poles_arr);var r=u.k.convert_to_number_array(n.weights_arr),i=u.k.convert_to_number_array(n.knots_arr),s=u.k.convert_to_number_array(n.multiplicities_arr);o=n.degree,this.set_values(t,r,i,s,o,e)}},e.prototype.set_values=function(t,e,o,n,r,i,s,a){void 0===r&&(r=3),void 0===i&&(i=!1),void 0===s&&(s=!1),void 0===a&&(a=c.H.basis_spline),this.component.set_poles(t),this.component.set_weights(e),this.component.set_knots(o),this.component.set_multiplicities(n),this.component.set_degree(r),this.component.set_is_closed(i),this.component.set_checkrational(s),this.component.set_curve_type(a),this.write_to_geom_native()},e.prototype.update_value_from_geom_native=function(e){t.prototype.update_value_from_geom_native.call(this,e),e||console.error("SkGeomBSplineNode.update_value_from_geom_native: geom_native is null");var o=u.k.convert_to_vector3_array(e.getPolesArray()),n=u.k.convert_to_number_array(e.getWeightsArray()),r=u.k.convert_to_number_array(e.getKnotsArray()),i=u.k.convert_to_number_array(e.getMultiplicitiesArray()),s=e.getDegree(),a=e.getPeriodic(),c=e.getCheckrational(),_=e.getCurveType();this.set_values(o,n,r,i,s,a,c,_)},e.prototype.create_geom_native=function(){var t=new parapoly_engine.ParaPolyGeom_BSpline;t.setId(this.id),this.geom_native=t;var e=new parapoly_engine.ParaPolyGeom_Topo_BSpline;e.setId(this.id),this.geom_topo_native=e},e.prototype.write_to_geom_native=function(){var t=this.geom_native;if(!t)return console.error("SkGeomBSplineNode.write_to_geom_native: geom_native is null"),null;var e=this.component.get_poles(),o=this.component.get_weights(),n=this.component.get_knots(),r=this.component.get_multiplicities(),i=this.component.get_degree(),s=this.component.get_is_closed(),a=this.component.get_checkrational(),c=this.component.get_curve_type(),_=u.k.convert_to_native_vector3_array(e),p=u.k.convert_to_native_double_array(o),l=u.k.convert_to_native_double_array(n),h=u.k.convert_to_native_int_array(r);t.setValues(_,p,l,h,i,s,a,c),this.geom_topo_native.setValues(_,p,l,h,i,s,a,c);var d=this.getId();this.geom_native.setId(d),this.geom_topo_native.setId(d)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(s.Z.SkGeomBSplineComponent),this.write_to_geom_native())},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),i.X.register(s.Z.SkGeomBSplineNode,e.create,t)},e}(a.i)},8873:(t,e,o)=>{o.d(e,{a:()=>p});var n,r=o(9162),i=o(347),s=o(7160),a=o(1289),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},_=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},p=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=s.Z.FeatureNodeSetEllipsoid,o.component=new r.P,o.addComponent(o.component),o}return c(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.set_values=function(t,e,o){this.component.set_radius_x(t),this.component.set_radius_y(e),this.component.set_radius_z(o),this.make_topo_shape()},e.prototype.run=function(t){return u(this,void 0,void 0,function(){return _(this,function(t){return this.make_topo_shape(),[2]})})},e.prototype.make_topo_shape=function(){var t=this.component.get_radius_x(),e=this.component.get_radius_y(),o=this.component.get_radius_z(),n=parapoly_engine.ParaPolyShapeMaker.ellipsoid(t,e,o,-90,90,360);this.set_topo_shape(n)},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(s.Z.FeatureSetEllipsoidComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),i.X.register(s.Z.FeatureNodeSetEllipsoid,e.create,t)},e}(a.o)},8892:(t,e,o)=>{o.d(e,{S:()=>i});var n=o(7160),r=o(1072),i=function(){function t(){}return t.readSprite=function(e,o,n){if(void 0===o&&(o=null),void 0===n&&(n=!1),e){var r=t.convert(e,n);o&&o.addChild(r);for(var i=e.getChildrenLength(),s=0;s<i;s++){var a=e.getChildByIndex(s);t.readSprite(a,r,n)}return r}},t.convert=function(e,o){if(void 0===o&&(o=!1),e){var r=!0;e.getClassName()===n.Z.SkContainerNode&&o&&(r=!1);e.getComponentByClassName(n.Z.InfoComponent);var i=e.getComponentByClassName(n.Z.TransformComponent),s=e.getComponentByClassName(n.Z.TopoShapeComponent),a=e.getComponentByClassName(n.Z.MaterialComponent),c=e.getName();c=c||e.getId();var u=new parapoly_engine.ParaPolyNode(c);if(console.log("================name:",c),r&&i){var _=new parapoly_engine.ParaPolyTransformComponent;t.readTransformComponent(_,i),u.addComponent(_)}if(r&&s)if(!s.get_archived()){var p=new parapoly_engine.ParaPolyShapeComponent;t.readTopoShapeComponent(p,s),u.addComponent(p)}if(r&&a){var l=new parapoly_engine.ParaPolyMaterialComponent;t.readMaterialComponent(l,a),u.addComponent(l)}return u}},t.readTransformComponent=function(t,e){if(t&&e){var o=e.get_position(),n=e.get_scale(),r=e.get_rotation();t.x=o.x,t.y=o.y,t.z=o.z,t.scale_x=n.x,t.scale_y=n.y,t.scale_z=n.z,t.q_x=r.x,t.q_y=r.y,t.q_z=r.z,t.q_w=r.w}},t.readTopoShapeComponent=function(t,e){if(t&&e){var o=e.get_topo_shape();o&&t.setParaPolyTopoShape(o)}},t.readMaterialComponent=function(t,e){if(t&&e){var o=e.get_base_color(),n=(e.get_opacity(),e.get_metalness()),i=e.get_roughness(),s=e.get_material_name(),a=r.J.stringToNativeCharArray(s),c=new parapoly_engine.ParaPolyDoubleArray;c.pushValue(o.r),c.pushValue(o.g),c.pushValue(o.b),t.setMaterialName(a),t.setBaseColor(c),t.metallic=n,t.roughness=i}},t}()},9017:(t,e,o)=>{o.d(e,{m:()=>u});var n,r=o(347),i=o(7160),s=o(8268),a=o(631),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.x_length=1,e.y_length=1,e.z_length=1,e.className=i.Z.FeatureSetWedgeComponent,e.feature_type=a.y.FeatureSetWedge,e}return c(e,t),e.prototype.set_x_length=function(t){this.x_length=t},e.prototype.get_x_length=function(){return this.x_length},e.prototype.set_y_length=function(t){this.y_length=t},e.prototype.get_y_length=function(){return this.y_length},e.prototype.set_z_length=function(t){this.z_length=t},e.prototype.get_z_length=function(){return this.z_length},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.x_length=this.x_length,o.y_length=this.y_length,o.z_length=this.z_length,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.x_length=e.x_length,this.y_length=e.y_length,this.z_length=e.z_length)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.FeatureSetWedgeComponent,e.create,t)},e}(s.x)},9162:(t,e,o)=>{o.d(e,{P:()=>u});var n,r=o(347),i=o(7160),s=o(8268),a=o(631),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.radius_x=4,e.radius_y=2,e.radius_z=2,e.className=i.Z.FeatureSetEllipsoidComponent,e.feature_type=a.y.FeatureSetEllipsoid,e}return c(e,t),e.prototype.set_radius_x=function(t){this.radius_x=t},e.prototype.get_radius_x=function(){return this.radius_x},e.prototype.set_radius_y=function(t){this.radius_y=t},e.prototype.get_radius_y=function(){return this.radius_y},e.prototype.set_radius_z=function(t){this.radius_z=t},e.prototype.get_radius_z=function(){return this.radius_z},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.radius_x=this.radius_x,o.radius_y=this.radius_y,o.radius_z=this.radius_z,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.radius_x=e.radius_x,this.radius_y=e.radius_y,this.radius_z=e.radius_z)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.FeatureSetEllipsoidComponent,e.create,t)},e}(s.x)},9175:(t,e,o)=>{o.d(e,{O:()=>i});var n=o(3027),r=o(1400),i=function(){function t(){}return t.tessellate_node=function(e,o,i){if(e){var s=e;if(s.get_topo_shape){var a=s.get_topo_shape();if(a){var c=s.get_topo_shape_component();if(c){for(var u=new Array,_=new Array,p=new Array,l=new parapoly_engine.ParaPolyShapeTessellate(a,o,i),h=new parapoly_engine.ParaPolyTopoExplorer(a),d=h.getFaceCount(),f=h.getEdgeCount(),y=h.getPointCount(),m=0;m<d;m++){var g=h.getFace(m),v=l.getFaceMeshComponent(g),w=new n.F;w.meshType=r.T.face,w.real_index=g.getRealIndex(),t.read_native_mesh_component(v,w),u.push(w)}for(m=0;m<f;m++){var b=h.getEdge(m),C=l.getEdgeMeshComponent(b),x=new n.F;x.meshType=r.T.edge,x.real_index=b.getRealIndex(),t.read_native_mesh_component(C,x),_.push(x)}for(m=0;m<y;m++){var P=h.getPoint(m),S=l.getPointMeshComponent(P),k=new n.F;k.meshType=r.T.point,k.real_index=P.getRealIndex(),t.read_native_mesh_component(S,k),p.push(k)}c.set_facesMesh(u),c.set_edgesMesh(_),c.set_pointsMesh(p),s.set_tessellated(!0)}else console.warn("topoShapeComponent is null")}else console.warn("topo_shape is null")}else console.warn("feature_node.get_topo_shape is null")}else console.warn("node is null")},t.read_native_mesh_component=function(t,e){if(t&&e){for(var o=t.vertices(),n=t.indices(),r=t.colors(),i=t.normals(),s=t.lines(),a=t.points(),c=o.getCount(),u=i.getCount(),_=n.getCount(),p=r.getCount(),l=s.getCount(),h=a.getCount(),d=new Array(c),f=new Array(u),y=new Array(_),m=new Array(p),g=new Array(l),v=new Array(h),w=0;w<c;w++)d[w]=o.getValue(w);for(w=0;w<u;w++)f[w]=i.getValue(w);for(w=0;w<_;w++)y[w]=n.getValue(w);for(w=0;w<p;w++)m[w]=r.getValue(w);for(w=0;w<l;w++)g[w]=s.getValue(w);for(w=0;w<h;w++)v[w]=a.getValue(w);e.vertices=d,e.normals=f,e.indices=y,e.colors=m,e.lines=g,e.points=v}},t}()},9281:(t,e,o)=>{o.d(e,{Q:()=>u});var n,r=o(347),i=o(7160),s=o(8268),a=o(631),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.top_w=2,e.bottom_w=10,e.hight=10,e.depth=.5,e.className=i.Z.FeatureSetTrapezoidComponent,e.feature_type=a.y.FeatureSetTrapezoid,e}return c(e,t),e.prototype.set_top_w=function(t){this.top_w=t},e.prototype.get_top_w=function(){return this.top_w},e.prototype.set_bottom_w=function(t){this.bottom_w=t},e.prototype.get_bottom_w=function(){return this.bottom_w},e.prototype.set_hight=function(t){this.hight=t},e.prototype.get_hight=function(){return this.hight},e.prototype.set_depth=function(t){this.depth=t},e.prototype.get_depth=function(){return this.depth},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.top_w=this.top_w,o.bottom_w=this.bottom_w,o.hight=this.hight,o.depth=this.depth,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.top_w=e.top_w,this.bottom_w=e.bottom_w,this.hight=e.hight,this.depth=e.depth)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.FeatureSetTrapezoidComponent,e.create,t)},e}(s.x)},9333:(t,e,o)=>{o.d(e,{M:()=>p});var n,r=o(5638),i=o(347),s=o(7160),a=o(1289),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},_=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},p=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=s.Z.FeatureNodeSetPrism,o.component=new r.R,o.addComponent(o.component),o}return c(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.set_values=function(t,e,o){this.component.set_edges(t),this.component.set_radius(e),this.component.set_height(o),this.make_topo_shape()},e.prototype.run=function(t){return u(this,void 0,void 0,function(){return _(this,function(t){return this.make_topo_shape(),[2]})})},e.prototype.make_topo_shape=function(){var t=this.component.get_edges(),e=this.component.get_radius(),o=this.component.get_height(),n=parapoly_engine.ParaPolyShapeMaker.prism(t,e,o);this.set_topo_shape(n)},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(s.Z.FeatureSetPrismComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),i.X.register(s.Z.FeatureNodeSetPrism,e.create,t)},e}(a.o)},9375:(t,e,o)=>{o.d(e,{Y:()=>M});var n,r=o(4467),i=o(5759),s=o(347),a=o(7885),c=o(7160),u=o(5361),_=o(7308),p=o(632),l=o(6499),h=o(7640),d=o(2226),f=o(7211),y=o(3304),m=o(718),g=o(2508),v=o(9856),w=o(1934),b=o(7866),C=o(8699),x=o(9471),P=o(615),S=o(4291),k=o(1072),E=o(4991),O=o(3401),N=o(261),j=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),F=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},T=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},M=function(t){function e(o){void 0===o&&(o="");var n=t.call(this,o)||this;return n.m_running_state=l.s.none,n.className=c.Z.SkContainerNode,n.info_component=new _.S,n.ax2_component=new r.v,n.material_component=new i.n,n.misc_component=new h.e,n.topo_shape_component=new p.t,n.addComponent(n.info_component),n.addComponent(n.ax2_component),n.addComponent(n.material_component),n.addComponent(n.misc_component),n.addComponent(n.topo_shape_component),n.m_default_ax2=new d.g(new u.Pq0(0,0,0),e.fixed_direction),n.geoms=new a.b("Geoms"),n.constraints=new a.b("Constraints"),n.addChild(n.geoms),n.addChild(n.constraints),n.sketchObject=new parapoly_engine.SketchObject,n.toPoint=new parapoly_engine.Vector3,n}return j(e,t),e.prototype.clear_topo_shape_component=function(){this.topo_shape_component.clear()},e.prototype.set_building_dirty=function(t){this.misc_component.set_building_dirty(t)},e.prototype.get_building_dirty=function(){return this.misc_component.get_building_dirty()},e.prototype.set_op_feature_node_id=function(t){this.misc_component.set_op_feature_node_id(t)},e.prototype.get_op_feature_node_id=function(){return this.misc_component.get_op_feature_node_id()},e.prototype.set_dirty=function(t){this.info_component.set_dirty(t)},e.prototype.get_dirty=function(){return this.info_component.get_dirty()},e.prototype.get_sketch_object=function(){return this.sketchObject},e.prototype.move_point=function(t,e,o,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),o){this.toPoint.set(o.x,o.y,o.z);var i=this.sketchObject.movePoint(t,e,this.toPoint,n,r);console.log("move_point ret:",i)}},e.prototype.solve=function(t){void 0===t&&(t=!1),this.sketchObject&&this.sketchObject.solve(t)},e.prototype.clear=function(){var t=this.get_geoms(),e=this.get_constraints();t.clearChildren(),e.clearChildren(),this.sketchObject=new parapoly_engine.SketchObject},e.prototype.sync_geoms_data=function(){if(this.sketchObject){var t=this.get_geoms(),e=this.get_constraints();t.clearChildren(),e.clearChildren();var o=this.sketchObject.getCompleteGeometryArray(),n=o.getCount();console.log("============sync geoms cnt:",n);for(var r=0;r<n;r++){var i=o.getValue(r),s=i.getName();i=this.convert_native_geom_type(i);var a=void 0;switch(s){case P.w.ParaPolyGeom_Point:a=new m.N;break;case P.w.ParaPolyGeom_Line:a=new g.l;break;case P.w.ParaPolyGeom_Arc:a=new v.n;break;case P.w.ParaPolyGeom_Circle:a=new w.n;break;case P.w.ParaPolyGeom_Ellipse:case P.w.ParaPolyGeom_ArcOfEllipse:a=new b.B;break;case P.w.ParaPolyGeom_BSpline:a=new C.w}a?(a.set_geom_id(r),a.update_value_from_geom_native(i),t.addChild(a),i.setId(a.getId()),a.get_geom_native().setGeomId(r)):console.warn("sync_geoms_data: geom_node is null",s,r)}}else console.error("sync_geoms_data: sketchObject is null")},e.prototype.update_geoms_data=function(t){if(void 0===t&&(t=!1),this.sketchObject){if(t)this.sync_geoms_data();else{var e=this.get_geoms(),o=this.sketchObject.getCompleteGeometryArray(),n=o.getCount();console.log("============geoms cnt:",n);for(var r=0;r<n;r++){var i=o.getValue(r),s=i.getId(),a=i.getName();i=this.convert_native_geom_type(i);var c=e.getChildById(s);if(c){if(c){console.log("geom id:",s,a);var u=c.get_geom_id();i||console.warn("update_geoms_data: geom_native is null",a,r,u,s),u!=r&&console.warn("update_geoms_data: geom_id != i",u,r),c.update_value_from_geom_native(i)}}else console.warn("update_geoms_data: geom_node is null",a,r,s)}}var _=this.get_constraints();_.clearChildren();var p=this.sketchObject.getConstraintCount();console.log("============constraint cnt:",p);for(r=0;r<p;r++){var l=this.sketchObject.getConstraint(r),h=this.constraintToJson(l),d=new f.W;d.set_constraint(h),_.addChild(d)}}else console.error("update_geoms_data: sketchObject is null")},e.prototype.convert_native_geom_type=function(t){if(t){var e=t.getName();switch(e){case P.w.ParaPolyGeom_Point:return parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_Point(t);case P.w.ParaPolyGeom_Line:return parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_Line(t);case P.w.ParaPolyGeom_Arc:return parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_Arc(t);case P.w.ParaPolyGeom_Circle:return parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_Circle(t);case P.w.ParaPolyGeom_Ellipse:return parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_Ellipse(t);case P.w.ParaPolyGeom_ArcOfEllipse:return parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_ArcOfEllipse(t);case P.w.ParaPolyGeom_BSpline:return parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_BSpline(t)}console.warn("convert_native_geom_type: unknown geom type:",e)}},e.prototype.bspline_exposeInternalGeometry=function(t){this.sketchObject&&this.sketchObject.exposeInternalGeometry(t)},e.prototype.get_geom_node_by_geom_id=function(t){var e=this.get_geoms();if(e)for(var o=0;o<e.getChildrenLength();o++){var n=e.getChildByIndex(o);if(n.get_geom_id()==t)return n}},e.prototype.get_geom_node_by_id=function(t){var e=this.get_geoms();if(e)return e.getChildById(t)},e.prototype.add_geom_node=function(t,e){if(void 0===e&&(e=!0),t){var o=t.getId();e&&this.geoms.addChild(t);var n=t.get_geom_native();if(n){var r=this.sketchObject.addGeometry(n);r<0&&console.error("add_geom_node: geom_id < 0"),t.set_geom_id(r),n.setGeomId(r)}else console.error("add_geom_node: native_geom is null",o)}},e.prototype.remove_geom_node=function(t){if(t){var e=t.get_geom_id();this.geoms.removeChild(t);var o=t.get_geom_native();if(o)o.getGeomId()!=e&&console.warn("remove_geom_node: geom_id_native != geom_id");else console.warn("remove_geom_node: native_geom is null");console.log("remove_geom_node:",e);var n=new parapoly_engine.ParaPolyIntArray;n.pushValue(e);var r=this.sketchObject.delGeometriesArray(n);console.log("remove_geom_node: ret:",r)}},e.prototype.get_geoms=function(){return this.geoms},e.prototype.get_constraints=function(){return this.constraints},e.prototype.get_plane=function(){var t=this.ax2_component.get_direction();return new u.Zcv(t,0)},e.transform_native_shape=function(t,e){if(!t||t.isNull()||!e)return null;var o=e.get_ax2_transform(),n=new u.Pq0,r=new u.PTz,i=new u.Pq0;return o.decompose(n,r,i),t.rotate(r.x,r.y,r.z,r.w),t},e.prototype.get_ax2_transform=function(t){void 0===t&&(t=!1);var e=this.ax2_component.get_center(),o=this.ax2_component.get_direction(),n=new d.g(e,o),r=d.g.getRotationBetween(this.m_default_ax2,n),i=new u.kn4,s=new u.Pq0(1,1,1);return i.compose(e,r,s),t&&(i=i.invert()),i},e.prototype.get_archived=function(){return this.topo_shape_component.get_archived()},e.prototype.set_archived=function(t){this.topo_shape_component.set_archived(t)},e.prototype.get_visible=function(){return this.info_component.get_visible()},e.prototype.set_visible=function(t){this.info_component.set_visible(t)},e.prototype.run=function(){return F(this,arguments,void 0,function(t){return void 0===t&&(t=null),T(this,function(t){return this.make_topo_shape(),[2]})})},e.prototype.get_running_state=function(){var t;return null===(t=this.misc_component)||void 0===t?void 0:t.get_running_state()},e.prototype.set_running_state=function(t){this.misc_component.set_running_state(t)},e.prototype.to_wires_shape=function(){var t=this.get_label()||this.getId(),e=this.convertToNativeSketchNode(t);return parapoly_engine.ParaPolyShapeMaker.to_wires_shape(e)},e.prototype.make_topo_shape=function(){var t=this.to_wires_shape();t&&!t.isNull()?this.set_topo_shape(t):console.log("wires_shape is null")},e.prototype.set_tessellated=function(t){this.topo_shape_component.set_tessellated(t)},e.prototype.get_topo_shape_component=function(){return this.topo_shape_component},e.prototype.set_topo_shape=function(t){this.topo_shape_component.set_topo_shape(t)},e.prototype.get_topo_shape=function(){return this.topo_shape_component.get_topo_shape()},e.prototype.get_ax2_component=function(){return this.ax2_component},e.prototype.set_label=function(t){this.info_component.set_label(t)},e.prototype.get_label=function(){return this.info_component.get_label()},e.prototype.set_ax2=function(t,e){this.ax2_component.set_center(t),this.ax2_component.set_direction(e)},e.prototype.get_ax2=function(){return{center:this.ax2_component.get_center(),direction:this.ax2_component.get_direction()}},e.prototype.set_color=function(t){var e=new u.Q1f(t);this.material_component.set_base_color(e)},e.prototype.get_color=function(){return this.material_component.get_base_color().getHexString()},e.prototype.convertToNativeSketchNode=function(t){var e=new parapoly_engine.ParaPolyNode(t),o=this.get_geoms();if(!o)return e;for(var n=0;n<o.getChildrenLength();n++){var r=o.getChildByIndex(n);if(r){var i=r.get_geom_topo_native();if(i){var s=i.getInternal(),a=i.getIsConstruction();if(!s&&!a){var c=new parapoly_engine.ParaPolyNode(t+"_"+n);c.addComponent(i),e.addChild(c)}}}}return e},e.prototype.to_json=function(e){return void 0===e&&(e=null),t.prototype.to_json.call(this,e)},e.prototype.export_to_dxf_or_svg=function(t){void 0===t&&(t="dxf");var e,o=this.sketchObject.getCompleteGeometryArray(),n=new parapoly_engine.ParaPolyGeomArray,r=o.getCount();console.log("export_to_dxf_or_svg cnt:",r);for(var i=0;i<r;i++){var s=o.getValue(i),a=s.getInternal(),c=s.getIsConstruction();console.log("is_internal:",i,a,c),a||c||n.pushValue(s)}if("dxf"==t){var u=(new S.i).export(n);e=k.J.nativeCharArrayToString(u)}else{e=(new E.k).export(n)}return e},e.prototype.create_geom_node_by_native_geom=function(t){if(t){var e=null;switch(t.getName()){case P.w.ParaPolyGeom_Point:var o=parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_Point(t);(e=new m.N).update_value_from_geom_native(o);break;case P.w.ParaPolyGeom_Line:o=parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_Line(t);(e=new g.l).update_value_from_geom_native(o);break;case P.w.ParaPolyGeom_Arc:o=parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_Arc(t);(e=new v.n).update_value_from_geom_native(o);break;case P.w.ParaPolyGeom_Circle:o=parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_Circle(t);(e=new w.n).update_value_from_geom_native(o);break;case P.w.ParaPolyGeom_Ellipse:o=parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_Ellipse(t);(e=new b.B).update_value_from_geom_native(o);break;case P.w.ParaPolyGeom_BSpline:o=parapoly_engine.ParaPolyTypeConverter.to_ParaPolyGeom_BSpline(t);(e=new C.w).update_value_from_geom_native(o)}return e}},e.prototype.load_from_svg=function(t){if(t){this.clear();var e=(new N.I).load(t);if(e){for(var o=e.getCount(),n=new parapoly_engine.ParaPolyIntArray,r=0;r<o;r++){var i=e.getValue(r),s=this.create_geom_node_by_native_geom(i);if(s){this.add_geom_node(s);var a=s.get_geom_id();n.pushValue(a)}}var c=new g.l;c.set_values(new u.Pq0(0,0,0),new u.Pq0(1,0,0),new u.Pq0(0,0,1)),this.add_geom_node(c);var _=c.get_geom_id();this.sketchObject.symmetricCopy(n,_),n.pushValue(_),this.sketchObject.delGeometriesArray(n),this.sync_geoms_data()}}},e.prototype.load_from_dxf=function(t){if(t){this.clear();var e=new O.U;e.load(t);var o=e.native_loader,n=o.getGeomCnt();console.log("load_from_dxf cnt:",n);for(var r=0;r<n;r++){var i=o.getGeomByIndex(r),s=this.create_geom_node_by_native_geom(i);s&&this.add_geom_node(s)}}},e.prototype.constraintToJson=function(t){if(t)return{Value:t.getValue(),Type:t.getType(),AlignmentType:t.getAlignmentType(),Name:t.getName(),First:t.getFirst(),FirstPos:t.getFirstPos(),Second:t.getSecond(),SecondPos:t.getSecondPos(),Third:t.getThird(),ThirdPos:t.getThirdPos(),LabelDistance:t.getLabelDistance(),LabelPosition:t.getLabelPosition(),isDriving:t.getDriving(),InternalAlignmentIndex:t.getInternalAlignmentIndex(),isInVirtualSpace:t.getInVirtualSpace(),isActive:t.getActive(),mId:t.getId()}},e.prototype.read_from_json=function(e,o){if(e){if(t.prototype.read_from_json.call(this,e,o),this.info_component=this.getComponentByClassName(c.Z.InfoComponent),this.ax2_component=this.getComponentByClassName(c.Z.Ax2Component),this.material_component=this.getComponentByClassName(c.Z.MaterialComponent),this.misc_component=this.getComponentByClassName(c.Z.FeatureMiscComponent),this.topo_shape_component=this.getComponentByClassName(c.Z.TopoShapeComponent),this.sketchObject=new parapoly_engine.SketchObject,this.geoms=this.getChildByName("Geoms"),this.geoms)for(var n=0;n<this.geoms.getChildrenLength();n++){(r=this.geoms.getChildByIndex(n))&&this.add_geom_node(r,!1)}if(this.constraints=this.getChildByName("Constraints"),this.constraints)for(n=0;n<this.constraints.getChildrenLength();n++){var r;if(r=this.constraints.getChildByIndex(n)){var i=r.component;i&&this.add_constraint(i)}}}},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),s.X.register(c.Z.SkContainerNode,e.create,t)},e.prototype.add_constraint_coincident=function(t,e,o,n){var r={Type:x.uF.Coincident,First:o,FirstPos:n,Second:t,SecondPos:e};if(!this.sketchObject.isP1P2CoincidentConstraint(r.First,(0,y.u0)(r.FirstPos),r.Second,(0,y.u0)(r.SecondPos)))return this.add_constraint(r);console.error("can't add redundant constraint:",r)},e.prototype.add_constraint_distance_point_to_point=function(t,e,o,n,r){var i={Type:x.uF.Distance,First:t,FirstPos:e,Second:o,SecondPos:n,Value:r};return this.add_constraint(i)},e.prototype.add_constraint_distance_line=function(t,e){var o={Type:x.uF.Distance,First:t,Value:e};return this.add_constraint(o)},e.prototype.add_constraint_distance_point_to_line=function(t,e,o,n){var r={Type:x.uF.Distance,First:t,FirstPos:e,Second:o,Value:n};return this.add_constraint(r)},e.prototype.add_constraint_distance_h_line=function(t,e){var o={Type:x.uF.DistanceX,First:t,Value:e};return this.add_constraint(o)},e.prototype.add_constraint_distance_h_point_to_point=function(t,e,o){var n={Type:x.uF.DistanceX,First:t,FirstPos:x.lg.start,Second:e,SecondPos:x.lg.start,Value:o};return this.add_constraint(n)},e.prototype.add_constraint_distance_h_advanced=function(t,e,o,n,r){var i={Type:x.uF.DistanceX,First:t,FirstPos:e,Second:o,SecondPos:n,Value:r};return this.add_constraint(i)},e.prototype.add_constraint_distance_h_point_on_fixed_x=function(t,e,o){var n={Type:x.uF.DistanceX,First:t,FirstPos:e,Value:o};return this.add_constraint(n)},e.prototype.add_constraint_distance_v_line=function(t,e){var o={Type:x.uF.DistanceY,First:t,Value:e};return this.add_constraint(o)},e.prototype.add_constraint_distance_v_point_to_point=function(t,e,o){var n={Type:x.uF.DistanceY,First:t,FirstPos:x.lg.start,Second:e,SecondPos:x.lg.start,Value:o};return this.add_constraint(n)},e.prototype.add_constraint_distance_v_advanced=function(t,e,o,n,r){var i={Type:x.uF.DistanceY,First:t,FirstPos:e,Second:o,SecondPos:n,Value:r};return this.add_constraint(i)},e.prototype.add_constraint_distance_v_point_on_fixed_y=function(t,e,o){var n={Type:x.uF.DistanceY,First:t,FirstPos:e,Value:o};return this.add_constraint(n)},e.prototype.add_constraint_distance_circle_to_circle=function(t,e,o){var n={Type:x.uF.Distance,First:t,Second:e,Value:o};return this.add_constraint(n)},e.prototype.add_constraint_distance_ellipse_to_ellipse=function(t,e,o){return this.add_constraint_distance_circle_to_circle(t,e,o)},e.prototype.add_constraint_radius=function(t,e){var o={Type:x.uF.Radius,First:t,Value:e};return this.add_constraint(o)},e.prototype.add_constraint_diameter=function(t,e){var o={Type:x.uF.Diameter,First:t,Value:e};return this.add_constraint(o)},e.prototype.add_constraint_parallel_line_to_line=function(t,e){var o={Type:x.uF.Parallel,First:t,Second:e};return this.add_constraint(o)},e.prototype.add_constraint_horizontal_line=function(t){var e={Type:x.uF.Horizontal,First:t};return this.add_constraint(e)},e.prototype.add_constraint_horizontal_point_to_point=function(t,e,o,n){var r={Type:x.uF.Horizontal,First:t,FirstPos:e,Second:o,SecondPos:n};return this.add_constraint(r)},e.prototype.add_constraint_vertical_line=function(t){var e={Type:x.uF.Vertical,First:t};return this.add_constraint(e)},e.prototype.add_constraint_vertical_point_to_point=function(t,e,o,n){var r={Type:x.uF.Vertical,First:t,FirstPos:e,Second:o,SecondPos:n};return this.add_constraint(r)},e.prototype.add_constraint_equal=function(t,e){var o={Type:x.uF.Equal,First:t,Second:e};return this.add_constraint(o)},e.prototype.add_constraint_perpendicular_line_to_line=function(t,e){var o={Type:x.uF.Perpendicular,First:t,Second:e};return this.add_constraint(o)},e.prototype.add_constraint_symmetric_point_line_point=function(t,e,o,n,r){var i={Type:x.uF.Symmetric,First:t,FirstPos:e,Second:n,SecondPos:r,Third:o};return this.add_constraint(i)},e.prototype.add_constraint_symmetric_point_point_point=function(t,e,o,n,r,i){var s={Type:x.uF.Symmetric,First:t,FirstPos:e,Second:r,SecondPos:i,Third:o,ThirdPos:n};return this.add_constraint(s)},e.prototype.add_constraint_angle_line=function(t,e){var o={Type:x.uF.Angle,First:t,Value:e};return this.add_constraint(o)},e.prototype.add_constraint_angle_line_to_line=function(t,e,o){var n={Type:x.uF.Angle,First:t,Second:e,Value:o};return this.add_constraint(n)},e.prototype.add_constraint_angle_line_to_line_with_point=function(t,e,o,n,r){var i={Type:x.uF.Angle,First:t,FirstPos:e,Second:o,SecondPos:n,Value:r};return this.add_constraint(i)},e.prototype.add_constraint_angle_advanced=function(t,e,o,n,r,i,s){var a={Type:x.uF.Angle,First:t,FirstPos:e,Second:o,SecondPos:n,Third:r,ThirdPos:i,Value:s};return this.add_constraint(a)},e.prototype.add_constraint_tangent=function(t,e){var o={Type:x.uF.Tangent,First:t,Second:e};return this.add_constraint(o)},e.prototype.add_constraint_tangent_advanced=function(t,e,o,n,r,i){void 0===r&&(r=null),void 0===i&&(i=x.lg.none);var s={Type:x.uF.Tangent,First:t,FirstPos:e,Second:o,SecondPos:n,Third:r,ThirdPos:i};return this.add_constraint(s)},e.prototype.add_constraint_point_on_object=function(t,e,o){var n={Type:x.uF.PointOnObject,First:t,FirstPos:e,Second:o};return this.add_constraint(n)},e.prototype.add_constraint_point_on_bspline=function(t,e,o,n){var r={Type:x.uF.PointOnObject,First:t,FirstPos:e,Second:o,Value:n};return this.add_constraint(r)},e.prototype.add_constraint_control_point_to_bspline=function(t,e,o,n){var r={Type:x.uF.InternalAlignment,AlignmentType:x.XP.BSplineControlPoint,First:t,FirstPos:e,Second:o,InternalAlignmentIndex:n};return this.add_constraint(r)},e.prototype.add_constraint_knot_point_to_bspline=function(t,e,o,n){var r={Type:x.uF.InternalAlignment,AlignmentType:x.XP.BSplineKnotPoint,First:t,FirstPos:e,Second:o,InternalAlignmentIndex:n};return this.add_constraint(r)},e.prototype.isEmpty=function(t){return null==t||null==t},e.prototype.remove_constraints=function(t,e){void 0===e&&(e=!0),t=t||[];for(var o=new parapoly_engine.ParaPolyIntArray,n=0;n<t.length;n++)o.pushValue(t[n]);this.sketchObject.delConstraintsArray(o,e)},e.prototype.add_constraint=function(t){t=t||{};var e=new parapoly_engine.ConstraintObject;return this.isEmpty(t.Value)||e.setValue(t.Value),this.isEmpty(t.Type)||e.setType(t.Type),this.isEmpty(t.AlignmentType)||e.setAlignmentType(t.AlignmentType),this.isEmpty(t.Name)||e.setName(t.Name),this.isEmpty(t.First)||e.setFirst(t.First),this.isEmpty(t.FirstPos)||e.setFirstPos(t.FirstPos),this.isEmpty(t.Second)||e.setSecond(t.Second),this.isEmpty(t.SecondPos)||e.setSecondPos(t.SecondPos),this.isEmpty(t.Third)||e.setThird(t.Third),this.isEmpty(t.ThirdPos)||e.setThirdPos(t.ThirdPos),this.isEmpty(t.LabelDistance)||e.setLabelDistance(t.LabelDistance),this.isEmpty(t.LabelPosition)||e.setLabelPosition(t.LabelPosition),this.isEmpty(t.isDriving)||e.setDriving(t.isDriving),this.isEmpty(t.InternalAlignmentIndex)||e.setInternalAlignmentIndex(t.InternalAlignmentIndex),this.isEmpty(t.isInVirtualSpace)||e.setInVirtualSpace(t.isInVirtualSpace),this.isEmpty(t.isActive)||e.setActive(t.isActive),this.isEmpty(t.mId)||e.setId(t.mId),this.sketchObject.addConstraint(e)},e.fixed_direction=new u.Pq0(0,0,1),e}(a.b)},9471:(t,e,o)=>{var n,r,i,s;o.d(e,{XC:()=>i,XP:()=>r,lg:()=>s,uF:()=>n}),function(t){t[t.None=0]="None",t[t.Coincident=1]="Coincident",t[t.Horizontal=2]="Horizontal",t[t.Vertical=3]="Vertical",t[t.Parallel=4]="Parallel",t[t.Tangent=5]="Tangent",t[t.Distance=6]="Distance",t[t.DistanceX=7]="DistanceX",t[t.DistanceY=8]="DistanceY",t[t.Angle=9]="Angle",t[t.Perpendicular=10]="Perpendicular",t[t.Radius=11]="Radius",t[t.Equal=12]="Equal",t[t.PointOnObject=13]="PointOnObject",t[t.Symmetric=14]="Symmetric",t[t.InternalAlignment=15]="InternalAlignment",t[t.SnellsLaw=16]="SnellsLaw",t[t.Block=17]="Block",t[t.Diameter=18]="Diameter",t[t.Weight=19]="Weight",t[t.NumConstraintTypes=20]="NumConstraintTypes"}(n||(n={})),function(t){t[t.Undef=0]="Undef",t[t.EllipseMajorDiameter=1]="EllipseMajorDiameter",t[t.EllipseMinorDiameter=2]="EllipseMinorDiameter",t[t.EllipseFocus1=3]="EllipseFocus1",t[t.EllipseFocus2=4]="EllipseFocus2",t[t.HyperbolaMajor=5]="HyperbolaMajor",t[t.HyperbolaMinor=6]="HyperbolaMinor",t[t.HyperbolaFocus=7]="HyperbolaFocus",t[t.ParabolaFocus=8]="ParabolaFocus",t[t.BSplineControlPoint=9]="BSplineControlPoint",t[t.BSplineKnotPoint=10]="BSplineKnotPoint",t[t.ParabolaFocalAxis=11]="ParabolaFocalAxis",t[t.NumInternalAlignmentType=12]="NumInternalAlignmentType"}(r||(r={})),function(t){t[t.RtPnt=-1]="RtPnt",t[t.HAxis=-1]="HAxis",t[t.VAxis=-2]="VAxis",t[t.RefExt=-3]="RefExt",t[t.GeoUndef=-2e3]="GeoUndef"}(i||(i={})),function(t){t[t.none=0]="none",t[t.start=1]="start",t[t.end=2]="end",t[t.mid=3]="mid"}(s||(s={}))},9506:(t,e,o)=>{o.d(e,{t:()=>u});var n,r=o(347),i=o(7160),s=o(8268),a=o(631),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.radius1=10,e.radius2=.5,e.className=i.Z.FeatureSetTorusComponent,e.feature_type=a.y.FeatureSetTorus,e}return c(e,t),e.prototype.set_radius1=function(t){this.radius1=t},e.prototype.get_radius1=function(){return this.radius1},e.prototype.set_radius2=function(t){this.radius2=t},e.prototype.get_radius2=function(){return this.radius2},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.radius1=this.radius1,o.radius2=this.radius2,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.radius1=e.radius1,this.radius2=e.radius2)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.FeatureSetTorusComponent,e.create,t)},e}(s.x)},9757:(t,e,o)=>{o.d(e,{W:()=>u});var n,r=o(347),i=o(7160),s=o(2444),a=o(5361),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.start_point=new a.Pq0(0,0,0),e.end_point=new a.Pq0(1,1,0),e.direction=s.T.default_geom_direction_in_sketch.clone(),e.className=i.Z.SkGeomLineComponent,e}return c(e,t),e.prototype.set_start_point=function(t){this.start_point.copy(t)},e.prototype.get_start_point=function(){return this.start_point},e.prototype.set_end_point=function(t){this.end_point.copy(t)},e.prototype.get_end_point=function(){return this.end_point},e.prototype.set_direction=function(t){this.direction.copy(t)},e.prototype.get_direction=function(){return this.direction},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.start_point=this.start_point.toArray(),o.end_point=this.end_point.toArray(),o.direction=this.direction.toArray(),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.start_point.fromArray(e.start_point),this.end_point.fromArray(e.end_point),this.direction.fromArray(e.direction))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.SkGeomLineComponent,e.create,t)},e}(s.T)},9856:(t,e,o)=>{o.d(e,{n:()=>_});var n,r=o(5841),i=o(347),s=o(7160),a=o(5361),c=o(5255),u=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),_=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=s.Z.SkGeomArcNode,o.component=new r.k,o.addComponent(o.component),o.create_geom_native(),o}return u(e,t),e.prototype.set_values=function(t,e,o,n,r){this.component.set_center(t),this.component.set_radius(e),this.component.set_start_angle(o),this.component.set_end_angle(n),this.component.set_direction(r),this.write_to_geom_native()},e.prototype.update_value_from_geom_native=function(e){t.prototype.update_value_from_geom_native.call(this,e),e||console.error("SkGeomArcNode update_value_from_geom_native geom_native is null");var o=e.getCenter(),n=e.getRadius(),r=e.getStartAngle(),i=e.getEndAngle(),s=e.getDirection();this.set_values(new a.Pq0(o.x,o.y,o.z),n,r,i,new a.Pq0(s.x,s.y,s.z))},e.prototype.create_geom_native=function(){var t=new parapoly_engine.ParaPolyGeom_Arc;t.setId(this.id),this.geom_native=t;var e=new parapoly_engine.ParaPolyGeom_Topo_Arc;e.setId(this.id),this.geom_topo_native=e},e.prototype.write_to_geom_native=function(){if(this.geom_native){var t=this.component.get_center(),e=this.component.get_radius(),o=this.component.get_start_angle(),n=this.component.get_end_angle(),r=this.component.get_direction(),i=new parapoly_engine.Vector3(t.x,t.y,t.z),s=new parapoly_engine.Vector3(r.x,r.y,r.z);this.geom_native.set(i,e,o,n,s),this.geom_topo_native.set(i,e,o,n,s);var a=this.getId();this.geom_native.setId(a),this.geom_topo_native.setId(a)}},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(s.Z.SkGeomArcComponent),this.write_to_geom_native())},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),i.X.register(s.Z.SkGeomArcNode,e.create,t)},e}(c.i)},9985:(t,e,o)=>{o.d(e,{k:()=>u});var n,r=o(347),i=o(7160),s=o(8268),a=o(631),c=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),u=function(t){function e(){var e=t.call(this)||this;return e.radius=1,e.height=10,e.className=i.Z.FeatureSetCylinderComponent,e.feature_type=a.y.FeatureSetCylinder,e}return c(e,t),e.prototype.set_radius=function(t){this.radius=t},e.prototype.get_radius=function(){return this.radius},e.prototype.set_height=function(t){this.height=t},e.prototype.get_height=function(){return this.height},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.radius=this.radius,o.height=this.height,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.radius=e.radius,this.height=e.height)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),r.X.register(i.Z.FeatureSetCylinderComponent,e.create,t)},e}(s.x)}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var o=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](o,o.exports,__webpack_require__),o.exports}__webpack_require__.d=(t,e)=>{for(var o in e)__webpack_require__.o(e,o)&&!__webpack_require__.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{AmbientLightComponent:()=>AmbientLightComponent,ArMediaInputTypes:()=>ArMediaInputTypes,ArScreenAspectRatioTypes:()=>ArScreenAspectRatioTypes,AssimpExporter:()=>AssimpExporter,Ax2:()=>Ax2.g,Ax2Component:()=>Ax2Component.v,BSplineHelper:()=>BSplineHelper.a,BaseEditorResource:()=>BaseEditorResource.v,BaseResource:()=>BaseResource.Q,Block3dEditorResource:()=>Block3dEditorResource.k,BlockCodeComponent:()=>BlockCodeComponent,BooleanComponent:()=>BooleanComponent.A,BooleanTypes:()=>BooleanTypes.E,BoxMeshComponent:()=>BoxMeshComponent,Camera3dComponent:()=>Camera3dComponent,ClassFactory:()=>ClassFactory.X,ClassNames:()=>ClassNames.Z,Code3dBundler:()=>Code3dBundler,Code3dModuleExecutor:()=>Code3dModuleExecutor,Code3dModuleResolver:()=>Code3dModuleResolver,Code3dResource:()=>Code3dResource,Code3dStaticAnalyzer:()=>Code3dStaticAnalyzer,CodeTypeExtensions:()=>CodeTypes.K1,CodeTypes:()=>CodeTypes.f7,Component:()=>Component.u,ComponentEvent:()=>Component.O,ConstraintType:()=>Constraint.uF,DirectionTypes:()=>DirectionTypes.T,DirectionalLightComponent:()=>DirectionalLightComponent,DisplayMode:()=>DisplayMode,DxfExporter:()=>DxfExporter.i,DxfLoader:()=>DxfLoader.U,EditorEditMode:()=>EditorEditMode,EditorEventInput:()=>EditorEventInput,EditorEventInput_check_file_exist:()=>EditorEventInput_check_file_exist,EditorEventInput_delete_file:()=>EditorEventInput_delete_file,EditorEventInput_duplicate_file:()=>EditorEventInput_duplicate_file,EditorEventInput_file_list:()=>EditorEventInput_file_list,EditorEventInput_load_document:()=>EditorEventInput_load_document,EditorEventInput_load_file:()=>EditorEventInput_load_file,EditorEventInput_load_json:()=>EditorEventInput_load_json,EditorEventInput_move_files:()=>EditorEventInput_move_files,EditorEventInput_new_file:()=>EditorEventInput_new_file,EditorEventInput_paste_file:()=>EditorEventInput_paste_file,EditorEventInput_rename_file:()=>EditorEventInput_rename_file,EditorEventInput_save_document:()=>EditorEventInput_save_document,EditorEventInput_save_file:()=>EditorEventInput_save_file,EditorEventInput_save_json:()=>EditorEventInput_save_json,EditorEventManager:()=>EditorEventManager,EditorEventOutput:()=>EditorEventOutput,EditorEventOutput_check_file_exist:()=>EditorEventOutput_check_file_exist,EditorEventOutput_delete_file:()=>EditorEventOutput_delete_file,EditorEventOutput_duplicate_file:()=>EditorEventOutput_duplicate_file,EditorEventOutput_file_list:()=>EditorEventOutput_file_list,EditorEventOutput_load_document:()=>EditorEventOutput_load_document,EditorEventOutput_load_file:()=>EditorEventOutput_load_file,EditorEventOutput_load_json:()=>EditorEventOutput_load_json,EditorEventOutput_move_files:()=>EditorEventOutput_move_files,EditorEventOutput_new_file:()=>EditorEventOutput_new_file,EditorEventOutput_paste_file:()=>EditorEventOutput_paste_file,EditorEventOutput_rename_file:()=>EditorEventOutput_rename_file,EditorEventOutput_save_document:()=>EditorEventOutput_save_document,EditorEventOutput_save_file:()=>EditorEventOutput_save_file,EditorEventOutput_save_json:()=>EditorEventOutput_save_json,EditorEventTypes:()=>EditorEventTypes,EditorEventTypesList:()=>EditorEventTypesList,EventDispatcher:()=>EventDispatcher,FeatureBaseComponent:()=>FeatureBaseComponent.x,FeatureBooleanComponent:()=>FeatureBooleanComponent,FeatureChamferComponent:()=>FeatureChamferComponent,FeatureContainerNode:()=>FeatureContainerNode,FeatureDeleteComponent:()=>FeatureDeleteComponent,FeatureDraftComponent:()=>FeatureDraftComponent,FeatureExtrudeComponent:()=>FeatureExtrudeComponent,FeatureFilletComponent:()=>FeatureFilletComponent,FeatureHelixComponent:()=>FeatureHelixComponent,FeatureInspectorFactory:()=>FeatureInspectorFactory,FeatureMirrorComponent:()=>FeatureMirrorComponent,FeatureMiscComponent:()=>FeatureMiscComponent.e,FeatureNodeBase:()=>FeatureNodeBase.o,FeatureNodeBoolean:()=>FeatureNodeBoolean,FeatureNodeChamfer:()=>FeatureNodeChamfer,FeatureNodeDelete:()=>FeatureNodeDelete,FeatureNodeDraft:()=>FeatureNodeDraft,FeatureNodeExtrude:()=>FeatureNodeExtrude,FeatureNodeFillet:()=>FeatureNodeFillet,FeatureNodeHelix:()=>FeatureNodeHelix,FeatureNodeMirror:()=>FeatureNodeMirror,FeatureNodeRevolve:()=>FeatureNodeRevolve,FeatureNodeSetBox:()=>FeatureNodeSetBox.I,FeatureNodeSetCone:()=>FeatureNodeSetCone._,FeatureNodeSetCylinder:()=>FeatureNodeSetCylinder.l,FeatureNodeSetEllipsoid:()=>FeatureNodeSetEllipsoid.a,FeatureNodeSetPrism:()=>FeatureNodeSetPrism.M,FeatureNodeSetSphere:()=>FeatureNodeSetSphere.C,FeatureNodeSetStep:()=>FeatureNodeSetStep,FeatureNodeSetTorus:()=>FeatureNodeSetTorus.Y,FeatureNodeSetTrapezoid:()=>FeatureNodeSetTrapezoid.H,FeatureNodeSetWedge:()=>FeatureNodeSetWedge.H,FeatureNodeShell:()=>FeatureNodeShell,FeatureNodeSweep:()=>FeatureNodeSweep,FeatureNodeTransform:()=>FeatureNodeTransform,FeatureRevolveComponent:()=>FeatureRevolveComponent,FeatureRunningStates:()=>FeatureRunningStates.s,FeatureSetBoxComponent:()=>FeatureSetBoxComponent.R,FeatureSetConeComponent:()=>FeatureSetConeComponent.d,FeatureSetCylinderComponent:()=>FeatureSetCylinderComponent.k,FeatureSetEllipsoidComponent:()=>FeatureSetEllipsoidComponent.P,FeatureSetPrismComponent:()=>FeatureSetPrismComponent.R,FeatureSetSphereComponent:()=>FeatureSetSphereComponent.H,FeatureSetStepComponent:()=>FeatureSetStepComponent,FeatureSetTorusComponent:()=>FeatureSetTorusComponent.t,FeatureSetTrapezoidComponent:()=>FeatureSetTrapezoidComponent.Q,FeatureSetWedgeComponent:()=>FeatureSetWedgeComponent.m,FeatureShellComponent:()=>FeatureShellComponent,FeatureSweepComponent:()=>FeatureSweepComponent,FeatureTopoItem:()=>FeatureTopoItem,FeatureTransformComponent:()=>FeatureTransformComponent,FeatureTypes:()=>FeatureTypes.y,FileOptions:()=>FileOptions,FileProtocol:()=>FileProtocol,GeoEnum:()=>Constraint.XC,GeomTypes:()=>GeomTypes.w,GltfExporter:()=>GltfExporter,Helix_Axis:()=>Helix_Axis,Helix_Mode:()=>Helix_Mode,ImportTypes:()=>ImportTypes,InfoComponent:()=>InfoComponent.S,InspectorFactory:()=>InspectorFactory,InternalAlignmentType:()=>Constraint.XP,LogTypes:()=>LogTypes.U,MaterialComponent:()=>MaterialComponent.n,MemoryFileProvider:()=>MemoryFileProvider,MeshComponent:()=>MeshComponent.F,MeshTypes:()=>MeshTypes.T,MetaComponent:()=>MetaComponent.V,NativeNodeToFeatureNode:()=>NativeNodeToFeatureNode.F,Node:()=>Node.b,ObjectConverter:()=>ObjectConverter.k,OrthographicCameraComponent:()=>OrthographicCameraComponent,ParaPolyRuntimeApp:()=>ParaPolyRuntimeApp,ParaPolyRuntimeAppEvent:()=>ParaPolyRuntimeAppEvent,ParaXExporter:()=>ParaXExporter,Part3dCodeExporter:()=>Part3dCodeExporter,Part3dEditorResource:()=>Part3dEditorResource.c,PartBlock3dDocument:()=>PartBlock3dDocument.z,PartTessellate:()=>PartTessellate.O,PlaneMeshComponent:()=>PlaneMeshComponent,PlaneTypes:()=>PlaneTypes,PlatformTypes:()=>PlatformTypes,PointLightComponent:()=>PointLightComponent,PointPos:()=>Constraint.lg,ProjectTypes:()=>ProjectTypes,ProjectionMode:()=>ProjectionMode,ResourceManager:()=>ResourceManager.Q,ResourcePostfix:()=>ResourceTypes.y,ResourceTypes:()=>ResourceTypes.c,Scene3dCameraControlMode:()=>Scene3dCameraControlMode,Scene3dCameraViewMode:()=>Scene3dCameraViewMode,Scene3dComponent:()=>Scene3dComponent,ScreenRatioList:()=>ScreenRatioList,SelectionMode:()=>SelectionMode,ShapeComponent:()=>ShapeComponent,SkConstraintComponent:()=>SkConstraintComponent.RN,SkConstraintNode:()=>SkConstraintNode.W,SkContainerNode:()=>SkContainerNode.Y,SkGeomArcComponent:()=>SkGeomArcComponent.k,SkGeomArcNode:()=>SkGeomArcNode.n,SkGeomBSplineComponent:()=>SkGeomBSplineComponent.p,SkGeomBSplineNode:()=>SkGeomBSplineNode.w,SkGeomBaseComponent:()=>SkGeomBaseComponent.T,SkGeomBaseNode:()=>SkGeomBaseNode.i,SkGeomCircleComponent:()=>SkGeomCircleComponent.i,SkGeomCircleNode:()=>SkGeomCircleNode.n,SkGeomEllipseComponent:()=>SkGeomEllipseComponent.A,SkGeomEllipseNode:()=>SkGeomEllipseNode.B,SkGeomLineComponent:()=>SkGeomLineComponent.W,SkGeomLineNode:()=>SkGeomLineNode.l,SkGeomPointComponent:()=>SkGeomPointComponent.q,SkGeomPointNode:()=>SkGeomPointNode.N,Sketch3dEditorResource:()=>Sketch3dEditorResource.J,SketchCodeExporter:()=>SketchCodeExporter,SphereMeshComponent:()=>SphereMeshComponent,SplineTypes:()=>SplineTypes.H,SpotLightComponent:()=>SpotLightComponent,Sprite:()=>Sprite,SpriteHelper:()=>SpriteHelper,SpriteToNativeNode:()=>SpriteToNativeNode.S,StepExporter:()=>StepExporter,SvgExporter:()=>SvgExporter.k,SvgLoader:()=>SvgLoader.I,Text2CADFacade:()=>Text2CADFacade,TopoIdTypes:()=>TopoIdTypes,TopoShapeComponent:()=>TopoShapeComponent.t,TransformComponent:()=>TransformComponent.W,Util:()=>Util.J,WorkSpaceSettingComponent:()=>WorkSpaceSettingComponent,buildCode3dProject:()=>buildCode3dProject,codeTypesToArray:()=>CodeTypes.l0,computeOutputFilename:()=>computeOutputFilename,convertInternelTypeToPointPos:()=>SkConstraintComponent.E7,convertPointPosToInternelType:()=>SkConstraintComponent.u0,getCodeTypeLabel:()=>CodeTypes.Oc,get_screen_info_by_ratio_type:()=>get_screen_info_by_ratio_type,register_all_components:()=>register_all_components});var PartBlock3dDocument=__webpack_require__(944),BooleanTypes=__webpack_require__(8297),PlaneTypes;!function(t){t.all="xyz",t.x="x",t.y="y",t.z="z",t.xy="xy",t.xz="xz",t.zy="zy",t.yz="yz"}(PlaneTypes||(PlaneTypes={}));var DirectionTypes=__webpack_require__(6542),Node=__webpack_require__(7885),__assign=function(){return __assign=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},__assign.apply(this,arguments)},__spreadArray=function(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||(n||(n=Array.prototype.slice.call(e,0,r)),n[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))};function toBooleanType(t){switch(t){case"union":default:return BooleanTypes.E.union;case"difference":return BooleanTypes.E.difference;case"intersection":return BooleanTypes.E.intersection}}function toPlaneType(t){switch(t){case"xy":default:return PlaneTypes.xy;case"xz":return PlaneTypes.xz;case"yz":return PlaneTypes.yz}}function toDirectionType(t){switch(t){case"x":return DirectionTypes.T.x;case"y":return DirectionTypes.T.y;default:return DirectionTypes.T.z}}var Text2CADFacade=function(){function t(){this._lastNodeName="",this._parameters=[],this._lastBuildResult=null,this.doc=new PartBlock3dDocument.z("root")}return t.prototype.reset=function(){return this.doc=new PartBlock3dDocument.z("root"),this._lastNodeName="",this._parameters=[],this._lastBuildResult=null,this},t.prototype.loadPart3d=function(t,e,o){void 0===e&&(e=!1);var n=PartBlock3dDocument.z.create_doc_from_part3d(t,e,o);return n&&(this.doc=n,this._lastNodeName=this._getLastNodeName()),this},t.prototype.loadBlock3d=function(t){var e=PartBlock3dDocument.z.create_doc_from_block3d(t);return e&&(this.doc=e,this._lastNodeName=this._getLastNodeName()),this},t.prototype.box=function(t,e,o,n,r){return void 0===r&&(r="#888888"),this.doc.box(toBooleanType(t),e,o,n,r),this._lastNodeName=this._getLastNodeName(),this._lastNodeName},t.prototype.sphere=function(t,e,o){return void 0===o&&(o="#888888"),this.doc.sphere(toBooleanType(t),e,o),this._lastNodeName=this._getLastNodeName(),this._lastNodeName},t.prototype.cylinder=function(t,e,o,n){return void 0===n&&(n="#888888"),this.doc.cylinder(toBooleanType(t),e,o,n),this._lastNodeName=this._getLastNodeName(),this._lastNodeName},t.prototype.cone=function(t,e,o,n,r){return void 0===r&&(r="#888888"),this.doc.cone(toBooleanType(t),e,o,n,r),this._lastNodeName=this._getLastNodeName(),this._lastNodeName},t.prototype.torus=function(t,e,o,n){return void 0===n&&(n="#888888"),this.doc.torus(toBooleanType(t),e,o,n),this._lastNodeName=this._getLastNodeName(),this._lastNodeName},t.prototype.prism=function(t,e,o,n,r){return void 0===r&&(r="#888888"),this.doc.prism(toBooleanType(t),e,o,n,r),this._lastNodeName=this._getLastNodeName(),this._lastNodeName},t.prototype.ellipsoid=function(t,e,o,n,r){return void 0===r&&(r="#888888"),this.doc.ellipsoid(toBooleanType(t),e,o,n,r),this._lastNodeName=this._getLastNodeName(),this._lastNodeName},t.prototype.wedge=function(t,e,o,n,r){return void 0===r&&(r="#888888"),this.doc.wedge(toBooleanType(t),e,o,n,r),this._lastNodeName=this._getLastNodeName(),this._lastNodeName},t.prototype.trapezoid=function(t,e,o,n,r,i){return void 0===i&&(i="#888888"),this.doc.trapezoid(toBooleanType(t),e,o,n,r,i),this._lastNodeName=this._getLastNodeName(),this._lastNodeName},t.prototype.push_group=function(t,e){void 0===e&&(e="#888888"),this.doc.push_node(toBooleanType(t),"",e,!0)},t.prototype.pop_group=function(){this.doc.pop_node()},t.prototype.select=function(t){var e,o,n=null===(o=null===(e=this.doc)||void 0===e?void 0:e.get_root_node)||void 0===o?void 0:o.call(e),r=n&&"function"==typeof n.getChildByName?n.getChildByName(t,!0):null;return r&&(this.doc.selected_node=r),this},t.prototype.select_last=function(){return this._lastNodeName&&this.select(this._lastNodeName),this},t.prototype.translate=function(t,e,o){return this.doc.translate(t,e,o),this},t.prototype.rotate=function(t,e){return this.doc.rotate(t,e),this},t.prototype.scale=function(t,e,o){return this.doc.scale(t,e,o),this},t.prototype.fillet=function(t,e){return void 0===e&&(e="xy"),this.doc.fillet(t,toPlaneType(e)),this},t.prototype.fillet_edges=function(t,e){return this.doc.fillet_by_edge(t,e),this},t.prototype.chamfer=function(t,e){return void 0===e&&(e="xy"),this.doc.chamfer(t,toPlaneType(e)),this},t.prototype.chamfer_edges=function(t,e){return this.doc.chamfer_by_edge(t,e),this},t.prototype.shell=function(t,e,o){return void 0===e&&(e=0),void 0===o&&(o=!0),this.doc.shell(t,e,o),this},t.prototype.mirror=function(t,e,o){return void 0===o&&(o="#888888"),this.doc.mirror(toBooleanType(t),toPlaneType(e),o),this},t.prototype.begin_sketch=function(t){return void 0===t&&(t="xy"),this.doc.start_sketch("",toPlaneType(t)),this},t.prototype.sk_line=function(t,e,o,n){return this.doc.line_segment(t,e,0,o,n,0),this},t.prototype.sk_circle=function(t,e,o){return this.doc.circle(t,e,0,o),this},t.prototype.sk_arc=function(t,e,o,n,r){return this.doc.arc(t,e,0,o,n,r,!0),this},t.prototype.sk_ellipse=function(t,e,o,n){return this.doc.ellipse(t,e,0,o,n),this},t.prototype.sk_begin_bspline=function(t){return void 0===t&&(t=!1),this.doc.start_bspline(t),this},t.prototype.sk_add_pole=function(t,e){return this.doc.add_pole(t,e,0),this},t.prototype.sk_end_bspline=function(){return this.doc.end_bspline(),this},t.prototype.end_sketch=function(){return this.doc.end_sketch(),this},t.prototype.extrude=function(t,e,o,n){return void 0===o&&(o="#888888"),void 0===n&&(n=!0),this.doc.extrude(toBooleanType(t),e,o,n,[]),this._lastNodeName=this._getLastNodeName(),this},t.prototype.revolve=function(t,e,o,n,r){return void 0===o&&(o="z"),void 0===n&&(n="#888888"),void 0===r&&(r=!0),this.doc.revolve(toBooleanType(t),e,toDirectionType(o),n,r,[]),this._lastNodeName=this._getLastNodeName(),this},t.prototype.param=function(t,e,o){return this._parameters.push(__assign({name:t,value:e,type:"number"==typeof e?"number":"string"},o)),e},t.prototype.param_value=function(t){var e=this._parameters.find(function(e){return e.name===t});if(e)return e.value;throw new Error('Parameter "'.concat(t,'" not found. Register it with doc.param() first.'))},t.prototype.build=function(){var t=this.doc.get_root_node(),e=t&&"function"==typeof t.getChildren&&t.getChildren()||[];if(e.length>0){var o=e[0];o.get_color&&t.set_color("#"+o.get_color())}"function"==typeof(null==t?void 0:t.get_enabled_op)&&(t.set_enabled_op(!0),this.doc.run_node(t),t.set_enabled_op(!1)),this.doc.tessellate();var n=[];return Node.b.visit_node(t,function(t){if(t.get_topo_shape_component){var e=t.get_topo_shape_component();if(e&&(!e.get_archived||!e.get_archived()))for(var o=e.get_facesMesh()||[],r=t.get_color?"#"+t.get_color():"#888888",i=0,s=o;i<s.length;i++){var a=s[i];a.vertices&&a.vertices.length>0&&n.push({vertices:Array.from(a.vertices),normals:Array.from(a.normals),indices:Array.from(a.indices),color:r})}}}),this._lastBuildResult={meshes:n,parameters:__spreadArray([],this._parameters,!0),json:this.doc.to_json()},this._lastBuildResult},t.prototype.getLastBuildResult=function(){return this._lastBuildResult},t.prototype.getDocument=function(){return this.doc},t.prototype._getLastNodeName=function(){var t,e,o=null===(e=null===(t=this.doc)||void 0===t?void 0:t.get_root_node)||void 0===e?void 0:e.call(t),n=o&&"function"==typeof o.getChildren&&o.getChildren()||[];if(n.length>0){var r=n[n.length-1];return"function"==typeof(null==r?void 0:r.getName)?r.getName():""}return""},t}(),__awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},__generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},EventDispatcher=function(){function t(){this._unique_maps={}}return t.prototype.clear=function(){this._listeners={},this._unique_maps={}},t.prototype.addEventListener=function(t,e,o){void 0===o&&(o=null),void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),o&&this._unique_maps[o]||(-1===n[t].indexOf(e)&&n[t].push(e),o&&(this._unique_maps[o]=e))},t.prototype.hasEventListener=function(t,e){if(void 0===this._listeners)return!1;var o=this._listeners;return void 0!==o[t]&&-1!==o[t].indexOf(e)},t.prototype.removeEventListener=function(t,e){if(void 0!==this._listeners){var o=this._listeners[t];if(void 0!==o){var n=o.indexOf(e);-1!==n&&o.splice(n,1)}}},t.prototype.dispatchEvent=function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var o=e.slice(0),n=0,r=o.length;n<r;n++)o[n].call(this,t);t.target=null}}},t.prototype.asyncDispatchEvent=function(t){return __awaiter(this,void 0,void 0,function(){var e,o,n,r,i;return __generator(this,function(s){switch(s.label){case 0:if(void 0===this._listeners)return[2];if(e=this._listeners,void 0===(o=e[t.type]))return[3,5];t.target=this,n=o.slice(0),r=0,i=n.length,s.label=1;case 1:return r<i?[4,n[r].call(this,t)]:[3,4];case 2:s.sent(),s.label=3;case 3:return r++,[3,1];case 4:t.target=null,s.label=5;case 5:return[2]}})})},t.prototype.hasListener=function(){return this._listeners&&Object.keys(this._listeners).length>0},t}(),ParaPolyRuntimeAppEvent;!function(t){t.on_log="on_log"}(ParaPolyRuntimeAppEvent||(ParaPolyRuntimeAppEvent={}));var ParaPolyRuntimeApp=function(){function t(){this.eventDispatcher=new EventDispatcher,console.log("ParaPolyRuntimeApp constructor")}return Object.defineProperty(t,"instance",{get:function(){return null===t.m_instance&&(t.m_instance=new t),t.m_instance},enumerable:!1,configurable:!0}),t.m_instance=null,t}(),Component=__webpack_require__(6994),Ax2Component=__webpack_require__(4467),BooleanComponent=__webpack_require__(116),ClassFactory=__webpack_require__(347),ClassNames=__webpack_require__(7160),__extends=(extendStatics=function(t,e){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},extendStatics(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),extendStatics,BlockCodeComponent=function(t){function e(){var e=t.call(this)||this;return e.codes={},e.className=ClassNames.Z.BlockCodeComponent,e}return __extends(e,t),e.prototype.set_codes=function(t){this.codes=t},e.prototype.get_codes=function(){return this.codes},e.prototype.setCodesByType=function(t,e){void 0===e&&(e=""),t&&(this.codes[t]=e)},e.prototype.getCodesByType=function(t){if(t)return this.codes[t]},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.codes=Object.assign({},this.codes),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.codes=Object.assign({},e.codes))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.BlockCodeComponent,e.create,t)},e}(Component.u),InfoComponent=__webpack_require__(7308),MaterialComponent=__webpack_require__(5759),MeshComponent=__webpack_require__(3027),MetaComponent=__webpack_require__(8063),ShapeComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),ShapeComponent=function(t){function e(){var e=t.call(this)||this;return e.className=ClassNames.Z.ShapeComponent,e.clear(),e}return ShapeComponent_extends(e,t),e.prototype.clear=function(){this.faces_mesh=[],this.edges_mesh=[],this.points_mesh=[]},e.prototype.get_faces_mesh=function(){return this.faces_mesh},e.prototype.set_faces_mesh=function(t){this.faces_mesh=t},e.prototype.get_edges_mesh=function(){return this.edges_mesh},e.prototype.set_edges_mesh=function(t){this.edges_mesh=t},e.prototype.get_points_mesh=function(){return this.points_mesh},e.prototype.set_points_mesh=function(t){this.points_mesh=t},e.prototype.write_meshes_to_json=function(t,e){var o=[];if(t)for(var n=0,r=t;n<r.length;n++){var i=r[n];o.push(i.to_json(e))}return o},e.prototype.read_meshes_from_json=function(t,e){var o=[];if(t)for(var n=0,r=t;n<r.length;n++){var i=r[n],s=MeshComponent.F.create(i,e);o.push(s)}return o},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.faces_mesh=this.write_meshes_to_json(this.faces_mesh,e),o.edges_mesh=this.write_meshes_to_json(this.edges_mesh,e),o.points_mesh=this.write_meshes_to_json(this.points_mesh,e),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.faces_mesh=this.read_meshes_from_json(e.faces_mesh,o),this.edges_mesh=this.read_meshes_from_json(e.edges_mesh,o),this.points_mesh=this.read_meshes_from_json(e.points_mesh,o))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.ShapeComponent,e.create,t)},e}(Component.u),TransformComponent=__webpack_require__(5556),FeatureBaseComponent=__webpack_require__(8268),FeatureMiscComponent=__webpack_require__(7640),FeatureTypes=__webpack_require__(631),FeatureTopoItem=function(){function t(){this.feature_id="",this.feature_index=-1,this.face_index=-1,this.edge_index=-1,this.vertex_index=-1,this.sketch_index=-1,this.className=ClassNames.Z.FeatureTopoItem}return t.prototype.get_composed_value=function(){return"".concat(this.feature_id,"_").concat(this.face_index,"_").concat(this.edge_index,"_").concat(this.vertex_index,"_").concat(this.sketch_index)},t.prototype.set_feature_id=function(t){this.feature_id=t},t.prototype.get_feature_id=function(){return this.feature_id},t.prototype.set_feature_index=function(t){this.feature_index=t},t.prototype.get_feature_index=function(){return this.feature_index},t.prototype.set_face_index=function(t){this.face_index=t},t.prototype.get_face_index=function(){return this.face_index},t.prototype.set_edge_index=function(t){this.edge_index=t},t.prototype.get_edge_index=function(){return this.edge_index},t.prototype.set_vertex_index=function(t){this.vertex_index=t},t.prototype.get_vertex_index=function(){return this.vertex_index},t.prototype.set_sketch_index=function(t){this.sketch_index=t},t.prototype.get_sketch_index=function(){return this.sketch_index},t.prototype.to_json=function(t){var e={};return e.feature_id=this.feature_id,e.feature_index=this.feature_index,e.face_index=this.face_index,e.edge_index=this.edge_index,e.vertex_index=this.vertex_index,e.sketch_index=this.sketch_index,e},t.prototype.read_from_json=function(t,e){t&&(this.feature_id=t.feature_id,this.feature_index=t.feature_index,this.face_index=t.face_index,this.edge_index=t.edge_index,this.vertex_index=t.vertex_index,this.sketch_index=t.sketch_index)},t.prototype.clone=function(e,o){return t.create(this.to_json(o),e)},t.create=function(e,o){var n=new t;return n.read_from_json(e,o),n},t.register=function(e){void 0===e&&(e=!1),ClassFactory.X.register(ClassNames.Z.FeatureTopoItem,t.create,e)},t}(),FeatureBooleanComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureBooleanComponent=function(t){function e(){var e=t.call(this)||this;return e.target_feature_topo_items=[],e.tool_feature_topo_items=[],e.operation=BooleanTypes.E.union,e.keep_tool=!1,e.className=ClassNames.Z.FeatureBooleanComponent,e.feature_type=FeatureTypes.y.FeatureBoolean,e}return FeatureBooleanComponent_extends(e,t),e.prototype.get_target_feature_topo_items=function(){return this.target_feature_topo_items},e.prototype.set_target_feature_topo_items=function(t){this.target_feature_topo_items=t},e.prototype.get_tool_feature_topo_items=function(){return this.tool_feature_topo_items},e.prototype.set_tool_feature_topo_items=function(t){this.tool_feature_topo_items=t},e.prototype.set_operation=function(t){this.operation=t},e.prototype.get_operation=function(){return this.operation},e.prototype.set_keep_tool=function(t){this.keep_tool=t},e.prototype.get_keep_tool=function(){return this.keep_tool},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.target_part_index_list=this.target_feature_topo_items.map(function(t){return t.to_json(e)}),o.tool_part_index_list=this.tool_feature_topo_items.map(function(t){return t.to_json(e)}),o.operation=this.operation,o.keep_tool=this.keep_tool,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.target_feature_topo_items=e.target_part_index_list.map(function(t){return FeatureTopoItem.create(t,o)}),this.tool_feature_topo_items=e.tool_part_index_list.map(function(t){return FeatureTopoItem.create(t,o)}),this.operation=e.operation,this.keep_tool=e.keep_tool)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureBooleanComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureChamferComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureChamferComponent=function(t){function e(){var e=t.call(this)||this;return e.feature_topo_items=[],e.value=.1,e.className=ClassNames.Z.FeatureChamferComponent,e.feature_type=FeatureTypes.y.FeatureChamfer,e}return FeatureChamferComponent_extends(e,t),e.prototype.get_feature_topo_items=function(){return this.feature_topo_items},e.prototype.set_feature_topo_items=function(t){this.feature_topo_items=t},e.prototype.set_value=function(t){this.value=t},e.prototype.get_value=function(){return this.value},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_topo_items=this.feature_topo_items.map(function(t){return t.to_json(e)}),o.value=this.value,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_topo_items=e.feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.value=e.value)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureChamferComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureDeleteComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureDeleteComponent=function(t){function e(){var e=t.call(this)||this;return e.feature_topo_items=[],e.className=ClassNames.Z.FeatureDeleteComponent,e.feature_type=FeatureTypes.y.FeatureDelete,e}return FeatureDeleteComponent_extends(e,t),e.prototype.get_feature_topo_items=function(){return this.feature_topo_items},e.prototype.set_feature_topo_items=function(t){this.feature_topo_items=t},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_topo_items=this.feature_topo_items.map(function(t){return t.to_json(e)}),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_topo_items=e.feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureDeleteComponent,e.create,t)},e}(FeatureBaseComponent.x),three_core=__webpack_require__(5361),FeatureDraftComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureDraftComponent=function(t){function e(){var e=t.call(this)||this;return e.feature_topo_items=[],e.value=.1,e.reverse=!1,e.center=new three_core.Pq0(0,0,0),e.direction=new three_core.Pq0(0,1,0),e.className=ClassNames.Z.FeatureDraftComponent,e.feature_type=FeatureTypes.y.FeatureDraft,e}return FeatureDraftComponent_extends(e,t),e.prototype.set_feature_topo_items=function(t){this.feature_topo_items=t},e.prototype.get_feature_topo_items=function(){return this.feature_topo_items},e.prototype.set_value=function(t){this.value=t},e.prototype.get_value=function(){return this.value},e.prototype.set_reverse=function(t){this.reverse=t},e.prototype.get_reverse=function(){return this.reverse},e.prototype.set_center=function(t){this.center.copy(t)},e.prototype.get_center=function(){return this.center},e.prototype.set_direction=function(t){this.direction.copy(t)},e.prototype.get_direction=function(){return this.direction},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_topo_items=this.feature_topo_items.map(function(t){return t.to_json(e)}),o.value=this.value,o.reverse=this.reverse,o.center=this.center.toArray(),o.direction=this.direction.toArray(),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_topo_items=e.feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.value=e.value,this.reverse=e.reverse,this.center.fromArray(e.center),this.direction.fromArray(e.direction))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureDraftComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureExtrudeComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureExtrudeComponent=function(t){function e(){var e=t.call(this)||this;return e.feature_topo_items=[],e.value=1,e.solid=!0,e.keep_original=!0,e.direction=new three_core.Pq0(0,1,0),e.className=ClassNames.Z.FeatureExtrudeComponent,e.feature_type=FeatureTypes.y.FeatureExtrude,e}return FeatureExtrudeComponent_extends(e,t),e.prototype.set_feature_topo_items=function(t){this.feature_topo_items=t},e.prototype.get_feature_topo_items=function(){return this.feature_topo_items},e.prototype.set_value=function(t){this.value=t},e.prototype.get_value=function(){return this.value},e.prototype.set_solid=function(t){this.solid=t},e.prototype.get_solid=function(){return this.solid},e.prototype.set_keep_original=function(t){this.keep_original=t},e.prototype.get_keep_original=function(){return this.keep_original},e.prototype.set_direction=function(t){this.direction.copy(t)},e.prototype.get_direction=function(){return this.direction},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_topo_items=this.feature_topo_items.map(function(t){return t.to_json(e)}),o.value=this.value,o.solid=this.solid,o.keep_original=this.keep_original,o.direction=this.direction.toArray(),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_topo_items=e.feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.value=e.value,this.solid=e.solid,this.keep_original=e.keep_original,this.direction.fromArray(e.direction))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureExtrudeComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureFilletComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureFilletComponent=function(t){function e(){var e=t.call(this)||this;return e.feature_topo_items=[],e.value=.1,e.className=ClassNames.Z.FeatureFilletComponent,e.feature_type=FeatureTypes.y.FeatureFillet,e}return FeatureFilletComponent_extends(e,t),e.prototype.get_feature_topo_items=function(){return this.feature_topo_items},e.prototype.set_feature_topo_items=function(t){this.feature_topo_items=t},e.prototype.set_value=function(t){this.value=t},e.prototype.get_value=function(){return this.value},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_topo_items=this.feature_topo_items.map(function(t){return t.to_json(e)}),o.value=this.value,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_topo_items=e.feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.value=e.value)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureFilletComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureHelixComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Helix_Mode,Helix_Axis;!function(t){t[t.PitchHeightAngle=0]="PitchHeightAngle",t[t.PitchTurnsAngle=1]="PitchTurnsAngle",t[t.HeightTurnsAngle=2]="HeightTurnsAngle",t[t.HeightTurnsGrowth=3]="HeightTurnsGrowth"}(Helix_Mode||(Helix_Mode={})),function(t){t[t.NormalSketch=0]="NormalSketch",t[t.VerticalSketch=1]="VerticalSketch",t[t.HorizontalSketch=2]="HorizontalSketch",t[t.BaseX=3]="BaseX",t[t.BaseY=4]="BaseY",t[t.BaseZ=5]="BaseZ"}(Helix_Axis||(Helix_Axis={}));var FeatureHelixComponent=function(t){function e(){var e=t.call(this)||this;return e.feature_topo_items=[],e.mode=Helix_Mode.PitchHeightAngle,e.axis=Helix_Axis.NormalSketch,e.pitch=30,e.height=90,e.angle=0,e.left_hand=!1,e.reversed=!1,e.solid=!0,e.className=ClassNames.Z.FeatureHelixComponent,e.feature_type=FeatureTypes.y.FeatureHelix,e}return FeatureHelixComponent_extends(e,t),e.prototype.get_feature_topo_items=function(){return this.feature_topo_items},e.prototype.set_feature_topo_items=function(t){this.feature_topo_items=t},e.prototype.get_mode=function(){return this.mode},e.prototype.set_mode=function(t){this.mode=t},e.prototype.get_axis=function(){return this.axis},e.prototype.set_axis=function(t){this.axis=t},e.prototype.get_pitch=function(){return this.pitch},e.prototype.set_pitch=function(t){this.pitch=t},e.prototype.get_height=function(){return this.height},e.prototype.set_height=function(t){this.height=t},e.prototype.get_angle=function(){return this.angle},e.prototype.set_angle=function(t){this.angle=t},e.prototype.get_left_hand=function(){return this.left_hand},e.prototype.set_left_hand=function(t){this.left_hand=t},e.prototype.get_reversed=function(){return this.reversed},e.prototype.set_reversed=function(t){this.reversed=t},e.prototype.get_solid=function(){return this.solid},e.prototype.set_solid=function(t){this.solid=t},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_topo_items=this.feature_topo_items.map(function(t){return t.to_json(e)}),o.mode=this.mode,o.axis=this.axis,o.pitch=this.pitch,o.height=this.height,o.angle=this.angle,o.left_hand=this.left_hand,o.reversed=this.reversed,o.solid=this.solid,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_topo_items=e.feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.mode=e.mode,this.axis=e.axis,this.pitch=e.pitch,this.height=e.height,this.angle=e.angle,this.left_hand=e.left_hand,this.reversed=e.reversed,this.solid=e.solid)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureHelixComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureMirrorComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureMirrorComponent=function(t){function e(){var e=t.call(this)||this;return e.feature_topo_items=[],e.center=new three_core.Pq0(0,0,0),e.direction=new three_core.Pq0(0,1,0),e.keep_tool=!0,e.className=ClassNames.Z.FeatureMirrorComponent,e.feature_type=FeatureTypes.y.FeatureMirror,e}return FeatureMirrorComponent_extends(e,t),e.prototype.get_feature_topo_items=function(){return this.feature_topo_items},e.prototype.set_feature_topo_items=function(t){this.feature_topo_items=t},e.prototype.set_keep_tool=function(t){this.keep_tool=t},e.prototype.get_keep_tool=function(){return this.keep_tool},e.prototype.set_center=function(t){this.center.copy(t)},e.prototype.get_center=function(){return this.center},e.prototype.set_direction=function(t){this.direction.copy(t)},e.prototype.get_direction=function(){return this.direction},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_topo_items=this.feature_topo_items.map(function(t){return t.to_json(e)}),o.center=this.center.toArray(),o.direction=this.direction.toArray(),o.keep_tool=this.keep_tool,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_topo_items=e.feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.center.fromArray(e.center),this.direction.fromArray(e.direction),this.keep_tool=e.keep_tool)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureMirrorComponent,e.create,t)},e}(FeatureBaseComponent.x),Ax2=__webpack_require__(2226),FeatureRevolveComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureRevolveComponent=function(t){function e(){var e=t.call(this)||this;return e.feature_topo_items=[],e.value=360,e.solid=!0,e.ax2=new Ax2.g,e.className=ClassNames.Z.FeatureRevolveComponent,e.feature_type=FeatureTypes.y.FeatureRevolve,e}return FeatureRevolveComponent_extends(e,t),e.prototype.get_feature_topo_items=function(){return this.feature_topo_items},e.prototype.set_feature_topo_items=function(t){this.feature_topo_items=t},e.prototype.get_value=function(){return this.value},e.prototype.set_value=function(t){this.value=t},e.prototype.get_solid=function(){return this.solid},e.prototype.set_solid=function(t){this.solid=t},e.prototype.get_ax2=function(){return this.ax2},e.prototype.set_ax2=function(t){this.ax2=t},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_topo_items=this.feature_topo_items.map(function(t){return t.to_json(e)}),o.value=this.value,o.solid=this.solid,o.ax2=this.ax2.toArray(),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_topo_items=e.feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.value=e.value,this.solid=e.solid,this.ax2.fromArray(e.ax2))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureRevolveComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureShellComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureShellComponent=function(t){function e(){var e=t.call(this)||this;return e.feature_topo_items=[],e.value=.1,e.inward=!0,e.className=ClassNames.Z.FeatureShellComponent,e.feature_type=FeatureTypes.y.FeatureShell,e}return FeatureShellComponent_extends(e,t),e.prototype.get_feature_topo_items=function(){return this.feature_topo_items},e.prototype.set_feature_topo_items=function(t){this.feature_topo_items=t},e.prototype.set_value=function(t){this.value=t},e.prototype.get_value=function(){return this.value},e.prototype.set_inward=function(t){this.inward=t},e.prototype.get_inward=function(){return this.inward},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_topo_items=this.feature_topo_items.map(function(t){return t.to_json(e)}),o.value=this.value,o.inward=this.inward,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_topo_items=e.feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.value=e.value,this.inward=e.inward)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureShellComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureSweepComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureSweepComponent=function(t){function e(){var e=t.call(this)||this;return e.path_feature_topo_items=[],e.profile_feature_topo_items=[],e.solid=!0,e.className=ClassNames.Z.FeatureSweepComponent,e.feature_type=FeatureTypes.y.FeatureSweep,e}return FeatureSweepComponent_extends(e,t),e.prototype.get_path_feature_topo_items=function(){return this.path_feature_topo_items},e.prototype.set_path_feature_topo_items=function(t){this.path_feature_topo_items=t},e.prototype.get_profile_feature_topo_items=function(){return this.profile_feature_topo_items},e.prototype.set_profile_feature_topo_items=function(t){this.profile_feature_topo_items=t},e.prototype.get_solid=function(){return this.solid},e.prototype.set_solid=function(t){this.solid=t},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.profile_feature_topo_items=this.profile_feature_topo_items.map(function(t){return t.to_json(e)}),o.path_feature_topo_items=this.path_feature_topo_items.map(function(t){return t.to_json(e)}),o.solid=this.solid,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.profile_feature_topo_items=e.profile_feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.path_feature_topo_items=e.path_feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.solid=e.solid)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureSweepComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureTransformComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureTransformComponent=function(t){function e(){var e=t.call(this)||this;return e.feature_topo_items=[],e.position=new three_core.Pq0(0,0,0),e.scale=new three_core.Pq0(1,1,1),e.rotation=new three_core.PTz,e.className=ClassNames.Z.FeatureTransformComponent,e.feature_type=FeatureTypes.y.FeatureTransform,e}return FeatureTransformComponent_extends(e,t),e.prototype.get_feature_topo_items=function(){return this.feature_topo_items},e.prototype.set_feature_topo_items=function(t){this.feature_topo_items=t},e.prototype.set_position=function(t){this.position.copy(t)},e.prototype.get_position=function(){return this.position},e.prototype.set_scale=function(t){this.scale.copy(t)},e.prototype.get_scale=function(){return this.scale},e.prototype.set_rotation=function(t){this.rotation.copy(t)},e.prototype.get_rotation=function(){return this.rotation},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.feature_topo_items=this.feature_topo_items.map(function(t){return t.to_json(e)}),o.position=this.position.toArray(),o.scale=this.scale.toArray(),o.rotation=this.rotation.toArray(),o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.feature_topo_items=e.feature_topo_items.map(function(t){return FeatureTopoItem.create(t,o)}),this.position.fromArray(e.position),this.scale.fromArray(e.scale),this.rotation.fromArray(e.rotation))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureTransformComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureSetBoxComponent=__webpack_require__(2502),FeatureSetConeComponent=__webpack_require__(5118),FeatureSetCylinderComponent=__webpack_require__(9985),FeatureSetEllipsoidComponent=__webpack_require__(9162),FeatureSetPrismComponent=__webpack_require__(5638),FeatureSetStepComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureSetStepComponent=function(t){function e(){var e=t.call(this)||this;return e.content=new Uint8Array,e.file_name="",e.className=ClassNames.Z.FeatureSetStepComponent,e.feature_type=FeatureTypes.y.FeatureSetStep,e}return FeatureSetStepComponent_extends(e,t),e.prototype.set_content=function(t){this.content=t},e.prototype.get_content=function(){return this.content},e.prototype.set_file_name=function(t){this.file_name=t},e.prototype.get_file_name=function(){return this.file_name},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e),n=Array.from(this.content);return o.content=n,o.file_name=this.file_name,o},e.prototype.read_from_json=function(e,o){if(e){t.prototype.read_from_json.call(this,e,o),this.feature_type===FeatureTypes.y.FeatureSetBox&&(this.feature_type=FeatureTypes.y.FeatureSetStep);var n=e.content;this.content=new Uint8Array(n),this.file_name=e.file_name}},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureSetStepComponent,e.create,t)},e}(FeatureBaseComponent.x),FeatureSetSphereComponent=__webpack_require__(5984),FeatureSetTorusComponent=__webpack_require__(9506),FeatureSetTrapezoidComponent=__webpack_require__(9281),FeatureSetWedgeComponent=__webpack_require__(9017),DisplayMode,ProjectionMode,Scene3dCameraControlMode,Scene3dCameraViewMode,SelectionMode,EditorEditMode;!function(t){t.wireframe="wireframe",t.shading="shading",t.shadingBoundary="shadingBoundary",t.unshaded="unshaded",t.translucent="translucent",t.translucentSingleColor="translucentSingleColor",t.shadingSufaceBoundary="shadingSufaceBoundary",t.featurePreview="featurePreview"}(DisplayMode||(DisplayMode={})),function(t){t.perspective="perspective",t.orthographic="orthographic"}(ProjectionMode||(ProjectionMode={})),function(t){t.orbit="orbit",t.trackball="trackball"}(Scene3dCameraControlMode||(Scene3dCameraControlMode={})),function(t){t.reset="reset",t.fit="fit",t.isometric="isometric",t.front="front",t.back="back",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Scene3dCameraViewMode||(Scene3dCameraViewMode={})),function(t){t.body="body",t.face_edge="face_edge"}(SelectionMode||(SelectionMode={})),function(t){t.FeaturePartEdit="FeaturePartEdit",t.FeatureSketchEdit="FeatureSketchEdit"}(EditorEditMode||(EditorEditMode={}));var Scene3dComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Scene3dComponent=function(t){function e(){var e=t.call(this)||this;return e.show_renderer_info=!0,e.show_view_helper=!0,e.show_axis=!0,e.show_grid=!0,e.grid_spacing=10,e.display_mode=DisplayMode.shadingBoundary,e.selection_mode=SelectionMode.face_edge,e.projection_mode=ProjectionMode.perspective,e.camera_mode=Scene3dCameraControlMode.orbit,e.sketch_grid_spacing=10,e.sketch_snap=!0,e.sketch_show_grid=!0,e.sketch_show_ruler=!0,e.camera_position=null,e.camera_target=null,e.camera_zoom=1,e.show_control_info=!0,e.show_ruler=!0,e.className=ClassNames.Z.Scene3dComponent,e}return Scene3dComponent_extends(e,t),e.prototype.set_show_control_info=function(t){this.show_control_info=t},e.prototype.get_show_control_info=function(){return this.show_control_info},e.prototype.set_show_renderer_info=function(t){this.show_renderer_info=t},e.prototype.get_show_renderer_info=function(){return this.show_renderer_info},e.prototype.set_show_view_helper=function(t){this.show_view_helper=t},e.prototype.get_show_view_helper=function(){return this.show_view_helper},e.prototype.set_show_axis=function(t){this.show_axis=t},e.prototype.get_show_axis=function(){return this.show_axis},e.prototype.set_show_grid=function(t){this.show_grid=t},e.prototype.get_show_grid=function(){return this.show_grid},e.prototype.set_grid_spacing=function(t){this.grid_spacing=t},e.prototype.get_grid_spacing=function(){return this.grid_spacing},e.prototype.set_display_mode=function(t){this.display_mode=t},e.prototype.get_display_mode=function(){return this.display_mode},e.prototype.set_selection_mode=function(t){this.selection_mode=t},e.prototype.get_selection_mode=function(){return this.selection_mode},e.prototype.set_projection_mode=function(t){this.projection_mode=t},e.prototype.get_projection_mode=function(){return this.projection_mode},e.prototype.set_camera_mode=function(t){this.camera_mode=t},e.prototype.get_camera_mode=function(){return this.camera_mode},e.prototype.set_sketch_grid_spacing=function(t){this.sketch_grid_spacing=t},e.prototype.get_sketch_grid_spacing=function(){return this.sketch_grid_spacing},e.prototype.set_sketch_snap=function(t){this.sketch_snap=t},e.prototype.get_sketch_snap=function(){return this.sketch_snap},e.prototype.set_sketch_show_grid=function(t){this.sketch_show_grid=t},e.prototype.get_sketch_show_grid=function(){return this.sketch_show_grid},e.prototype.set_sketch_show_ruler=function(t){this.sketch_show_ruler=t},e.prototype.get_sketch_show_ruler=function(){return this.sketch_show_ruler},e.prototype.set_show_ruler=function(t){this.show_ruler=t},e.prototype.get_show_ruler=function(){return this.show_ruler},e.prototype.set_camera_position=function(t){this.camera_position=t},e.prototype.get_camera_position=function(){return this.camera_position},e.prototype.set_camera_target=function(t){this.camera_target=t},e.prototype.get_camera_target=function(){return this.camera_target},e.prototype.set_camera_zoom=function(t){this.camera_zoom=t},e.prototype.get_camera_zoom=function(){return this.camera_zoom},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.show_renderer_info=this.show_renderer_info,o.show_view_helper=this.show_view_helper,o.show_axis=this.show_axis,o.show_grid=this.show_grid,o.grid_spacing=this.grid_spacing,o.display_mode=this.display_mode,o.selection_mode=this.selection_mode,o.projection_mode=this.projection_mode,o.camera_mode=this.camera_mode,o.sketch_grid_spacing=this.sketch_grid_spacing,o.sketch_snap=this.sketch_snap,o.sketch_show_grid=this.sketch_show_grid,o.sketch_show_ruler=this.sketch_show_ruler,o.camera_position=this.camera_position,o.camera_target=this.camera_target,o.camera_zoom=this.camera_zoom,o.show_control_info=this.show_control_info,o.show_ruler=this.show_ruler,o},e.prototype.read_from_json=function(e,o){var n,r,i,s,a;e&&(t.prototype.read_from_json.call(this,e,o),this.show_renderer_info=e.show_renderer_info,this.show_view_helper=e.show_view_helper,this.show_axis=e.show_axis,this.show_grid=e.show_grid,this.grid_spacing=e.grid_spacing,this.display_mode=e.display_mode,this.selection_mode=e.selection_mode,this.projection_mode=e.projection_mode,this.camera_mode=e.camera_mode,this.sketch_grid_spacing=e.sketch_grid_spacing,this.sketch_snap=e.sketch_snap,this.sketch_show_grid=e.sketch_show_grid,this.sketch_show_ruler=null===(n=e.sketch_show_ruler)||void 0===n||n,this.camera_position=null!==(r=e.camera_position)&&void 0!==r?r:null,this.camera_target=null!==(i=e.camera_target)&&void 0!==i?i:null,this.camera_zoom=null!==(s=e.camera_zoom)&&void 0!==s?s:1,this.show_control_info=e.show_control_info,this.show_ruler=null===(a=e.show_ruler)||void 0===a||a)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.Scene3dComponent,e.create,t)},e}(Component.u),BoxMeshComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),BoxMeshComponent=function(t){function e(){var e=t.call(this)||this;return e.x_length=1,e.y_length=1,e.z_length=1,e.className=ClassNames.Z.BoxMeshComponent,e}return BoxMeshComponent_extends(e,t),e.prototype.get_x_length=function(){return this.x_length},e.prototype.set_x_length=function(t){this.x_length=t},e.prototype.get_y_length=function(){return this.y_length},e.prototype.set_y_length=function(t){this.y_length=t},e.prototype.get_z_length=function(){return this.z_length},e.prototype.set_z_length=function(t){this.z_length=t},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.x_length=this.x_length,o.y_length=this.y_length,o.z_length=this.z_length,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.x_length=e.x_length||1,this.y_length=e.y_length||1,this.z_length=e.z_length||1)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.BoxMeshComponent,e.create,t)},e}(Component.u),PlaneMeshComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),PlaneMeshComponent=function(t){function e(){var e=t.call(this)||this;return e.className=ClassNames.Z.PlaneMeshComponent,e}return PlaneMeshComponent_extends(e,t),e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&t.prototype.read_from_json.call(this,e,o)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.PlaneMeshComponent,e.create,t)},e}(Component.u),SphereMeshComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),SphereMeshComponent=function(t){function e(){var e=t.call(this)||this;return e.radius=1,e.className=ClassNames.Z.SphereMeshComponent,e}return SphereMeshComponent_extends(e,t),e.prototype.get_radius=function(){return this.radius},e.prototype.set_radius=function(t){this.radius=t},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.radius=this.radius,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.radius=e.radius||1)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.SphereMeshComponent,e.create,t)},e}(Component.u),Camera3dComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Camera3dComponent=function(t){function e(){var e=t.call(this)||this;return e.className=ClassNames.Z.Camera3dComponent,e}return Camera3dComponent_extends(e,t),e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&t.prototype.read_from_json.call(this,e,o)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.Camera3dComponent,e.create,t)},e}(Component.u),OrthographicCameraComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),OrthographicCameraComponent=function(t){function e(){var e=t.call(this)||this;return e.left=-10,e.right=10,e.top=10,e.bottom=-10,e.near=.1,e.far=1e3,e.zoom=1,e.className=ClassNames.Z.OrthographicCameraComponent,e}return OrthographicCameraComponent_extends(e,t),e.prototype.set_value_by_w_size=function(t,e){var o=(t=(t=Math.abs(t))<=0?2:t)/2,n=o/(e=(e=Math.abs(e))<=0?1:e);this.left=-o,this.right=o,this.top=n,this.bottom=-n},e.prototype.get_w_size=function(){return Math.abs(this.right-this.left)},e.prototype.set_left=function(t){this.left=t},e.prototype.get_left=function(){return this.left},e.prototype.set_right=function(t){this.right=t},e.prototype.get_right=function(){return this.right},e.prototype.set_top=function(t){this.top=t},e.prototype.get_top=function(){return this.top},e.prototype.set_bottom=function(t){this.bottom=t},e.prototype.get_bottom=function(){return this.bottom},e.prototype.set_near=function(t){this.near=t},e.prototype.get_near=function(){return this.near},e.prototype.set_far=function(t){this.far=t},e.prototype.get_far=function(){return this.far},e.prototype.set_zoom=function(t){this.zoom=t},e.prototype.get_zoom=function(){return this.zoom},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.left=this.left,o.right=this.right,o.top=this.top,o.bottom=this.bottom,o.near=this.near,o.far=this.far,o.zoom=this.zoom,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.OrthographicCameraComponent,e.create,t)},e}(Component.u),AmbientLightComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),AmbientLightComponent=function(t){function e(){var e=t.call(this)||this;return e.className=ClassNames.Z.AmbientLightComponent,e}return AmbientLightComponent_extends(e,t),e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&t.prototype.read_from_json.call(this,e,o)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.AmbientLightComponent,e.create,t)},e}(Component.u),DirectionalLightComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),DirectionalLightComponent=function(t){function e(){var e=t.call(this)||this;return e.className=ClassNames.Z.DirectionalLightComponent,e}return DirectionalLightComponent_extends(e,t),e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&t.prototype.read_from_json.call(this,e,o)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.DirectionalLightComponent,e.create,t)},e}(Component.u),PointLightComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),PointLightComponent=function(t){function e(){var e=t.call(this)||this;return e.className=ClassNames.Z.PointLightComponent,e}return PointLightComponent_extends(e,t),e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&t.prototype.read_from_json.call(this,e,o)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.PointLightComponent,e.create,t)},e}(Component.u),SpotLightComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),SpotLightComponent=function(t){function e(){var e=t.call(this)||this;return e.className=ClassNames.Z.SpotLightComponent,e}return SpotLightComponent_extends(e,t),e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&t.prototype.read_from_json.call(this,e,o)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.SpotLightComponent,e.create,t)},e}(Component.u),WorkSpaceSettingComponent_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),WorkSpaceSettingComponent=function(t){function e(){var e=t.call(this)||this;return e.console_log_show_info=!0,e.console_log_show_warning=!0,e.console_log_show_error=!0,e.console_log_show_debug=!0,e.console_log_show_time=!0,e.console_log_show_level=!0,e.treeview_expanded_keys=[],e.last_opened_project_type="",e.last_opened_project_id="",e.last_opened_file_name="",e.className=ClassNames.Z.WorkSpaceSettingComponent,e}return WorkSpaceSettingComponent_extends(e,t),e.prototype.get_console_log_show_info=function(){return this.console_log_show_info},e.prototype.set_console_log_show_info=function(t){this.console_log_show_info=t},e.prototype.get_console_log_show_warning=function(){return this.console_log_show_warning},e.prototype.set_console_log_show_warning=function(t){this.console_log_show_warning=t},e.prototype.get_console_log_show_error=function(){return this.console_log_show_error},e.prototype.set_console_log_show_error=function(t){this.console_log_show_error=t},e.prototype.get_console_log_show_debug=function(){return this.console_log_show_debug},e.prototype.set_console_log_show_debug=function(t){this.console_log_show_debug=t},e.prototype.get_console_log_show_time=function(){return this.console_log_show_time},e.prototype.set_console_log_show_time=function(t){this.console_log_show_time=t},e.prototype.get_console_log_show_level=function(){return this.console_log_show_level},e.prototype.set_console_log_show_level=function(t){this.console_log_show_level=t},e.prototype.get_treeview_expanded_keys=function(){return this.treeview_expanded_keys},e.prototype.set_treeview_expanded_keys=function(t){this.treeview_expanded_keys=t},e.prototype.get_last_opened_project_type=function(){return this.last_opened_project_type},e.prototype.set_last_opened_project_type=function(t){this.last_opened_project_type=t},e.prototype.get_last_opened_project_id=function(){return this.last_opened_project_id},e.prototype.set_last_opened_project_id=function(t){this.last_opened_project_id=t},e.prototype.get_last_opened_file_name=function(){return this.last_opened_file_name},e.prototype.set_last_opened_file_name=function(t){this.last_opened_file_name=t},e.prototype.to_json=function(e){var o=t.prototype.to_json.call(this,e);return o.console_log_show_info=this.console_log_show_info,o.console_log_show_warning=this.console_log_show_warning,o.console_log_show_error=this.console_log_show_error,o.console_log_show_debug=this.console_log_show_debug,o.console_log_show_time=this.console_log_show_time,o.console_log_show_level=this.console_log_show_level,o.treeview_expanded_keys=this.treeview_expanded_keys,o.last_opened_project_type=this.last_opened_project_type,o.last_opened_project_id=this.last_opened_project_id,o.last_opened_file_name=this.last_opened_file_name,o},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.console_log_show_info=e.console_log_show_info,this.console_log_show_warning=e.console_log_show_warning,this.console_log_show_error=e.console_log_show_error,this.console_log_show_debug=e.console_log_show_debug,this.console_log_show_time=e.console_log_show_time,this.console_log_show_level=e.console_log_show_level,this.treeview_expanded_keys=e.treeview_expanded_keys,this.last_opened_project_type=e.last_opened_project_type,this.last_opened_project_id=e.last_opened_project_id,this.last_opened_file_name=e.last_opened_file_name)},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.WorkSpaceSettingComponent,e.create,t)},e}(Component.u),SkGeomArcComponent=__webpack_require__(5841),SkGeomBaseComponent=__webpack_require__(2444),SkGeomBSplineComponent=__webpack_require__(7864),SkGeomCircleComponent=__webpack_require__(8023),SkGeomEllipseComponent=__webpack_require__(331),SkGeomLineComponent=__webpack_require__(9757),SkGeomPointComponent=__webpack_require__(6775),SkConstraintComponent=__webpack_require__(3304),TopoShapeComponent=__webpack_require__(632),NativeNodeToFeatureNode=__webpack_require__(1387),ObjectConverter=__webpack_require__(5062),SpriteToNativeNode=__webpack_require__(8892),EditorEventTypes;!function(t){t.load_json="load_json",t.save_json="save_json",t.load_document="load_document",t.save_document="save_document"}(EditorEventTypes||(EditorEventTypes={}));var EditorEventTypesList=[EditorEventTypes.load_json,EditorEventTypes.save_json,EditorEventTypes.load_document,EditorEventTypes.save_document],EditorEventInput=function(){function t(){}return t.prototype.to_json=function(){return{}},t}(),EditorEventManager=function(){function t(){}return Object.defineProperty(t,"instance",{get:function(){return t.m_instance||(t.m_instance=new t),t.m_instance},enumerable:!1,configurable:!0}),t.prototype.set_connection=function(t){this.connection=t},t.prototype.get_connection=function(){return this.connection},t}(),EditorEventOutput=function(){function t(){this.successful=!1,this.message=""}return t.prototype.to_json=function(){return{successful:this.successful,message:this.message}},t}(),EditorEvent_load_document_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_load_document=function(t){function e(){return t.call(this)||this}return EditorEvent_load_document_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.filePath=this.filePath,e.id=this.id,e},e}(EditorEventInput),EditorEventOutput_load_document=function(t){function e(){return t.call(this)||this}return EditorEvent_load_document_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.content=this.content,e},e}(EditorEventOutput),EditorEvent_load_json_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_load_json=function(t){function e(){return t.call(this)||this}return EditorEvent_load_json_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.file_path=this.file_path,e},e}(EditorEventInput),EditorEventOutput_load_json=function(t){function e(){return t.call(this)||this}return EditorEvent_load_json_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.content=this.content,e},e}(EditorEventOutput),EditorEvent_save_document_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_save_document=function(t){function e(){return t.call(this)||this}return EditorEvent_save_document_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.projectType=this.projectType,e.id=this.id,e.name=this.name,e.content=this.content,e.filename=this.filename,e.previewImg_filename=this.previewImg_filename,e.previewImgContent=this.previewImgContent,e.preview3DContent=this.preview3DContent,e},e}(EditorEventInput),EditorEventOutput_save_document=function(t){function e(){return t.call(this)||this}return EditorEvent_save_document_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.new_id=this.new_id,e},e}(EditorEventOutput),EditorEvent_save_json_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_save_json=function(t){function e(){return t.call(this)||this}return EditorEvent_save_json_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.file_path=this.file_path,e.content=this.content,e},e}(EditorEventInput),EditorEventOutput_save_json=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return EditorEvent_save_json_extends(e,t),e}(EditorEventOutput),EditorEvent_file_list_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_file_list=function(t){function e(){return t.call(this)||this}return EditorEvent_file_list_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.id=this.id,e.path=this.path,e},e}(EditorEventInput),EditorEventOutput_file_list=function(t){function e(){return t.call(this)||this}return EditorEvent_file_list_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.files=this.files,e},e}(EditorEventOutput),EditorEvent_check_file_exist_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_check_file_exist=function(t){function e(){return t.call(this)||this}return EditorEvent_check_file_exist_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.id=this.id,e.path=this.path,e},e}(EditorEventInput),EditorEventOutput_check_file_exist=function(t){function e(){return t.call(this)||this}return EditorEvent_check_file_exist_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.exist=this.exist,e},e}(EditorEventOutput),EditorEvent_new_file_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_new_file=function(t){function e(){return t.call(this)||this}return EditorEvent_new_file_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.id=this.id,e.filename=this.filename,e.isFolder=this.isFolder,e},e}(EditorEventInput),EditorEventOutput_new_file=function(t){function e(){return t.call(this)||this}return EditorEvent_new_file_extends(e,t),e.prototype.to_json=function(){return t.prototype.to_json.call(this)},e}(EditorEventOutput),EditorEvent_load_file_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_load_file=function(t){function e(){return t.call(this)||this}return EditorEvent_load_file_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.id=this.id,e.filePath=this.filePath,e},e}(EditorEventInput),EditorEventOutput_load_file=function(t){function e(){return t.call(this)||this}return EditorEvent_load_file_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.content=this.content,e},e}(EditorEventOutput),EditorEvent_save_file_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_save_file=function(t){function e(){return t.call(this)||this}return EditorEvent_save_file_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.id=this.id,e.filename=this.filename,e.content=this.content,e},e}(EditorEventInput),EditorEventOutput_save_file=function(t){function e(){return t.call(this)||this}return EditorEvent_save_file_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.new_id=this.new_id,e},e}(EditorEventOutput),EditorEvent_rename_file_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_rename_file=function(t){function e(){return t.call(this)||this}return EditorEvent_rename_file_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.id=this.id,e.from_filename=this.from_filename,e.to_filename=this.to_filename,e},e}(EditorEventInput),EditorEventOutput_rename_file=function(t){function e(){return t.call(this)||this}return EditorEvent_rename_file_extends(e,t),e.prototype.to_json=function(){return t.prototype.to_json.call(this)},e}(EditorEventOutput),EditorEvent_delete_file_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_delete_file=function(t){function e(){return t.call(this)||this}return EditorEvent_delete_file_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.path=this.path,e},e}(EditorEventInput),EditorEventOutput_delete_file=function(t){function e(){return t.call(this)||this}return EditorEvent_delete_file_extends(e,t),e.prototype.to_json=function(){return t.prototype.to_json.call(this)},e}(EditorEventOutput),EditorEvent_duplicate_file_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_duplicate_file=function(t){function e(){return t.call(this)||this}return EditorEvent_duplicate_file_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.from_filename=this.from_filename,e.to_filename=this.to_filename,e},e}(EditorEventInput),EditorEventOutput_duplicate_file=function(t){function e(){return t.call(this)||this}return EditorEvent_duplicate_file_extends(e,t),e.prototype.to_json=function(){return t.prototype.to_json.call(this)},e}(EditorEventOutput),EditorEvent_paste_file_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_paste_file=function(t){function e(){return t.call(this)||this}return EditorEvent_paste_file_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.id=this.id,e.type=this.type,e.sourcePath=this.sourcePath,e.filePath=this.filePath,e},e}(EditorEventInput),EditorEventOutput_paste_file=function(t){function e(){return t.call(this)||this}return EditorEvent_paste_file_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.data=this.data,e},e}(EditorEventOutput),EditorEvent_move_files_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),EditorEventInput_move_files=function(t){function e(){return t.call(this)||this}return EditorEvent_move_files_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.id=this.id,e.filePaths=this.filePaths,e.target=this.target,e.type=this.type,e},e}(EditorEventInput),EditorEventOutput_move_files=function(t){function e(){return t.call(this)||this}return EditorEvent_move_files_extends(e,t),e.prototype.to_json=function(){var e=t.prototype.to_json.call(this);return e.destPaths=this.destPaths,e},e}(EditorEventOutput),AssimpExporter=function(){function t(t){void 0===t&&(t=!1),this.is_native_node=!1,this.is_native_node=t}return t.prototype.export=function(t,e,o,n,r){void 0===n&&(n=1),void 0===r&&(r="stl");var i=this.is_native_node?t:SpriteToNativeNode.S.readSprite(t,null,!0);return new parapoly_engine.ParaPolyExporterForAssimp(e,o,n).ExportToCharArray(i,r)},t}(),DxfExporter=__webpack_require__(4291),DxfLoader=__webpack_require__(3401),Util=__webpack_require__(1072),GltfExporter=function(){function t(t){void 0===t&&(t=!1),this.is_native_node=!1,this.is_native_node=t}return t.prototype.export=function(t,e,o,n,r,i,s){void 0===e&&(e=.5),void 0===o&&(o=.5),void 0===n&&(n=!0),void 0===r&&(r=!0),void 0===i&&(i=1),void 0===s&&(s=!1);var a=this.is_native_node?t:SpriteToNativeNode.S.readSprite(t,null,!0),c=new parapoly_engine.ParaPolyExporterGltf(a,e,o,n,r,!0,i,s).exportToCharArray();return s?Util.J.nativeCharArrayToUint8Array(c):Util.J.nativeCharArrayToString(c)},t}(),ParaXExporter=function(){function t(t){void 0===t&&(t=!1),this.is_native_node=!1,this.is_native_node=t}return t.prototype.export=function(t,e,o,n,r,i){void 0===e&&(e=.5),void 0===o&&(o=.5),void 0===n&&(n=!1),void 0===r&&(r=1),void 0===i&&(i=null);var s=this.is_native_node?t:SpriteToNativeNode.S.readSprite(t,null,!0),a=new parapoly_engine.ParaPolyExporterParaX(s,e,o,n,r).exportToCharArray(),c=Util.J.nativeCharArrayToUint8Array(a);if(i){var u=new Uint8Array(i.length+c.length);return u.set(i,0),u.set(c,i.length),u}return c},t}(),StepExporter=function(){function t(t){void 0===t&&(t=!1),this.is_native_node=!1,this.is_native_node=t}return t.prototype.export=function(t){var e=this.is_native_node?t:SpriteToNativeNode.S.readSprite(t,null,!0),o=(new parapoly_engine.ParaPolyExporterXCAF).exportStep(e);return Util.J.nativeCharArrayToString(o)},t}(),SvgExporter=__webpack_require__(4991),SvgLoader=__webpack_require__(261),inspectors={},InspectorFactory=function(){function t(){}return t.regist=function(t){t&&t.className&&(inspectors[t.className]||(inspectors[t.className]=t))},t.get=function(t){if(t)return inspectors[t]},t.get_title=function(e){var o=t.get(e);if(o)return o.title},t.get_icon=function(e){var o=t.get(e);if(o)return o.icon},t}(),Sprite_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Sprite=function(t){function e(e){void 0===e&&(e=null);var o=t.call(this,e)||this;return o.className=ClassNames.Z.Sprite,o}return Sprite_extends(e,t),e.prototype.clone=function(t,o){return void 0===t&&(t=null),void 0===o&&(o=null),e.create(this.to_json(o),t)},e.create=function(t,o){void 0===o&&(o=null);var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.Sprite,e.create,t)},e}(Node.b),FeatureContainerNode_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureContainerNode=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureContainerNode,o.info_component=new InfoComponent.S,o.addComponent(o.info_component),o}return FeatureContainerNode_extends(e,t),e.prototype.find_edges_or_faces_index_by_first_topo_item=function(t,e){if(t){var o=t[0];if(o){var n=o.get_feature_id(),r=this.find_feature_node_by_id(n,e);if(r){var i=[],s=[],a=o.get_edge_index(),c=o.get_face_index();a>=0&&i.push(a),c>=0&&s.push(c);for(var u=1;u<t.length;u++){var _=t[u];if(_){var p=_.get_feature_id(),l=this.find_feature_node_by_id(p,e);if(l&&r.getId()==l.getId()){var h=_.get_edge_index(),d=_.get_face_index();h>=0&&i.push(h),d>=0&&s.push(d)}}}return{first_found_node:r,edges_index:i,faces_indes:s}}}}},e.prototype.find_feature_node_by_id=function(t,e){for(var o=0;o<this.getChildrenLength();o++){var n=this.getChildByIndex(o);if(n.getId()===t&&o<e)return n}},e.prototype.is_same_child=function(t,e){var o=this.getChildById(t),n=this.getChildByIndex(e);return!(!o||!n)&&o===n},e.prototype.set_label=function(t){this.info_component.set_label(t)},e.prototype.get_label=function(){return this.info_component.get_label()},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.info_component=this.getComponentByClassName(ClassNames.Z.InfoComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.prototype.markDirtyFrom=function(t){for(var e=this.getChildrenLength(),o=t;o<e;o++){var n=this.getChildByIndex(o);n&&n.set_building_dirty&&n.set_building_dirty(!0)}},e.create=function(t,o){var n=new e;return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureContainerNode,e.create,t)},e}(Node.b),FeatureNodeBase=__webpack_require__(1289),FeatureNodeSetBox=__webpack_require__(2773),FeatureNodeSetCone=__webpack_require__(1941),FeatureNodeSetCylinder=__webpack_require__(448),FeatureNodeSetEllipsoid=__webpack_require__(8873),FeatureNodeSetPrism=__webpack_require__(9333),FeatureRunningStates=__webpack_require__(6499),FeatureNodeSetStep_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeSetStep_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeSetStep_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeSetStep=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeSetStep,o.component=new FeatureSetStepComponent,o.addComponent(o.component),o.parapolyEasyStep=new parapoly_engine.ParaPolyEasyStep,o}return FeatureNodeSetStep_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.set_values=function(t){var e=Util.J.stringToUint8Array(t),o=new Uint8Array(e);this.component.set_content(o),this.make_topo_shape()},e.prototype.run=function(t){return FeatureNodeSetStep_awaiter(this,void 0,void 0,function(){return FeatureNodeSetStep_generator(this,function(t){return this.set_running_state(FeatureRunningStates.s.running),this.make_topo_shape(),this.set_running_state(FeatureRunningStates.s.finished),[2]})})},e.prototype.make_topo_shape=function(){var t=this.component.get_content(),e=Util.J.arrayToNativeCharArray(t),o=this.parapolyEasyStep.readCharArrayToShape(e);this.set_topo_shape(o)},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureSetStepComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeSetStep,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeSetSphere=__webpack_require__(7079),FeatureNodeSetTorus=__webpack_require__(8625),FeatureNodeSetTrapezoid=__webpack_require__(2072),FeatureNodeSetWedge=__webpack_require__(6792),FeatureNodeBoolean_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeBoolean_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeBoolean_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeBoolean=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeBoolean,o.component=new FeatureBooleanComponent,o.addComponent(o.component),o}return FeatureNodeBoolean_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeBoolean_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_,p,l,h,d,f,y,m,g,v,w;return FeatureNodeBoolean_generator(this,function(b){if(!t)return[2];if(!(e=t.feature_container))return[2];if(o=this.component.get_target_feature_topo_items(),n=this.component.get_tool_feature_topo_items(),!o||!n)return[2];if(0==o.length||0==n.length)return[2];for(this.archive_nodes(!1,e,o),this.archive_nodes(!1,e,n),r=this.component.get_operation(),i=this.component.get_keep_tool(),s=[],a=[],l=0;l<o.length;l++){if(c=o[l],u=c.get_feature_id(),c.get_feature_index(),f=e.getChildIndex(this),!(_=e.find_feature_node_by_id(u,f)))return this.set_running_state(FeatureRunningStates.s.error),[2];if(!(p=_.get_topo_shape())||p.isNull())return this.set_running_state(FeatureRunningStates.s.error),[2];p=p.clone(),s.push(p)}for(l=0;l<n.length;l++){if(h=n[l],d=h.get_feature_id(),h.get_feature_index(),f=e.getChildIndex(this),!(y=e.find_feature_node_by_id(d,f)))return this.set_running_state(FeatureRunningStates.s.error),[2];if(!(m=y.get_topo_shape())||m.isNull())return this.set_running_state(FeatureRunningStates.s.error),[2];m=m.clone(),a.push(m)}return g=this.op_shapes(s,BooleanTypes.E.union),v=this.op_shapes(a,BooleanTypes.E.union),!(w=this.op_shapes([g,v],r))||w.isNull()?(console.warn("FeatureNodeBoolean: boolean operation failed"),this.set_running_state(FeatureRunningStates.s.error),[2]):(this.set_topo_shape(w),this.archive_nodes(!0,e,o),i||this.archive_nodes(!0,e,n),[2])})})},e.prototype.archive_nodes=function(t,e,o){if(e&&o)for(var n=0;n<o.length;n++){var r=o[n].get_feature_id(),i=e.getChildById(r);i?(i.set_archived(t),t?i.set_op_feature_node_id(this.getId()):i.set_op_feature_node_id(null)):console.warn("FeatureNodeBoolean: node not found by id: "+r)}},e.prototype.op_shapes=function(t,e){if(t){for(var o=t[0],n=1;n<t.length;n++){var r=t[n];o&&!o.isNull()&&r&&!r.isNull()&&(e==BooleanTypes.E.union?o=parapoly_engine.ParaPolyShapeMaker.fuse(o,r):e==BooleanTypes.E.difference?o=parapoly_engine.ParaPolyShapeMaker.cut(o,r):e==BooleanTypes.E.intersection&&(o=parapoly_engine.ParaPolyShapeMaker.common(o,r)))}return o}},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureBooleanComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeBoolean,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeChamfer_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeChamfer_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeChamfer_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeChamfer=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeChamfer,o.component=new FeatureChamferComponent,o.addComponent(o.component),o}return FeatureNodeChamfer_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeChamfer_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_,p;return FeatureNodeChamfer_generator(this,function(l){if(!(e=t.feature_container))return[2];if(!(o=this.component.get_feature_topo_items()))return[2];if(n=e.getChildIndex(this),r=e.find_edges_or_faces_index_by_first_topo_item(o,n)||{},!(i=r.first_found_node))return this.set_running_state(FeatureRunningStates.s.error),[2];if(!i.get_topo_shape)return this.set_running_state(FeatureRunningStates.s.error),[2];for(i.set_archived(!1),i.set_op_feature_node_id(null),s=i.get_topo_shape(),a=this.component.get_value(),c=new parapoly_engine.ParaPolyIntArray,u=r.edges_index||[],_=0;_<u.length;_++)c.pushValue(u[_]);return!(p=parapoly_engine.ParaPolyShapeMaker.chamfer(s,a,c))||p.isNull()?(this.set_running_state(FeatureRunningStates.s.error),[2]):(i.set_archived(!0),i.set_op_feature_node_id(this.getId()),this.set_topo_shape(p),[2])})})},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureChamferComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeChamfer,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeDelete_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeDelete_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeDelete_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeDelete=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeDelete,o.component=new FeatureDeleteComponent,o.addComponent(o.component),o}return FeatureNodeDelete_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeDelete_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s;return FeatureNodeDelete_generator(this,function(a){return t&&(e=t.feature_container)&&(o=this.component.get_feature_topo_items())&&(n=o[0])?(r=n.get_feature_id(),n.get_feature_index(),i=e.getChildIndex(this),(s=e.find_feature_node_by_id(r,i))&&s.get_topo_shape?(s.set_archived(!0),s.set_op_feature_node_id(this.getId()),[2]):(this.set_running_state(FeatureRunningStates.s.error),[2])):[2]})})},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureDeleteComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeDelete,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeDraft_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeDraft_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeDraft_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeDraft=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeDraft,o.component=new FeatureDraftComponent,o.addComponent(o.component),o}return FeatureNodeDraft_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeDraft_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_,p,l,h,d;return FeatureNodeDraft_generator(this,function(f){if(!t)return[2];if(!(e=t.feature_container))return[2];if(!(o=this.component.get_feature_topo_items()))return[2];if(!(n=o[0]))return[2];if(r=n.get_feature_id(),n.get_feature_index(),i=e.getChildIndex(this),!(s=e.find_feature_node_by_id(r,i)))return this.set_running_state(FeatureRunningStates.s.error),[2];if(!s.get_topo_shape)return this.set_running_state(FeatureRunningStates.s.error),[2];if(s.set_archived(!1),s.set_op_feature_node_id(null),a=this.component.get_value(),c=this.component.get_reverse(),u=this.component.get_center(),_=this.component.get_direction(),(p=n.get_face_index())>=0){if((l=new parapoly_engine.ParaPolyIntArray).pushValue(p),h=s.get_topo_shape(),!(d=parapoly_engine.ParaPolyShapeMaker.draft_shape(h,a,u.x,u.y,u.z,_.x,_.y,_.z,l,c))||d.isNull())return this.set_running_state(FeatureRunningStates.s.error),[2];s.set_archived(!0),s.set_op_feature_node_id(this.getId()),s.get_topo_shape_component().set_topo_shape(d)}return[2]})})},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureDraftComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeDraft,e.create,t)},e}(FeatureNodeBase.o),SkContainerNode=__webpack_require__(9375),FeatureNodeExtrude_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeExtrude_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeExtrude_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeExtrude=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeExtrude,o.component=new FeatureExtrudeComponent,o.addComponent(o.component),o}return FeatureNodeExtrude_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeExtrude_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_,p,l,h,d,f,y,m;return FeatureNodeExtrude_generator(this,function(g){if(!t)return[2];if(!(e=t.feature_container))return[2];if(!(o=this.component.get_feature_topo_items()))return[2];if(!(n=o[0]))return[2];if(this.set_running_state(FeatureRunningStates.s.running),r=n.get_feature_id(),n.get_feature_index(),i=n.get_face_index(),s=e.getChildIndex(this),!(a=e.find_feature_node_by_id(r,s)))return this.set_running_state(FeatureRunningStates.s.error),[2];if(!a.get_topo_shape)return this.set_running_state(FeatureRunningStates.s.error),[2];if(a.set_archived(!1),a.set_op_feature_node_id(null),c=this.component.get_value(),u=this.component.get_direction(),_=this.component.get_solid(),p=this.component.get_keep_original(),l=a.getClassName(),h=new three_core.Pq0(0,0,1),l==ClassNames.Z.SkContainerNode){if(!(f=(d=a).to_wires_shape())||f.isNull())return console.warn("FeatureNodeExtrude: to wires shape failed"),this.set_running_state(FeatureRunningStates.s.error),[2];if(!(m=parapoly_engine.ParaPolyShapeMaker.extrude_shape(f,c,h.x,h.y,h.z,_))||m.isNull())return console.warn("FeatureNodeExtrude: extrude shape failed"),this.set_running_state(FeatureRunningStates.s.error),[2];p||(d.set_archived(!0),d.set_op_feature_node_id(this.getId())),m=SkContainerNode.Y.transform_native_shape(m,d),this.set_topo_shape(m)}else{if(y=a.get_topo_shape(),!(m=parapoly_engine.ParaPolyShapeMaker.extrude(y,c,i,u.x,u.y,u.z,_,!0))||m.isNull())return console.warn("FeatureNodeExtrude: extrude shape failed"),this.set_running_state(FeatureRunningStates.s.error),[2];p||(a.set_archived(!0),a.set_op_feature_node_id(this.getId())),this.set_topo_shape(m)}return this.set_running_state(FeatureRunningStates.s.finished),[2]})})},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureExtrudeComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeExtrude,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeFillet_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeFillet_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeFillet_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeFillet=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeFillet,o.component=new FeatureFilletComponent,o.addComponent(o.component),o}return FeatureNodeFillet_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeFillet_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_,p;return FeatureNodeFillet_generator(this,function(l){if(!(e=t.feature_container))return[2];if(!(o=this.component.get_feature_topo_items()))return[2];if(n=e.getChildIndex(this),r=e.find_edges_or_faces_index_by_first_topo_item(o,n)||{},!(i=r.first_found_node))return this.set_running_state(FeatureRunningStates.s.error),[2];if(!i.get_topo_shape)return this.set_running_state(FeatureRunningStates.s.error),[2];for(i.set_archived(!1),i.set_op_feature_node_id(null),s=i.get_topo_shape(),a=this.component.get_value(),c=new parapoly_engine.ParaPolyIntArray,u=r.edges_index||[],_=0;_<u.length;_++)c.pushValue(u[_]);return!(p=parapoly_engine.ParaPolyShapeMaker.fillet(s,a,c))||p.isNull()?(this.set_running_state(FeatureRunningStates.s.error),[2]):(i.set_archived(!0),i.set_op_feature_node_id(this.getId()),this.set_topo_shape(p),[2])})})},e.prototype.make_topo_shape=function(){},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureFilletComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeFillet,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeHelix_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeHelix_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeHelix_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeHelix=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeHelix,o.component=new FeatureHelixComponent,o.addComponent(o.component),o}return FeatureNodeHelix_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeHelix_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_,p,l,h,d,f,y,m;return FeatureNodeHelix_generator(this,function(g){return t&&(e=t.feature_container)&&(o=this.component.get_feature_topo_items())&&(n=o[0])?(r=n.get_feature_id(),i=e.getChildIndex(this),(s=e.find_feature_node_by_id(r,i))&&s.get_topo_shape?(s.set_archived(!1),s.set_op_feature_node_id(null),s.getClassName()!=ClassNames.Z.SkContainerNode||!(c=(a=s).to_wires_shape())||c.isNull()?(this.set_running_state(FeatureRunningStates.s.error),[2]):(u=this.component.get_axis(),_=this.component.get_mode(),p=this.component.get_pitch(),l=this.component.get_height(),h=this.component.get_angle(),d=this.component.get_left_hand(),f=this.component.get_reversed(),y=this.component.get_solid(),!(m=parapoly_engine.ParaPolyShapeMaker.helix_shape(c,u,_,p,l,h,d,f,y))||m.isNull()?(this.set_running_state(FeatureRunningStates.s.error),[2]):(m=SkContainerNode.Y.transform_native_shape(m,a),this.set_topo_shape(m),[2]))):(this.set_running_state(FeatureRunningStates.s.error),[2])):[2]})})},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureHelixComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeHelix,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeMirror_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeMirror_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeMirror_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeMirror=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeMirror,o.component=new FeatureMirrorComponent,o.addComponent(o.component),o}return FeatureNodeMirror_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeMirror_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_,p;return FeatureNodeMirror_generator(this,function(l){return t&&(e=t.feature_container)&&(o=this.component.get_feature_topo_items())&&(n=o[0])?(r=n.get_feature_id(),n.get_feature_index(),i=e.getChildIndex(this),(s=e.find_feature_node_by_id(r,i))&&s.get_topo_shape?(s.set_archived(!1),s.set_op_feature_node_id(null),a=this.component.get_center(),c=this.component.get_direction(),u=this.component.get_keep_tool(),_=s.get_topo_shape(),!(p=parapoly_engine.ParaPolyShapeMaker.mirror_shape(_,a.x,a.y,a.z,c.x,c.y,c.z))||p.isNull()?(this.set_running_state(FeatureRunningStates.s.error),[2]):(u||(s.set_archived(!0),s.set_op_feature_node_id(this.getId())),this.set_topo_shape(p),[2])):(this.set_running_state(FeatureRunningStates.s.error),[2])):[2]})})},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureMirrorComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeMirror,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeRevolve_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeRevolve_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeRevolve_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeRevolve=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeRevolve,o.component=new FeatureRevolveComponent,o.addComponent(o.component),o}return FeatureNodeRevolve_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeRevolve_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_,p,l,h,d,f;return FeatureNodeRevolve_generator(this,function(y){return t&&(e=t.feature_container)&&(o=this.component.get_feature_topo_items())&&(n=o[0])?(r=n.get_feature_id(),n.get_feature_index(),i=e.getChildIndex(this),(s=e.find_feature_node_by_id(r,i))&&s.get_topo_shape?(a=this.component.get_value(),c=this.component.get_ax2(),u=c.point,_=c.mainDir,p=this.component.get_solid(),(l=s.getClassName())!==ClassNames.Z.SkContainerNode?(console.warn("FeatureNodeRevolve: invalid class name: "+l),this.set_running_state(FeatureRunningStates.s.error),[2]):!(d=(h=s).to_wires_shape())||d.isNull()?(console.warn("FeatureNodeRevolve: to wires shape failed"),this.set_running_state(FeatureRunningStates.s.error),[2]):(d=SkContainerNode.Y.transform_native_shape(d,h),!(f=parapoly_engine.ParaPolyShapeMaker.revolve_shape(d,a,u.x,u.y,u.z,_.x,_.y,_.z,p))||f.isNull()?(console.log("revolve_shape is null"),this.set_running_state(FeatureRunningStates.s.error),[2]):(this.set_topo_shape(f),[2]))):(this.set_running_state(FeatureRunningStates.s.error),[2])):[2]})})},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureRevolveComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeRevolve,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeShell_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeShell_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeShell_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeShell=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeShell,o.component=new FeatureShellComponent,o.addComponent(o.component),o}return FeatureNodeShell_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeShell_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_,p;return FeatureNodeShell_generator(this,function(l){return(e=t.feature_container)&&(o=this.component.get_feature_topo_items())&&(n=o[0])?(r=n.get_feature_id(),n.get_feature_index(),i=e.getChildIndex(this),(s=e.find_feature_node_by_id(r,i))&&s.get_topo_shape?(s.set_archived(!1),s.set_op_feature_node_id(null),a=s.get_topo_shape(),c=this.component.get_value(),u=this.component.get_inward(),_=n.get_face_index(),!(p=parapoly_engine.ParaPolyShapeMaker.shell_shape(a,c,_,u))||p.isNull()?(this.set_running_state(FeatureRunningStates.s.error),[2]):(s.set_archived(!0),s.set_op_feature_node_id(this.getId()),this.set_topo_shape(p),[2])):(this.set_running_state(FeatureRunningStates.s.error),[2])):[2]})})},e.prototype.make_topo_shape=function(){},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureShellComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeShell,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeSweep_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeSweep_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeSweep_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeSweep=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeSweep,o.component=new FeatureSweepComponent,o.addComponent(o.component),o}return FeatureNodeSweep_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.get_first_node=function(t,e){if(!t||!e)return null;var o=e[0];if(!o)return null;var n=o.get_feature_id(),r=t.getChildIndex(this);return t.find_feature_node_by_id(n,r)},e.prototype.run=function(t){return FeatureNodeSweep_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_,p;return FeatureNodeSweep_generator(this,function(l){return t&&(e=t.feature_container)?(o=this.component.get_path_feature_topo_items(),n=this.component.get_profile_feature_topo_items(),r=this.get_first_node(e,o),i=this.get_first_node(e,n),r&&i?(s=r.getClassName(),a=i.getClassName(),s!==ClassNames.Z.SkContainerNode?(console.warn("FeatureNodeSweep: invalid path class name: "+s),this.set_running_state(FeatureRunningStates.s.error),[2]):a!==ClassNames.Z.SkContainerNode?(console.warn("FeatureNodeSweep: invalid profile class name: "+a),this.set_running_state(FeatureRunningStates.s.error),[2]):(c=r.to_wires_shape(),u=i.to_wires_shape(),c&&u?(u=SkContainerNode.Y.transform_native_shape(u,i),c=SkContainerNode.Y.transform_native_shape(c,r),_=this.component.get_solid(),!(p=parapoly_engine.ParaPolyShapeMaker.sweep_shape(c,u,_))||p.isNull()?(console.log("sweep_shape is null"),this.set_running_state(FeatureRunningStates.s.error),[2]):(this.set_topo_shape(p),[2])):(console.warn("FeatureNodeSweep: invalid path or profile shape"),this.set_running_state(FeatureRunningStates.s.error),[2]))):(console.warn("FeatureNodeSweep: node not found"),this.set_running_state(FeatureRunningStates.s.error),[2])):[2]})})},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureSweepComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeSweep,e.create,t)},e}(FeatureNodeBase.o),FeatureNodeTransform_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),FeatureNodeTransform_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},FeatureNodeTransform_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},FeatureNodeTransform=function(t){function e(e){void 0===e&&(e="");var o=t.call(this,e)||this;return o.className=ClassNames.Z.FeatureNodeTransform,o.component=new FeatureTransformComponent,o.addComponent(o.component),o}return FeatureNodeTransform_extends(e,t),e.prototype.get_feature_component=function(){return this.component},e.prototype.run=function(t){return FeatureNodeTransform_awaiter(this,void 0,void 0,function(){var e,o,n,r,i,s,a,c,u,_;return FeatureNodeTransform_generator(this,function(p){return t&&(e=t.feature_container)&&(o=this.component.get_feature_topo_items())&&(n=o[0])?(r=n.get_feature_id(),n.get_feature_index(),i=e.getChildIndex(this),(s=e.find_feature_node_by_id(r,i))&&s.get_topo_shape?(s.set_archived(!1),s.set_op_feature_node_id(null),(a=s.get_topo_shape())?(a=a.clone(),c=this.component.get_scale(),u=this.component.get_rotation(),_=this.component.get_position(),a.scale(c.x,c.y,c.z),a.rotate(u.x,u.y,u.z,u.w),a.translate(_.x,_.y,_.z),s.set_archived(!0),s.set_op_feature_node_id(this.getId()),this.set_topo_shape(a),[2]):(this.set_running_state(FeatureRunningStates.s.error),[2])):(this.set_running_state(FeatureRunningStates.s.error),[2])):[2]})})},e.prototype.to_json=function(e){return t.prototype.to_json.call(this,e)},e.prototype.read_from_json=function(e,o){e&&(t.prototype.read_from_json.call(this,e,o),this.component=this.getComponentByClassName(ClassNames.Z.FeatureTransformComponent))},e.prototype.clone=function(t,o){return e.create(this.to_json(o),t)},e.create=function(t,o){var n=new e("");return n.read_from_json(t,o),n},e.register=function(t){void 0===t&&(t=!1),ClassFactory.X.register(ClassNames.Z.FeatureNodeTransform,e.create,t)},e}(FeatureNodeBase.o),SkGeomArcNode=__webpack_require__(9856),SkGeomBaseNode=__webpack_require__(5255),SkGeomBSplineNode=__webpack_require__(8699),SkGeomCircleNode=__webpack_require__(1934),SkGeomEllipseNode=__webpack_require__(7866),SkGeomLineNode=__webpack_require__(2508),SkGeomPointNode=__webpack_require__(718),SkConstraintNode=__webpack_require__(7211),register_all_components=function(){Component.u.register(),Ax2Component.v.register(),BooleanComponent.A.register(),BlockCodeComponent.register(),InfoComponent.S.register(),MaterialComponent.n.register(),MeshComponent.F.register(),MetaComponent.V.register(),ShapeComponent.register(),TransformComponent.W.register(),FeatureBaseComponent.x.register(),FeatureMiscComponent.e.register(),FeatureBooleanComponent.register(),FeatureChamferComponent.register(),FeatureDeleteComponent.register(),FeatureDraftComponent.register(),FeatureExtrudeComponent.register(),FeatureFilletComponent.register(),FeatureHelixComponent.register(),FeatureMirrorComponent.register(),FeatureRevolveComponent.register(),FeatureShellComponent.register(),FeatureSweepComponent.register(),FeatureTransformComponent.register(),FeatureSetBoxComponent.R.register(),FeatureSetConeComponent.d.register(),FeatureSetCylinderComponent.k.register(),FeatureSetEllipsoidComponent.P.register(),FeatureSetPrismComponent.R.register(),FeatureSetStepComponent.register(),FeatureSetSphereComponent.H.register(),FeatureSetTorusComponent.t.register(),FeatureSetTrapezoidComponent.Q.register(),FeatureSetWedgeComponent.m.register(),SkGeomArcComponent.k.register(),SkGeomBaseComponent.T.register(),SkGeomBSplineComponent.p.register(),SkGeomCircleComponent.i.register(),SkGeomEllipseComponent.A.register(),SkGeomLineComponent.W.register(),SkGeomPointComponent.q.register(),SkConstraintComponent.RN.register(),Scene3dComponent.register(),BoxMeshComponent.register(),PlaneMeshComponent.register(),SphereMeshComponent.register(),Camera3dComponent.register(),OrthographicCameraComponent.register(),AmbientLightComponent.register(),DirectionalLightComponent.register(),PointLightComponent.register(),SpotLightComponent.register(),WorkSpaceSettingComponent.register(),TopoShapeComponent.t.register(),Node.b.register(),Sprite.register(),FeatureContainerNode.register(),FeatureNodeBase.o.register(),FeatureNodeSetBox.I.register(),FeatureNodeSetCone._.register(),FeatureNodeSetCylinder.l.register(),FeatureNodeSetEllipsoid.a.register(),FeatureNodeSetPrism.M.register(),FeatureNodeSetStep.register(),FeatureNodeSetSphere.C.register(),FeatureNodeSetTorus.Y.register(),FeatureNodeSetTrapezoid.H.register(),FeatureNodeSetWedge.H.register(),FeatureNodeBoolean.register(),FeatureNodeChamfer.register(),FeatureNodeDelete.register(),FeatureNodeDraft.register(),FeatureNodeExtrude.register(),FeatureNodeFillet.register(),FeatureNodeHelix.register(),FeatureNodeMirror.register(),FeatureNodeRevolve.register(),FeatureNodeShell.register(),FeatureNodeSweep.register(),FeatureNodeTransform.register(),SkContainerNode.Y.register(),SkGeomArcNode.n.register(),SkGeomBaseNode.i.register(),SkGeomBSplineNode.w.register(),SkGeomCircleNode.n.register(),SkGeomEllipseNode.B.register(),SkGeomLineNode.l.register(),SkGeomPointNode.N.register(),SkConstraintNode.W.register(),FeatureTopoItem.register()},BSplineHelper=__webpack_require__(5590),SpriteHelper=function(){function t(){}return t.findParentMaterialComponent=function(e){if(e){var o=e.getComponentByClassName(ClassNames.Z.MaterialComponent);return o||t.findParentMaterialComponent(e.getParent())}},t}(),PartTessellate=__webpack_require__(9175),FeatureInspectorFactory_inspectors={},FeatureInspectorFactory=function(){function t(){}return t.regist=function(t){t&&t.className&&(FeatureInspectorFactory_inspectors[t.className]||(FeatureInspectorFactory_inspectors[t.className]=t))},t.get=function(t){if(t)return FeatureInspectorFactory_inspectors[t]},t.get_title=function(e){var o=t.get(e);if(o)return o.title},t.get_icon=function(e){var o=t.get(e);if(o)return o.icon},t}(),BaseResource=__webpack_require__(5874),BaseEditorResource=__webpack_require__(4855),Block3dEditorResource=__webpack_require__(3124),ResourceTypes=__webpack_require__(8575),Code3dEditorResource_extends=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Code3dResource=function(t){function e(){var e=t.call(this)||this;return e.res_type=ResourceTypes.c.code3d,e}return Code3dEditorResource_extends(e,t),e}(Block3dEditorResource.k),Part3dEditorResource=__webpack_require__(4040),Sketch3dEditorResource=__webpack_require__(7073),ResourceManager=__webpack_require__(5574),ArScreenAspectRatioTypes,ArMediaInputTypes;!function(t){t.original="original",t.ratio_16_9="ratio_16_9",t.ratio_4_3="ratio_4_3",t.ratio_2_1="ratio_2_1",t.ratio_9_16="ratio_9_16",t.ratio_1_1="ratio_1_1",t.ratio_3_4="ratio_3_4"}(ArScreenAspectRatioTypes||(ArScreenAspectRatioTypes={})),function(t){t.camera="camera",t.video="video",t.image="image",t.canvas="canvas",t.none="none"}(ArMediaInputTypes||(ArMediaInputTypes={}));var ScreenRatioList=[{name:"9:16",ratio_type:ArScreenAspectRatioTypes.ratio_9_16,ratio:9/16,description:"TikTok",width:1080,height:1920},{name:"1:1",ratio_type:ArScreenAspectRatioTypes.ratio_1_1,ratio:1,description:"Instagram",width:1024,height:1024},{name:"3:4",ratio_type:ArScreenAspectRatioTypes.ratio_3_4,ratio:3/4,width:1080,height:1440},{name:"16:9",ratio_type:ArScreenAspectRatioTypes.ratio_16_9,ratio:16/9,description:"Youtube",width:1920,height:1080},{name:"4:3",ratio_type:ArScreenAspectRatioTypes.ratio_4_3,ratio:4/3,description:"Facebook",width:1440,height:1080},{name:"2:1",ratio_type:ArScreenAspectRatioTypes.ratio_2_1,ratio:2,width:1920,height:960}];function get_screen_info_by_ratio_type(t){return ScreenRatioList.find(function(e){return e.ratio_type===t})}var CodeTypes=__webpack_require__(3272),Constraint=__webpack_require__(9471),FileOptions,FileProtocol;!function(t){t.new="new",t.open="open",t.save="save",t.saveAs="saveAs",t.setting="setting",t.importStep="importStep",t.importEditorLayout="importEditorLayout",t.viewLua="viewLua",t.viewJs="viewJs",t.exportLua="exportLua",t.exportJs="exportJs",t.copyLua="copyLua",t.copyJs="copyJs",t.customExport="customExport",t.exportJson="exportJson",t.exportDocument="exportDocument",t.exportKonvaDocument="exportKonvaDocument",t.exportMujocoDocument="exportMujocoDocument",t.exportAssembly3dDocument="exportAssembly3dDocument",t.exportPartBlock3dDocument="exportPartBlock3dDocument",t.exportPart3dDocument="exportPart3dDocument",t.exportParaX="exportParaX",t.exportGltf="exportGltf",t.exportGltfSwapZ="exportGltfSwapZ",t.exportStl="exportStl",t.exportStlSwapZ="exportStlSwapZ",t.exportFbx="exportFbx",t.exportFbxSwapZ="exportFbxSwapZ",t.exportFbxa="exportFbxa",t.exportFbxaSwapZ="exportFbxaSwapZ",t.exportObj="exportObj",t.exportObjSwapZ="exportObjSwapZ",t.exportDocData="exportDocData",t.exportLog="exportLog",t.exportBlocklyPngs="exportBlocklyPngs",t.exportCode3dJs="exportCode3dJs",t.export3mf="export3mf",t.exportStep="exportStep",t.exportIges="exportIges",t.makePreview="makePreview",t.changeLanguage="changeLanguage",t.layout_default="layout_default",t.layout_tall="layout_tall",t.layout_right="layout_right",t.importLayout="importLayout",t.exportLayout="exportLayout",t.resetLayout="resetLayout",t.clearCache="clearCache",t.importAsObject="importAsObject",t.exportBlocklyXml="exportBlocklyXml",t.importSvg="importSvg",t.importDxf="importDxf",t.exportSvg="exportSvg",t.exportDxf="exportDxf",t.copySketchSvg="copySketchSvg",t.viewSketchSvg="viewSketchSvg",t.copySketchWireScript="copySketchWireScript",t.viewSketchWireScript="viewSketchWireScript",t.copySketchExtrudeScript="copySketchExtrudeScript",t.viewSketchExtrudeScript="viewSketchExtrudeScript",t.copySketchRevolveScript="copySketchRevolveScript",t.viewSketchRevolveScript="viewSketchRevolveScript",t.exportSketch3dJs="exportSketch3dJs",t.exportPart3dJs="exportPart3dJs"}(FileOptions||(FileOptions={})),function(t){var e;function o(t){return t.startsWith("http://")?e.http:t.startsWith("https://")?e.https:t.startsWith("file://")?e.file:t.startsWith("file_id://")?e.file_id:e.unknown}!function(t){t.http="http",t.https="https",t.file="file",t.file_id="file_id",t.unknown="unknown"}(e=t.FileProtocolTypes||(t.FileProtocolTypes={})),t.getFileProtocolType=o,t.isWebProtocol=function(t){return t===e.http||t===e.https},t.getFilePath=function(t){if(o(t)==e.file)return t.replace("file://","")},t.getFileId=function(t){if(o(t)==e.file_id)return t.replace("file_id://","")}}(FileProtocol||(FileProtocol={}));var GeomTypes=__webpack_require__(615),ImportTypes,TopoIdTypes;!function(t){t.none="none",t.readAsText="readAsText",t.readAsDataURL="readAsDataURL",t.readAsArrayBuffer="readAsArrayBuffer",t.readAsBinaryString="readAsBinaryString"}(ImportTypes||(ImportTypes={})),function(t){t.feature="feature",t.body="body",t.face="face",t.edge="edge",t.part_face="part_face",t.part_edge="part_edge"}(TopoIdTypes||(TopoIdTypes={}));var LogTypes=__webpack_require__(995),MeshTypes=__webpack_require__(1400),PlatformTypes,ProjectTypes;!function(t){t.web="web",t.playground="playground",t.electron="electron",t.cloud="cloud",t.vscode="vscode",t.custom_web="custom_web"}(PlatformTypes||(PlatformTypes={})),function(t){t.none="none",t.unknown="unknown",t.collection="collection",t.part="part",t.part_old="part_old",t.assistant="assistant",t.blockcad="blockcad",t.codecad="codecad",t.classicad="classicad",t.classic_codecad="classic_codecad",t.design="design",t.sketch="sketch",t.draft="draft",t.assembly="assembly",t.studio="studio",t.creator="creator",t.doc_text="doc_text",t.part3d="part3d",t.block3d="block3d",t.code3d="code3d",t.parapoly3d="parapoly3d",t.sketch3d="sketch3d",t.assembly3d="assembly3d"}(ProjectTypes||(ProjectTypes={}));var SplineTypes=__webpack_require__(2928),Code3dModuleExecutor=function(){function t(t){this.cache=new Map,this.resolveStack=[],this.fileProvider=t}return t.prototype.execute=function(t,e){var o=this,n=t+"|"+JSON.stringify(e||{});if(this.cache.has(n))return this.cache.get(n);if(this.resolveStack.indexOf(t)>=0){var r=this.resolveStack.concat(t).join(" → ");throw new Error("Circular dependency detected: "+r)}this.resolveStack.push(t);try{var i=this.fileProvider.readFile(t);if(!i)throw new Error("Module not found: "+t);var s=new Function("use","PartBlock3dDocument","\n ".concat(i,"\n return main;\n "))(function(e,n){var r=o.fileProvider.resolveRelativePath(t,e);return o.execute(r,n)},globalThis.PartBlock3dDocument||self.PartBlock3dDocument)(e);return this.cache.set(n,s),s}finally{this.resolveStack.pop()}},t.prototype.clearCache=function(){this.cache.clear()},t}(),Code3dModuleResolver=function(){function t(t){this.fileProvider=t,this.executor=new Code3dModuleExecutor(t)}return t.prototype.run=function(t,e){return this.executor.clearCache(),this.executor.execute(t,e)},t.prototype.getFileProvider=function(){return this.fileProvider},t}(),MemoryFileProvider=function(){function t(t){for(var e in this.files=new Map,t){var o=this.normalizePath(e);this.files.set(o,t[e])}}return t.prototype.readFile=function(t){var e=this.normalizePath(t);return this.files.get(e)||""},t.prototype.resolveRelativePath=function(t,e){if(e.startsWith("./")||e.startsWith("../")){var o=this.getDirectory(t),n=this.joinPath(o,e);return this.normalizePath(n)}return this.normalizePath(e)},t.prototype.listFiles=function(){return Array.from(this.files.keys())},t.prototype.getDirectory=function(t){var e=t.replace(/\\/g,"/").split("/");return e.pop(),e.join("/")},t.prototype.joinPath=function(t,e){for(var o=t.split("/").filter(function(t){return""!==t}),n=0,r=e.split("/");n<r.length;n++){var i=r[n];"."!==i&&""!==i&&(".."===i?o.pop():o.push(i))}return"./"+o.join("/")},t.prototype.normalizePath=function(t){(t=t.replace(/\\/g,"/")).startsWith("./")||t.startsWith("../")||(t="./"+t);for(var e=[],o=0,n=t.split("/");o<n.length;o++){var r=n[o];"."===r?0===e.length&&e.push("."):".."===r?e.length>1&&e.pop():e.push(r)}return e.join("/")},t}(),Code3dStaticAnalyzer=function(){function t(){}return t.extractDependencies=function(t){for(var e,o=[],n=/use\s*\(\s*["']([^"']+)["']/g;null!==(e=n.exec(t));){var r=e[1];o.indexOf(r)<0&&o.push(r)}return o},t.buildDependencyGraph=function(e,o,n){for(var r=new Map,i=[o],s=new Set;i.length>0;){var a=i.shift();if(!s.has(a)){s.add(a);var c=e[a];if(!c)throw new Error("File not found: "+a);for(var u=[],_=0,p=t.extractDependencies(c);_<p.length;_++){var l=n(a,p[_]);u.push(l),s.has(l)||i.push(l)}r.set(a,u)}}return r},t.topologicalSort=function(t){var e=[],o=new Set,n=new Set,r=function(i){if(!o.has(i)){if(n.has(i))throw new Error("Circular dependency detected involving: "+i);n.add(i);for(var s=0,a=t.get(i)||[];s<a.length;s++){var c=a[s];r(c)}n.delete(i),o.add(i),e.push(i)}},i=[];t.forEach(function(t,e){i.push(e)});for(var s=0,a=i;s<a.length;s++){var c=a[s];r(c)}return e},t}(),Code3dBundler=function(){function t(t,e){this.config=t,this.files=e}return t.prototype.resolvePath=function(t,e){if(e.startsWith("./")||e.startsWith("../")){for(var o=this.getDirectory(t).split("/").filter(function(t){return""!==t&&"."!==t}),n=0,r=e.split("/");n<r.length;n++){var i=r[n];"."!==i&&""!==i&&(".."===i?o.pop():o.push(i))}return"./"+o.join("/")}return e},t.prototype.getDirectory=function(t){var e=t.replace(/\\/g,"/").split("/");return e.pop(),e.join("/")},t.prototype.bundle=function(){var t=this,e="./"+this.config.main,o={};for(var n in this.files){var r=n.replace(/\\/g,"/");r.startsWith("./")||(r="./"+r),o[r]=this.files[n]}var i=Code3dStaticAnalyzer.buildDependencyGraph(o,e,function(e,o){return t.resolvePath(e,o)}),s=Code3dStaticAnalyzer.topologicalSort(i);return this.generateOutput(s,o,e)},t.prototype.generateOutput=function(e,o,n){var r=this,i=[];i.push("let main = function() {"),i.push(" const __modules = {};"),i.push(" const __cache = {};"),i.push("");for(var s=0,a=e;s<a.length;s++){var c=a[s];if(c!==n){var u=o[c],_=t.rewriteUsePaths(u,c,function(t,e){return r.resolvePath(t,e)}),p=this.extractFunctionBody(_);i.push(' __modules["'.concat(c,'"] = function(params) {')),i.push(" ".concat(p)),i.push(" };"),i.push("")}}i.push(" function use(path, params) {"),i.push(' let key = path + "|" + JSON.stringify(params || {});'),i.push(" if (__cache[key]) return __cache[key];"),i.push(' if (!__modules[path]) throw new Error("Module not found: " + path);'),i.push(" __cache[key] = __modules[path](params);"),i.push(" return __cache[key];"),i.push(" }"),i.push("");var l=o[n],h=t.rewriteUsePaths(l,n,function(t,e){return r.resolvePath(t,e)}),d=this.extractFunctionBody(h);return i.push(" // --- entry ---"),i.push(" ".concat(d)),i.push("}"),i.join("\n")},t.prototype.extractFunctionBody=function(t){var e=t.match(/let\s+main\s*=\s*function\s*\([^)]*\)\s*\{/);if(!e)return t;for(var o=e.index+e[0].length,n=1,r=o,i=o;i<t.length;i++)if("{"===t[i])n++;else if("}"===t[i]&&0===--n){r=i;break}return t.substring(o,r).trim()},t.rewriteUsePaths=function(t,e,o){return t.replace(/use\s*\(\s*["']([^"']+)["']/g,function(t,n){var r=o(e,n);return'use("'.concat(r,'"')})},t}(),code3dProjectBuilder_awaiter=function(t,e,o,n){return new(o||(o=Promise))(function(r,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})},code3dProjectBuilder_generator=function(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{o=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};function extractDependencies(t){for(var e=[],o=0,n=t.split("\n");o<n.length;o++){var r=n[o];if(!r.trim().startsWith("//"))for(var i=/use\s*\(\s*["']([^"']+)["']/g,s=void 0;null!==(s=i.exec(r));)e.indexOf(s[1])<0&&e.push(s[1])}return e}function isUrl(t){return t.startsWith("http://")||t.startsWith("https://")}function isAbsolutePath(t){return!!/^[a-zA-Z]:[/\\]/.test(t)||!!t.startsWith("/")}function resolvePath(t,e){if(isUrl(e))return e;if(isAbsolutePath(e))return e.replace(/\\/g,"/");if(e.startsWith("./")||e.startsWith("../")){var o=t.replace(/\\/g,"/").split("/");o.pop();for(var n=0,r=e.split("/");n<r.length;n++){var i=r[n];"."!==i&&""!==i&&(".."===i?o.pop():o.push(i))}return"./"+o.filter(function(t){return""!==t&&"."!==t}).join("/")}return e}function fetchUrl(t){return code3dProjectBuilder_awaiter(this,void 0,void 0,function(){var e;return code3dProjectBuilder_generator(this,function(o){switch(o.label){case 0:return[4,fetch(t)];case 1:if(!(e=o.sent()).ok)throw new Error("HTTP ".concat(e.status," for ").concat(t));return[2,e.text()]}})})}function buildDependencyGraph(t,e,o,n){return code3dProjectBuilder_awaiter(this,void 0,void 0,function(){var r,i,s,a,c,u,_,p,l,h,d,f;return code3dProjectBuilder_generator(this,function(y){switch(y.label){case 0:r=new Map,i=[e],s=new Set,y.label=1;case 1:return i.length>0?(a=i.shift(),s.has(a)?[3,1]:(s.add(a),t[a]||!isUrl(a)?[3,3]:(null==o||o("下载远程文件: ".concat(a)),[4,fetchUrl(a)]))):[3,6];case 2:65279===(c=y.sent()).charCodeAt(0)&&(c=c.slice(1)),t[a]=c,y.label=3;case 3:return t[a]||!n?[3,5]:(null==o||o("加载文件: ".concat(a)),[4,n(a)]);case 4:(c=y.sent())&&(t[a]=65279===c.charCodeAt(0)?c.slice(1):c),y.label=5;case 5:if(!t[a]&&isAbsolutePath(a))throw new Error("不支持绝对路径: ".concat(a));if(!(u=t[a]))throw new Error("文件未找到: "+a);if(a.endsWith(".part3d")||a.endsWith(".block3d")||a.endsWith(".part3d.js")||a.endsWith(".sketch3d.js"))return r.set(a,[]),[3,1];for(_=extractDependencies(u),p=[],l=0,h=_;l<h.length;l++)d=h[l],f=resolvePath(a,d),p.push(f),s.has(f)||i.push(f);return r.set(a,p),[3,1];case 6:return[2,r]}})})}function topologicalSort(t){var e=[],o=new Set,n=new Set;function r(i){if(!o.has(i)){if(n.has(i))throw new Error("检测到循环依赖: "+i);n.add(i);for(var s=0,a=t.get(i)||[];s<a.length;s++){r(a[s])}n.delete(i),o.add(i),e.push(i)}}for(var i=0,s=Array.from(t.keys());i<s.length;i++){r(s[i])}return e}function rewriteUsePaths(t,e){return t.replace(/use\s*\(\s*["']([^"']+)["']/g,function(t,o){var n=resolvePath(e,o);return"use(".concat(JSON.stringify(n))})}function extractFunctionBody(t){var e=t.match(/let\s+main\s*=\s*function\s*\([^)]*\)\s*\{/);if(!e)return t;for(var o=e.index+e[0].length,n=1,r=o,i=o;i<t.length;i++)if("{"===t[i])n++;else if("}"===t[i]&&0===--n){r=i;break}return t.substring(o,r).trim()}function checkSyntax(t,e){var o=[];if(!/let\s+main\s*=\s*function/.test(t))return o.push({line:1,column:1,message:"缺少 main 函数定义 (需要 'let main = function(...) { ... }')"}),o;var n=extractFunctionBody(t);/return\s+/.test(n)||o.push({line:null,column:null,message:"main 函数没有 return 语句"});try{var r="(function(params, use, PartBlock3dDocument) { ".concat(n," })");new Function(r)}catch(t){var i=t.message;o.push({line:null,column:null,message:i})}return o}function generateBundle(t,e,o){var n="./"+t.main,r=[];for(var i in r.push("let main = function() {"),r.push(" const __modules = {};"),r.push(" const __cache = {};"),r.push(""),e)if(i.endsWith(".part3d")){var s=JSON.stringify(e[i]),a=i.replace(/\\/g,"/");r.push(" __modules[".concat(JSON.stringify(a),"] = function(params) {")),r.push(" let recompile = params?.recompile !== undefined ? params.recompile : false;"),r.push(" let color = params?.color;"),r.push(" return PartBlock3dDocument.create_doc_from_part3d(".concat(s,", recompile, color);")),r.push(" };"),r.push("")}for(var i in e)if(i.endsWith(".block3d")){s=JSON.stringify(e[i]),a=i.replace(/\\/g,"/");r.push(" __modules[".concat(JSON.stringify(a),"] = function(params) {")),r.push(" return PartBlock3dDocument.create_doc_from_block3d(".concat(s,");")),r.push(" };"),r.push("")}for(var c=0,u=o;c<u.length;c++){var _=u[c];if(_!==n&&(!_.endsWith(".part3d")&&!_.endsWith(".block3d"))){var p=extractFunctionBody(rewriteUsePaths(e[_],_)).replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${");r.push(" __modules[".concat(JSON.stringify(_),'] = new Function("params", "use", "PartBlock3dDocument", `').concat(p,"`);")),r.push("")}}r.push(" function use(path, params) {"),r.push(' let key = path + "|" + JSON.stringify(params || {});'),r.push(" if (__cache[key]) return __cache[key];"),r.push(' if (!__modules[path]) throw new Error("Module not found: " + path);'),r.push(" if (typeof postMessage === 'function') {"),r.push(" let label = (path.endsWith('.part3d') || path.endsWith('.block3d')) ? '加载资源: ' : '编译模块: ';"),r.push(" try { postMessage({ cmd: 'log', log_type: 'debug', message: label + path }); } catch(e) {}"),r.push(" }"),r.push(" try {"),r.push(" __cache[key] = __modules[path](params, use, PartBlock3dDocument);"),r.push(" } catch(e) {"),r.push(" let lineInfo = '';"),r.push(" var stack = e.stack || '';"),r.push(" var m = stack.match(/<anonymous>:(\\\\d+):(\\\\d+)/);"),r.push(" if (m) lineInfo = ' (行 ' + (parseInt(m[1]) - 1) + ', 列 ' + m[2] + ')';"),r.push(" throw new Error('[' + path + lineInfo + '] ' + e.message);"),r.push(" }"),r.push(" return __cache[key];"),r.push(" }"),r.push("");var l=extractFunctionBody(rewriteUsePaths(e[n],n));return r.push(" // --- entry ---"),r.push(" ".concat(l)),r.push("}"),r.join("\n")}function computeOutputFilename(t,e){var o,n=(null===(o=t.build)||void 0===o?void 0:o.filename)||t.name;return(n=n.replace(/\.code3d\.js\.bin$/,"").replace(/\.code3d\.js$/,"").replace(/\.code3d$/,""))+(e?".code3d.js.bin":".code3d.js")}function buildCode3dProject(t,e,o,n){return code3dProjectBuilder_awaiter(this,void 0,void 0,function(){var r,i,s,a,c,u,_,p,l,h,d,f,y,m,g,v,w,b,C,x,P,S,k,E,O,N,j,F,T,M,A,B,D,I,R;return code3dProjectBuilder_generator(this,function(z){switch(z.label){case 0:return r="./"+e.main,i=[],t[r]||!n?[3,2]:(null==o||o("加载主文件: ".concat(r)),[4,n(r)]);case 1:(s=z.sent())&&(t[r]=65279===s.charCodeAt(0)?s.slice(1):s),z.label=2;case 2:return t[r]?(null==o||o("开始编译项目: ".concat(e.name)),null==o||o("分析依赖..."),[4,buildDependencyGraph(t,r,o,n)]):[2,{output:"",binOutput:null,result:{success:!1,errors:["主文件不存在: ".concat(e.main)]}}];case 3:for(a=z.sent(),c=topologicalSort(a),null==o||o("依赖分析完成, ".concat(c.length," 个模块")),null==o||o("语法检查..."),u=0,_=c;u<_.length;u++)if((p=_[u]).endsWith(".code3d.js")||p.endsWith(".part3d.js")||p.endsWith(".sketch3d.js"))for(l=checkSyntax(t[p],p),h=0,d=l;h<d.length;h++)f=d[h],y=f.line?" (行 ".concat(f.line,")"):"",i.push("".concat(p).concat(y,": ").concat(f.message));if(i.length>0)return[2,{output:"",binOutput:null,result:{success:!1,errors:i}}];if(null==o||o("语法检查通过"),null==o||o("生成 bundle..."),m=generateBundle(e,t,c),g=(new TextEncoder).encode(m).length,v=!1!==(null===(I=e.build)||void 0===I?void 0:I.bin),w=null,!v)return[3,7];null==o||o("压缩生成 .bin..."),b=(new TextEncoder).encode(m),C=new CompressionStream("gzip"),(x=C.writable.getWriter()).write(b),x.close(),P=C.readable.getReader(),S=[],z.label=4;case 4:return[4,P.read()];case 5:return k=z.sent(),E=k.done,O=k.value,E?[3,6]:(S.push(O),[3,4]);case 6:for(N=S.reduce(function(t,e){return t+e.length},0),w=new Uint8Array(N),j=0,F=0,T=S;F<T.length;F++)M=T[F],w.set(M,j),j+=M.length;z.label=7;case 7:return A=(null===(R=e.build)||void 0===R?void 0:R.output)||"dist",B=computeOutputFilename(e,v),D=A+"/"+B,null==o||o("编译完成"),[2,{output:m,binOutput:w,result:{success:!0,outputPath:D,isBin:v,jsSize:g,binSize:null==w?void 0:w.length}}]}})})}var Part3dCodeExporter=function(){function t(){}return t.export=function(e,o){if(void 0===o&&(o="#ffffff"),!e)return"let main = function() {\n return new PartBlock3dDocument();\n};";var n=t.export_feature_summary(e),r=t.export_executable_calls(e,o),i=[];i.push("let main = function() {"),i.push(" let block3d_doc = new PartBlock3dDocument();"),i.push(""),i.push(" // Helpers for operation nodes that target older features."),i.push(" let __id_to_name = {};"),i.push(" let __saved_shapes = {}; // shapes saved before Boolean deletes nodes"),i.push(" let __record_name = function(feature_id) {"),i.push(" if (!feature_id) return;"),i.push(" try {"),i.push(" let n = block3d_doc?.selected_node?.getName?.();"),i.push(" if (n) __id_to_name[feature_id] = n;"),i.push(" } catch (e) {}"),i.push(" };"),i.push(" let __select_feature = function(feature_id) {"),i.push(" let name = __id_to_name[feature_id];"),i.push(" if (!name) return false;"),i.push(" let node = block3d_doc.get_root_node()?.getChildByName?.(name, true);"),i.push(" if (!node) return false;"),i.push(" block3d_doc.selected_node = node;"),i.push(" return true;"),i.push(" };"),i.push(""),i.push(" // Feature summary (readable preview)");for(var s=0,a=n;s<a.length;s++){var c=a[s];i.push(" ".concat(c))}i.push(""),i.push(" // Executable export");for(var u=0,_=r;u<_.length;u++){c=_[u];i.push(" ".concat(c))}return i.push(""),i.push(" return block3d_doc;"),i.push("};"),i.join("\n")},t.export_feature_summary=function(e){var o=[],n=e.getChildrenLength();o.push("// Feature count: ".concat(n));for(var r=0;r<n;r++){var i=e.getChildByIndex(r);i&&o.push(t.summarize_feature_node(r,i))}return o},t.export_executable_calls=function(e,o){var n,r,i,s,a,c,u,_,p,l,h,d,f,y,m,g,v,w,b,C,x,P,S,k,E,O,N,j,F,T,M,A,B,D,I,R,z,L,U,W,G,Z,q,V,J,K,H,X,Y,Q,$,tt,et,ot,nt,rt,it,st,at,ct,ut,_t,pt,lt,ht,dt,ft,yt,mt,gt,vt,wt,bt,Ct,xt,Pt,St,kt,Et,Ot,Nt,jt,Ft,Tt,Mt,At,Bt,Dt,It,Rt,zt,Lt,Ut,Wt,Gt,Zt,qt,Vt,Jt,Kt,Ht,Xt,Yt,Qt,$t,te,ee,oe,ne,re,ie,se,ae,ce;void 0===o&&(o="#ffffff");for(var ue=[],_e=e.getChildrenLength(),pe=new Map,le=new Set,he=0;he<_e;he++){var de=e.getChildByIndex(he);if(de){var fe=de.getId?de.getId():"",ye=de.getClassName?de.getClassName():"",me=de.get_feature_component?de.get_feature_component():null,ge=de.get_op?de.get_op():"union",ve=de.get_color?de.get_color():o;if(ve&&!ve.startsWith("#")&&(ve="#"+ve),ye.indexOf("FeatureNodeSetBox")>=0)ue.push("block3d_doc.box(".concat(JSON.stringify(ge),", ").concat(t.n(null===(n=null==me?void 0:me.get_x_length)||void 0===n?void 0:n.call(me)),", ").concat(t.n(null===(r=null==me?void 0:me.get_y_length)||void 0===r?void 0:r.call(me)),", ").concat(t.n(null===(i=null==me?void 0:me.get_z_length)||void 0===i?void 0:i.call(me)),", ").concat(JSON.stringify(ve),");")),t.append_transform_lines(ue,de),ue.push("__record_name(".concat(JSON.stringify(fe),");"));else if(ye.indexOf("FeatureNodeSetCylinder")>=0)ue.push("block3d_doc.cylinder(".concat(JSON.stringify(ge),", ").concat(t.n(null===(s=null==me?void 0:me.get_radius)||void 0===s?void 0:s.call(me)),", ").concat(t.n(null===(a=null==me?void 0:me.get_height)||void 0===a?void 0:a.call(me)),", ").concat(JSON.stringify(ve),");")),t.append_transform_lines(ue,de),ue.push("__record_name(".concat(JSON.stringify(fe),");"));else if(ye.indexOf("FeatureNodeSetSphere")>=0)ue.push("block3d_doc.sphere(".concat(JSON.stringify(ge),", ").concat(t.n(null===(c=null==me?void 0:me.get_radius)||void 0===c?void 0:c.call(me)),", ").concat(JSON.stringify(ve),");")),t.append_transform_lines(ue,de),ue.push("__record_name(".concat(JSON.stringify(fe),");"));else if(ye.indexOf("FeatureNodeSetCone")>=0)ue.push("block3d_doc.cone(".concat(JSON.stringify(ge),", ").concat(t.n(null===(u=null==me?void 0:me.get_top_radius)||void 0===u?void 0:u.call(me)),", ").concat(t.n(null===(_=null==me?void 0:me.get_bottom_radius)||void 0===_?void 0:_.call(me)),", ").concat(t.n(null===(p=null==me?void 0:me.get_height)||void 0===p?void 0:p.call(me)),", ").concat(JSON.stringify(ve),");")),t.append_transform_lines(ue,de),ue.push("__record_name(".concat(JSON.stringify(fe),");"));else if(ye.indexOf("FeatureNodeSetTorus")>=0)ue.push("block3d_doc.torus(".concat(JSON.stringify(ge),", ").concat(t.n(null===(l=null==me?void 0:me.get_radius1)||void 0===l?void 0:l.call(me)),", ").concat(t.n(null===(h=null==me?void 0:me.get_radius2)||void 0===h?void 0:h.call(me)),", ").concat(JSON.stringify(ve),");")),t.append_transform_lines(ue,de),ue.push("__record_name(".concat(JSON.stringify(fe),");"));else if(ye.indexOf("FeatureNodeSetPrism")>=0)ue.push("block3d_doc.prism(".concat(JSON.stringify(ge),", ").concat(t.n(null===(d=null==me?void 0:me.get_edges)||void 0===d?void 0:d.call(me)),", ").concat(t.n(null===(f=null==me?void 0:me.get_radius)||void 0===f?void 0:f.call(me)),", ").concat(t.n(null===(y=null==me?void 0:me.get_height)||void 0===y?void 0:y.call(me)),", ").concat(JSON.stringify(ve),");")),t.append_transform_lines(ue,de),ue.push("__record_name(".concat(JSON.stringify(fe),");"));else if(ye.indexOf("FeatureNodeSetEllipsoid")>=0)ue.push("block3d_doc.ellipsoid(".concat(JSON.stringify(ge),", ").concat(t.n(null===(m=null==me?void 0:me.get_radius_x)||void 0===m?void 0:m.call(me)),", ").concat(t.n(null===(g=null==me?void 0:me.get_radius_y)||void 0===g?void 0:g.call(me)),", ").concat(t.n(null===(v=null==me?void 0:me.get_radius_z)||void 0===v?void 0:v.call(me)),", ").concat(JSON.stringify(ve),");")),t.append_transform_lines(ue,de),ue.push("__record_name(".concat(JSON.stringify(fe),");"));else if(ye.indexOf("FeatureNodeSetWedge")>=0)ue.push("block3d_doc.wedge(".concat(JSON.stringify(ge),", ").concat(t.n(null===(w=null==me?void 0:me.get_x_length)||void 0===w?void 0:w.call(me)),", ").concat(t.n(null===(b=null==me?void 0:me.get_y_length)||void 0===b?void 0:b.call(me)),", ").concat(t.n(null===(C=null==me?void 0:me.get_z_length)||void 0===C?void 0:C.call(me)),", ").concat(JSON.stringify(ve),");")),t.append_transform_lines(ue,de),ue.push("__record_name(".concat(JSON.stringify(fe),");"));else if(ye.indexOf("FeatureNodeSetTrapezoid")>=0)ue.push("block3d_doc.trapezoid(".concat(JSON.stringify(ge),", ").concat(t.n(null===(x=null==me?void 0:me.get_top_w)||void 0===x?void 0:x.call(me)),", ").concat(t.n(null===(P=null==me?void 0:me.get_bottom_w)||void 0===P?void 0:P.call(me)),", ").concat(t.n(null===(S=null==me?void 0:me.get_hight)||void 0===S?void 0:S.call(me)),", ").concat(t.n(null===(k=null==me?void 0:me.get_depth)||void 0===k?void 0:k.call(me)),", ").concat(JSON.stringify(ve),");")),t.append_transform_lines(ue,de),ue.push("__record_name(".concat(JSON.stringify(fe),");"));else if(ye.indexOf("FeatureNodeSetStep")>=0){var we=null===(E=null==me?void 0:me.get_content)||void 0===E?void 0:E.call(me),be=t.step_payload_base64(we);ue.push("block3d_doc.import_step_shape_by_string(".concat(JSON.stringify(ge),", ").concat(JSON.stringify(be),", true, ").concat(JSON.stringify(ve),");")),ue.push("__record_name(".concat(JSON.stringify(fe),");"))}else if(ye.indexOf("SkContainerNode")>=0){pe.set(fe,de),ue.push.apply(ue,t.export_sketch_lines(de)),ue.push("__record_name(".concat(JSON.stringify(fe),");"));var Ce=!!de.get_archived&&de.get_archived(),xe=de.get_op_feature_node_id?de.get_op_feature_node_id():null,Pe=!de.get_visible||de.get_visible();(Ce||xe)&&ue.push("block3d_doc.selected_node.set_archived(true);"),Pe||ue.push("block3d_doc.selected_node.set_visible(false);")}else if(ye.indexOf("FeatureNodeExtrude")>=0){var Se=(null===(j=null==(mo=null===(N=null===(O=null==me?void 0:me.get_feature_topo_items)||void 0===O?void 0:O.call(me))||void 0===N?void 0:N[0])?void 0:mo.get_feature_id)||void 0===j?void 0:j.call(mo))||"",ke=null!==(T=null===(F=null==mo?void 0:mo.get_face_index)||void 0===F?void 0:F.call(mo))&&void 0!==T?T:-1,Ee=null===(M=null==me?void 0:me.get_value)||void 0===M?void 0:M.call(me),Oe=null===(A=null==me?void 0:me.get_direction)||void 0===A?void 0:A.call(me),Ne=null===(B=null==me?void 0:me.get_solid)||void 0===B?void 0:B.call(me),je=null===(D=null==me?void 0:me.get_keep_original)||void 0===D?void 0:D.call(me);if(pe.has(Se))Se&&le.has(Se)&&pe.has(Se)&&(ue.push("// Re-emit consumed sketch for feature [".concat(he,"]")),ue.push.apply(ue,t.export_sketch_lines(pe.get(Se))),ue.push("__record_name(".concat(JSON.stringify(Se),");"))),Se&&le.add(Se),ue.push("(function() {"),ue.push(" let target_name = __id_to_name[".concat(JSON.stringify(Se),"];")),ue.push(' if (!target_name) { console.warn("[part3d.js #'.concat(he," Extrude ").concat(fe.substring(0,8),"] target_name not found for sketch ").concat(Se.substring(0,8),'"); return; }')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let node = root.getChildByName(target_name, true);"),ue.push(' if (!node || !node.to_wires_shape) { console.warn("[part3d.js #'.concat(he," Extrude ").concat(fe.substring(0,8),'] sketch node not found or no to_wires_shape"); return; }')),ue.push(" node.set_archived(false);"),ue.push(" node.set_op_feature_node_id(null);"),ue.push(" let wires_shape = node.to_wires_shape();"),ue.push(' if (!wires_shape || wires_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Extrude ").concat(fe.substring(0,8),'] to_wires_shape failed"); return; }')),ue.push(" let extrude_shape = parapoly_engine.ParaPolyShapeMaker.extrude_shape(wires_shape, ".concat(t.n(Ee),", 0, 0, 1, ").concat(Ne?"true":"false",");")),ue.push(' if (!extrude_shape || extrude_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Extrude ").concat(fe.substring(0,8),'] extrude_shape failed"); return; }')),ue.push(" if (node.constructor && node.constructor.transform_native_shape) {"),ue.push(" extrude_shape = node.constructor.transform_native_shape(extrude_shape, node);"),ue.push(" }"),je||(ue.push(" node.set_archived(true);"),ue.push(" node.set_op_feature_node_id(".concat(JSON.stringify(fe),");"))),ue.push(" let result_node = block3d_doc.push_node(".concat(JSON.stringify(ge),", ").concat(JSON.stringify("extrude_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result_node.set_topo_shape(extrude_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push("})();");else{var Fe=t.n(null!==(I=null==Oe?void 0:Oe.x)&&void 0!==I?I:0),Te=t.n(null!==(R=null==Oe?void 0:Oe.y)&&void 0!==R?R:0),Me=t.n(null!==(z=null==Oe?void 0:Oe.z)&&void 0!==z?z:1);ue.push("(function() {"),ue.push(" let target_name = __id_to_name[".concat(JSON.stringify(Se),"];")),ue.push(' if (!target_name) { console.warn("[part3d.js #'.concat(he," Extrude ").concat(fe.substring(0,8),"] target_name not found for face extrusion ").concat(Se.substring(0,8),'"); return; }')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let node = root.getChildByName(target_name, true);"),ue.push(" let topo_shape;"),ue.push(" if (node && node.get_topo_shape) {"),ue.push(" topo_shape = node.get_topo_shape();"),ue.push(" } else if (__saved_shapes[target_name]) {"),ue.push(" topo_shape = __saved_shapes[target_name].shape;"),ue.push(' } else { console.warn("[part3d.js #'.concat(he," Extrude ").concat(fe.substring(0,8),'] target node not found and no saved shape"); return; }')),ue.push(' if (!topo_shape || topo_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Extrude ").concat(fe.substring(0,8),'] target shape is null"); return; }')),ue.push(" if (node) { node.set_archived(false); node.set_op_feature_node_id(null); }"),ue.push(" let extrude_shape = parapoly_engine.ParaPolyShapeMaker.extrude(topo_shape, ".concat(t.n(Ee),", ").concat(t.n(ke),", ").concat(Fe,", ").concat(Te,", ").concat(Me,", ").concat(Ne?"true":"false",", true);")),ue.push(' if (!extrude_shape || extrude_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Extrude ").concat(fe.substring(0,8),'] face extrude failed"); return; }')),je||ue.push(" if (node) { node.set_archived(true); node.set_op_feature_node_id(".concat(JSON.stringify(fe),"); }")),ue.push(" let result_node = block3d_doc.push_node(".concat(JSON.stringify(ge),", ").concat(JSON.stringify("extrude_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result_node.set_topo_shape(extrude_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push("})();")}}else if(ye.indexOf("FeatureNodeRevolve")>=0){Se=(null===(W=null==(mo=null===(U=null===(L=null==me?void 0:me.get_feature_topo_items)||void 0===L?void 0:L.call(me))||void 0===U?void 0:U[0])?void 0:mo.get_feature_id)||void 0===W?void 0:W.call(mo))||"";var Ae=null===(G=null==me?void 0:me.get_ax2)||void 0===G?void 0:G.call(me),Be=(null===(Z=null==Ae?void 0:Ae.point)||void 0===Z?void 0:Z.toArray)?Ae.point.toArray():[0,0,0],De=(null===(q=null==Ae?void 0:Ae.mainDir)||void 0===q?void 0:q.toArray)?Ae.mainDir.toArray():[0,0,1],Ie=(Ne=null===(V=null==me?void 0:me.get_solid)||void 0===V?void 0:V.call(me),null===(J=null==me?void 0:me.get_value)||void 0===J?void 0:J.call(me));Se&&le.has(Se)&&pe.has(Se)&&(ue.push("// Re-emit consumed sketch for feature [".concat(he,"]")),ue.push.apply(ue,t.export_sketch_lines(pe.get(Se))),ue.push("__record_name(".concat(JSON.stringify(Se),");"))),Se&&le.add(Se),ue.push("(function() {"),ue.push(" let target_name = __id_to_name[".concat(JSON.stringify(Se),"];")),ue.push(' if (!target_name) { console.warn("[part3d.js #'.concat(he," Revolve ").concat(fe.substring(0,8),"] target_name not found for sketch ").concat(Se.substring(0,8),'"); return; }')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let node = root.getChildByName(target_name, true);"),ue.push(' if (!node || !node.to_wires_shape) { console.warn("[part3d.js #'.concat(he," Revolve ").concat(fe.substring(0,8),'] sketch node not found or no to_wires_shape"); return; }')),ue.push(" let wires_shape = node.to_wires_shape();"),ue.push(' if (!wires_shape || wires_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Revolve ").concat(fe.substring(0,8),'] to_wires_shape failed"); return; }')),ue.push(" if (node.constructor && node.constructor.transform_native_shape) {"),ue.push(" wires_shape = node.constructor.transform_native_shape(wires_shape, node);"),ue.push(" }"),ue.push(" let revolve_shape = parapoly_engine.ParaPolyShapeMaker.revolve_shape(wires_shape, ".concat(t.n(Ie),", ").concat(t.n(Be[0]),", ").concat(t.n(Be[1]),", ").concat(t.n(Be[2]),", ").concat(t.n(De[0]),", ").concat(t.n(De[1]),", ").concat(t.n(De[2]),", ").concat(Ne?"true":"false",");")),ue.push(' if (!revolve_shape || revolve_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Revolve ").concat(fe.substring(0,8),'] revolve_shape failed"); return; }')),ue.push(" let result_node = block3d_doc.push_node(".concat(JSON.stringify(ge),", ").concat(JSON.stringify("revolve_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result_node.set_topo_shape(revolve_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push("})();")}else if(ye.indexOf("FeatureNodeSweep")>=0){var Re=null===(H=null===(K=null==me?void 0:me.get_profile_feature_topo_items)||void 0===K?void 0:K.call(me))||void 0===H?void 0:H[0],ze=null===(Y=null===(X=null==me?void 0:me.get_path_feature_topo_items)||void 0===X?void 0:X.call(me))||void 0===Y?void 0:Y[0],Le=(null===(Q=null==Re?void 0:Re.get_feature_id)||void 0===Q?void 0:Q.call(Re))||"",Ue=(null===($=null==ze?void 0:ze.get_feature_id)||void 0===$?void 0:$.call(ze))||"";Ne=null===(tt=null==me?void 0:me.get_solid)||void 0===tt?void 0:tt.call(me);ue.push("(function() {"),ue.push(" let profile_name = __id_to_name[".concat(JSON.stringify(Le),"];")),ue.push(" let path_name = __id_to_name[".concat(JSON.stringify(Ue),"];")),ue.push(' if (!profile_name || !path_name) { console.warn("[part3d.js #'.concat(he," Sweep ").concat(fe.substring(0,8),"] profile/path name missing: profile=").concat(Le.substring(0,8),", path=").concat(Ue.substring(0,8),'"); return; }')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let profile_node = root.getChildByName(profile_name, true);"),ue.push(" let path_node = root.getChildByName(path_name, true);"),ue.push(' if (!profile_node || !profile_node.to_wires_shape) { console.warn("[part3d.js #'.concat(he," Sweep ").concat(fe.substring(0,8),'] profile sketch not found"); return; }')),ue.push(' if (!path_node || !path_node.to_wires_shape) { console.warn("[part3d.js #'.concat(he," Sweep ").concat(fe.substring(0,8),'] path sketch not found"); return; }')),ue.push(" let profile_wires = profile_node.to_wires_shape();"),ue.push(" let path_wires = path_node.to_wires_shape();"),ue.push(' if (!profile_wires || profile_wires.isNull()) { console.warn("[part3d.js #'.concat(he," Sweep ").concat(fe.substring(0,8),'] profile to_wires_shape failed"); return; }')),ue.push(' if (!path_wires || path_wires.isNull()) { console.warn("[part3d.js #'.concat(he," Sweep ").concat(fe.substring(0,8),'] path to_wires_shape failed"); return; }')),ue.push(" if (profile_node.constructor && profile_node.constructor.transform_native_shape) {"),ue.push(" profile_wires = profile_node.constructor.transform_native_shape(profile_wires, profile_node);"),ue.push(" }"),ue.push(" if (path_node.constructor && path_node.constructor.transform_native_shape) {"),ue.push(" path_wires = path_node.constructor.transform_native_shape(path_wires, path_node);"),ue.push(" }"),ue.push(" let sweep_shape = parapoly_engine.ParaPolyShapeMaker.sweep_shape(path_wires, profile_wires, ".concat(Ne?"true":"false",");")),ue.push(' if (!sweep_shape || sweep_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Sweep ").concat(fe.substring(0,8),'] sweep_shape failed"); return; }')),ue.push(" let result_node = block3d_doc.push_node(".concat(JSON.stringify(ge),", ").concat(JSON.stringify("sweep_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result_node.set_topo_shape(sweep_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push("})();")}else if(ye.indexOf("FeatureNodeHelix")>=0){Se=(null===(nt=null==(mo=null===(ot=null===(et=null==me?void 0:me.get_feature_topo_items)||void 0===et?void 0:et.call(me))||void 0===ot?void 0:ot[0])?void 0:mo.get_feature_id)||void 0===nt?void 0:nt.call(mo))||"";var We=null===(rt=null==me?void 0:me.get_axis)||void 0===rt?void 0:rt.call(me),Ge=null===(it=null==me?void 0:me.get_mode)||void 0===it?void 0:it.call(me),Ze=null===(st=null==me?void 0:me.get_pitch)||void 0===st?void 0:st.call(me),qe=null===(at=null==me?void 0:me.get_height)||void 0===at?void 0:at.call(me),Ve=null===(ct=null==me?void 0:me.get_angle)||void 0===ct?void 0:ct.call(me),Je=null===(ut=null==me?void 0:me.get_left_hand)||void 0===ut?void 0:ut.call(me),Ke=null===(_t=null==me?void 0:me.get_reversed)||void 0===_t?void 0:_t.call(me);Ne=null===(pt=null==me?void 0:me.get_solid)||void 0===pt?void 0:pt.call(me);ue.push("(function() {"),ue.push(" let target_name = __id_to_name[".concat(JSON.stringify(Se),"];")),ue.push(' if (!target_name) { console.warn("[part3d.js #'.concat(he," Helix ").concat(fe.substring(0,8),"] target_name not found for sketch ").concat(Se.substring(0,8),'"); return; }')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let node = root.getChildByName(target_name, true);"),ue.push(' if (!node || !node.to_wires_shape) { console.warn("[part3d.js #'.concat(he," Helix ").concat(fe.substring(0,8),'] sketch node not found or no to_wires_shape"); return; }')),ue.push(" node.set_archived(false);"),ue.push(" node.set_op_feature_node_id(null);"),ue.push(" let wires_shape = node.to_wires_shape();"),ue.push(' if (!wires_shape || wires_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Helix ").concat(fe.substring(0,8),'] to_wires_shape failed"); return; }')),ue.push(" let helix_shape = parapoly_engine.ParaPolyShapeMaker.helix_shape(wires_shape, ".concat(t.n(We),", ").concat(t.n(Ge),", ").concat(t.n(Ze),", ").concat(t.n(qe),", ").concat(t.n(Ve),", ").concat(Je?"true":"false",", ").concat(Ke?"true":"false",", ").concat(Ne?"true":"false",");")),ue.push(' if (!helix_shape || helix_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Helix ").concat(fe.substring(0,8),'] helix_shape failed"); return; }')),ue.push(" if (node.constructor && node.constructor.transform_native_shape) {"),ue.push(" helix_shape = node.constructor.transform_native_shape(helix_shape, node);"),ue.push(" }"),ue.push(" let result_node = block3d_doc.push_node(".concat(JSON.stringify(ge),", ").concat(JSON.stringify("helix_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result_node.set_topo_shape(helix_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push("})();")}else if(ye.indexOf("FeatureNodeFillet")>=0){var He=t.extract_edges_and_target(null===(lt=null==me?void 0:me.get_feature_topo_items)||void 0===lt?void 0:lt.call(me));Ie=null===(ht=null==me?void 0:me.get_value)||void 0===ht?void 0:ht.call(me);ue.push("(function() {"),ue.push(" let target_name = __id_to_name[".concat(JSON.stringify(He.target_id),"];")),ue.push(' if (!target_name) { console.warn("[part3d.js #'.concat(he," Fillet ").concat(fe.substring(0,8),"] target_name not found: ").concat((He.target_id||"").substring(0,8),'"); return; }')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let node = root.getChildByName(target_name, true);"),ue.push(" let topo_shape;"),ue.push(" if (node && node.get_topo_shape) {"),ue.push(" topo_shape = node.get_topo_shape();"),ue.push(" } else if (__saved_shapes[target_name]) {"),ue.push(" topo_shape = __saved_shapes[target_name].shape;"),ue.push(' } else { console.warn("[part3d.js #'.concat(he," Fillet ").concat(fe.substring(0,8),'] target not found"); return; }')),ue.push(' if (!topo_shape || topo_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Fillet ").concat(fe.substring(0,8),'] target shape is null"); return; }')),ue.push(" if (node) { node.set_archived(false); node.set_op_feature_node_id(null); }"),ue.push(" let edge_arr = new parapoly_engine.ParaPolyIntArray();");for(var Xe=0,Ye=He.edges;Xe<Ye.length;Xe++){var Qe=Ye[Xe];ue.push(" edge_arr.pushValue(".concat(t.n(Qe),");"))}ue.push(" let result_shape = parapoly_engine.ParaPolyShapeMaker.fillet(topo_shape, ".concat(t.n(Ie),", edge_arr);")),ue.push(' if (!result_shape || result_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Fillet ").concat(fe.substring(0,8),'] fillet failed"); return; }')),ue.push(" if (node) { node.set_archived(true); node.set_op_feature_node_id(".concat(JSON.stringify(fe),"); }")),ue.push(" let result_node = block3d_doc.push_node(".concat(JSON.stringify(ge),", ").concat(JSON.stringify("fillet_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result_node.set_topo_shape(result_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push("})();")}else if(ye.indexOf("FeatureNodeChamfer")>=0){He=t.extract_edges_and_target(null===(dt=null==me?void 0:me.get_feature_topo_items)||void 0===dt?void 0:dt.call(me)),Ie=null===(ft=null==me?void 0:me.get_value)||void 0===ft?void 0:ft.call(me);ue.push("(function() {"),ue.push(" let target_name = __id_to_name[".concat(JSON.stringify(He.target_id),"];")),ue.push(' if (!target_name) { console.warn("[part3d.js #'.concat(he," Chamfer ").concat(fe.substring(0,8),"] target_name not found: ").concat((He.target_id||"").substring(0,8),'"); return; }')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let node = root.getChildByName(target_name, true);"),ue.push(" let topo_shape;"),ue.push(" if (node && node.get_topo_shape) {"),ue.push(" topo_shape = node.get_topo_shape();"),ue.push(" } else if (__saved_shapes[target_name]) {"),ue.push(" topo_shape = __saved_shapes[target_name].shape;"),ue.push(' } else { console.warn("[part3d.js #'.concat(he," Chamfer ").concat(fe.substring(0,8),'] target not found"); return; }')),ue.push(' if (!topo_shape || topo_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Chamfer ").concat(fe.substring(0,8),'] target shape is null"); return; }')),ue.push(" if (node) { node.set_archived(false); node.set_op_feature_node_id(null); }"),ue.push(" let edge_arr = new parapoly_engine.ParaPolyIntArray();");for(var $e=0,to=He.edges;$e<to.length;$e++){Qe=to[$e];ue.push(" edge_arr.pushValue(".concat(t.n(Qe),");"))}ue.push(" let result_shape = parapoly_engine.ParaPolyShapeMaker.chamfer(topo_shape, ".concat(t.n(Ie),", edge_arr);")),ue.push(' if (!result_shape || result_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Chamfer ").concat(fe.substring(0,8),'] chamfer failed"); return; }')),ue.push(" if (node) { node.set_archived(true); node.set_op_feature_node_id(".concat(JSON.stringify(fe),"); }")),ue.push(" let result_node = block3d_doc.push_node(".concat(JSON.stringify(ge),", ").concat(JSON.stringify("chamfer_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result_node.set_topo_shape(result_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push("})();")}else if(ye.indexOf("FeatureNodeShell")>=0){var eo=(null===(gt=null==(mo=null===(mt=null===(yt=null==me?void 0:me.get_feature_topo_items)||void 0===yt?void 0:yt.call(me))||void 0===mt?void 0:mt[0])?void 0:mo.get_feature_id)||void 0===gt?void 0:gt.call(mo))||"",oo=(ke=null!==(wt=null===(vt=null==mo?void 0:mo.get_face_index)||void 0===vt?void 0:vt.call(mo))&&void 0!==wt?wt:0,Ie=null===(bt=null==me?void 0:me.get_value)||void 0===bt?void 0:bt.call(me),null===(Ct=null==me?void 0:me.get_inward)||void 0===Ct?void 0:Ct.call(me));ue.push("(function() {"),ue.push(" let target_name = __id_to_name[".concat(JSON.stringify(eo),"];")),ue.push(' if (!target_name) { console.warn("[part3d.js #'.concat(he," Shell ").concat(fe.substring(0,8),"] target_name not found: ").concat(eo.substring(0,8),'"); return; }')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let node = root.getChildByName(target_name, true);"),ue.push(" let topo_shape;"),ue.push(" if (node && node.get_topo_shape) {"),ue.push(" topo_shape = node.get_topo_shape();"),ue.push(" } else if (__saved_shapes[target_name]) {"),ue.push(" topo_shape = __saved_shapes[target_name].shape;"),ue.push(' } else { console.warn("[part3d.js #'.concat(he," Shell ").concat(fe.substring(0,8),'] target not found"); return; }')),ue.push(' if (!topo_shape || topo_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Shell ").concat(fe.substring(0,8),'] target shape is null"); return; }')),ue.push(" if (node) { node.set_archived(false); node.set_op_feature_node_id(null); }"),ue.push(" let result_shape = parapoly_engine.ParaPolyShapeMaker.shell_shape(topo_shape, ".concat(t.n(Ie),", ").concat(t.n(ke),", ").concat(oo?"true":"false",");")),ue.push(' if (!result_shape || result_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Shell ").concat(fe.substring(0,8),'] shell_shape failed"); return; }')),ue.push(" if (node) { node.set_archived(true); node.set_op_feature_node_id(".concat(JSON.stringify(fe),"); }")),ue.push(" let result_node = block3d_doc.push_node(".concat(JSON.stringify(ge),", ").concat(JSON.stringify("shell_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result_node.set_topo_shape(result_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push("})();")}else if(ye.indexOf("FeatureNodeDraft")>=0){var no=t.extract_faces_and_target(null===(xt=null==me?void 0:me.get_feature_topo_items)||void 0===xt?void 0:xt.call(me)),ro=(Be=(null===(St=null===(Pt=null==me?void 0:me.get_center)||void 0===Pt?void 0:Pt.call(me))||void 0===St?void 0:St.toArray)?me.get_center().toArray():[0,0,0],De=(null===(Et=null===(kt=null==me?void 0:me.get_direction)||void 0===kt?void 0:kt.call(me))||void 0===Et?void 0:Et.toArray)?me.get_direction().toArray():[0,0,1],Ie=null===(Ot=null==me?void 0:me.get_value)||void 0===Ot?void 0:Ot.call(me),null===(Nt=null==me?void 0:me.get_reverse)||void 0===Nt?void 0:Nt.call(me));ue.push("(function() {"),ue.push(" let target_name = __id_to_name[".concat(JSON.stringify(no.target_id),"];")),ue.push(' if (!target_name) { console.warn("[part3d.js #'.concat(he," Draft ").concat(fe.substring(0,8),"] target_name not found: ").concat((no.target_id||"").substring(0,8),'"); return; }')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let node = root.getChildByName(target_name, true);"),ue.push(" let topo_shape;"),ue.push(" if (node && node.get_topo_shape) {"),ue.push(" topo_shape = node.get_topo_shape();"),ue.push(" } else if (__saved_shapes[target_name]) {"),ue.push(" topo_shape = __saved_shapes[target_name].shape;"),ue.push(' } else { console.warn("[part3d.js #'.concat(he," Draft ").concat(fe.substring(0,8),'] target not found"); return; }')),ue.push(' if (!topo_shape || topo_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Draft ").concat(fe.substring(0,8),'] target shape is null"); return; }')),ue.push(" if (node) { node.set_archived(false); node.set_op_feature_node_id(null); }"),ue.push(" let face_arr = new parapoly_engine.ParaPolyIntArray();");for(var io=0,so=no.faces;io<so.length;io++){var ao=so[io];ue.push(" face_arr.pushValue(".concat(t.n(ao),");"))}ue.push(" let result_shape = parapoly_engine.ParaPolyShapeMaker.draft_shape(topo_shape, ".concat(t.n(Ie),", ").concat(t.n(Be[0]),", ").concat(t.n(Be[1]),", ").concat(t.n(Be[2]),", ").concat(t.n(De[0]),", ").concat(t.n(De[1]),", ").concat(t.n(De[2]),", face_arr, ").concat(ro?"true":"false",");")),ue.push(' if (!result_shape || result_shape.isNull()) { console.warn("[part3d.js #'.concat(he," Draft ").concat(fe.substring(0,8),'] draft_shape failed"); return; }')),ue.push(" if (node) { node.set_archived(true); node.set_op_feature_node_id(".concat(JSON.stringify(fe),"); }")),ue.push(" let result_node = block3d_doc.push_node(".concat(JSON.stringify(ge),", ").concat(JSON.stringify("draft_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result_node.set_topo_shape(result_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push("})();")}else if(ye.indexOf("FeatureNodeMirror")>=0){var co=(null===(Tt=null==(mo=null===(Ft=null===(jt=null==me?void 0:me.get_feature_topo_items)||void 0===jt?void 0:jt.call(me))||void 0===Ft?void 0:Ft[0])?void 0:mo.get_feature_id)||void 0===Tt?void 0:Tt.call(mo))||"";Be=(null===(At=null===(Mt=null==me?void 0:me.get_center)||void 0===Mt?void 0:Mt.call(me))||void 0===At?void 0:At.toArray)?me.get_center().toArray():[0,0,0],De=(null===(Dt=null===(Bt=null==me?void 0:me.get_direction)||void 0===Bt?void 0:Bt.call(me))||void 0===Dt?void 0:Dt.toArray)?me.get_direction().toArray():[0,0,1];ue.push("(function() {"),ue.push(" let target_name = __id_to_name[".concat(JSON.stringify(co),"];")),ue.push(' console.log("[part3d.js #'.concat(he," Mirror ").concat(fe.substring(0,8),"] target_id=").concat(co.substring(0,8),', target_name=", target_name);')),ue.push(' if (!target_name) { console.warn("[part3d.js #'.concat(he," Mirror ").concat(fe.substring(0,8),'] NO target_name"); return; }')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let node = root.getChildByName(target_name, true);"),ue.push(" let topo_shape;"),ue.push(" if (node && node.get_topo_shape) {"),ue.push(" topo_shape = node.get_topo_shape();"),ue.push(" } else if (__saved_shapes[target_name]) {"),ue.push(" topo_shape = __saved_shapes[target_name].shape;"),ue.push(' } else { console.warn("[part3d.js #'.concat(he," Mirror ").concat(fe.substring(0,8),'] node NOT found and no saved shape"); return; }')),ue.push(' console.log("[part3d.js #'.concat(he," Mirror ").concat(fe.substring(0,8),'] topo_shape null?", !topo_shape || topo_shape.isNull());')),ue.push(" if (!topo_shape || topo_shape.isNull()) return;"),ue.push(" let mirror_shape = parapoly_engine.ParaPolyShapeMaker.mirror_shape(topo_shape, ".concat(t.n(Be[0]),", ").concat(t.n(Be[1]),", ").concat(t.n(Be[2]),", ").concat(t.n(De[0]),", ").concat(t.n(De[1]),", ").concat(t.n(De[2]),");")),ue.push(' console.log("[part3d.js #'.concat(he," Mirror ").concat(fe.substring(0,8),'] mirror_shape null?", !mirror_shape || mirror_shape.isNull());')),ue.push(" if (!mirror_shape || mirror_shape.isNull()) return;"),ue.push(" let result = block3d_doc.push_node(".concat(JSON.stringify(ge),", ").concat(JSON.stringify("mirror_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result.set_topo_shape(mirror_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push("})();")}else if(ye.indexOf("FeatureNodeDelete")>=0){Se=(null===(zt=null==(mo=null===(Rt=null===(It=null==me?void 0:me.get_feature_topo_items)||void 0===It?void 0:It.call(me))||void 0===Rt?void 0:Rt[0])?void 0:mo.get_feature_id)||void 0===zt?void 0:zt.call(mo))||"";ue.push("if (__id_to_name[".concat(JSON.stringify(Se),"]) {")),ue.push(" block3d_doc.delete_node(__id_to_name[".concat(JSON.stringify(Se),"]);")),ue.push("}"),ue.push("__record_name(".concat(JSON.stringify(fe),");"))}else if(ye.indexOf("FeatureNodeBoolean")>=0){var uo=(null===(Lt=null==me?void 0:me.get_target_feature_topo_items)||void 0===Lt?void 0:Lt.call(me))||[],_o=(null===(Ut=null==me?void 0:me.get_tool_feature_topo_items)||void 0===Ut?void 0:Ut.call(me))||[],po=(null===(Wt=null==me?void 0:me.get_operation)||void 0===Wt?void 0:Wt.call(me))||"union",lo=(null===(Gt=null==me?void 0:me.get_keep_tool)||void 0===Gt?void 0:Gt.call(me))||!1,ho=uo.map(function(t){var e;return(null===(e=null==t?void 0:t.get_feature_id)||void 0===e?void 0:e.call(t))||""}),fo=_o.map(function(t){var e;return(null===(e=null==t?void 0:t.get_feature_id)||void 0===e?void 0:e.call(t))||""}),yo="difference"===po?"cut":"intersection"===po?"common":"fuse";ue.push("// Boolean (".concat(po,"): targets=[").concat(ho.map(function(t){return JSON.stringify(t)}).join(","),"], tools=[").concat(fo.map(function(t){return JSON.stringify(t)}).join(","),"]")),ue.push("(function() {"),ue.push(" let target_names = [".concat(ho.map(function(t){return"__id_to_name[".concat(JSON.stringify(t),"]")}).join(", "),"].filter(Boolean);")),ue.push(" let tool_names = [".concat(fo.map(function(t){return"__id_to_name[".concat(JSON.stringify(t),"]")}).join(", "),"].filter(Boolean);")),ue.push(' console.log("[part3d.js #'.concat(he," Boolean ").concat(fe.substring(0,8),"] (").concat(po,') target_names=", target_names, "tool_names=", tool_names);')),ue.push(" let root = block3d_doc.get_root_node();"),ue.push(" let target_nodes = target_names.map(function(name) { return root.getChildByName(name, true); }).filter(Boolean);"),ue.push(" let tool_nodes = tool_names.map(function(name) { return root.getChildByName(name, true); }).filter(Boolean);"),ue.push(' console.log("[part3d.js #'.concat(he," Boolean ").concat(fe.substring(0,8),'] found target_nodes=", target_nodes.length, "tool_nodes=", tool_nodes.length);')),ue.push(' if (target_nodes.length === 0 || tool_nodes.length === 0) { console.warn("[part3d.js #'.concat(he," Boolean ").concat(fe.substring(0,8),'] EARLY EXIT - missing nodes"); return; }')),ue.push(" // Clone shapes directly (matching FeatureNodeBoolean.run - no TC application)"),ue.push(' let target_shapes = target_nodes.map(function(nd) { let s = nd.get_topo_shape(); console.log("[part3d.js #'.concat(he," Boolean ").concat(fe.substring(0,8),'] target shape null?", !s || s.isNull()); return s ? s.clone() : null; }).filter(Boolean);')),ue.push(' let tool_shapes = tool_nodes.map(function(nd) { let s = nd.get_topo_shape(); console.log("[part3d.js #'.concat(he," Boolean ").concat(fe.substring(0,8),'] tool shape null?", !s || s.isNull()); return s ? s.clone() : null; }).filter(Boolean);')),ue.push(' if (target_shapes.length === 0 || tool_shapes.length === 0) { console.warn("[part3d.js #'.concat(he," Boolean ").concat(fe.substring(0,8),'] EARLY EXIT - null shapes"); return; }')),ue.push(" // Merge target shapes via fuse"),ue.push(" let merged_target_shape = target_shapes[0];"),ue.push(" for (let i = 1; i < target_shapes.length; i++) {"),ue.push(" merged_target_shape = parapoly_engine.ParaPolyShapeMaker.fuse(merged_target_shape, target_shapes[i]);"),ue.push(" }"),ue.push(" // Merge tool shapes via fuse"),ue.push(" let merged_tool_shape = tool_shapes[0];"),ue.push(" for (let i = 1; i < tool_shapes.length; i++) {"),ue.push(" merged_tool_shape = parapoly_engine.ParaPolyShapeMaker.fuse(merged_tool_shape, tool_shapes[i]);"),ue.push(" }"),ue.push(' console.log("[part3d.js #'.concat(he," Boolean ").concat(fe.substring(0,8),'] merged_target null?", !merged_target_shape || merged_target_shape.isNull(), "merged_tool null?", !merged_tool_shape || merged_tool_shape.isNull());')),ue.push(" // Final boolean operation"),ue.push(" let result_shape = parapoly_engine.ParaPolyShapeMaker[".concat(JSON.stringify(yo),"](merged_target_shape, merged_tool_shape);")),ue.push(' console.log("[part3d.js #'.concat(he," Boolean ").concat(fe.substring(0,8),'] result null?", !result_shape || result_shape.isNull());')),ue.push(" if (result_shape && !result_shape.isNull()) {"),ue.push(' let result_node = block3d_doc.push_node("union", '.concat(JSON.stringify("boolean_"+fe),", ").concat(JSON.stringify(ve),", false);")),ue.push(" result_node.set_topo_shape(result_shape);"),ue.push(" block3d_doc.pop_node();"),ue.push(" // Save shapes before removing consumed originals"),ue.push(" target_names.forEach(function(name) { let nd = root.getChildByName(name, true); if (nd && nd.get_topo_shape) __saved_shapes[name] = { shape: nd.get_topo_shape(), tc: null }; });"),lo||ue.push(" tool_names.forEach(function(name) { let nd = root.getChildByName(name, true); if (nd && nd.get_topo_shape) __saved_shapes[name] = { shape: nd.get_topo_shape(), tc: null }; });"),ue.push(" // Remove consumed originals"),ue.push(" target_names.forEach(function(name) { block3d_doc.delete_node(name); });"),lo||ue.push(" tool_names.forEach(function(name) { block3d_doc.delete_node(name); });"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push(' } else { console.warn("[part3d.js #'.concat(he," Boolean ").concat(fe.substring(0,8),'] FAILED - result is null/empty"); }')),ue.push("})();")}else if(ye.indexOf("FeatureNodeTransform")>=0){Se=(null===(Vt=null==(mo=null===(qt=null===(Zt=null==me?void 0:me.get_feature_topo_items)||void 0===Zt?void 0:Zt.call(me))||void 0===qt?void 0:qt[0])?void 0:mo.get_feature_id)||void 0===Vt?void 0:Vt.call(mo))||"";var mo,go=null===(Jt=null==me?void 0:me.get_position)||void 0===Jt?void 0:Jt.call(me),vo=null===(Kt=null==me?void 0:me.get_rotation)||void 0===Kt?void 0:Kt.call(me),wo=null===(Ht=null==me?void 0:me.get_scale)||void 0===Ht?void 0:Ht.call(me);ue.push("if (__select_feature(".concat(JSON.stringify(Se),")) {")),ue.push(" let __nd = block3d_doc.selected_node;"),ue.push(" let __sh = __nd.get_topo_shape().clone();"),ue.push(' console.log("[part3d.js #'.concat(he," Transform ").concat(fe.substring(0,8),"] target=").concat(Se.substring(0,8),', shape null?", !__sh || __sh.isNull(), "translate=(').concat(t.n(null!==(Xt=null==go?void 0:go.x)&&void 0!==Xt?Xt:0),",").concat(t.n(null!==(Yt=null==go?void 0:go.y)&&void 0!==Yt?Yt:0),",").concat(t.n(null!==(Qt=null==go?void 0:go.z)&&void 0!==Qt?Qt:0),')");')),ue.push(" __sh.scale(".concat(t.n(null!==($t=null==wo?void 0:wo.x)&&void 0!==$t?$t:1),", ").concat(t.n(null!==(te=null==wo?void 0:wo.y)&&void 0!==te?te:1),", ").concat(t.n(null!==(ee=null==wo?void 0:wo.z)&&void 0!==ee?ee:1),");")),ue.push(" __sh.rotate(".concat(t.n(null!==(oe=null==vo?void 0:vo.x)&&void 0!==oe?oe:0),", ").concat(t.n(null!==(ne=null==vo?void 0:vo.y)&&void 0!==ne?ne:0),", ").concat(t.n(null!==(re=null==vo?void 0:vo.z)&&void 0!==re?re:0),", ").concat(t.n(null!==(ie=null==vo?void 0:vo.w)&&void 0!==ie?ie:1),");")),ue.push(" __sh.translate(".concat(t.n(null!==(se=null==go?void 0:go.x)&&void 0!==se?se:0),", ").concat(t.n(null!==(ae=null==go?void 0:go.y)&&void 0!==ae?ae:0),", ").concat(t.n(null!==(ce=null==go?void 0:go.z)&&void 0!==ce?ce:0),");")),ue.push(" __nd.set_topo_shape(__sh);"),ue.push(" __record_name(".concat(JSON.stringify(fe),");")),ue.push('} else { console.warn("[part3d.js #'.concat(he," Transform ").concat(fe.substring(0,8),"] target NOT FOUND: ").concat(Se.substring(0,8),'"); }'))}else ue.push("// Unsupported node in executable export: ".concat(JSON.stringify(ye)," (kept by fallback rebuild)."))}}return ue},t.export_sketch_lines=function(e){var o,n,r,i,s,a,c,u,_,p,l,h,d,f,y,m,g,v,w,b,C,x,P,S,k,E,O,N,j=[],F=e.getName?e.getName():"sketch",T=e.get_ax2?e.get_ax2():null,M=(null===(o=null==T?void 0:T.center)||void 0===o?void 0:o.toArray)?T.center.toArray():[0,0,0],A=(null===(n=null==T?void 0:T.direction)||void 0===n?void 0:n.toArray)?T.direction.toArray():[0,0,1];j.push("block3d_doc.start_sketch(".concat(JSON.stringify(F),", [").concat(t.n(M[0]),", ").concat(t.n(M[1]),", ").concat(t.n(M[2]),", ").concat(t.n(A[0]),", ").concat(t.n(A[1]),", ").concat(t.n(A[2]),"]);"));for(var B=e.get_geoms?e.get_geoms():null,D=(null==B?void 0:B.getChildren)?B.getChildren():[],I=0;I<D.length;I++){var R=D[I];if(R&&(!R.get_is_internal||!R.get_is_internal())){var z=R.getClassName?R.getClassName():"";if(z.indexOf("SkGeomPointNode")>=0){var L=null===(i=null===(r=R.component)||void 0===r?void 0:r.get_point)||void 0===i?void 0:i.call(r);j.push("block3d_doc.point(".concat(t.n(null==L?void 0:L.x),", ").concat(t.n(null==L?void 0:L.y),", ").concat(t.n(null==L?void 0:L.z),");"))}else if(z.indexOf("SkGeomLineNode")>=0){var U=null===(a=null===(s=R.component)||void 0===s?void 0:s.get_start_point)||void 0===a?void 0:a.call(s),W=null===(u=null===(c=R.component)||void 0===c?void 0:c.get_end_point)||void 0===u?void 0:u.call(c);j.push("block3d_doc.line_segment(".concat(t.n(null==U?void 0:U.x),", ").concat(t.n(null==U?void 0:U.y),", ").concat(t.n(null==U?void 0:U.z),", ").concat(t.n(null==W?void 0:W.x),", ").concat(t.n(null==W?void 0:W.y),", ").concat(t.n(null==W?void 0:W.z),");"))}else if(z.indexOf("SkGeomCircleNode")>=0){var G=null===(p=null===(_=R.component)||void 0===_?void 0:_.get_center)||void 0===p?void 0:p.call(_),Z=null===(h=null===(l=R.component)||void 0===l?void 0:l.get_radius)||void 0===h?void 0:h.call(l);j.push("block3d_doc.circle(".concat(t.n(null==G?void 0:G.x),", ").concat(t.n(null==G?void 0:G.y),", ").concat(t.n(null==G?void 0:G.z),", ").concat(t.n(Z),");"))}else if(z.indexOf("SkGeomEllipseNode")>=0){G=null===(f=null===(d=R.component)||void 0===d?void 0:d.get_center)||void 0===f?void 0:f.call(d);var q=null===(m=null===(y=R.component)||void 0===y?void 0:y.get_major_radius)||void 0===m?void 0:m.call(y),V=null===(v=null===(g=R.component)||void 0===g?void 0:g.get_minor_radius)||void 0===v?void 0:v.call(g);j.push("block3d_doc.ellipse(".concat(t.n(null==G?void 0:G.x),", ").concat(t.n(null==G?void 0:G.y),", ").concat(t.n(null==G?void 0:G.z),", ").concat(t.n(q),", ").concat(t.n(V),");"))}else if(z.indexOf("SkGeomArcNode")>=0){G=null===(b=null===(w=R.component)||void 0===w?void 0:w.get_center)||void 0===b?void 0:b.call(w),Z=null===(x=null===(C=R.component)||void 0===C?void 0:C.get_radius)||void 0===x?void 0:x.call(C);var J=(null===(S=null===(P=R.component)||void 0===P?void 0:P.get_start_angle)||void 0===S?void 0:S.call(P))||0,K=(null===(E=null===(k=R.component)||void 0===k?void 0:k.get_end_angle)||void 0===E?void 0:E.call(k))||0;j.push("block3d_doc.arc(".concat(t.n(null==G?void 0:G.x),", ").concat(t.n(null==G?void 0:G.y),", ").concat(t.n(null==G?void 0:G.z),", ").concat(t.n(Z),", ").concat(t.n(180*J/Math.PI),", ").concat(t.n(180*K/Math.PI),");"))}else if(z.indexOf("SkGeomBSplineNode")>=0){var H=R.get_poles?R.get_poles():[],X=(null===(N=null===(O=R.component)||void 0===O?void 0:O.get_is_closed)||void 0===N?void 0:N.call(O))||!1;j.push("block3d_doc.start_bspline(".concat(X?"true":"false",");"));for(var Y=0;Y<H.length;Y++){L=H[Y];j.push("block3d_doc.add_pole(".concat(t.n(null==L?void 0:L.x),", ").concat(t.n(null==L?void 0:L.y),", ").concat(t.n(null==L?void 0:L.z),");"))}j.push("block3d_doc.end_bspline();")}}}return j.push("block3d_doc.end_sketch();"),j},t.append_transform_lines=function(e,o){var n=o.get_transform_component?o.get_transform_component():null;if(n){var r=n.get_position?n.get_position():null;r&&(Math.abs(r.x)>1e-9||Math.abs(r.y)>1e-9||Math.abs(r.z)>1e-9)&&e.push("block3d_doc.translate(".concat(t.n(r.x),", ").concat(t.n(r.y),", ").concat(t.n(r.z),");"));var i=n.get_rotation?n.get_rotation():null;i&&(Math.abs(i.x)>1e-9||Math.abs(i.y)>1e-9||Math.abs(i.z)>1e-9||Math.abs(i.w-1)>1e-9)&&e.push("block3d_doc.rotate_by_quaternion(".concat(t.n(i.x),", ").concat(t.n(i.y),", ").concat(t.n(i.z),", ").concat(t.n(i.w),");"));var s=n.get_scale?n.get_scale():null;s&&(Math.abs(s.x-1)>1e-9||Math.abs(s.y-1)>1e-9||Math.abs(s.z-1)>1e-9)&&e.push("block3d_doc.scale(".concat(t.n(s.x),", ").concat(t.n(s.y),", ").concat(t.n(s.z),");"))}},t.extract_edges_and_target=function(t){var e,o,n,r,i="",s=[];if(!t||0===t.length)return{target_id:i,edges:s};i=(null===(o=null===(e=t[0])||void 0===e?void 0:e.get_feature_id)||void 0===o?void 0:o.call(e))||"";for(var a=0;a<t.length;a++){var c=null===(r=null===(n=t[a])||void 0===n?void 0:n.get_edge_index)||void 0===r?void 0:r.call(n);null!=c&&c>=0&&s.push(c)}return{target_id:i,edges:s}},t.extract_faces_and_target=function(t){var e,o,n,r,i="",s=[];if(!t||0===t.length)return{target_id:i,faces:s};i=(null===(o=null===(e=t[0])||void 0===e?void 0:e.get_feature_id)||void 0===o?void 0:o.call(e))||"";for(var a=0;a<t.length;a++){var c=null===(r=null===(n=t[a])||void 0===n?void 0:n.get_face_index)||void 0===r?void 0:r.call(n);null!=c&&c>=0&&s.push(c)}return{target_id:i,faces:s}},t.step_payload_base64=function(t){var e=Array.from(t||[]),o={data:JSON.stringify(e)};return btoa(JSON.stringify(o))},t.n=function(t){if(null==t||Number.isNaN(t))return"0";var e=Number(t);return Math.abs(e)<1e-12?"0":String(e)},t.summarize_feature_node=function(e,o){var n=o.getClassName?o.getClassName():"UnknownNode",r=o.get_label?o.get_label():o.getName?o.getName():"",i=o.get_op?o.get_op():"",s=o.get_color?o.get_color():"",a=o.get_feature_component?o.get_feature_component():null,c=t.summarize_feature_component(a),u=[];return u.push("[".concat(e,"] ").concat(n)),r&&u.push("label=".concat(JSON.stringify(r))),i&&u.push("op=".concat(i)),s&&u.push("color=".concat(s)),c&&u.push(c),"// ".concat(u.join(" | "))},t.summarize_feature_component=function(e){var o,n,r,i,s,a,c,u,_,p,l,h,d,f,y,m,g,v,w,b,C,x,P,S,k,E,O,N,j,F,T,M,A,B;if(!e)return"";var D=[];t.push_if_defined(D,"x",null===(o=e.get_x_length)||void 0===o?void 0:o.call(e)),t.push_if_defined(D,"y",null===(n=e.get_y_length)||void 0===n?void 0:n.call(e)),t.push_if_defined(D,"z",null===(r=e.get_z_length)||void 0===r?void 0:r.call(e)),t.push_if_defined(D,"radius",null===(i=e.get_radius)||void 0===i?void 0:i.call(e)),t.push_if_defined(D,"radius1",null===(s=e.get_radius1)||void 0===s?void 0:s.call(e)),t.push_if_defined(D,"radius2",null===(a=e.get_radius2)||void 0===a?void 0:a.call(e)),t.push_if_defined(D,"top_radius",null===(c=e.get_top_radius)||void 0===c?void 0:c.call(e)),t.push_if_defined(D,"bottom_radius",null===(u=e.get_bottom_radius)||void 0===u?void 0:u.call(e)),t.push_if_defined(D,"height",null===(_=e.get_height)||void 0===_?void 0:_.call(e)),t.push_if_defined(D,"top_w",null===(p=e.get_top_w)||void 0===p?void 0:p.call(e)),t.push_if_defined(D,"bottom_w",null===(l=e.get_bottom_w)||void 0===l?void 0:l.call(e)),t.push_if_defined(D,"depth",null===(h=e.get_depth)||void 0===h?void 0:h.call(e)),t.push_if_defined(D,"hight",null===(d=e.get_hight)||void 0===d?void 0:d.call(e)),t.push_if_defined(D,"edges",null===(f=e.get_edges)||void 0===f?void 0:f.call(e)),t.push_if_defined(D,"value",null===(y=e.get_value)||void 0===y?void 0:y.call(e)),t.push_if_defined(D,"solid",null===(m=e.get_solid)||void 0===m?void 0:m.call(e)),t.push_if_defined(D,"inward",null===(g=e.get_inward)||void 0===g?void 0:g.call(e)),t.push_if_defined(D,"reverse",null===(v=e.get_reverse)||void 0===v?void 0:v.call(e)),t.push_if_defined(D,"keep_original",null===(w=e.get_keep_original)||void 0===w?void 0:w.call(e)),t.push_if_defined(D,"keep_tool",null===(b=e.get_keep_tool)||void 0===b?void 0:b.call(e)),t.push_if_defined(D,"operation",null===(C=e.get_operation)||void 0===C?void 0:C.call(e)),t.push_if_defined(D,"mode",null===(x=e.get_mode)||void 0===x?void 0:x.call(e)),t.push_if_defined(D,"axis",null===(P=e.get_axis)||void 0===P?void 0:P.call(e)),t.push_if_defined(D,"pitch",null===(S=e.get_pitch)||void 0===S?void 0:S.call(e)),t.push_if_defined(D,"angle",null===(k=e.get_angle)||void 0===k?void 0:k.call(e)),t.push_if_defined(D,"left_hand",null===(E=e.get_left_hand)||void 0===E?void 0:E.call(e)),t.push_if_defined(D,"reversed",null===(O=e.get_reversed)||void 0===O?void 0:O.call(e)),t.push_if_defined(D,"step_bytes",null===(j=null===(N=e.get_content)||void 0===N?void 0:N.call(e))||void 0===j?void 0:j.length);var I=null===(F=e.get_feature_topo_items)||void 0===F?void 0:F.call(e);(null==I?void 0:I.length)&&D.push("topo_items=".concat(I.length));var R=null===(T=e.get_path_feature_topo_items)||void 0===T?void 0:T.call(e);(null==R?void 0:R.length)&&D.push("path_items=".concat(R.length));var z=null===(M=e.get_profile_feature_topo_items)||void 0===M?void 0:M.call(e);(null==z?void 0:z.length)&&D.push("profile_items=".concat(z.length));var L=null===(A=e.get_target_feature_topo_items)||void 0===A?void 0:A.call(e);(null==L?void 0:L.length)&&D.push("target_items=".concat(L.length));var U=null===(B=e.get_tool_feature_topo_items)||void 0===B?void 0:B.call(e);return(null==U?void 0:U.length)&&D.push("tool_items=".concat(U.length)),D.join(", ")},t.push_if_defined=function(e,o,n){null!=n&&e.push("".concat(o,"=").concat(t.to_simple_value(n)))},t.to_simple_value=function(e){if("number"==typeof e)return String(Math.round(1e4*e)/1e4);if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return JSON.stringify(e);if(Array.isArray(e)){var o=e.map(function(e){return t.to_simple_value(e)});return"[".concat(o.join(","),"]")}return e&&"object"==typeof e?e.toArray?t.to_simple_value(e.toArray()):JSON.stringify(e):String(e)},t}(),SketchCodeExporter=function(){function t(){}return t.export=function(e){var o,n,r=[];r.push("// This .sketch3d.js file contains exactly ONE sketch (start_sketch/end_sketch pair)."),r.push("// All geometry and constraints belong to this single sketch context."),r.push("let main = function() {"),r.push(" let block3d_doc = new PartBlock3dDocument();");var i=e.get_ax2(),s=(null===(o=null==i?void 0:i.center)||void 0===o?void 0:o.toArray)?i.center.toArray():[0,0,0],a=(null===(n=null==i?void 0:i.direction)||void 0===n?void 0:n.toArray)?i.direction.toArray():[0,0,1];r.push(' block3d_doc.start_sketch("sketch", ['.concat(t.n(s[0]),", ").concat(t.n(s[1]),", ").concat(t.n(s[2]),", ").concat(t.n(a[0]),", ").concat(t.n(a[1]),", ").concat(t.n(a[2]),"]);")),r.push("");for(var c=e.get_geoms().getChildren(),u=new Map,_=0;_<c.length;_++){var p=c[_],l=p.className,h=p.get_geom_id();if(!p.get_is_internal||!p.get_is_internal()){var d="g".concat(h);if(u.set(h,d),l===ClassNames.Z.SkGeomPointNode){var f=p.component.get_point();r.push(" let ".concat(d," = block3d_doc.point(").concat(t.n(f.x),", ").concat(t.n(f.y),", ").concat(t.n(f.z),");"))}else if(l===ClassNames.Z.SkGeomLineNode){var y=p.component.get_start_point(),m=p.component.get_end_point();r.push(" let ".concat(d," = block3d_doc.line_segment(").concat(t.n(y.x),", ").concat(t.n(y.y),", ").concat(t.n(y.z),", ").concat(t.n(m.x),", ").concat(t.n(m.y),", ").concat(t.n(m.z),");"))}else if(l===ClassNames.Z.SkGeomCircleNode){var g=p.component.get_center(),v=p.component.get_radius();r.push(" let ".concat(d," = block3d_doc.circle(").concat(t.n(g.x),", ").concat(t.n(g.y),", ").concat(t.n(g.z),", ").concat(t.n(v),");"))}else if(l===ClassNames.Z.SkGeomEllipseNode){var w=p.component.get_center(),b=p.component.get_major_radius(),C=p.component.get_minor_radius();r.push(" let ".concat(d," = block3d_doc.ellipse(").concat(t.n(w.x),", ").concat(t.n(w.y),", ").concat(t.n(w.z),", ").concat(t.n(b),", ").concat(t.n(C),");"))}else if(l===ClassNames.Z.SkGeomArcNode){var x=p.component.get_center(),P=(v=p.component.get_radius(),p.component.get_start_angle()),S=p.component.get_end_angle();r.push(" let ".concat(d," = block3d_doc.arc(").concat(t.n(x.x),", ").concat(t.n(x.y),", ").concat(t.n(x.z),", ").concat(t.n(v),", ").concat(t.n(180*P/Math.PI),", ").concat(t.n(180*S/Math.PI),");"))}else if(l===ClassNames.Z.SkGeomBSplineNode){var k=p.get_poles(),E=p.component.get_is_closed();r.push(" block3d_doc.start_bspline(".concat(E,");"));for(var O=0,N=k;O<N.length;O++){f=N[O];r.push(" block3d_doc.add_pole(".concat(t.n(f.x),", ").concat(t.n(f.y),", ").concat(t.n(f.z),");"))}r.push(" block3d_doc.end_bspline();"),u.delete(h)}}}var j=e.get_constraints().getChildren();j.length>0&&(r.push(""),r.push(" // Constraints"));for(_=0;_<j.length;_++){var F=j[_],T=F.get_type(),M=F.get_first(),A=F.get_first_pos(),B=F.get_second(),D=F.get_second_pos(),I=F.get_value();if(T!==Constraint.uF.InternalAlignment){var R=t.exportConstraint(T,M,A,B,D,I,u);R&&r.push(" ".concat(R))}}return r.push(""),r.push(" block3d_doc.end_sketch();"),r.push(" return block3d_doc;"),r.push("};"),r.join("\n")},t.n=function(t){if(null==t||Number.isNaN(t))return"0";var e=Number(t);return Math.abs(e)<1e-12?"0":String(e)},t.pp=function(t){switch(t){case Constraint.lg.none:return"PointPos.none";case Constraint.lg.start:return"PointPos.start";case Constraint.lg.end:return"PointPos.end";case Constraint.lg.mid:return"PointPos.mid";default:return"PointPos.none"}},t.gv=function(t,e){return e.get(t)||String(t)},t.exportConstraint=function(e,o,n,r,i,s,a){var c=t.gv(o,a),u=t.gv(r,a),_=t.pp(n),p=t.pp(i);switch(e){case Constraint.uF.Coincident:return"block3d_doc.constraint_coincident(".concat(u,", ").concat(p,", ").concat(c,", ").concat(_,");");case Constraint.uF.Horizontal:return void 0!==r&&r>=0&&n!==Constraint.lg.none?"block3d_doc.constraint_horizontal_points(".concat(c,", ").concat(_,", ").concat(u,", ").concat(p,");"):"block3d_doc.constraint_horizontal(".concat(c,");");case Constraint.uF.Vertical:return void 0!==r&&r>=0&&n!==Constraint.lg.none?"block3d_doc.constraint_vertical_points(".concat(c,", ").concat(_,", ").concat(u,", ").concat(p,");"):"block3d_doc.constraint_vertical(".concat(c,");");case Constraint.uF.Distance:return void 0!==r&&r>=0?n!==Constraint.lg.none&&i!==Constraint.lg.none?"block3d_doc.constraint_distance_points(".concat(c,", ").concat(_,", ").concat(u,", ").concat(p,", ").concat(s,");"):"block3d_doc.constraint_distance_point_to_line(".concat(c,", ").concat(_,", ").concat(u,", ").concat(s,");"):"block3d_doc.constraint_distance(".concat(c,", ").concat(s,");");case Constraint.uF.DistanceX:return void 0!==r&&r>=0?"block3d_doc.constraint_distance_h_points(".concat(c,", ").concat(_,", ").concat(u,", ").concat(p,", ").concat(s,");"):"block3d_doc.constraint_distance_h(".concat(c,", ").concat(s,");");case Constraint.uF.DistanceY:return void 0!==r&&r>=0?"block3d_doc.constraint_distance_v_points(".concat(c,", ").concat(_,", ").concat(u,", ").concat(p,", ").concat(s,");"):"block3d_doc.constraint_distance_v(".concat(c,", ").concat(s,");");case Constraint.uF.Radius:return"block3d_doc.constraint_radius(".concat(c,", ").concat(s,");");case Constraint.uF.Diameter:return"block3d_doc.constraint_diameter(".concat(c,", ").concat(s,");");case Constraint.uF.Parallel:return"block3d_doc.constraint_parallel(".concat(c,", ").concat(u,");");case Constraint.uF.Perpendicular:return"block3d_doc.constraint_perpendicular(".concat(c,", ").concat(u,");");case Constraint.uF.Equal:return"block3d_doc.constraint_equal(".concat(c,", ").concat(u,");");case Constraint.uF.Tangent:return"block3d_doc.constraint_tangent(".concat(c,", ").concat(u,");");case Constraint.uF.Angle:return void 0!==r&&r>=0?"block3d_doc.constraint_angle_lines(".concat(c,", ").concat(u,", ").concat(s,");"):"block3d_doc.constraint_angle(".concat(c,", ").concat(s,");");case Constraint.uF.PointOnObject:return"block3d_doc.constraint_point_on_object(".concat(c,", ").concat(_,", ").concat(u,");");case Constraint.uF.Symmetric:return"block3d_doc.constraint_symmetric(".concat(c,", ").concat(_,", ").concat(r,", ").concat(u,", ").concat(p,");");default:return"// Unsupported constraint type: ".concat(e)}},t}();return __webpack_exports__})());