@shopware-ag/dive 2.0.1-beta.0 → 2.0.1-beta.10
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/build/chunks/AssetCache-C-7MpNrK.cjs +1 -0
- package/build/chunks/AssetCache-CZV5A70i.mjs +79 -0
- package/build/chunks/AssetExporter-DsbC2rqv.cjs +164 -0
- package/build/{src/modules/asset/exporter/AssetExporter.mjs → chunks/AssetExporter-brT7ogoM.mjs} +22 -21
- package/build/chunks/AssetLoader-BZlqXTbf.cjs +4 -0
- package/build/chunks/AssetLoader-Dnh5tbUZ.mjs +2341 -0
- package/build/chunks/FileTypes-DMybIHHj.mjs +1109 -0
- package/build/chunks/FileTypes-PEcAgRZ8.cjs +30 -0
- package/build/chunks/MathUtils-CBW56ZuG.cjs +1 -0
- package/build/chunks/MathUtils-CFGjHuVF.mjs +159 -0
- package/build/chunks/OrbitController-D-WNei2f.mjs +940 -0
- package/build/chunks/OrbitController-rMX8EHvJ.cjs +1 -0
- package/build/chunks/PerspectiveCamera-CONx93im.cjs +1 -0
- package/build/chunks/PerspectiveCamera-DUiWJJIj.mjs +38 -0
- package/build/chunks/PovSchema-Co9FznEz.cjs +1 -0
- package/build/chunks/PovSchema-DWWvr_ED.mjs +10 -0
- package/build/chunks/SelectTool-BVxDEcnM.cjs +1 -0
- package/build/chunks/{SelectTool-mTRiZYaC.mjs → SelectTool-D5QfT5rr.mjs} +59 -54
- package/build/chunks/draco_decoder-Bh9flJPu.cjs +1 -0
- package/build/chunks/draco_decoder-CEzwqP9o.mjs +38 -0
- package/build/chunks/draco_decoder-DtHHc5d0.mjs +4 -0
- package/build/chunks/draco_decoder-DvYjcLz_.cjs +35 -0
- package/build/chunks/draco_wasm_wrapper-FoEVV9af.cjs +118 -0
- package/build/chunks/draco_wasm_wrapper-yQy2VLhb.mjs +121 -0
- package/build/chunks/fflate.module-DHdJvhNh.cjs +6 -0
- package/build/chunks/fflate.module-xyO_T3Zm.mjs +602 -0
- package/build/chunks/findInterface-C6mrvf_t.cjs +1 -0
- package/build/chunks/findInterface-DbJ5qzbc.mjs +11 -0
- package/build/chunks/isFileTypeSupported-BSpswPHU.mjs +12 -0
- package/build/chunks/isFileTypeSupported-CrEqYiv9.cjs +1 -0
- package/build/chunks/network-error-BONfHWQq.mjs +14 -0
- package/build/chunks/network-error-CdDXil5g.cjs +1 -0
- package/build/chunks/package-Bf92jAR_.cjs +1 -0
- package/build/chunks/package-ZPbjnXun.mjs +39 -0
- package/build/chunks/parse-error-DfOPyLWM.mjs +14 -0
- package/build/chunks/parse-error-Dy_EE4rL.cjs +1 -0
- package/build/dive.cjs +1 -30
- package/build/dive.mjs +665 -1622
- package/build/plugins/animation/index.cjs +1 -0
- package/build/plugins/animation/index.d.ts +2 -0
- package/build/plugins/animation/index.mjs +126 -0
- package/build/plugins/ar/index.cjs +1 -0
- package/build/plugins/ar/index.d.ts +2 -0
- package/build/plugins/ar/index.mjs +207 -0
- package/build/plugins/assetcache/index.cjs +1 -0
- package/build/plugins/assetcache/index.d.ts +2 -0
- package/build/plugins/assetcache/index.mjs +5 -0
- package/build/plugins/assetconverter/index.d.ts +2 -0
- package/build/plugins/assetexporter/index.cjs +1 -0
- package/build/plugins/assetexporter/index.d.ts +2 -0
- package/build/plugins/assetexporter/index.mjs +4 -0
- package/build/plugins/assetloader/index.cjs +1 -0
- package/build/plugins/assetloader/index.d.ts +2 -0
- package/build/plugins/assetloader/index.mjs +6 -0
- package/build/plugins/axiscamera/index.cjs +1 -0
- package/build/plugins/axiscamera/index.d.ts +2 -0
- package/build/plugins/axiscamera/index.mjs +4 -0
- package/build/plugins/mediacreator/index.cjs +1 -0
- package/build/plugins/mediacreator/index.d.ts +2 -0
- package/build/{src/modules/mediacreator/MediaCreator.mjs → plugins/mediacreator/index.mjs} +4 -4
- package/build/plugins/orbitcontroller/index.cjs +1 -0
- package/build/plugins/orbitcontroller/index.d.ts +2 -0
- package/build/plugins/orbitcontroller/index.mjs +5 -0
- package/build/plugins/state/index.cjs +27 -0
- package/build/plugins/state/index.d.ts +2 -0
- package/build/plugins/state/index.mjs +4265 -0
- package/build/plugins/systeminfo/index.cjs +1 -0
- package/build/plugins/systeminfo/index.d.ts +2 -0
- package/build/{chunks/SystemInfo-DPAQG-S5.mjs → plugins/systeminfo/index.mjs} +48 -51
- package/build/plugins/toolbox/index.cjs +1 -0
- package/build/plugins/toolbox/index.d.ts +2 -0
- package/build/{src/modules/toolbox/Toolbox.mjs → plugins/toolbox/index.mjs} +23 -17
- package/build/src/components/floor/Floor.d.ts +2 -2
- package/build/src/components/gizmo/Gizmo.d.ts +1 -1
- package/build/src/components/gizmo/handles/AxisHandle.d.ts +1 -1
- package/build/src/components/gizmo/handles/RadialHandle.d.ts +1 -1
- package/build/src/components/gizmo/handles/ScaleHandle.d.ts +1 -1
- package/build/src/components/gizmo/rotate/RotateGizmo.d.ts +2 -2
- package/build/src/components/gizmo/scale/ScaleGizmo.d.ts +2 -2
- package/build/src/components/gizmo/translate/TranslateGizmo.d.ts +2 -2
- package/build/src/components/grid/Grid.d.ts +1 -1
- package/build/src/components/group/Group.d.ts +4 -4
- package/build/src/components/light/AmbientLight.d.ts +3 -3
- package/build/src/components/light/PointLight.d.ts +3 -3
- package/build/src/components/light/SceneLight.d.ts +3 -3
- package/build/src/components/model/Model.d.ts +8 -5
- package/build/src/components/node/Node.d.ts +8 -8
- package/build/src/components/primitive/Primitive.d.ts +5 -5
- package/build/src/components/root/Root.d.ts +19 -31
- package/build/src/core/Dive.d.ts +8 -7
- package/build/src/engine/Engine.d.ts +2 -6
- package/build/src/engine/clock/Clock.d.ts +1 -0
- package/build/src/engine/index.d.ts +6 -0
- package/build/src/engine/renderer/Renderer.d.ts +47 -7
- package/build/src/engine/scene/Scene.d.ts +4 -22
- package/build/src/engine/scene/xrroot/XRRoot.d.ts +2 -2
- package/build/src/engine/scene/xrroot/xrlightroot/XRLightRoot.d.ts +2 -2
- package/build/src/error/file-content/file-content-error.d.ts +4 -0
- package/build/src/error/index.d.ts +4 -0
- package/build/src/error/network/network-error.d.ts +1 -1
- package/build/src/error/parse/parse-error.d.ts +2 -1
- package/build/src/events/dispatcher/EventDispatcher.d.ts +6 -0
- package/build/src/events/index.d.ts +1 -0
- package/build/src/helpers/deepClone/deepClone.d.ts +34 -0
- package/build/src/helpers/index.d.ts +5 -4
- package/build/src/index.d.ts +5 -5
- package/build/src/interfaces/Draggable.d.ts +1 -1
- package/build/src/plugins/animation/index.d.ts +2 -0
- package/build/src/{modules/animation → plugins/animation/src}/animator/Animator.d.ts +2 -3
- package/build/src/plugins/animation/src/index.d.ts +3 -0
- package/build/src/plugins/animation/src/system/AnimationSystem.d.ts +23 -0
- package/build/src/plugins/ar/index.d.ts +4 -0
- package/build/src/plugins/ar/src/ARSystem.d.ts +24 -0
- package/build/src/plugins/ar/src/arquicklook/ARQuickLook.d.ts +15 -0
- package/build/src/plugins/ar/src/error/ar-errors.d.ts +24 -0
- package/build/src/{modules/ar → plugins/ar/src}/sceneviewer/SceneViewer.d.ts +10 -0
- package/build/src/{modules/ar → plugins/ar/src}/webxr/WebXR.d.ts +4 -4
- package/build/src/{modules/ar → plugins/ar/src}/webxr/controller/WebXRController.d.ts +5 -5
- package/build/src/{modules/ar → plugins/ar/src}/webxr/crosshair/WebXRCrosshair.d.ts +2 -2
- package/build/src/{modules/ar → plugins/ar/src}/webxr/origin/WebXROrigin.d.ts +4 -4
- package/build/src/{modules/ar → plugins/ar/src}/webxr/overlay/Overlay.d.ts +2 -2
- package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/WebXRRaycaster.d.ts +8 -8
- package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/ar/WebXRRaycasterAR.d.ts +4 -4
- package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/three/WebXRRaycasterTHREE.d.ts +4 -4
- package/build/src/{modules/ar → plugins/ar/src}/webxr/touchscreencontrols/WebXRTouchscreenControls.d.ts +3 -3
- package/build/src/plugins/assetcache/index.d.ts +1 -0
- package/build/src/plugins/assetcache/src/cache/AssetCache.d.ts +12 -0
- package/build/src/plugins/assetcache/src/chunk/Chunk.d.ts +16 -0
- package/build/src/plugins/assetcache/src/index.d.ts +2 -0
- package/build/src/plugins/assetconverter/index.d.ts +1 -0
- package/build/src/plugins/assetconverter/src/AssetConverter.d.ts +13 -0
- package/build/src/plugins/assetexporter/index.d.ts +1 -0
- package/build/src/{modules/asset/exporter → plugins/assetexporter/src}/AssetExporter.d.ts +0 -17
- package/build/src/plugins/assetloader/index.d.ts +3 -0
- package/build/src/plugins/assetloader/src/draco/DracoLoader.d.ts +10 -0
- package/build/src/plugins/assetloader/src/loader/AssetLoader.d.ts +14 -0
- package/build/src/plugins/axiscamera/index.d.ts +1 -0
- package/build/src/{modules/axiscamera → plugins/axiscamera/src}/AxisCamera.d.ts +3 -6
- package/build/src/plugins/mediacreator/index.d.ts +1 -0
- package/build/src/plugins/mediacreator/src/MediaCreator.d.ts +15 -0
- package/build/src/plugins/orbitcontroller/index.d.ts +1 -0
- package/build/src/{modules/controller/orbit → plugins/orbitcontroller/src}/OrbitController.d.ts +3 -3
- package/build/src/plugins/state/index.d.ts +4 -0
- package/build/src/{modules/state → plugins/state/src}/State.d.ts +4 -27
- package/build/src/{modules/state → plugins/state/src}/actions/action.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/ar/launchar.d.ts +2 -2
- package/build/src/{modules/state → plugins/state/src}/actions/camera/computeencompassingview.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/camera/getcameratransform.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/camera/lockcamera.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/camera/movecamera.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/camera/setcameralayer.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/camera/setcameratransform.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/camera/zoomcamera.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/media/generatemedia.d.ts +1 -1
- package/build/src/plugins/state/src/actions/object/addobject.d.ts +9 -0
- package/build/src/{modules/state → plugins/state/src}/actions/object/deleteobject.d.ts +4 -3
- package/build/src/{modules/state → plugins/state/src}/actions/object/deselectobject.d.ts +4 -3
- package/build/src/{modules/state → plugins/state/src}/actions/object/dropit.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/object/getallobjects.d.ts +3 -2
- package/build/src/{modules/state → plugins/state/src}/actions/object/getobjects.d.ts +3 -2
- package/build/src/{modules/state → plugins/state/src}/actions/object/modelloaded.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/object/placeonfloor.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/object/selectobject.d.ts +4 -3
- package/build/src/{modules/state → plugins/state/src}/actions/object/setparent.d.ts +6 -5
- package/build/src/{modules/state → plugins/state/src}/actions/object/updateobject.d.ts +4 -3
- package/build/src/{modules/state → plugins/state/src}/actions/renderer/startrender.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/scene/exportscene.d.ts +4 -4
- package/build/src/{modules/state → plugins/state/src}/actions/scene/getallscenedata.d.ts +3 -3
- package/build/src/{modules/state → plugins/state/src}/actions/scene/setbackground.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/scene/updatescene.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/toolbox/setgizmomode.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/toolbox/setgizmoscalelinked.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/toolbox/setgizmovisible.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/toolbox/usetool.d.ts +2 -2
- package/build/src/plugins/state/types/ActionTypes.d.ts +17 -0
- package/build/src/{types/SceneType.d.ts → plugins/state/types/StateExportFileType.d.ts} +1 -1
- package/build/src/plugins/state/types/StateSceneData.d.ts +19 -0
- package/build/src/plugins/state/types/index.d.ts +1 -0
- package/build/src/plugins/systeminfo/index.d.ts +2 -0
- package/build/src/{modules/systeminfo → plugins/systeminfo/src}/SystemInfo.d.ts +22 -32
- package/build/src/plugins/toolbox/index.d.ts +4 -0
- package/build/src/{modules/toolbox → plugins/toolbox/src}/BaseTool.d.ts +4 -6
- package/build/src/{modules/toolbox → plugins/toolbox/src}/Toolbox.d.ts +8 -17
- package/build/src/{modules/toolbox → plugins/toolbox/src}/select/SelectTool.d.ts +7 -11
- package/build/src/{modules/toolbox → plugins/toolbox/src}/transform/TransformTool.d.ts +6 -10
- package/build/src/types/components/DIVELight.d.ts +4 -0
- package/build/src/types/components/DIVESceneObject.d.ts +6 -0
- package/build/src/types/components/index.d.ts +2 -0
- package/build/src/types/index.d.ts +2 -5
- package/build/src/types/schema/BaseEntitySchema.d.ts +8 -0
- package/build/src/types/schema/EntitySchema.d.ts +11 -0
- package/build/src/types/schema/EntityTypeSchema.d.ts +1 -0
- package/build/src/types/schema/GeometrySchema.d.ts +7 -0
- package/build/src/types/schema/GeometryTypeSchema.d.ts +1 -0
- package/build/src/types/schema/GroupSchema.d.ts +11 -0
- package/build/src/types/schema/LightSchema.d.ts +28 -0
- package/build/src/{modules/state/types/COMMaterial.d.ts → types/schema/MaterialSchema.d.ts} +1 -1
- package/build/src/types/schema/ModelSchema.d.ts +14 -0
- package/build/src/types/schema/PovSchema.d.ts +10 -0
- package/build/src/types/schema/PrimitiveSchema.d.ts +14 -0
- package/build/src/types/schema/index.d.ts +11 -0
- package/package.json +60 -41
- package/build/chunks/FileTypes-BjZ0rrIV.cjs +0 -1
- package/build/chunks/FileTypes-qgYnI0Jg.mjs +0 -30
- package/build/chunks/ModuleRegistry-NyNtjHb2.cjs +0 -1
- package/build/chunks/ModuleRegistry-RSub8W0G.mjs +0 -13
- package/build/chunks/PerspectiveCamera-BByyG5R4.cjs +0 -1
- package/build/chunks/PerspectiveCamera-sm4_81KJ.mjs +0 -34
- package/build/chunks/SelectTool-BRKko7uz.cjs +0 -1
- package/build/chunks/SystemInfo-oX-NNneO.cjs +0 -1
- package/build/chunks/VisibilityLayerMask-BI7jPKdx.cjs +0 -1
- package/build/chunks/VisibilityLayerMask-CXgt1fJc.mjs +0 -8
- package/build/chunks/findInterface-BEdL2iUQ.cjs +0 -1
- package/build/chunks/findInterface-OrXgmwxj.mjs +0 -18
- package/build/chunks/index-C_uFFwT2.mjs +0 -5
- package/build/chunks/index-DAwIH9xh.cjs +0 -1
- package/build/chunks/package-BFpY3sIj.cjs +0 -1
- package/build/chunks/package-BvoZkrge.mjs +0 -39
- package/build/chunks/parse-error-2f5qpXP5.cjs +0 -6
- package/build/chunks/parse-error-DRBVHL9E.mjs +0 -614
- package/build/src/error/ar-compatibility/ar-compatibility-error.d.ts +0 -12
- package/build/src/modules/ModuleRegistry.d.ts +0 -19
- package/build/src/modules/animation/AnimationSystem.cjs +0 -1
- package/build/src/modules/animation/AnimationSystem.d.ts +0 -36
- package/build/src/modules/animation/AnimationSystem.mjs +0 -95
- package/build/src/modules/ar/ARSystem.cjs +0 -1
- package/build/src/modules/ar/ARSystem.d.ts +0 -71
- package/build/src/modules/ar/ARSystem.mjs +0 -163
- package/build/src/modules/ar/arquicklook/ARQuickLook.d.ts +0 -7
- package/build/src/modules/asset/converter/AssetConverter.d.ts +0 -30
- package/build/src/modules/asset/exporter/AssetExporter.cjs +0 -164
- package/build/src/modules/asset/loader/AssetLoader.cjs +0 -2
- package/build/src/modules/asset/loader/AssetLoader.d.ts +0 -29
- package/build/src/modules/asset/loader/AssetLoader.mjs +0 -1919
- package/build/src/modules/events/EventExecutor.d.ts +0 -5
- package/build/src/modules/mediacreator/MediaCreator.cjs +0 -1
- package/build/src/modules/mediacreator/MediaCreator.d.ts +0 -44
- package/build/src/modules/state/State.cjs +0 -27
- package/build/src/modules/state/State.mjs +0 -4271
- package/build/src/modules/state/actions/object/addobject.d.ts +0 -8
- package/build/src/modules/state/types/ActionTypes.d.ts +0 -18
- package/build/src/modules/state/types/COMBaseEntity.d.ts +0 -8
- package/build/src/modules/state/types/COMEntity.d.ts +0 -6
- package/build/src/modules/state/types/COMEntityType.d.ts +0 -1
- package/build/src/modules/state/types/COMGeometry.d.ts +0 -7
- package/build/src/modules/state/types/COMGeometryType.d.ts +0 -1
- package/build/src/modules/state/types/COMGroup.d.ts +0 -10
- package/build/src/modules/state/types/COMLight.d.ts +0 -12
- package/build/src/modules/state/types/COMModel.d.ts +0 -13
- package/build/src/modules/state/types/COMPov.d.ts +0 -9
- package/build/src/modules/state/types/COMPrimitive.d.ts +0 -13
- package/build/src/modules/state/types/index.d.ts +0 -11
- package/build/src/modules/systeminfo/SystemInfo.cjs +0 -1
- package/build/src/modules/systeminfo/SystemInfo.mjs +0 -5
- package/build/src/modules/toolbox/Toolbox.cjs +0 -1
- package/build/src/types/SceneData.d.ts +0 -19
- package/build/src/types/SceneObjects.d.ts +0 -7
- package/build/src/types/UUID.d.ts +0 -1
- /package/build/{src/modules/asset/converter/AssetConverter.cjs → plugins/assetconverter/index.cjs} +0 -0
- /package/build/{src/modules/asset/converter/AssetConverter.mjs → plugins/assetconverter/index.mjs} +0 -0
- /package/build/src/{modules/animation → plugins/animation/src}/types/AnimatorParameters.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/ActionRegistry.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/ar/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/camera/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/media/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/object/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/renderer/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/scene/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/toolbox/index.d.ts +0 -0
- /package/build/src/{types/info → plugins/systeminfo/types}/index.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var ft=Object.defineProperty;var _t=(r,n,e)=>n in r?ft(r,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[n]=e;var h=(r,n,e)=>_t(r,typeof n!="symbol"?n+"":n,e);const t=require("three"),J=require("./VisibilityLayerMask-BI7jPKdx.cjs"),y=require("./findInterface-BEdL2iUQ.cjs"),I=new t.Raycaster,p=new t.Vector3,E=new t.Vector3,c=new t.Quaternion,$={X:new t.Vector3(1,0,0),Y:new t.Vector3(0,1,0),Z:new t.Vector3(0,0,1)},F={type:"change"},tt={type:"mouseDown"},et={type:"mouseUp",mode:null},it={type:"objectChange"};class yt extends t.Object3D{constructor(n,e){super(),e===void 0&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),e=document),this.isTransformControls=!0,this.visible=!1,this.domElement=e,this.domElement.style.touchAction="none";const o=new vt;this._gizmo=o,this.add(o);const s=new Pt;this._plane=s,this.add(s);const a=this;function i(u,w){let G=w;Object.defineProperty(a,u,{get:function(){return G!==void 0?G:w},set:function(D){G!==D&&(G=D,s[u]=D,o[u]=D,a.dispatchEvent({type:u+"-changed",value:D}),a.dispatchEvent(F))}}),a[u]=w,s[u]=w,o[u]=w}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 d=new t.Vector3,f=new t.Vector3,x=new t.Quaternion,T=new t.Quaternion,j=new t.Vector3,z=new t.Quaternion,N=new t.Vector3,Z=new t.Vector3,S=new t.Vector3,v=0,b=new t.Vector3;i("worldPosition",d),i("worldPositionStart",f),i("worldQuaternion",x),i("worldQuaternionStart",T),i("cameraPosition",j),i("cameraQuaternion",z),i("pointStart",N),i("pointEnd",Z),i("rotationAxis",S),i("rotationAngle",v),i("eye",b),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=wt.bind(this),this._onPointerDown=bt.bind(this),this._onPointerHover=gt.bind(this),this._onPointerMove=Mt.bind(this),this._onPointerUp=St.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&&I.setFromCamera(n,this.camera);const e=U(this._gizmo.picker[this.mode],I);e?this.axis=e.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&&I.setFromCamera(n,this.camera);const e=U(this._plane,I,!0);e&&(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(e.point).sub(this.worldPositionStart)),this.dragging=!0,tt.mode=this.mode,this.dispatchEvent(tt)}}pointerMove(n){const e=this.axis,o=this.mode,s=this.object;let a=this.space;if(o==="scale"?a="local":(e==="E"||e==="XYZE"||e==="XYZ")&&(a="world"),s===void 0||e===null||this.dragging===!1||n!==null&&n.button!==-1)return;n!==null&&I.setFromCamera(n,this.camera);const i=U(this._plane,I,!0);if(i){if(this.pointEnd.copy(i.point).sub(this.worldPositionStart),o==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),a==="local"&&e!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),e.indexOf("X")===-1&&(this._offset.x=0),e.indexOf("Y")===-1&&(this._offset.y=0),e.indexOf("Z")===-1&&(this._offset.z=0),a==="local"&&e!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),s.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(a==="local"&&(s.position.applyQuaternion(c.copy(this._quaternionStart).invert()),e.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),e.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),e.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.position.applyQuaternion(this._quaternionStart)),a==="world"&&(s.parent&&s.position.add(p.setFromMatrixPosition(s.parent.matrixWorld)),e.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),e.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),e.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.parent&&s.position.sub(p.setFromMatrixPosition(s.parent.matrixWorld))));else if(o==="scale"){if(e.search("XYZ")!==-1){let d=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(d*=-1),E.set(d,d,d)}else p.copy(this.pointStart),E.copy(this.pointEnd),p.applyQuaternion(this._worldQuaternionInv),E.applyQuaternion(this._worldQuaternionInv),E.divide(p),e.search("X")===-1&&(E.x=1),e.search("Y")===-1&&(E.y=1),e.search("Z")===-1&&(E.z=1);s.scale.copy(this._scaleStart).multiply(E),this.scaleSnap&&(e.search("X")!==-1&&(s.scale.x=Math.round(s.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),e.search("Y")!==-1&&(s.scale.y=Math.round(s.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),e.search("Z")!==-1&&(s.scale.z=Math.round(s.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(o==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const d=20/this.worldPosition.distanceTo(p.setFromMatrixPosition(this.camera.matrixWorld));let f=!1;e==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(p.copy(this.rotationAxis).cross(this.eye))*d):(e==="X"||e==="Y"||e==="Z")&&(this.rotationAxis.copy($[e]),p.copy($[e]),a==="local"&&p.applyQuaternion(this.worldQuaternion),p.cross(this.eye),p.length()===0?f=!0:this.rotationAngle=this._offset.dot(p.normalize())*d),(e==="E"||f)&&(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),a==="local"&&e!=="E"&&e!=="XYZE"?(s.quaternion.copy(this._quaternionStart),s.quaternion.multiply(c.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),s.quaternion.copy(c.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),s.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(F),this.dispatchEvent(it)}}pointerUp(n){n!==null&&n.button!==0||(this.dragging&&this.axis!==null&&(et.mode=this.mode,this.dispatchEvent(et)),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(F),this.dispatchEvent(it),this.pointStart.copy(this.pointEnd))}getRaycaster(){return I}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 wt(r){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:r.button};{const n=this.domElement.getBoundingClientRect();return{x:(r.clientX-n.left)/n.width*2-1,y:-(r.clientY-n.top)/n.height*2+1,button:r.button}}}function gt(r){if(this.enabled)switch(r.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(r));break}}function bt(r){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(r.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(r)),this.pointerDown(this._getPointer(r)))}function Mt(r){this.enabled&&this.pointerMove(this._getPointer(r))}function St(r){this.enabled&&(this.domElement.releasePointerCapture(r.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(r)))}function U(r,n,e){const o=n.intersectObject(r,!0);for(let s=0;s<o.length;s++)if(o[s].object.visible||e)return o[s];return!1}const k=new t.Euler,l=new t.Vector3(0,1,0),nt=new t.Vector3(0,0,0),ot=new t.Matrix4,q=new t.Quaternion,W=new t.Quaternion,M=new t.Vector3,st=new t.Matrix4,Y=new t.Vector3(1,0,0),A=new t.Vector3(0,1,0),O=new t.Vector3(0,0,1),B=new t.Vector3,C=new t.Vector3,X=new t.Vector3;class vt 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}),e=new t.LineBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),o=n.clone();o.opacity=.15;const s=e.clone();s.opacity=.5;const a=n.clone();a.color.setHex(16711680);const i=n.clone();i.color.setHex(65280);const d=n.clone();d.color.setHex(255);const f=n.clone();f.color.setHex(16711680),f.opacity=.5;const x=n.clone();x.color.setHex(65280),x.opacity=.5;const T=n.clone();T.color.setHex(255),T.opacity=.5;const j=n.clone();j.opacity=.25;const z=n.clone();z.color.setHex(16776960),z.opacity=.25,n.clone().color.setHex(16776960);const Z=n.clone();Z.color.setHex(7895160);const S=new t.CylinderGeometry(0,.04,.1,12);S.translate(0,.05,0);const v=new t.BoxGeometry(.08,.08,.08);v.translate(0,.04,0);const b=new t.BufferGeometry;b.setAttribute("position",new t.Float32BufferAttribute([0,0,0,1,0,0],3));const u=new t.CylinderGeometry(.0075,.0075,.5,3);u.translate(0,.25,0);function w(_,H){const g=new t.TorusGeometry(_,.0075,3,64,H*Math.PI*2);return g.rotateY(Math.PI/2),g.rotateX(Math.PI/2),g}function G(){const _=new t.BufferGeometry;return _.setAttribute("position",new t.Float32BufferAttribute([0,0,0,1,1,1],3)),_}const D={X:[[new t.Mesh(S,a),[.5,0,0],[0,0,-Math.PI/2]],[new t.Mesh(S,a),[-.5,0,0],[0,0,Math.PI/2]],[new t.Mesh(u,a),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new t.Mesh(S,i),[0,.5,0]],[new t.Mesh(S,i),[0,-.5,0],[Math.PI,0,0]],[new t.Mesh(u,i)]],Z:[[new t.Mesh(S,d),[0,0,.5],[Math.PI/2,0,0]],[new t.Mesh(S,d),[0,0,-.5],[-Math.PI/2,0,0]],[new t.Mesh(u,d),null,[Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.OctahedronGeometry(.1,0),j.clone()),[0,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),T.clone()),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),f.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),x.clone()),[.15,0,.15],[-Math.PI/2,0,0]]]},rt={X:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[.3,0,0],[0,0,-Math.PI/2]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[0,.3,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[0,-.3,0],[0,0,Math.PI]]],Z:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[0,0,.3],[Math.PI/2,0,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.OctahedronGeometry(.2,0),o)]],XY:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),o),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),o),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),o),[.15,0,.15],[-Math.PI/2,0,0]]]},at={START:[[new t.Mesh(new t.OctahedronGeometry(.01,2),s),null,null,null,"helper"]],END:[[new t.Mesh(new t.OctahedronGeometry(.01,2),s),null,null,null,"helper"]],DELTA:[[new t.Line(G(),s),null,null,null,"helper"]],X:[[new t.Line(b,s.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new t.Line(b,s.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new t.Line(b,s.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},lt={XYZE:[[new t.Mesh(w(.5,1),Z),null,[0,Math.PI/2,0]]],X:[[new t.Mesh(w(.5,.5),a)]],Y:[[new t.Mesh(w(.5,.5),i),null,[0,0,-Math.PI/2]]],Z:[[new t.Mesh(w(.5,.5),d),null,[0,Math.PI/2,0]]],E:[[new t.Mesh(w(.75,1),z),null,[0,Math.PI/2,0]]]},ht={AXIS:[[new t.Line(b,s.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},ct={XYZE:[[new t.Mesh(new t.SphereGeometry(.25,10,8),o)]],X:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),o),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),o),[0,0,0],[Math.PI/2,0,0]]],Z:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),o),[0,0,0],[0,0,-Math.PI/2]]],E:[[new t.Mesh(new t.TorusGeometry(.75,.1,2,24),o)]]},dt={X:[[new t.Mesh(v,a),[.5,0,0],[0,0,-Math.PI/2]],[new t.Mesh(u,a),[0,0,0],[0,0,-Math.PI/2]],[new t.Mesh(v,a),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(v,i),[0,.5,0]],[new t.Mesh(u,i)],[new t.Mesh(v,i),[0,-.5,0],[0,0,Math.PI]]],Z:[[new t.Mesh(v,d),[0,0,.5],[Math.PI/2,0,0]],[new t.Mesh(u,d),[0,0,0],[Math.PI/2,0,0]],[new t.Mesh(v,d),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),T),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),f),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),x),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.BoxGeometry(.1,.1,.1),j.clone())]]},pt={X:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[.3,0,0],[0,0,-Math.PI/2]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[0,.3,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[0,-.3,0],[0,0,Math.PI]]],Z:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[0,0,.3],[Math.PI/2,0,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),o),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),o),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),o),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.2),o),[0,0,0]]]},ut={X:[[new t.Line(b,s.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new t.Line(b,s.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new t.Line(b,s.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function P(_){const H=new t.Object3D;for(const g in _)for(let Q=_[g].length;Q--;){const m=_[g][Q][0].clone(),L=_[g][Q][1],V=_[g][Q][2],R=_[g][Q][3],mt=_[g][Q][4];m.name=g,m.tag=mt,L&&m.position.set(L[0],L[1],L[2]),V&&m.rotation.set(V[0],V[1],V[2]),R&&m.scale.set(R[0],R[1],R[2]),m.updateMatrix();const K=m.geometry.clone();K.applyMatrix4(m.matrix),m.geometry=K,m.renderOrder=1/0,m.position.set(0,0,0),m.rotation.set(0,0,0),m.scale.set(1,1,1),H.add(m)}return H}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=P(D)),this.add(this.gizmo.rotate=P(lt)),this.add(this.gizmo.scale=P(dt)),this.add(this.picker.translate=P(rt)),this.add(this.picker.rotate=P(ct)),this.add(this.picker.scale=P(pt)),this.add(this.helper.translate=P(at)),this.add(this.helper.rotate=P(ht)),this.add(this.helper.scale=P(ut)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(n){const o=(this.mode==="scale"?"local":this.space)==="local"?this.worldQuaternion:W;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 s=[];s=s.concat(this.picker[this.mode].children),s=s.concat(this.gizmo[this.mode].children),s=s.concat(this.helper[this.mode].children);for(let a=0;a<s.length;a++){const i=s[a];i.visible=!0,i.rotation.set(0,0,0),i.position.copy(this.worldPosition);let d;if(this.camera.isOrthographicCamera?d=(this.camera.top-this.camera.bottom)/this.camera.zoom:d=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(d*this.size/4),i.tag==="helper"){i.visible=!1,i.name==="AXIS"?(i.visible=!!this.axis,this.axis==="X"&&(c.setFromEuler(k.set(0,0,0)),i.quaternion.copy(o).multiply(c),Math.abs(l.copy(Y).applyQuaternion(o).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Y"&&(c.setFromEuler(k.set(0,0,Math.PI/2)),i.quaternion.copy(o).multiply(c),Math.abs(l.copy(A).applyQuaternion(o).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Z"&&(c.setFromEuler(k.set(0,Math.PI/2,0)),i.quaternion.copy(o).multiply(c),Math.abs(l.copy(O).applyQuaternion(o).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="XYZE"&&(c.setFromEuler(k.set(0,Math.PI/2,0)),l.copy(this.rotationAxis),i.quaternion.setFromRotationMatrix(ot.lookAt(nt,l,A)),i.quaternion.multiply(c),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),p.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),p.applyQuaternion(this.worldQuaternionStart.clone().invert()),i.scale.copy(p),i.visible=this.dragging):(i.quaternion.copy(o),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(o),this.mode==="translate"||this.mode==="scale"?(i.name==="X"&&Math.abs(l.copy(Y).applyQuaternion(o).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Y"&&Math.abs(l.copy(A).applyQuaternion(o).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Z"&&Math.abs(l.copy(O).applyQuaternion(o).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XY"&&Math.abs(l.copy(O).applyQuaternion(o).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="YZ"&&Math.abs(l.copy(Y).applyQuaternion(o).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XZ"&&Math.abs(l.copy(A).applyQuaternion(o).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1)):this.mode==="rotate"&&(q.copy(o),l.copy(this.eye).applyQuaternion(c.copy(o).invert()),i.name.search("E")!==-1&&i.quaternion.setFromRotationMatrix(ot.lookAt(this.eye,nt,A)),i.name==="X"&&(c.setFromAxisAngle(Y,Math.atan2(-l.y,l.z)),c.multiplyQuaternions(q,c),i.quaternion.copy(c)),i.name==="Y"&&(c.setFromAxisAngle(A,Math.atan2(l.x,l.z)),c.multiplyQuaternions(q,c),i.quaternion.copy(c)),i.name==="Z"&&(c.setFromAxisAngle(O,Math.atan2(l.y,l.x)),c.multiplyQuaternions(q,c),i.quaternion.copy(c))),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(f){return i.name===f}))&&(i.material.color.setHex(16776960),i.material.opacity=1)}super.updateMatrixWorld(n)}}class Pt 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 e=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(e="local"),B.copy(Y).applyQuaternion(e==="local"?this.worldQuaternion:W),C.copy(A).applyQuaternion(e==="local"?this.worldQuaternion:W),X.copy(O).applyQuaternion(e==="local"?this.worldQuaternion:W),l.copy(C),this.mode){case"translate":case"scale":switch(this.axis){case"X":l.copy(this.eye).cross(B),M.copy(B).cross(l);break;case"Y":l.copy(this.eye).cross(C),M.copy(C).cross(l);break;case"Z":l.copy(this.eye).cross(X),M.copy(X).cross(l);break;case"XY":M.copy(X);break;case"YZ":M.copy(B);break;case"XZ":l.copy(X),M.copy(C);break;case"XYZ":case"E":M.set(0,0,0);break}break;case"rotate":default:M.set(0,0,0)}M.length()===0?this.quaternion.copy(this.cameraQuaternion):(st.lookAt(p.set(0,0,0),M,l),this.quaternion.setFromRotationMatrix(st)),super.updateMatrixWorld(n)}}class Et{constructor(n,e){h(this,"POINTER_DRAG_THRESHOLD",.001);h(this,"name");h(this,"_canvas");h(this,"_scene");h(this,"_controller");h(this,"_pointer");h(this,"_pointerPrimaryDown");h(this,"_pointerMiddleDown");h(this,"_pointerSecondaryDown");h(this,"_lastPointerDown");h(this,"_lastPointerUp");h(this,"_raycaster");h(this,"_intersects");h(this,"_hovered");h(this,"_dragging");h(this,"_dragStart");h(this,"_dragCurrent");h(this,"_dragEnd");h(this,"_dragDelta");h(this,"_draggable");h(this,"_dragRaycastOnObjects");this.name="BaseTool",this._canvas=e.domElement,this._scene=n,this._controller=e,this._pointer=new t.Vector2,this._pointerPrimaryDown=!1,this._pointerMiddleDown=!1,this._pointerSecondaryDown=!1,this._lastPointerDown=new t.Vector2,this._lastPointerUp=new t.Vector2,this._raycaster=new t.Raycaster,this._raycaster.layers.mask=J.PRODUCT_LAYER_MASK|J.UI_LAYER_MASK,this._intersects=[],this._hovered=null,this._dragging=!1,this._dragStart=new t.Vector3,this._dragCurrent=new t.Vector3,this._dragEnd=new t.Vector3,this._dragDelta=new t.Vector3,this._draggable=null,this._dragRaycastOnObjects=null}get _pointerAnyDown(){return this._pointerPrimaryDown||this._pointerMiddleDown||this._pointerSecondaryDown}Activate(){}Deactivate(){}onPointerDown(n){var e;switch(n.button){case 0:{this._pointerPrimaryDown=!0;break}case 1:{this._pointerMiddleDown=!0;break}case 2:{this._pointerSecondaryDown=!0;break}default:console.warn("DIVEBaseTool.onPointerDown: Unknown button: "+n.button)}this._lastPointerDown.copy(this._pointer),this._draggable=y.findInterface((e=this._intersects[0])==null?void 0:e.object,"isDraggable")||null}onDragStart(n){this._draggable&&(this._dragRaycastOnObjects!==null&&(this._intersects=this._raycaster.intersectObjects(this._dragRaycastOnObjects,!0)),this._intersects.length!==0&&(this._dragStart.copy(this._intersects[0].point.clone()),this._dragCurrent.copy(this._intersects[0].point.clone()),this._dragEnd.copy(this._dragStart.clone()),this._dragDelta.set(0,0,0),this._draggable&&this._draggable.onDragStart&&(this._draggable.onDragStart({dragStart:this._dragStart,dragCurrent:this._dragCurrent,dragEnd:this._dragEnd,dragDelta:this._dragDelta}),this._dragging=!0,this._controller.enabled=!1)))}onPointerMove(n){var o;this._pointer.x=n.offsetX/this._canvas.clientWidth*2-1,this._pointer.y=-(n.offsetY/this._canvas.clientHeight)*2+1,this._raycaster.setFromCamera(this._pointer,this._controller.object),this._intersects=this.raycast(this._scene.children);const e=y.findInterface((o=this._intersects[0])==null?void 0:o.object,"isHoverable");if(this._intersects[0]&&e){if(!this._hovered){e.onPointerEnter&&e.onPointerEnter(this._intersects[0]),this._hovered=e;return}if(this._hovered.uuid!==e.uuid){this._hovered.onPointerLeave&&this._hovered.onPointerLeave(),e.onPointerEnter&&e.onPointerEnter(this._intersects[0]),this._hovered=e;return}e.onPointerOver&&e.onPointerOver(this._intersects[0]),this._hovered=e}else this._hovered&&this._hovered.onPointerLeave&&this._hovered.onPointerLeave(),this._hovered=null;this._pointerAnyDown&&(this._dragging||this.onDragStart(n),this.onDrag(n))}onDrag(n){this._dragRaycastOnObjects!==null&&(this._intersects=this._raycaster.intersectObjects(this._dragRaycastOnObjects,!0));const e=this._intersects[0];e&&(this._dragCurrent.copy(e.point.clone()),this._dragEnd.copy(e.point.clone()),this._dragDelta.subVectors(this._dragCurrent.clone(),this._dragStart.clone()),this._draggable&&this._draggable.onDrag&&this._draggable.onDrag({dragStart:this._dragStart,dragCurrent:this._dragCurrent,dragEnd:this._dragEnd,dragDelta:this._dragDelta}))}onPointerUp(n){switch(this.pointerWasDragged()||this._dragging?this._draggable&&this.onDragEnd(n):this.onClick(n),n.button){case 0:this._pointerPrimaryDown=!1;break;case 1:this._pointerMiddleDown=!1;break;case 2:this._pointerSecondaryDown=!1;break}this._lastPointerUp.copy(this._pointer)}onClick(n){}onDragEnd(n){const e=this._intersects[0];e&&(this._dragEnd.copy(e.point.clone()),this._dragCurrent.copy(e.point.clone()),this._dragDelta.subVectors(this._dragCurrent.clone(),this._dragStart.clone())),this._draggable&&this._draggable.onDragEnd&&this._draggable.onDragEnd({dragStart:this._dragStart,dragCurrent:this._dragCurrent,dragEnd:this._dragEnd,dragDelta:this._dragDelta}),this._draggable=null,this._dragging=!1,this._dragStart.set(0,0,0),this._dragCurrent.set(0,0,0),this._dragEnd.set(0,0,0),this._dragDelta.set(0,0,0),this._controller.enabled=!0}onWheel(n){}raycast(n){return n!==void 0?this._raycaster.intersectObjects(n,!0).filter(e=>e.object.visible):this._raycaster.intersectObjects(this._scene.children,!0).filter(e=>e.object.visible)}pointerWasDragged(){return this._lastPointerDown.distanceTo(this._pointer)>this.POINTER_DRAG_THRESHOLD}}class xt extends Et{constructor(e,o){super(e,o);h(this,"isTransformTool",!0);h(this,"_scaleLinked");h(this,"_gizmo");this.name="DIVETransformTool",this._scaleLinked=!1,this._gizmo=this.initGizmo(),this._scene.add(this._gizmo)}Activate(){}SetGizmoMode(e){this._gizmo.mode=e}SetGizmoVisibility(e){const o=this._scene.children.includes(this._gizmo);e&&!o?(this._scene.add(this._gizmo),"isTransformControls"in this._gizmo&&this._gizmo.getRaycaster().layers.enableAll()):!e&&o&&(this._scene.remove(this._gizmo),"isTransformControls"in this._gizmo&&this._gizmo.getRaycaster().layers.disableAll())}SetGizmoScaleLinked(e){this._scaleLinked=e}initGizmo(){const e=new yt(this._controller.object,this._controller.domElement);return e.mode="translate",e.traverse(o=>{if(!("isMesh"in o))return;const s=o.material;o.name==="X"&&s.color.set(y.AxesColorRed),o.name==="Y"&&s.color.set(y.AxesColorGreen),o.name==="Z"&&s.color.set(y.AxesColorBlue),o.name==="XY"&&s.color.set(y.AxesColorBlue),o.name==="YZ"&&s.color.set(y.AxesColorRed),o.name==="XZ"&&s.color.set(y.AxesColorGreen)}),e.addEventListener("mouseDown",()=>{this._controller.enabled=!1,y.implementsInterface(e.object,"isMovable")&&e.object.onMoveStart&&e.object.onMoveStart()}),e.addEventListener("objectChange",()=>{if(y.implementsInterface(e.object,"isMovable")&&e.object.onMove&&(e.object.onMove(),this._scaleLinked)){const o=e.object.scale,s=(o.x+o.y+o.z)/3;e.object.scale.set(s,s,s)}}),e.addEventListener("mouseUp",()=>{this._controller.enabled=!0,y.implementsInterface(e.object,"isMovable")&&e.object.onMoveEnd&&e.object.onMoveEnd()}),e}}const Dt=r=>r.isSelectTool!==void 0;class It extends xt{constructor(e,o){super(e,o);h(this,"isSelectTool",!0);this.name="SelectTool"}Activate(){}Select(e){this.AttachGizmo(e),e.onSelect&&e.onSelect()}Deselect(e){this.DetachGizmo(),e.onDeselect&&e.onDeselect()}AttachGizmo(e){if("isMovable"in e){const o=e;this._gizmo.attach(o),this.SetGizmoVisibility(o.visible)}}DetachGizmo(){this._gizmo.detach()}onClick(e){super.onClick(e);const o=this._raycaster.intersectObjects(this._scene.Root.children,!0).filter(a=>a.object.visible)[0],s=y.findInterface(o==null?void 0:o.object,"isSelectable");if(!o||!s){this._gizmo.object&&this.Deselect(this._gizmo.object);return}if(this._gizmo.object){if(this._gizmo.object.uuid===s.uuid)return;this.Deselect(this._gizmo.object)}this.Select(s)}}exports.DIVESelectTool=It;exports.isSelectTool=Dt;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var m=Object.defineProperty;var _=(s,e,r)=>e in s?m(s,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[e]=r;var i=(s,e,r)=>_(s,typeof e!="symbol"?e+"":e,r);const t=require("./index-DAwIH9xh.cjs");class b extends Error{constructor(r,o,a,u){var h;const n=o.match(/(Chrome|Safari|Firefox|Edge)\/(\d+\.\d+)/),p=n?n[1]:"Unknown",l=n?n[2]:"Unknown",S=o.match(/\((.*?)\)/),f=S?S[1]:"Unknown",c=((h=f.match(/OS (\d+_\d+)/))==null?void 0:h[1])||"Unknown",d=g(f);let R=r;(d==="iOS"||d==="iPadOS")&&(p!=="Safari"?R+=` ARQuickLook is only supported in Safari browser. Current browser: ${p} ${l}`:parseFloat(c.replace("_","."))<13&&(R+=` ARQuickLook requires iOS/iPadOS 13.0 or later. Current version: ${c}`));super(R);i(this,"browserInfo");this.name="ARCompatibilityError",this.browserInfo={userAgent:o,platform:a,vendor:u,browser:p,version:l,os:d,osVersion:c}}}function g(s){return s.includes("iPhone")?"iOS":s.includes("iPad")?"iPadOS":s.includes("Macintosh")?"macOS":"Unknown"}class w{static getSystem(){if(typeof window>"u"||!window.navigator)return t.ESystem.UNKNOWN;const e=window.navigator.userAgent.toLowerCase();return e.includes("iphone")||e.includes("ipad")?t.ESystem.IOS:e.includes("android")?t.ESystem.ANDROID:e.includes("windows")?t.ESystem.WINDOWS:e.includes("macintosh")?t.ESystem.MACOS:e.includes("linux")?t.ESystem.LINUX:t.ESystem.UNKNOWN}static async getSupportsWebXR(){if(this._supportsWebXR!==!1)return this._supportsWebXR;if(!window.isSecureContext)return this._supportsWebXR=!1,this._webXRUnsupportedReason=t.EWebXRUnsupportedReason.NO_HTTPS,this._supportsWebXR;if(!navigator.xr)return this._supportsWebXR=!1,this._webXRUnsupportedReason=t.EWebXRUnsupportedReason.NO_WEBXR_API,this._supportsWebXR;try{const e=await navigator.xr.isSessionSupported("immersive-ar");this._supportsWebXR=e,this._supportsWebXR||(this._webXRUnsupportedReason=t.EWebXRUnsupportedReason.IMMERSIVE_AR_NOT_SUPPORTED_BY_DEVICE)}catch{this._supportsWebXR=!1,this._webXRUnsupportedReason=t.EWebXRUnsupportedReason.AR_PERMISSION_DENIED}return this._supportsWebXR}static getWebXRUnsupportedReason(){return this._supportsWebXR?(console.log("WebXR is supported."),null):this._webXRUnsupportedReason}static getSupportsARQuickLook(){if(document.createElement("a").relList.supports("ar"))return!0;const r=window.navigator.userAgent,o=window.navigator.platform,a=window.navigator.vendor,u="ARQuickLook is not supported";throw new b(u,r,o,a)}static getSupportsSceneViewer(){if(typeof window>"u"||!window.navigator)return!1;const e=window.navigator.userAgent.toLowerCase();if(!e.includes("android")||!e.includes("chrome"))return!1;const r=e.match(/chrome\/(\d+)/);return!(!r||parseInt(r[1])<89)}static get isMobile(){return this.getSystem()===t.ESystem.ANDROID||this.getSystem()===t.ESystem.IOS}static get isDesktop(){return!this.isMobile}static getSupportsAR(){return this.getSupportsARQuickLook()||this.getSupportsSceneViewer()}}i(w,"_supportsWebXR",!1),i(w,"_webXRUnsupportedReason",null);exports.ARCompatibilityError=b;exports.SystemInfo=w;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.COORDINATE_LAYER_MASK=2;exports.DEFAULT_LAYER_MASK=1;exports.HELPER_LAYER_MASK=8;exports.PRODUCT_LAYER_MASK=16;exports.UI_LAYER_MASK=4;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t="#c20017",n="#00ab26",o="#0081d4",f=t,u=n,x=o;function s(e,r){return e?r in e:!1}function l(e,r){if(e)return s(e,r)?e:l(e.parent,r)}exports.AxesColorBlue=x;exports.AxesColorBlueLetter=o;exports.AxesColorGreen=u;exports.AxesColorGreenLetter=n;exports.AxesColorRed=f;exports.AxesColorRedLetter=t;exports.findInterface=l;exports.implementsInterface=s;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
const n = "#c20017", s = "#00ab26", t = "#0081d4", f = n, l = s, u = t;
|
|
2
|
-
function o(e, r) {
|
|
3
|
-
return e ? r in e : !1;
|
|
4
|
-
}
|
|
5
|
-
function a(e, r) {
|
|
6
|
-
if (e)
|
|
7
|
-
return o(e, r) ? e : a(e.parent, r);
|
|
8
|
-
}
|
|
9
|
-
export {
|
|
10
|
-
f as A,
|
|
11
|
-
l as a,
|
|
12
|
-
u as b,
|
|
13
|
-
n as c,
|
|
14
|
-
s as d,
|
|
15
|
-
t as e,
|
|
16
|
-
a as f,
|
|
17
|
-
o as i
|
|
18
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
var _ = /* @__PURE__ */ ((N) => (N.IOS = "iOS", N.ANDROID = "Android", N.WINDOWS = "Windows", N.MACOS = "MacOS", N.LINUX = "Linux", N.UNKNOWN = "Unknown", N))(_ || {}), O = /* @__PURE__ */ ((N) => (N.NO_WEBXR_API = "NO_WEBXR_API", N.NO_HTTPS = "NO_HTTPS", N.IMMERSIVE_AR_NOT_SUPPORTED_BY_DEVICE = "IMMERSIVE_AR_NOT_SUPPORTED_BY_DEVICE", N.AR_PERMISSION_DENIED = "AR_PERMISSION_DENIED", N.UNKNOWN_ERROR = "UNKNOWN_ERROR", N))(O || {});
|
|
2
|
-
export {
|
|
3
|
-
_ as E,
|
|
4
|
-
O as a
|
|
5
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var _=(N=>(N.IOS="iOS",N.ANDROID="Android",N.WINDOWS="Windows",N.MACOS="MacOS",N.LINUX="Linux",N.UNKNOWN="Unknown",N))(_||{}),O=(N=>(N.NO_WEBXR_API="NO_WEBXR_API",N.NO_HTTPS="NO_HTTPS",N.IMMERSIVE_AR_NOT_SUPPORTED_BY_DEVICE="IMMERSIVE_AR_NOT_SUPPORTED_BY_DEVICE",N.AR_PERMISSION_DENIED="AR_PERMISSION_DENIED",N.UNKNOWN_ERROR="UNKNOWN_ERROR",N))(O||{});exports.ESystem=_;exports.EWebXRUnsupportedReason=O;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="@shopware-ag/dive",s="2.0.1-beta.0",t="Shopware Spatial Framework",o="module",r="build/dive.cjs",i="build/dive.mjs",d="build/dive.d.ts",l={".":{types:"./build/dive.d.ts",import:"./build/dive.mjs",require:"./build/dive.cjs"},"./modules/AnimationSystem":{types:"./build/src/modules/animation/AnimationSystem.d.ts",import:"./build/src/modules/animation/AnimationSystem.mjs",require:"./build/src/modules/animation/AnimationSystem.cjs"},"./modules/ARSystem":{types:"./build/src/modules/ar/ARSystem.d.ts",import:"./build/src/modules/ar/ARSystem.mjs",require:"./build/src/modules/ar/ARSystem.cjs"},"./modules/AssetConverter":{types:"./build/src/modules/asset/converter/AssetConverter.d.ts",import:"./build/src/modules/asset/converter/AssetConverter.mjs",require:"./build/src/modules/asset/converter/AssetConverter.cjs"},"./modules/AssetExporter":{types:"./build/src/modules/asset/exporter/AssetExporter.d.ts",import:"./build/src/modules/asset/exporter/AssetExporter.mjs",require:"./build/src/modules/asset/exporter/AssetExporter.cjs"},"./modules/AssetLoader":{types:"./build/src/modules/asset/loader/AssetLoader.d.ts",import:"./build/src/modules/asset/loader/AssetLoader.mjs",require:"./build/src/modules/asset/loader/AssetLoader.cjs"},"./modules/MediaCreator":{types:"./build/src/modules/mediacreator/MediaCreator.d.ts",import:"./build/src/modules/mediacreator/MediaCreator.mjs",require:"./build/src/modules/mediacreator/MediaCreator.cjs"},"./modules/State":{types:"./build/src/modules/state/State.d.ts",import:"./build/src/modules/state/State.mjs",require:"./build/src/modules/state/State.cjs"},"./modules/SystemInfo":{types:"./build/src/modules/systeminfo/SystemInfo.d.ts",import:"./build/src/modules/systeminfo/SystemInfo.mjs",require:"./build/src/modules/systeminfo/SystemInfo.cjs"},"./modules/Toolbox":{types:"./build/src/modules/toolbox/Toolbox.d.ts",import:"./build/src/modules/toolbox/Toolbox.mjs",require:"./build/src/modules/toolbox/Toolbox.cjs"}},a=["build","LICENSE","package.json"],c=["dive","shopware","sw6","three","three.js","3d","typescript"],n="git@github.com:shopware/dive.git",u="ffrank <f.frank@shopware.com>",m="MIT",p=["> 1%, not dead, not ie 11, not op_mini all"],b={"@tweenjs/tween.js":"^23.1.1",lodash:"^4.17.21",three:"^0.163.0","three-spritetext":"^1.8.2"},y={"@eslint/js":"^9.1.1","@testing-library/jest-dom":"^6.6.3","@types/jest":"^29.5.12","@types/lodash":"^4.17.12","@types/node":"^20.12.7","@types/three":"^0.163.0","@vitest/coverage-v8":"3.1.2",acorn:"^8.14.1","acorn-walk":"^8.3.4",eslint:"^9.1.1",glob:"^11.0.1",globals:"^15.0.0",jsdom:"^26.1.0","magic-string":"^0.30.17",prettier:"^3.3.3","prettier-plugin-multiline-arrays":"^3.0.6","ts-jest":"^29.1.2","ts-morph":"^25.0.1","ts-node":"^10.9.2",tsc:"^2.0.4",tsx:"^4.19.4",typescript:"^5.8.2","typescript-eslint":"^7.7.1",vite:"^6.2.1","vite-plugin-dts":"^4.5.3",vitest:"^3.1.2"},v={"validate-build-paths":"NODE_OPTIONS='--loader ts-node/esm' ts-node ci/build/validate-build-paths.ts",build:"vite build",dev:"vite build --watch",lint:"eslint","prettier:check":"prettier --check .","prettier:fix":"prettier --write .",unit:"vitest --run",coverage:"vitest --coverage --run",docs:"yarn docs:actions && yarn docs:modules","docs:actions":"tsx docs/generators/generate-actions-docs.ts","docs:modules":"tsx docs/generators/generate-modules-docs.ts",ci:"yarn lint && yarn prettier:check && yarn docs && yarn coverage && yarn build"},j={name:e,version:s,description:t,type:o,main:r,module:i,types:d,exports:l,files:a,keywords:c,repository:n,author:u,license:m,browserslist:p,dependencies:b,devDependencies:y,scripts:v};exports.author=u;exports.browserslist=p;exports.default=j;exports.dependencies=b;exports.description=t;exports.devDependencies=y;exports.exports=l;exports.files=a;exports.keywords=c;exports.license=m;exports.main=r;exports.module=i;exports.name=e;exports.repository=n;exports.scripts=v;exports.type=o;exports.types=d;exports.version=s;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
const e = "@shopware-ag/dive", s = "2.0.1-beta.0", t = "Shopware Spatial Framework", o = "module", r = "build/dive.cjs", i = "build/dive.mjs", d = "build/dive.d.ts", l = { ".": { types: "./build/dive.d.ts", import: "./build/dive.mjs", require: "./build/dive.cjs" }, "./modules/AnimationSystem": { types: "./build/src/modules/animation/AnimationSystem.d.ts", import: "./build/src/modules/animation/AnimationSystem.mjs", require: "./build/src/modules/animation/AnimationSystem.cjs" }, "./modules/ARSystem": { types: "./build/src/modules/ar/ARSystem.d.ts", import: "./build/src/modules/ar/ARSystem.mjs", require: "./build/src/modules/ar/ARSystem.cjs" }, "./modules/AssetConverter": { types: "./build/src/modules/asset/converter/AssetConverter.d.ts", import: "./build/src/modules/asset/converter/AssetConverter.mjs", require: "./build/src/modules/asset/converter/AssetConverter.cjs" }, "./modules/AssetExporter": { types: "./build/src/modules/asset/exporter/AssetExporter.d.ts", import: "./build/src/modules/asset/exporter/AssetExporter.mjs", require: "./build/src/modules/asset/exporter/AssetExporter.cjs" }, "./modules/AssetLoader": { types: "./build/src/modules/asset/loader/AssetLoader.d.ts", import: "./build/src/modules/asset/loader/AssetLoader.mjs", require: "./build/src/modules/asset/loader/AssetLoader.cjs" }, "./modules/MediaCreator": { types: "./build/src/modules/mediacreator/MediaCreator.d.ts", import: "./build/src/modules/mediacreator/MediaCreator.mjs", require: "./build/src/modules/mediacreator/MediaCreator.cjs" }, "./modules/State": { types: "./build/src/modules/state/State.d.ts", import: "./build/src/modules/state/State.mjs", require: "./build/src/modules/state/State.cjs" }, "./modules/SystemInfo": { types: "./build/src/modules/systeminfo/SystemInfo.d.ts", import: "./build/src/modules/systeminfo/SystemInfo.mjs", require: "./build/src/modules/systeminfo/SystemInfo.cjs" }, "./modules/Toolbox": { types: "./build/src/modules/toolbox/Toolbox.d.ts", import: "./build/src/modules/toolbox/Toolbox.mjs", require: "./build/src/modules/toolbox/Toolbox.cjs" } }, a = ["build", "LICENSE", "package.json"], c = ["dive", "shopware", "sw6", "three", "three.js", "3d", "typescript"], u = "git@github.com:shopware/dive.git", m = "ffrank <f.frank@shopware.com>", n = "MIT", p = ["> 1%, not dead, not ie 11, not op_mini all"], b = { "@tweenjs/tween.js": "^23.1.1", lodash: "^4.17.21", three: "^0.163.0", "three-spritetext": "^1.8.2" }, y = { "@eslint/js": "^9.1.1", "@testing-library/jest-dom": "^6.6.3", "@types/jest": "^29.5.12", "@types/lodash": "^4.17.12", "@types/node": "^20.12.7", "@types/three": "^0.163.0", "@vitest/coverage-v8": "3.1.2", acorn: "^8.14.1", "acorn-walk": "^8.3.4", eslint: "^9.1.1", glob: "^11.0.1", globals: "^15.0.0", jsdom: "^26.1.0", "magic-string": "^0.30.17", prettier: "^3.3.3", "prettier-plugin-multiline-arrays": "^3.0.6", "ts-jest": "^29.1.2", "ts-morph": "^25.0.1", "ts-node": "^10.9.2", tsc: "^2.0.4", tsx: "^4.19.4", typescript: "^5.8.2", "typescript-eslint": "^7.7.1", vite: "^6.2.1", "vite-plugin-dts": "^4.5.3", vitest: "^3.1.2" }, v = { "validate-build-paths": "NODE_OPTIONS='--loader ts-node/esm' ts-node ci/build/validate-build-paths.ts", build: "vite build", dev: "vite build --watch", lint: "eslint", "prettier:check": "prettier --check .", "prettier:fix": "prettier --write .", unit: "vitest --run", coverage: "vitest --coverage --run", docs: "yarn docs:actions && yarn docs:modules", "docs:actions": "tsx docs/generators/generate-actions-docs.ts", "docs:modules": "tsx docs/generators/generate-modules-docs.ts", ci: "yarn lint && yarn prettier:check && yarn docs && yarn coverage && yarn build" }, j = {
|
|
2
|
-
name: e,
|
|
3
|
-
version: s,
|
|
4
|
-
description: t,
|
|
5
|
-
type: o,
|
|
6
|
-
main: r,
|
|
7
|
-
module: i,
|
|
8
|
-
types: d,
|
|
9
|
-
exports: l,
|
|
10
|
-
files: a,
|
|
11
|
-
keywords: c,
|
|
12
|
-
repository: u,
|
|
13
|
-
author: m,
|
|
14
|
-
license: n,
|
|
15
|
-
browserslist: p,
|
|
16
|
-
dependencies: b,
|
|
17
|
-
devDependencies: y,
|
|
18
|
-
scripts: v
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
m as author,
|
|
22
|
-
p as browserslist,
|
|
23
|
-
j as default,
|
|
24
|
-
b as dependencies,
|
|
25
|
-
t as description,
|
|
26
|
-
y as devDependencies,
|
|
27
|
-
l as exports,
|
|
28
|
-
a as files,
|
|
29
|
-
c as keywords,
|
|
30
|
-
n as license,
|
|
31
|
-
r as main,
|
|
32
|
-
i as module,
|
|
33
|
-
e as name,
|
|
34
|
-
u as repository,
|
|
35
|
-
v as scripts,
|
|
36
|
-
o as type,
|
|
37
|
-
d as types,
|
|
38
|
-
s as version
|
|
39
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/*!
|
|
2
|
-
fflate - fast JavaScript compression/decompression
|
|
3
|
-
<https://101arrowz.github.io/fflate>
|
|
4
|
-
Licensed under MIT. https://github.com/101arrowz/fflate/blob/master/LICENSE
|
|
5
|
-
version 0.8.2
|
|
6
|
-
*/var E=Uint8Array,R=Uint16Array,kr=Int32Array,gr=new E([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),cr=new E([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Mr=new E([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ir=function(r,e){for(var n=new R(31),a=0;a<31;++a)n[a]=e+=1<<r[a-1];for(var v=new kr(n[30]),a=1;a<30;++a)for(var f=n[a];f<n[a+1];++f)v[f]=f-n[a]<<5|a;return{b:n,r:v}},Hr=Ir(gr,2),Or=Hr.b,Cr=Hr.r;Or[28]=258,Cr[258]=28;var Yr=Ir(cr,0),Rr=Yr.b,Ur=Yr.r,Sr=new R(32768);for(var M=0;M<32768;++M){var b=(M&43690)>>1|(M&21845)<<1;b=(b&52428)>>2|(b&13107)<<2,b=(b&61680)>>4|(b&3855)<<4,Sr[M]=((b&65280)>>8|(b&255)<<8)>>1}var j=function(r,e,n){for(var a=r.length,v=0,f=new R(e);v<a;++v)r[v]&&++f[r[v]-1];var o=new R(e);for(v=1;v<e;++v)o[v]=o[v-1]+f[v-1]<<1;var u;if(n){u=new R(1<<e);var t=15-e;for(v=0;v<a;++v)if(r[v])for(var g=v<<4|r[v],l=e-r[v],i=o[r[v]-1]++<<l,h=i|(1<<l)-1;i<=h;++i)u[Sr[i]>>t]=g}else for(u=new R(a),v=0;v<a;++v)r[v]&&(u[v]=Sr[o[r[v]-1]++]>>15-r[v]);return u},d=new E(288);for(var M=0;M<144;++M)d[M]=8;for(var M=144;M<256;++M)d[M]=9;for(var M=256;M<280;++M)d[M]=7;for(var M=280;M<288;++M)d[M]=8;var lr=new E(32);for(var M=0;M<32;++M)lr[M]=5;var Vr=j(d,9,0),Wr=j(d,9,1),Xr=j(lr,5,0),Zr=j(lr,5,1),sr=function(r){for(var e=r[0],n=1;n<r.length;++n)r[n]>e&&(e=r[n]);return e},W=function(r,e,n){var a=e/8|0;return(r[a]|r[a+1]<<8)>>(e&7)&n},xr=function(r,e){var n=e/8|0;return(r[n]|r[n+1]<<8|r[n+2]<<16)>>(e&7)},mr=function(r){return(r+7)/8|0},tr=function(r,e,n){return(e==null||e<0)&&(e=0),(n==null||n>r.length)&&(n=r.length),new E(r.subarray(e,n))},$r=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],O=function(r,e,n){var a=new Error(e||$r[r]);if(a.code=r,Error.captureStackTrace&&Error.captureStackTrace(a,O),!n)throw a;return a},jr=function(r,e,n,a){var v=r.length,f=a?a.length:0;if(!v||e.f&&!e.l)return n||new E(0);var o=!n,u=o||e.i!=2,t=e.i;o&&(n=new E(v*3));var g=function(vr){var fr=n.length;if(vr>fr){var nr=new E(Math.max(fr*2,vr));nr.set(n),n=nr}},l=e.f||0,i=e.p||0,h=e.b||0,w=e.l,y=e.d,x=e.m,F=e.n,Y=v*8;do{if(!w){l=W(r,i,1);var I=W(r,i+1,3);if(i+=3,I)if(I==1)w=Wr,y=Zr,x=9,F=5;else if(I==2){var U=W(r,i,31)+257,A=W(r,i+10,15)+4,s=U+W(r,i+5,31)+1;i+=14;for(var c=new E(s),B=new E(19),k=0;k<A;++k)B[Mr[k]]=W(r,i+k*3,7);i+=A*3;for(var H=sr(B),p=(1<<H)-1,K=j(B,H,1),k=0;k<s;){var G=K[W(r,i,p)];i+=G&15;var T=G>>4;if(T<16)c[k++]=T;else{var D=0,C=0;for(T==16?(C=3+W(r,i,3),i+=2,D=c[k-1]):T==17?(C=3+W(r,i,7),i+=3):T==18&&(C=11+W(r,i,127),i+=7);C--;)c[k++]=D}}var J=c.subarray(0,U),P=c.subarray(U);x=sr(J),F=sr(P),w=j(J,x,1),y=j(P,F,1)}else O(1);else{var T=mr(i)+4,z=r[T-4]|r[T-3]<<8,m=T+z;if(m>v){t&&O(0);break}u&&g(h+z),n.set(r.subarray(T,m),h),e.b=h+=z,e.p=i=m*8,e.f=l;continue}if(i>Y){t&&O(0);break}}u&&g(h+131072);for(var ar=(1<<x)-1,V=(1<<F)-1,L=i;;L=i){var D=w[xr(r,i)&ar],N=D>>4;if(i+=D&15,i>Y){t&&O(0);break}if(D||O(2),N<256)n[h++]=N;else if(N==256){L=i,w=null;break}else{var Q=N-254;if(N>264){var k=N-257,S=gr[k];Q=W(r,i,(1<<S)-1)+Or[k],i+=S}var Z=y[xr(r,i)&V],rr=Z>>4;Z||O(3),i+=Z&15;var P=Rr[rr];if(rr>3){var S=cr[rr];P+=xr(r,i)&(1<<S)-1,i+=S}if(i>Y){t&&O(0);break}u&&g(h+131072);var er=h+Q;if(h<P){var ur=f-P,hr=Math.min(P,er);for(ur+h<0&&O(3);h<hr;++h)n[h]=a[ur+h]}for(;h<er;++h)n[h]=n[h-P]}}e.l=w,e.p=L,e.b=h,e.f=l,w&&(l=1,e.m=x,e.d=y,e.n=F)}while(!l);return h!=n.length&&o?tr(n,0,h):n.subarray(0,h)},_=function(r,e,n){n<<=e&7;var a=e/8|0;r[a]|=n,r[a+1]|=n>>8},ir=function(r,e,n){n<<=e&7;var a=e/8|0;r[a]|=n,r[a+1]|=n>>8,r[a+2]|=n>>16},yr=function(r,e){for(var n=[],a=0;a<r.length;++a)r[a]&&n.push({s:a,f:r[a]});var v=n.length,f=n.slice();if(!v)return{t:Jr,l:0};if(v==1){var o=new E(n[0].s+1);return o[n[0].s]=1,{t:o,l:1}}n.sort(function(m,U){return m.f-U.f}),n.push({s:-1,f:25001});var u=n[0],t=n[1],g=0,l=1,i=2;for(n[0]={s:-1,f:u.f+t.f,l:u,r:t};l!=v-1;)u=n[n[g].f<n[i].f?g++:i++],t=n[g!=l&&n[g].f<n[i].f?g++:i++],n[l++]={s:-1,f:u.f+t.f,l:u,r:t};for(var h=f[0].s,a=1;a<v;++a)f[a].s>h&&(h=f[a].s);var w=new R(h+1),y=Er(n[l-1],w,0);if(y>e){var a=0,x=0,F=y-e,Y=1<<F;for(f.sort(function(U,A){return w[A.s]-w[U.s]||U.f-A.f});a<v;++a){var I=f[a].s;if(w[I]>e)x+=Y-(1<<y-w[I]),w[I]=e;else break}for(x>>=F;x>0;){var T=f[a].s;w[T]<e?x-=1<<e-w[T]++-1:++a}for(;a>=0&&x;--a){var z=f[a].s;w[z]==e&&(--w[z],++x)}y=e}return{t:new E(w),l:y}},Er=function(r,e,n){return r.s==-1?Math.max(Er(r.l,e,n+1),Er(r.r,e,n+1)):e[r.s]=n},Br=function(r){for(var e=r.length;e&&!r[--e];);for(var n=new R(++e),a=0,v=r[0],f=1,o=function(t){n[a++]=t},u=1;u<=e;++u)if(r[u]==v&&u!=e)++f;else{if(!v&&f>2){for(;f>138;f-=138)o(32754);f>2&&(o(f>10?f-11<<5|28690:f-3<<5|12305),f=0)}else if(f>3){for(o(v),--f;f>6;f-=6)o(8304);f>2&&(o(f-3<<5|8208),f=0)}for(;f--;)o(v);f=1,v=r[u]}return{c:n.subarray(0,a),n:e}},or=function(r,e){for(var n=0,a=0;a<e.length;++a)n+=r[a]*e[a];return n},Gr=function(r,e,n){var a=n.length,v=mr(e+2);r[v]=a&255,r[v+1]=a>>8,r[v+2]=r[v]^255,r[v+3]=r[v+1]^255;for(var f=0;f<a;++f)r[v+f+4]=n[f];return(v+4+a)*8},Dr=function(r,e,n,a,v,f,o,u,t,g,l){_(e,l++,n),++v[256];for(var i=yr(v,15),h=i.t,w=i.l,y=yr(f,15),x=y.t,F=y.l,Y=Br(h),I=Y.c,T=Y.n,z=Br(x),m=z.c,U=z.n,A=new R(19),s=0;s<I.length;++s)++A[I[s]&31];for(var s=0;s<m.length;++s)++A[m[s]&31];for(var c=yr(A,7),B=c.t,k=c.l,H=19;H>4&&!B[Mr[H-1]];--H);var p=g+5<<3,K=or(v,d)+or(f,lr)+o,G=or(v,h)+or(f,x)+o+14+3*H+or(A,B)+2*A[16]+3*A[17]+7*A[18];if(t>=0&&p<=K&&p<=G)return Gr(e,l,r.subarray(t,t+g));var D,C,J,P;if(_(e,l,1+(G<K)),l+=2,G<K){D=j(h,w,0),C=h,J=j(x,F,0),P=x;var ar=j(B,k,0);_(e,l,T-257),_(e,l+5,U-1),_(e,l+10,H-4),l+=14;for(var s=0;s<H;++s)_(e,l+3*s,B[Mr[s]]);l+=3*H;for(var V=[I,m],L=0;L<2;++L)for(var N=V[L],s=0;s<N.length;++s){var Q=N[s]&31;_(e,l,ar[Q]),l+=B[Q],Q>15&&(_(e,l,N[s]>>5&127),l+=N[s]>>12)}}else D=Vr,C=d,J=Xr,P=lr;for(var s=0;s<u;++s){var S=a[s];if(S>255){var Q=S>>18&31;ir(e,l,D[Q+257]),l+=C[Q+257],Q>7&&(_(e,l,S>>23&31),l+=gr[Q]);var Z=S&31;ir(e,l,J[Z]),l+=P[Z],Z>3&&(ir(e,l,S>>5&8191),l+=cr[Z])}else ir(e,l,D[S]),l+=C[S]}return ir(e,l,D[256]),l+C[256]},Lr=new kr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Jr=new E(0),_r=function(r,e,n,a,v,f){var o=f.z||r.length,u=new E(a+o+5*(1+Math.ceil(o/7e3))+v),t=u.subarray(a,u.length-v),g=f.l,l=(f.r||0)&7;if(e){l&&(t[0]=f.r>>3);for(var i=Lr[e-1],h=i>>13,w=i&8191,y=(1<<n)-1,x=f.p||new R(32768),F=f.h||new R(y+1),Y=Math.ceil(n/3),I=2*Y,T=function(wr){return(r[wr]^r[wr+1]<<Y^r[wr+2]<<I)&y},z=new kr(25e3),m=new R(288),U=new R(32),A=0,s=0,c=f.i||0,B=0,k=f.w||0,H=0;c+2<o;++c){var p=T(c),K=c&32767,G=F[p];if(x[K]=G,F[p]=K,k<=c){var D=o-c;if((A>7e3||B>24576)&&(D>423||!g)){l=Dr(r,t,0,z,m,U,s,B,H,c-H,l),B=A=s=0,H=c;for(var C=0;C<286;++C)m[C]=0;for(var C=0;C<30;++C)U[C]=0}var J=2,P=0,ar=w,V=K-G&32767;if(D>2&&p==T(c-V))for(var L=Math.min(h,D)-1,N=Math.min(32767,c),Q=Math.min(258,D);V<=N&&--ar&&K!=G;){if(r[c+J]==r[c+J-V]){for(var S=0;S<Q&&r[c+S]==r[c+S-V];++S);if(S>J){if(J=S,P=V,S>L)break;for(var Z=Math.min(V,S-2),rr=0,C=0;C<Z;++C){var er=c-V+C&32767,ur=x[er],hr=er-ur&32767;hr>rr&&(rr=hr,G=er)}}}K=G,G=x[K],V+=K-G&32767}if(P){z[B++]=268435456|Cr[J]<<18|Ur[P];var vr=Cr[J]&31,fr=Ur[P]&31;s+=gr[vr]+cr[fr],++m[257+vr],++U[fr],k=c+J,++A}else z[B++]=r[c],++m[r[c]]}}for(c=Math.max(c,k);c<o;++c)z[B++]=r[c],++m[r[c]];l=Dr(r,t,g,z,m,U,s,B,H,c-H,l),g||(f.r=l&7|t[l/8|0]<<3,l-=7,f.h=F,f.p=x,f.i=c,f.w=k)}else{for(var c=f.w||0;c<o+g;c+=65535){var nr=c+65535;nr>=o&&(t[l/8|0]=g,nr=o),l=Gr(t,l+1,r.subarray(c,nr))}f.i=o}return tr(u,0,a+mr(l)+v)},pr=function(){for(var r=new Int32Array(256),e=0;e<256;++e){for(var n=e,a=9;--a;)n=(n&1&&-306674912)^n>>>1;r[e]=n}return r}(),br=function(){var r=-1;return{p:function(e){for(var n=r,a=0;a<e.length;++a)n=pr[n&255^e[a]]^n>>>8;r=n},d:function(){return~r}}},dr=function(r,e,n,a,v){if(!v&&(v={l:1},e.dictionary)){var f=e.dictionary.subarray(-32768),o=new E(f.length+r.length);o.set(f),o.set(r,f.length),r=o,v.w=f.length}return _r(r,e.level==null?6:e.level,e.mem==null?v.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+e.mem,n,a,v)},Kr=function(r,e){var n={};for(var a in r)n[a]=r[a];for(var a in e)n[a]=e[a];return n},$=function(r,e){return r[e]|r[e+1]<<8},X=function(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16|r[e+3]<<24)>>>0},Fr=function(r,e){return X(r,e)+X(r,e+4)*4294967296},q=function(r,e,n){for(;n;++e)r[e]=n,n>>>=8};function re(r,e){return dr(r,e||{},0,0)}function ee(r,e){return jr(r,{i:2},e&&e.out,e&&e.dictionary)}var Nr=function(r,e,n,a){for(var v in r){var f=r[v],o=e+v,u=a;Array.isArray(f)&&(u=Kr(a,f[1]),f=f[0]),f instanceof E?n[o]=[f,u]:(n[o+="/"]=[new E(0),u],Nr(f,o,n,a))}},Pr=typeof TextEncoder<"u"&&new TextEncoder,Tr=typeof TextDecoder<"u"&&new TextDecoder,ne=0;try{Tr.decode(Jr,{stream:!0}),ne=1}catch{}var ae=function(r){for(var e="",n=0;;){var a=r[n++],v=(a>127)+(a>223)+(a>239);if(n+v>r.length)return{s:e,r:tr(r,n-1)};v?v==3?(a=((a&15)<<18|(r[n++]&63)<<12|(r[n++]&63)<<6|r[n++]&63)-65536,e+=String.fromCharCode(55296|a>>10,56320|a&1023)):v&1?e+=String.fromCharCode((a&31)<<6|r[n++]&63):e+=String.fromCharCode((a&15)<<12|(r[n++]&63)<<6|r[n++]&63):e+=String.fromCharCode(a)}};function zr(r,e){var n;if(Pr)return Pr.encode(r);for(var a=r.length,v=new E(r.length+(r.length>>1)),f=0,o=function(g){v[f++]=g},n=0;n<a;++n){if(f+5>v.length){var u=new E(f+8+(a-n<<1));u.set(v),v=u}var t=r.charCodeAt(n);t<128||e?o(t):t<2048?(o(192|t>>6),o(128|t&63)):t>55295&&t<57344?(t=65536+(t&1047552)|r.charCodeAt(++n)&1023,o(240|t>>18),o(128|t>>12&63),o(128|t>>6&63),o(128|t&63)):(o(224|t>>12),o(128|t>>6&63),o(128|t&63))}return tr(v,0,f)}function Qr(r,e){if(e){for(var n="",a=0;a<r.length;a+=16384)n+=String.fromCharCode.apply(null,r.subarray(a,a+16384));return n}else{if(Tr)return Tr.decode(r);var v=ae(r),f=v.s,n=v.r;return n.length&&O(8),f}}var ve=function(r,e){return e+30+$(r,e+26)+$(r,e+28)},fe=function(r,e,n){var a=$(r,e+28),v=Qr(r.subarray(e+46,e+46+a),!($(r,e+8)&2048)),f=e+46+a,o=X(r,e+20),u=n&&o==4294967295?ie(r,f):[o,X(r,e+24),X(r,e+42)],t=u[0],g=u[1],l=u[2];return[$(r,e+10),t,g,v,f+$(r,e+30)+$(r,e+32),l]},ie=function(r,e){for(;$(r,e)!=1;e+=4+$(r,e+2));return[Fr(r,e+12),Fr(r,e+4),Fr(r,e+20)]},Ar=function(r){var e=0;if(r)for(var n in r){var a=r[n].length;a>65535&&O(9),e+=a+4}return e},qr=function(r,e,n,a,v,f,o,u){var t=a.length,g=n.extra,l=u&&u.length,i=Ar(g);q(r,e,o!=null?33639248:67324752),e+=4,o!=null&&(r[e++]=20,r[e++]=n.os),r[e]=20,e+=2,r[e++]=n.flag<<1|(f<0&&8),r[e++]=v&&8,r[e++]=n.compression&255,r[e++]=n.compression>>8;var h=new Date(n.mtime==null?Date.now():n.mtime),w=h.getFullYear()-1980;if((w<0||w>119)&&O(10),q(r,e,w<<25|h.getMonth()+1<<21|h.getDate()<<16|h.getHours()<<11|h.getMinutes()<<5|h.getSeconds()>>1),e+=4,f!=-1&&(q(r,e,n.crc),q(r,e+4,f<0?-f-2:f),q(r,e+8,n.size)),q(r,e+12,t),q(r,e+14,i),e+=16,o!=null&&(q(r,e,l),q(r,e+6,n.attrs),q(r,e+10,o),e+=14),r.set(a,e),e+=t,i)for(var y in g){var x=g[y],F=x.length;q(r,e,+y),q(r,e+2,F),r.set(x,e+4),e+=4+F}return l&&(r.set(u,e),e+=l),e},oe=function(r,e,n,a,v){q(r,e,101010256),q(r,e+8,n),q(r,e+10,n),q(r,e+12,a),q(r,e+16,v)};function le(r,e){e||(e={});var n={},a=[];Nr(r,"",n,e);var v=0,f=0;for(var o in n){var u=n[o],t=u[0],g=u[1],l=g.level==0?0:8,i=zr(o),h=i.length,w=g.comment,y=w&&zr(w),x=y&&y.length,F=Ar(g.extra);h>65535&&O(11);var Y=l?re(t,g):t,I=Y.length,T=br();T.p(t),a.push(Kr(g,{size:t.length,crc:T.d(),c:Y,f:i,m:y,u:h!=o.length||y&&w.length!=x,o:v,compression:l})),v+=30+h+F+I,f+=76+2*(h+F)+(x||0)+I}for(var z=new E(f+22),m=v,U=f-v,A=0;A<a.length;++A){var i=a[A];qr(z,i.o,i,i.f,i.u,i.c.length);var s=30+i.f.length+Ar(i.extra);z.set(i.c,i.o+s),qr(z,v,i,i.f,i.u,i.c.length,i.o,i.m),v+=16+s+(i.m?i.m.length:0)}return oe(z,v,a.length,U,m),z}function te(r,e){for(var n={},a=r.length-22;X(r,a)!=101010256;--a)(!a||r.length-a>65558)&&O(13);var v=$(r,a+8);if(!v)return{};var f=X(r,a+16),o=f==4294967295||v==65535;if(o){var u=X(r,a-12);o=X(r,u)==101075792,o&&(v=X(r,u+32),f=X(r,u+48))}for(var t=0;t<v;++t){var g=fe(r,f,o),l=g[0],i=g[1],h=g[2],w=g[3],y=g[4],x=g[5],F=ve(r,x);f=y,l?l==8?n[w]=ee(r.subarray(F,F+i),{out:new E(h)}):O(14,"unknown compression type "+l):n[w]=tr(r,F,F+i)}return n}class ue extends Error{constructor(e,n){super(e),this.requestedFileType=n,this.name="FileTypeError"}}class he extends Error{constructor(e,n){super(e),this.cause=n,this.name="ParseError"}}exports.FileTypeError=ue;exports.ParseError=he;exports.strFromU8=Qr;exports.strToU8=zr;exports.unzipSync=te;exports.zipSync=le;
|