aptechka 0.13.0 → 0.13.1
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.
- package/lib/{Animation-seVC6-fS.cjs → Animation-De9aUv3b.cjs} +1 -1
- package/lib/{Animation-DF5jPON_.js → Animation-NAGXiFv5.js} +1 -1
- package/lib/{Composed-ChlKoJEp.cjs → Composed-C_4slJQ6.cjs} +1 -1
- package/lib/{Composed-CoX1ImVk.js → Composed-CfWa-69I.js} +1 -1
- package/lib/{Damped-C7WAqKPh.cjs → Damped-DYJ6Z0xo.cjs} +1 -1
- package/lib/{Damped-BDO-F13V.js → Damped-DbJKrUIf.js} +1 -1
- package/lib/Derived-BIBU-y7Z.cjs +1 -0
- package/lib/Derived-Vo_RsJfi.js +23 -0
- package/lib/{SourceManager-B8-EMNnd.js → SourceManager-B6wZpXUZ.js} +1 -1
- package/lib/{SourceManager-TzU9Rw08.cjs → SourceManager-CfHcGLUa.cjs} +1 -1
- package/lib/Store-C46i0nvr.js +137 -0
- package/lib/Store-npaZHvX4.cjs +1 -0
- package/lib/{Tweened-DSXD0I0k.cjs → Tweened-BkkD9s4n.cjs} +1 -1
- package/lib/{Tweened-CHhmfvzo.js → Tweened-DOSHLCZa.js} +1 -1
- package/lib/{Viewport-DTlImj28.js → Viewport-B55BvLsV.js} +1 -1
- package/lib/{Viewport-BmLTk_6k.cjs → Viewport-Cv4TRGiv.cjs} +1 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +1 -1
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +3 -3
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.js +3 -3
- package/lib/class-linked-status/index.cjs +1 -1
- package/lib/class-linked-status/index.js +1 -1
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +2 -2
- package/lib/{createStylesheet-DO5t5q-m.js → createStylesheet-COAZH1Mw.js} +1 -1
- package/lib/{createStylesheet-CaDI99iu.cjs → createStylesheet-Csfmh-MH.cjs} +1 -1
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.js +1 -1
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +1 -1
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +1 -1
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +2 -2
- package/lib/en3/helpers/index.cjs +1 -1
- package/lib/en3/helpers/index.js +2 -2
- package/lib/en3/misc/index.cjs +1 -1
- package/lib/en3/misc/index.js +2 -2
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +1 -1
- package/lib/{index-BpsQqM-8.cjs → index-BuAuBz2_.cjs} +1 -1
- package/lib/{index-BhbT9PrL.js → index-CenF0JbH.js} +3 -3
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +1 -1
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +1 -1
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +3 -3
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +2 -2
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +2 -2
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +7 -7
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +1 -1
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +2 -2
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +38 -112
- package/lib/{tags-v-OSVkiQ.cjs → tags-6_ETuR75.cjs} +1 -1
- package/lib/{tags-4AoxVUe3.js → tags-BL3kQp9o.js} +1 -1
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +2 -2
- package/lib/tweaker/index.cjs +2 -2
- package/lib/tweaker/index.js +50 -53
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +1 -1
- package/package.json +1 -9
- package/lib/Derived-B-2UXnVE.cjs +0 -1
- package/lib/Derived-CDGpSMKu.js +0 -56
- package/lib/Store-BnA-dJsE.cjs +0 -1
- package/lib/Store-DGtldlBH.js +0 -147
- package/lib/svg-path-data/index.cjs +0 -3
- package/lib/svg-path-data/index.js +0 -490
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var On=Object.defineProperty;var qt=Object.getOwnPropertySymbols;var Dn=Object.prototype.hasOwnProperty,Cn=Object.prototype.propertyIsEnumerable;var Bt=m=>{throw TypeError(m)};var Ut=(m,n,a)=>n in m?On(m,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):m[n]=a,se=(m,n)=>{for(var a in n||(n={}))Dn.call(n,a)&&Ut(m,a,n[a]);if(qt)for(var a of qt(n))Cn.call(n,a)&&Ut(m,a,n[a]);return m};var St=(m,n,a)=>n.has(m)||Bt("Cannot "+a);var s=(m,n,a)=>(St(m,n,"read from private field"),a?a.call(m):n.get(m)),f=(m,n,a)=>n.has(m)?Bt("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(m):n.set(m,a),x=(m,n,a,e)=>(St(m,n,"write to private field"),e?e.call(m,a):n.set(m,a),a),E=(m,n,a)=>(St(m,n,"access private method"),a);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../../en3-C1fLmsjs.cjs"),X=require("../../Store-BnA-dJsE.cjs"),t=require("three"),jn=require("../../object-CCiXnER2.cjs"),Wt=require("../../ticker/index.cjs"),kn=require("../../Composed-ChlKoJEp.cjs"),Rn=require("../../traverseMaterials-CD_3_56D.cjs");function Hn(m){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(m){for(const a in m)if(a!=="default"){const e=Object.getOwnPropertyDescriptor(m,a);Object.defineProperty(n,a,e.get?e:{enumerable:!0,get:()=>m[a]})}}return n.default=m,Object.freeze(n)}const de=Hn(t),Yn=["AddEquation","SubtractEquation","ReverseSubtractEquation","MinEquation","MaxEquation"],cn=["ZeroFactor","OneFactor","SrcColorFactor","OneMinusSrcColorFactor","SrcAlphaFactor","OneMinusSrcAlphaFactor","DstAlphaFactor","OneMinusDstAlphaFactor","DstColorFactor","OneMinusDstColorFactor","SrcAlphaSaturateFactor","ConstantColorFactor","OneMinusConstantColorFactor","ConstantAlphaFactor","OneMinusConstantAlphaFactor"],zn=[...cn,"SrcAlphaSaturateFactor"],Nn=["NoBlending","NormalBlending","AdditiveBlending","SubtractiveBlending","MultiplyBlending","CustomBlending"],Xn=["NeverDepth","AlwaysDepth","EqualDepth","LessDepth","LessEqualDepth ","GreaterEqualDepth ","GreaterDepth","NotEqualDepth"],Zn=["NeverStencilFunc","LessStencilFunc","EqualStencilFunc","LessEqualStencilFunc ","GreaterStencilFunc","NotEqualStencilFunc ","GreaterEqualStencilFunc","AlwaysStencilFunc"],Pt=["ZeroStencilOp","KeepStencilOp","ReplaceStencilOp","IncrementStencilOp","DecrementStencilOp","IncrementWrapStencilOp","DecrementWrapStencilOp","InvertStencilOp"],Gn=["FrontSide","BackSide","DoubleSide"],Fn=["TangentSpaceNormalMap","ObjectSpaceNormalMap"],Vn=["round","bevel","miter"],Qn=["NoToneMapping","LinearToneMapping","ReinhardToneMapping","CineonToneMapping","ACESFilmicToneMapping","AgXToneMapping","NeutralToneMapping","CustomToneMapping"],qn={intensity:{type:"number",min:0,max:20,step:1e-4},renderOrder:{type:"number",step:1},alphaTest:{type:"number",min:0,max:1,step:.001},blendAlpha:{type:"number",min:0,max:1,step:.001},blendDst:{type:"select",variants:zn},blendDstAlpha:{type:"number",min:0,max:1,step:.001},blendEquation:{type:"select",variants:Yn},blendEquationAlpha:{type:"number",min:0,max:1,step:.001},blending:{type:"select",variants:Nn},blendSrc:{type:"select",variants:cn},blendSrcAlpha:{type:"number",min:0,max:1,step:.001},depthFunc:{type:"select",variants:Xn},stencilFunc:{type:"select",variants:Zn},stencilRef:{type:"number",min:0,step:1},stencilFail:{type:"select",variants:Pt},stencilZFail:{type:"select",variants:Pt},stencilZPass:{type:"select",variants:Pt},opacity:{type:"number",min:0,max:1,step:1e-4},side:{type:"select",variants:Gn},roughness:{type:"number",min:0,max:1,step:1e-4},metalness:{type:"number",min:0,max:1,step:1e-4},lightMapIntensity:{type:"number",min:0,max:20,step:1e-4},aoMapIntensity:{type:"number",min:0,max:20,step:1e-4},bumpScale:{type:"number",min:0,step:1e-4},normalMapType:{type:"select",variants:Fn},wireframeLinejoin:{type:"select",variants:Vn},envMapIntensity:{type:"number",min:0,max:20,step:1e-4},emissiveIntensity:{type:"number",min:0,max:20,step:1e-4},fov:{type:"number",min:0,max:180,step:1},zoom:{type:"number",min:0,step:1e-4},near:{type:"number",min:0,step:1e-4},far:{type:"number",min:0,step:1},filmGauge:{type:"number",min:0,step:1e-4},filmOffset:{type:"number",min:0,step:1e-4},distance:{type:"number",min:0,step:.1},decay:{type:"number",min:0,step:1e-5,ease:.001},focus:{type:"number",min:0,max:1,step:1e-5},bias:{type:"number",min:0,max:.01,step:1e-6,ease:.01},blurSamples:{type:"number",min:0,step:1},normalBias:{type:"number",min:0,step:.001,ease:.01},radius:{type:"number",min:0,step:.001,ease:.01},penumbra:{type:"number",min:0,max:1,step:1e-6},power:{type:"number",min:0,step:.001,ease:.01},angle:{type:"number",min:0,step:1e-6,ease:.001},toneMapping:{type:"select",variants:Qn},toneMappingExposure:{type:"number",min:0,step:.001,ease:.1},mapSize:{type:"number",min:0,step:1},damp:{type:"number",min:0,max:1,step:1e-6},strength:{type:"number",min:0,step:.01},threshold:{type:"number",min:0,max:1,step:1e-4}},Un=new Set(["stencilFuncMask","needsUpdate","version","wireframeLinewidth","position","scale","rotation","coordinateSystem","aspect","autoUpdate","up"]);var Le,ne,M,ln,hn,pn,mn,un,_t,It,ye,be;class he{constructor(n,a){f(this,M);f(this,Le);f(this,ne,[]);x(this,Le,n);const e=se(se({},qn),a==null?void 0:a.optionsCatalog),r=new Set([...Un,...(a==null?void 0:a.skipKeys)||[]]),c=(a==null?void 0:a.folderName)||s(this,Le).name,i=a==null?void 0:a.afterChange;E(this,M,ln).call(this,{subject:s(this,Le),skipKeys:r,optionsCatalog:e,folderKey:c,afterChange:i})}destroy(){s(this,ne).forEach(n=>{n.close()})}}Le=new WeakMap,ne=new WeakMap,M=new WeakSet,ln=function(n){const{subject:a,folderKey:e,optionsCatalog:r,afterChange:c,skipKeys:i}=n;for(const l in a){if(l.startsWith("_")||i.has(l))continue;const u=a[l],p=E(this,M,ye).call(this,u),d=`${e}.${l}`,w=r[l];typeof p=="number"?(w==null?void 0:w.type)==="select"?E(this,M,_t).call(this,{name:d,value:u,subject:a,key:l,managerOptions:w,afterChange:c}):E(this,M,hn).call(this,{name:d,value:u,subject:a,key:l,managerOptions:w,afterChange:c}):p instanceof de.Vector2||p instanceof de.Vector3?E(this,M,pn).call(this,{name:d,value:u,subject:a,key:l,managerOptions:w,afterChange:c}):typeof p=="boolean"&&!l.startsWith("is")&&!l.startsWith("matrix")?E(this,M,mn).call(this,{name:d,value:u,subject:a,key:l,managerOptions:w,afterChange:c}):p instanceof de.Color?E(this,M,un).call(this,{name:d,value:u,subject:a,key:l,managerOptions:w,afterChange:c}):w&&(w==null?void 0:w.type)==="select"&&E(this,M,_t).call(this,{name:d,value:u,subject:a,key:l,managerOptions:w,afterChange:c})}},hn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new X.Store(E(this,M,ye).call(this,a),{passport:{name:n,manager:se({type:"number"},c)}});l.subscribe(u=>{E(this,M,be).call(this,e,r,(p,d)=>p[d]=u.current),i==null||i()}),s(this,ne).push(l)},pn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=p=>{const d=[p.x,p.y];return p instanceof de.Vector3&&d.push(p.z),d},u=new X.Store(l(E(this,M,ye).call(this,a)),{passport:{name:n,manager:se({type:"number"},c)}});u.subscribe(p=>{E(this,M,be).call(this,e,r,(d,w)=>d[w].set(...p.current)),i==null||i()}),s(this,ne).push(u)},mn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new X.Store(E(this,M,ye).call(this,a),{passport:{name:n,manager:se({type:"boolean"},c)}});l.subscribe(u=>{E(this,M,be).call(this,e,r,(p,d)=>p[d]=u.current),i==null||i()}),s(this,ne).push(l)},un=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new X.Store(`#${E(this,M,ye).call(this,a).getHexString()}`,{passport:{name:n,manager:se({type:"color"},c)}});l.subscribe(u=>{E(this,M,be).call(this,e,r,(p,d)=>p[d]=new de.Color(u.current)),i==null||i()}),s(this,ne).push(l)},_t=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=c==null?void 0:c.variants;if(l){let u=null;for(const d of l)a===de[d]&&(u=d);const p=new X.Store(u||E(this,M,ye).call(this,a),{passport:{name:n,manager:se({},c)}});p.subscribe(d=>{typeof d.current=="string"&&(d.current[0]===d.current[0].toUpperCase()?E(this,M,be).call(this,e,r,(w,L)=>w[L]=de[d.current]):E(this,M,be).call(this,e,r,(w,L)=>w[L]=d.current)),i==null||i()}),s(this,ne).push(p)}},It=function(n){return jn.isObject(n)&&"value"in n},ye=function(n){return E(this,M,It).call(this,n)?n.value:n},be=function(n,a,e){E(this,M,It).call(this,n[a])?e(n[a],"value"):e(n,a)};var g,re,ge,Me,Ee,qe,U,Oe,bt,Ue;class Ot{constructor(n,a){f(this,Oe);f(this,g);f(this,re,[]);f(this,ge);f(this,Me);f(this,Ee);f(this,qe,!0);f(this,U,[]);f(this,Ue,()=>{s(this,U).forEach(n=>{"update"in n&&n.update()})});var l,u;x(this,g,n);let e=!1;n.name.startsWith("T.")&&(n.name=n.name.slice(2)),n.name.includes("P.")&&(e=!0,n.name=n.name.replace("P.",""));const r=n.name;s(this,g).userData.controlled=!0;const c=(a==null?void 0:a.step)||1e-4,i=((l=n.userData)==null?void 0:l.box)||n;if(s(this,g)instanceof t.Light){let p;s(this,g)instanceof t.PointLight?p=new t.PointLightHelper(s(this,g),100):s(this,g)instanceof t.DirectionalLight?(s(this,g).scale.setScalar(100),p=new t.DirectionalLightHelper(s(this,g),1)):s(this,g)instanceof t.SpotLight?p=new t.SpotLightHelper(s(this,g)):s(this,g)instanceof t.HemisphereLight&&(p=new t.HemisphereLightHelper(s(this,g),100)),s(this,U).push(p);const d=(u=s(this,g).shadow)==null?void 0:u.camera;if(d instanceof t.Camera){const w=new t.CameraHelper(d);s(this,U).push(w)}}if(s(this,U).forEach(p=>{y.en3.view.add(p)}),x(this,ge,new X.Store([i.position.x,i.position.y,i.position.z],{passport:{name:`${r}.Transformation.Position`,manager:{type:"number",step:c}}})),x(this,Me,new X.Store([i.rotation.x,i.rotation.y,i.rotation.z],{passport:{name:`${r}.Transformation.Rotation`,manager:{type:"number",step:c,ease:.01}}})),x(this,Ee,new X.Store([i.scale.x,i.scale.y,i.scale.z],{passport:{name:`${r}.Transformation.Scale`,manager:{type:"number",step:c}}})),this.save(),x(this,qe,!1),s(this,ge).subscribe(p=>{E(this,Oe,bt).call(this,"position",p.current)}),s(this,Me).subscribe(p=>{E(this,Oe,bt).call(this,"rotation",p.current)}),s(this,Ee).subscribe(p=>{E(this,Oe,bt).call(this,"scale",p.current)}),e){if(s(this,re).push(new he(s(this,g),{folderName:`${s(this,g).name}.Parameters`,afterChange:s(this,g)instanceof t.Camera?()=>{y.en3.view.resize()}:void 0})),s(this,g)instanceof t.Mesh){const p=s(this,g).material;p instanceof t.Material&&s(this,re).push(new he(p,{folderName:`${s(this,g).name}.Parameters.Material`,afterChange:()=>{p.needsUpdate=!0}}))}else if(s(this,g)instanceof t.Light){const p=s(this,g).shadow;p&&s(this,re).push(new he(p,{folderName:`${s(this,g).name}.Parameters.Shadow`,afterChange:()=>{p.needsUpdate=!0}})),p.camera&&s(this,re).push(new he(p,{folderName:`${s(this,g).name}.Parameters.Shadow.Camera`,afterChange:()=>{p.camera.updateProjectionMatrix()}}))}}s(this,U).length&&Wt.ticker.subscribe(s(this,Ue))}get object3d(){return s(this,g)}get helpers(){return s(this,U)}get raycasterTarget(){return s(this,U)[0]||s(this,g)}destroy(){s(this,re).forEach(n=>n.destroy()),s(this,ge).close(),s(this,Me).close(),s(this,Ee).close(),s(this,g).userData.controlled=!1,s(this,U).forEach(n=>{n&&"dispose"in n&&(n.dispose(),y.en3.view.remove(n))}),Wt.ticker.unsubscribe(s(this,Ue))}save(){const n=(a,e)=>{(!s(this,qe)||a.initial===a.current)&&(a.current=[e.x,e.y,e.z])};n(s(this,ge),s(this,g).position),n(s(this,Me),s(this,g).rotation),n(s(this,Ee),s(this,g).scale)}}g=new WeakMap,re=new WeakMap,ge=new WeakMap,Me=new WeakMap,Ee=new WeakMap,qe=new WeakMap,U=new WeakMap,Oe=new WeakSet,bt=function(n,a){const e=s(this,g).userData.box;if(e){const r=c=>({x:a[0]-c.x,y:a[1]-c.y,z:a[2]-c.z});n==="position"?e.setPositionStep("_manager","+",r(e.getIncludedPositionSteps("_manager"))):n==="rotation"?e.setRotationStep("_manager","+",r(e.getIncludedRotationSteps("_manager"))):n==="scale"&&e.setScaleStep("_manager","+",r(e.getIncludedScaleSteps("_manager")))}else s(this,g)[n].set(...a)},Ue=new WeakMap;const Kt={type:"change"},xt={type:"start"},$t={type:"end"},ut=new t.Ray,Jt=new t.Plane,Bn=Math.cos(70*t.MathUtils.DEG2RAD);class Wn extends t.EventDispatcher{constructor(n,a){super(),this.object=n,this.domElement=a,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new t.Vector3,this.cursor=new t.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:t.MOUSE.ROTATE,MIDDLE:t.MOUSE.DOLLY,RIGHT:t.MOUSE.PAN},this.touches={ONE:t.TOUCH.ROTATE,TWO:t.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return l.phi},this.getAzimuthalAngle=function(){return l.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(o){o.addEventListener("keydown",Et),this._domElementKeyEvents=o},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",Et),this._domElementKeyEvents=null},this.saveState=function(){e.target0.copy(e.target),e.position0.copy(e.object.position),e.zoom0=e.object.zoom},this.reset=function(){e.target.copy(e.target0),e.object.position.copy(e.position0),e.object.zoom=e.zoom0,e.object.updateProjectionMatrix(),e.dispatchEvent(Kt),e.update(),c=r.NONE},this.update=function(){const o=new t.Vector3,h=new t.Quaternion().setFromUnitVectors(n.up,new t.Vector3(0,1,0)),b=h.clone().invert(),P=new t.Vector3,N=new t.Quaternion,ie=new t.Vector3,F=2*Math.PI;return function(Ln=null){const Vt=e.object.position;o.copy(Vt).sub(e.target),o.applyQuaternion(h),l.setFromVector3(o),e.autoRotate&&c===r.NONE&&me(gt(Ln)),e.enableDamping?(l.theta+=u.theta*e.dampingFactor,l.phi+=u.phi*e.dampingFactor):(l.theta+=u.theta,l.phi+=u.phi);let J=e.minAzimuthAngle,ee=e.maxAzimuthAngle;isFinite(J)&&isFinite(ee)&&(J<-Math.PI?J+=F:J>Math.PI&&(J-=F),ee<-Math.PI?ee+=F:ee>Math.PI&&(ee-=F),J<=ee?l.theta=Math.max(J,Math.min(ee,l.theta)):l.theta=l.theta>(J+ee)/2?Math.max(J,l.theta):Math.min(ee,l.theta)),l.phi=Math.max(e.minPolarAngle,Math.min(e.maxPolarAngle,l.phi)),l.makeSafe(),e.enableDamping===!0?e.target.addScaledVector(d,e.dampingFactor):e.target.add(d),e.target.sub(e.cursor),e.target.clampLength(e.minTargetRadius,e.maxTargetRadius),e.target.add(e.cursor);let Xe=!1;if(e.zoomToCursor&&ve||e.object.isOrthographicCamera)l.radius=oe(l.radius);else{const te=l.radius;l.radius=oe(l.radius*p),Xe=te!=l.radius}if(o.setFromSpherical(l),o.applyQuaternion(b),Vt.copy(e.target).add(o),e.object.lookAt(e.target),e.enableDamping===!0?(u.theta*=1-e.dampingFactor,u.phi*=1-e.dampingFactor,d.multiplyScalar(1-e.dampingFactor)):(u.set(0,0,0),d.set(0,0,0)),e.zoomToCursor&&ve){let te=null;if(e.object.isPerspectiveCamera){const Ze=o.length();te=oe(Ze*p);const mt=Ze-te;e.object.position.addScaledVector(K,mt),e.object.updateMatrixWorld(),Xe=!!mt}else if(e.object.isOrthographicCamera){const Ze=new t.Vector3(k.x,k.y,0);Ze.unproject(e.object);const mt=e.object.zoom;e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/p)),e.object.updateProjectionMatrix(),Xe=mt!==e.object.zoom;const Qt=new t.Vector3(k.x,k.y,0);Qt.unproject(e.object),e.object.position.sub(Qt).add(Ze),e.object.updateMatrixWorld(),te=o.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),e.zoomToCursor=!1;te!==null&&(this.screenSpacePanning?e.target.set(0,0,-1).transformDirection(e.object.matrix).multiplyScalar(te).add(e.object.position):(ut.origin.copy(e.object.position),ut.direction.set(0,0,-1).transformDirection(e.object.matrix),Math.abs(e.object.up.dot(ut.direction))<Bn?n.lookAt(e.target):(Jt.setFromNormalAndCoplanarPoint(e.object.up,e.target),ut.intersectPlane(Jt,e.target))))}else if(e.object.isOrthographicCamera){const te=e.object.zoom;e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/p)),te!==e.object.zoom&&(e.object.updateProjectionMatrix(),Xe=!0)}return p=1,ve=!1,Xe||P.distanceToSquared(e.object.position)>i||8*(1-N.dot(e.object.quaternion))>i||ie.distanceToSquared(e.target)>i?(e.dispatchEvent(Kt),P.copy(e.object.position),N.copy(e.object.quaternion),ie.copy(e.target),!0):!1}}(),this.dispose=function(){e.domElement.removeEventListener("contextmenu",Gt),e.domElement.removeEventListener("pointerdown",Yt),e.domElement.removeEventListener("pointercancel",Ne),e.domElement.removeEventListener("wheel",zt),e.domElement.removeEventListener("pointermove",Mt),e.domElement.removeEventListener("pointerup",Ne),e.domElement.getRootNode().removeEventListener("keydown",Nt,{capture:!0}),e._domElementKeyEvents!==null&&(e._domElementKeyEvents.removeEventListener("keydown",Et),e._domElementKeyEvents=null)};const e=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let c=r.NONE;const i=1e-6,l=new t.Spherical,u=new t.Spherical;let p=1;const d=new t.Vector3,w=new t.Vector2,L=new t.Vector2,W=new t.Vector2,Z=new t.Vector2,O=new t.Vector2,j=new t.Vector2,D=new t.Vector2,T=new t.Vector2,_=new t.Vector2,K=new t.Vector3,k=new t.Vector2;let ve=!1;const I=[],pe={};let ze=!1;function gt(o){return o!==null?2*Math.PI/60*e.autoRotateSpeed*o:2*Math.PI/60/60*e.autoRotateSpeed}function Te(o){const h=Math.abs(o*.01);return Math.pow(.95,e.zoomSpeed*h)}function me(o){u.theta-=o}function _e(o){u.phi-=o}const G=function(){const o=new t.Vector3;return function(b,P){o.setFromMatrixColumn(P,0),o.multiplyScalar(-b),d.add(o)}}(),Y=function(){const o=new t.Vector3;return function(b,P){e.screenSpacePanning===!0?o.setFromMatrixColumn(P,1):(o.setFromMatrixColumn(P,0),o.crossVectors(e.object.up,o)),o.multiplyScalar(b),d.add(o)}}(),q=function(){const o=new t.Vector3;return function(b,P){const N=e.domElement;if(e.object.isPerspectiveCamera){const ie=e.object.position;o.copy(ie).sub(e.target);let F=o.length();F*=Math.tan(e.object.fov/2*Math.PI/180),G(2*b*F/N.clientHeight,e.object.matrix),Y(2*P*F/N.clientHeight,e.object.matrix)}else e.object.isOrthographicCamera?(G(b*(e.object.right-e.object.left)/e.object.zoom/N.clientWidth,e.object.matrix),Y(P*(e.object.top-e.object.bottom)/e.object.zoom/N.clientHeight,e.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1)}}();function z(o){e.object.isPerspectiveCamera||e.object.isOrthographicCamera?p/=o:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function $(o){e.object.isPerspectiveCamera||e.object.isOrthographicCamera?p*=o:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function A(o,h){if(!e.zoomToCursor)return;ve=!0;const b=e.domElement.getBoundingClientRect(),P=o-b.left,N=h-b.top,ie=b.width,F=b.height;k.x=P/ie*2-1,k.y=-(N/F)*2+1,K.set(k.x,k.y,1).unproject(e.object).sub(e.object.position).normalize()}function oe(o){return Math.max(e.minDistance,Math.min(e.maxDistance,o))}function ue(o){w.set(o.clientX,o.clientY)}function Ie(o){A(o.clientX,o.clientX),D.set(o.clientX,o.clientY)}function ht(o){Z.set(o.clientX,o.clientY)}function pt(o){L.set(o.clientX,o.clientY),W.subVectors(L,w).multiplyScalar(e.rotateSpeed);const h=e.domElement;me(2*Math.PI*W.x/h.clientHeight),_e(2*Math.PI*W.y/h.clientHeight),w.copy(L),e.update()}function fn(o){T.set(o.clientX,o.clientY),_.subVectors(T,D),_.y>0?z(Te(_.y)):_.y<0&&$(Te(_.y)),D.copy(T),e.update()}function yn(o){O.set(o.clientX,o.clientY),j.subVectors(O,Z).multiplyScalar(e.panSpeed),q(j.x,j.y),Z.copy(O),e.update()}function bn(o){A(o.clientX,o.clientY),o.deltaY<0?$(Te(o.deltaY)):o.deltaY>0&&z(Te(o.deltaY)),e.update()}function wn(o){let h=!1;switch(o.code){case e.keys.UP:o.ctrlKey||o.metaKey||o.shiftKey?_e(2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):q(0,e.keyPanSpeed),h=!0;break;case e.keys.BOTTOM:o.ctrlKey||o.metaKey||o.shiftKey?_e(-2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):q(0,-e.keyPanSpeed),h=!0;break;case e.keys.LEFT:o.ctrlKey||o.metaKey||o.shiftKey?me(2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):q(e.keyPanSpeed,0),h=!0;break;case e.keys.RIGHT:o.ctrlKey||o.metaKey||o.shiftKey?me(-2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):q(-e.keyPanSpeed,0),h=!0;break}h&&(o.preventDefault(),e.update())}function Dt(o){if(I.length===1)w.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),P=.5*(o.pageY+h.y);w.set(b,P)}}function Ct(o){if(I.length===1)Z.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),P=.5*(o.pageY+h.y);Z.set(b,P)}}function jt(o){const h=Ae(o),b=o.pageX-h.x,P=o.pageY-h.y,N=Math.sqrt(b*b+P*P);D.set(0,N)}function gn(o){e.enableZoom&&jt(o),e.enablePan&&Ct(o)}function Mn(o){e.enableZoom&&jt(o),e.enableRotate&&Dt(o)}function kt(o){if(I.length==1)L.set(o.pageX,o.pageY);else{const b=Ae(o),P=.5*(o.pageX+b.x),N=.5*(o.pageY+b.y);L.set(P,N)}W.subVectors(L,w).multiplyScalar(e.rotateSpeed);const h=e.domElement;me(2*Math.PI*W.x/h.clientHeight),_e(2*Math.PI*W.y/h.clientHeight),w.copy(L)}function Rt(o){if(I.length===1)O.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),P=.5*(o.pageY+h.y);O.set(b,P)}j.subVectors(O,Z).multiplyScalar(e.panSpeed),q(j.x,j.y),Z.copy(O)}function Ht(o){const h=Ae(o),b=o.pageX-h.x,P=o.pageY-h.y,N=Math.sqrt(b*b+P*P);T.set(0,N),_.set(0,Math.pow(T.y/D.y,e.zoomSpeed)),z(_.y),D.copy(T);const ie=(o.pageX+h.x)*.5,F=(o.pageY+h.y)*.5;A(ie,F)}function En(o){e.enableZoom&&Ht(o),e.enablePan&&Rt(o)}function Sn(o){e.enableZoom&&Ht(o),e.enableRotate&&kt(o)}function Yt(o){e.enabled!==!1&&(I.length===0&&(e.domElement.setPointerCapture(o.pointerId),e.domElement.addEventListener("pointermove",Mt),e.domElement.addEventListener("pointerup",Ne)),!An(o)&&(_n(o),o.pointerType==="touch"?Zt(o):Pn(o)))}function Mt(o){e.enabled!==!1&&(o.pointerType==="touch"?Tn(o):xn(o))}function Ne(o){switch(In(o),I.length){case 0:e.domElement.releasePointerCapture(o.pointerId),e.domElement.removeEventListener("pointermove",Mt),e.domElement.removeEventListener("pointerup",Ne),e.dispatchEvent($t),c=r.NONE;break;case 1:const h=I[0],b=pe[h];Zt({pointerId:h,pageX:b.x,pageY:b.y});break}}function Pn(o){let h;switch(o.button){case 0:h=e.mouseButtons.LEFT;break;case 1:h=e.mouseButtons.MIDDLE;break;case 2:h=e.mouseButtons.RIGHT;break;default:h=-1}switch(h){case t.MOUSE.DOLLY:if(e.enableZoom===!1)return;Ie(o),c=r.DOLLY;break;case t.MOUSE.ROTATE:if(o.ctrlKey||o.metaKey||o.shiftKey){if(e.enablePan===!1)return;ht(o),c=r.PAN}else{if(e.enableRotate===!1)return;ue(o),c=r.ROTATE}break;case t.MOUSE.PAN:if(o.ctrlKey||o.metaKey||o.shiftKey){if(e.enableRotate===!1)return;ue(o),c=r.ROTATE}else{if(e.enablePan===!1)return;ht(o),c=r.PAN}break;default:c=r.NONE}c!==r.NONE&&e.dispatchEvent(xt)}function xn(o){switch(c){case r.ROTATE:if(e.enableRotate===!1)return;pt(o);break;case r.DOLLY:if(e.enableZoom===!1)return;fn(o);break;case r.PAN:if(e.enablePan===!1)return;yn(o);break}}function zt(o){e.enabled===!1||e.enableZoom===!1||c!==r.NONE||(o.preventDefault(),e.dispatchEvent(xt),bn(vn(o)),e.dispatchEvent($t))}function vn(o){const h=o.deltaMode,b={clientX:o.clientX,clientY:o.clientY,deltaY:o.deltaY};switch(h){case 1:b.deltaY*=16;break;case 2:b.deltaY*=100;break}return o.ctrlKey&&!ze&&(b.deltaY*=10),b}function Nt(o){o.key==="Control"&&(ze=!0,e.domElement.getRootNode().addEventListener("keyup",Xt,{passive:!0,capture:!0}))}function Xt(o){o.key==="Control"&&(ze=!1,e.domElement.getRootNode().removeEventListener("keyup",Xt,{passive:!0,capture:!0}))}function Et(o){e.enabled===!1||e.enablePan===!1||wn(o)}function Zt(o){switch(Ft(o),I.length){case 1:switch(e.touches.ONE){case t.TOUCH.ROTATE:if(e.enableRotate===!1)return;Dt(o),c=r.TOUCH_ROTATE;break;case t.TOUCH.PAN:if(e.enablePan===!1)return;Ct(o),c=r.TOUCH_PAN;break;default:c=r.NONE}break;case 2:switch(e.touches.TWO){case t.TOUCH.DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;gn(o),c=r.TOUCH_DOLLY_PAN;break;case t.TOUCH.DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;Mn(o),c=r.TOUCH_DOLLY_ROTATE;break;default:c=r.NONE}break;default:c=r.NONE}c!==r.NONE&&e.dispatchEvent(xt)}function Tn(o){switch(Ft(o),c){case r.TOUCH_ROTATE:if(e.enableRotate===!1)return;kt(o),e.update();break;case r.TOUCH_PAN:if(e.enablePan===!1)return;Rt(o),e.update();break;case r.TOUCH_DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;En(o),e.update();break;case r.TOUCH_DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;Sn(o),e.update();break;default:c=r.NONE}}function Gt(o){e.enabled!==!1&&o.preventDefault()}function _n(o){I.push(o.pointerId)}function In(o){delete pe[o.pointerId];for(let h=0;h<I.length;h++)if(I[h]==o.pointerId){I.splice(h,1);return}}function An(o){for(let h=0;h<I.length;h++)if(I[h]==o.pointerId)return!0;return!1}function Ft(o){let h=pe[o.pointerId];h===void 0&&(h=new t.Vector2,pe[o.pointerId]=h),h.set(o.pageX,o.pageY)}function Ae(o){const h=o.pointerId===I[0]?I[1]:I[0];return pe[h]}e.domElement.addEventListener("contextmenu",Gt),e.domElement.addEventListener("pointerdown",Yt),e.domElement.addEventListener("pointercancel",Ne),e.domElement.addEventListener("wheel",zt,{passive:!1}),e.domElement.getRootNode().addEventListener("keydown",Nt,{passive:!0,capture:!0}),this.update()}}const fe=new t.Raycaster,H=new t.Vector3,ae=new t.Vector3,v=new t.Quaternion,en={X:new t.Vector3(1,0,0),Y:new t.Vector3(0,1,0),Z:new t.Vector3(0,0,1)},vt={type:"change"},tn={type:"mouseDown",mode:null},nn={type:"mouseUp",mode:null},on={type:"objectChange"};class Kn extends t.Object3D{constructor(n,a){super(),a===void 0&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),a=document),this.isTransformControls=!0,this.visible=!1,this.domElement=a,this.domElement.style.touchAction="none";const e=new oo;this._gizmo=e,this.add(e);const r=new io;this._plane=r,this.add(r);const c=this;function i(T,_){let K=_;Object.defineProperty(c,T,{get:function(){return K!==void 0?K:_},set:function(k){K!==k&&(K=k,r[T]=k,e[T]=k,c.dispatchEvent({type:T+"-changed",value:k}),c.dispatchEvent(vt))}}),c[T]=_,r[T]=_,e[T]=_}i("camera",n),i("object",void 0),i("enabled",!0),i("axis",null),i("mode","translate"),i("translationSnap",null),i("rotationSnap",null),i("scaleSnap",null),i("space","world"),i("size",1),i("dragging",!1),i("showX",!0),i("showY",!0),i("showZ",!0);const l=new t.Vector3,u=new t.Vector3,p=new t.Quaternion,d=new t.Quaternion,w=new t.Vector3,L=new t.Quaternion,W=new t.Vector3,Z=new t.Vector3,O=new t.Vector3,j=0,D=new t.Vector3;i("worldPosition",l),i("worldPositionStart",u),i("worldQuaternion",p),i("worldQuaternionStart",d),i("cameraPosition",w),i("cameraQuaternion",L),i("pointStart",W),i("pointEnd",Z),i("rotationAxis",O),i("rotationAngle",j),i("eye",D),this._offset=new t.Vector3,this._startNorm=new t.Vector3,this._endNorm=new t.Vector3,this._cameraScale=new t.Vector3,this._parentPosition=new t.Vector3,this._parentQuaternion=new t.Quaternion,this._parentQuaternionInv=new t.Quaternion,this._parentScale=new t.Vector3,this._worldScaleStart=new t.Vector3,this._worldQuaternionInv=new t.Quaternion,this._worldScale=new t.Vector3,this._positionStart=new t.Vector3,this._quaternionStart=new t.Quaternion,this._scaleStart=new t.Vector3,this._getPointer=$n.bind(this),this._onPointerDown=eo.bind(this),this._onPointerHover=Jn.bind(this),this._onPointerMove=to.bind(this),this._onPointerUp=no.bind(this),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp)}updateMatrixWorld(n){this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this._parentPosition,this._parentQuaternion,this._parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this._worldScale),this._parentQuaternionInv.copy(this._parentQuaternion).invert(),this._worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this._cameraScale),this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye).negate():this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld(n)}pointerHover(n){if(this.object===void 0||this.dragging===!0)return;n!==null&&fe.setFromCamera(n,this.camera);const a=Tt(this._gizmo.picker[this.mode],fe);a?this.axis=a.object.name:this.axis=null}pointerDown(n){if(!(this.object===void 0||this.dragging===!0||n!=null&&n.button!==0)&&this.axis!==null){n!==null&&fe.setFromCamera(n,this.camera);const a=Tt(this._plane,fe,!0);a&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(a.point).sub(this.worldPositionStart)),this.dragging=!0,tn.mode=this.mode,this.dispatchEvent(tn)}}pointerMove(n){const a=this.axis,e=this.mode,r=this.object;let c=this.space;if(e==="scale"?c="local":(a==="E"||a==="XYZE"||a==="XYZ")&&(c="world"),r===void 0||a===null||this.dragging===!1||n!==null&&n.button!==-1)return;n!==null&&fe.setFromCamera(n,this.camera);const i=Tt(this._plane,fe,!0);if(i){if(this.pointEnd.copy(i.point).sub(this.worldPositionStart),e==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),c==="local"&&a!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),a.indexOf("X")===-1&&(this._offset.x=0),a.indexOf("Y")===-1&&(this._offset.y=0),a.indexOf("Z")===-1&&(this._offset.z=0),c==="local"&&a!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),r.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(c==="local"&&(r.position.applyQuaternion(v.copy(this._quaternionStart).invert()),a.search("X")!==-1&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),a.search("Y")!==-1&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),a.search("Z")!==-1&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.position.applyQuaternion(this._quaternionStart)),c==="world"&&(r.parent&&r.position.add(H.setFromMatrixPosition(r.parent.matrixWorld)),a.search("X")!==-1&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),a.search("Y")!==-1&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),a.search("Z")!==-1&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.parent&&r.position.sub(H.setFromMatrixPosition(r.parent.matrixWorld))));else if(e==="scale"){if(a.search("XYZ")!==-1){let l=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(l*=-1),ae.set(l,l,l)}else H.copy(this.pointStart),ae.copy(this.pointEnd),H.applyQuaternion(this._worldQuaternionInv),ae.applyQuaternion(this._worldQuaternionInv),ae.divide(H),a.search("X")===-1&&(ae.x=1),a.search("Y")===-1&&(ae.y=1),a.search("Z")===-1&&(ae.z=1);r.scale.copy(this._scaleStart).multiply(ae),this.scaleSnap&&(a.search("X")!==-1&&(r.scale.x=Math.round(r.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),a.search("Y")!==-1&&(r.scale.y=Math.round(r.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),a.search("Z")!==-1&&(r.scale.z=Math.round(r.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(e==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const l=20/this.worldPosition.distanceTo(H.setFromMatrixPosition(this.camera.matrixWorld));let u=!1;a==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(H.copy(this.rotationAxis).cross(this.eye))*l):(a==="X"||a==="Y"||a==="Z")&&(this.rotationAxis.copy(en[a]),H.copy(en[a]),c==="local"&&H.applyQuaternion(this.worldQuaternion),H.cross(this.eye),H.length()===0?u=!0:this.rotationAngle=this._offset.dot(H.normalize())*l),(a==="E"||u)&&(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),c==="local"&&a!=="E"&&a!=="XYZE"?(r.quaternion.copy(this._quaternionStart),r.quaternion.multiply(v.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),r.quaternion.copy(v.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),r.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(vt),this.dispatchEvent(on)}}pointerUp(n){n!==null&&n.button!==0||(this.dragging&&this.axis!==null&&(nn.mode=this.mode,this.dispatchEvent(nn)),this.dragging=!1,this.axis=null)}dispose(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.traverse(function(n){n.geometry&&n.geometry.dispose(),n.material&&n.material.dispose()})}attach(n){return this.object=n,this.visible=!0,this}detach(){return this.object=void 0,this.visible=!1,this.axis=null,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(vt),this.dispatchEvent(on),this.pointStart.copy(this.pointEnd))}getRaycaster(){return fe}getMode(){return this.mode}setMode(n){this.mode=n}setTranslationSnap(n){this.translationSnap=n}setRotationSnap(n){this.rotationSnap=n}setScaleSnap(n){this.scaleSnap=n}setSize(n){this.size=n}setSpace(n){this.space=n}}function $n(m){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:m.button};{const n=this.domElement.getBoundingClientRect();return{x:(m.clientX-n.left)/n.width*2-1,y:-(m.clientY-n.top)/n.height*2+1,button:m.button}}}function Jn(m){if(this.enabled)switch(m.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(m));break}}function eo(m){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(m.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(m)),this.pointerDown(this._getPointer(m)))}function to(m){this.enabled&&this.pointerMove(this._getPointer(m))}function no(m){this.enabled&&(this.domElement.releasePointerCapture(m.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(m)))}function Tt(m,n,a){const e=n.intersectObject(m,!0);for(let r=0;r<e.length;r++)if(e[r].object.visible||a)return e[r];return!1}const dt=new t.Euler,S=new t.Vector3(0,1,0),sn=new t.Vector3(0,0,0),an=new t.Matrix4,ft=new t.Quaternion,wt=new t.Quaternion,B=new t.Vector3,rn=new t.Matrix4,Ve=new t.Vector3(1,0,0),we=new t.Vector3(0,1,0),Qe=new t.Vector3(0,0,1),yt=new t.Vector3,Ge=new t.Vector3,Fe=new t.Vector3;class oo extends t.Object3D{constructor(){super(),this.isTransformControlsGizmo=!0,this.type="TransformControlsGizmo";const n=new t.MeshBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),a=new t.LineBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),e=n.clone();e.opacity=.15;const r=a.clone();r.opacity=.5;const c=n.clone();c.color.setHex(16711680);const i=n.clone();i.color.setHex(65280);const l=n.clone();l.color.setHex(255);const u=n.clone();u.color.setHex(16711680),u.opacity=.5;const p=n.clone();p.color.setHex(65280),p.opacity=.5;const d=n.clone();d.color.setHex(255),d.opacity=.5;const w=n.clone();w.opacity=.25;const L=n.clone();L.color.setHex(16776960),L.opacity=.25,n.clone().color.setHex(16776960);const Z=n.clone();Z.color.setHex(7895160);const O=new t.CylinderGeometry(0,.04,.1,12);O.translate(0,.05,0);const j=new t.BoxGeometry(.08,.08,.08);j.translate(0,.04,0);const D=new t.BufferGeometry;D.setAttribute("position",new t.Float32BufferAttribute([0,0,0,1,0,0],3));const T=new t.CylinderGeometry(.0075,.0075,.5,3);T.translate(0,.25,0);function _(Y,q){const z=new t.TorusGeometry(Y,.0075,3,64,q*Math.PI*2);return z.rotateY(Math.PI/2),z.rotateX(Math.PI/2),z}function K(){const Y=new t.BufferGeometry;return Y.setAttribute("position",new t.Float32BufferAttribute([0,0,0,1,1,1],3)),Y}const k={X:[[new t.Mesh(O,c),[.5,0,0],[0,0,-Math.PI/2]],[new t.Mesh(O,c),[-.5,0,0],[0,0,Math.PI/2]],[new t.Mesh(T,c),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new t.Mesh(O,i),[0,.5,0]],[new t.Mesh(O,i),[0,-.5,0],[Math.PI,0,0]],[new t.Mesh(T,i)]],Z:[[new t.Mesh(O,l),[0,0,.5],[Math.PI/2,0,0]],[new t.Mesh(O,l),[0,0,-.5],[-Math.PI/2,0,0]],[new t.Mesh(T,l),null,[Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.OctahedronGeometry(.1,0),w.clone()),[0,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),d.clone()),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),u.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),p.clone()),[.15,0,.15],[-Math.PI/2,0,0]]]},ve={X:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[.3,0,0],[0,0,-Math.PI/2]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,.3,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,-.3,0],[0,0,Math.PI]]],Z:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,.3],[Math.PI/2,0,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.OctahedronGeometry(.2,0),e)]],XY:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,0,.15],[-Math.PI/2,0,0]]]},I={START:[[new t.Mesh(new t.OctahedronGeometry(.01,2),r),null,null,null,"helper"]],END:[[new t.Mesh(new t.OctahedronGeometry(.01,2),r),null,null,null,"helper"]],DELTA:[[new t.Line(K(),r),null,null,null,"helper"]],X:[[new t.Line(D,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new t.Line(D,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new t.Line(D,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},pe={XYZE:[[new t.Mesh(_(.5,1),Z),null,[0,Math.PI/2,0]]],X:[[new t.Mesh(_(.5,.5),c)]],Y:[[new t.Mesh(_(.5,.5),i),null,[0,0,-Math.PI/2]]],Z:[[new t.Mesh(_(.5,.5),l),null,[0,Math.PI/2,0]]],E:[[new t.Mesh(_(.75,1),L),null,[0,Math.PI/2,0]]]},ze={AXIS:[[new t.Line(D,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},gt={XYZE:[[new t.Mesh(new t.SphereGeometry(.25,10,8),e)]],X:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[Math.PI/2,0,0]]],Z:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[0,0,-Math.PI/2]]],E:[[new t.Mesh(new t.TorusGeometry(.75,.1,2,24),e)]]},Te={X:[[new t.Mesh(j,c),[.5,0,0],[0,0,-Math.PI/2]],[new t.Mesh(T,c),[0,0,0],[0,0,-Math.PI/2]],[new t.Mesh(j,c),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(j,i),[0,.5,0]],[new t.Mesh(T,i)],[new t.Mesh(j,i),[0,-.5,0],[0,0,Math.PI]]],Z:[[new t.Mesh(j,l),[0,0,.5],[Math.PI/2,0,0]],[new t.Mesh(T,l),[0,0,0],[Math.PI/2,0,0]],[new t.Mesh(j,l),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),d),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),u),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),p),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.BoxGeometry(.1,.1,.1),w.clone())]]},me={X:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[.3,0,0],[0,0,-Math.PI/2]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,.3,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,-.3,0],[0,0,Math.PI]]],Z:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,.3],[Math.PI/2,0,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.2),e),[0,0,0]]]},_e={X:[[new t.Line(D,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new t.Line(D,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new t.Line(D,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function G(Y){const q=new t.Object3D;for(const z in Y)for(let $=Y[z].length;$--;){const A=Y[z][$][0].clone(),oe=Y[z][$][1],ue=Y[z][$][2],Ie=Y[z][$][3],ht=Y[z][$][4];A.name=z,A.tag=ht,oe&&A.position.set(oe[0],oe[1],oe[2]),ue&&A.rotation.set(ue[0],ue[1],ue[2]),Ie&&A.scale.set(Ie[0],Ie[1],Ie[2]),A.updateMatrix();const pt=A.geometry.clone();pt.applyMatrix4(A.matrix),A.geometry=pt,A.renderOrder=1/0,A.position.set(0,0,0),A.rotation.set(0,0,0),A.scale.set(1,1,1),q.add(A)}return q}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=G(k)),this.add(this.gizmo.rotate=G(pe)),this.add(this.gizmo.scale=G(Te)),this.add(this.picker.translate=G(ve)),this.add(this.picker.rotate=G(gt)),this.add(this.picker.scale=G(me)),this.add(this.helper.translate=G(I)),this.add(this.helper.rotate=G(ze)),this.add(this.helper.scale=G(_e)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(n){const e=(this.mode==="scale"?"local":this.space)==="local"?this.worldQuaternion:wt;this.gizmo.translate.visible=this.mode==="translate",this.gizmo.rotate.visible=this.mode==="rotate",this.gizmo.scale.visible=this.mode==="scale",this.helper.translate.visible=this.mode==="translate",this.helper.rotate.visible=this.mode==="rotate",this.helper.scale.visible=this.mode==="scale";let r=[];r=r.concat(this.picker[this.mode].children),r=r.concat(this.gizmo[this.mode].children),r=r.concat(this.helper[this.mode].children);for(let c=0;c<r.length;c++){const i=r[c];i.visible=!0,i.rotation.set(0,0,0),i.position.copy(this.worldPosition);let l;if(this.camera.isOrthographicCamera?l=(this.camera.top-this.camera.bottom)/this.camera.zoom:l=this.worldPosition.distanceTo(this.cameraPosition)*Math.min(1.9*Math.tan(Math.PI*this.camera.fov/360)/this.camera.zoom,7),i.scale.set(1,1,1).multiplyScalar(l*this.size/4),i.tag==="helper"){i.visible=!1,i.name==="AXIS"?(i.visible=!!this.axis,this.axis==="X"&&(v.setFromEuler(dt.set(0,0,0)),i.quaternion.copy(e).multiply(v),Math.abs(S.copy(Ve).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Y"&&(v.setFromEuler(dt.set(0,0,Math.PI/2)),i.quaternion.copy(e).multiply(v),Math.abs(S.copy(we).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Z"&&(v.setFromEuler(dt.set(0,Math.PI/2,0)),i.quaternion.copy(e).multiply(v),Math.abs(S.copy(Qe).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="XYZE"&&(v.setFromEuler(dt.set(0,Math.PI/2,0)),S.copy(this.rotationAxis),i.quaternion.setFromRotationMatrix(an.lookAt(sn,S,we)),i.quaternion.multiply(v),i.visible=this.dragging),this.axis==="E"&&(i.visible=!1)):i.name==="START"?(i.position.copy(this.worldPositionStart),i.visible=this.dragging):i.name==="END"?(i.position.copy(this.worldPosition),i.visible=this.dragging):i.name==="DELTA"?(i.position.copy(this.worldPositionStart),i.quaternion.copy(this.worldQuaternionStart),H.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),H.applyQuaternion(this.worldQuaternionStart.clone().invert()),i.scale.copy(H),i.visible=this.dragging):(i.quaternion.copy(e),this.dragging?i.position.copy(this.worldPositionStart):i.position.copy(this.worldPosition),this.axis&&(i.visible=this.axis.search(i.name)!==-1));continue}i.quaternion.copy(e),this.mode==="translate"||this.mode==="scale"?(i.name==="X"&&Math.abs(S.copy(Ve).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Y"&&Math.abs(S.copy(we).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Z"&&Math.abs(S.copy(Qe).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XY"&&Math.abs(S.copy(Qe).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="YZ"&&Math.abs(S.copy(Ve).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XZ"&&Math.abs(S.copy(we).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1)):this.mode==="rotate"&&(ft.copy(e),S.copy(this.eye).applyQuaternion(v.copy(e).invert()),i.name.search("E")!==-1&&i.quaternion.setFromRotationMatrix(an.lookAt(this.eye,sn,we)),i.name==="X"&&(v.setFromAxisAngle(Ve,Math.atan2(-S.y,S.z)),v.multiplyQuaternions(ft,v),i.quaternion.copy(v)),i.name==="Y"&&(v.setFromAxisAngle(we,Math.atan2(S.x,S.z)),v.multiplyQuaternions(ft,v),i.quaternion.copy(v)),i.name==="Z"&&(v.setFromAxisAngle(Qe,Math.atan2(S.y,S.x)),v.multiplyQuaternions(ft,v),i.quaternion.copy(v))),i.visible=i.visible&&(i.name.indexOf("X")===-1||this.showX),i.visible=i.visible&&(i.name.indexOf("Y")===-1||this.showY),i.visible=i.visible&&(i.name.indexOf("Z")===-1||this.showZ),i.visible=i.visible&&(i.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),i.material._color=i.material._color||i.material.color.clone(),i.material._opacity=i.material._opacity||i.material.opacity,i.material.color.copy(i.material._color),i.material.opacity=i.material._opacity,this.enabled&&this.axis&&(i.name===this.axis||this.axis.split("").some(function(u){return i.name===u}))&&(i.material.color.setHex(16776960),i.material.opacity=1)}super.updateMatrixWorld(n)}}class io extends t.Mesh{constructor(){super(new t.PlaneGeometry(1e5,1e5,2,2),new t.MeshBasicMaterial({visible:!1,wireframe:!0,side:t.DoubleSide,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(n){let a=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(a="local"),yt.copy(Ve).applyQuaternion(a==="local"?this.worldQuaternion:wt),Ge.copy(we).applyQuaternion(a==="local"?this.worldQuaternion:wt),Fe.copy(Qe).applyQuaternion(a==="local"?this.worldQuaternion:wt),S.copy(Ge),this.mode){case"translate":case"scale":switch(this.axis){case"X":S.copy(this.eye).cross(yt),B.copy(yt).cross(S);break;case"Y":S.copy(this.eye).cross(Ge),B.copy(Ge).cross(S);break;case"Z":S.copy(this.eye).cross(Fe),B.copy(Fe).cross(S);break;case"XY":B.copy(Fe);break;case"YZ":B.copy(yt);break;case"XZ":S.copy(Fe),B.copy(Ge);break;case"XYZ":case"E":B.set(0,0,0);break}break;case"rotate":default:B.set(0,0,0)}B.length()===0?this.quaternion.copy(this.cameraQuaternion):(rn.lookAt(H.set(0,0,0),B,S),this.quaternion.setFromRotationMatrix(rn)),super.updateMatrixWorld(n)}}var V,Se;class so{constructor(){f(this,V);f(this,Se);x(this,V,new Wn(y.en3.camera,y.en3.webglRenderer.domElement)),x(this,Se,new X.Store([0,0,0],{passport:{name:"Controls.OrbitControls.Target",manager:{type:"number",invisible:!0}}}));let n=!0;s(this,Se).subscribe(a=>{s(this,V).target.set(...a.current),n&&s(this,V).update()}),s(this,V).addEventListener("change",()=>{n=!1,s(this,Se).current=[s(this,V).target.x,s(this,V).target.y,s(this,V).target.z],n=!0})}get controls(){return s(this,V)}destroy(){s(this,V).dispose(),s(this,Se).close()}}V=new WeakMap,Se=new WeakMap;var R,Be,We,Ke,$e,Je,et,tt,nt;class ao{constructor(){f(this,R,null);f(this,Be,new X.Store(y.en3.camera.far,{passport:{name:"Helpers.Grid.Size",manager:{type:"number",step:1}}}));f(this,We,new X.Store(100,{passport:{name:"Helpers.Grid.Divisions",manager:{type:"number"}}}));f(this,Ke,new X.Store("#0000ff",{passport:{name:"Helpers.Grid.Color 1",manager:{type:"color"}}}));f(this,$e,new X.Store("#808080",{passport:{name:"Helpers.Grid.Color 2",manager:{type:"color"}}}));f(this,Je,new X.Store(!1,{passport:{name:"Helpers.Grid.Vertical",manager:{type:"boolean"}}}));f(this,et,new X.Store(!0,{passport:{name:"Helpers.Grid.Visible",manager:{type:"boolean"}}}));f(this,tt);f(this,nt,n=>{n.key==="g"&&(s(this,R).visible=!s(this,R).visible)});x(this,tt,new kn.Composed([s(this,Be),s(this,We),s(this,Ke),s(this,$e),s(this,Je),s(this,et)],()=>{s(this,R)&&(y.en3.view.remove(s(this,R)),s(this,R).dispose()),x(this,R,new t.GridHelper(s(this,Be).current,s(this,We).current,s(this,Ke).current,s(this,$e).current)),s(this,R).rotation.x=s(this,Je).current?Math.PI/2:0,s(this,R).visible=s(this,et).current,y.en3.view.add(s(this,R))})),addEventListener("keydown",s(this,nt))}get helper(){return s(this,R)}destroy(){s(this,tt).close(),s(this,R)&&(y.en3.view.remove(s(this,R)),s(this,R).dispose()),removeEventListener("keydown",s(this,nt))}}R=new WeakMap,Be=new WeakMap,We=new WeakMap,Ke=new WeakMap,$e=new WeakMap,Je=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap;var C,Q,ce,le,ot,De,it,st,At;class ro{constructor(){f(this,st);f(this,C);f(this,Q,[]);f(this,ce,null);f(this,le,n=>{if(n.child.name.startsWith("T.")&&!s(this,Q).find(a=>a.object3d===n.child)){const a=new Ot(n.child);s(this,Q).push(a),y.en3.raycaster.add(a.raycasterTarget,{eventDispatcher:a.raycasterTarget}),a.raycasterTarget.addEventListener("pointerDown",s(this,De)),a.object3d.addEventListener("childadded",s(this,le))}});f(this,ot,n=>{const a=E(this,st,At).call(this,n.child);a&&(y.en3.raycaster.remove(a.raycasterTarget),a.destroy(),a.raycasterTarget.removeEventListener("pointerDown",s(this,De)),a.object3d.removeEventListener("childadded",s(this,le)),x(this,Q,s(this,Q).filter(e=>e!==a)))});f(this,De,n=>{const a=E(this,st,At).call(this,n.target);a&&(x(this,ce,s(this,Q).find(e=>e.object3d===(a==null?void 0:a.object3d))||null),s(this,ce)&&s(this,C).attach(s(this,ce).object3d))});f(this,it,n=>{n.key==="t"?s(this,C).setMode("translate"):n.key==="r"?s(this,C).setMode("rotate"):n.key==="s"?s(this,C).setMode("scale"):n.key==="Escape"?s(this,C).detach():n.key==="+"||n.key==="="?s(this,C).setSize(s(this,C).size+.1):n.key==="-"||n.key==="_"?s(this,C).setSize(s(this,C).size-.1):n.key==="h"&&s(this,Q).forEach(a=>{a.helpers.forEach(e=>{e.visible=!e.visible})})});x(this,C,new Kn(y.en3.camera,y.en3.webglRenderer.domElement)),s(this,C).addEventListener("objectChange",n=>{s(this,ce)&&s(this,ce).save()}),y.en3.view.add(s(this,C)),y.en3.scene.addEventListener("childadded",s(this,le)),y.en3.scene.addEventListener("childremoved",s(this,ot)),window.addEventListener("keydown",s(this,it))}get controls(){return s(this,C)}destroy(){y.en3.scene.removeEventListener("childadded",s(this,le)),y.en3.scene.removeEventListener("childremoved",s(this,ot)),window.removeEventListener("keydown",s(this,it)),s(this,C).dispose(),s(this,Q).forEach(n=>{n.raycasterTarget.removeEventListener("pointerDown",s(this,De)),n.object3d.removeEventListener("childadded",s(this,le)),n.destroy()}),x(this,Q,[])}}C=new WeakMap,Q=new WeakMap,ce=new WeakMap,le=new WeakMap,ot=new WeakMap,De=new WeakMap,it=new WeakMap,st=new WeakSet,At=function(n){return s(this,Q).find(e=>e.object3d===n||e.raycasterTarget===n)};var Ce,je,ke,Re,xe,Lt,dn;class co{constructor(){f(this,xe);f(this,Ce);f(this,je);f(this,ke);f(this,Re,[]);x(this,Ce,y.en3.composer.addPass=y.en3.composer.addPass.bind(y.en3.composer)),y.en3.composer.addPass=(...n)=>{E(this,xe,Lt).call(this,n[0]),s(this,Ce).call(this,...n)},x(this,je,y.en3.composer.removePass=y.en3.composer.removePass.bind(y.en3.composer)),y.en3.composer.removePass=(...n)=>{E(this,xe,dn).call(this,n[0]),s(this,je).call(this,...n)},x(this,ke,y.en3.composer.insertPass=y.en3.composer.insertPass.bind(y.en3.composer)),y.en3.composer.insertPass=(...n)=>{E(this,xe,Lt).call(this,n[0]),s(this,ke).call(this,...n)}}destroy(){y.en3.composer.addPass=s(this,Ce),y.en3.composer.removePass=s(this,je),y.en3.composer.insertPass=s(this,ke),s(this,Re).forEach(n=>{n.destroy()})}}Ce=new WeakMap,je=new WeakMap,ke=new WeakMap,Re=new WeakMap,xe=new WeakSet,Lt=function(n){s(this,Re).push(new he(n,{folderName:`EffectComposer.${n.constructor.name}`,skipKeys:["renderToScreen","needsSwap","nMips","oldClearAlpha","clearColor","resolution"]})),"uniforms"in n&&s(this,Re).push(new he(n.uniforms,{folderName:`EffectComposer.${n.constructor.name}.Uniforms`,optionsCatalog:{maxblur:{type:"number",min:0,max:1,step:1e-5,ease:.1},aperture:{type:"number",min:0,max:.01,step:1e-6},focus:{type:"number",min:0,step:.01}},skipKeys:["time","resolution"]}))},dn=function(n){};var at,rt,ct,lt,He,Pe,Ye;class lo{constructor(){f(this,at);f(this,rt);f(this,ct,null);f(this,lt);f(this,He);f(this,Pe);f(this,Ye);x(this,at,new he(y.en3.webglRenderer,{folderName:"Renderer"})),x(this,rt,new he(y.en3.webglRenderer.shadowMap,{folderName:"Renderer.shadowMap",optionsCatalog:{type:{type:"select",variants:["BasicShadowMap","PCFShadowMap","PCFSoftShadowMap","VSMShadowMap"]}},afterChange:()=>{y.en3.webglRenderer.shadowMap.needsUpdate=!0,Rn.traverseMaterials(y.en3.scene,n=>{n.needsUpdate=!0})}})),y.en3.composer&&x(this,ct,new co),x(this,lt,new ao),x(this,He,new Ot(y.en3.camera)),x(this,Pe,new so),s(this,Pe).controls.addEventListener("change",()=>{s(this,He).save()}),x(this,Ye,new ro),s(this,Ye).controls.addEventListener("dragging-changed",n=>{s(this,Pe).controls.enabled=!n.value})}destroy(){var n;s(this,at).destroy(),s(this,rt).destroy(),(n=s(this,ct))==null||n.destroy(),s(this,lt).destroy(),s(this,He).destroy(),s(this,Pe).destroy(),s(this,Ye).destroy()}}at=new WeakMap,rt=new WeakMap,ct=new WeakMap,lt=new WeakMap,He=new WeakMap,Pe=new WeakMap,Ye=new WeakMap;exports.En3Helpers=lo;exports.En3Object3dManager=Ot;
|
|
1
|
+
"use strict";var On=Object.defineProperty;var qt=Object.getOwnPropertySymbols;var Dn=Object.prototype.hasOwnProperty,Cn=Object.prototype.propertyIsEnumerable;var Bt=m=>{throw TypeError(m)};var Ut=(m,n,a)=>n in m?On(m,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):m[n]=a,se=(m,n)=>{for(var a in n||(n={}))Dn.call(n,a)&&Ut(m,a,n[a]);if(qt)for(var a of qt(n))Cn.call(n,a)&&Ut(m,a,n[a]);return m};var St=(m,n,a)=>n.has(m)||Bt("Cannot "+a);var s=(m,n,a)=>(St(m,n,"read from private field"),a?a.call(m):n.get(m)),f=(m,n,a)=>n.has(m)?Bt("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(m):n.set(m,a),x=(m,n,a,e)=>(St(m,n,"write to private field"),e?e.call(m,a):n.set(m,a),a),E=(m,n,a)=>(St(m,n,"access private method"),a);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../../en3-C1fLmsjs.cjs"),X=require("../../Store-npaZHvX4.cjs"),t=require("three"),jn=require("../../object-CCiXnER2.cjs"),Wt=require("../../ticker/index.cjs"),kn=require("../../Composed-C_4slJQ6.cjs"),Rn=require("../../traverseMaterials-CD_3_56D.cjs");function Hn(m){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(m){for(const a in m)if(a!=="default"){const e=Object.getOwnPropertyDescriptor(m,a);Object.defineProperty(n,a,e.get?e:{enumerable:!0,get:()=>m[a]})}}return n.default=m,Object.freeze(n)}const de=Hn(t),Yn=["AddEquation","SubtractEquation","ReverseSubtractEquation","MinEquation","MaxEquation"],cn=["ZeroFactor","OneFactor","SrcColorFactor","OneMinusSrcColorFactor","SrcAlphaFactor","OneMinusSrcAlphaFactor","DstAlphaFactor","OneMinusDstAlphaFactor","DstColorFactor","OneMinusDstColorFactor","SrcAlphaSaturateFactor","ConstantColorFactor","OneMinusConstantColorFactor","ConstantAlphaFactor","OneMinusConstantAlphaFactor"],zn=[...cn,"SrcAlphaSaturateFactor"],Nn=["NoBlending","NormalBlending","AdditiveBlending","SubtractiveBlending","MultiplyBlending","CustomBlending"],Xn=["NeverDepth","AlwaysDepth","EqualDepth","LessDepth","LessEqualDepth ","GreaterEqualDepth ","GreaterDepth","NotEqualDepth"],Zn=["NeverStencilFunc","LessStencilFunc","EqualStencilFunc","LessEqualStencilFunc ","GreaterStencilFunc","NotEqualStencilFunc ","GreaterEqualStencilFunc","AlwaysStencilFunc"],Pt=["ZeroStencilOp","KeepStencilOp","ReplaceStencilOp","IncrementStencilOp","DecrementStencilOp","IncrementWrapStencilOp","DecrementWrapStencilOp","InvertStencilOp"],Gn=["FrontSide","BackSide","DoubleSide"],Fn=["TangentSpaceNormalMap","ObjectSpaceNormalMap"],Vn=["round","bevel","miter"],Qn=["NoToneMapping","LinearToneMapping","ReinhardToneMapping","CineonToneMapping","ACESFilmicToneMapping","AgXToneMapping","NeutralToneMapping","CustomToneMapping"],qn={intensity:{type:"number",min:0,max:20,step:1e-4},renderOrder:{type:"number",step:1},alphaTest:{type:"number",min:0,max:1,step:.001},blendAlpha:{type:"number",min:0,max:1,step:.001},blendDst:{type:"select",variants:zn},blendDstAlpha:{type:"number",min:0,max:1,step:.001},blendEquation:{type:"select",variants:Yn},blendEquationAlpha:{type:"number",min:0,max:1,step:.001},blending:{type:"select",variants:Nn},blendSrc:{type:"select",variants:cn},blendSrcAlpha:{type:"number",min:0,max:1,step:.001},depthFunc:{type:"select",variants:Xn},stencilFunc:{type:"select",variants:Zn},stencilRef:{type:"number",min:0,step:1},stencilFail:{type:"select",variants:Pt},stencilZFail:{type:"select",variants:Pt},stencilZPass:{type:"select",variants:Pt},opacity:{type:"number",min:0,max:1,step:1e-4},side:{type:"select",variants:Gn},roughness:{type:"number",min:0,max:1,step:1e-4},metalness:{type:"number",min:0,max:1,step:1e-4},lightMapIntensity:{type:"number",min:0,max:20,step:1e-4},aoMapIntensity:{type:"number",min:0,max:20,step:1e-4},bumpScale:{type:"number",min:0,step:1e-4},normalMapType:{type:"select",variants:Fn},wireframeLinejoin:{type:"select",variants:Vn},envMapIntensity:{type:"number",min:0,max:20,step:1e-4},emissiveIntensity:{type:"number",min:0,max:20,step:1e-4},fov:{type:"number",min:0,max:180,step:1},zoom:{type:"number",min:0,step:1e-4},near:{type:"number",min:0,step:1e-4},far:{type:"number",min:0,step:1},filmGauge:{type:"number",min:0,step:1e-4},filmOffset:{type:"number",min:0,step:1e-4},distance:{type:"number",min:0,step:.1},decay:{type:"number",min:0,step:1e-5,ease:.001},focus:{type:"number",min:0,max:1,step:1e-5},bias:{type:"number",min:0,max:.01,step:1e-6,ease:.01},blurSamples:{type:"number",min:0,step:1},normalBias:{type:"number",min:0,step:.001,ease:.01},radius:{type:"number",min:0,step:.001,ease:.01},penumbra:{type:"number",min:0,max:1,step:1e-6},power:{type:"number",min:0,step:.001,ease:.01},angle:{type:"number",min:0,step:1e-6,ease:.001},toneMapping:{type:"select",variants:Qn},toneMappingExposure:{type:"number",min:0,step:.001,ease:.1},mapSize:{type:"number",min:0,step:1},damp:{type:"number",min:0,max:1,step:1e-6},strength:{type:"number",min:0,step:.01},threshold:{type:"number",min:0,max:1,step:1e-4}},Un=new Set(["stencilFuncMask","needsUpdate","version","wireframeLinewidth","position","scale","rotation","coordinateSystem","aspect","autoUpdate","up"]);var Le,ne,M,ln,hn,pn,mn,un,_t,It,ye,be;class he{constructor(n,a){f(this,M);f(this,Le);f(this,ne,[]);x(this,Le,n);const e=se(se({},qn),a==null?void 0:a.optionsCatalog),r=new Set([...Un,...(a==null?void 0:a.skipKeys)||[]]),c=(a==null?void 0:a.folderName)||s(this,Le).name,i=a==null?void 0:a.afterChange;E(this,M,ln).call(this,{subject:s(this,Le),skipKeys:r,optionsCatalog:e,folderKey:c,afterChange:i})}destroy(){s(this,ne).forEach(n=>{n.close()})}}Le=new WeakMap,ne=new WeakMap,M=new WeakSet,ln=function(n){const{subject:a,folderKey:e,optionsCatalog:r,afterChange:c,skipKeys:i}=n;for(const l in a){if(l.startsWith("_")||i.has(l))continue;const u=a[l],p=E(this,M,ye).call(this,u),d=`${e}.${l}`,w=r[l];typeof p=="number"?(w==null?void 0:w.type)==="select"?E(this,M,_t).call(this,{name:d,value:u,subject:a,key:l,managerOptions:w,afterChange:c}):E(this,M,hn).call(this,{name:d,value:u,subject:a,key:l,managerOptions:w,afterChange:c}):p instanceof de.Vector2||p instanceof de.Vector3?E(this,M,pn).call(this,{name:d,value:u,subject:a,key:l,managerOptions:w,afterChange:c}):typeof p=="boolean"&&!l.startsWith("is")&&!l.startsWith("matrix")?E(this,M,mn).call(this,{name:d,value:u,subject:a,key:l,managerOptions:w,afterChange:c}):p instanceof de.Color?E(this,M,un).call(this,{name:d,value:u,subject:a,key:l,managerOptions:w,afterChange:c}):w&&(w==null?void 0:w.type)==="select"&&E(this,M,_t).call(this,{name:d,value:u,subject:a,key:l,managerOptions:w,afterChange:c})}},hn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new X.Store(E(this,M,ye).call(this,a),{passport:{name:n,manager:se({type:"number"},c)}});l.subscribe(u=>{E(this,M,be).call(this,e,r,(p,d)=>p[d]=u.current),i==null||i()}),s(this,ne).push(l)},pn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=p=>{const d=[p.x,p.y];return p instanceof de.Vector3&&d.push(p.z),d},u=new X.Store(l(E(this,M,ye).call(this,a)),{passport:{name:n,manager:se({type:"number"},c)}});u.subscribe(p=>{E(this,M,be).call(this,e,r,(d,w)=>d[w].set(...p.current)),i==null||i()}),s(this,ne).push(u)},mn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new X.Store(E(this,M,ye).call(this,a),{passport:{name:n,manager:se({type:"boolean"},c)}});l.subscribe(u=>{E(this,M,be).call(this,e,r,(p,d)=>p[d]=u.current),i==null||i()}),s(this,ne).push(l)},un=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new X.Store(`#${E(this,M,ye).call(this,a).getHexString()}`,{passport:{name:n,manager:se({type:"color"},c)}});l.subscribe(u=>{E(this,M,be).call(this,e,r,(p,d)=>p[d]=new de.Color(u.current)),i==null||i()}),s(this,ne).push(l)},_t=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=c==null?void 0:c.variants;if(l){let u=null;for(const d of l)a===de[d]&&(u=d);const p=new X.Store(u||E(this,M,ye).call(this,a),{passport:{name:n,manager:se({},c)}});p.subscribe(d=>{typeof d.current=="string"&&(d.current[0]===d.current[0].toUpperCase()?E(this,M,be).call(this,e,r,(w,L)=>w[L]=de[d.current]):E(this,M,be).call(this,e,r,(w,L)=>w[L]=d.current)),i==null||i()}),s(this,ne).push(p)}},It=function(n){return jn.isObject(n)&&"value"in n},ye=function(n){return E(this,M,It).call(this,n)?n.value:n},be=function(n,a,e){E(this,M,It).call(this,n[a])?e(n[a],"value"):e(n,a)};var g,re,ge,Me,Ee,qe,U,Oe,bt,Ue;class Ot{constructor(n,a){f(this,Oe);f(this,g);f(this,re,[]);f(this,ge);f(this,Me);f(this,Ee);f(this,qe,!0);f(this,U,[]);f(this,Ue,()=>{s(this,U).forEach(n=>{"update"in n&&n.update()})});var l,u;x(this,g,n);let e=!1;n.name.startsWith("T.")&&(n.name=n.name.slice(2)),n.name.includes("P.")&&(e=!0,n.name=n.name.replace("P.",""));const r=n.name;s(this,g).userData.controlled=!0;const c=(a==null?void 0:a.step)||1e-4,i=((l=n.userData)==null?void 0:l.box)||n;if(s(this,g)instanceof t.Light){let p;s(this,g)instanceof t.PointLight?p=new t.PointLightHelper(s(this,g),100):s(this,g)instanceof t.DirectionalLight?(s(this,g).scale.setScalar(100),p=new t.DirectionalLightHelper(s(this,g),1)):s(this,g)instanceof t.SpotLight?p=new t.SpotLightHelper(s(this,g)):s(this,g)instanceof t.HemisphereLight&&(p=new t.HemisphereLightHelper(s(this,g),100)),s(this,U).push(p);const d=(u=s(this,g).shadow)==null?void 0:u.camera;if(d instanceof t.Camera){const w=new t.CameraHelper(d);s(this,U).push(w)}}if(s(this,U).forEach(p=>{y.en3.view.add(p)}),x(this,ge,new X.Store([i.position.x,i.position.y,i.position.z],{passport:{name:`${r}.Transformation.Position`,manager:{type:"number",step:c}}})),x(this,Me,new X.Store([i.rotation.x,i.rotation.y,i.rotation.z],{passport:{name:`${r}.Transformation.Rotation`,manager:{type:"number",step:c,ease:.01}}})),x(this,Ee,new X.Store([i.scale.x,i.scale.y,i.scale.z],{passport:{name:`${r}.Transformation.Scale`,manager:{type:"number",step:c}}})),this.save(),x(this,qe,!1),s(this,ge).subscribe(p=>{E(this,Oe,bt).call(this,"position",p.current)}),s(this,Me).subscribe(p=>{E(this,Oe,bt).call(this,"rotation",p.current)}),s(this,Ee).subscribe(p=>{E(this,Oe,bt).call(this,"scale",p.current)}),e){if(s(this,re).push(new he(s(this,g),{folderName:`${s(this,g).name}.Parameters`,afterChange:s(this,g)instanceof t.Camera?()=>{y.en3.view.resize()}:void 0})),s(this,g)instanceof t.Mesh){const p=s(this,g).material;p instanceof t.Material&&s(this,re).push(new he(p,{folderName:`${s(this,g).name}.Parameters.Material`,afterChange:()=>{p.needsUpdate=!0}}))}else if(s(this,g)instanceof t.Light){const p=s(this,g).shadow;p&&s(this,re).push(new he(p,{folderName:`${s(this,g).name}.Parameters.Shadow`,afterChange:()=>{p.needsUpdate=!0}})),p.camera&&s(this,re).push(new he(p,{folderName:`${s(this,g).name}.Parameters.Shadow.Camera`,afterChange:()=>{p.camera.updateProjectionMatrix()}}))}}s(this,U).length&&Wt.ticker.subscribe(s(this,Ue))}get object3d(){return s(this,g)}get helpers(){return s(this,U)}get raycasterTarget(){return s(this,U)[0]||s(this,g)}destroy(){s(this,re).forEach(n=>n.destroy()),s(this,ge).close(),s(this,Me).close(),s(this,Ee).close(),s(this,g).userData.controlled=!1,s(this,U).forEach(n=>{n&&"dispose"in n&&(n.dispose(),y.en3.view.remove(n))}),Wt.ticker.unsubscribe(s(this,Ue))}save(){const n=(a,e)=>{(!s(this,qe)||a.initial===a.current)&&(a.current=[e.x,e.y,e.z])};n(s(this,ge),s(this,g).position),n(s(this,Me),s(this,g).rotation),n(s(this,Ee),s(this,g).scale)}}g=new WeakMap,re=new WeakMap,ge=new WeakMap,Me=new WeakMap,Ee=new WeakMap,qe=new WeakMap,U=new WeakMap,Oe=new WeakSet,bt=function(n,a){const e=s(this,g).userData.box;if(e){const r=c=>({x:a[0]-c.x,y:a[1]-c.y,z:a[2]-c.z});n==="position"?e.setPositionStep("_manager","+",r(e.getIncludedPositionSteps("_manager"))):n==="rotation"?e.setRotationStep("_manager","+",r(e.getIncludedRotationSteps("_manager"))):n==="scale"&&e.setScaleStep("_manager","+",r(e.getIncludedScaleSteps("_manager")))}else s(this,g)[n].set(...a)},Ue=new WeakMap;const Kt={type:"change"},xt={type:"start"},$t={type:"end"},ut=new t.Ray,Jt=new t.Plane,Bn=Math.cos(70*t.MathUtils.DEG2RAD);class Wn extends t.EventDispatcher{constructor(n,a){super(),this.object=n,this.domElement=a,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new t.Vector3,this.cursor=new t.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:t.MOUSE.ROTATE,MIDDLE:t.MOUSE.DOLLY,RIGHT:t.MOUSE.PAN},this.touches={ONE:t.TOUCH.ROTATE,TWO:t.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return l.phi},this.getAzimuthalAngle=function(){return l.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(o){o.addEventListener("keydown",Et),this._domElementKeyEvents=o},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",Et),this._domElementKeyEvents=null},this.saveState=function(){e.target0.copy(e.target),e.position0.copy(e.object.position),e.zoom0=e.object.zoom},this.reset=function(){e.target.copy(e.target0),e.object.position.copy(e.position0),e.object.zoom=e.zoom0,e.object.updateProjectionMatrix(),e.dispatchEvent(Kt),e.update(),c=r.NONE},this.update=function(){const o=new t.Vector3,h=new t.Quaternion().setFromUnitVectors(n.up,new t.Vector3(0,1,0)),b=h.clone().invert(),P=new t.Vector3,N=new t.Quaternion,ie=new t.Vector3,F=2*Math.PI;return function(Ln=null){const Vt=e.object.position;o.copy(Vt).sub(e.target),o.applyQuaternion(h),l.setFromVector3(o),e.autoRotate&&c===r.NONE&&me(gt(Ln)),e.enableDamping?(l.theta+=u.theta*e.dampingFactor,l.phi+=u.phi*e.dampingFactor):(l.theta+=u.theta,l.phi+=u.phi);let J=e.minAzimuthAngle,ee=e.maxAzimuthAngle;isFinite(J)&&isFinite(ee)&&(J<-Math.PI?J+=F:J>Math.PI&&(J-=F),ee<-Math.PI?ee+=F:ee>Math.PI&&(ee-=F),J<=ee?l.theta=Math.max(J,Math.min(ee,l.theta)):l.theta=l.theta>(J+ee)/2?Math.max(J,l.theta):Math.min(ee,l.theta)),l.phi=Math.max(e.minPolarAngle,Math.min(e.maxPolarAngle,l.phi)),l.makeSafe(),e.enableDamping===!0?e.target.addScaledVector(d,e.dampingFactor):e.target.add(d),e.target.sub(e.cursor),e.target.clampLength(e.minTargetRadius,e.maxTargetRadius),e.target.add(e.cursor);let Xe=!1;if(e.zoomToCursor&&ve||e.object.isOrthographicCamera)l.radius=oe(l.radius);else{const te=l.radius;l.radius=oe(l.radius*p),Xe=te!=l.radius}if(o.setFromSpherical(l),o.applyQuaternion(b),Vt.copy(e.target).add(o),e.object.lookAt(e.target),e.enableDamping===!0?(u.theta*=1-e.dampingFactor,u.phi*=1-e.dampingFactor,d.multiplyScalar(1-e.dampingFactor)):(u.set(0,0,0),d.set(0,0,0)),e.zoomToCursor&&ve){let te=null;if(e.object.isPerspectiveCamera){const Ze=o.length();te=oe(Ze*p);const mt=Ze-te;e.object.position.addScaledVector(K,mt),e.object.updateMatrixWorld(),Xe=!!mt}else if(e.object.isOrthographicCamera){const Ze=new t.Vector3(k.x,k.y,0);Ze.unproject(e.object);const mt=e.object.zoom;e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/p)),e.object.updateProjectionMatrix(),Xe=mt!==e.object.zoom;const Qt=new t.Vector3(k.x,k.y,0);Qt.unproject(e.object),e.object.position.sub(Qt).add(Ze),e.object.updateMatrixWorld(),te=o.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),e.zoomToCursor=!1;te!==null&&(this.screenSpacePanning?e.target.set(0,0,-1).transformDirection(e.object.matrix).multiplyScalar(te).add(e.object.position):(ut.origin.copy(e.object.position),ut.direction.set(0,0,-1).transformDirection(e.object.matrix),Math.abs(e.object.up.dot(ut.direction))<Bn?n.lookAt(e.target):(Jt.setFromNormalAndCoplanarPoint(e.object.up,e.target),ut.intersectPlane(Jt,e.target))))}else if(e.object.isOrthographicCamera){const te=e.object.zoom;e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/p)),te!==e.object.zoom&&(e.object.updateProjectionMatrix(),Xe=!0)}return p=1,ve=!1,Xe||P.distanceToSquared(e.object.position)>i||8*(1-N.dot(e.object.quaternion))>i||ie.distanceToSquared(e.target)>i?(e.dispatchEvent(Kt),P.copy(e.object.position),N.copy(e.object.quaternion),ie.copy(e.target),!0):!1}}(),this.dispose=function(){e.domElement.removeEventListener("contextmenu",Gt),e.domElement.removeEventListener("pointerdown",Yt),e.domElement.removeEventListener("pointercancel",Ne),e.domElement.removeEventListener("wheel",zt),e.domElement.removeEventListener("pointermove",Mt),e.domElement.removeEventListener("pointerup",Ne),e.domElement.getRootNode().removeEventListener("keydown",Nt,{capture:!0}),e._domElementKeyEvents!==null&&(e._domElementKeyEvents.removeEventListener("keydown",Et),e._domElementKeyEvents=null)};const e=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let c=r.NONE;const i=1e-6,l=new t.Spherical,u=new t.Spherical;let p=1;const d=new t.Vector3,w=new t.Vector2,L=new t.Vector2,W=new t.Vector2,Z=new t.Vector2,O=new t.Vector2,j=new t.Vector2,D=new t.Vector2,T=new t.Vector2,_=new t.Vector2,K=new t.Vector3,k=new t.Vector2;let ve=!1;const I=[],pe={};let ze=!1;function gt(o){return o!==null?2*Math.PI/60*e.autoRotateSpeed*o:2*Math.PI/60/60*e.autoRotateSpeed}function Te(o){const h=Math.abs(o*.01);return Math.pow(.95,e.zoomSpeed*h)}function me(o){u.theta-=o}function _e(o){u.phi-=o}const G=function(){const o=new t.Vector3;return function(b,P){o.setFromMatrixColumn(P,0),o.multiplyScalar(-b),d.add(o)}}(),Y=function(){const o=new t.Vector3;return function(b,P){e.screenSpacePanning===!0?o.setFromMatrixColumn(P,1):(o.setFromMatrixColumn(P,0),o.crossVectors(e.object.up,o)),o.multiplyScalar(b),d.add(o)}}(),q=function(){const o=new t.Vector3;return function(b,P){const N=e.domElement;if(e.object.isPerspectiveCamera){const ie=e.object.position;o.copy(ie).sub(e.target);let F=o.length();F*=Math.tan(e.object.fov/2*Math.PI/180),G(2*b*F/N.clientHeight,e.object.matrix),Y(2*P*F/N.clientHeight,e.object.matrix)}else e.object.isOrthographicCamera?(G(b*(e.object.right-e.object.left)/e.object.zoom/N.clientWidth,e.object.matrix),Y(P*(e.object.top-e.object.bottom)/e.object.zoom/N.clientHeight,e.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1)}}();function z(o){e.object.isPerspectiveCamera||e.object.isOrthographicCamera?p/=o:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function $(o){e.object.isPerspectiveCamera||e.object.isOrthographicCamera?p*=o:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function A(o,h){if(!e.zoomToCursor)return;ve=!0;const b=e.domElement.getBoundingClientRect(),P=o-b.left,N=h-b.top,ie=b.width,F=b.height;k.x=P/ie*2-1,k.y=-(N/F)*2+1,K.set(k.x,k.y,1).unproject(e.object).sub(e.object.position).normalize()}function oe(o){return Math.max(e.minDistance,Math.min(e.maxDistance,o))}function ue(o){w.set(o.clientX,o.clientY)}function Ie(o){A(o.clientX,o.clientX),D.set(o.clientX,o.clientY)}function ht(o){Z.set(o.clientX,o.clientY)}function pt(o){L.set(o.clientX,o.clientY),W.subVectors(L,w).multiplyScalar(e.rotateSpeed);const h=e.domElement;me(2*Math.PI*W.x/h.clientHeight),_e(2*Math.PI*W.y/h.clientHeight),w.copy(L),e.update()}function fn(o){T.set(o.clientX,o.clientY),_.subVectors(T,D),_.y>0?z(Te(_.y)):_.y<0&&$(Te(_.y)),D.copy(T),e.update()}function yn(o){O.set(o.clientX,o.clientY),j.subVectors(O,Z).multiplyScalar(e.panSpeed),q(j.x,j.y),Z.copy(O),e.update()}function bn(o){A(o.clientX,o.clientY),o.deltaY<0?$(Te(o.deltaY)):o.deltaY>0&&z(Te(o.deltaY)),e.update()}function wn(o){let h=!1;switch(o.code){case e.keys.UP:o.ctrlKey||o.metaKey||o.shiftKey?_e(2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):q(0,e.keyPanSpeed),h=!0;break;case e.keys.BOTTOM:o.ctrlKey||o.metaKey||o.shiftKey?_e(-2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):q(0,-e.keyPanSpeed),h=!0;break;case e.keys.LEFT:o.ctrlKey||o.metaKey||o.shiftKey?me(2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):q(e.keyPanSpeed,0),h=!0;break;case e.keys.RIGHT:o.ctrlKey||o.metaKey||o.shiftKey?me(-2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):q(-e.keyPanSpeed,0),h=!0;break}h&&(o.preventDefault(),e.update())}function Dt(o){if(I.length===1)w.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),P=.5*(o.pageY+h.y);w.set(b,P)}}function Ct(o){if(I.length===1)Z.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),P=.5*(o.pageY+h.y);Z.set(b,P)}}function jt(o){const h=Ae(o),b=o.pageX-h.x,P=o.pageY-h.y,N=Math.sqrt(b*b+P*P);D.set(0,N)}function gn(o){e.enableZoom&&jt(o),e.enablePan&&Ct(o)}function Mn(o){e.enableZoom&&jt(o),e.enableRotate&&Dt(o)}function kt(o){if(I.length==1)L.set(o.pageX,o.pageY);else{const b=Ae(o),P=.5*(o.pageX+b.x),N=.5*(o.pageY+b.y);L.set(P,N)}W.subVectors(L,w).multiplyScalar(e.rotateSpeed);const h=e.domElement;me(2*Math.PI*W.x/h.clientHeight),_e(2*Math.PI*W.y/h.clientHeight),w.copy(L)}function Rt(o){if(I.length===1)O.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),P=.5*(o.pageY+h.y);O.set(b,P)}j.subVectors(O,Z).multiplyScalar(e.panSpeed),q(j.x,j.y),Z.copy(O)}function Ht(o){const h=Ae(o),b=o.pageX-h.x,P=o.pageY-h.y,N=Math.sqrt(b*b+P*P);T.set(0,N),_.set(0,Math.pow(T.y/D.y,e.zoomSpeed)),z(_.y),D.copy(T);const ie=(o.pageX+h.x)*.5,F=(o.pageY+h.y)*.5;A(ie,F)}function En(o){e.enableZoom&&Ht(o),e.enablePan&&Rt(o)}function Sn(o){e.enableZoom&&Ht(o),e.enableRotate&&kt(o)}function Yt(o){e.enabled!==!1&&(I.length===0&&(e.domElement.setPointerCapture(o.pointerId),e.domElement.addEventListener("pointermove",Mt),e.domElement.addEventListener("pointerup",Ne)),!An(o)&&(_n(o),o.pointerType==="touch"?Zt(o):Pn(o)))}function Mt(o){e.enabled!==!1&&(o.pointerType==="touch"?Tn(o):xn(o))}function Ne(o){switch(In(o),I.length){case 0:e.domElement.releasePointerCapture(o.pointerId),e.domElement.removeEventListener("pointermove",Mt),e.domElement.removeEventListener("pointerup",Ne),e.dispatchEvent($t),c=r.NONE;break;case 1:const h=I[0],b=pe[h];Zt({pointerId:h,pageX:b.x,pageY:b.y});break}}function Pn(o){let h;switch(o.button){case 0:h=e.mouseButtons.LEFT;break;case 1:h=e.mouseButtons.MIDDLE;break;case 2:h=e.mouseButtons.RIGHT;break;default:h=-1}switch(h){case t.MOUSE.DOLLY:if(e.enableZoom===!1)return;Ie(o),c=r.DOLLY;break;case t.MOUSE.ROTATE:if(o.ctrlKey||o.metaKey||o.shiftKey){if(e.enablePan===!1)return;ht(o),c=r.PAN}else{if(e.enableRotate===!1)return;ue(o),c=r.ROTATE}break;case t.MOUSE.PAN:if(o.ctrlKey||o.metaKey||o.shiftKey){if(e.enableRotate===!1)return;ue(o),c=r.ROTATE}else{if(e.enablePan===!1)return;ht(o),c=r.PAN}break;default:c=r.NONE}c!==r.NONE&&e.dispatchEvent(xt)}function xn(o){switch(c){case r.ROTATE:if(e.enableRotate===!1)return;pt(o);break;case r.DOLLY:if(e.enableZoom===!1)return;fn(o);break;case r.PAN:if(e.enablePan===!1)return;yn(o);break}}function zt(o){e.enabled===!1||e.enableZoom===!1||c!==r.NONE||(o.preventDefault(),e.dispatchEvent(xt),bn(vn(o)),e.dispatchEvent($t))}function vn(o){const h=o.deltaMode,b={clientX:o.clientX,clientY:o.clientY,deltaY:o.deltaY};switch(h){case 1:b.deltaY*=16;break;case 2:b.deltaY*=100;break}return o.ctrlKey&&!ze&&(b.deltaY*=10),b}function Nt(o){o.key==="Control"&&(ze=!0,e.domElement.getRootNode().addEventListener("keyup",Xt,{passive:!0,capture:!0}))}function Xt(o){o.key==="Control"&&(ze=!1,e.domElement.getRootNode().removeEventListener("keyup",Xt,{passive:!0,capture:!0}))}function Et(o){e.enabled===!1||e.enablePan===!1||wn(o)}function Zt(o){switch(Ft(o),I.length){case 1:switch(e.touches.ONE){case t.TOUCH.ROTATE:if(e.enableRotate===!1)return;Dt(o),c=r.TOUCH_ROTATE;break;case t.TOUCH.PAN:if(e.enablePan===!1)return;Ct(o),c=r.TOUCH_PAN;break;default:c=r.NONE}break;case 2:switch(e.touches.TWO){case t.TOUCH.DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;gn(o),c=r.TOUCH_DOLLY_PAN;break;case t.TOUCH.DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;Mn(o),c=r.TOUCH_DOLLY_ROTATE;break;default:c=r.NONE}break;default:c=r.NONE}c!==r.NONE&&e.dispatchEvent(xt)}function Tn(o){switch(Ft(o),c){case r.TOUCH_ROTATE:if(e.enableRotate===!1)return;kt(o),e.update();break;case r.TOUCH_PAN:if(e.enablePan===!1)return;Rt(o),e.update();break;case r.TOUCH_DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;En(o),e.update();break;case r.TOUCH_DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;Sn(o),e.update();break;default:c=r.NONE}}function Gt(o){e.enabled!==!1&&o.preventDefault()}function _n(o){I.push(o.pointerId)}function In(o){delete pe[o.pointerId];for(let h=0;h<I.length;h++)if(I[h]==o.pointerId){I.splice(h,1);return}}function An(o){for(let h=0;h<I.length;h++)if(I[h]==o.pointerId)return!0;return!1}function Ft(o){let h=pe[o.pointerId];h===void 0&&(h=new t.Vector2,pe[o.pointerId]=h),h.set(o.pageX,o.pageY)}function Ae(o){const h=o.pointerId===I[0]?I[1]:I[0];return pe[h]}e.domElement.addEventListener("contextmenu",Gt),e.domElement.addEventListener("pointerdown",Yt),e.domElement.addEventListener("pointercancel",Ne),e.domElement.addEventListener("wheel",zt,{passive:!1}),e.domElement.getRootNode().addEventListener("keydown",Nt,{passive:!0,capture:!0}),this.update()}}const fe=new t.Raycaster,H=new t.Vector3,ae=new t.Vector3,v=new t.Quaternion,en={X:new t.Vector3(1,0,0),Y:new t.Vector3(0,1,0),Z:new t.Vector3(0,0,1)},vt={type:"change"},tn={type:"mouseDown",mode:null},nn={type:"mouseUp",mode:null},on={type:"objectChange"};class Kn extends t.Object3D{constructor(n,a){super(),a===void 0&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),a=document),this.isTransformControls=!0,this.visible=!1,this.domElement=a,this.domElement.style.touchAction="none";const e=new oo;this._gizmo=e,this.add(e);const r=new io;this._plane=r,this.add(r);const c=this;function i(T,_){let K=_;Object.defineProperty(c,T,{get:function(){return K!==void 0?K:_},set:function(k){K!==k&&(K=k,r[T]=k,e[T]=k,c.dispatchEvent({type:T+"-changed",value:k}),c.dispatchEvent(vt))}}),c[T]=_,r[T]=_,e[T]=_}i("camera",n),i("object",void 0),i("enabled",!0),i("axis",null),i("mode","translate"),i("translationSnap",null),i("rotationSnap",null),i("scaleSnap",null),i("space","world"),i("size",1),i("dragging",!1),i("showX",!0),i("showY",!0),i("showZ",!0);const l=new t.Vector3,u=new t.Vector3,p=new t.Quaternion,d=new t.Quaternion,w=new t.Vector3,L=new t.Quaternion,W=new t.Vector3,Z=new t.Vector3,O=new t.Vector3,j=0,D=new t.Vector3;i("worldPosition",l),i("worldPositionStart",u),i("worldQuaternion",p),i("worldQuaternionStart",d),i("cameraPosition",w),i("cameraQuaternion",L),i("pointStart",W),i("pointEnd",Z),i("rotationAxis",O),i("rotationAngle",j),i("eye",D),this._offset=new t.Vector3,this._startNorm=new t.Vector3,this._endNorm=new t.Vector3,this._cameraScale=new t.Vector3,this._parentPosition=new t.Vector3,this._parentQuaternion=new t.Quaternion,this._parentQuaternionInv=new t.Quaternion,this._parentScale=new t.Vector3,this._worldScaleStart=new t.Vector3,this._worldQuaternionInv=new t.Quaternion,this._worldScale=new t.Vector3,this._positionStart=new t.Vector3,this._quaternionStart=new t.Quaternion,this._scaleStart=new t.Vector3,this._getPointer=$n.bind(this),this._onPointerDown=eo.bind(this),this._onPointerHover=Jn.bind(this),this._onPointerMove=to.bind(this),this._onPointerUp=no.bind(this),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp)}updateMatrixWorld(n){this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this._parentPosition,this._parentQuaternion,this._parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this._worldScale),this._parentQuaternionInv.copy(this._parentQuaternion).invert(),this._worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this._cameraScale),this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye).negate():this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld(n)}pointerHover(n){if(this.object===void 0||this.dragging===!0)return;n!==null&&fe.setFromCamera(n,this.camera);const a=Tt(this._gizmo.picker[this.mode],fe);a?this.axis=a.object.name:this.axis=null}pointerDown(n){if(!(this.object===void 0||this.dragging===!0||n!=null&&n.button!==0)&&this.axis!==null){n!==null&&fe.setFromCamera(n,this.camera);const a=Tt(this._plane,fe,!0);a&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(a.point).sub(this.worldPositionStart)),this.dragging=!0,tn.mode=this.mode,this.dispatchEvent(tn)}}pointerMove(n){const a=this.axis,e=this.mode,r=this.object;let c=this.space;if(e==="scale"?c="local":(a==="E"||a==="XYZE"||a==="XYZ")&&(c="world"),r===void 0||a===null||this.dragging===!1||n!==null&&n.button!==-1)return;n!==null&&fe.setFromCamera(n,this.camera);const i=Tt(this._plane,fe,!0);if(i){if(this.pointEnd.copy(i.point).sub(this.worldPositionStart),e==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),c==="local"&&a!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),a.indexOf("X")===-1&&(this._offset.x=0),a.indexOf("Y")===-1&&(this._offset.y=0),a.indexOf("Z")===-1&&(this._offset.z=0),c==="local"&&a!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),r.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(c==="local"&&(r.position.applyQuaternion(v.copy(this._quaternionStart).invert()),a.search("X")!==-1&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),a.search("Y")!==-1&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),a.search("Z")!==-1&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.position.applyQuaternion(this._quaternionStart)),c==="world"&&(r.parent&&r.position.add(H.setFromMatrixPosition(r.parent.matrixWorld)),a.search("X")!==-1&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),a.search("Y")!==-1&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),a.search("Z")!==-1&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.parent&&r.position.sub(H.setFromMatrixPosition(r.parent.matrixWorld))));else if(e==="scale"){if(a.search("XYZ")!==-1){let l=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(l*=-1),ae.set(l,l,l)}else H.copy(this.pointStart),ae.copy(this.pointEnd),H.applyQuaternion(this._worldQuaternionInv),ae.applyQuaternion(this._worldQuaternionInv),ae.divide(H),a.search("X")===-1&&(ae.x=1),a.search("Y")===-1&&(ae.y=1),a.search("Z")===-1&&(ae.z=1);r.scale.copy(this._scaleStart).multiply(ae),this.scaleSnap&&(a.search("X")!==-1&&(r.scale.x=Math.round(r.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),a.search("Y")!==-1&&(r.scale.y=Math.round(r.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),a.search("Z")!==-1&&(r.scale.z=Math.round(r.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(e==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const l=20/this.worldPosition.distanceTo(H.setFromMatrixPosition(this.camera.matrixWorld));let u=!1;a==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(H.copy(this.rotationAxis).cross(this.eye))*l):(a==="X"||a==="Y"||a==="Z")&&(this.rotationAxis.copy(en[a]),H.copy(en[a]),c==="local"&&H.applyQuaternion(this.worldQuaternion),H.cross(this.eye),H.length()===0?u=!0:this.rotationAngle=this._offset.dot(H.normalize())*l),(a==="E"||u)&&(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),c==="local"&&a!=="E"&&a!=="XYZE"?(r.quaternion.copy(this._quaternionStart),r.quaternion.multiply(v.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),r.quaternion.copy(v.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),r.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(vt),this.dispatchEvent(on)}}pointerUp(n){n!==null&&n.button!==0||(this.dragging&&this.axis!==null&&(nn.mode=this.mode,this.dispatchEvent(nn)),this.dragging=!1,this.axis=null)}dispose(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.traverse(function(n){n.geometry&&n.geometry.dispose(),n.material&&n.material.dispose()})}attach(n){return this.object=n,this.visible=!0,this}detach(){return this.object=void 0,this.visible=!1,this.axis=null,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(vt),this.dispatchEvent(on),this.pointStart.copy(this.pointEnd))}getRaycaster(){return fe}getMode(){return this.mode}setMode(n){this.mode=n}setTranslationSnap(n){this.translationSnap=n}setRotationSnap(n){this.rotationSnap=n}setScaleSnap(n){this.scaleSnap=n}setSize(n){this.size=n}setSpace(n){this.space=n}}function $n(m){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:m.button};{const n=this.domElement.getBoundingClientRect();return{x:(m.clientX-n.left)/n.width*2-1,y:-(m.clientY-n.top)/n.height*2+1,button:m.button}}}function Jn(m){if(this.enabled)switch(m.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(m));break}}function eo(m){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(m.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(m)),this.pointerDown(this._getPointer(m)))}function to(m){this.enabled&&this.pointerMove(this._getPointer(m))}function no(m){this.enabled&&(this.domElement.releasePointerCapture(m.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(m)))}function Tt(m,n,a){const e=n.intersectObject(m,!0);for(let r=0;r<e.length;r++)if(e[r].object.visible||a)return e[r];return!1}const dt=new t.Euler,S=new t.Vector3(0,1,0),sn=new t.Vector3(0,0,0),an=new t.Matrix4,ft=new t.Quaternion,wt=new t.Quaternion,B=new t.Vector3,rn=new t.Matrix4,Ve=new t.Vector3(1,0,0),we=new t.Vector3(0,1,0),Qe=new t.Vector3(0,0,1),yt=new t.Vector3,Ge=new t.Vector3,Fe=new t.Vector3;class oo extends t.Object3D{constructor(){super(),this.isTransformControlsGizmo=!0,this.type="TransformControlsGizmo";const n=new t.MeshBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),a=new t.LineBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),e=n.clone();e.opacity=.15;const r=a.clone();r.opacity=.5;const c=n.clone();c.color.setHex(16711680);const i=n.clone();i.color.setHex(65280);const l=n.clone();l.color.setHex(255);const u=n.clone();u.color.setHex(16711680),u.opacity=.5;const p=n.clone();p.color.setHex(65280),p.opacity=.5;const d=n.clone();d.color.setHex(255),d.opacity=.5;const w=n.clone();w.opacity=.25;const L=n.clone();L.color.setHex(16776960),L.opacity=.25,n.clone().color.setHex(16776960);const Z=n.clone();Z.color.setHex(7895160);const O=new t.CylinderGeometry(0,.04,.1,12);O.translate(0,.05,0);const j=new t.BoxGeometry(.08,.08,.08);j.translate(0,.04,0);const D=new t.BufferGeometry;D.setAttribute("position",new t.Float32BufferAttribute([0,0,0,1,0,0],3));const T=new t.CylinderGeometry(.0075,.0075,.5,3);T.translate(0,.25,0);function _(Y,q){const z=new t.TorusGeometry(Y,.0075,3,64,q*Math.PI*2);return z.rotateY(Math.PI/2),z.rotateX(Math.PI/2),z}function K(){const Y=new t.BufferGeometry;return Y.setAttribute("position",new t.Float32BufferAttribute([0,0,0,1,1,1],3)),Y}const k={X:[[new t.Mesh(O,c),[.5,0,0],[0,0,-Math.PI/2]],[new t.Mesh(O,c),[-.5,0,0],[0,0,Math.PI/2]],[new t.Mesh(T,c),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new t.Mesh(O,i),[0,.5,0]],[new t.Mesh(O,i),[0,-.5,0],[Math.PI,0,0]],[new t.Mesh(T,i)]],Z:[[new t.Mesh(O,l),[0,0,.5],[Math.PI/2,0,0]],[new t.Mesh(O,l),[0,0,-.5],[-Math.PI/2,0,0]],[new t.Mesh(T,l),null,[Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.OctahedronGeometry(.1,0),w.clone()),[0,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),d.clone()),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),u.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),p.clone()),[.15,0,.15],[-Math.PI/2,0,0]]]},ve={X:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[.3,0,0],[0,0,-Math.PI/2]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,.3,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,-.3,0],[0,0,Math.PI]]],Z:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,.3],[Math.PI/2,0,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.OctahedronGeometry(.2,0),e)]],XY:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,0,.15],[-Math.PI/2,0,0]]]},I={START:[[new t.Mesh(new t.OctahedronGeometry(.01,2),r),null,null,null,"helper"]],END:[[new t.Mesh(new t.OctahedronGeometry(.01,2),r),null,null,null,"helper"]],DELTA:[[new t.Line(K(),r),null,null,null,"helper"]],X:[[new t.Line(D,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new t.Line(D,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new t.Line(D,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},pe={XYZE:[[new t.Mesh(_(.5,1),Z),null,[0,Math.PI/2,0]]],X:[[new t.Mesh(_(.5,.5),c)]],Y:[[new t.Mesh(_(.5,.5),i),null,[0,0,-Math.PI/2]]],Z:[[new t.Mesh(_(.5,.5),l),null,[0,Math.PI/2,0]]],E:[[new t.Mesh(_(.75,1),L),null,[0,Math.PI/2,0]]]},ze={AXIS:[[new t.Line(D,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},gt={XYZE:[[new t.Mesh(new t.SphereGeometry(.25,10,8),e)]],X:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[Math.PI/2,0,0]]],Z:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[0,0,-Math.PI/2]]],E:[[new t.Mesh(new t.TorusGeometry(.75,.1,2,24),e)]]},Te={X:[[new t.Mesh(j,c),[.5,0,0],[0,0,-Math.PI/2]],[new t.Mesh(T,c),[0,0,0],[0,0,-Math.PI/2]],[new t.Mesh(j,c),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(j,i),[0,.5,0]],[new t.Mesh(T,i)],[new t.Mesh(j,i),[0,-.5,0],[0,0,Math.PI]]],Z:[[new t.Mesh(j,l),[0,0,.5],[Math.PI/2,0,0]],[new t.Mesh(T,l),[0,0,0],[Math.PI/2,0,0]],[new t.Mesh(j,l),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),d),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),u),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),p),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.BoxGeometry(.1,.1,.1),w.clone())]]},me={X:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[.3,0,0],[0,0,-Math.PI/2]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,.3,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,-.3,0],[0,0,Math.PI]]],Z:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,.3],[Math.PI/2,0,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.2),e),[0,0,0]]]},_e={X:[[new t.Line(D,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new t.Line(D,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new t.Line(D,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function G(Y){const q=new t.Object3D;for(const z in Y)for(let $=Y[z].length;$--;){const A=Y[z][$][0].clone(),oe=Y[z][$][1],ue=Y[z][$][2],Ie=Y[z][$][3],ht=Y[z][$][4];A.name=z,A.tag=ht,oe&&A.position.set(oe[0],oe[1],oe[2]),ue&&A.rotation.set(ue[0],ue[1],ue[2]),Ie&&A.scale.set(Ie[0],Ie[1],Ie[2]),A.updateMatrix();const pt=A.geometry.clone();pt.applyMatrix4(A.matrix),A.geometry=pt,A.renderOrder=1/0,A.position.set(0,0,0),A.rotation.set(0,0,0),A.scale.set(1,1,1),q.add(A)}return q}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=G(k)),this.add(this.gizmo.rotate=G(pe)),this.add(this.gizmo.scale=G(Te)),this.add(this.picker.translate=G(ve)),this.add(this.picker.rotate=G(gt)),this.add(this.picker.scale=G(me)),this.add(this.helper.translate=G(I)),this.add(this.helper.rotate=G(ze)),this.add(this.helper.scale=G(_e)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(n){const e=(this.mode==="scale"?"local":this.space)==="local"?this.worldQuaternion:wt;this.gizmo.translate.visible=this.mode==="translate",this.gizmo.rotate.visible=this.mode==="rotate",this.gizmo.scale.visible=this.mode==="scale",this.helper.translate.visible=this.mode==="translate",this.helper.rotate.visible=this.mode==="rotate",this.helper.scale.visible=this.mode==="scale";let r=[];r=r.concat(this.picker[this.mode].children),r=r.concat(this.gizmo[this.mode].children),r=r.concat(this.helper[this.mode].children);for(let c=0;c<r.length;c++){const i=r[c];i.visible=!0,i.rotation.set(0,0,0),i.position.copy(this.worldPosition);let l;if(this.camera.isOrthographicCamera?l=(this.camera.top-this.camera.bottom)/this.camera.zoom:l=this.worldPosition.distanceTo(this.cameraPosition)*Math.min(1.9*Math.tan(Math.PI*this.camera.fov/360)/this.camera.zoom,7),i.scale.set(1,1,1).multiplyScalar(l*this.size/4),i.tag==="helper"){i.visible=!1,i.name==="AXIS"?(i.visible=!!this.axis,this.axis==="X"&&(v.setFromEuler(dt.set(0,0,0)),i.quaternion.copy(e).multiply(v),Math.abs(S.copy(Ve).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Y"&&(v.setFromEuler(dt.set(0,0,Math.PI/2)),i.quaternion.copy(e).multiply(v),Math.abs(S.copy(we).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Z"&&(v.setFromEuler(dt.set(0,Math.PI/2,0)),i.quaternion.copy(e).multiply(v),Math.abs(S.copy(Qe).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="XYZE"&&(v.setFromEuler(dt.set(0,Math.PI/2,0)),S.copy(this.rotationAxis),i.quaternion.setFromRotationMatrix(an.lookAt(sn,S,we)),i.quaternion.multiply(v),i.visible=this.dragging),this.axis==="E"&&(i.visible=!1)):i.name==="START"?(i.position.copy(this.worldPositionStart),i.visible=this.dragging):i.name==="END"?(i.position.copy(this.worldPosition),i.visible=this.dragging):i.name==="DELTA"?(i.position.copy(this.worldPositionStart),i.quaternion.copy(this.worldQuaternionStart),H.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),H.applyQuaternion(this.worldQuaternionStart.clone().invert()),i.scale.copy(H),i.visible=this.dragging):(i.quaternion.copy(e),this.dragging?i.position.copy(this.worldPositionStart):i.position.copy(this.worldPosition),this.axis&&(i.visible=this.axis.search(i.name)!==-1));continue}i.quaternion.copy(e),this.mode==="translate"||this.mode==="scale"?(i.name==="X"&&Math.abs(S.copy(Ve).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Y"&&Math.abs(S.copy(we).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Z"&&Math.abs(S.copy(Qe).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XY"&&Math.abs(S.copy(Qe).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="YZ"&&Math.abs(S.copy(Ve).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XZ"&&Math.abs(S.copy(we).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1)):this.mode==="rotate"&&(ft.copy(e),S.copy(this.eye).applyQuaternion(v.copy(e).invert()),i.name.search("E")!==-1&&i.quaternion.setFromRotationMatrix(an.lookAt(this.eye,sn,we)),i.name==="X"&&(v.setFromAxisAngle(Ve,Math.atan2(-S.y,S.z)),v.multiplyQuaternions(ft,v),i.quaternion.copy(v)),i.name==="Y"&&(v.setFromAxisAngle(we,Math.atan2(S.x,S.z)),v.multiplyQuaternions(ft,v),i.quaternion.copy(v)),i.name==="Z"&&(v.setFromAxisAngle(Qe,Math.atan2(S.y,S.x)),v.multiplyQuaternions(ft,v),i.quaternion.copy(v))),i.visible=i.visible&&(i.name.indexOf("X")===-1||this.showX),i.visible=i.visible&&(i.name.indexOf("Y")===-1||this.showY),i.visible=i.visible&&(i.name.indexOf("Z")===-1||this.showZ),i.visible=i.visible&&(i.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),i.material._color=i.material._color||i.material.color.clone(),i.material._opacity=i.material._opacity||i.material.opacity,i.material.color.copy(i.material._color),i.material.opacity=i.material._opacity,this.enabled&&this.axis&&(i.name===this.axis||this.axis.split("").some(function(u){return i.name===u}))&&(i.material.color.setHex(16776960),i.material.opacity=1)}super.updateMatrixWorld(n)}}class io extends t.Mesh{constructor(){super(new t.PlaneGeometry(1e5,1e5,2,2),new t.MeshBasicMaterial({visible:!1,wireframe:!0,side:t.DoubleSide,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(n){let a=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(a="local"),yt.copy(Ve).applyQuaternion(a==="local"?this.worldQuaternion:wt),Ge.copy(we).applyQuaternion(a==="local"?this.worldQuaternion:wt),Fe.copy(Qe).applyQuaternion(a==="local"?this.worldQuaternion:wt),S.copy(Ge),this.mode){case"translate":case"scale":switch(this.axis){case"X":S.copy(this.eye).cross(yt),B.copy(yt).cross(S);break;case"Y":S.copy(this.eye).cross(Ge),B.copy(Ge).cross(S);break;case"Z":S.copy(this.eye).cross(Fe),B.copy(Fe).cross(S);break;case"XY":B.copy(Fe);break;case"YZ":B.copy(yt);break;case"XZ":S.copy(Fe),B.copy(Ge);break;case"XYZ":case"E":B.set(0,0,0);break}break;case"rotate":default:B.set(0,0,0)}B.length()===0?this.quaternion.copy(this.cameraQuaternion):(rn.lookAt(H.set(0,0,0),B,S),this.quaternion.setFromRotationMatrix(rn)),super.updateMatrixWorld(n)}}var V,Se;class so{constructor(){f(this,V);f(this,Se);x(this,V,new Wn(y.en3.camera,y.en3.webglRenderer.domElement)),x(this,Se,new X.Store([0,0,0],{passport:{name:"Controls.OrbitControls.Target",manager:{type:"number",invisible:!0}}}));let n=!0;s(this,Se).subscribe(a=>{s(this,V).target.set(...a.current),n&&s(this,V).update()}),s(this,V).addEventListener("change",()=>{n=!1,s(this,Se).current=[s(this,V).target.x,s(this,V).target.y,s(this,V).target.z],n=!0})}get controls(){return s(this,V)}destroy(){s(this,V).dispose(),s(this,Se).close()}}V=new WeakMap,Se=new WeakMap;var R,Be,We,Ke,$e,Je,et,tt,nt;class ao{constructor(){f(this,R,null);f(this,Be,new X.Store(y.en3.camera.far,{passport:{name:"Helpers.Grid.Size",manager:{type:"number",step:1}}}));f(this,We,new X.Store(100,{passport:{name:"Helpers.Grid.Divisions",manager:{type:"number"}}}));f(this,Ke,new X.Store("#0000ff",{passport:{name:"Helpers.Grid.Color 1",manager:{type:"color"}}}));f(this,$e,new X.Store("#808080",{passport:{name:"Helpers.Grid.Color 2",manager:{type:"color"}}}));f(this,Je,new X.Store(!1,{passport:{name:"Helpers.Grid.Vertical",manager:{type:"boolean"}}}));f(this,et,new X.Store(!0,{passport:{name:"Helpers.Grid.Visible",manager:{type:"boolean"}}}));f(this,tt);f(this,nt,n=>{n.key==="g"&&(s(this,R).visible=!s(this,R).visible)});x(this,tt,new kn.Composed([s(this,Be),s(this,We),s(this,Ke),s(this,$e),s(this,Je),s(this,et)],()=>{s(this,R)&&(y.en3.view.remove(s(this,R)),s(this,R).dispose()),x(this,R,new t.GridHelper(s(this,Be).current,s(this,We).current,s(this,Ke).current,s(this,$e).current)),s(this,R).rotation.x=s(this,Je).current?Math.PI/2:0,s(this,R).visible=s(this,et).current,y.en3.view.add(s(this,R))})),addEventListener("keydown",s(this,nt))}get helper(){return s(this,R)}destroy(){s(this,tt).close(),s(this,R)&&(y.en3.view.remove(s(this,R)),s(this,R).dispose()),removeEventListener("keydown",s(this,nt))}}R=new WeakMap,Be=new WeakMap,We=new WeakMap,Ke=new WeakMap,$e=new WeakMap,Je=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap;var C,Q,ce,le,ot,De,it,st,At;class ro{constructor(){f(this,st);f(this,C);f(this,Q,[]);f(this,ce,null);f(this,le,n=>{if(n.child.name.startsWith("T.")&&!s(this,Q).find(a=>a.object3d===n.child)){const a=new Ot(n.child);s(this,Q).push(a),y.en3.raycaster.add(a.raycasterTarget,{eventDispatcher:a.raycasterTarget}),a.raycasterTarget.addEventListener("pointerDown",s(this,De)),a.object3d.addEventListener("childadded",s(this,le))}});f(this,ot,n=>{const a=E(this,st,At).call(this,n.child);a&&(y.en3.raycaster.remove(a.raycasterTarget),a.destroy(),a.raycasterTarget.removeEventListener("pointerDown",s(this,De)),a.object3d.removeEventListener("childadded",s(this,le)),x(this,Q,s(this,Q).filter(e=>e!==a)))});f(this,De,n=>{const a=E(this,st,At).call(this,n.target);a&&(x(this,ce,s(this,Q).find(e=>e.object3d===(a==null?void 0:a.object3d))||null),s(this,ce)&&s(this,C).attach(s(this,ce).object3d))});f(this,it,n=>{n.key==="t"?s(this,C).setMode("translate"):n.key==="r"?s(this,C).setMode("rotate"):n.key==="s"?s(this,C).setMode("scale"):n.key==="Escape"?s(this,C).detach():n.key==="+"||n.key==="="?s(this,C).setSize(s(this,C).size+.1):n.key==="-"||n.key==="_"?s(this,C).setSize(s(this,C).size-.1):n.key==="h"&&s(this,Q).forEach(a=>{a.helpers.forEach(e=>{e.visible=!e.visible})})});x(this,C,new Kn(y.en3.camera,y.en3.webglRenderer.domElement)),s(this,C).addEventListener("objectChange",n=>{s(this,ce)&&s(this,ce).save()}),y.en3.view.add(s(this,C)),y.en3.scene.addEventListener("childadded",s(this,le)),y.en3.scene.addEventListener("childremoved",s(this,ot)),window.addEventListener("keydown",s(this,it))}get controls(){return s(this,C)}destroy(){y.en3.scene.removeEventListener("childadded",s(this,le)),y.en3.scene.removeEventListener("childremoved",s(this,ot)),window.removeEventListener("keydown",s(this,it)),s(this,C).dispose(),s(this,Q).forEach(n=>{n.raycasterTarget.removeEventListener("pointerDown",s(this,De)),n.object3d.removeEventListener("childadded",s(this,le)),n.destroy()}),x(this,Q,[])}}C=new WeakMap,Q=new WeakMap,ce=new WeakMap,le=new WeakMap,ot=new WeakMap,De=new WeakMap,it=new WeakMap,st=new WeakSet,At=function(n){return s(this,Q).find(e=>e.object3d===n||e.raycasterTarget===n)};var Ce,je,ke,Re,xe,Lt,dn;class co{constructor(){f(this,xe);f(this,Ce);f(this,je);f(this,ke);f(this,Re,[]);x(this,Ce,y.en3.composer.addPass=y.en3.composer.addPass.bind(y.en3.composer)),y.en3.composer.addPass=(...n)=>{E(this,xe,Lt).call(this,n[0]),s(this,Ce).call(this,...n)},x(this,je,y.en3.composer.removePass=y.en3.composer.removePass.bind(y.en3.composer)),y.en3.composer.removePass=(...n)=>{E(this,xe,dn).call(this,n[0]),s(this,je).call(this,...n)},x(this,ke,y.en3.composer.insertPass=y.en3.composer.insertPass.bind(y.en3.composer)),y.en3.composer.insertPass=(...n)=>{E(this,xe,Lt).call(this,n[0]),s(this,ke).call(this,...n)}}destroy(){y.en3.composer.addPass=s(this,Ce),y.en3.composer.removePass=s(this,je),y.en3.composer.insertPass=s(this,ke),s(this,Re).forEach(n=>{n.destroy()})}}Ce=new WeakMap,je=new WeakMap,ke=new WeakMap,Re=new WeakMap,xe=new WeakSet,Lt=function(n){s(this,Re).push(new he(n,{folderName:`EffectComposer.${n.constructor.name}`,skipKeys:["renderToScreen","needsSwap","nMips","oldClearAlpha","clearColor","resolution"]})),"uniforms"in n&&s(this,Re).push(new he(n.uniforms,{folderName:`EffectComposer.${n.constructor.name}.Uniforms`,optionsCatalog:{maxblur:{type:"number",min:0,max:1,step:1e-5,ease:.1},aperture:{type:"number",min:0,max:.01,step:1e-6},focus:{type:"number",min:0,step:.01}},skipKeys:["time","resolution"]}))},dn=function(n){};var at,rt,ct,lt,He,Pe,Ye;class lo{constructor(){f(this,at);f(this,rt);f(this,ct,null);f(this,lt);f(this,He);f(this,Pe);f(this,Ye);x(this,at,new he(y.en3.webglRenderer,{folderName:"Renderer"})),x(this,rt,new he(y.en3.webglRenderer.shadowMap,{folderName:"Renderer.shadowMap",optionsCatalog:{type:{type:"select",variants:["BasicShadowMap","PCFShadowMap","PCFSoftShadowMap","VSMShadowMap"]}},afterChange:()=>{y.en3.webglRenderer.shadowMap.needsUpdate=!0,Rn.traverseMaterials(y.en3.scene,n=>{n.needsUpdate=!0})}})),y.en3.composer&&x(this,ct,new co),x(this,lt,new ao),x(this,He,new Ot(y.en3.camera)),x(this,Pe,new so),s(this,Pe).controls.addEventListener("change",()=>{s(this,He).save()}),x(this,Ye,new ro),s(this,Ye).controls.addEventListener("dragging-changed",n=>{s(this,Pe).controls.enabled=!n.value})}destroy(){var n;s(this,at).destroy(),s(this,rt).destroy(),(n=s(this,ct))==null||n.destroy(),s(this,lt).destroy(),s(this,He).destroy(),s(this,Pe).destroy(),s(this,Ye).destroy()}}at=new WeakMap,rt=new WeakMap,ct=new WeakMap,lt=new WeakMap,He=new WeakMap,Pe=new WeakMap,Ye=new WeakMap;exports.En3Helpers=lo;exports.En3Object3dManager=Ot;
|
package/lib/en3/helpers/index.js
CHANGED
|
@@ -15,12 +15,12 @@ var on = (m, t, o) => t in m ? Kn(m, t, { enumerable: !0, configurable: !0, writ
|
|
|
15
15
|
var Ot = (m, t, o) => t.has(m) || an("Cannot " + o);
|
|
16
16
|
var s = (m, t, o) => (Ot(m, t, "read from private field"), o ? o.call(m) : t.get(m)), f = (m, t, o) => t.has(m) ? an("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(m) : t.set(m, o), v = (m, t, o, e) => (Ot(m, t, "write to private field"), e ? e.call(m, o) : t.set(m, o), o), M = (m, t, o) => (Ot(m, t, "access private method"), o);
|
|
17
17
|
import { e as b } from "../../en3-x-Ki30MY.js";
|
|
18
|
-
import { S as F } from "../../Store-
|
|
18
|
+
import { S as F } from "../../Store-C46i0nvr.js";
|
|
19
19
|
import * as Ee from "three";
|
|
20
20
|
import { Light as rn, PointLight as $n, PointLightHelper as Jn, DirectionalLight as ei, DirectionalLightHelper as ti, SpotLight as ni, SpotLightHelper as ii, HemisphereLight as si, HemisphereLightHelper as oi, Camera as ln, CameraHelper as ai, Mesh as p, Material as ri, Ray as li, Plane as ci, MathUtils as hi, EventDispatcher as pi, Vector3 as y, MOUSE as Re, TOUCH as Ye, Quaternion as B, Spherical as cn, Vector2 as $, Raycaster as mi, Object3D as Yt, Euler as di, Matrix4 as Sn, MeshBasicMaterial as xn, LineBasicMaterial as ui, CylinderGeometry as Q, BoxGeometry as Z, BufferGeometry as hn, Float32BufferAttribute as pn, OctahedronGeometry as Mt, Line as pe, SphereGeometry as fi, TorusGeometry as Ve, PlaneGeometry as yi, DoubleSide as bi, GridHelper as wi } from "three";
|
|
21
21
|
import { a as gi } from "../../object-D6MVWB4l.js";
|
|
22
22
|
import { ticker as mn } from "../../ticker/index.js";
|
|
23
|
-
import { C as Ei } from "../../Composed-
|
|
23
|
+
import { C as Ei } from "../../Composed-CfWa-69I.js";
|
|
24
24
|
import { t as Pi } from "../../traverseMaterials-mGC2_FkG.js";
|
|
25
25
|
const Mi = [
|
|
26
26
|
"AddEquation",
|
package/lib/en3/misc/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var b=o=>{throw TypeError(o)};var D=(o,e,t)=>e.has(o)||b("Cannot "+t);var i=(o,e,t)=>(D(o,e,"read from private field"),t?t.call(o):e.get(o)),s=(o,e,t)=>e.has(o)?b("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),c=(o,e,t,r)=>(D(o,e,"write to private field"),r?r.call(o,t):e.set(o,t),t),L=(o,e,t)=>(D(o,e,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../../loading/index.cjs"),z=require("../../SourceManager-
|
|
1
|
+
"use strict";var b=o=>{throw TypeError(o)};var D=(o,e,t)=>e.has(o)||b("Cannot "+t);var i=(o,e,t)=>(D(o,e,"read from private field"),t?t.call(o):e.get(o)),s=(o,e,t)=>e.has(o)?b("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),c=(o,e,t,r)=>(D(o,e,"write to private field"),r?r.call(o,t):e.set(o,t),t),L=(o,e,t)=>(D(o,e,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../../loading/index.cjs"),z=require("../../SourceManager-CfHcGLUa.cjs"),y=require("../../Store-npaZHvX4.cjs");var u,l,v,k;class T{constructor(e){s(this,v);s(this,u);s(this,l);c(this,u,e.material),c(this,l,e.uniforms||{}),i(this,u).userData.uniforms=i(this,l);let t;const r=()=>{t==null||t()};i(this,u).addEventListener("dispose",r),i(this,u).onBeforeCompile=n=>{var d;t==null||t();for(const R in i(this,l))n.uniforms[R]=i(this,l)[R];e.vertextDeclarations&&(n.vertexShader=`
|
|
2
2
|
${e.vertextDeclarations}
|
|
3
3
|
${n.vertexShader}
|
|
4
4
|
`),e.fragmentDeclarations&&(n.fragmentShader=`
|
package/lib/en3/misc/index.js
CHANGED
|
@@ -4,8 +4,8 @@ var R = (o) => {
|
|
|
4
4
|
var m = (o, i, t) => i.has(o) || R("Cannot " + t);
|
|
5
5
|
var e = (o, i, t) => (m(o, i, "read from private field"), t ? t.call(o) : i.get(o)), r = (o, i, t) => i.has(o) ? R("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(o) : i.set(o, t), c = (o, i, t, s) => (m(o, i, "write to private field"), s ? s.call(o, t) : i.set(o, t), t), L = (o, i, t) => (m(o, i, "access private method"), t);
|
|
6
6
|
import { loading as $ } from "../../loading/index.js";
|
|
7
|
-
import { S as A } from "../../SourceManager-
|
|
8
|
-
import { S as z } from "../../Store-
|
|
7
|
+
import { S as A } from "../../SourceManager-B6wZpXUZ.js";
|
|
8
|
+
import { S as z } from "../../Store-C46i0nvr.js";
|
|
9
9
|
var h, u, S, k;
|
|
10
10
|
class w {
|
|
11
11
|
constructor(i) {
|
package/lib/image/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../window-resizer/index.cjs");require("../Store-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../window-resizer/index.cjs");require("../Store-npaZHvX4.cjs");const r=require("../source/index.cjs");class e extends r.SourceElement{createConsumer(){return document.createElement("img")}consumeSource(t){this.consumerElement.src=t||""}}customElements.get("e-image")||customElements.define("e-image",e);exports.ImageElement=e;
|
package/lib/image/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var M=s=>{throw TypeError(s)};var T=(s,i,t)=>i.has(s)||M("Cannot "+t);var e=(s,i,t)=>(T(s,i,"read from private field"),t?t.call(s):i.get(s)),n=(s,i,t)=>i.has(s)?M("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(s):i.set(s,t),h=(s,i,t,l)=>(T(s,i,"write to private field"),l?l.call(s,t):i.set(s,t),t),v=(s,i,t)=>(T(s,i,"access private method"),t);require("./Store-
|
|
1
|
+
"use strict";var M=s=>{throw TypeError(s)};var T=(s,i,t)=>i.has(s)||M("Cannot "+t);var e=(s,i,t)=>(T(s,i,"read from private field"),t?t.call(s):i.get(s)),n=(s,i,t)=>i.has(s)?M("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(s):i.set(s,t),h=(s,i,t,l)=>(T(s,i,"write to private field"),l?l.call(s,t):i.set(s,t),t),v=(s,i,t)=>(T(s,i,"access private method"),t);require("./Store-npaZHvX4.cjs");const q=require("./browser-CpzFX2xg.cjs"),O=require("./events-BGwqaxVW.cjs"),D=require("./style-At6aDoqG.cjs");require("./ticker/index.cjs");const o=require("./tags-6_ETuR75.cjs"),z=require("./createStylesheet-Csfmh-MH.cjs"),R=require("./theme/index.cjs"),F=z.createStylesheet({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:"var(--duration, var(--duration-short))",transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});var c,d,r,a,u,m,L,E,C;const I=class I extends HTMLElement{constructor(){super();n(this,E);n(this,c,null);n(this,d,"");n(this,r,null);n(this,a,!1);n(this,u);n(this,m,null);n(this,L,()=>{O.dispatchSizeChangeEvent(this)});q.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(F),h(this,c,this.attachInternals()),h(this,m,new ResizeObserver(e(this,L))),o.element(this,{children:[o.button({class:"head",children:o.slot({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),o.div({class:"body",style:{height:"0px"},children:o.div({class:"body-inner",children:o.slot()}),ref:l=>{h(this,r,l)}})]}))}get value(){return e(this,d)}set value(t){h(this,d,t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),e(this,c).setFormValue(e(this,d))}get internals(){return e(this,c)}get opened(){return e(this,a)}open(){clearTimeout(e(this,u)),h(this,a,!0),e(this,r).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),e(this,r).style.height=e(this,r).scrollHeight+"px",v(this,E,C).call(this)},0)}close(){h(this,a,!1),e(this,r).style.height="0px",this.classList.remove("opened"),v(this,E,C).call(this),h(this,u,setTimeout(()=>{this.classList.remove("triggered"),e(this,r).style.display="none"},D.getElementTransitionDurationMS(e(this,r))))}connectedCallback(){e(this,m).observe(e(this,r))}disconnectedCallback(){clearTimeout(e(this,u)),e(this,m).disconnect()}};c=new WeakMap,d=new WeakMap,r=new WeakMap,a=new WeakMap,u=new WeakMap,m=new WeakMap,L=new WeakMap,E=new WeakSet,C=function(){O.dispatchBeforeSizeChangeEvent(this),this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:e(this,a)}}))},I.formAssociated=!0;let x=I;customElements.get("e-select")||customElements.define("e-select",x);var f;class H extends HTMLElement{constructor(){super(...arguments);n(this,f,null)}get selectElement(){return e(this,f)}connectedCallback(){var l,S;const t=(S=(l=this.assignedSlot)==null?void 0:l.getRootNode())==null?void 0:S.host;t?h(this,f,t):console.log(this,"e-select not found")}}f=new WeakMap;const P=z.createStylesheet({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center"}});var p,w,k;class A extends H{constructor(){super();n(this,w);n(this,p,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""});q.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(P),o.element(this,{tabindex:0,onClick:()=>{v(this,w,k).call(this)},onKeydown:l=>{l.code==="Space"&&v(this,w,k).call(this)},children:o.slot()}))}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",e(this,p)),setTimeout(()=>{e(this,p).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,p))}}p=new WeakMap,w=new WeakSet,k=function(){this.selectElement.value=this.value,this.selectElement.close()};customElements.get("e-select-option")||customElements.define("e-select-option",A);const B=`<svg
|
|
2
2
|
xmlns="http://www.w3.org/2000/svg"
|
|
3
3
|
width="32"
|
|
4
4
|
height="32"
|
|
@@ -3,13 +3,13 @@ var I = (s) => {
|
|
|
3
3
|
};
|
|
4
4
|
var T = (s, i, t) => i.has(s) || I("Cannot " + t);
|
|
5
5
|
var e = (s, i, t) => (T(s, i, "read from private field"), t ? t.call(s) : i.get(s)), n = (s, i, t) => i.has(s) ? I("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, t), a = (s, i, t, o) => (T(s, i, "write to private field"), o ? o.call(s, t) : i.set(s, t), t), g = (s, i, t) => (T(s, i, "access private method"), t);
|
|
6
|
-
import "./Store-
|
|
6
|
+
import "./Store-C46i0nvr.js";
|
|
7
7
|
import { i as H } from "./browser-0zX67oeU.js";
|
|
8
8
|
import { a as D, d as B } from "./events-CJTUMSLU.js";
|
|
9
9
|
import { g as R } from "./style-j2TwriJ_.js";
|
|
10
10
|
import "./ticker/index.js";
|
|
11
|
-
import { e as S, p as q, ay as v, D as O } from "./tags-
|
|
12
|
-
import { c as M } from "./createStylesheet-
|
|
11
|
+
import { e as S, p as q, ay as v, D as O } from "./tags-BL3kQp9o.js";
|
|
12
|
+
import { c as M } from "./createStylesheet-COAZH1Mw.js";
|
|
13
13
|
import { aptechkaTheme as F } from "./theme/index.js";
|
|
14
14
|
const P = M({
|
|
15
15
|
":host": {
|
package/lib/ladder/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var M=Object.defineProperty;var S=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable;var v=t=>{throw TypeError(t)};var k=(t,s,e)=>s in t?M(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e,w=(t,s)=>{for(var e in s||(s={}))V.call(s,e)&&k(t,e,s[e]);if(S)for(var e of S(s))m.call(s,e)&&k(t,e,s[e]);return t};var g=(t,s,e)=>s.has(t)||v("Cannot "+e);var o=(t,s,e)=>(g(t,s,"read from private field"),e?e.call(t):s.get(t)),p=(t,s,e)=>s.has(t)?v("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),f=(t,s,e,i)=>(g(t,s,"write to private field"),i?i.call(t,e):s.set(t,e),e),b=(t,s,e)=>(g(t,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../Store-
|
|
1
|
+
"use strict";var M=Object.defineProperty;var S=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable;var v=t=>{throw TypeError(t)};var k=(t,s,e)=>s in t?M(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e,w=(t,s)=>{for(var e in s||(s={}))V.call(s,e)&&k(t,e,s[e]);if(S)for(var e of S(s))m.call(s,e)&&k(t,e,s[e]);return t};var g=(t,s,e)=>s.has(t)||v("Cannot "+e);var o=(t,s,e)=>(g(t,s,"read from private field"),e?e.call(t):s.get(t)),p=(t,s,e)=>s.has(t)?v("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),f=(t,s,e,i)=>(g(t,s,"write to private field"),i?i.call(t,e):s.set(t,e),e),b=(t,s,e)=>(g(t,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../Store-npaZHvX4.cjs");var d,u,a,h,y;class x extends q.Store{constructor(e){super(e,{equalityCheck:()=>!1});p(this,h);p(this,d);p(this,u);p(this,a);f(this,d,w({},e)),f(this,u,new Map),f(this,a,new Set)}get base(){return o(this,d)}get steps(){return o(this,u)}close(){super.close(),o(this,a).clear(),o(this,u).clear()}bind(e){o(this,a).add(e)}unbind(e){o(this,a).delete(e)}deleteStep(e){this.steps.delete(e)}getStepValue(e){var i;return(i=this.steps.get(e))==null?void 0:i[1]}getExcludedStepsValue(...e){const i=new Map;return e.map(c=>{const n=this.steps.get(c);n&&i.set(c,n)}),b(this,h,y).call(this,i)}getIncludedStepsValue(...e){const i=new Map(this.steps);return e.map(c=>{this.steps.has(c)&&i.delete(c)}),b(this,h,y).call(this,i)}setStep(e,i,c){const n={};for(const r in this.current)n[r]=c[r]||0;this.steps.set(e,[i,n]),this.calculate()}calculate(){this.current=b(this,h,y).call(this,o(this,u))}}d=new WeakMap,u=new WeakMap,a=new WeakMap,h=new WeakSet,y=function(e){const i={};for(const c in this.base)i[c]=this.base[c];for(const c of e){const n=c[1];if(n[0]==="+")for(const r in this.base){const l=n[1][r];i[r]+=l}else if(n[0]==="*")for(const r in this.base){const l=n[1][r];i[r]*=l}else if(n[0]==="/")for(const r in this.base){const l=n[1][r];i[r]/=l}else if(n[0]==="-")for(const r in this.base){const l=n[1][r];i[r]-=l}}for(const c of o(this,a))for(const n in i)c[n]=i[n];return i};exports.Ladder=x;
|
package/lib/ladder/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var S = (t, s, e) => s in t ? V(t, s, { enumerable: !0, configurable: !0, writab
|
|
|
14
14
|
};
|
|
15
15
|
var g = (t, s, e) => s.has(t) || v("Cannot " + e);
|
|
16
16
|
var r = (t, s, e) => (g(t, s, "read from private field"), e ? e.call(t) : s.get(t)), p = (t, s, e) => s.has(t) ? v("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), d = (t, s, e, i) => (g(t, s, "write to private field"), i ? i.call(t, e) : s.set(t, e), e), b = (t, s, e) => (g(t, s, "access private method"), e);
|
|
17
|
-
import { S as M } from "../Store-
|
|
17
|
+
import { S as M } from "../Store-C46i0nvr.js";
|
|
18
18
|
var f, h, a, u, y;
|
|
19
19
|
class E extends M {
|
|
20
20
|
constructor(e) {
|
package/lib/media/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var d=e=>{throw TypeError(e)};var a=(e,r,s)=>r.has(e)||d("Cannot "+s);var o=(e,r,s)=>(a(e,r,"read from private field"),s?s.call(e):r.get(e)),c=(e,r,s)=>r.has(e)?d("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,s),u=(e,r,s,n)=>(a(e,r,"write to private field"),n?n.call(e,s):r.set(e,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../order/index.cjs"),h=require("../window-resizer/index.cjs"),b=require("../Store-
|
|
1
|
+
"use strict";var d=e=>{throw TypeError(e)};var a=(e,r,s)=>r.has(e)||d("Cannot "+s);var o=(e,r,s)=>(a(e,r,"read from private field"),s?s.call(e):r.get(e)),c=(e,r,s)=>r.has(e)?d("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,s),u=(e,r,s,n)=>(a(e,r,"write to private field"),n?n.call(e,s):r.set(e,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../order/index.cjs"),h=require("../window-resizer/index.cjs"),b=require("../Store-npaZHvX4.cjs");var i,t;class w extends b.Store{constructor(s){super(!1);c(this,i);c(this,t);u(this,i,s),u(this,t,h.windowResizer.subscribe(()=>{matchMedia(o(this,i)).matches?this.current=!0:this.current=!1},l.RESIZE_ORDER.MEDIA))}close(){super.close(),o(this,t).call(this)}}i=new WeakMap,t=new WeakMap;exports.Media=w;
|
package/lib/media/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var h = (e, s, r) => s.has(e) || a("Cannot " + r);
|
|
|
5
5
|
var o = (e, s, r) => (h(e, s, "read from private field"), r ? r.call(e) : s.get(e)), c = (e, s, r) => s.has(e) ? a("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, r), u = (e, s, r, m) => (h(e, s, "write to private field"), m ? m.call(e, r) : s.set(e, r), r);
|
|
6
6
|
import { RESIZE_ORDER as n } from "../order/index.js";
|
|
7
7
|
import { windowResizer as f } from "../window-resizer/index.js";
|
|
8
|
-
import { S as l } from "../Store-
|
|
8
|
+
import { S as l } from "../Store-C46i0nvr.js";
|
|
9
9
|
var t, i;
|
|
10
10
|
class w extends l {
|
|
11
11
|
constructor(r) {
|
package/lib/modal/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var d=e=>{throw TypeError(e)};var u=(e,t,o)=>t.has(e)||d("Cannot "+o);var i=(e,t,o)=>(u(e,t,"read from private field"),o?o.call(e):t.get(e)),a=(e,t,o)=>t.has(e)?d("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,o),c=(e,t,o,l)=>(u(e,t,"write to private field"),l?l.call(e,o):t.set(e,o),o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-
|
|
1
|
+
"use strict";var d=e=>{throw TypeError(e)};var u=(e,t,o)=>t.has(e)||d("Cannot "+o);var i=(e,t,o)=>(u(e,t,"read from private field"),o?o.call(e):t.get(e)),a=(e,t,o)=>t.has(e)?d("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,o),c=(e,t,o,l)=>(u(e,t,"write to private field"),l?l.call(e,o):t.set(e,o),o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-npaZHvX4.cjs");const b=require("../browser-CpzFX2xg.cjs");require("../ticker/index.cjs");const n=require("../tags-6_ETuR75.cjs"),f=require("../createStylesheet-Csfmh-MH.cjs"),m=require("../popover/index.cjs"),p=require("../theme/index.cjs"),v=f.createStylesheet({":host":{position:"fixed",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",transitionProperty:"opacity",transitionDuration:"var(--transition-duration)"},":host::before":{content:'""',position:"fixed",top:"0",left:"0",zIndex:"-1",width:"100%",height:"100%",backgroundColor:"var(--backdrop, rgba(0, 0, 0, 0.8))"},".inner":{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden auto"},".overflow .inner":{alignItems:"flex-start"},".content":{position:"relative"},".close-button":{position:"absolute",zIndex:"1",top:"var(--close-button-top, 0.5em)",right:"var(--close-button-right, 0.5em)",background:"none",border:"none",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit"},".close-button-default":{width:"var(--close-button-size, 1.5em)",height:"var(--close-button-size, 1.5em)",display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"transform",transitionDuration:"var(--transition-duration)",willChange:"transform"},".close-button:hover .close-button-default":{transform:"scale(0.9)"},".close-button:active .close-button-default":{transform:"scale(0.7)"},".close-button-default::before, .close-button-default::after":{content:'""',position:"absolute",width:"var(--close-button-thickness, 0.1em)",height:"100%",backgroundColor:`var(--close-button-color, ${p.aptechkaTheme.colorMain.var})`},".close-button-default::before":{transform:"rotate(-45deg)"},".close-button-default::after":{transform:"rotate(45deg)"}});var s,r;class h extends m.PopoverElement{constructor(){super();a(this,s,null);a(this,r,null);b.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(v),n.element(this,{children:n.div({class:"inner",outside:!0,children:n.div({class:"content",children:[n.element("e-popover-button",{type:"close",target:"parent",class:"close-button",lightChildren:[n.slot({name:"close-button",children:n.span({class:"close-button-default"})})]}),n.slot()]}),ref:l=>c(this,r,l)})}),c(this,s,new ResizeObserver(()=>{i(this,r).scrollHeight>i(this,r).clientHeight?this.classList.add("overflow"):this.classList.remove("overflow")})))}connectedCallback(){super.connectedCallback(),i(this,s).observe(this)}disconnectedCallback(){super.disconnectedCallback(),i(this,s).disconnect()}}s=new WeakMap,r=new WeakMap;customElements.get("e-modal")||customElements.define("e-modal",h);exports.ModalElement=h;
|
package/lib/modal/index.js
CHANGED
|
@@ -3,11 +3,11 @@ var c = (t) => {
|
|
|
3
3
|
};
|
|
4
4
|
var d = (t, e, o) => e.has(t) || c("Cannot " + o);
|
|
5
5
|
var r = (t, e, o) => (d(t, e, "read from private field"), o ? o.call(t) : e.get(t)), a = (t, e, o) => e.has(t) ? c("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, o), l = (t, e, o, i) => (d(t, e, "write to private field"), i ? i.call(t, o) : e.set(t, o), o);
|
|
6
|
-
import "../Store-
|
|
6
|
+
import "../Store-C46i0nvr.js";
|
|
7
7
|
import { i as m } from "../browser-0zX67oeU.js";
|
|
8
8
|
import "../ticker/index.js";
|
|
9
|
-
import { e as h, D as u, ay as f, aB as b } from "../tags-
|
|
10
|
-
import { c as p } from "../createStylesheet-
|
|
9
|
+
import { e as h, D as u, ay as f, aB as b } from "../tags-BL3kQp9o.js";
|
|
10
|
+
import { c as p } from "../createStylesheet-COAZH1Mw.js";
|
|
11
11
|
import { PopoverElement as v } from "../popover/index.js";
|
|
12
12
|
import { aptechkaTheme as g } from "../theme/index.js";
|
|
13
13
|
const w = p({
|
package/lib/pointer/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var A=Object.defineProperty;var D=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var T=i=>{throw TypeError(i)};var M=(i,s,t)=>s in i?A(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,_=(i,s)=>{for(var t in s||(s={}))F.call(s,t)&&M(i,t,s[t]);if(D)for(var t of D(s))G.call(s,t)&&M(i,t,s[t]);return i};var k=(i,s,t)=>s.has(i)||T("Cannot "+t);var e=(i,s,t)=>(k(i,s,"read from private field"),t?t.call(i):s.get(i)),n=(i,s,t)=>s.has(i)?T("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),c=(i,s,t,m)=>(k(i,s,"write to private field"),m?m.call(i,t):s.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-
|
|
1
|
+
"use strict";var A=Object.defineProperty;var D=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var T=i=>{throw TypeError(i)};var M=(i,s,t)=>s in i?A(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,_=(i,s)=>{for(var t in s||(s={}))F.call(s,t)&&M(i,t,s[t]);if(D)for(var t of D(s))G.call(s,t)&&M(i,t,s[t]);return i};var k=(i,s,t)=>s.has(i)||T("Cannot "+t);var e=(i,s,t)=>(k(i,s,"read from private field"),t?t.call(i):s.get(i)),n=(i,s,t)=>s.has(i)?T("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),c=(i,s,t,m)=>(k(i,s,"write to private field"),m?m.call(i,t):s.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-npaZHvX4.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),I=require("../dom-JBOkFLTh.cjs"),H=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const R=require("../Damped-DYJ6Z0xo.cjs"),j=require("../element-resizer/index.cjs"),B=require("../window-resizer/index.cjs"),P=require("../css-property/index.cjs");var o,a,l,d,y,u,b,x,f,w,C,p;class O{constructor(s){n(this,o);n(this,a);n(this,l);n(this,d);n(this,y);n(this,u);n(this,b,0);n(this,x,0);n(this,f,s=>{e(this,d).set(1)});n(this,w,s=>{e(this,d).set(0)});n(this,C,s=>{const t=q.getPointerPosition(s,e(this,o).getBoundingClientRect()),m={width:e(this,b),height:e(this,x)},h={x:t.x,y:t.y};if(e(this,y)){const z=q.screenToCartesian(h,m);h.x=z.x,h.y=z.y}if(e(this,u)){const z=q.normalize(h,m);h.x=H.clamp(z.x*2,-1,1),h.y=H.clamp(z.y*2,-1,1)}e(this,a).set(h.x),e(this,l).set(h.y)});n(this,p,()=>{c(this,b,this.element.clientWidth),c(this,x,this.element.clientHeight);let s=0,t=0,m=0,h=0;e(this,y)?e(this,u)?(s=-1,t=1,m=-1,h=1):(s=e(this,b)/2*-1,t=e(this,b)/2*1,m=e(this,x)/2*-1,h=e(this,x)/2*1):e(this,u)?(s=0,t=1,m=0,h=1):(s=0,t=e(this,b),m=0,h=e(this,x)),e(this,a).min=s,e(this,a).max=t,e(this,l).min=m,e(this,l).max=h});c(this,o,I.getElement(s.element)),c(this,a,new R.Damped(0,s.damped)),c(this,l,new R.Damped(0,s.damped)),c(this,d,new R.Damped(0,_({min:0,max:1},s.damped))),c(this,y,s.cartesian||!1),c(this,u,s.normalize||!1)}get element(){return e(this,o)}get x(){return e(this,a)}get y(){return e(this,l)}get z(){return e(this,d)}get cartesian(){return e(this,y)}set cartesian(s){c(this,y,s),e(this,p).call(this)}get normalize(){return e(this,u)}set normalize(s){c(this,u,s),e(this,p).call(this)}connect(){e(this,o).addEventListener("pointerenter",e(this,f)),e(this,o).addEventListener("pointerleave",e(this,w)),e(this,o).addEventListener("pointermove",e(this,C)),j.elementResizer.subscribe(e(this,o),e(this,p)),B.windowResizer.subscribe(e(this,p))}disconnect(){e(this,o).removeEventListener("pointerenter",e(this,f)),e(this,o).removeEventListener("pointerleave",e(this,w)),e(this,o).removeEventListener("pointermove",e(this,C)),j.elementResizer.unsubscribe(e(this,p)),B.windowResizer.unsubscribe(e(this,p)),e(this,a).reset(),e(this,l).reset(),e(this,d).reset()}}o=new WeakMap,a=new WeakMap,l=new WeakMap,d=new WeakMap,y=new WeakMap,u=new WeakMap,b=new WeakMap,x=new WeakMap,f=new WeakMap,w=new WeakMap,C=new WeakMap,p=new WeakMap;var r,g,v,S,E,L;class W extends HTMLElement{constructor(){super();n(this,r);n(this,g,new P.CSSProperty(this,"--damping",20));n(this,v,new P.CSSProperty(this,"--mass",0));n(this,S,new P.CSSProperty(this,"--stiffness",0));n(this,E,new P.CSSProperty(this,"--cartesian",!1));n(this,L,new P.CSSProperty(this,"--normalize",!1));c(this,r,new O({element:this})),e(this,g).subscribe(t=>{e(this,r).x.damping=t.current,e(this,r).y.damping=t.current,e(this,r).z.damping=t.current}),e(this,E).subscribe(t=>{e(this,r).cartesian=t.current}),e(this,L).subscribe(t=>{e(this,r).normalize=t.current}),e(this,v).subscribe(t=>{e(this,r).x.mass=t.current,e(this,r).y.mass=t.current,e(this,r).z.mass=t.current}),e(this,S).subscribe(t=>{e(this,r).x.stiffness=t.current,e(this,r).y.stiffness=t.current,e(this,r).z.stiffness=t.current}),e(this,r).x.subscribe(t=>{this.style.setProperty("--x",t.current.toString())}),e(this,r).y.subscribe(t=>{this.style.setProperty("--y",t.current.toString())}),e(this,r).z.subscribe(t=>{this.style.setProperty("--z",t.current.toString())})}get pointer(){return e(this,r)}connectedCallback(){e(this,r).connect(),e(this,g).observe(),e(this,v).observe(),e(this,S).observe()}disconnectedCallback(){e(this,r).disconnect(),e(this,g).unobserve(),e(this,v).unobserve(),e(this,S).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}}r=new WeakMap,g=new WeakMap,v=new WeakMap,S=new WeakMap,E=new WeakMap,L=new WeakMap;customElements.get("e-pointer")||customElements.define("e-pointer",W);exports.Pointer=O;exports.PointerElement=W;
|
package/lib/pointer/index.js
CHANGED
|
@@ -14,12 +14,12 @@ var D = (i, s, e) => s in i ? q(i, s, { enumerable: !0, configurable: !0, writab
|
|
|
14
14
|
};
|
|
15
15
|
var T = (i, s, e) => s.has(i) || H("Cannot " + e);
|
|
16
16
|
var t = (i, s, e) => (T(i, s, "read from private field"), e ? e.call(i) : s.get(i)), n = (i, s, e) => s.has(i) ? H("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(i) : s.set(i, e), c = (i, s, e, m) => (T(i, s, "write to private field"), m ? m.call(i, e) : s.set(i, e), e);
|
|
17
|
-
import "../Store-
|
|
17
|
+
import "../Store-C46i0nvr.js";
|
|
18
18
|
import { g as G, s as I, n as J } from "../coordinates-CgdGoSYs.js";
|
|
19
19
|
import { a as K } from "../dom-P5QbAASX.js";
|
|
20
20
|
import { c as B } from "../math-BOBiC4TN.js";
|
|
21
21
|
import "../ticker/index.js";
|
|
22
|
-
import { D as R } from "../Damped-
|
|
22
|
+
import { D as R } from "../Damped-DbJKrUIf.js";
|
|
23
23
|
import { elementResizer as W } from "../element-resizer/index.js";
|
|
24
24
|
import { windowResizer as j } from "../window-resizer/index.js";
|
|
25
25
|
import { CSSProperty as P } from "../css-property/index.js";
|
package/lib/popover/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var $=i=>{throw TypeError(i)};var q=(i,o,t)=>o.has(i)||$("Cannot "+t);var e=(i,o,t)=>(q(i,o,"read from private field"),t?t.call(i):o.get(i)),n=(i,o,t)=>o.has(i)?$("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(i):o.set(i,t),h=(i,o,t,d)=>(q(i,o,"write to private field"),d?d.call(i,t):o.set(i,t),t),A=(i,o,t)=>(q(i,o,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../attribute/index.cjs"),N=require("../Store-
|
|
1
|
+
"use strict";var $=i=>{throw TypeError(i)};var q=(i,o,t)=>o.has(i)||$("Cannot "+t);var e=(i,o,t)=>(q(i,o,"read from private field"),t?t.call(i):o.get(i)),n=(i,o,t)=>o.has(i)?$("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(i):o.set(i,t),h=(i,o,t,d)=>(q(i,o,"write to private field"),d?d.call(i,t):o.set(i,t),t),A=(i,o,t)=>(q(i,o,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../attribute/index.cjs"),N=require("../Store-npaZHvX4.cjs"),P=require("../style-At6aDoqG.cjs"),B=require("../browser-CpzFX2xg.cjs");require("../ticker/index.cjs");const I=require("../tags-6_ETuR75.cjs");var f,p,b,a,u,v,l,H,y,E,L,M,g;const c=class c extends HTMLElement{constructor(){super();n(this,l);n(this,f);n(this,p);n(this,b);n(this,a);n(this,u);n(this,v);n(this,E);n(this,L);n(this,g);h(this,f,-1),h(this,p,new N.Store(!1)),h(this,a,new x.Attribute(this,"history",!1)),h(this,u,new x.Attribute(this,"single",!1)),h(this,v,!1),this.open=(t=!0)=>{if(e(this,p).current)return;e(this,p).current=!0,e(this,u).current&&(c.__opened.forEach(r=>r.close()),c.__opened=[]),c.__opened.push(this),h(this,f,c.__opened.length-1),e(this,a).current&&e(this,v)&&history.pushState("","",e(this,l,H)),clearTimeout(e(this,b)),this.classList.add("triggered"),this.style.display="block",this.dispatchEvent(new CustomEvent("popoverTriggered"));const d=()=>{addEventListener("click",e(this,E)),addEventListener("keydown",e(this,L)),this.style.opacity="1",this.classList.add("opened"),this.dispatchEvent(new CustomEvent("popoverOpened"))};t?setTimeout(d):d()},this.close=()=>{if(e(this,p).current){if(e(this,p).current=!1,c.__opened=c.__opened.filter(t=>t!==this),e(this,a).current){const t=new URL(location.href);t.searchParams.delete(e(this,l,y)),history.replaceState(null,"",t.href)}this.classList.remove("opened"),this.style.opacity="0",this.dispatchEvent(new CustomEvent("popoverClosing")),removeEventListener("click",e(this,E)),removeEventListener("keydown",e(this,L)),setTimeout(()=>{this.classList.remove("triggered"),this.style.display="none",this.dispatchEvent(new CustomEvent("popoverClosed"))},P.getElementTransitionDurationMS(this)+10)}},h(this,E,t=>{A(this,l,M).call(this,()=>{var O;const r=t.composedPath()[0],S=r instanceof HTMLElement&&(this.contains(r)||((O=this.shadowRoot)==null?void 0:O.contains(r))),m=r instanceof HTMLElement&&r.hasAttribute("outside");(!S||m)&&this.close()})}),h(this,L,t=>{A(this,l,M).call(this,()=>{t.code==="Escape"&&this.close()})}),h(this,g,()=>{h(this,v,!1),e(this,p).current&&e(this,a).current&&!location.search.includes(e(this,l,y))?this.close():!e(this,p).current&&e(this,a).current&&location.search.includes(e(this,l,y))&&this.open(),h(this,v,!0)}),this.setAttribute("popover-target","")}get history(){return e(this,a)}get single(){return e(this,u)}get opened(){return e(this,p)}connectedCallback(){e(this,a).observe(),e(this,u).observe(),this.style.opacity="0",this.style.display="none",addEventListener("popstate",e(this,g)),setTimeout(()=>{e(this,g).call(this)},0)}disconnectedCallback(){e(this,a).unobserve(),e(this,u).unobserve(),c.__opened=c.__opened.filter(t=>t!==this),clearTimeout(e(this,b)),removeEventListener("popstate",e(this,g))}};f=new WeakMap,p=new WeakMap,b=new WeakMap,a=new WeakMap,u=new WeakMap,v=new WeakMap,l=new WeakSet,H=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${e(this,l,y)}`},y=function(){return`modal-${this.id}`},E=new WeakMap,L=new WeakMap,M=function(t){(c.__opened[e(this,f)-1]||c.__opened.length===1)&&t()},g=new WeakMap,c.__opened=[];let _=c;customElements.get("e-popover")||customElements.define("e-popover",_);var s,T,w,C,k;class R extends HTMLElement{constructor(){super();n(this,s);n(this,T,()=>{this.classList.add("triggered")});n(this,w,()=>{this.classList.add("opened")});n(this,C,()=>{this.classList.remove("opened")});n(this,k,()=>{this.classList.remove("triggered")});B.isBrowser&&I.element(this,{tabindex:this.getAttribute("tabindex")||"0",onClick:()=>{if(e(this,s)){const t=this.getAttribute("type")||"open";t==="open"||t==="toggle"&&!e(this,s).opened.current?e(this,s).open():(t==="close"||t==="toggle"&&e(this,s).opened.current)&&e(this,s).close()}},onKeydown:t=>{t.code==="Space"&&t.currentTarget.click()}})}get popoverElement(){return e(this,s)}connectedCallback(){var d;const t=this.getAttribute("target");if(t){let r=null;if(t==="parent"){const S=this.closest("[popover-target]");if(S)r=S;else{const m=this.getRootNode();m instanceof ShadowRoot?r=m.host.closest("[popover-target]"):m instanceof HTMLElement&&(r=m.closest("[popover-target]"))}}else t==="sibling"?r=(d=this.parentElement)==null?void 0:d.querySelector("[popover-target]"):r=document.querySelector(`#${t}`)||this.getRootNode().querySelector(`#${t}`);r instanceof HTMLElement?(h(this,s,r),e(this,s).addEventListener("popoverTriggered",e(this,T)),e(this,s).addEventListener("popoverOpened",e(this,w)),e(this,s).addEventListener("popoverClosing",e(this,C)),e(this,s).addEventListener("popoverClosed",e(this,k))):console.warn(this,`target ${t} not found`)}}disconnectedCallback(){e(this,s)&&(e(this,s).removeEventListener("popoverTriggered",e(this,T)),e(this,s).removeEventListener("popoverOpened",e(this,w)),e(this,s).removeEventListener("popoverClosing",e(this,C)),e(this,s).removeEventListener("popoverClosed",e(this,k)))}}s=new WeakMap,T=new WeakMap,w=new WeakMap,C=new WeakMap,k=new WeakMap;customElements.get("e-popover-button")||customElements.define("e-popover-button",R);exports.PopoverButtonElement=R;exports.PopoverElement=_;
|
package/lib/popover/index.js
CHANGED
|
@@ -4,11 +4,11 @@ var H = (i) => {
|
|
|
4
4
|
var _ = (i, o, t) => o.has(i) || H("Cannot " + t);
|
|
5
5
|
var e = (i, o, t) => (_(i, o, "read from private field"), t ? t.call(i) : o.get(i)), n = (i, o, t) => o.has(i) ? H("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(i) : o.set(i, t), h = (i, o, t, d) => (_(i, o, "write to private field"), d ? d.call(i, t) : o.set(i, t), t), A = (i, o, t) => (_(i, o, "access private method"), t);
|
|
6
6
|
import { Attribute as O } from "../attribute/index.js";
|
|
7
|
-
import { S as N } from "../Store-
|
|
7
|
+
import { S as N } from "../Store-C46i0nvr.js";
|
|
8
8
|
import { g as q } from "../style-j2TwriJ_.js";
|
|
9
9
|
import { i as I } from "../browser-0zX67oeU.js";
|
|
10
10
|
import "../ticker/index.js";
|
|
11
|
-
import { e as B } from "../tags-
|
|
11
|
+
import { e as B } from "../tags-BL3kQp9o.js";
|
|
12
12
|
var f, l, T, a, u, v, c, R, y, E, L, $, g;
|
|
13
13
|
const p = class p extends HTMLElement {
|
|
14
14
|
constructor() {
|