@realsee/dnalogel 3.81.8 → 3.81.9
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/CHANGELOG.md +3 -0
- package/dist/PanoTagPlugin/controller/Tag/MaskTag.d.ts +1 -0
- package/dist/PanoTagPlugin/controller/Tag/MaskTag.shaders.d.ts +1 -1
- package/dist/index.cjs.js +45 -39
- package/dist/index.js +103 -91
- package/dist/index.umd.js +76 -70
- package/docs/classes/AreaMakerPluginType.AreaMakerController.html +2 -2
- package/docs/classes/AreaMakerPluginType.AreaMakerItem.html +2 -2
- package/docs/classes/CSS3DRender.html +2 -2
- package/docs/classes/DigitalHuman.html +2 -2
- package/docs/classes/DigitalPerformanceV2.DigitalPerformanceV2PluginController.html +2 -2
- package/docs/classes/DigitalPlayground.html +2 -2
- package/docs/classes/DigitalStateMachine.html +2 -2
- package/docs/classes/GuideLineItem.GuideLineItem.html +2 -2
- package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +2 -2
- package/docs/classes/ModelMakerPluginInstance.html +2 -2
- package/docs/classes/ModelMakerPluginType.ModelMakerBoxItem.html +2 -2
- package/docs/classes/ModelMakerPluginType.ModelMakerPolygonItem.html +2 -2
- package/docs/classes/ModelMakerPluginType.ModelMakerPrismItem.html +2 -2
- package/docs/classes/ModelRoomLabelController.html +2 -2
- package/docs/classes/MoveController.html +2 -2
- package/docs/classes/Object3DHelperController.html +2 -2
- package/docs/classes/PaintBrush.html +2 -2
- package/docs/classes/PanoMeasurePluginLine.html +2 -2
- package/docs/classes/PanoMeasurePluginModel.html +2 -2
- package/docs/classes/PanoMeasurePluginPoint.html +2 -2
- package/docs/classes/PanoMeasurePluginPolyline.html +2 -2
- package/docs/classes/PanoTagPluginController.html +2 -2
- package/docs/classes/Sculpt.html +2 -2
- package/docs/classes/Util.BetterTween.html +2 -2
- package/docs/classes/Util.FiveDomEvents.html +2 -2
- package/docs/classes/Util.FivePuppet.html +2 -2
- package/docs/classes/Util.Interval.html +2 -2
- package/docs/classes/Util.LegacyPointHelper.html +2 -2
- package/docs/classes/Util.LightTag.html +2 -2
- package/docs/classes/Util.LineSegments.html +2 -2
- package/docs/classes/Util.Magnifier.html +2 -2
- package/docs/classes/Util.Object3D.html +2 -2
- package/docs/classes/Util.PointDomHelper.html +2 -2
- package/docs/classes/Util.PointHelper.html +2 -2
- package/docs/classes/Util.PointSelector.html +2 -2
- package/docs/classes/Util.PointSelectorHelper.html +2 -2
- package/docs/classes/Util.Rectangle.html +2 -2
- package/docs/classes/Util.sculpt.BaseEditor.html +2 -2
- package/docs/classes/Util.sculpt.BoxMesh.html +2 -2
- package/docs/classes/Util.sculpt.BoxMeshEditor.html +2 -2
- package/docs/classes/Util.sculpt.CircleMesh.html +2 -2
- package/docs/classes/Util.sculpt.CircleMeshEditor.html +2 -2
- package/docs/classes/Util.sculpt.CircleWithEdgeMesh.html +2 -2
- package/docs/classes/Util.sculpt.CylinderMesh.html +2 -2
- package/docs/classes/Util.sculpt.CylinderMeshEditor.html +2 -2
- package/docs/classes/Util.sculpt.LineMesh.html +2 -2
- package/docs/classes/Util.sculpt.PointMesh.html +2 -2
- package/docs/classes/Util.sculpt.PolygonMesh.html +2 -2
- package/docs/classes/Util.sculpt.PrismMesh.html +2 -2
- package/docs/classes/Util.sculpt.PrismMeshEditor.html +2 -2
- package/docs/classes/Util.sculpt.RectangleMesh.html +2 -2
- package/docs/classes/Util.sculpt.RectangleMeshEditor.html +2 -2
- package/docs/classes/Util.sculpt.RectangleWithEdgeMesh.html +2 -2
- package/docs/classes/WalkController.html +2 -2
- package/docs/enums/CameraMovementEffect.html +2 -2
- package/docs/enums/ContentType.html +2 -2
- package/docs/enums/DIRECTION.html +2 -2
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +2 -2
- package/docs/enums/DimensionType.html +2 -2
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +2 -2
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +2 -2
- package/docs/enums/PaintBrushTypeEnum.html +2 -2
- package/docs/enums/PointType.html +2 -2
- package/docs/enums/Rotation.html +2 -2
- package/docs/functions/AreaMakerPlugin.html +1 -1
- package/docs/functions/CSS3DRenderPlugin.html +1 -1
- package/docs/functions/CameraMovementPlugin.html +2 -2
- package/docs/functions/CruisePlugin.html +1 -1
- package/docs/functions/CurrentPanoImagePlugin.html +1 -1
- package/docs/functions/DigitalPerformancePlugin.html +1 -1
- package/docs/functions/DigitalPerformanceV2.DigitalPerformanceV2Plugin.html +1 -1
- package/docs/functions/FloorplanGuidePlugin.html +1 -1
- package/docs/functions/GuideLinePlugin.html +1 -1
- package/docs/functions/ItemLabelPlugin.html +1 -1
- package/docs/functions/MapviewFloorplanPlugin.html +1 -1
- package/docs/functions/MeasurePlugin.html +1 -1
- package/docs/functions/ModelChassisCompassPlugin.html +2 -2
- package/docs/functions/ModelEntryDoorGuidePlugin.html +2 -2
- package/docs/functions/ModelFloorplanPlugin.html +1 -1
- package/docs/functions/ModelItemLabelPlugin.html +1 -1
- package/docs/functions/ModelMakerPlugin.html +1 -1
- package/docs/functions/ModelRoomLabelPlugin.html +1 -1
- package/docs/functions/ModelTVVideoPlugin.html +1 -1
- package/docs/functions/ModelViewPlugin.html +2 -2
- package/docs/functions/MovePlugin.html +1 -1
- package/docs/functions/Object3DHelperPlugin.html +1 -1
- package/docs/functions/PanoCompassPlugin.html +1 -1
- package/docs/functions/PanoCursorRaycasterPlugin.html +2 -2
- package/docs/functions/PanoDoorLabelPlugin.html +1 -1
- package/docs/functions/PanoFloorplanRadarPlugin.html +1 -1
- package/docs/functions/PanoMeasurePlugin.html +1 -1
- package/docs/functions/PanoRulerPlugin.html +2 -2
- package/docs/functions/PanoRulerProPlugin.html +2 -2
- package/docs/functions/PanoSpatialTagPlugin.html +2 -2
- package/docs/functions/PanoTagPlugin.html +1 -1
- package/docs/functions/PanoVideoPlugin.html +2 -2
- package/docs/functions/PipelinePlugin.html +1 -1
- package/docs/functions/SculptPlugin.html +2 -2
- package/docs/functions/SculptPluginForFive.html +2 -2
- package/docs/functions/TopviewFloorplanPlugin.html +1 -1
- package/docs/functions/Util.awaitNextFrame.html +1 -1
- package/docs/functions/Util.blink.html +2 -2
- package/docs/functions/Util.blinkWithPreset.html +2 -2
- package/docs/functions/Util.bounding.html +1 -1
- package/docs/functions/Util.boundingBox.html +1 -1
- package/docs/functions/Util.boundingSphere.html +1 -1
- package/docs/functions/Util.boxVertex.html +2 -2
- package/docs/functions/Util.boxVertexes.html +1 -1
- package/docs/functions/Util.checkFiveModelLoaded.html +2 -2
- package/docs/functions/Util.cleanup.html +2 -2
- package/docs/functions/Util.convexHull.html +2 -2
- package/docs/functions/Util.equal.html +2 -2
- package/docs/functions/Util.fiveModelIsLoaded.html +2 -2
- package/docs/functions/Util.generatePolygonGeometry.html +2 -2
- package/docs/functions/Util.getCoordsFromClient.html +1 -1
- package/docs/functions/Util.getCoordsFromElement.html +1 -1
- package/docs/functions/Util.getFrameTime.html +2 -2
- package/docs/functions/Util.getGeometryArea.html +1 -1
- package/docs/functions/Util.getGeometryInfo.html +1 -1
- package/docs/functions/Util.getIntersectFromRelativePosition.html +1 -1
- package/docs/functions/Util.getRaycasterFromFivePointer.html +1 -1
- package/docs/functions/Util.initialCSS3DRender.html +1 -1
- package/docs/functions/Util.inside.html +1 -1
- package/docs/functions/Util.isModelLike.html +1 -1
- package/docs/functions/Util.isNil.html +2 -2
- package/docs/functions/Util.isPanoramaLike.html +1 -1
- package/docs/functions/Util.lookObject.html +2 -2
- package/docs/functions/Util.lookPoint.html +2 -2
- package/docs/functions/Util.nextFrame.html +1 -1
- package/docs/functions/Util.notNil.html +2 -2
- package/docs/functions/Util.reblink.html +2 -2
- package/docs/functions/Util.replaceStaticPrefix.html +2 -2
- package/docs/functions/Util.requestAnimationFrameInterval.html +2 -2
- package/docs/functions/Util.sculpt.createBox.html +1 -1
- package/docs/functions/Util.sculpt.createCircle.html +1 -1
- package/docs/functions/Util.sculpt.createCylinder.html +1 -1
- package/docs/functions/Util.sculpt.createLine.html +2 -2
- package/docs/functions/Util.sculpt.createPoint.html +1 -1
- package/docs/functions/Util.sculpt.createPolygon.html +1 -1
- package/docs/functions/Util.sculpt.createPrism.html +1 -1
- package/docs/functions/Util.sculpt.createRectangle.html +2 -2
- package/docs/functions/Util.sculpt.transformUnit.html +2 -2
- package/docs/functions/Util.sculpt.transformUnitSquare.html +1 -1
- package/docs/functions/Util.tag.html +1 -1
- package/docs/functions/Util.triangleArea.html +2 -2
- package/docs/functions/Util.triangleCenter.html +2 -2
- package/docs/functions/Util.tweenProgress.html +1 -1
- package/docs/functions/Util.uuid.html +2 -2
- package/docs/functions/Util.waitFiveModelLoaded.html +2 -2
- package/docs/functions/Util.worldBounding.html +1 -1
- package/docs/functions/Util.worldBoundingBox.html +1 -1
- package/docs/functions/Util.worldBoundingSphere.html +1 -1
- package/docs/functions/createPolyline.html +2 -2
- package/docs/functions/pluginFlag.html +1 -1
- package/docs/functions/validatePolygon.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +2 -2
- package/docs/interfaces/AreaMakerPluginType.AnimeOptions.html +2 -2
- package/docs/interfaces/AreaMakerPluginType.Config.html +2 -2
- package/docs/interfaces/AreaMakerPluginType.EventMap.html +2 -2
- package/docs/interfaces/AreaMakerPluginType.Params.html +2 -2
- package/docs/interfaces/AreaMakerPluginType.ServerAreaMakerItem.html +2 -2
- package/docs/interfaces/AreaMakerPluginType.ServerAreaMakerItemV1.html +2 -2
- package/docs/interfaces/AreaMakerPluginType.ServerDataV1.html +2 -2
- package/docs/interfaces/AreaMakerPluginType.ServerDataV2.html +2 -2
- package/docs/interfaces/AreaMakerPluginType.ShowHideOptions.html +2 -2
- package/docs/interfaces/AreaMakerPluginType.State.html +2 -2
- package/docs/interfaces/BoxAnimationConfig.html +2 -2
- package/docs/interfaces/BoxPosition.html +2 -2
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +2 -2
- package/docs/interfaces/CSS3DRenderPluginState.html +2 -2
- package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
- package/docs/interfaces/ChapterLocation.html +2 -2
- package/docs/interfaces/ChapterTimeInfo.html +2 -2
- package/docs/interfaces/ContentTypeMapInterface.html +2 -2
- package/docs/interfaces/CruisePluginTypes.Config.html +2 -2
- package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +2 -2
- package/docs/interfaces/CruisePluginTypes.EventMap.html +2 -2
- package/docs/interfaces/CruisePluginTypes.GuildLineConfig.html +2 -2
- package/docs/interfaces/CruisePluginTypes.MoveAction.html +2 -2
- package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +2 -2
- package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +2 -2
- package/docs/interfaces/CruisePluginTypes.PluginData.html +2 -2
- package/docs/interfaces/CruisePluginTypes.PluginServerData.html +2 -2
- package/docs/interfaces/CruisePluginTypes.PluginState.html +2 -2
- package/docs/interfaces/CurrentPanoImagePluginType.Config.html +2 -2
- package/docs/interfaces/CurrentPanoImagePluginType.EventMap.html +2 -2
- package/docs/interfaces/CurrentPanoImagePluginType.Params.html +2 -2
- package/docs/interfaces/CurrentPanoImagePluginType.ShowHideOptions.html +2 -2
- package/docs/interfaces/CurrentPanoImagePluginType.State.html +2 -2
- package/docs/interfaces/DigitalCameraKeyframe.html +2 -2
- package/docs/interfaces/DigitalCameraPlayer.html +2 -2
- package/docs/interfaces/DigitalCameraState.html +2 -2
- package/docs/interfaces/DigitalChapter.html +2 -2
- package/docs/interfaces/DigitalDataPlayer.html +2 -2
- package/docs/interfaces/DigitalDataState.html +2 -2
- package/docs/interfaces/DigitalEffectKeyframe.html +2 -2
- package/docs/interfaces/DigitalEffectState.html +2 -2
- package/docs/interfaces/DigitalItemKeyframe.html +2 -2
- package/docs/interfaces/DigitalItemState.html +2 -2
- package/docs/interfaces/DigitalModelKeyframe.html +2 -2
- package/docs/interfaces/DigitalModelPlayer.html +2 -2
- package/docs/interfaces/DigitalModelPlayerEffect.html +2 -2
- package/docs/interfaces/DigitalModelPlayerItem.html +2 -2
- package/docs/interfaces/DigitalModelState.html +2 -2
- package/docs/interfaces/DigitalPerformancePluginConfig.html +2 -2
- package/docs/interfaces/DigitalPerformanceV2.CameraState.html +2 -2
- package/docs/interfaces/DigitalPerformanceV2.DigitalCameraKeyframe.html +2 -2
- package/docs/interfaces/DigitalPerformanceV2.DigitalCameraPlayer.html +2 -2
- package/docs/interfaces/DigitalPerformanceV2.DigitalPerformanceV2PluginConfig.html +2 -2
- package/docs/interfaces/DigitalPerformanceV2.GroupChapterTimeInfo.html +2 -2
- package/docs/interfaces/DigitalPerformanceV2.GroupProgress.html +2 -2
- package/docs/interfaces/DigitalPerformanceV2.V2Progress.html +2 -2
- package/docs/interfaces/DigitalScript.html +2 -2
- package/docs/interfaces/DigitalSubTitleKeyframe.html +2 -2
- package/docs/interfaces/DigitalSubTitlePlayer.html +2 -2
- package/docs/interfaces/DigitalSubTitleState.html +2 -2
- package/docs/interfaces/ExtendedAnimationConfig.html +2 -2
- package/docs/interfaces/FloorplanBounding.html +2 -2
- package/docs/interfaces/FloorplanData.html +2 -2
- package/docs/interfaces/FloorplanEntrance.html +2 -2
- package/docs/interfaces/FloorplanExtraObject.html +2 -2
- package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
- package/docs/interfaces/FloorplanFloorData.html +2 -2
- package/docs/interfaces/FloorplanImagePosition.html +2 -2
- package/docs/interfaces/FloorplanObserver.html +2 -2
- package/docs/interfaces/FloorplanOutlineItem.html +2 -2
- package/docs/interfaces/FloorplanPosition.html +2 -2
- package/docs/interfaces/FloorplanRoomItem.html +2 -2
- package/docs/interfaces/FloorplanRoomLabelItem.html +2 -2
- package/docs/interfaces/FloorplanServerBounding.html +2 -2
- package/docs/interfaces/FloorplanServerComputedData.html +2 -2
- package/docs/interfaces/FloorplanServerData.html +2 -2
- package/docs/interfaces/FloorplanServerDoorItem.html +2 -2
- package/docs/interfaces/FloorplanServerDoorPosition.html +2 -2
- package/docs/interfaces/FloorplanServerEntrance.html +2 -2
- package/docs/interfaces/FloorplanServerFloorData.html +2 -2
- package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
- package/docs/interfaces/FloorplanServerObserver.html +2 -2
- package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
- package/docs/interfaces/FloorplanServerPosition.html +2 -2
- package/docs/interfaces/FloorplanServerRoomItem.html +2 -2
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +2 -2
- package/docs/interfaces/FloorplanServerStyledFloorplan.html +2 -2
- package/docs/interfaces/FloorplanServerStyledImage.html +2 -2
- package/docs/interfaces/GlobalProgress.html +2 -2
- package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +2 -2
- package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +2 -2
- package/docs/interfaces/GuideLinePluginType.EventMap.html +2 -2
- package/docs/interfaces/GuideLinePluginType.ExtraRouteData.html +2 -2
- package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +2 -2
- package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +2 -2
- package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +2 -2
- package/docs/interfaces/GuideLinePluginType.GuideLineMeshStyle.html +2 -2
- package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +2 -2
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +2 -2
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +2 -2
- package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +2 -2
- package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +1 -1
- package/docs/interfaces/GuideLinePluginType.PluginServerData.html +2 -2
- package/docs/interfaces/GuideLinePluginType.PluginState.html +2 -2
- package/docs/interfaces/GuideLinePluginType.Route.html +2 -2
- package/docs/interfaces/HelperOffset.html +2 -2
- package/docs/interfaces/ImagePlaneGroup.html +2 -2
- package/docs/interfaces/ItemLabelPluginData.html +2 -2
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +2 -2
- package/docs/interfaces/ItemLabelPluginParametersType.html +2 -2
- package/docs/interfaces/MinMax.html +2 -2
- package/docs/interfaces/ModelChassisCompassPluginData.html +2 -2
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +2 -2
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +2 -2
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +2 -2
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +2 -2
- package/docs/interfaces/ModelItemLabelPluginData.html +2 -2
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +2 -2
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +2 -2
- package/docs/interfaces/ModelMakerPluginType.BoxItemObjectData.html +2 -2
- package/docs/interfaces/ModelMakerPluginType.EventMap.html +2 -2
- package/docs/interfaces/ModelMakerPluginType.ModelMakerPluginConfig.html +2 -2
- package/docs/interfaces/ModelMakerPluginType.PrismItemObjectData.html +2 -2
- package/docs/interfaces/ModelMakerPluginType.ServerBaseItem.html +2 -2
- package/docs/interfaces/ModelMakerPluginType.ServerBoxItem.html +2 -2
- package/docs/interfaces/ModelMakerPluginType.ServerData.html +2 -2
- package/docs/interfaces/ModelMakerPluginType.ServerPrismItem.html +2 -2
- package/docs/interfaces/ModelMakerPluginType.ServerTrianglesItem.html +2 -2
- package/docs/interfaces/ModelMakerPluginType.State.html +2 -2
- package/docs/interfaces/ModelMakerPluginType.TrianglesItemObjectData.html +2 -2
- package/docs/interfaces/ModelRoomLabelPluginData.html +2 -2
- package/docs/interfaces/ModelTVVideoPluginData.html +2 -2
- package/docs/interfaces/ModelTVVideoPluginExportType.html +2 -2
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +2 -2
- package/docs/interfaces/ModelViewPluginExportType.html +2 -2
- package/docs/interfaces/Object3DHelperState.html +2 -2
- package/docs/interfaces/ObjectHelperControllers.html +2 -2
- package/docs/interfaces/PaintBrushAction.html +2 -2
- package/docs/interfaces/PaintBrushConfigs.html +2 -2
- package/docs/interfaces/PaintBrushState.html +2 -2
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +2 -2
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
- package/docs/interfaces/PanoMeasureParameterType.html +2 -2
- package/docs/interfaces/PanoMeasurePluginLineJson.html +2 -2
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +2 -2
- package/docs/interfaces/PanoMeasurePluginPointJson.html +2 -2
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +2 -2
- package/docs/interfaces/PanoRulerPluginExportType.html +2 -2
- package/docs/interfaces/PanoRulerPluginOptions.html +2 -2
- package/docs/interfaces/PanoRulerPluginParameterType.html +2 -2
- package/docs/interfaces/PanoRulerProPluginExportType.html +2 -2
- package/docs/interfaces/PanoRulerProPluginOptions.html +2 -2
- package/docs/interfaces/PanoRulerProPluginParameterType.html +2 -2
- package/docs/interfaces/PanoRulerProPluginState.html +2 -2
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginData.html +2 -2
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +2 -2
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +2 -2
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +2 -2
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +2 -2
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +2 -2
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +2 -2
- package/docs/interfaces/PanoVideoPluginType.LoadParams.html +2 -2
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +2 -2
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +2 -2
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +2 -2
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +2 -2
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +2 -2
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +2 -2
- package/docs/interfaces/PluginEventMap.html +2 -2
- package/docs/interfaces/Point.html +2 -2
- package/docs/interfaces/ProgressBarEvents.html +2 -2
- package/docs/interfaces/Room.html +2 -2
- package/docs/interfaces/RoomInfo.html +2 -2
- package/docs/interfaces/RoomLabel.html +2 -2
- package/docs/interfaces/RoomRules.html +1 -1
- package/docs/interfaces/Rooms.html +1 -1
- package/docs/interfaces/Scissor.html +2 -2
- package/docs/interfaces/SculptConfig.html +2 -2
- package/docs/interfaces/State.html +2 -2
- package/docs/interfaces/StyledFloorplan.html +2 -2
- package/docs/interfaces/StyledFloorplanImage.html +2 -2
- package/docs/interfaces/StyledFloorplanRoomLabel.html +2 -2
- package/docs/interfaces/TagCacheInterface.html +2 -2
- package/docs/interfaces/TagConfig.html +2 -2
- package/docs/interfaces/TagGLTFObjectGroup.html +2 -2
- package/docs/interfaces/TagIconAnimationConfig.html +2 -2
- package/docs/interfaces/TagIconUrl.html +2 -2
- package/docs/interfaces/TagObjectGroup.html +2 -2
- package/docs/interfaces/TagState.html +2 -2
- package/docs/interfaces/TagStyle.html +2 -2
- package/docs/interfaces/Tags.html +2 -2
- package/docs/interfaces/TemporaryState.html +2 -2
- package/docs/interfaces/TraceManager.html +2 -2
- package/docs/interfaces/TracePoint.html +2 -2
- package/docs/interfaces/Util.AnimeInstance.html +2 -2
- package/docs/interfaces/Util.BlinkAnimeOptions.html +2 -2
- package/docs/interfaces/Util.EventHandlerConfig.html +2 -2
- package/docs/interfaces/Util.FiveDomEvent.html +2 -2
- package/docs/interfaces/Util.FiveDomEventMap.html +2 -2
- package/docs/interfaces/Util.LegacyMouseGroupParameter.html +2 -2
- package/docs/interfaces/Util.MagnifierParameter.html +2 -2
- package/docs/interfaces/Util.MouseGroupParameter.html +2 -2
- package/docs/interfaces/Util.ObjectInitialState.html +2 -2
- package/docs/interfaces/Util.PointIntersection.html +2 -2
- package/docs/interfaces/Util.PointSelectorHelperConfig.html +2 -2
- package/docs/interfaces/Util.ReBlinkAnimeOptions.html +2 -2
- package/docs/modules/AreaMakerPluginType.html +2 -2
- package/docs/modules/CruisePluginTypes.html +2 -2
- package/docs/modules/CurrentPanoImagePluginType.html +2 -2
- package/docs/modules/DigitalPerformanceV2.html +2 -2
- package/docs/modules/GuideLineItem.html +2 -2
- package/docs/modules/GuideLineModeItem.html +2 -2
- package/docs/modules/GuideLinePluginType.html +2 -2
- package/docs/modules/ModelMakerPluginType.html +2 -2
- package/docs/modules/PanoVideoPluginType.html +2 -2
- package/docs/modules/SculptData.html +2 -2
- package/docs/modules/SculptType.html +2 -2
- package/docs/modules/Util.html +2 -2
- package/docs/modules/Util.sculpt.html +2 -2
- package/docs/modules.html +2 -2
- package/docs/types/AddObject3DHelperConfig.html +2 -2
- package/docs/types/AreaMakerPluginType.AreaMakerItemEventMap.html +2 -2
- package/docs/types/AreaMakerPluginType.ItemRenderer.html +1 -1
- package/docs/types/AreaMakerPluginType.PluginData.html +2 -2
- package/docs/types/AreaMakerPluginType.ServerData.html +2 -2
- package/docs/types/ArrayPosition.html +1 -1
- package/docs/types/AudioAppearance.html +1 -1
- package/docs/types/BoxTag.html +2 -2
- package/docs/types/CSS3DRenderExportType.html +1 -1
- package/docs/types/CSS3DRenderPluginExportType.html +1 -1
- package/docs/types/CSS3DRenderPluginParameterType.html +1 -1
- package/docs/types/ClassFunctionParameters.html +1 -1
- package/docs/types/Color.html +1 -1
- package/docs/types/ContentTypeConfigKey.html +1 -1
- package/docs/types/ContentTypeConfigKeySplit.html +1 -1
- package/docs/types/ContentTypeMap.html +1 -1
- package/docs/types/Create3DDomContainerReturnType.html +1 -1
- package/docs/types/Create3DElementReturnType.html +1 -1
- package/docs/types/CruisePluginExportType.html +1 -1
- package/docs/types/CruisePluginTypes.CruiseData.html +2 -2
- package/docs/types/CruisePluginTypes.MoveEffect.html +1 -1
- package/docs/types/CurrentPanoImagePluginExportType.html +1 -1
- package/docs/types/DeprecatedMediaPlaneProperty.html +2 -2
- package/docs/types/DeprecatedTagProperty.html +2 -2
- package/docs/types/DigitalPerformancePluginExportInterface.html +1 -1
- package/docs/types/DigitalPerformancePluginParamsInterface.html +1 -1
- package/docs/types/DigitalPerformanceV2.CameraCoordinateSpace.html +2 -2
- package/docs/types/DigitalPerformanceV2.CameraTransition.html +2 -2
- package/docs/types/DigitalPerformanceV2.DigitalPerformanceV2PluginExportInterface.html +1 -1
- package/docs/types/DigitalPerformanceV2.DigitalPerformanceV2PluginParamsInterface.html +1 -1
- package/docs/types/DigitalPerformanceV2.V2ProgressListener.html +1 -1
- package/docs/types/Direction-1.html +1 -1
- package/docs/types/Direction4.html +1 -1
- package/docs/types/ElementRenderer.html +2 -2
- package/docs/types/FloorplanAffineTransform.html +1 -1
- package/docs/types/FloorplanGuidePluginParameterType.html +1 -1
- package/docs/types/FloorplanGuidePluginReturnType.html +1 -1
- package/docs/types/FloorplanRuleLabels.html +2 -2
- package/docs/types/FloorplanServerAffineTransform.html +1 -1
- package/docs/types/FloorplanServerRuleLabels.html +1 -1
- package/docs/types/GuideLinePluginExportType.html +1 -1
- package/docs/types/GuideLinePluginType.GuideLineItem.html +2 -2
- package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +1 -1
- package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +1 -1
- package/docs/types/GuideLinePluginType.GuideLineStyle.html +2 -2
- package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +2 -2
- package/docs/types/GuideLinePluginType.PathItem.html +2 -2
- package/docs/types/GuideLinePluginType.PluginData.html +2 -2
- package/docs/types/GuideLinePluginType.RouteConfig.html +2 -2
- package/docs/types/HelperEventMap.html +1 -1
- package/docs/types/InternalHelperEventMap.html +1 -1
- package/docs/types/KeyframeType.html +1 -1
- package/docs/types/MapviewFloorplanPluginParameterType.html +1 -1
- package/docs/types/MapviewFloorplanPluginReturnType.html +1 -1
- package/docs/types/MaskPosition.html +2 -2
- package/docs/types/MaskTag.html +2 -2
- package/docs/types/MeasureEndReason.html +1 -1
- package/docs/types/MeasurePluginConfig.html +2 -2
- package/docs/types/MeasurePluginEventMap.html +1 -1
- package/docs/types/MediaData.html +2 -2
- package/docs/types/MediaStore.html +1 -1
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +1 -1
- package/docs/types/ModelFloorplanPluginParameterType.html +1 -1
- package/docs/types/ModelFloorplanPluginReturnType.html +1 -1
- package/docs/types/ModelId.html +1 -1
- package/docs/types/ModelMakerPluginType.ElementRenderer.html +1 -1
- package/docs/types/ModelMakerPluginType.ItemType.html +2 -2
- package/docs/types/ModelMakerPluginType.MarkerItem.html +1 -1
- package/docs/types/ModelMakerPluginType.ServerItem.html +2 -2
- package/docs/types/ModelMakerPluginType.TagOcclusionScope.html +2 -2
- package/docs/types/ModelMakerPluginType.TagOcclusionScopeConfig.html +2 -2
- package/docs/types/ModelRoomLabelPluginParameters.html +1 -1
- package/docs/types/ModelRoomLabelPluginReturnType.html +1 -1
- package/docs/types/MoveArgs.html +2 -2
- package/docs/types/MoveOpts.html +2 -2
- package/docs/types/Object3DHelperEventMap.html +1 -1
- package/docs/types/ObjectFit.html +1 -1
- package/docs/types/PaintBrushEventMap.html +1 -1
- package/docs/types/PanoCompassPluginData.html +1 -1
- package/docs/types/PanoCompassPluginExportType.html +1 -1
- package/docs/types/PanoCompassPluginParameterType.html +1 -1
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +1 -1
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +1 -1
- package/docs/types/PanoIndex.html +1 -1
- package/docs/types/PanoMeasurePluginEvent.html +1 -1
- package/docs/types/PanoMeasureReturnType.html +1 -1
- package/docs/types/PanoSpatialTagPluginId.html +1 -1
- package/docs/types/PanoTagPluginExportInterface.html +1 -1
- package/docs/types/PanoTagPluginParamsInterface.html +1 -1
- package/docs/types/PanoVideoPluginParameterType.html +1 -1
- package/docs/types/PanoVideoPluginReturnType.html +1 -1
- package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +2 -2
- package/docs/types/PipelinePluginParameterType.html +1 -1
- package/docs/types/PipelinePluginReturnType.html +1 -1
- package/docs/types/PlaneTag.html +2 -2
- package/docs/types/Point2DTag.html +2 -2
- package/docs/types/Point3DTag.html +2 -2
- package/docs/types/PointTagInstance.html +1 -1
- package/docs/types/PolygonPosition.html +2 -2
- package/docs/types/PolygonTag.html +2 -2
- package/docs/types/Position.html +1 -1
- package/docs/types/PositionFrom.html +1 -1
- package/docs/types/ProgressListener.html +1 -1
- package/docs/types/RotateArgs.html +2 -2
- package/docs/types/RotateOpts.html +2 -2
- package/docs/types/RuleLabelsKey.html +1 -1
- package/docs/types/RuleLabelsValue.html +1 -1
- package/docs/types/ScaleCallback.html +1 -1
- package/docs/types/ScalePosition.html +2 -2
- package/docs/types/SculptData.BoxData.html +1 -1
- package/docs/types/SculptData.CircleData.html +1 -1
- package/docs/types/SculptData.CylinderData.html +1 -1
- package/docs/types/SculptData.PointData.html +1 -1
- package/docs/types/SculptData.PolygonData.html +1 -1
- package/docs/types/SculptData.PolylineData.html +1 -1
- package/docs/types/SculptData.PrismData.html +1 -1
- package/docs/types/SculptData.RectangleData.html +1 -1
- package/docs/types/SculptType.Theme.html +2 -2
- package/docs/types/StateType.html +1 -1
- package/docs/types/StickType.html +1 -1
- package/docs/types/Tag.html +2 -2
- package/docs/types/Tag2D.html +2 -2
- package/docs/types/Tag3D.html +2 -2
- package/docs/types/TagClickParams.html +1 -1
- package/docs/types/TagConfigByKey.html +1 -1
- package/docs/types/TagContentType.html +1 -1
- package/docs/types/TagContentTypeMapping.html +1 -1
- package/docs/types/TagDimensionType.html +1 -1
- package/docs/types/TagElement.html +2 -2
- package/docs/types/TagEvents.html +1 -1
- package/docs/types/TagGLTFObject.html +1 -1
- package/docs/types/TagHooks.html +1 -1
- package/docs/types/TagId.html +1 -1
- package/docs/types/TagInstance.html +1 -1
- package/docs/types/TagPlacement.html +2 -2
- package/docs/types/TagPointType.html +2 -2
- package/docs/types/TagRendererMap.html +1 -1
- package/docs/types/TopviewFloorplanPluginParameterType.html +1 -1
- package/docs/types/TopviewFloorplanPluginReturnType.html +1 -1
- package/docs/types/Util.ActionIfNoIntersection.html +1 -1
- package/docs/types/Util.AdherePoint.html +2 -2
- package/docs/types/Util.PointSelectorConfig.html +1 -1
- package/docs/types/Util.SupportedTarget.html +2 -2
- package/docs/types/Util.Target.html +2 -2
- package/docs/types/Util.ThreeObject.html +2 -2
- package/docs/types/WorkCode.html +1 -1
- package/docs/variables/FLOOR_TYPE_MAP.html +2 -2
- package/docs/variables/PLUGIN.html +1 -1
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +2 -2
- package/docs/variables/ROOM_TYPE_MAP.html +2 -2
- package/docs/variables/Util.ANIME_PRESETS.html +2 -2
- package/docs/variables/Util.CURRENT_PANO_IMAGE_DEFAULT_IMAGE.html +2 -2
- package/docs/variables/Util.DEFAULT_ANIME_CONFIG.html +2 -2
- package/docs/variables/Util.DEFAULT_STATIC_PREFIX.html +2 -2
- package/docs/variables/Util.DNALOGEL_DEFAULT_ASSETS.html +2 -2
- package/docs/variables/Util.ENTRY_DOOR_DEFAULT_IMAGE.html +2 -2
- package/docs/variables/Util.FLOORPLAN_DEFAULT_IMAGE.html +2 -2
- package/docs/variables/Util.GUIDELINE_DEFAULT_ARROW_TEXTURE.html +2 -2
- package/docs/variables/Util.GUIDELINE_WHITE_ARROW_TEXTURE.html +2 -2
- package/docs/variables/Util.MODEL_CHASSIS_COMPASS_DEFAULT_MODEL.html +2 -2
- package/docs/variables/Util.MODEL_ENTRY_DOOR_GUIDE_PLUGIN_DEFAULT_MODEL.html +2 -2
- package/docs/variables/Util.PANO_COMPASS_DEFAULT_IMAGE.html +2 -2
- package/docs/variables/Util.PANO_SPATIAL_TAG_BLUR_IMAGE.html +2 -2
- package/docs/variables/Util.PANO_TAG_DEFAULT_LINK_ICON.html +2 -2
- package/docs/variables/defaultGlobalConfig.html +1 -1
- package/docs/variables/itemLabelPluginServerParams.html +1 -1
- package/docs/variables/modelItemLabelPluginServerParams.html +1 -1
- package/docs/variables/modelRoomLabelPluginServerParams.html +1 -1
- package/libs/PanoTagPlugin/controller/Tag/MaskTag.d.ts +1 -0
- package/libs/PanoTagPlugin/controller/Tag/MaskTag.js +85 -79
- package/libs/PanoTagPlugin/controller/Tag/MaskTag.shaders.d.ts +1 -1
- package/libs/PanoTagPlugin/controller/Tag/MaskTag.shaders.js +36 -30
- package/libs/base/BasePlugin.js +1 -1
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Zy=Object.defineProperty,qy=Object.defineProperties;var Jy=Object.getOwnPropertyDescriptors;var Ma=Object.getOwnPropertySymbols;var Pd=Object.prototype.hasOwnProperty,Cd=Object.prototype.propertyIsEnumerable;var ui=Math.pow,lc=(n,t,e)=>t in n?Zy(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,V=(n,t)=>{for(var e in t||(t={}))Pd.call(t,e)&&lc(n,e,t[e]);if(Ma)for(var e of Ma(t))Cd.call(t,e)&&lc(n,e,t[e]);return n},de=(n,t)=>qy(n,Jy(t));var Kn=(n,t)=>{var e={};for(var i in n)Pd.call(n,i)&&t.indexOf(i)<0&&(e[i]=n[i]);if(n!=null&&Ma)for(var i of Ma(n))t.indexOf(i)<0&&Cd.call(n,i)&&(e[i]=n[i]);return e};var f=(n,t,e)=>(lc(n,typeof t!="symbol"?t+"":t,e),e);var $=(n,t,e)=>new Promise((i,s)=>{var o=l=>{try{a(e.next(l))}catch(c){s(c)}},r=l=>{try{a(e.throw(l))}catch(c){s(c)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(o,r);a((e=e.apply(n,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const rt=require("@realsee/five"),G=require("three"),ea=require("@realsee/five/line"),Ky=require("@realsee/five/gltf-loader");function $y(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,i.get?i:{enumerable:!0,get:()=>n[e]})}}return t.default=n,Object.freeze(t)}const b=$y(G);function eb(){console.debug("%c %c@realsee/dnalogel %cv3.81.8",["background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')","background-repeat: no-repeat","background-position: 0 center","padding-left: 8px"].join(";"),"","background-color: #12ce9b;color:black;padding:0 6px;border-radius: 3px")}function tb(){const n=typeof OffscreenCanvas!="undefined",t=n&&new OffscreenCanvas(1,1).getContext("webgl")!==null;n&&!t&&Object.assign(window,{OffscreenCanvas:function(e,i){const s=document.createElement("canvas");return s.width=e,s.height=i,s}})}function V0(){}const Md=()=>Promise.resolve(),Id={__queue:Promise.resolve()};function ib(n=Md){Id.__queue=Id.__queue.then(n).catch(Md)}function Ia(n,t,e){const i=n.x,s=n.y,o=Math.floor(i/t*1e4)/1e4,r=Math.floor(s/e*1e4)/1e4;return{x:o,y:r}}function cc(n,t,e){const{x:i,y:s}=n,o=i*t,r=s*e;return{x:o,y:r}}function Ea(n){if(n.length<2)return{};const t=n.slice(-2),e=t[0],i={x:(t[0].x+t[1].x)/2,y:(t[0].y+t[1].y)/2};return{control:e,end:i}}function nb(n,t,e=V0){new Promise(i=>{setTimeout(()=>{e(),i(!0)},t*n)})}const sb=window,Ed=window.requestAnimationFrame||sb.webkitRequestAnimationFrame||(n=>setTimeout(n,16));function Ga(n,t=0){t<=0?Ed(n):Ed(()=>Ga(n,t-1))}var Gi=Object.freeze({Linear:Object.freeze({None:function(n){return n},In:function(n){return n},Out:function(n){return n},InOut:function(n){return n}}),Quadratic:Object.freeze({In:function(n){return n*n},Out:function(n){return n*(2-n)},InOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)}}),Cubic:Object.freeze({In:function(n){return n*n*n},Out:function(n){return--n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)}}),Quartic:Object.freeze({In:function(n){return n*n*n*n},Out:function(n){return 1- --n*n*n*n},InOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)}}),Quintic:Object.freeze({In:function(n){return n*n*n*n*n},Out:function(n){return--n*n*n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)}}),Sinusoidal:Object.freeze({In:function(n){return 1-Math.sin((1-n)*Math.PI/2)},Out:function(n){return Math.sin(n*Math.PI/2)},InOut:function(n){return .5*(1-Math.sin(Math.PI*(.5-n)))}}),Exponential:Object.freeze({In:function(n){return n===0?0:Math.pow(1024,n-1)},Out:function(n){return n===1?1:1-Math.pow(2,-10*n)},InOut:function(n){return n===0?0:n===1?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)}}),Circular:Object.freeze({In:function(n){return 1-Math.sqrt(1-n*n)},Out:function(n){return Math.sqrt(1- --n*n)},InOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)}}),Elastic:Object.freeze({In:function(n){return n===0?0:n===1?1:-Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI)},Out:function(n){return n===0?0:n===1?1:Math.pow(2,-10*n)*Math.sin((n-.1)*5*Math.PI)+1},InOut:function(n){return n===0?0:n===1?1:(n*=2,n<1?-.5*Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI):.5*Math.pow(2,-10*(n-1))*Math.sin((n-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(n){var t=1.70158;return n===1?1:n*n*((t+1)*n-t)},Out:function(n){var t=1.70158;return n===0?0:--n*n*((t+1)*n+t)+1},InOut:function(n){var t=2.5949095;return(n*=2)<1?.5*(n*n*((t+1)*n-t)):.5*((n-=2)*n*((t+1)*n+t)+2)}}),Bounce:Object.freeze({In:function(n){return 1-Gi.Bounce.Out(1-n)},Out:function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},InOut:function(n){return n<.5?Gi.Bounce.In(n*2)*.5:Gi.Bounce.Out(n*2-1)*.5+.5}}),generatePow:function(n){return n===void 0&&(n=4),n=n<Number.EPSILON?Number.EPSILON:n,n=n>1e4?1e4:n,{In:function(t){return Math.pow(t,n)},Out:function(t){return 1-Math.pow(1-t,n)},InOut:function(t){return t<.5?Math.pow(t*2,n)/2:(1-Math.pow(2-t*2,n))/2+.5}}}}),Po=function(){return performance.now()},F0=function(){function n(){this._tweens={},this._tweensAddedDuringUpdate={}}return n.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(e){return t._tweens[e]})},n.prototype.removeAll=function(){this._tweens={}},n.prototype.add=function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},n.prototype.remove=function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},n.prototype.update=function(t,e){t===void 0&&(t=Po()),e===void 0&&(e=!1);var i=Object.keys(this._tweens);if(i.length===0)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var s=0;s<i.length;s++){var o=this._tweens[i[s]],r=!e;o&&o.update(t,r)===!1&&!e&&delete this._tweens[i[s]]}i=Object.keys(this._tweensAddedDuringUpdate)}return!0},n}(),Ts={Linear:function(n,t){var e=n.length-1,i=e*t,s=Math.floor(i),o=Ts.Utils.Linear;return t<0?o(n[0],n[1],i):t>1?o(n[e],n[e-1],e-i):o(n[s],n[s+1>e?e:s+1],i-s)},Bezier:function(n,t){for(var e=0,i=n.length-1,s=Math.pow,o=Ts.Utils.Bernstein,r=0;r<=i;r++)e+=s(1-t,i-r)*s(t,r)*n[r]*o(i,r);return e},CatmullRom:function(n,t){var e=n.length-1,i=e*t,s=Math.floor(i),o=Ts.Utils.CatmullRom;return n[0]===n[e]?(t<0&&(s=Math.floor(i=e*(1+t))),o(n[(s-1+e)%e],n[s],n[(s+1)%e],n[(s+2)%e],i-s)):t<0?n[0]-(o(n[0],n[0],n[1],n[1],-i)-n[0]):t>1?n[e]-(o(n[e],n[e],n[e-1],n[e-1],i-e)-n[e]):o(n[s?s-1:0],n[s],n[e<s+1?e:s+1],n[e<s+2?e:s+2],i-s)},Utils:{Linear:function(n,t,e){return(t-n)*e+n},Bernstein:function(n,t){var e=Ts.Utils.Factorial;return e(n)/e(t)/e(n-t)},Factorial:function(){var n=[1];return function(t){var e=1;if(n[t])return n[t];for(var i=t;i>1;i--)e*=i;return n[t]=e,e}}(),CatmullRom:function(n,t,e,i,s){var o=(e-n)*.5,r=(i-t)*.5,a=s*s,l=s*a;return(2*t-2*e+o+r)*l+(-3*t+3*e-2*o-r)*a+o*s+t}}},Hh=function(){function n(){}return n.nextId=function(){return n._nextId++},n._nextId=0,n}(),qc=new F0,xl=function(){function n(t,e){e===void 0&&(e=qc),this._object=t,this._group=e,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Gi.Linear.None,this._interpolationFunction=Ts.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Hh.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return n.prototype.getId=function(){return this._id},n.prototype.isPlaying=function(){return this._isPlaying},n.prototype.isPaused=function(){return this._isPaused},n.prototype.getDuration=function(){return this._duration},n.prototype.to=function(t,e){if(e===void 0&&(e=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=e<0?0:e,this},n.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},n.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},n.prototype.start=function(t,e){if(t===void 0&&(t=Po()),e===void 0&&(e=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||e){if(this._propertiesAreSetUp=!0,!this._isDynamic){var s={};for(var o in this._valuesEnd)s[o]=this._valuesEnd[o];this._valuesEnd=s}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,e)}return this},n.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},n.prototype._setupProperties=function(t,e,i,s,o){for(var r in i){var a=t[r],l=Array.isArray(a),c=l?"array":typeof a,h=!l&&Array.isArray(i[r]);if(!(c==="undefined"||c==="function")){if(h){var u=i[r];if(u.length===0)continue;for(var d=[a],p=0,m=u.length;p<m;p+=1){var g=this._handleRelativeValue(a,u[p]);if(isNaN(g)){h=!1,console.warn("Found invalid interpolation list. Skipping.");break}d.push(g)}h&&(i[r]=d)}if((c==="object"||l)&&a&&!h){e[r]=l?[]:{};var v=a;for(var y in v)e[r][y]=v[y];s[r]=l?[]:{};var u=i[r];if(!this._isDynamic){var w={};for(var y in u)w[y]=u[y];i[r]=u=w}this._setupProperties(v,e[r],u,s[r],o)}else(typeof e[r]=="undefined"||o)&&(e[r]=a),l||(e[r]*=1),h?s[r]=i[r].slice().reverse():s[r]=e[r]||0}}},n.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},n.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},n.prototype.pause=function(t){return t===void 0&&(t=Po()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this._group&&this._group.remove(this),this)},n.prototype.resume=function(t){return t===void 0&&(t=Po()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},n.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},n.prototype.group=function(t){return t===void 0&&(t=qc),this._group=t,this},n.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},n.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},n.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},n.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},n.prototype.easing=function(t){return t===void 0&&(t=Gi.Linear.None),this._easingFunction=t,this},n.prototype.interpolation=function(t){return t===void 0&&(t=Ts.Linear),this._interpolationFunction=t,this},n.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},n.prototype.onStart=function(t){return this._onStartCallback=t,this},n.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},n.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},n.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},n.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},n.prototype.onStop=function(t){return this._onStopCallback=t,this},n.prototype.update=function(t,e){var i=this,s;if(t===void 0&&(t=Po()),e===void 0&&(e=!0),this._isPaused)return!0;var o,r=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(t>r)return!1;e&&this.start(t,!0)}if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var a=t-this._startTime,l=this._duration+((s=this._repeatDelayTime)!==null&&s!==void 0?s:this._delayTime),c=this._duration+this._repeat*l,h=function(){if(i._duration===0||a>c)return 1;var v=Math.trunc(a/l),y=a-v*l,w=Math.min(y/i._duration,1);return w===0&&a===i._duration?1:w},u=h(),d=this._easingFunction(u);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,d),this._onUpdateCallback&&this._onUpdateCallback(this._object,u),this._duration===0||a>=this._duration)if(this._repeat>0){var p=Math.min(Math.trunc((a-this._duration)/l)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=p);for(o in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[o]=="string"&&(this._valuesStartRepeat[o]=this._valuesStartRepeat[o]+parseFloat(this._valuesEnd[o])),this._yoyo&&this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=l*p,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var m=0,g=this._chainedTweens.length;m<g;m++)this._chainedTweens[m].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},n.prototype._updateProperties=function(t,e,i,s){for(var o in i)if(e[o]!==void 0){var r=e[o]||0,a=i[o],l=Array.isArray(t[o]),c=Array.isArray(a),h=!l&&c;h?t[o]=this._interpolationFunction(a,s):typeof a=="object"&&a?this._updateProperties(t[o],r,a,s):(a=this._handleRelativeValue(r,a),typeof a=="number"&&(t[o]=r+(a-r)*s))}},n.prototype._handleRelativeValue=function(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)},n.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t],i=this._valuesEnd[t];typeof i=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(i):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=e},n}(),ob="23.1.3",rb=Hh.nextId,ln=qc,ab=ln.getAll.bind(ln),lb=ln.removeAll.bind(ln),cb=ln.add.bind(ln),B0=ln.remove.bind(ln),hb=ln.update.bind(ln),kd={Easing:Gi,Group:F0,Interpolation:Ts,now:Po,Sequence:Hh,nextId:rb,Tween:xl,VERSION:ob,getAll:ab,removeAll:lb,add:cb,remove:B0,update:hb};function ub(n,t,e,i=Gi.Linear.None){const s=new xl(n).to(t,e).easing(i).start();function o(r){s.update(r)&&requestAnimationFrame(o)}return requestAnimationFrame(o),s}var In=(n=>(n.Drawline="Drawline",n.Undo="Undo",n.Exit="Exit",n))(In||{});const kr=Symbol("$$PAINT_BRUSH_EVENT$$");function ka(n){return n[kr]||(n[kr]={}),n[kr]}function db(n){n[kr]||delete n[kr]}let fb=class{hasListener(t){const e=ka(this);return e&&e[t]&&e[t].length>0}on(t,e,i){const s=ka(this);return s[t]||(s[t]=[]),s[t].push([e,i||!1]),()=>this.off(t,e)}once(t,e){return this.on(t,e,!0)}off(t,e){if(t===void 0){db(this);return}const i=ka(this);if(i[t]||(i[t]=[]),e===void 0){i[t].length=0;return}let s=0;for(;s<i[t].length&&i[t][s][0]!==e;s++);s<i[t].length&&i[t].splice(s,1)}emit(t,...e){let i=!1;const o=ka(this)[t]||[];for(let r of o.slice()){const[a,l=!1]=r,c=a(...e);l&&this.off(t,a),c===!1&&(i=!0)}return i}};function $n(){return((1+Math.random())*65536|0).toString(16).substring(1)}function It(){return($n()+$n()+"-"+$n()+"-4"+$n().substr(0,3)+"-"+$n()+"-"+$n()+$n()+$n()).toLowerCase()}const pb=`
|
|
1
|
+
"use strict";var Zy=Object.defineProperty,qy=Object.defineProperties;var Jy=Object.getOwnPropertyDescriptors;var Ma=Object.getOwnPropertySymbols;var Pd=Object.prototype.hasOwnProperty,Cd=Object.prototype.propertyIsEnumerable;var ui=Math.pow,lc=(n,t,e)=>t in n?Zy(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,V=(n,t)=>{for(var e in t||(t={}))Pd.call(t,e)&&lc(n,e,t[e]);if(Ma)for(var e of Ma(t))Cd.call(t,e)&&lc(n,e,t[e]);return n},de=(n,t)=>qy(n,Jy(t));var Kn=(n,t)=>{var e={};for(var i in n)Pd.call(n,i)&&t.indexOf(i)<0&&(e[i]=n[i]);if(n!=null&&Ma)for(var i of Ma(n))t.indexOf(i)<0&&Cd.call(n,i)&&(e[i]=n[i]);return e};var f=(n,t,e)=>(lc(n,typeof t!="symbol"?t+"":t,e),e);var $=(n,t,e)=>new Promise((i,s)=>{var o=l=>{try{a(e.next(l))}catch(c){s(c)}},r=l=>{try{a(e.throw(l))}catch(c){s(c)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(o,r);a((e=e.apply(n,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const rt=require("@realsee/five"),G=require("three"),ea=require("@realsee/five/line"),Ky=require("@realsee/five/gltf-loader");function $y(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,i.get?i:{enumerable:!0,get:()=>n[e]})}}return t.default=n,Object.freeze(t)}const b=$y(G);function eb(){console.debug("%c %c@realsee/dnalogel %cv3.81.9",["background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')","background-repeat: no-repeat","background-position: 0 center","padding-left: 8px"].join(";"),"","background-color: #12ce9b;color:black;padding:0 6px;border-radius: 3px")}function tb(){const n=typeof OffscreenCanvas!="undefined",t=n&&new OffscreenCanvas(1,1).getContext("webgl")!==null;n&&!t&&Object.assign(window,{OffscreenCanvas:function(e,i){const s=document.createElement("canvas");return s.width=e,s.height=i,s}})}function V0(){}const Md=()=>Promise.resolve(),Id={__queue:Promise.resolve()};function ib(n=Md){Id.__queue=Id.__queue.then(n).catch(Md)}function Ia(n,t,e){const i=n.x,s=n.y,o=Math.floor(i/t*1e4)/1e4,r=Math.floor(s/e*1e4)/1e4;return{x:o,y:r}}function cc(n,t,e){const{x:i,y:s}=n,o=i*t,r=s*e;return{x:o,y:r}}function Ea(n){if(n.length<2)return{};const t=n.slice(-2),e=t[0],i={x:(t[0].x+t[1].x)/2,y:(t[0].y+t[1].y)/2};return{control:e,end:i}}function nb(n,t,e=V0){new Promise(i=>{setTimeout(()=>{e(),i(!0)},t*n)})}const sb=window,Ed=window.requestAnimationFrame||sb.webkitRequestAnimationFrame||(n=>setTimeout(n,16));function Ga(n,t=0){t<=0?Ed(n):Ed(()=>Ga(n,t-1))}var Gi=Object.freeze({Linear:Object.freeze({None:function(n){return n},In:function(n){return n},Out:function(n){return n},InOut:function(n){return n}}),Quadratic:Object.freeze({In:function(n){return n*n},Out:function(n){return n*(2-n)},InOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)}}),Cubic:Object.freeze({In:function(n){return n*n*n},Out:function(n){return--n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)}}),Quartic:Object.freeze({In:function(n){return n*n*n*n},Out:function(n){return 1- --n*n*n*n},InOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)}}),Quintic:Object.freeze({In:function(n){return n*n*n*n*n},Out:function(n){return--n*n*n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)}}),Sinusoidal:Object.freeze({In:function(n){return 1-Math.sin((1-n)*Math.PI/2)},Out:function(n){return Math.sin(n*Math.PI/2)},InOut:function(n){return .5*(1-Math.sin(Math.PI*(.5-n)))}}),Exponential:Object.freeze({In:function(n){return n===0?0:Math.pow(1024,n-1)},Out:function(n){return n===1?1:1-Math.pow(2,-10*n)},InOut:function(n){return n===0?0:n===1?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)}}),Circular:Object.freeze({In:function(n){return 1-Math.sqrt(1-n*n)},Out:function(n){return Math.sqrt(1- --n*n)},InOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)}}),Elastic:Object.freeze({In:function(n){return n===0?0:n===1?1:-Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI)},Out:function(n){return n===0?0:n===1?1:Math.pow(2,-10*n)*Math.sin((n-.1)*5*Math.PI)+1},InOut:function(n){return n===0?0:n===1?1:(n*=2,n<1?-.5*Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI):.5*Math.pow(2,-10*(n-1))*Math.sin((n-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(n){var t=1.70158;return n===1?1:n*n*((t+1)*n-t)},Out:function(n){var t=1.70158;return n===0?0:--n*n*((t+1)*n+t)+1},InOut:function(n){var t=2.5949095;return(n*=2)<1?.5*(n*n*((t+1)*n-t)):.5*((n-=2)*n*((t+1)*n+t)+2)}}),Bounce:Object.freeze({In:function(n){return 1-Gi.Bounce.Out(1-n)},Out:function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},InOut:function(n){return n<.5?Gi.Bounce.In(n*2)*.5:Gi.Bounce.Out(n*2-1)*.5+.5}}),generatePow:function(n){return n===void 0&&(n=4),n=n<Number.EPSILON?Number.EPSILON:n,n=n>1e4?1e4:n,{In:function(t){return Math.pow(t,n)},Out:function(t){return 1-Math.pow(1-t,n)},InOut:function(t){return t<.5?Math.pow(t*2,n)/2:(1-Math.pow(2-t*2,n))/2+.5}}}}),Po=function(){return performance.now()},F0=function(){function n(){this._tweens={},this._tweensAddedDuringUpdate={}}return n.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(e){return t._tweens[e]})},n.prototype.removeAll=function(){this._tweens={}},n.prototype.add=function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},n.prototype.remove=function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},n.prototype.update=function(t,e){t===void 0&&(t=Po()),e===void 0&&(e=!1);var i=Object.keys(this._tweens);if(i.length===0)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var s=0;s<i.length;s++){var o=this._tweens[i[s]],r=!e;o&&o.update(t,r)===!1&&!e&&delete this._tweens[i[s]]}i=Object.keys(this._tweensAddedDuringUpdate)}return!0},n}(),Ts={Linear:function(n,t){var e=n.length-1,i=e*t,s=Math.floor(i),o=Ts.Utils.Linear;return t<0?o(n[0],n[1],i):t>1?o(n[e],n[e-1],e-i):o(n[s],n[s+1>e?e:s+1],i-s)},Bezier:function(n,t){for(var e=0,i=n.length-1,s=Math.pow,o=Ts.Utils.Bernstein,r=0;r<=i;r++)e+=s(1-t,i-r)*s(t,r)*n[r]*o(i,r);return e},CatmullRom:function(n,t){var e=n.length-1,i=e*t,s=Math.floor(i),o=Ts.Utils.CatmullRom;return n[0]===n[e]?(t<0&&(s=Math.floor(i=e*(1+t))),o(n[(s-1+e)%e],n[s],n[(s+1)%e],n[(s+2)%e],i-s)):t<0?n[0]-(o(n[0],n[0],n[1],n[1],-i)-n[0]):t>1?n[e]-(o(n[e],n[e],n[e-1],n[e-1],i-e)-n[e]):o(n[s?s-1:0],n[s],n[e<s+1?e:s+1],n[e<s+2?e:s+2],i-s)},Utils:{Linear:function(n,t,e){return(t-n)*e+n},Bernstein:function(n,t){var e=Ts.Utils.Factorial;return e(n)/e(t)/e(n-t)},Factorial:function(){var n=[1];return function(t){var e=1;if(n[t])return n[t];for(var i=t;i>1;i--)e*=i;return n[t]=e,e}}(),CatmullRom:function(n,t,e,i,s){var o=(e-n)*.5,r=(i-t)*.5,a=s*s,l=s*a;return(2*t-2*e+o+r)*l+(-3*t+3*e-2*o-r)*a+o*s+t}}},Hh=function(){function n(){}return n.nextId=function(){return n._nextId++},n._nextId=0,n}(),qc=new F0,xl=function(){function n(t,e){e===void 0&&(e=qc),this._object=t,this._group=e,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Gi.Linear.None,this._interpolationFunction=Ts.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Hh.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return n.prototype.getId=function(){return this._id},n.prototype.isPlaying=function(){return this._isPlaying},n.prototype.isPaused=function(){return this._isPaused},n.prototype.getDuration=function(){return this._duration},n.prototype.to=function(t,e){if(e===void 0&&(e=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=e<0?0:e,this},n.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},n.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},n.prototype.start=function(t,e){if(t===void 0&&(t=Po()),e===void 0&&(e=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||e){if(this._propertiesAreSetUp=!0,!this._isDynamic){var s={};for(var o in this._valuesEnd)s[o]=this._valuesEnd[o];this._valuesEnd=s}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,e)}return this},n.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},n.prototype._setupProperties=function(t,e,i,s,o){for(var r in i){var a=t[r],l=Array.isArray(a),c=l?"array":typeof a,h=!l&&Array.isArray(i[r]);if(!(c==="undefined"||c==="function")){if(h){var u=i[r];if(u.length===0)continue;for(var d=[a],p=0,m=u.length;p<m;p+=1){var g=this._handleRelativeValue(a,u[p]);if(isNaN(g)){h=!1,console.warn("Found invalid interpolation list. Skipping.");break}d.push(g)}h&&(i[r]=d)}if((c==="object"||l)&&a&&!h){e[r]=l?[]:{};var v=a;for(var y in v)e[r][y]=v[y];s[r]=l?[]:{};var u=i[r];if(!this._isDynamic){var w={};for(var y in u)w[y]=u[y];i[r]=u=w}this._setupProperties(v,e[r],u,s[r],o)}else(typeof e[r]=="undefined"||o)&&(e[r]=a),l||(e[r]*=1),h?s[r]=i[r].slice().reverse():s[r]=e[r]||0}}},n.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},n.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},n.prototype.pause=function(t){return t===void 0&&(t=Po()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this._group&&this._group.remove(this),this)},n.prototype.resume=function(t){return t===void 0&&(t=Po()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},n.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},n.prototype.group=function(t){return t===void 0&&(t=qc),this._group=t,this},n.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},n.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},n.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},n.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},n.prototype.easing=function(t){return t===void 0&&(t=Gi.Linear.None),this._easingFunction=t,this},n.prototype.interpolation=function(t){return t===void 0&&(t=Ts.Linear),this._interpolationFunction=t,this},n.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},n.prototype.onStart=function(t){return this._onStartCallback=t,this},n.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},n.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},n.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},n.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},n.prototype.onStop=function(t){return this._onStopCallback=t,this},n.prototype.update=function(t,e){var i=this,s;if(t===void 0&&(t=Po()),e===void 0&&(e=!0),this._isPaused)return!0;var o,r=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(t>r)return!1;e&&this.start(t,!0)}if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var a=t-this._startTime,l=this._duration+((s=this._repeatDelayTime)!==null&&s!==void 0?s:this._delayTime),c=this._duration+this._repeat*l,h=function(){if(i._duration===0||a>c)return 1;var v=Math.trunc(a/l),y=a-v*l,w=Math.min(y/i._duration,1);return w===0&&a===i._duration?1:w},u=h(),d=this._easingFunction(u);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,d),this._onUpdateCallback&&this._onUpdateCallback(this._object,u),this._duration===0||a>=this._duration)if(this._repeat>0){var p=Math.min(Math.trunc((a-this._duration)/l)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=p);for(o in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[o]=="string"&&(this._valuesStartRepeat[o]=this._valuesStartRepeat[o]+parseFloat(this._valuesEnd[o])),this._yoyo&&this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=l*p,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var m=0,g=this._chainedTweens.length;m<g;m++)this._chainedTweens[m].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},n.prototype._updateProperties=function(t,e,i,s){for(var o in i)if(e[o]!==void 0){var r=e[o]||0,a=i[o],l=Array.isArray(t[o]),c=Array.isArray(a),h=!l&&c;h?t[o]=this._interpolationFunction(a,s):typeof a=="object"&&a?this._updateProperties(t[o],r,a,s):(a=this._handleRelativeValue(r,a),typeof a=="number"&&(t[o]=r+(a-r)*s))}},n.prototype._handleRelativeValue=function(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)},n.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t],i=this._valuesEnd[t];typeof i=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(i):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=e},n}(),ob="23.1.3",rb=Hh.nextId,ln=qc,ab=ln.getAll.bind(ln),lb=ln.removeAll.bind(ln),cb=ln.add.bind(ln),B0=ln.remove.bind(ln),hb=ln.update.bind(ln),kd={Easing:Gi,Group:F0,Interpolation:Ts,now:Po,Sequence:Hh,nextId:rb,Tween:xl,VERSION:ob,getAll:ab,removeAll:lb,add:cb,remove:B0,update:hb};function ub(n,t,e,i=Gi.Linear.None){const s=new xl(n).to(t,e).easing(i).start();function o(r){s.update(r)&&requestAnimationFrame(o)}return requestAnimationFrame(o),s}var In=(n=>(n.Drawline="Drawline",n.Undo="Undo",n.Exit="Exit",n))(In||{});const kr=Symbol("$$PAINT_BRUSH_EVENT$$");function ka(n){return n[kr]||(n[kr]={}),n[kr]}function db(n){n[kr]||delete n[kr]}let fb=class{hasListener(t){const e=ka(this);return e&&e[t]&&e[t].length>0}on(t,e,i){const s=ka(this);return s[t]||(s[t]=[]),s[t].push([e,i||!1]),()=>this.off(t,e)}once(t,e){return this.on(t,e,!0)}off(t,e){if(t===void 0){db(this);return}const i=ka(this);if(i[t]||(i[t]=[]),e===void 0){i[t].length=0;return}let s=0;for(;s<i[t].length&&i[t][s][0]!==e;s++);s<i[t].length&&i[t].splice(s,1)}emit(t,...e){let i=!1;const o=ka(this)[t]||[];for(let r of o.slice()){const[a,l=!1]=r,c=a(...e);l&&this.off(t,a),c===!1&&(i=!0)}return i}};function $n(){return((1+Math.random())*65536|0).toString(16).substring(1)}function It(){return($n()+$n()+"-"+$n()+"-4"+$n().substr(0,3)+"-"+$n()+"-"+$n()+$n()+$n()).toLowerCase()}const pb=`
|
|
2
2
|
<style type="text/css">
|
|
3
3
|
|
|
4
4
|
#_gl_paintBrush {
|
|
@@ -104,7 +104,7 @@ transition: all 500ms;
|
|
|
104
104
|
* Copyright (c) 2016 Jorik Tangelder;
|
|
105
105
|
* Licensed under the MIT license */(function(n){(function(t,e,i,s){var o=["","webkit","Moz","MS","ms","o"],r=e.createElement("div"),a="function",l=Math.round,c=Math.abs,h=Date.now;function u(N,Q,K){return setTimeout(C(N,K),Q)}function d(N,Q,K){return Array.isArray(N)?(p(N,K[Q],K),!0):!1}function p(N,Q,K){var re;if(N)if(N.forEach)N.forEach(Q,K);else if(N.length!==s)for(re=0;re<N.length;)Q.call(K,N[re],re,N),re++;else for(re in N)N.hasOwnProperty(re)&&Q.call(K,N[re],re,N)}function m(N,Q,K){var re="DEPRECATED METHOD: "+Q+`
|
|
106
106
|
`+K+` AT
|
|
107
|
-
`;return function(){var Ce=new Error("get-stack-trace"),je=Ce&&Ce.stack?Ce.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",Qe=t.console&&(t.console.warn||t.console.log);return Qe&&Qe.call(t.console,re,je),N.apply(this,arguments)}}var g;typeof Object.assign!="function"?g=function(Q){if(Q===s||Q===null)throw new TypeError("Cannot convert undefined or null to object");for(var K=Object(Q),re=1;re<arguments.length;re++){var Ce=arguments[re];if(Ce!==s&&Ce!==null)for(var je in Ce)Ce.hasOwnProperty(je)&&(K[je]=Ce[je])}return K}:g=Object.assign;var v=m(function(Q,K,re){for(var Ce=Object.keys(K),je=0;je<Ce.length;)(!re||re&&Q[Ce[je]]===s)&&(Q[Ce[je]]=K[Ce[je]]),je++;return Q},"extend","Use `assign`."),y=m(function(Q,K){return v(Q,K,!0)},"merge","Use `assign`.");function w(N,Q,K){var re=Q.prototype,Ce;Ce=N.prototype=Object.create(re),Ce.constructor=N,Ce._super=re,K&&g(Ce,K)}function C(N,Q){return function(){return N.apply(Q,arguments)}}function E(N,Q){return typeof N==a?N.apply(Q&&Q[0]||s,Q):N}function D(N,Q){return N===s?Q:N}function L(N,Q,K){p(A(Q),function(re){N.addEventListener(re,K,!1)})}function R(N,Q,K){p(A(Q),function(re){N.removeEventListener(re,K,!1)})}function z(N,Q){for(;N;){if(N==Q)return!0;N=N.parentNode}return!1}function O(N,Q){return N.indexOf(Q)>-1}function A(N){return N.trim().split(/\s+/g)}function M(N,Q,K){if(N.indexOf&&!K)return N.indexOf(Q);for(var re=0;re<N.length;){if(K&&N[re][K]==Q||!K&&N[re]===Q)return re;re++}return-1}function I(N){return Array.prototype.slice.call(N,0)}function k(N,Q,K){for(var re=[],Ce=[],je=0;je<N.length;){var Qe=Q?N[je][Q]:N[je];M(Ce,Qe)<0&&re.push(N[je]),Ce[je]=Qe,je++}return K&&(Q?re=re.sort(function(xt,Rt){return xt[Q]>Rt[Q]}):re=re.sort()),re}function x(N,Q){for(var K,re,Ce=Q[0].toUpperCase()+Q.slice(1),je=0;je<o.length;){if(K=o[je],re=K?K+Ce:Q,re in N)return re;je++}return s}var S=1;function j(){return S++}function F(N){var Q=N.ownerDocument||N;return Q.defaultView||Q.parentWindow||t}var J=/mobile|tablet|ip(ad|hone|od)|android/i,ne="ontouchstart"in t,q=x(t,"PointerEvent")!==s,oe=ne&&J.test(navigator.userAgent),se="touch",ae="pen",ze="mouse",ee="kinect",we=25,le=1,he=2,be=4,te=8,ke=1,Re=2,ye=4,De=8,ve=16,Ae=Re|ye,Oe=De|ve,Xe=Ae|Oe,Ze=["x","y"],ot=["clientX","clientY"];function Ke(N,Q){var K=this;this.manager=N,this.callback=Q,this.element=N.element,this.target=N.options.inputTarget,this.domHandler=function(re){E(N.options.enable,[N])&&K.handler(re)},this.init()}Ke.prototype={handler:function(){},init:function(){this.evEl&&L(this.element,this.evEl,this.domHandler),this.evTarget&&L(this.target,this.evTarget,this.domHandler),this.evWin&&L(F(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&R(this.element,this.evEl,this.domHandler),this.evTarget&&R(this.target,this.evTarget,this.domHandler),this.evWin&&R(F(this.element),this.evWin,this.domHandler)}};function et(N){var Q,K=N.options.inputClass;return K?Q=K:q?Q=mn:oe?Q=Wn:ne?Q=vn:Q=Di,new Q(N,lt)}function lt(N,Q,K){var re=K.pointers.length,Ce=K.changedPointers.length,je=Q&le&&re-Ce===0,Qe=Q&(be|te)&&re-Ce===0;K.isFirst=!!je,K.isFinal=!!Qe,je&&(N.session={}),K.eventType=Q,ht(N,K),N.emit("hammer.input",K),N.recognize(K),N.session.prevInput=K}function ht(N,Q){var K=N.session,re=Q.pointers,Ce=re.length;K.firstInput||(K.firstInput=Ut(Q)),Ce>1&&!K.firstMultiple?K.firstMultiple=Ut(Q):Ce===1&&(K.firstMultiple=!1);var je=K.firstInput,Qe=K.firstMultiple,Ct=Qe?Qe.center:je.center,xt=Q.center=li(re);Q.timeStamp=h(),Q.deltaTime=Q.timeStamp-je.timeStamp,Q.angle=Xt(Ct,xt),Q.distance=Qt(Ct,xt),Ft(K,Q),Q.offsetDirection=ut(Q.deltaX,Q.deltaY);var Rt=Ai(Q.deltaTime,Q.deltaX,Q.deltaY);Q.overallVelocityX=Rt.x,Q.overallVelocityY=Rt.y,Q.overallVelocity=c(Rt.x)>c(Rt.y)?Rt.x:Rt.y,Q.scale=Qe?As(Qe.pointers,re):1,Q.rotation=Qe?ir(Qe.pointers,re):0,Q.maxPointers=K.prevInput?Q.pointers.length>K.prevInput.maxPointers?Q.pointers.length:K.prevInput.maxPointers:Q.pointers.length,Zi(K,Q);var ii=N.element;z(Q.srcEvent.target,ii)&&(ii=Q.srcEvent.target),Q.target=ii}function Ft(N,Q){var K=Q.center,re=N.offsetDelta||{},Ce=N.prevDelta||{},je=N.prevInput||{};(Q.eventType===le||je.eventType===be)&&(Ce=N.prevDelta={x:je.deltaX||0,y:je.deltaY||0},re=N.offsetDelta={x:K.x,y:K.y}),Q.deltaX=Ce.x+(K.x-re.x),Q.deltaY=Ce.y+(K.y-re.y)}function Zi(N,Q){var K=N.lastInterval||Q,re=Q.timeStamp-K.timeStamp,Ce,je,Qe,Ct;if(Q.eventType!=te&&(re>we||K.velocity===s)){var xt=Q.deltaX-K.deltaX,Rt=Q.deltaY-K.deltaY,ii=Ai(re,xt,Rt);je=ii.x,Qe=ii.y,Ce=c(ii.x)>c(ii.y)?ii.x:ii.y,Ct=ut(xt,Rt),N.lastInterval=Q}else Ce=K.velocity,je=K.velocityX,Qe=K.velocityY,Ct=K.direction;Q.velocity=Ce,Q.velocityX=je,Q.velocityY=Qe,Q.direction=Ct}function Ut(N){for(var Q=[],K=0;K<N.pointers.length;)Q[K]={clientX:l(N.pointers[K].clientX),clientY:l(N.pointers[K].clientY)},K++;return{timeStamp:h(),pointers:Q,center:li(Q),deltaX:N.deltaX,deltaY:N.deltaY}}function li(N){var Q=N.length;if(Q===1)return{x:l(N[0].clientX),y:l(N[0].clientY)};for(var K=0,re=0,Ce=0;Ce<Q;)K+=N[Ce].clientX,re+=N[Ce].clientY,Ce++;return{x:l(K/Q),y:l(re/Q)}}function Ai(N,Q,K){return{x:Q/N||0,y:K/N||0}}function ut(N,Q){return N===Q?ke:c(N)>=c(Q)?N<0?Re:ye:Q<0?De:ve}function Qt(N,Q,K){K||(K=Ze);var re=Q[K[0]]-N[K[0]],Ce=Q[K[1]]-N[K[1]];return Math.sqrt(re*re+Ce*Ce)}function Xt(N,Q,K){K||(K=Ze);var re=Q[K[0]]-N[K[0]],Ce=Q[K[1]]-N[K[1]];return Math.atan2(Ce,re)*180/Math.PI}function ir(N,Q){return Xt(Q[1],Q[0],ot)+Xt(N[1],N[0],ot)}function As(N,Q){return Qt(Q[0],Q[1],ot)/Qt(N[0],N[1],ot)}var Fn={mousedown:le,mousemove:he,mouseup:be},io="mousedown",Bn="mousemove mouseup";function Di(){this.evEl=io,this.evWin=Bn,this.pressed=!1,Ke.apply(this,arguments)}w(Di,Ke,{handler:function(Q){var K=Fn[Q.type];K&le&&Q.button===0&&(this.pressed=!0),K&he&&Q.which!==1&&(K=be),this.pressed&&(K&be&&(this.pressed=!1),this.callback(this.manager,K,{pointers:[Q],changedPointers:[Q],pointerType:ze,srcEvent:Q}))}});var wi={pointerdown:le,pointermove:he,pointerup:be,pointercancel:te,pointerout:te},Hn={2:se,3:ae,4:ze,5:ee},Nn="pointerdown",qi="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(Nn="MSPointerDown",qi="MSPointerMove MSPointerUp MSPointerCancel");function mn(){this.evEl=Nn,this.evWin=qi,Ke.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}w(mn,Ke,{handler:function(Q){var K=this.store,re=!1,Ce=Q.type.toLowerCase().replace("ms",""),je=wi[Ce],Qe=Hn[Q.pointerType]||Q.pointerType,Ct=Qe==se,xt=M(K,Q.pointerId,"pointerId");je&le&&(Q.button===0||Ct)?xt<0&&(K.push(Q),xt=K.length-1):je&(be|te)&&(re=!0),!(xt<0)&&(K[xt]=Q,this.callback(this.manager,je,{pointers:K,changedPointers:[Q],pointerType:Qe,srcEvent:Q}),re&&K.splice(xt,1))}});var gn={touchstart:le,touchmove:he,touchend:be,touchcancel:te},ws="touchstart",Ps="touchstart touchmove touchend touchcancel";function Gn(){this.evTarget=ws,this.evWin=Ps,this.started=!1,Ke.apply(this,arguments)}w(Gn,Ke,{handler:function(Q){var K=gn[Q.type];if(K===le&&(this.started=!0),!!this.started){var re=Ji.call(this,Q,K);K&(be|te)&&re[0].length-re[1].length===0&&(this.started=!1),this.callback(this.manager,K,{pointers:re[0],changedPointers:re[1],pointerType:se,srcEvent:Q})}}});function Ji(N,Q){var K=I(N.touches),re=I(N.changedTouches);return Q&(be|te)&&(K=k(K.concat(re),"identifier",!0)),[K,re]}var no={touchstart:le,touchmove:he,touchend:be,touchcancel:te},Vi="touchstart touchmove touchend touchcancel";function Wn(){this.evTarget=Vi,this.targetIds={},Ke.apply(this,arguments)}w(Wn,Ke,{handler:function(Q){var K=no[Q.type],re=nr.call(this,Q,K);re&&this.callback(this.manager,K,{pointers:re[0],changedPointers:re[1],pointerType:se,srcEvent:Q})}});function nr(N,Q){var K=I(N.touches),re=this.targetIds;if(Q&(le|he)&&K.length===1)return re[K[0].identifier]=!0,[K,K];var Ce,je,Qe=I(N.changedTouches),Ct=[],xt=this.target;if(je=K.filter(function(Rt){return z(Rt.target,xt)}),Q===le)for(Ce=0;Ce<je.length;)re[je[Ce].identifier]=!0,Ce++;for(Ce=0;Ce<Qe.length;)re[Qe[Ce].identifier]&&Ct.push(Qe[Ce]),Q&(be|te)&&delete re[Qe[Ce].identifier],Ce++;if(Ct.length)return[k(je.concat(Ct),"identifier",!0),Ct]}var sr=2500,Cs=25;function vn(){Ke.apply(this,arguments);var N=C(this.handler,this);this.touch=new Wn(this.manager,N),this.mouse=new Di(this.manager,N),this.primaryTouch=null,this.lastTouches=[]}w(vn,Ke,{handler:function(Q,K,re){var Ce=re.pointerType==se,je=re.pointerType==ze;if(!(je&&re.sourceCapabilities&&re.sourceCapabilities.firesTouchEvents)){if(Ce)Ot.call(this,K,re);else if(je&&or.call(this,re))return;this.callback(Q,K,re)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function Ot(N,Q){N&le?(this.primaryTouch=Q.changedPointers[0].identifier,so.call(this,Q)):N&(be|te)&&so.call(this,Q)}function so(N){var Q=N.changedPointers[0];if(Q.identifier===this.primaryTouch){var K={x:Q.clientX,y:Q.clientY};this.lastTouches.push(K);var re=this.lastTouches,Ce=function(){var je=re.indexOf(K);je>-1&&re.splice(je,1)};setTimeout(Ce,sr)}}function or(N){for(var Q=N.srcEvent.clientX,K=N.srcEvent.clientY,re=0;re<this.lastTouches.length;re++){var Ce=this.lastTouches[re],je=Math.abs(Q-Ce.x),Qe=Math.abs(K-Ce.y);if(je<=Cs&&Qe<=Cs)return!0}return!1}var oo=x(r.style,"touchAction"),ro=oo!==s,ao="compute",jt="auto",Ms="manipulation",Fi="none",yn="pan-x",bn="pan-y",Un=ar();function Bt(N,Q){this.manager=N,this.set(Q)}Bt.prototype={set:function(N){N==ao&&(N=this.compute()),ro&&this.manager.element.style&&Un[N]&&(this.manager.element.style[oo]=N),this.actions=N.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var N=[];return p(this.manager.recognizers,function(Q){E(Q.options.enable,[Q])&&(N=N.concat(Q.getTouchAction()))}),rr(N.join(" "))},preventDefaults:function(N){var Q=N.srcEvent,K=N.offsetDirection;if(this.manager.session.prevented){Q.preventDefault();return}var re=this.actions,Ce=O(re,Fi)&&!Un[Fi],je=O(re,bn)&&!Un[bn],Qe=O(re,yn)&&!Un[yn];if(Ce){var Ct=N.pointers.length===1,xt=N.distance<2,Rt=N.deltaTime<250;if(Ct&&xt&&Rt)return}if(!(Qe&&je)&&(Ce||je&&K&Ae||Qe&&K&Oe))return this.preventSrc(Q)},preventSrc:function(N){this.manager.session.prevented=!0,N.preventDefault()}};function rr(N){if(O(N,Fi))return Fi;var Q=O(N,yn),K=O(N,bn);return Q&&K?Fi:Q||K?Q?yn:bn:O(N,Ms)?Ms:jt}function ar(){if(!ro)return!1;var N={},Q=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(K){N[K]=Q?t.CSS.supports("touch-action",K):!0}),N}var Qn=1,Yt=2,Ki=4,$t=8,ci=$t,Li=16,kt=32;function ei(N){this.options=g({},this.defaults,N||{}),this.id=j(),this.manager=null,this.options.enable=D(this.options.enable,!0),this.state=Qn,this.simultaneous={},this.requireFail=[]}ei.prototype={defaults:{},set:function(N){return g(this.options,N),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(N){if(d(N,"recognizeWith",this))return this;var Q=this.simultaneous;return N=Xn(N,this),Q[N.id]||(Q[N.id]=N,N.recognizeWith(this)),this},dropRecognizeWith:function(N){return d(N,"dropRecognizeWith",this)?this:(N=Xn(N,this),delete this.simultaneous[N.id],this)},requireFailure:function(N){if(d(N,"requireFailure",this))return this;var Q=this.requireFail;return N=Xn(N,this),M(Q,N)===-1&&(Q.push(N),N.requireFailure(this)),this},dropRequireFailure:function(N){if(d(N,"dropRequireFailure",this))return this;N=Xn(N,this);var Q=M(this.requireFail,N);return Q>-1&&this.requireFail.splice(Q,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(N){return!!this.simultaneous[N.id]},emit:function(N){var Q=this,K=this.state;function re(Ce){Q.manager.emit(Ce,N)}K<$t&&re(Q.options.event+lo(K)),re(Q.options.event),N.additionalEvent&&re(N.additionalEvent),K>=$t&&re(Q.options.event+lo(K))},tryEmit:function(N){if(this.canEmit())return this.emit(N);this.state=kt},canEmit:function(){for(var N=0;N<this.requireFail.length;){if(!(this.requireFail[N].state&(kt|Qn)))return!1;N++}return!0},recognize:function(N){var Q=g({},N);if(!E(this.options.enable,[this,Q])){this.reset(),this.state=kt;return}this.state&(ci|Li|kt)&&(this.state=Qn),this.state=this.process(Q),this.state&(Yt|Ki|$t|Li)&&this.tryEmit(Q)},process:function(N){},getTouchAction:function(){},reset:function(){}};function lo(N){return N&Li?"cancel":N&$t?"end":N&Ki?"move":N&Yt?"start":""}function co(N){return N==ve?"down":N==De?"up":N==Re?"left":N==ye?"right":""}function Xn(N,Q){var K=Q.manager;return K?K.get(N):N}function ti(){ei.apply(this,arguments)}w(ti,ei,{defaults:{pointers:1},attrTest:function(N){var Q=this.options.pointers;return Q===0||N.pointers.length===Q},process:function(N){var Q=this.state,K=N.eventType,re=Q&(Yt|Ki),Ce=this.attrTest(N);return re&&(K&te||!Ce)?Q|Li:re||Ce?K&be?Q|$t:Q&Yt?Q|Ki:Yt:kt}});function Yn(){ti.apply(this,arguments),this.pX=null,this.pY=null}w(Yn,ti,{defaults:{event:"pan",threshold:10,pointers:1,direction:Xe},getTouchAction:function(){var N=this.options.direction,Q=[];return N&Ae&&Q.push(bn),N&Oe&&Q.push(yn),Q},directionTest:function(N){var Q=this.options,K=!0,re=N.distance,Ce=N.direction,je=N.deltaX,Qe=N.deltaY;return Ce&Q.direction||(Q.direction&Ae?(Ce=je===0?ke:je<0?Re:ye,K=je!=this.pX,re=Math.abs(N.deltaX)):(Ce=Qe===0?ke:Qe<0?De:ve,K=Qe!=this.pY,re=Math.abs(N.deltaY))),N.direction=Ce,K&&re>Q.threshold&&Ce&Q.direction},attrTest:function(N){return ti.prototype.attrTest.call(this,N)&&(this.state&Yt||!(this.state&Yt)&&this.directionTest(N))},emit:function(N){this.pX=N.deltaX,this.pY=N.deltaY;var Q=co(N.direction);Q&&(N.additionalEvent=this.options.event+Q),this._super.emit.call(this,N)}});function $i(){ti.apply(this,arguments)}w($i,ti,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Fi]},attrTest:function(N){return this._super.attrTest.call(this,N)&&(Math.abs(N.scale-1)>this.options.threshold||this.state&Yt)},emit:function(N){if(N.scale!==1){var Q=N.scale<1?"in":"out";N.additionalEvent=this.options.event+Q}this._super.emit.call(this,N)}});function An(){ei.apply(this,arguments),this._timer=null,this._input=null}w(An,ei,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[jt]},process:function(N){var Q=this.options,K=N.pointers.length===Q.pointers,re=N.distance<Q.threshold,Ce=N.deltaTime>Q.time;if(this._input=N,!re||!K||N.eventType&(be|te)&&!Ce)this.reset();else if(N.eventType&le)this.reset(),this._timer=u(function(){this.state=ci,this.tryEmit()},Q.time,this);else if(N.eventType&be)return ci;return kt},reset:function(){clearTimeout(this._timer)},emit:function(N){this.state===ci&&(N&&N.eventType&be?this.manager.emit(this.options.event+"up",N):(this._input.timeStamp=h(),this.manager.emit(this.options.event,this._input)))}});function Bi(){ti.apply(this,arguments)}w(Bi,ti,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Fi]},attrTest:function(N){return this._super.attrTest.call(this,N)&&(Math.abs(N.rotation)>this.options.threshold||this.state&Yt)}});function Zn(){ti.apply(this,arguments)}w(Zn,ti,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ae|Oe,pointers:1},getTouchAction:function(){return Yn.prototype.getTouchAction.call(this)},attrTest:function(N){var Q=this.options.direction,K;return Q&(Ae|Oe)?K=N.overallVelocity:Q&Ae?K=N.overallVelocityX:Q&Oe&&(K=N.overallVelocityY),this._super.attrTest.call(this,N)&&Q&N.offsetDirection&&N.distance>this.options.threshold&&N.maxPointers==this.options.pointers&&c(K)>this.options.velocity&&N.eventType&be},emit:function(N){var Q=co(N.offsetDirection);Q&&this.manager.emit(this.options.event+Q,N),this.manager.emit(this.options.event,N)}});function wn(){ei.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}w(wn,ei,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Ms]},process:function(N){var Q=this.options,K=N.pointers.length===Q.pointers,re=N.distance<Q.threshold,Ce=N.deltaTime<Q.time;if(this.reset(),N.eventType&le&&this.count===0)return this.failTimeout();if(re&&Ce&&K){if(N.eventType!=be)return this.failTimeout();var je=this.pTime?N.timeStamp-this.pTime<Q.interval:!0,Qe=!this.pCenter||Qt(this.pCenter,N.center)<Q.posThreshold;this.pTime=N.timeStamp,this.pCenter=N.center,!Qe||!je?this.count=1:this.count+=1,this._input=N;var Ct=this.count%Q.taps;if(Ct===0)return this.hasRequireFailures()?(this._timer=u(function(){this.state=ci,this.tryEmit()},Q.interval,this),Yt):ci}return kt},failTimeout:function(){return this._timer=u(function(){this.state=kt},this.options.interval,this),kt},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ci&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Pi(N,Q){return Q=Q||{},Q.recognizers=D(Q.recognizers,Pi.defaults.preset),new Is(N,Q)}Pi.VERSION="2.0.7",Pi.defaults={domEvents:!1,touchAction:ao,enable:!0,inputTarget:null,inputClass:null,preset:[[Bi,{enable:!1}],[$i,{enable:!1},["rotate"]],[Zn,{direction:Ae}],[Yn,{direction:Ae},["swipe"]],[wn],[wn,{event:"doubletap",taps:2},["tap"]],[An]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var lr=1,ho=2;function Is(N,Q){this.options=g({},Pi.defaults,Q||{}),this.options.inputTarget=this.options.inputTarget||N,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=N,this.input=et(this),this.touchAction=new Bt(this,this.options.touchAction),qn(this,!0),p(this.options.recognizers,function(K){var re=this.add(new K[0](K[1]));K[2]&&re.recognizeWith(K[2]),K[3]&&re.requireFailure(K[3])},this)}Is.prototype={set:function(N){return g(this.options,N),N.touchAction&&this.touchAction.update(),N.inputTarget&&(this.input.destroy(),this.input.target=N.inputTarget,this.input.init()),this},stop:function(N){this.session.stopped=N?ho:lr},recognize:function(N){var Q=this.session;if(!Q.stopped){this.touchAction.preventDefaults(N);var K,re=this.recognizers,Ce=Q.curRecognizer;(!Ce||Ce&&Ce.state&ci)&&(Ce=Q.curRecognizer=null);for(var je=0;je<re.length;)K=re[je],Q.stopped!==ho&&(!Ce||K==Ce||K.canRecognizeWith(Ce))?K.recognize(N):K.reset(),!Ce&&K.state&(Yt|Ki|$t)&&(Ce=Q.curRecognizer=K),je++}},get:function(N){if(N instanceof ei)return N;for(var Q=this.recognizers,K=0;K<Q.length;K++)if(Q[K].options.event==N)return Q[K];return null},add:function(N){if(d(N,"add",this))return this;var Q=this.get(N.options.event);return Q&&this.remove(Q),this.recognizers.push(N),N.manager=this,this.touchAction.update(),N},remove:function(N){if(d(N,"remove",this))return this;if(N=this.get(N),N){var Q=this.recognizers,K=M(Q,N);K!==-1&&(Q.splice(K,1),this.touchAction.update())}return this},on:function(N,Q){if(N!==s&&Q!==s){var K=this.handlers;return p(A(N),function(re){K[re]=K[re]||[],K[re].push(Q)}),this}},off:function(N,Q){if(N!==s){var K=this.handlers;return p(A(N),function(re){Q?K[re]&&K[re].splice(M(K[re],Q),1):delete K[re]}),this}},emit:function(N,Q){this.options.domEvents&&cr(N,Q);var K=this.handlers[N]&&this.handlers[N].slice();if(!(!K||!K.length)){Q.type=N,Q.preventDefault=function(){Q.srcEvent.preventDefault()};for(var re=0;re<K.length;)K[re](Q),re++}},destroy:function(){this.element&&qn(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function qn(N,Q){var K=N.element;if(K.style){var re;p(N.options.cssProps,function(Ce,je){re=x(K.style,je),Q?(N.oldCssProps[re]=K.style[re],K.style[re]=Ce):K.style[re]=N.oldCssProps[re]||""}),Q||(N.oldCssProps={})}}function cr(N,Q){var K=e.createEvent("Event");K.initEvent(N,!0,!0),K.gesture=Q,Q.target.dispatchEvent(K)}g(Pi,{INPUT_START:le,INPUT_MOVE:he,INPUT_END:be,INPUT_CANCEL:te,STATE_POSSIBLE:Qn,STATE_BEGAN:Yt,STATE_CHANGED:Ki,STATE_ENDED:$t,STATE_RECOGNIZED:ci,STATE_CANCELLED:Li,STATE_FAILED:kt,DIRECTION_NONE:ke,DIRECTION_LEFT:Re,DIRECTION_RIGHT:ye,DIRECTION_UP:De,DIRECTION_DOWN:ve,DIRECTION_HORIZONTAL:Ae,DIRECTION_VERTICAL:Oe,DIRECTION_ALL:Xe,Manager:Is,Input:Ke,TouchAction:Bt,TouchInput:Wn,MouseInput:Di,PointerEventInput:mn,TouchMouseInput:vn,SingleTouchInput:Gn,Recognizer:ei,AttrRecognizer:ti,Tap:wn,Pan:Yn,Swipe:Zn,Pinch:$i,Rotate:Bi,Press:An,on:L,off:R,each:p,merge:y,extend:v,assign:g,inherit:w,bindFn:C,prefixed:x});var hr=typeof t!="undefined"?t:typeof self!="undefined"?self:{};hr.Hammer=Pi,typeof s=="function"&&s.amd?s(function(){return Pi}):n.exports?n.exports=Pi:t[i]=Pi})(window,document,"Hammer")})(kb);class Dl{constructor(t,e){f(this,"width");f(this,"height");f(this,"containerDom");f(this,"hooks",new St);f(this,"canvas",document.createElement("canvas"));f(this,"config");f(this,"state",{enabled:!1});f(this,"five");f(this,"scale");f(this,"offset",{x:0,y:0});f(this,"context");f(this,"renderCenter",new b.Vector3);f(this,"hammer");f(this,"offsetRange");f(this,"isPanning",!1);f(this,"imageData",new ImageData(1,1));f(this,"onPanstart",()=>{this.isPanning=!0,this.canvas.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)"});f(this,"onPan",t=>{if(!this.isPanning||!this.offsetRange||this.hooks.emit("wantsPanGesture",t))return;const{translateX:i,translateY:s}=this.getPanOffset(t,this.offsetRange);this.canvas.style.transform=`translate3d(${i}px, ${s}px, 100px)`});f(this,"onPanend",t=>{if(this.isPanning=!1,this.canvas.style.boxShadow="none",!this.offsetRange)return;const{translateX:e,translateY:i}=this.getPanOffset(t,this.offsetRange);this.canvas.style.transform=`translate3d(${e}px, ${i}px, 100px)`,this.offset={x:e,y:i}});var s,o,r,a;if(!t.renderer){console.error("Five Render 未初始化");return}this.five=t,this.scale=(s=e==null?void 0:e.scale)!=null?s:2,this.width=(o=e==null?void 0:e.width)!=null?o:190,this.height=(a=(r=e==null?void 0:e.height)!=null?r:e==null?void 0:e.width)!=null?a:190,this.config={dragEnabled:(e==null?void 0:e.dragEnabled)||!1,autoFixPCPosition:(e==null?void 0:e.autoFixPCPosition)||!1,initialPosition:(e==null?void 0:e.initialPosition)||{left:"0",top:"0"},skipPanorama:(e==null?void 0:e.skipPanorama)||!1};const i=this.canvas.getContext("2d");if(!i)throw new Error("CANNOT CREATE CONTEXT2D");this.context=i,this.config.dragEnabled&&(this.hammer=new _r(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panstart",this.onPanstart),this.hammer.on("panend",this.onPanend)),this.initStyle()}enable(){if(!this.state.enabled)return this.state.enabled=!0,this.containerDom&&this._appendTo(this.containerDom),this}disable(){if(this.state.enabled)return this.state.enabled=!1,this.canvas.style.visibility="hidden",this.canvas.remove(),this}dispose(){var t;this.clear(),this.disable(),(t=this.hammer)==null||t.destroy()}appendTo(t){var e;return this.containerDom&&((e=this.containerDom)==null||e.removeChild(this.canvas)),this.containerDom=t,this.state.enabled&&this._appendTo(t),this}clear(){var t;return(t=this.context)==null||t.clearRect(0,0,this.canvas.width,this.canvas.height),this}renderWithPoint(t){this.containerDom&&this.state.enabled&&(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}renderWithScreenPoint(t){this.containerDom&&this.state.enabled&&(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}resetOffset(){this.offset={x:0,y:0},this.canvas.style.transform="translate3d(0px, 0px, 100px)"}updateScale(t){t>0&&(this.scale=t)}updateSize(t,e){if(t>0){this.width=t,this.height=e||t;const i=1;this.canvas.setAttribute("width",(this.width*i).toString()),this.canvas.setAttribute("height",(this.height*i).toString()),this.canvas.style.width=this.width+"px",this.canvas.style.height=this.height+"px";const s=Math.floor(this.width*i),o=Math.floor(this.height*i);this.imageData=new ImageData(s,o),this.clear()}}render(){if(!this.five.renderer||!this.containerDom)return;const{scale:t,context:e,width:i,height:s}=this,o=this.five.renderer.getSize(new b.Vector2),[r,a]=(()=>{if(this.renderCenter.isVector3){const p=this.renderCenter.clone().project(this.five.camera);return[(p.x+1)/2*o.x,(p.y+1)/2*o.y]}else return[this.renderCenter.x,o.y-this.renderCenter.y]})(),l=1,c=i/t,h=s/t,u=l*t,d=new Map;this.five.scene.traverse(p=>{p.disableGetPixel===!0&&(d.set(p,p.visible),p.visible=!1)});try{const p=this.five.getPixels({x:r-c/2,y:a-c/2,width:c,height:h,pixelRatio:u,skipPanorama:this.config.skipPanorama});d.forEach((y,w)=>{w.visible=y});const m=Math.floor(i*l),g=Math.floor(s*l),v=m*g*4;if(!p||p.length!==v){console.warn("Magnifier: Invalid pixel data",{pixelsLength:p==null?void 0:p.length,expectedLength:v,imageWidth:m,imageHeight:g});return}xb(p,m,g),(this.imageData.width!==m||this.imageData.height!==g)&&(this.imageData=new ImageData(m,g)),this.imageData.data.length!==p.length&&(console.warn("Magnifier: ImageData size mismatch",{imageDataLength:this.imageData.data.length,pixelsLength:p.length,imageWidth:m,imageHeight:g}),this.imageData=new ImageData(m,g));try{this.imageData.data.set(p)}catch(y){console.error("Magnifier: Failed to set pixel data",{error:y,imageDataLength:this.imageData.data.length,pixelsLength:p.length,imageWidth:m,imageHeight:g});return}e.putImageData(this.imageData,0,0),this.canvas.style.visibility="visible"}catch(p){console.error("Magnifier render error:",p),d.forEach((m,g)=>{g.visible=m})}}getRenderCenter(){return this.renderCenter}_appendTo(t){if(this.resetOffset(),t.appendChild(this.canvas),!this.offsetRange){const e=this.canvas.getBoundingClientRect(),i=t.getBoundingClientRect(),s=i.right-e.right,o=i.bottom-e.bottom,r=i.left-e.left,a=i.top-e.top;this.offsetRange={min:{x:r,y:a},max:{x:s,y:o}}}}autoFixPCPosition(){if(!this.containerDom)return;const{width:t,height:e}=this,{clientWidth:i,clientHeight:s}=this.containerDom,[o,r,a]=(()=>{if(this.renderCenter.isVector3){const l=this.renderCenter.clone().project(this.five.camera);return[(l.x+1)/2*i,-(l.x-1)/2*i,-(l.y-1)/2*s]}else return[this.renderCenter.x,i-this.renderCenter.x,this.renderCenter.y]})();o<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left="90px"):a<183?(this.canvas.style.top="90px",this.canvas.style.left=-t/2+"px"):r<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=-t-90+"px"):(this.canvas.style.left=-t/2+"px",this.canvas.style.top=-e-90+"px"),this.canvas.style.transform=`translate3d(${o}px, ${a}px, 10px)`,this.offset={x:o,y:a}}initStyle(){const t=this.canvas;t.classList.add("five-plugin__magnifier"),t.style.position="absolute",t.style.pointerEvents=this.config.dragEnabled?"all":"none",t.style.borderRadius="50%",t.style.zIndex="99";const e=1;t.setAttribute("width",(this.width*e).toString()),t.setAttribute("height",(this.height*e).toString()),t.style.border="2px solid rgba(255,255,255,0.20)",t.style.width=this.width+"px",t.style.height=this.height+"px",t.style.top=this.config.initialPosition.top,t.style.left=this.config.initialPosition.left,t.style.transform="translate(0,0,100px)",t.style.visibility="hidden",this.config.dragEnabled&&(this.canvas.style.cursor="pointer")}getPanOffset(t,e){const{min:{x:i,y:s},max:{x:o,y:r}}=e,a=this.offset.x+t.deltaX,l=this.offset.y+t.deltaY,c=Math.min(Math.max(a,i),o),h=Math.min(Math.max(l,s),r);return{translateX:c,translateY:h}}}function xa(n,t,e){if(!n||t<0||e<0||t>=n.length||e>=n.length){console.warn("exchange: Index out of bounds",{arrayLength:n==null?void 0:n.length,index1:t,index2:e});return}const i=n[t],s=n[e];n[t]=s,n[e]=i}function xb(n,t,e){if(!n||t<=0||e<=0){console.warn("flipPixelsY: Invalid parameters",{pixelsLength:n==null?void 0:n.length,width:t,height:e});return}const i=t*e*4;if(n.length<i){console.warn("flipPixelsY: Pixel array too small",{actualLength:n.length,expectedLength:i,width:t,height:e});return}const s=e/2;for(let o=1;o<=s;o++){const r=e-(o-1);for(let a=1;a<=t;a++){const l=(o-1)*t+a-1,c=(r-1)*t+a-1,h=l*4,u=c*4;h+3<n.length&&u+3<n.length&&(xa(n,h+0,u+0),xa(n,h+1,u+1),xa(n,h+2,u+2),xa(n,h+3,u+3))}}}function Sb(n,t){const{offsetWidth:e,offsetHeight:i}=t,{top:s,left:o}=t.getBoundingClientRect();return new b.Vector2().set((n.x-o)/e*2-1,-(n.y-s)/i*2+1)}function G0(n,t){const{offsetWidth:e,offsetHeight:i}=t;return new b.Vector2().set(n.x/e*2-1,-n.y/i*2+1)}var jn=function(n){G.Object3D.call(this),this.element=n,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.addEventListener("removed",function(){this.traverse(function(t){t.element instanceof Element&&t.element.parentNode!==null&&t.element.remove()})})};jn.prototype=Object.create(G.Object3D.prototype);jn.prototype.constructor=jn;var $a=function(n){jn.call(this,n)};$a.prototype=Object.create(jn.prototype);$a.prototype.constructor=$a;let Tb=function(n){let t=this,e,i,s,o,r=new G.Matrix4,a={camera:{fov:0,style:""},objects:new Map},l=document.createElement("div");l.style.overflow="hidden",this.domElement=l;let c=document.createElement("div");c.style.WebkitTransformStyle="preserve-3d",c.style.transformStyle="preserve-3d",c.style.pointerEvents="none",l.appendChild(c),this.getSize=function(){return{width:e,height:i}},this.setSize=function(g,v){e=g,i=v,s=e/2,o=i/2,l.style.width=g+"px",l.style.height=v+"px",c.style.width=g+"px",c.style.height=v+"px"};function h(g){return Math.abs(g)<1e-10?0:g}function u(g){let v=g.elements;return"matrix3d("+h(v[0])+","+h(-v[1])+","+h(v[2])+","+h(v[3])+","+h(v[4])+","+h(-v[5])+","+h(v[6])+","+h(v[7])+","+h(v[8])+","+h(-v[9])+","+h(v[10])+","+h(v[11])+","+h(v[12])+","+h(-v[13])+","+h(v[14])+","+h(v[15])+")"}function d(g,v){let y=g.elements;return"translate(-50%,-50%)"+("matrix3d("+h(y[0])+","+h(y[1])+","+h(y[2])+","+h(y[3])+","+h(-y[4])+","+h(-y[5])+","+h(-y[6])+","+h(-y[7])+","+h(y[8])+","+h(y[9])+","+h(y[10])+","+h(y[11])+","+h(y[12])+","+h(y[13])+","+h(y[14])+","+h(y[15])+")")}function p(g){var v;if(g.isCSS3DObject){const y=(v=g.mode)!=null?v:"front";(!n||y===n)&&(g.element.style.display="none")}for(let y=0,w=g.children.length;y<w;y++)p(g.children[y])}function m(g,v,y,w,C){var E;if(g.visible===!1){p(g);return}if(g.isCSS3DObject){const D=(E=g.mode)!=null?E:"front";if(n&&D!==n)return;g.flag=C;const L=g.layers.test(y.layers)===!0,R=g.element;if(R.style.display=L===!0?"":"none",L){g.onBeforeRender(t,v,y);let z;g.isCSS3DSprite?(r.copy(y.matrixWorldInverse),r.transpose(),r.copyPosition(g.matrixWorld),r.scale(g.scale),r.elements[3]=0,r.elements[7]=0,r.elements[11]=0,r.elements[15]=1,z=d(r)):z=d(g.matrixWorld);let O=a.objects.get(g);if(O===void 0||O.style!==z){R.style.WebkitTransform=z,R.style.transform=z;let A={style:z};a.objects.set(g,A)}R.style.display=g.visible?"":"none",R.parentNode!==c&&c.appendChild(R),g.onAfterRender(t,v,y)}}for(let D=0,L=g.children.length;D<L;D++)m(g.children[D],v,y,w,C)}this.render=function(g,v){let y=v.projectionMatrix.elements[5]*o;if(a.camera.fov!==y&&(v.isPerspectiveCamera?(l.style.WebkitPerspective=y+"px",l.style.perspective=y+"px"):(l.style.WebkitPerspective="",l.style.perspective=""),a.camera.fov=y),g.autoUpdate===!0&&g.updateMatrixWorld(),v.parent===null&&v.updateMatrixWorld(),v.isOrthographicCamera)var w=-(v.right+v.left)/2,C=(v.top+v.bottom)/2;let E=v.isOrthographicCamera?"scale("+y+")translate("+h(w)+"px,"+h(C)+"px)"+u(v.matrixWorldInverse):"translateZ("+y+"px)"+u(v.matrixWorldInverse),D=E+"translate("+s+"px,"+o+"px)";a.camera.style!==D&&(c.style.WebkitTransform=D,c.style.transform=D,a.camera.style=D);const L=g.uuid+"_"+performance.now().toString();m(g,g,v,E,L),a.objects.forEach(function(R,z){z.flag!==L&&(z.element.remove(),a.objects.delete(z))})},this.sceneRender=function(g,v){let y=v.projectionMatrix.elements[5]*o;if(a.camera.fov!==y&&(v.isPerspectiveCamera?(l.style.WebkitPerspective=y+"px",l.style.perspective=y+"px"):(l.style.WebkitPerspective="",l.style.perspective=""),a.camera.fov=y),v.parent===null&&v.updateMatrixWorld(),v.isOrthographicCamera)var w=-(v.right+v.left)/2,C=(v.top+v.bottom)/2;let E=v.isOrthographicCamera?"scale("+y+")translate("+h(w)+"px,"+h(C)+"px)"+u(v.matrixWorldInverse):"translateZ("+y+"px)"+u(v.matrixWorldInverse),D=E+"translate("+s+"px,"+o+"px)";a.camera.style!==D&&(c.style.WebkitTransform=D,c.style.transform=D,a.camera.style=D);const L=performance.now().toString();g.forEach(R=>{R.autoUpdate===!0&&R.updateMatrixWorld(),m(R,R,v,E,L)}),a.objects.forEach(function(R,z){z.flag!==L&&(z.element.remove(),a.objects.delete(z))})}};function Oo(n,t){const e=Math.round(n);return e%2===0?e:e+(t!=null&&t.floor?-1:1)}function Db(n,t,e=!0){if(!n)return console.error("createResizeObserver: element is undefined"),{observe:()=>{},unobserve:()=>{}};const i=()=>{const o=Oo(n.clientWidth,{floor:!0}),r=Oo(n.clientHeight,{floor:!0});t(o,r)};if(typeof ResizeObserver=="undefined"||!ResizeObserver)return console.warn("createResizeObserver: ResizeObserver is undefined"),{observe:()=>i(),unobserve:()=>{}};const s=new ResizeObserver(i);return e&&i(),{observe:()=>s.observe(n),unobserve:()=>s.unobserve(n)}}class el extends Tb{constructor(e){super(e);f(this,"wrapper");f(this,"domElementWrapper",document.createElement("div"));f(this,"requestAnimationFrameId");f(this,"resizeDisoper");this.domElementWrapper.classList.add("ICSS3DRendererWrapper"),this.domElementWrapper.style.position="absolute",this.domElementWrapper.style.top="0",this.domElementWrapper.style.left="0",this.domElementWrapper.style.width="100%",this.domElementWrapper.style.height="100%",this.domElementWrapper.style.userSelect="none",this.domElementWrapper.style.pointerEvents="none",this.domElement.classList.add("ICSS3DRenderer"),this.domElement.style.position="absolute",this.domElement.style.top="0",this.domElement.style.left="0",this.domElement.style.userSelect="none",this.domElement.style.pointerEvents="none",this.domElementWrapper.appendChild(this.domElement)}setWrapper(e){if(!e)throw new Error("CSS3DRenderer: wrapper is required");if((()=>{for(let o=0;o<e.children.length;o++)if(e.children.item(o)===this.domElementWrapper)return!0;return!1})())return;const s=this.wrapper;return s&&s.contains(this.domElementWrapper)&&this.domElementWrapper.remove(),this.appendToElement(e),this.wrapper=e,this}appendToElement(e){e.appendChild(this.domElementWrapper);const i=(r,a)=>this.setSize(r,a),{observe:s,unobserve:o}=Db(this.domElementWrapper,i,!0);s(),this.resizeDisoper=o,this.wrapper=e}renderEveryFrame(e,i){if(this.wrapper||console.warn("wrapper is not find, creating a html element and call setWrapper(wrapper)",this,e),this.requestAnimationFrameId)return;const s=()=>{this.requestAnimationFrameId=requestAnimationFrame(s),e.visible&&this.render(e,i)};s()}renderCss3dObjectEveryFrame(e,i){if(this.wrapper||console.warn("wrapper is not find, creating a html element and call setWrapper(wrapper)",this,e),this.requestAnimationFrameId)return;const s=()=>{this.requestAnimationFrameId=requestAnimationFrame(s),Array.isArray(e)?e.forEach(o=>{o.visible&&this.render(o,i)}):this.sceneRender(Array.from(e.values()),i)};s()}stopRender(){this.requestAnimationFrameId&&cancelAnimationFrame(this.requestAnimationFrameId)}dispose(){var e;this.stopRender(),(e=this.resizeDisoper)==null||e.call(this),this.domElementWrapper.remove()}}function xi(n){return $(this,null,function*(){return new Promise(t=>{if(W0(n))t();else{const e=i=>{const s=ki(n);i===s&&(n.off("modelLoaded",e),t())};n.on("modelLoaded",e)}})})}function W0(n){var t;return(t=ki(n))==null?void 0:t.loaded}const Ni=document.createElement("div");Ni.classList.add("behindFiveElement");Ni.style.position="absolute";Ni.style.top="0";Ni.style.left="0";Ni.style.width="100%";Ni.style.height="100%";Ni.style.pointerEvents="none";function Wh(n){var i,s,o,r,a;const t=(a=(s=dc(n.getElement()))!=null?s:dc((i=n.getElement())==null?void 0:i.parentElement))!=null?a:dc((r=(o=n.getElement())==null?void 0:o.parentElement)==null?void 0:r.parentElement),e=t==null?void 0:t.parentElement;if(e)return e.contains(Ni)||t.parentElement.insertBefore(Ni,t),Ni;console.error("Can not find a valid element to insert behindFiveElement. How to fix it: https://github.com/realsee-developer/dnalogel/tree/main/plugins/src/CSS3DRenderPlugin/README.md")}function dc(n){var a;if(!n)return;const t=(a=n.style.position)!=null?a:getComputedStyle(n).position;if(t!=="fixed"&&t!=="absolute"&&t!=="relative")return;const e=getComputedStyle(n),i=e.backgroundColor,s=e.backgroundImage;if(!(i!=="transparent"&&i!=="rgba(0, 0, 0, 0)"&&i!==""||s!=="none"&&s!==""))return n}let mr=[null,null,()=>null],zs=new Map,Os=new Map;function Lb(n,t){if(!n)return!1;const e=t||n.uuid;return zs.has(e)?!1:(zs.set(e,n),!0)}function zb(n){if(!n)return!1;if(typeof n=="string")return zs.delete(n);for(const[t,e]of zs.entries())if(e===n)return zs.delete(t);return!1}function Ob(n,t){if(!n)return!1;const e=t||n.uuid;return Os.has(e)?!1:(Os.set(e,n),!0)}function jb(n){if(!n)return!1;if(typeof n=="string")return Os.delete(n);for(const[t,e]of Os.entries())if(e===n)return Os.delete(t);return!1}function Rb(){zs.clear()}function _b(){Os.clear()}function Vb(){Rb(),_b()}function na(n){var s;if(mr){if(mr[0]===n)return mr[2];(s=mr[1])==null||s.dispose()}const t=new el("front");t.domElementWrapper.style.zIndex="1";const e=new el("behind");xi(n).then(()=>{var a;const o=(a=n.getElement())==null?void 0:a.parentElement,r=Wh(n);if(!o)return console.error("initialCSS3DRender: five element is not exist"),()=>null;if(t.appendToElement(o),t.renderCss3dObjectEveryFrame(zs,n.camera),!r)return console.error("initialCSS3DRender: behindWrapper is not exist"),()=>null;e.appendToElement(r),e.renderCss3dObjectEveryFrame(Os,n.camera)});const i=()=>{t.dispose(),e.dispose(),Vb()};return mr=[n,t,i],i}const Fb=16777215,Bb=16777215,Hb=1,Nb=.4,Uh=.6;class bi extends G.Object3D{constructor(){super();f(this,"name","IObject3D");f(this,"needsRender")}removeChildren(){for(;this.children.length>0;)this.remove(this.children[0]);return this}add(...e){const i=e.filter(Boolean);return i.length===0?this:super.add(...i)}addIfNotExists(...e){return e.forEach(i=>{this.children.includes(i)||this.add(i)}),this}remove(...e){if(e.length===0)return this;const i=e.filter(Boolean);return super.remove(...i)}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}}function Et(...n){const t=new G.Vector3;return n.forEach(e=>t.add(e)),t.divideScalar(n.length),t}function Qh(n,t){if(!document.getElementById("LineLengthTagStyle")){const o=document.createElement("style");o.id="LineLengthTagStyle",document.head.appendChild(o),o.innerHTML=`
|
|
107
|
+
`;return function(){var Ce=new Error("get-stack-trace"),je=Ce&&Ce.stack?Ce.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",Qe=t.console&&(t.console.warn||t.console.log);return Qe&&Qe.call(t.console,re,je),N.apply(this,arguments)}}var g;typeof Object.assign!="function"?g=function(Q){if(Q===s||Q===null)throw new TypeError("Cannot convert undefined or null to object");for(var K=Object(Q),re=1;re<arguments.length;re++){var Ce=arguments[re];if(Ce!==s&&Ce!==null)for(var je in Ce)Ce.hasOwnProperty(je)&&(K[je]=Ce[je])}return K}:g=Object.assign;var v=m(function(Q,K,re){for(var Ce=Object.keys(K),je=0;je<Ce.length;)(!re||re&&Q[Ce[je]]===s)&&(Q[Ce[je]]=K[Ce[je]]),je++;return Q},"extend","Use `assign`."),y=m(function(Q,K){return v(Q,K,!0)},"merge","Use `assign`.");function w(N,Q,K){var re=Q.prototype,Ce;Ce=N.prototype=Object.create(re),Ce.constructor=N,Ce._super=re,K&&g(Ce,K)}function C(N,Q){return function(){return N.apply(Q,arguments)}}function E(N,Q){return typeof N==a?N.apply(Q&&Q[0]||s,Q):N}function D(N,Q){return N===s?Q:N}function L(N,Q,K){p(A(Q),function(re){N.addEventListener(re,K,!1)})}function R(N,Q,K){p(A(Q),function(re){N.removeEventListener(re,K,!1)})}function z(N,Q){for(;N;){if(N==Q)return!0;N=N.parentNode}return!1}function O(N,Q){return N.indexOf(Q)>-1}function A(N){return N.trim().split(/\s+/g)}function M(N,Q,K){if(N.indexOf&&!K)return N.indexOf(Q);for(var re=0;re<N.length;){if(K&&N[re][K]==Q||!K&&N[re]===Q)return re;re++}return-1}function I(N){return Array.prototype.slice.call(N,0)}function k(N,Q,K){for(var re=[],Ce=[],je=0;je<N.length;){var Qe=Q?N[je][Q]:N[je];M(Ce,Qe)<0&&re.push(N[je]),Ce[je]=Qe,je++}return K&&(Q?re=re.sort(function(xt,Rt){return xt[Q]>Rt[Q]}):re=re.sort()),re}function x(N,Q){for(var K,re,Ce=Q[0].toUpperCase()+Q.slice(1),je=0;je<o.length;){if(K=o[je],re=K?K+Ce:Q,re in N)return re;je++}return s}var S=1;function j(){return S++}function F(N){var Q=N.ownerDocument||N;return Q.defaultView||Q.parentWindow||t}var J=/mobile|tablet|ip(ad|hone|od)|android/i,ne="ontouchstart"in t,q=x(t,"PointerEvent")!==s,oe=ne&&J.test(navigator.userAgent),se="touch",ae="pen",ze="mouse",ee="kinect",we=25,le=1,he=2,be=4,te=8,ke=1,Re=2,ye=4,De=8,ve=16,Ae=Re|ye,Oe=De|ve,Ye=Ae|Oe,Ze=["x","y"],ot=["clientX","clientY"];function Ke(N,Q){var K=this;this.manager=N,this.callback=Q,this.element=N.element,this.target=N.options.inputTarget,this.domHandler=function(re){E(N.options.enable,[N])&&K.handler(re)},this.init()}Ke.prototype={handler:function(){},init:function(){this.evEl&&L(this.element,this.evEl,this.domHandler),this.evTarget&&L(this.target,this.evTarget,this.domHandler),this.evWin&&L(F(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&R(this.element,this.evEl,this.domHandler),this.evTarget&&R(this.target,this.evTarget,this.domHandler),this.evWin&&R(F(this.element),this.evWin,this.domHandler)}};function et(N){var Q,K=N.options.inputClass;return K?Q=K:q?Q=mn:oe?Q=Wn:ne?Q=vn:Q=Di,new Q(N,lt)}function lt(N,Q,K){var re=K.pointers.length,Ce=K.changedPointers.length,je=Q&le&&re-Ce===0,Qe=Q&(be|te)&&re-Ce===0;K.isFirst=!!je,K.isFinal=!!Qe,je&&(N.session={}),K.eventType=Q,ht(N,K),N.emit("hammer.input",K),N.recognize(K),N.session.prevInput=K}function ht(N,Q){var K=N.session,re=Q.pointers,Ce=re.length;K.firstInput||(K.firstInput=Ut(Q)),Ce>1&&!K.firstMultiple?K.firstMultiple=Ut(Q):Ce===1&&(K.firstMultiple=!1);var je=K.firstInput,Qe=K.firstMultiple,Ct=Qe?Qe.center:je.center,xt=Q.center=li(re);Q.timeStamp=h(),Q.deltaTime=Q.timeStamp-je.timeStamp,Q.angle=Xt(Ct,xt),Q.distance=Qt(Ct,xt),Ft(K,Q),Q.offsetDirection=ut(Q.deltaX,Q.deltaY);var Rt=Ai(Q.deltaTime,Q.deltaX,Q.deltaY);Q.overallVelocityX=Rt.x,Q.overallVelocityY=Rt.y,Q.overallVelocity=c(Rt.x)>c(Rt.y)?Rt.x:Rt.y,Q.scale=Qe?As(Qe.pointers,re):1,Q.rotation=Qe?ir(Qe.pointers,re):0,Q.maxPointers=K.prevInput?Q.pointers.length>K.prevInput.maxPointers?Q.pointers.length:K.prevInput.maxPointers:Q.pointers.length,Zi(K,Q);var ii=N.element;z(Q.srcEvent.target,ii)&&(ii=Q.srcEvent.target),Q.target=ii}function Ft(N,Q){var K=Q.center,re=N.offsetDelta||{},Ce=N.prevDelta||{},je=N.prevInput||{};(Q.eventType===le||je.eventType===be)&&(Ce=N.prevDelta={x:je.deltaX||0,y:je.deltaY||0},re=N.offsetDelta={x:K.x,y:K.y}),Q.deltaX=Ce.x+(K.x-re.x),Q.deltaY=Ce.y+(K.y-re.y)}function Zi(N,Q){var K=N.lastInterval||Q,re=Q.timeStamp-K.timeStamp,Ce,je,Qe,Ct;if(Q.eventType!=te&&(re>we||K.velocity===s)){var xt=Q.deltaX-K.deltaX,Rt=Q.deltaY-K.deltaY,ii=Ai(re,xt,Rt);je=ii.x,Qe=ii.y,Ce=c(ii.x)>c(ii.y)?ii.x:ii.y,Ct=ut(xt,Rt),N.lastInterval=Q}else Ce=K.velocity,je=K.velocityX,Qe=K.velocityY,Ct=K.direction;Q.velocity=Ce,Q.velocityX=je,Q.velocityY=Qe,Q.direction=Ct}function Ut(N){for(var Q=[],K=0;K<N.pointers.length;)Q[K]={clientX:l(N.pointers[K].clientX),clientY:l(N.pointers[K].clientY)},K++;return{timeStamp:h(),pointers:Q,center:li(Q),deltaX:N.deltaX,deltaY:N.deltaY}}function li(N){var Q=N.length;if(Q===1)return{x:l(N[0].clientX),y:l(N[0].clientY)};for(var K=0,re=0,Ce=0;Ce<Q;)K+=N[Ce].clientX,re+=N[Ce].clientY,Ce++;return{x:l(K/Q),y:l(re/Q)}}function Ai(N,Q,K){return{x:Q/N||0,y:K/N||0}}function ut(N,Q){return N===Q?ke:c(N)>=c(Q)?N<0?Re:ye:Q<0?De:ve}function Qt(N,Q,K){K||(K=Ze);var re=Q[K[0]]-N[K[0]],Ce=Q[K[1]]-N[K[1]];return Math.sqrt(re*re+Ce*Ce)}function Xt(N,Q,K){K||(K=Ze);var re=Q[K[0]]-N[K[0]],Ce=Q[K[1]]-N[K[1]];return Math.atan2(Ce,re)*180/Math.PI}function ir(N,Q){return Xt(Q[1],Q[0],ot)+Xt(N[1],N[0],ot)}function As(N,Q){return Qt(Q[0],Q[1],ot)/Qt(N[0],N[1],ot)}var Fn={mousedown:le,mousemove:he,mouseup:be},io="mousedown",Bn="mousemove mouseup";function Di(){this.evEl=io,this.evWin=Bn,this.pressed=!1,Ke.apply(this,arguments)}w(Di,Ke,{handler:function(Q){var K=Fn[Q.type];K&le&&Q.button===0&&(this.pressed=!0),K&he&&Q.which!==1&&(K=be),this.pressed&&(K&be&&(this.pressed=!1),this.callback(this.manager,K,{pointers:[Q],changedPointers:[Q],pointerType:ze,srcEvent:Q}))}});var wi={pointerdown:le,pointermove:he,pointerup:be,pointercancel:te,pointerout:te},Hn={2:se,3:ae,4:ze,5:ee},Nn="pointerdown",qi="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(Nn="MSPointerDown",qi="MSPointerMove MSPointerUp MSPointerCancel");function mn(){this.evEl=Nn,this.evWin=qi,Ke.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}w(mn,Ke,{handler:function(Q){var K=this.store,re=!1,Ce=Q.type.toLowerCase().replace("ms",""),je=wi[Ce],Qe=Hn[Q.pointerType]||Q.pointerType,Ct=Qe==se,xt=M(K,Q.pointerId,"pointerId");je&le&&(Q.button===0||Ct)?xt<0&&(K.push(Q),xt=K.length-1):je&(be|te)&&(re=!0),!(xt<0)&&(K[xt]=Q,this.callback(this.manager,je,{pointers:K,changedPointers:[Q],pointerType:Qe,srcEvent:Q}),re&&K.splice(xt,1))}});var gn={touchstart:le,touchmove:he,touchend:be,touchcancel:te},ws="touchstart",Ps="touchstart touchmove touchend touchcancel";function Gn(){this.evTarget=ws,this.evWin=Ps,this.started=!1,Ke.apply(this,arguments)}w(Gn,Ke,{handler:function(Q){var K=gn[Q.type];if(K===le&&(this.started=!0),!!this.started){var re=Ji.call(this,Q,K);K&(be|te)&&re[0].length-re[1].length===0&&(this.started=!1),this.callback(this.manager,K,{pointers:re[0],changedPointers:re[1],pointerType:se,srcEvent:Q})}}});function Ji(N,Q){var K=I(N.touches),re=I(N.changedTouches);return Q&(be|te)&&(K=k(K.concat(re),"identifier",!0)),[K,re]}var no={touchstart:le,touchmove:he,touchend:be,touchcancel:te},Vi="touchstart touchmove touchend touchcancel";function Wn(){this.evTarget=Vi,this.targetIds={},Ke.apply(this,arguments)}w(Wn,Ke,{handler:function(Q){var K=no[Q.type],re=nr.call(this,Q,K);re&&this.callback(this.manager,K,{pointers:re[0],changedPointers:re[1],pointerType:se,srcEvent:Q})}});function nr(N,Q){var K=I(N.touches),re=this.targetIds;if(Q&(le|he)&&K.length===1)return re[K[0].identifier]=!0,[K,K];var Ce,je,Qe=I(N.changedTouches),Ct=[],xt=this.target;if(je=K.filter(function(Rt){return z(Rt.target,xt)}),Q===le)for(Ce=0;Ce<je.length;)re[je[Ce].identifier]=!0,Ce++;for(Ce=0;Ce<Qe.length;)re[Qe[Ce].identifier]&&Ct.push(Qe[Ce]),Q&(be|te)&&delete re[Qe[Ce].identifier],Ce++;if(Ct.length)return[k(je.concat(Ct),"identifier",!0),Ct]}var sr=2500,Cs=25;function vn(){Ke.apply(this,arguments);var N=C(this.handler,this);this.touch=new Wn(this.manager,N),this.mouse=new Di(this.manager,N),this.primaryTouch=null,this.lastTouches=[]}w(vn,Ke,{handler:function(Q,K,re){var Ce=re.pointerType==se,je=re.pointerType==ze;if(!(je&&re.sourceCapabilities&&re.sourceCapabilities.firesTouchEvents)){if(Ce)Ot.call(this,K,re);else if(je&&or.call(this,re))return;this.callback(Q,K,re)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function Ot(N,Q){N&le?(this.primaryTouch=Q.changedPointers[0].identifier,so.call(this,Q)):N&(be|te)&&so.call(this,Q)}function so(N){var Q=N.changedPointers[0];if(Q.identifier===this.primaryTouch){var K={x:Q.clientX,y:Q.clientY};this.lastTouches.push(K);var re=this.lastTouches,Ce=function(){var je=re.indexOf(K);je>-1&&re.splice(je,1)};setTimeout(Ce,sr)}}function or(N){for(var Q=N.srcEvent.clientX,K=N.srcEvent.clientY,re=0;re<this.lastTouches.length;re++){var Ce=this.lastTouches[re],je=Math.abs(Q-Ce.x),Qe=Math.abs(K-Ce.y);if(je<=Cs&&Qe<=Cs)return!0}return!1}var oo=x(r.style,"touchAction"),ro=oo!==s,ao="compute",jt="auto",Ms="manipulation",Fi="none",yn="pan-x",bn="pan-y",Un=ar();function Bt(N,Q){this.manager=N,this.set(Q)}Bt.prototype={set:function(N){N==ao&&(N=this.compute()),ro&&this.manager.element.style&&Un[N]&&(this.manager.element.style[oo]=N),this.actions=N.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var N=[];return p(this.manager.recognizers,function(Q){E(Q.options.enable,[Q])&&(N=N.concat(Q.getTouchAction()))}),rr(N.join(" "))},preventDefaults:function(N){var Q=N.srcEvent,K=N.offsetDirection;if(this.manager.session.prevented){Q.preventDefault();return}var re=this.actions,Ce=O(re,Fi)&&!Un[Fi],je=O(re,bn)&&!Un[bn],Qe=O(re,yn)&&!Un[yn];if(Ce){var Ct=N.pointers.length===1,xt=N.distance<2,Rt=N.deltaTime<250;if(Ct&&xt&&Rt)return}if(!(Qe&&je)&&(Ce||je&&K&Ae||Qe&&K&Oe))return this.preventSrc(Q)},preventSrc:function(N){this.manager.session.prevented=!0,N.preventDefault()}};function rr(N){if(O(N,Fi))return Fi;var Q=O(N,yn),K=O(N,bn);return Q&&K?Fi:Q||K?Q?yn:bn:O(N,Ms)?Ms:jt}function ar(){if(!ro)return!1;var N={},Q=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(K){N[K]=Q?t.CSS.supports("touch-action",K):!0}),N}var Qn=1,Yt=2,Ki=4,$t=8,ci=$t,Li=16,kt=32;function ei(N){this.options=g({},this.defaults,N||{}),this.id=j(),this.manager=null,this.options.enable=D(this.options.enable,!0),this.state=Qn,this.simultaneous={},this.requireFail=[]}ei.prototype={defaults:{},set:function(N){return g(this.options,N),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(N){if(d(N,"recognizeWith",this))return this;var Q=this.simultaneous;return N=Xn(N,this),Q[N.id]||(Q[N.id]=N,N.recognizeWith(this)),this},dropRecognizeWith:function(N){return d(N,"dropRecognizeWith",this)?this:(N=Xn(N,this),delete this.simultaneous[N.id],this)},requireFailure:function(N){if(d(N,"requireFailure",this))return this;var Q=this.requireFail;return N=Xn(N,this),M(Q,N)===-1&&(Q.push(N),N.requireFailure(this)),this},dropRequireFailure:function(N){if(d(N,"dropRequireFailure",this))return this;N=Xn(N,this);var Q=M(this.requireFail,N);return Q>-1&&this.requireFail.splice(Q,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(N){return!!this.simultaneous[N.id]},emit:function(N){var Q=this,K=this.state;function re(Ce){Q.manager.emit(Ce,N)}K<$t&&re(Q.options.event+lo(K)),re(Q.options.event),N.additionalEvent&&re(N.additionalEvent),K>=$t&&re(Q.options.event+lo(K))},tryEmit:function(N){if(this.canEmit())return this.emit(N);this.state=kt},canEmit:function(){for(var N=0;N<this.requireFail.length;){if(!(this.requireFail[N].state&(kt|Qn)))return!1;N++}return!0},recognize:function(N){var Q=g({},N);if(!E(this.options.enable,[this,Q])){this.reset(),this.state=kt;return}this.state&(ci|Li|kt)&&(this.state=Qn),this.state=this.process(Q),this.state&(Yt|Ki|$t|Li)&&this.tryEmit(Q)},process:function(N){},getTouchAction:function(){},reset:function(){}};function lo(N){return N&Li?"cancel":N&$t?"end":N&Ki?"move":N&Yt?"start":""}function co(N){return N==ve?"down":N==De?"up":N==Re?"left":N==ye?"right":""}function Xn(N,Q){var K=Q.manager;return K?K.get(N):N}function ti(){ei.apply(this,arguments)}w(ti,ei,{defaults:{pointers:1},attrTest:function(N){var Q=this.options.pointers;return Q===0||N.pointers.length===Q},process:function(N){var Q=this.state,K=N.eventType,re=Q&(Yt|Ki),Ce=this.attrTest(N);return re&&(K&te||!Ce)?Q|Li:re||Ce?K&be?Q|$t:Q&Yt?Q|Ki:Yt:kt}});function Yn(){ti.apply(this,arguments),this.pX=null,this.pY=null}w(Yn,ti,{defaults:{event:"pan",threshold:10,pointers:1,direction:Ye},getTouchAction:function(){var N=this.options.direction,Q=[];return N&Ae&&Q.push(bn),N&Oe&&Q.push(yn),Q},directionTest:function(N){var Q=this.options,K=!0,re=N.distance,Ce=N.direction,je=N.deltaX,Qe=N.deltaY;return Ce&Q.direction||(Q.direction&Ae?(Ce=je===0?ke:je<0?Re:ye,K=je!=this.pX,re=Math.abs(N.deltaX)):(Ce=Qe===0?ke:Qe<0?De:ve,K=Qe!=this.pY,re=Math.abs(N.deltaY))),N.direction=Ce,K&&re>Q.threshold&&Ce&Q.direction},attrTest:function(N){return ti.prototype.attrTest.call(this,N)&&(this.state&Yt||!(this.state&Yt)&&this.directionTest(N))},emit:function(N){this.pX=N.deltaX,this.pY=N.deltaY;var Q=co(N.direction);Q&&(N.additionalEvent=this.options.event+Q),this._super.emit.call(this,N)}});function $i(){ti.apply(this,arguments)}w($i,ti,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Fi]},attrTest:function(N){return this._super.attrTest.call(this,N)&&(Math.abs(N.scale-1)>this.options.threshold||this.state&Yt)},emit:function(N){if(N.scale!==1){var Q=N.scale<1?"in":"out";N.additionalEvent=this.options.event+Q}this._super.emit.call(this,N)}});function An(){ei.apply(this,arguments),this._timer=null,this._input=null}w(An,ei,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[jt]},process:function(N){var Q=this.options,K=N.pointers.length===Q.pointers,re=N.distance<Q.threshold,Ce=N.deltaTime>Q.time;if(this._input=N,!re||!K||N.eventType&(be|te)&&!Ce)this.reset();else if(N.eventType&le)this.reset(),this._timer=u(function(){this.state=ci,this.tryEmit()},Q.time,this);else if(N.eventType&be)return ci;return kt},reset:function(){clearTimeout(this._timer)},emit:function(N){this.state===ci&&(N&&N.eventType&be?this.manager.emit(this.options.event+"up",N):(this._input.timeStamp=h(),this.manager.emit(this.options.event,this._input)))}});function Bi(){ti.apply(this,arguments)}w(Bi,ti,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Fi]},attrTest:function(N){return this._super.attrTest.call(this,N)&&(Math.abs(N.rotation)>this.options.threshold||this.state&Yt)}});function Zn(){ti.apply(this,arguments)}w(Zn,ti,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ae|Oe,pointers:1},getTouchAction:function(){return Yn.prototype.getTouchAction.call(this)},attrTest:function(N){var Q=this.options.direction,K;return Q&(Ae|Oe)?K=N.overallVelocity:Q&Ae?K=N.overallVelocityX:Q&Oe&&(K=N.overallVelocityY),this._super.attrTest.call(this,N)&&Q&N.offsetDirection&&N.distance>this.options.threshold&&N.maxPointers==this.options.pointers&&c(K)>this.options.velocity&&N.eventType&be},emit:function(N){var Q=co(N.offsetDirection);Q&&this.manager.emit(this.options.event+Q,N),this.manager.emit(this.options.event,N)}});function wn(){ei.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}w(wn,ei,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Ms]},process:function(N){var Q=this.options,K=N.pointers.length===Q.pointers,re=N.distance<Q.threshold,Ce=N.deltaTime<Q.time;if(this.reset(),N.eventType&le&&this.count===0)return this.failTimeout();if(re&&Ce&&K){if(N.eventType!=be)return this.failTimeout();var je=this.pTime?N.timeStamp-this.pTime<Q.interval:!0,Qe=!this.pCenter||Qt(this.pCenter,N.center)<Q.posThreshold;this.pTime=N.timeStamp,this.pCenter=N.center,!Qe||!je?this.count=1:this.count+=1,this._input=N;var Ct=this.count%Q.taps;if(Ct===0)return this.hasRequireFailures()?(this._timer=u(function(){this.state=ci,this.tryEmit()},Q.interval,this),Yt):ci}return kt},failTimeout:function(){return this._timer=u(function(){this.state=kt},this.options.interval,this),kt},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ci&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Pi(N,Q){return Q=Q||{},Q.recognizers=D(Q.recognizers,Pi.defaults.preset),new Is(N,Q)}Pi.VERSION="2.0.7",Pi.defaults={domEvents:!1,touchAction:ao,enable:!0,inputTarget:null,inputClass:null,preset:[[Bi,{enable:!1}],[$i,{enable:!1},["rotate"]],[Zn,{direction:Ae}],[Yn,{direction:Ae},["swipe"]],[wn],[wn,{event:"doubletap",taps:2},["tap"]],[An]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var lr=1,ho=2;function Is(N,Q){this.options=g({},Pi.defaults,Q||{}),this.options.inputTarget=this.options.inputTarget||N,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=N,this.input=et(this),this.touchAction=new Bt(this,this.options.touchAction),qn(this,!0),p(this.options.recognizers,function(K){var re=this.add(new K[0](K[1]));K[2]&&re.recognizeWith(K[2]),K[3]&&re.requireFailure(K[3])},this)}Is.prototype={set:function(N){return g(this.options,N),N.touchAction&&this.touchAction.update(),N.inputTarget&&(this.input.destroy(),this.input.target=N.inputTarget,this.input.init()),this},stop:function(N){this.session.stopped=N?ho:lr},recognize:function(N){var Q=this.session;if(!Q.stopped){this.touchAction.preventDefaults(N);var K,re=this.recognizers,Ce=Q.curRecognizer;(!Ce||Ce&&Ce.state&ci)&&(Ce=Q.curRecognizer=null);for(var je=0;je<re.length;)K=re[je],Q.stopped!==ho&&(!Ce||K==Ce||K.canRecognizeWith(Ce))?K.recognize(N):K.reset(),!Ce&&K.state&(Yt|Ki|$t)&&(Ce=Q.curRecognizer=K),je++}},get:function(N){if(N instanceof ei)return N;for(var Q=this.recognizers,K=0;K<Q.length;K++)if(Q[K].options.event==N)return Q[K];return null},add:function(N){if(d(N,"add",this))return this;var Q=this.get(N.options.event);return Q&&this.remove(Q),this.recognizers.push(N),N.manager=this,this.touchAction.update(),N},remove:function(N){if(d(N,"remove",this))return this;if(N=this.get(N),N){var Q=this.recognizers,K=M(Q,N);K!==-1&&(Q.splice(K,1),this.touchAction.update())}return this},on:function(N,Q){if(N!==s&&Q!==s){var K=this.handlers;return p(A(N),function(re){K[re]=K[re]||[],K[re].push(Q)}),this}},off:function(N,Q){if(N!==s){var K=this.handlers;return p(A(N),function(re){Q?K[re]&&K[re].splice(M(K[re],Q),1):delete K[re]}),this}},emit:function(N,Q){this.options.domEvents&&cr(N,Q);var K=this.handlers[N]&&this.handlers[N].slice();if(!(!K||!K.length)){Q.type=N,Q.preventDefault=function(){Q.srcEvent.preventDefault()};for(var re=0;re<K.length;)K[re](Q),re++}},destroy:function(){this.element&&qn(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function qn(N,Q){var K=N.element;if(K.style){var re;p(N.options.cssProps,function(Ce,je){re=x(K.style,je),Q?(N.oldCssProps[re]=K.style[re],K.style[re]=Ce):K.style[re]=N.oldCssProps[re]||""}),Q||(N.oldCssProps={})}}function cr(N,Q){var K=e.createEvent("Event");K.initEvent(N,!0,!0),K.gesture=Q,Q.target.dispatchEvent(K)}g(Pi,{INPUT_START:le,INPUT_MOVE:he,INPUT_END:be,INPUT_CANCEL:te,STATE_POSSIBLE:Qn,STATE_BEGAN:Yt,STATE_CHANGED:Ki,STATE_ENDED:$t,STATE_RECOGNIZED:ci,STATE_CANCELLED:Li,STATE_FAILED:kt,DIRECTION_NONE:ke,DIRECTION_LEFT:Re,DIRECTION_RIGHT:ye,DIRECTION_UP:De,DIRECTION_DOWN:ve,DIRECTION_HORIZONTAL:Ae,DIRECTION_VERTICAL:Oe,DIRECTION_ALL:Ye,Manager:Is,Input:Ke,TouchAction:Bt,TouchInput:Wn,MouseInput:Di,PointerEventInput:mn,TouchMouseInput:vn,SingleTouchInput:Gn,Recognizer:ei,AttrRecognizer:ti,Tap:wn,Pan:Yn,Swipe:Zn,Pinch:$i,Rotate:Bi,Press:An,on:L,off:R,each:p,merge:y,extend:v,assign:g,inherit:w,bindFn:C,prefixed:x});var hr=typeof t!="undefined"?t:typeof self!="undefined"?self:{};hr.Hammer=Pi,typeof s=="function"&&s.amd?s(function(){return Pi}):n.exports?n.exports=Pi:t[i]=Pi})(window,document,"Hammer")})(kb);class Dl{constructor(t,e){f(this,"width");f(this,"height");f(this,"containerDom");f(this,"hooks",new St);f(this,"canvas",document.createElement("canvas"));f(this,"config");f(this,"state",{enabled:!1});f(this,"five");f(this,"scale");f(this,"offset",{x:0,y:0});f(this,"context");f(this,"renderCenter",new b.Vector3);f(this,"hammer");f(this,"offsetRange");f(this,"isPanning",!1);f(this,"imageData",new ImageData(1,1));f(this,"onPanstart",()=>{this.isPanning=!0,this.canvas.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)"});f(this,"onPan",t=>{if(!this.isPanning||!this.offsetRange||this.hooks.emit("wantsPanGesture",t))return;const{translateX:i,translateY:s}=this.getPanOffset(t,this.offsetRange);this.canvas.style.transform=`translate3d(${i}px, ${s}px, 100px)`});f(this,"onPanend",t=>{if(this.isPanning=!1,this.canvas.style.boxShadow="none",!this.offsetRange)return;const{translateX:e,translateY:i}=this.getPanOffset(t,this.offsetRange);this.canvas.style.transform=`translate3d(${e}px, ${i}px, 100px)`,this.offset={x:e,y:i}});var s,o,r,a;if(!t.renderer){console.error("Five Render 未初始化");return}this.five=t,this.scale=(s=e==null?void 0:e.scale)!=null?s:2,this.width=(o=e==null?void 0:e.width)!=null?o:190,this.height=(a=(r=e==null?void 0:e.height)!=null?r:e==null?void 0:e.width)!=null?a:190,this.config={dragEnabled:(e==null?void 0:e.dragEnabled)||!1,autoFixPCPosition:(e==null?void 0:e.autoFixPCPosition)||!1,initialPosition:(e==null?void 0:e.initialPosition)||{left:"0",top:"0"},skipPanorama:(e==null?void 0:e.skipPanorama)||!1};const i=this.canvas.getContext("2d");if(!i)throw new Error("CANNOT CREATE CONTEXT2D");this.context=i,this.config.dragEnabled&&(this.hammer=new _r(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panstart",this.onPanstart),this.hammer.on("panend",this.onPanend)),this.initStyle()}enable(){if(!this.state.enabled)return this.state.enabled=!0,this.containerDom&&this._appendTo(this.containerDom),this}disable(){if(this.state.enabled)return this.state.enabled=!1,this.canvas.style.visibility="hidden",this.canvas.remove(),this}dispose(){var t;this.clear(),this.disable(),(t=this.hammer)==null||t.destroy()}appendTo(t){var e;return this.containerDom&&((e=this.containerDom)==null||e.removeChild(this.canvas)),this.containerDom=t,this.state.enabled&&this._appendTo(t),this}clear(){var t;return(t=this.context)==null||t.clearRect(0,0,this.canvas.width,this.canvas.height),this}renderWithPoint(t){this.containerDom&&this.state.enabled&&(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}renderWithScreenPoint(t){this.containerDom&&this.state.enabled&&(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}resetOffset(){this.offset={x:0,y:0},this.canvas.style.transform="translate3d(0px, 0px, 100px)"}updateScale(t){t>0&&(this.scale=t)}updateSize(t,e){if(t>0){this.width=t,this.height=e||t;const i=1;this.canvas.setAttribute("width",(this.width*i).toString()),this.canvas.setAttribute("height",(this.height*i).toString()),this.canvas.style.width=this.width+"px",this.canvas.style.height=this.height+"px";const s=Math.floor(this.width*i),o=Math.floor(this.height*i);this.imageData=new ImageData(s,o),this.clear()}}render(){if(!this.five.renderer||!this.containerDom)return;const{scale:t,context:e,width:i,height:s}=this,o=this.five.renderer.getSize(new b.Vector2),[r,a]=(()=>{if(this.renderCenter.isVector3){const p=this.renderCenter.clone().project(this.five.camera);return[(p.x+1)/2*o.x,(p.y+1)/2*o.y]}else return[this.renderCenter.x,o.y-this.renderCenter.y]})(),l=1,c=i/t,h=s/t,u=l*t,d=new Map;this.five.scene.traverse(p=>{p.disableGetPixel===!0&&(d.set(p,p.visible),p.visible=!1)});try{const p=this.five.getPixels({x:r-c/2,y:a-c/2,width:c,height:h,pixelRatio:u,skipPanorama:this.config.skipPanorama});d.forEach((y,w)=>{w.visible=y});const m=Math.floor(i*l),g=Math.floor(s*l),v=m*g*4;if(!p||p.length!==v){console.warn("Magnifier: Invalid pixel data",{pixelsLength:p==null?void 0:p.length,expectedLength:v,imageWidth:m,imageHeight:g});return}xb(p,m,g),(this.imageData.width!==m||this.imageData.height!==g)&&(this.imageData=new ImageData(m,g)),this.imageData.data.length!==p.length&&(console.warn("Magnifier: ImageData size mismatch",{imageDataLength:this.imageData.data.length,pixelsLength:p.length,imageWidth:m,imageHeight:g}),this.imageData=new ImageData(m,g));try{this.imageData.data.set(p)}catch(y){console.error("Magnifier: Failed to set pixel data",{error:y,imageDataLength:this.imageData.data.length,pixelsLength:p.length,imageWidth:m,imageHeight:g});return}e.putImageData(this.imageData,0,0),this.canvas.style.visibility="visible"}catch(p){console.error("Magnifier render error:",p),d.forEach((m,g)=>{g.visible=m})}}getRenderCenter(){return this.renderCenter}_appendTo(t){if(this.resetOffset(),t.appendChild(this.canvas),!this.offsetRange){const e=this.canvas.getBoundingClientRect(),i=t.getBoundingClientRect(),s=i.right-e.right,o=i.bottom-e.bottom,r=i.left-e.left,a=i.top-e.top;this.offsetRange={min:{x:r,y:a},max:{x:s,y:o}}}}autoFixPCPosition(){if(!this.containerDom)return;const{width:t,height:e}=this,{clientWidth:i,clientHeight:s}=this.containerDom,[o,r,a]=(()=>{if(this.renderCenter.isVector3){const l=this.renderCenter.clone().project(this.five.camera);return[(l.x+1)/2*i,-(l.x-1)/2*i,-(l.y-1)/2*s]}else return[this.renderCenter.x,i-this.renderCenter.x,this.renderCenter.y]})();o<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left="90px"):a<183?(this.canvas.style.top="90px",this.canvas.style.left=-t/2+"px"):r<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=-t-90+"px"):(this.canvas.style.left=-t/2+"px",this.canvas.style.top=-e-90+"px"),this.canvas.style.transform=`translate3d(${o}px, ${a}px, 10px)`,this.offset={x:o,y:a}}initStyle(){const t=this.canvas;t.classList.add("five-plugin__magnifier"),t.style.position="absolute",t.style.pointerEvents=this.config.dragEnabled?"all":"none",t.style.borderRadius="50%",t.style.zIndex="99";const e=1;t.setAttribute("width",(this.width*e).toString()),t.setAttribute("height",(this.height*e).toString()),t.style.border="2px solid rgba(255,255,255,0.20)",t.style.width=this.width+"px",t.style.height=this.height+"px",t.style.top=this.config.initialPosition.top,t.style.left=this.config.initialPosition.left,t.style.transform="translate(0,0,100px)",t.style.visibility="hidden",this.config.dragEnabled&&(this.canvas.style.cursor="pointer")}getPanOffset(t,e){const{min:{x:i,y:s},max:{x:o,y:r}}=e,a=this.offset.x+t.deltaX,l=this.offset.y+t.deltaY,c=Math.min(Math.max(a,i),o),h=Math.min(Math.max(l,s),r);return{translateX:c,translateY:h}}}function xa(n,t,e){if(!n||t<0||e<0||t>=n.length||e>=n.length){console.warn("exchange: Index out of bounds",{arrayLength:n==null?void 0:n.length,index1:t,index2:e});return}const i=n[t],s=n[e];n[t]=s,n[e]=i}function xb(n,t,e){if(!n||t<=0||e<=0){console.warn("flipPixelsY: Invalid parameters",{pixelsLength:n==null?void 0:n.length,width:t,height:e});return}const i=t*e*4;if(n.length<i){console.warn("flipPixelsY: Pixel array too small",{actualLength:n.length,expectedLength:i,width:t,height:e});return}const s=e/2;for(let o=1;o<=s;o++){const r=e-(o-1);for(let a=1;a<=t;a++){const l=(o-1)*t+a-1,c=(r-1)*t+a-1,h=l*4,u=c*4;h+3<n.length&&u+3<n.length&&(xa(n,h+0,u+0),xa(n,h+1,u+1),xa(n,h+2,u+2),xa(n,h+3,u+3))}}}function Sb(n,t){const{offsetWidth:e,offsetHeight:i}=t,{top:s,left:o}=t.getBoundingClientRect();return new b.Vector2().set((n.x-o)/e*2-1,-(n.y-s)/i*2+1)}function G0(n,t){const{offsetWidth:e,offsetHeight:i}=t;return new b.Vector2().set(n.x/e*2-1,-n.y/i*2+1)}var jn=function(n){G.Object3D.call(this),this.element=n,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.addEventListener("removed",function(){this.traverse(function(t){t.element instanceof Element&&t.element.parentNode!==null&&t.element.remove()})})};jn.prototype=Object.create(G.Object3D.prototype);jn.prototype.constructor=jn;var $a=function(n){jn.call(this,n)};$a.prototype=Object.create(jn.prototype);$a.prototype.constructor=$a;let Tb=function(n){let t=this,e,i,s,o,r=new G.Matrix4,a={camera:{fov:0,style:""},objects:new Map},l=document.createElement("div");l.style.overflow="hidden",this.domElement=l;let c=document.createElement("div");c.style.WebkitTransformStyle="preserve-3d",c.style.transformStyle="preserve-3d",c.style.pointerEvents="none",l.appendChild(c),this.getSize=function(){return{width:e,height:i}},this.setSize=function(g,v){e=g,i=v,s=e/2,o=i/2,l.style.width=g+"px",l.style.height=v+"px",c.style.width=g+"px",c.style.height=v+"px"};function h(g){return Math.abs(g)<1e-10?0:g}function u(g){let v=g.elements;return"matrix3d("+h(v[0])+","+h(-v[1])+","+h(v[2])+","+h(v[3])+","+h(v[4])+","+h(-v[5])+","+h(v[6])+","+h(v[7])+","+h(v[8])+","+h(-v[9])+","+h(v[10])+","+h(v[11])+","+h(v[12])+","+h(-v[13])+","+h(v[14])+","+h(v[15])+")"}function d(g,v){let y=g.elements;return"translate(-50%,-50%)"+("matrix3d("+h(y[0])+","+h(y[1])+","+h(y[2])+","+h(y[3])+","+h(-y[4])+","+h(-y[5])+","+h(-y[6])+","+h(-y[7])+","+h(y[8])+","+h(y[9])+","+h(y[10])+","+h(y[11])+","+h(y[12])+","+h(y[13])+","+h(y[14])+","+h(y[15])+")")}function p(g){var v;if(g.isCSS3DObject){const y=(v=g.mode)!=null?v:"front";(!n||y===n)&&(g.element.style.display="none")}for(let y=0,w=g.children.length;y<w;y++)p(g.children[y])}function m(g,v,y,w,C){var E;if(g.visible===!1){p(g);return}if(g.isCSS3DObject){const D=(E=g.mode)!=null?E:"front";if(n&&D!==n)return;g.flag=C;const L=g.layers.test(y.layers)===!0,R=g.element;if(R.style.display=L===!0?"":"none",L){g.onBeforeRender(t,v,y);let z;g.isCSS3DSprite?(r.copy(y.matrixWorldInverse),r.transpose(),r.copyPosition(g.matrixWorld),r.scale(g.scale),r.elements[3]=0,r.elements[7]=0,r.elements[11]=0,r.elements[15]=1,z=d(r)):z=d(g.matrixWorld);let O=a.objects.get(g);if(O===void 0||O.style!==z){R.style.WebkitTransform=z,R.style.transform=z;let A={style:z};a.objects.set(g,A)}R.style.display=g.visible?"":"none",R.parentNode!==c&&c.appendChild(R),g.onAfterRender(t,v,y)}}for(let D=0,L=g.children.length;D<L;D++)m(g.children[D],v,y,w,C)}this.render=function(g,v){let y=v.projectionMatrix.elements[5]*o;if(a.camera.fov!==y&&(v.isPerspectiveCamera?(l.style.WebkitPerspective=y+"px",l.style.perspective=y+"px"):(l.style.WebkitPerspective="",l.style.perspective=""),a.camera.fov=y),g.autoUpdate===!0&&g.updateMatrixWorld(),v.parent===null&&v.updateMatrixWorld(),v.isOrthographicCamera)var w=-(v.right+v.left)/2,C=(v.top+v.bottom)/2;let E=v.isOrthographicCamera?"scale("+y+")translate("+h(w)+"px,"+h(C)+"px)"+u(v.matrixWorldInverse):"translateZ("+y+"px)"+u(v.matrixWorldInverse),D=E+"translate("+s+"px,"+o+"px)";a.camera.style!==D&&(c.style.WebkitTransform=D,c.style.transform=D,a.camera.style=D);const L=g.uuid+"_"+performance.now().toString();m(g,g,v,E,L),a.objects.forEach(function(R,z){z.flag!==L&&(z.element.remove(),a.objects.delete(z))})},this.sceneRender=function(g,v){let y=v.projectionMatrix.elements[5]*o;if(a.camera.fov!==y&&(v.isPerspectiveCamera?(l.style.WebkitPerspective=y+"px",l.style.perspective=y+"px"):(l.style.WebkitPerspective="",l.style.perspective=""),a.camera.fov=y),v.parent===null&&v.updateMatrixWorld(),v.isOrthographicCamera)var w=-(v.right+v.left)/2,C=(v.top+v.bottom)/2;let E=v.isOrthographicCamera?"scale("+y+")translate("+h(w)+"px,"+h(C)+"px)"+u(v.matrixWorldInverse):"translateZ("+y+"px)"+u(v.matrixWorldInverse),D=E+"translate("+s+"px,"+o+"px)";a.camera.style!==D&&(c.style.WebkitTransform=D,c.style.transform=D,a.camera.style=D);const L=performance.now().toString();g.forEach(R=>{R.autoUpdate===!0&&R.updateMatrixWorld(),m(R,R,v,E,L)}),a.objects.forEach(function(R,z){z.flag!==L&&(z.element.remove(),a.objects.delete(z))})}};function Oo(n,t){const e=Math.round(n);return e%2===0?e:e+(t!=null&&t.floor?-1:1)}function Db(n,t,e=!0){if(!n)return console.error("createResizeObserver: element is undefined"),{observe:()=>{},unobserve:()=>{}};const i=()=>{const o=Oo(n.clientWidth,{floor:!0}),r=Oo(n.clientHeight,{floor:!0});t(o,r)};if(typeof ResizeObserver=="undefined"||!ResizeObserver)return console.warn("createResizeObserver: ResizeObserver is undefined"),{observe:()=>i(),unobserve:()=>{}};const s=new ResizeObserver(i);return e&&i(),{observe:()=>s.observe(n),unobserve:()=>s.unobserve(n)}}class el extends Tb{constructor(e){super(e);f(this,"wrapper");f(this,"domElementWrapper",document.createElement("div"));f(this,"requestAnimationFrameId");f(this,"resizeDisoper");this.domElementWrapper.classList.add("ICSS3DRendererWrapper"),this.domElementWrapper.style.position="absolute",this.domElementWrapper.style.top="0",this.domElementWrapper.style.left="0",this.domElementWrapper.style.width="100%",this.domElementWrapper.style.height="100%",this.domElementWrapper.style.userSelect="none",this.domElementWrapper.style.pointerEvents="none",this.domElement.classList.add("ICSS3DRenderer"),this.domElement.style.position="absolute",this.domElement.style.top="0",this.domElement.style.left="0",this.domElement.style.userSelect="none",this.domElement.style.pointerEvents="none",this.domElementWrapper.appendChild(this.domElement)}setWrapper(e){if(!e)throw new Error("CSS3DRenderer: wrapper is required");if((()=>{for(let o=0;o<e.children.length;o++)if(e.children.item(o)===this.domElementWrapper)return!0;return!1})())return;const s=this.wrapper;return s&&s.contains(this.domElementWrapper)&&this.domElementWrapper.remove(),this.appendToElement(e),this.wrapper=e,this}appendToElement(e){e.appendChild(this.domElementWrapper);const i=(r,a)=>this.setSize(r,a),{observe:s,unobserve:o}=Db(this.domElementWrapper,i,!0);s(),this.resizeDisoper=o,this.wrapper=e}renderEveryFrame(e,i){if(this.wrapper||console.warn("wrapper is not find, creating a html element and call setWrapper(wrapper)",this,e),this.requestAnimationFrameId)return;const s=()=>{this.requestAnimationFrameId=requestAnimationFrame(s),e.visible&&this.render(e,i)};s()}renderCss3dObjectEveryFrame(e,i){if(this.wrapper||console.warn("wrapper is not find, creating a html element and call setWrapper(wrapper)",this,e),this.requestAnimationFrameId)return;const s=()=>{this.requestAnimationFrameId=requestAnimationFrame(s),Array.isArray(e)?e.forEach(o=>{o.visible&&this.render(o,i)}):this.sceneRender(Array.from(e.values()),i)};s()}stopRender(){this.requestAnimationFrameId&&cancelAnimationFrame(this.requestAnimationFrameId)}dispose(){var e;this.stopRender(),(e=this.resizeDisoper)==null||e.call(this),this.domElementWrapper.remove()}}function xi(n){return $(this,null,function*(){return new Promise(t=>{if(W0(n))t();else{const e=i=>{const s=ki(n);i===s&&(n.off("modelLoaded",e),t())};n.on("modelLoaded",e)}})})}function W0(n){var t;return(t=ki(n))==null?void 0:t.loaded}const Ni=document.createElement("div");Ni.classList.add("behindFiveElement");Ni.style.position="absolute";Ni.style.top="0";Ni.style.left="0";Ni.style.width="100%";Ni.style.height="100%";Ni.style.pointerEvents="none";function Wh(n){var i,s,o,r,a;const t=(a=(s=dc(n.getElement()))!=null?s:dc((i=n.getElement())==null?void 0:i.parentElement))!=null?a:dc((r=(o=n.getElement())==null?void 0:o.parentElement)==null?void 0:r.parentElement),e=t==null?void 0:t.parentElement;if(e)return e.contains(Ni)||t.parentElement.insertBefore(Ni,t),Ni;console.error("Can not find a valid element to insert behindFiveElement. How to fix it: https://github.com/realsee-developer/dnalogel/tree/main/plugins/src/CSS3DRenderPlugin/README.md")}function dc(n){var a;if(!n)return;const t=(a=n.style.position)!=null?a:getComputedStyle(n).position;if(t!=="fixed"&&t!=="absolute"&&t!=="relative")return;const e=getComputedStyle(n),i=e.backgroundColor,s=e.backgroundImage;if(!(i!=="transparent"&&i!=="rgba(0, 0, 0, 0)"&&i!==""||s!=="none"&&s!==""))return n}let mr=[null,null,()=>null],zs=new Map,Os=new Map;function Lb(n,t){if(!n)return!1;const e=t||n.uuid;return zs.has(e)?!1:(zs.set(e,n),!0)}function zb(n){if(!n)return!1;if(typeof n=="string")return zs.delete(n);for(const[t,e]of zs.entries())if(e===n)return zs.delete(t);return!1}function Ob(n,t){if(!n)return!1;const e=t||n.uuid;return Os.has(e)?!1:(Os.set(e,n),!0)}function jb(n){if(!n)return!1;if(typeof n=="string")return Os.delete(n);for(const[t,e]of Os.entries())if(e===n)return Os.delete(t);return!1}function Rb(){zs.clear()}function _b(){Os.clear()}function Vb(){Rb(),_b()}function na(n){var s;if(mr){if(mr[0]===n)return mr[2];(s=mr[1])==null||s.dispose()}const t=new el("front");t.domElementWrapper.style.zIndex="1";const e=new el("behind");xi(n).then(()=>{var a;const o=(a=n.getElement())==null?void 0:a.parentElement,r=Wh(n);if(!o)return console.error("initialCSS3DRender: five element is not exist"),()=>null;if(t.appendToElement(o),t.renderCss3dObjectEveryFrame(zs,n.camera),!r)return console.error("initialCSS3DRender: behindWrapper is not exist"),()=>null;e.appendToElement(r),e.renderCss3dObjectEveryFrame(Os,n.camera)});const i=()=>{t.dispose(),e.dispose(),Vb()};return mr=[n,t,i],i}const Fb=16777215,Bb=16777215,Hb=1,Nb=.4,Uh=.6;class bi extends G.Object3D{constructor(){super();f(this,"name","IObject3D");f(this,"needsRender")}removeChildren(){for(;this.children.length>0;)this.remove(this.children[0]);return this}add(...e){const i=e.filter(Boolean);return i.length===0?this:super.add(...i)}addIfNotExists(...e){return e.forEach(i=>{this.children.includes(i)||this.add(i)}),this}remove(...e){if(e.length===0)return this;const i=e.filter(Boolean);return super.remove(...i)}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}}function Et(...n){const t=new G.Vector3;return n.forEach(e=>t.add(e)),t.divideScalar(n.length),t}function Qh(n,t){if(!document.getElementById("LineLengthTagStyle")){const o=document.createElement("style");o.id="LineLengthTagStyle",document.head.appendChild(o),o.innerHTML=`
|
|
108
108
|
.LineLengthTag {
|
|
109
109
|
cursor: default;
|
|
110
110
|
position: absolute;
|
|
@@ -506,7 +506,7 @@ void main() {
|
|
|
506
506
|
svg [type='lineItemGroup'] g g g g {
|
|
507
507
|
stroke: #ffffff;
|
|
508
508
|
}</style>
|
|
509
|
-
`;return n.$$set=o=>{"content"in o&&e(0,i=o.content)},[i,s]}class t3 extends Ee{constructor(t){super(),Ie(this,t,e3,$2,Me,{content:0},K2)}}function i3(n){Le(n,"svelte-ozpg4a",".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}")}function n3(n){let t,e;return t=new J2({props:{url:n[1].url}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.url=i[1].url),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function s3(n){let t,e;return t=new t3({props:{content:n[0]}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.content=i[0]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function o3(n){let t,e,i,s;const o=[s3,n3],r=[];function a(l,c){return l[0]?0:l[1]?1:-1}return~(e=a(n))&&(i=r[e]=o[e](n)),{c(){t=U("div"),i&&i.c(),P(t,"class","floorplan-plugin__base-image svelte-ozpg4a")},m(l,c){Z(l,t,c),~e&&r[e].m(t,null),s=!0},p(l,[c]){let h=e;e=a(l),e===h?~e&&r[e].p(l,c):(i&&(xe(),Y(r[h],1,1,()=>{r[h]=null}),Se()),~e?(i=r[e],i?i.p(l,c):(i=r[e]=o[e](l),i.c()),H(i,1),i.m(t,null)):i=null)},i(l){s||(H(i),s=!0)},o(l){Y(i),s=!1},d(l){l&&X(t),~e&&r[e].d()}}}function r3(n,t,e){let i,s,{floorIndex:o}=t,{floorplanData:r}=t;return n.$$set=a=>{"floorIndex"in a&&e(2,o=a.floorIndex),"floorplanData"in a&&e(3,r=a.floorplanData)},n.$$.update=()=>{var a,l;n.$$.dirty&12&&e(1,i=r.outlines[o]),n.$$.dirty&12&&e(0,s=(l=(a=r.outlines)==null?void 0:a[o])==null?void 0:l.svgContent)},[s,i,o,r]}class Su extends Ee{constructor(t){super(),Ie(this,t,r3,o3,Me,{floorIndex:2,floorplanData:3},i3)}}function a3(n){Le(n,"svelte-2r6702",".floorplan-plugin__item.svelte-2r6702{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:1;color:#fff;transform:translate(-50%, -50%);white-space:nowrap;will-change:opacity;transition:opacity 300ms}.floorplan-plugin__img.svelte-2r6702{width:100%;height:100%}.floorplan-plugin__notes.svelte-2r6702{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);padding:0.25rem;line-height:1;border-radius:0.25rem;color:#fff;background:rgba(0,0,0,.6);font-size:0.75rem}")}function l3(n){let t,e,i,s,o,r=n[0].notes+"",a;return{c(){t=U("div"),e=U("img"),s=ue(),o=U("span"),a=Fe(r),P(e,"class","floorplan-plugin__img svelte-2r6702"),at(e.src,i=n[6])||P(e,"src",i),P(e,"alt",""),_(e,"transform",n[5]),P(o,"class","floorplan-plugin__notes svelte-2r6702"),P(t,"class","floorplan-plugin__item svelte-2r6702"),_(t,"left",n[1]),_(t,"top",n[2]),_(t,"width",n[3]),_(t,"height",n[4])},m(l,c){Z(l,t,c),B(t,e),B(t,s),B(t,o),B(o,a)},p(l,[c]){c&1&&r!==(r=l[0].notes+"")&&Ne(a,r)},i:ce,o:ce,d(l){l&&X(t)}}}function c3(n,t,e){let{item:i}=t;const s=i.positionInImage.x*100+"%",o=i.positionInImage.y*100+"%",r=i.width*100+"%",a=i.height*100+"%",l=`rotate(${i.rotateZ}deg) scaleX(${i.rotateX?-1:1}) scaleY(${i.rotateY?-1:1})`,c=i.src;return n.$$set=h=>{"item"in h&&e(0,i=h.item)},[i,s,o,r,a,l,c]}class h3 extends Ee{constructor(t){super(),Ie(this,t,c3,l3,Me,{item:0},a3)}}function u3(n){Le(n,"svelte-1c5mqz0",".floorplan-plugin__room-items.svelte-1c5mqz0{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20;pointer-events:none}")}function Zd(n,t,e){const i=n.slice();return i[6]=t[e],i}function qd(n){let t,e=[],i=new Map,s,o,r,a=n[1];const l=c=>c[6].id;for(let c=0;c<a.length;c+=1){let h=Zd(n,a,c),u=l(h);i.set(u,e[c]=Jd(u,h))}return{c(){t=U("div");for(let c=0;c<e.length;c+=1)e[c].c();P(t,"class","floorplan-plugin__room-items svelte-1c5mqz0")},m(c,h){Z(c,t,h);for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(t,null);s=!0,o||(r=[oi(_i.call(null,t)),_e(t,"clientWidth",n[4])],o=!0)},p(c,h){h&2&&(a=c[1],xe(),e=ai(e,h,l,1,c,a,i,t,fn,Jd,null,Zd),Se())},i(c){if(!s){for(let h=0;h<a.length;h+=1)H(e[h]);s=!0}},o(c){for(let h=0;h<e.length;h+=1)Y(e[h]);s=!1},d(c){c&&X(t);for(let h=0;h<e.length;h+=1)e[h].d();o=!1,dt(r)}}}function Jd(n,t){let e,i,s;const o=[{item:t[6]}];let r={};for(let a=0;a<o.length;a+=1)r=pt(r,o[a]);return i=new h3({props:r}),{key:n,first:null,c(){e=Be(),ge(i.$$.fragment),this.first=e},m(a,l){Z(a,e,l),pe(i,a,l),s=!0},p(a,l){t=a;const c=l&2?yt(o,[{item:t[6]}]):{};i.$set(c)},i(a){s||(H(i.$$.fragment,a),s=!0)},o(a){Y(i.$$.fragment,a),s=!1},d(a){a&&X(e),me(i,a)}}}function d3(n){let t,e,i=n[1]&&qd(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[1]?i?(i.p(s,o),o&2&&H(i,1)):(i=qd(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function f3(n,t,e){let i,{floorIndex:s}=t,{floorplanData:o}=t,r=0;const a=l=>{e(0,r=l.detail)};return n.$$set=l=>{"floorIndex"in l&&e(2,s=l.floorIndex),"floorplanData"in l&&e(3,o=l.floorplanData)},n.$$.update=()=>{if(n.$$.dirty&12&&e(1,i=o.floorDatas[s].items),n.$$.dirty&9){const{max:l,min:c}=o.bounding;l.x-c.x}},[r,i,s,o,a]}class p3 extends Ee{constructor(t){super(),Ie(this,t,f3,d3,Me,{floorIndex:2,floorplanData:3},u3)}}function m3(n){Le(n,"svelte-9vzn2f",".floorplan-plugin__room-label-item.svelte-9vzn2f{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:1;color:#fff;transform:translate(-50%, -50%);white-space:nowrap;will-change:opacity;transition:opacity 300ms}.floorplan-plugin__room-part1.svelte-9vzn2f{display:flex;flex-flow:column;align-items:center;color:#fff;white-space:nowrap}.floorplan-plugin__room-area.svelte-9vzn2f{opacity:0.6;line-height:1.25;margin-top:0.125rem}")}function g3(n){let t,e=n[18].outerHTML+"",i;return{c(){t=new Bo(!1),i=Be(),t.a=i},m(s,o){t.m(e,s,o),Z(s,i,o)},p(s,o){o[0]&262144&&e!==(e=s[18].outerHTML+"")&&t.p(e)},d(s){s&&X(i),s&&t.d()}}}function v3(n){let t,e,i,s,o,r,a=n[1]&&Kd(n),l=n[0]&&$d(n),c=n[3]&&ef(n);return{c(){t=U("div"),a&&a.c(),e=ue(),l&&l.c(),i=ue(),c&&c.c(),s=Be(),P(t,"class","floorplan-plugin__room-part1 svelte-9vzn2f"),_(t,"opacity",n[14]?"1":"0")},m(h,u){Z(h,t,u),a&&a.m(t,null),B(t,e),l&&l.m(t,null),Z(h,i,u),c&&c.m(h,u),Z(h,s,u),o||(r=[oi(_i.call(null,t)),_e(t,"clientWidth",n[35]),_e(t,"clientHeight",n[36])],o=!0)},p(h,u){h[1]?a?a.p(h,u):(a=Kd(h),a.c(),a.m(t,e)):a&&(a.d(1),a=null),h[0]?l?l.p(h,u):(l=$d(h),l.c(),l.m(t,null)):l&&(l.d(1),l=null),u[0]&16384&&_(t,"opacity",h[14]?"1":"0"),h[3]?c?c.p(h,u):(c=ef(h),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null)},d(h){h&&X(t),a&&a.d(),l&&l.d(),h&&X(i),c&&c.d(h),h&&X(s),o=!1,dt(r)}}}function Kd(n){let t,e=(n[2]?n[4].name:n[4].roomType==="100900000012"?n[4].customizedName:n[4].name)+"",i;return{c(){t=U("span"),i=Fe(e),P(t,"class","floorplan-plugin__room-name"),_(t,"font-size",n[11])},m(s,o){Z(s,t,o),B(t,i)},p(s,o){o[0]&20&&e!==(e=(s[2]?s[4].name:s[4].roomType==="100900000012"?s[4].customizedName:s[4].name)+"")&&Ne(i,e),o[0]&2048&&_(t,"font-size",s[11])},d(s){s&&X(t)}}}function $d(n){let t,e;return{c(){t=U("span"),e=Fe(n[17]),P(t,"class","floorplan-plugin__room-area svelte-9vzn2f"),_(t,"font-size",n[10])},m(i,s){Z(i,t,s),B(t,e)},p(i,s){s[0]&131072&&Ne(e,i[17]),s[0]&1024&&_(t,"font-size",i[10])},d(i){i&&X(t)}}}function ef(n){let t,e;return{c(){t=U("span"),e=Fe(n[16]),P(t,"class","floorplan-plugin__room-size"),_(t,"font-size",n[10]),_(t,"opacity",n[13]?"0.6":"0")},m(i,s){Z(i,t,s),B(t,e)},p(i,s){s[0]&65536&&Ne(e,i[16]),s[0]&1024&&_(t,"font-size",i[10]),s[0]&8192&&_(t,"opacity",i[13]?"0.6":"0")},d(i){i&&X(t)}}}function y3(n){let t,e,i;function s(a,l){if(a[5]===void 0)return v3;if(a[18])return g3}let o=s(n),r=o&&o(n);return{c(){t=U("div"),r&&r.c(),P(t,"class","floorplan-plugin__room-label-item svelte-9vzn2f"),_(t,"left",n[19]),_(t,"top",n[20]),_(t,"font-size",n[11]),_(t,"opacity",n[15]?"1":"0"),_(t,"transform",n[12]?"translate(-50%, calc(-50% + 6px))":"translate(-50%, -50%)")},m(a,l){Z(a,t,l),r&&r.m(t,null),e||(i=[oi(_i.call(null,t)),_e(t,"clientWidth",n[37]),_e(t,"clientHeight",n[38])],e=!0)},p(a,l){o===(o=s(a))&&r?r.p(a,l):(r&&r.d(1),r=o&&o(a),r&&(r.c(),r.m(t,null))),l[0]&2048&&_(t,"font-size",a[11]),l[0]&32768&&_(t,"opacity",a[15]?"1":"0"),l[0]&4096&&_(t,"transform",a[12]?"translate(-50%, calc(-50% + 6px))":"translate(-50%, -50%)")},i:ce,o:ce,d(a){a&&X(t),r&&r.d(),e=!1,dt(i)}}}function b3(n,t){const e=n[0],i=n[1];let s=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){const a=t[o][0],l=t[o][1],c=t[r][0],h=t[r][1];l>i!=h>i&&e<(c-a)*(i-l)/(h-l)+a&&(s=!s)}return s}function A3(n,t,e){let i,s,o,r,a,l,c,h,u,d,p,m,g,v,y,w,{pxmm:C}=t,{roomAreaEnable:E}=t,{roomNameEnable:D}=t,{roomNameOtherTypeEnable:L}=t,{roomDimensionEnable:R}=t,{room:z}=t,{hoveredRoom:O}=t,{getRoomAreaText:A}=t,{getRoomDimensionText:M}=t,{getLabelElement:I}=t,{adaptiveRoomLabelVisibleEnable:k}=t,{fontSize:x}=t;function S(he,be){if(be.width===0||be.height===0)return()=>!1;const te=he.path.map(({x:Xe,y:Ze})=>[Xe,Ze]),ke=he.roomLabel.position,{x:Re,y:ye}=ke,{width:De,height:ve}=be,Ae=De/2,Oe=ve/2;return function(Ze){const ot=Re*Ze,Ke=ye*Ze,et=te.map(([ht,Ft])=>[ht*Ze,Ft*Ze]);return[[ot+Ae,Ke-Oe],[ot-Ae,Ke-Oe],[ot-Ae,Ke+Oe],[ot+Ae,Ke+Oe]].every(ht=>b3(ht,et))}}const j=z.roomLabel,F=j.positionInImage.x*100+"%",J=j.positionInImage.y*100+"%";let ne=0,q=0,oe=0,se=0,ae=!1;O.subscribe(function(be){e(27,ae=!!be&&be.id===z.id)});const ze=he=>{e(8,oe=he.detail)},ee=he=>{e(9,se=he.detail)},we=he=>{e(6,ne=he.detail)},le=he=>{e(7,q=he.detail)};return n.$$set=he=>{"pxmm"in he&&e(21,C=he.pxmm),"roomAreaEnable"in he&&e(0,E=he.roomAreaEnable),"roomNameEnable"in he&&e(1,D=he.roomNameEnable),"roomNameOtherTypeEnable"in he&&e(2,L=he.roomNameOtherTypeEnable),"roomDimensionEnable"in he&&e(3,R=he.roomDimensionEnable),"room"in he&&e(4,z=he.room),"hoveredRoom"in he&&e(22,O=he.hoveredRoom),"getRoomAreaText"in he&&e(23,A=he.getRoomAreaText),"getRoomDimensionText"in he&&e(24,M=he.getRoomDimensionText),"getLabelElement"in he&&e(5,I=he.getLabelElement),"adaptiveRoomLabelVisibleEnable"in he&&e(25,k=he.adaptiveRoomLabelVisibleEnable),"fontSize"in he&&e(26,x=he.fontSize)},n.$$.update=()=>{var he,be;n.$$.dirty[0]&67108864&&e(28,i=ku[x]),n.$$.dirty[0]&48&&e(18,s=I==null?void 0:I(z)),n.$$.dirty[0]&8388624&&e(17,o=z.size?A(z.size):""),n.$$.dirty[0]&16777232&&e(16,r=z!=null&&z.dimension?M((he=z.dimension)==null?void 0:he.width,(be=z.dimension)==null?void 0:be.height):""),n.$$.dirty[0]&768&&e(34,a={width:oe,height:se}),n.$$.dirty[0]&16|n.$$.dirty[1]&8&&e(33,l=a?S(z,a):void 0),n.$$.dirty[0]&35651584|n.$$.dirty[1]&4&&e(30,c=k?!!(l!=null&&l(C)):!0),n.$$.dirty[0]&192&&e(32,h={width:ne,height:q}),n.$$.dirty[0]&16|n.$$.dirty[1]&2&&e(31,u=h?S(z,h):void 0),n.$$.dirty[0]&35651584|n.$$.dirty[1]&1&&e(29,d=k?!!(u!=null&&u(C)):!0),n.$$.dirty[0]&1744830464&&e(15,p=d||c||ae),n.$$.dirty[0]&1207959552&&e(14,m=c||ae),n.$$.dirty[0]&671088640&&e(13,g=d||ae),n.$$.dirty[0]&1610612736&&e(12,v=c&&!d),n.$$.dirty[0]&268435456&&e(11,y=ft((i==null?void 0:i.name)||12)),n.$$.dirty[0]&268435456&&e(10,w=ft((i==null?void 0:i.area)||10))},[E,D,L,R,z,I,ne,q,oe,se,w,y,v,g,m,p,r,o,s,F,J,C,O,A,M,k,x,ae,i,d,c,u,h,l,a,ze,ee,we,le]}class w3 extends Ee{constructor(t){super(),Ie(this,t,A3,y3,Me,{pxmm:21,roomAreaEnable:0,roomNameEnable:1,roomNameOtherTypeEnable:2,roomDimensionEnable:3,room:4,hoveredRoom:22,getRoomAreaText:23,getRoomDimensionText:24,getLabelElement:5,adaptiveRoomLabelVisibleEnable:25,fontSize:26},m3,[-1,-1])}}function P3(n){Le(n,"svelte-13xux0b",".floorplan-plugin__room-labels.svelte-13xux0b{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20;pointer-events:none}")}function tf(n,t,e){const i=n.slice();return i[17]=t[e],i}function nf(n){let t,e=[],i=new Map,s,o,r,a=n[12];const l=c=>c[17].id;for(let c=0;c<a.length;c+=1){let h=tf(n,a,c),u=l(h);i.set(u,e[c]=sf(u,h))}return{c(){t=U("div");for(let c=0;c<e.length;c+=1)e[c].c();P(t,"class","floorplan-plugin__room-labels svelte-13xux0b")},m(c,h){Z(c,t,h);for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(t,null);s=!0,o||(r=[oi(_i.call(null,t)),_e(t,"clientWidth",n[15])],o=!0)},p(c,h){h&7679&&(a=c[12],xe(),e=ai(e,h,l,1,c,a,i,t,fn,sf,null,tf),Se())},i(c){if(!s){for(let h=0;h<a.length;h+=1)H(e[h]);s=!0}},o(c){for(let h=0;h<e.length;h+=1)Y(e[h]);s=!1},d(c){c&&X(t);for(let h=0;h<e.length;h+=1)e[h].d();o=!1,dt(r)}}}function sf(n,t){let e,i,s;const o=[{pxmm:t[10],room:t[17],hoveredRoom:t[4],roomAreaEnable:t[0],roomNameEnable:t[1],roomNameOtherTypeEnable:t[2],roomDimensionEnable:t[3],getLabelElement:t[7],getRoomAreaText:t[5],getRoomDimensionText:t[6],adaptiveRoomLabelVisibleEnable:t[8],fontSize:t[11]}];let r={};for(let a=0;a<o.length;a+=1)r=pt(r,o[a]);return i=new w3({props:r}),{key:n,first:null,c(){e=Be(),ge(i.$$.fragment),this.first=e},m(a,l){Z(a,e,l),pe(i,a,l),s=!0},p(a,l){t=a;const c=l&7679?yt(o,[{pxmm:t[10],room:t[17],hoveredRoom:t[4],roomAreaEnable:t[0],roomNameEnable:t[1],roomNameOtherTypeEnable:t[2],roomDimensionEnable:t[3],getLabelElement:t[7],getRoomAreaText:t[5],getRoomDimensionText:t[6],adaptiveRoomLabelVisibleEnable:t[8],fontSize:t[11]}]):{};i.$set(c)},i(a){s||(H(i.$$.fragment,a),s=!0)},o(a){Y(i.$$.fragment,a),s=!1},d(a){a&&X(e),me(i,a)}}}function C3(n){let t,e,i=n[12]&&nf(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[12]?i?(i.p(s,o),o&4096&&H(i,1)):(i=nf(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function M3(n,t,e){let i,{floorIndex:s}=t,{roomAreaEnable:o}=t,{roomNameEnable:r}=t,{roomNameOtherTypeEnable:a}=t,{roomDimensionEnable:l}=t,{floorplanData:c}=t,{hoveredRoom:h}=t,{getRoomAreaText:u}=t,{getRoomDimensionText:d}=t,{getLabelElement:p}=t,{adaptiveRoomLabelVisibleEnable:m}=t,g=0,v=0;const y=ca();let w=Jo();typeof y=="object"&&"subscribe"in y&&y.subscribe(E=>{e(11,w=E)});const C=E=>{e(9,g=E.detail)};return n.$$set=E=>{"floorIndex"in E&&e(13,s=E.floorIndex),"roomAreaEnable"in E&&e(0,o=E.roomAreaEnable),"roomNameEnable"in E&&e(1,r=E.roomNameEnable),"roomNameOtherTypeEnable"in E&&e(2,a=E.roomNameOtherTypeEnable),"roomDimensionEnable"in E&&e(3,l=E.roomDimensionEnable),"floorplanData"in E&&e(14,c=E.floorplanData),"hoveredRoom"in E&&e(4,h=E.hoveredRoom),"getRoomAreaText"in E&&e(5,u=E.getRoomAreaText),"getRoomDimensionText"in E&&e(6,d=E.getRoomDimensionText),"getLabelElement"in E&&e(7,p=E.getLabelElement),"adaptiveRoomLabelVisibleEnable"in E&&e(8,m=E.adaptiveRoomLabelVisibleEnable)},n.$$.update=()=>{if(n.$$.dirty&24576&&e(12,i=c.floorDatas[s].rooms),n.$$.dirty&16896){const{max:E,min:D}=c.bounding,L=E.x-D.x;e(10,v=g/L)}},[o,r,a,l,h,u,d,p,m,g,v,w,i,s,c,C]}let I3=class extends Ee{constructor(t){super(),Ie(this,t,M3,C3,Me,{floorIndex:13,roomAreaEnable:0,roomNameEnable:1,roomNameOtherTypeEnable:2,roomDimensionEnable:3,floorplanData:14,hoveredRoom:4,getRoomAreaText:5,getRoomDimensionText:6,getLabelElement:7,adaptiveRoomLabelVisibleEnable:8},P3)}};function E3(n){Le(n,"svelte-1fuyezq",".floorplan-plugin__rule-labels.svelte-1fuyezq.svelte-1fuyezq{position:absolute;display:flex}.floorplan-plugin__rule-labels--top.svelte-1fuyezq.svelte-1fuyezq{left:0;top:-1.25rem}.floorplan-plugin__rule-labels--bottom.svelte-1fuyezq.svelte-1fuyezq{left:0;bottom:-1.25rem}.floorplan-plugin__rule-labels--left.svelte-1fuyezq.svelte-1fuyezq{top:0;left:-1.25rem}.floorplan-plugin__rule-labels--right.svelte-1fuyezq.svelte-1fuyezq{top:0;right:-1.25rem}.floorplan-plugin__rule-line.svelte-1fuyezq.svelte-1fuyezq{background:#fff;opacity:0.2;width:100%;height:100%}.floorplan-plugin__rule-scale-wrapper.svelte-1fuyezq.svelte-1fuyezq{position:absolute;width:0.3125rem;height:100%;left:50%;top:0;transform:translateX(-50%)}.floorplan-plugin__rule-labels.is-row.svelte-1fuyezq .floorplan-plugin__rule-scale-wrapper.svelte-1fuyezq{width:100%;height:0.3125rem;top:50%;left:0;transform:translateY(-50%)}.floorplan-plugin__rule-scale.svelte-1fuyezq.svelte-1fuyezq{position:absolute;background:#fff;opacity:0.2;width:100%;height:0.0625rem}.floorplan-plugin__rule-labels.is-row.svelte-1fuyezq .floorplan-plugin__rule-scale.svelte-1fuyezq{width:0.0625rem;height:100%}.floorplan-plugin__rule-text-wrapper.svelte-1fuyezq.svelte-1fuyezq{position:absolute}.floorplan-plugin__rule-labels--top.svelte-1fuyezq .floorplan-plugin__rule-text-wrapper.svelte-1fuyezq{width:100%;height:0;top:0.625rem}.floorplan-plugin__rule-labels--bottom.svelte-1fuyezq .floorplan-plugin__rule-text-wrapper.svelte-1fuyezq{width:100%;height:0;bottom:0.625rem}.floorplan-plugin__rule-labels--left.svelte-1fuyezq .floorplan-plugin__rule-text-wrapper.svelte-1fuyezq{width:0;height:100%;left:0.625rem}.floorplan-plugin__rule-labels--right.svelte-1fuyezq .floorplan-plugin__rule-text-wrapper.svelte-1fuyezq{width:0;height:100%;right:0.625rem}.floorplan-plugin__rule-text-item.svelte-1fuyezq.svelte-1fuyezq{width:0;height:0;position:absolute;transform:rotate(90deg)}.floorplan-plugin__rule-labels.is-row.svelte-1fuyezq .floorplan-plugin__rule-text-item.svelte-1fuyezq{transform:rotate(0)}.floorplan-plugin__rule-text.svelte-1fuyezq.svelte-1fuyezq{width:-moz-max-content;width:max-content;transform:translate(-50%, -50%);font-size:0.625rem;color:#fff;opacity:0.35}")}function of(n,t,e){const i=n.slice();return i[11]=t[e],i[13]=e,i}function rf(n,t,e){const i=n.slice();return i[14]=t[e],i}function af(n){let t;return{c(){t=U("div"),P(t,"class","floorplan-plugin__rule-scale svelte-1fuyezq"),_(t,"left",n[14].left*100+"%"),_(t,"bottom",n[14].bottom*100+"%")},m(e,i){Z(e,t,i)},p:ce,d(e){e&&X(t)}}}function lf(n,t){let e,i,s=t[1](t[11].distance)+"",o,r;return{key:n,first:null,c(){e=U("div"),i=U("div"),o=Fe(s),r=ue(),P(i,"class","floorplan-plugin__rule-text svelte-1fuyezq"),Pe(i,"is-row",t[2]),P(e,"class","floorplan-plugin__rule-text-item svelte-1fuyezq"),_(e,"left",t[11].left*100+"%"),_(e,"bottom",t[11].bottom*100+"%"),this.first=e},m(a,l){Z(a,e,l),B(e,i),B(i,o),B(e,r)},p(a,l){t=a,l&2&&s!==(s=t[1](t[11].distance)+"")&&Ne(o,s)},d(a){a&&X(e)}}}function k3(n){let t,e,i,s,o,r,a=[],l=new Map,c,h=n[3],u=[];for(let m=0;m<h.length;m+=1)u[m]=af(rf(n,h,m));let d=n[4];const p=m=>m[13];for(let m=0;m<d.length;m+=1){let g=of(n,d,m),v=p(g);l.set(v,a[m]=lf(v,g))}return{c(){t=U("div"),e=U("div"),i=ue(),s=U("div");for(let m=0;m<u.length;m+=1)u[m].c();o=ue(),r=U("div");for(let m=0;m<a.length;m+=1)a[m].c();P(e,"class","floorplan-plugin__rule-line svelte-1fuyezq"),P(s,"class","floorplan-plugin__rule-scale-wrapper svelte-1fuyezq"),Pe(s,"is-row",n[2]),P(r,"class","floorplan-plugin__rule-text-wrapper svelte-1fuyezq"),P(t,"class",c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+n[0]+" svelte-1fuyezq"),Pe(t,"is-row",n[2]),_(t,"width",n[2]?"100%":1/16+"rem"),_(t,"height",n[2]?1/16+"rem":"100%")},m(m,g){Z(m,t,g),B(t,e),B(t,i),B(t,s);for(let v=0;v<u.length;v+=1)u[v]&&u[v].m(s,null);B(t,o),B(t,r);for(let v=0;v<a.length;v+=1)a[v]&&a[v].m(r,null)},p(m,[g]){if(g&8){h=m[3];let v;for(v=0;v<h.length;v+=1){const y=rf(m,h,v);u[v]?u[v].p(y,g):(u[v]=af(y),u[v].c(),u[v].m(s,null))}for(;v<u.length;v+=1)u[v].d(1);u.length=h.length}g&22&&(d=m[4],a=ai(a,g,p,1,m,d,l,r,la,lf,null,of)),g&1&&c!==(c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+m[0]+" svelte-1fuyezq")&&P(t,"class",c),g&5&&Pe(t,"is-row",m[2])},i:ce,o:ce,d(m){m&&X(t),Ti(u,m);for(let g=0;g<a.length;g+=1)a[g].d()}}}const yo=1e3,bo=180;function x3(n,t,e){let{type:i}=t,{data:s}=t,{bounding:o}=t,{getRuleDistanceText:r}=t;const a=i==="top"||i==="bottom",l=o.max.x-o.min.x-(yo-bo)*2,c=o.max.y-o.min.y-(yo-bo)*2,h=s.map(([m,g])=>a?[m.x,g.x]:[m.y,g.y]).flat().sort().filter((m,g,v)=>g===0?!0:m!==v[g-1]),u=h.map(m=>{const g=a?(m-o.min.x-yo+bo)/l:0,v=a?0:(m-o.min.y-yo+bo)/c;return{left:g,bottom:v}});u.unshift({left:0,bottom:0}),u.push(a?{left:1,bottom:0}:{left:0,bottom:1});const d=h[h.length-1]-h[0],p=h.map((m,g,v)=>{const y=g===0?0:m-v[g-1],w=g===0?0:(m+v[g-1])/2,C=a?(w-o.min.x-yo+bo)/l:0,E=a?0:(w-o.min.y-yo+bo)/c;return{left:C,bottom:E,distance:y}}).filter(({distance:m})=>m/d>.1);return n.$$set=m=>{"type"in m&&e(0,i=m.type),"data"in m&&e(5,s=m.data),"bounding"in m&&e(6,o=m.bounding),"getRuleDistanceText"in m&&e(1,r=m.getRuleDistanceText)},[i,r,a,u,p,s,o]}class S3 extends Ee{constructor(t){super(),Ie(this,t,x3,k3,Me,{type:0,data:5,bounding:6,getRuleDistanceText:1},E3)}}function T3(n){Le(n,"svelte-1mzj9p3",".floorplan-plugin__rule-labels-wrapper.svelte-1mzj9p3{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}")}function cf(n,t,e){const i=n.slice();return i[13]=t[e][0],i[14]=t[e][1],i}function hf(n,t){let e,i,s;const o=[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}];let r={};for(let a=0;a<o.length;a+=1)r=pt(r,o[a]);return i=new S3({props:r}),{key:n,first:null,c(){e=Be(),ge(i.$$.fragment),this.first=e},m(a,l){Z(a,e,l),pe(i,a,l),s=!0},p(a,l){t=a;const c=l&19?yt(o,[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}]):{};i.$set(c)},i(a){s||(H(i.$$.fragment,a),s=!0)},o(a){Y(i.$$.fragment,a),s=!1},d(a){a&&X(e),me(i,a)}}}function D3(n){let t,e=[],i=new Map,s,o=n[4];const r=a=>a[13];for(let a=0;a<o.length;a+=1){let l=cf(n,o,a),c=r(l);i.set(c,e[a]=hf(c,l))}return{c(){t=U("div");for(let a=0;a<e.length;a+=1)e[a].c();P(t,"class","floorplan-plugin__rule-labels-wrapper svelte-1mzj9p3"),_(t,"width",n[3]),_(t,"height",n[2])},m(a,l){Z(a,t,l);for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(t,null);s=!0},p(a,[l]){l&19&&(o=a[4],xe(),e=ai(e,l,r,1,a,o,i,t,fn,hf,null,cf),Se()),l&8&&_(t,"width",a[3]),l&4&&_(t,"height",a[2])},i(a){if(!s){for(let l=0;l<o.length;l+=1)H(e[l]);s=!0}},o(a){for(let l=0;l<e.length;l+=1)Y(e[l]);s=!1},d(a){a&&X(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}const uf=1e3,df=180;function L3(n,t,e){let i,s,o,r,a,l,c,h,u,d,{floorIndex:p}=t,{floorplanData:m}=t,{getRuleDistanceText:g}=t;return n.$$set=v=>{"floorIndex"in v&&e(5,p=v.floorIndex),"floorplanData"in v&&e(6,m=v.floorplanData),"getRuleDistanceText"in v&&e(0,g=v.getRuleDistanceText)},n.$$.update=()=>{n.$$.dirty&64&&e(1,i=m.bounding),n.$$.dirty&96&&e(11,s=m.floorDatas[p].rules),n.$$.dirty&2048&&e(12,o=Object.keys(s)),n.$$.dirty&6144&&e(4,r=o.map(v=>[v,s[v]])),n.$$.dirty&2&&e(9,a=i.max.x-i.min.x),n.$$.dirty&2&&e(7,l=i.max.y-i.min.y),n.$$.dirty&2&&e(10,c=i.max.x-i.min.x-(uf-df)*2),n.$$.dirty&2&&e(8,h=i.max.y-i.min.y-(uf-df)*2),n.$$.dirty&1536&&e(3,u=c/a*100+"%"),n.$$.dirty&384&&e(2,d=h/l*100+"%")},[g,i,d,u,r,p,m,l,h,a,c,s,o]}class z3 extends Ee{constructor(t){super(),Ie(this,t,L3,D3,Me,{floorIndex:5,floorplanData:6,getRuleDistanceText:0},T3)}}function ss(n,t={}){let e="";const{needZ:i,needA:s}=t;return(i?n.slice().concat(n[0]):n.slice()).forEach((r,a)=>{const{x:l,y:c}=t.format?t.format(r):r,h=l+","+c;return a===0?(e+="M"+h,e):s!=null&&s[a]?(e+="A"+s[a]+","+h,e):(e+="L"+h,e)}),e+(i?"Z":"")}function s1({x:n,y:t},e){const{max:i,min:s}=e;return{x:n-s.x,y:i.y-t}}function O3(n,t){const e=n.x*1e3+t.bounding.origin.x,i=-n.z*1e3+t.bounding.origin.y;return{x:e,y:i}}function j3(n,t){const e=t.bounding,i=e.max.x-e.min.x,s=e.max.y-e.min.y;return{x:(n.x-e.min.x)/i,y:(e.max.y-n.y)/s}}function R3(n,t){return Math.max(...t.work.observers.map(i=>n.z>=i.standingPosition.z?i.floorIndex:0))}function _3(n){let t;return{c(){t=Te("path"),P(t,"d",n[0]),P(t,"fill","#2F313A")},m(e,i){Z(e,t,i)},p(e,[i]){i&1&&P(t,"d",e[0])},i:ce,o:ce,d(e){e&&X(t)}}}function V3(n,t,e){let i,{path:s}=t;return n.$$set=o=>{"path"in o&&e(1,s=o.path)},n.$$.update=()=>{n.$$.dirty&2&&e(0,i=ss(s,{needZ:!0}))},[i,s]}class F3 extends Ee{constructor(t){super(),Ie(this,t,V3,_3,Me,{path:1})}}function B3(n){let t,e,i,s,o,r;return{c(){t=Te("defs"),e=Te("pattern"),i=Te("rect"),s=Te("path"),o=ue(),r=Te("path"),P(i,"x","0"),P(i,"y","0"),P(i,"width",n[1]),P(i,"height",n[1]),P(i,"fill","#323747"),P(s,"d",n[2]),P(s,"stroke","#ffffff"),P(s,"stroke-opacity","0.06"),P(s,"stroke-width","0.5"),P(s,"fill","none"),P(e,"id","fpm-room-pattern-0"),P(e,"x","0"),P(e,"y","0"),P(e,"width",n[1]),P(e,"height",n[1]),P(e,"patternUnits","userSpaceOnUse"),P(e,"patternTransform","scale(50 50)"),P(r,"d",n[0]),P(r,"fill","url(#fpm-room-pattern-0)")},m(a,l){Z(a,t,l),B(t,e),B(e,i),B(e,s),Z(a,o,l),Z(a,r,l)},p(a,[l]){l&1&&P(r,"d",a[0])},i:ce,o:ce,d(a){a&&X(t),a&&X(o),a&&X(r)}}}const Ac=6;function H3(n,t,e){let i,{path:s}=t;const o=Ac*2,r=`M0 ${Ac} h ${o} M${Ac} 0 v ${o}`;return n.$$set=a=>{"path"in a&&e(3,s=a.path)},n.$$.update=()=>{n.$$.dirty&8&&e(0,i=ss(s,{needZ:!0}))},[i,o,r,s]}class N3 extends Ee{constructor(t){super(),Ie(this,t,H3,B3,Me,{path:3})}}function G3(n){let t,e,i,s,o,r,a,l,c,h,u;return{c(){t=Te("defs"),e=Te("pattern"),i=Te("rect"),s=Te("pattern"),o=Te("rect"),r=ue(),a=Te("path"),l=ue(),c=Te("path"),h=ue(),u=Te("path"),P(i,"x","0"),P(i,"y","0"),P(i,"width","6"),P(i,"height","50"),P(i,"fill","none"),P(i,"stroke","#4B4B57"),P(i,"stroke-width","0.5"),P(e,"id","room-material-pattern-1"),P(e,"x","0"),P(e,"y","0"),P(e,"width","12"),P(e,"height","50"),P(e,"patternUnits","userSpaceOnUse"),P(e,"patternTransform","scale(50 50)"),P(o,"x","0"),P(o,"y","0"),P(o,"width","6"),P(o,"height","50"),P(o,"fill","none"),P(o,"stroke","#4B4B57"),P(o,"stroke-width","0.5"),P(s,"id","room-material-pattern-2"),P(s,"x","6"),P(s,"y","25"),P(s,"width","12"),P(s,"height","50"),P(s,"patternUnits","userSpaceOnUse"),P(s,"patternTransform","scale(50 50)"),P(a,"d",n[0]),P(a,"fill","#43434D"),P(c,"d",n[0]),P(c,"fill","url(#room-material-pattern-1)"),P(u,"d",n[0]),P(u,"fill","url(#room-material-pattern-2)")},m(d,p){Z(d,t,p),B(t,e),B(e,i),B(t,s),B(s,o),Z(d,r,p),Z(d,a,p),Z(d,l,p),Z(d,c,p),Z(d,h,p),Z(d,u,p)},p(d,[p]){p&1&&P(a,"d",d[0]),p&1&&P(c,"d",d[0]),p&1&&P(u,"d",d[0])},i:ce,o:ce,d(d){d&&X(t),d&&X(r),d&&X(a),d&&X(l),d&&X(c),d&&X(h),d&&X(u)}}}function W3(n,t,e){let i,{path:s}=t;return n.$$set=o=>{"path"in o&&e(1,s=o.path)},n.$$.update=()=>{n.$$.dirty&2&&e(0,i=ss(s,{needZ:!0}))},[i,s]}class U3 extends Ee{constructor(t){super(),Ie(this,t,W3,G3,Me,{path:1})}}function Q3(n){let t;return{c(){t=Te("path"),P(t,"d",n[0]),P(t,"fill","#969696"),P(t,"stroke","#969696"),P(t,"stroke-width","1"),P(t,"fill-rule","evenodd")},m(e,i){Z(e,t,i)},p:ce,i:ce,o:ce,d(e){e&&X(t)}}}function X3(n,t,e){let{dimension:i}=t;const s=ss([{x:i.vertical[1].x,y:i.vertical[1].y+53},{x:i.vertical[1].x-60,y:i.vertical[1].y+124},{x:i.vertical[1].x+60,y:i.vertical[1].y+124}],{needZ:!0}),o=ss([{x:i.vertical[0].x,y:i.vertical[0].y-53},{x:i.vertical[0].x-60,y:i.vertical[0].y-124},{x:i.vertical[0].x+60,y:i.vertical[0].y-124}],{needZ:!0}),r=ss([{x:i.horizontal[0].x+53,y:i.horizontal[0].y},{x:i.horizontal[0].x+124,y:i.horizontal[0].y+60},{x:i.horizontal[0].x+124,y:i.horizontal[0].y-60}],{needZ:!0}),a=ss([{x:i.horizontal[1].x-53,y:i.horizontal[1].y},{x:i.horizontal[1].x-124,y:i.horizontal[1].y+60},{x:i.horizontal[1].x-124,y:i.horizontal[1].y-60}],{needZ:!0}),l=`${s} ${o} ${r} ${a}`;return n.$$set=c=>{"dimension"in c&&e(1,i=c.dimension)},[l,i]}class Y3 extends Ee{constructor(t){super(),Ie(this,t,X3,Q3,Me,{dimension:1})}}function Z3(n){Le(n,"svelte-1dykexu",".floorplan-plugin__room-material.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%}svg.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible}")}function ff(n,t,e){const i=n.slice();return i[8]=t[e],i}function q3(n){let t,e;return t=new N3({props:{path:n[8].path}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.path=i[8].path),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function J3(n){let t,e;return t=new U3({props:{path:n[8].path}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.path=i[8].path),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function K3(n){let t,e;return t=new F3({props:{path:n[8].path}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.path=i[8].path),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function pf(n){let t,e,i;return e=new Y3({props:{dimension:n[8].dimension}}),{c(){t=Te("svg"),ge(e.$$.fragment),P(t,"width","100%"),P(t,"height","100%"),P(t,"viewBox",`0 0 ${n[1]} ${n[2]}`),P(t,"class","svelte-1dykexu")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,o){const r={};o&1&&(r.dimension=s[8].dimension),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function mf(n){let t,e,i,s,o=n[3]&&n[8].dimension&&Array.isArray(n[8].dimension.vertical)&&n[8].dimension.vertical.length>0&&Array.isArray(n[8].dimension.horizontal)&&n[8].dimension.horizontal.length>0,r,a;const l=[K3,J3,q3],c=[];function h(d,p){return d[8].floorType===1?0:d[8].floorType===0?1:2}e=h(n),i=c[e]=l[e](n);let u=o&&pf(n);return{c(){t=Te("svg"),i.c(),s=ue(),u&&u.c(),r=Be(),P(t,"width","100%"),P(t,"height","100%"),P(t,"viewBox",`0 0 ${n[1]} ${n[2]}`),P(t,"class","svelte-1dykexu")},m(d,p){Z(d,t,p),c[e].m(t,null),Z(d,s,p),u&&u.m(d,p),Z(d,r,p),a=!0},p(d,p){let m=e;e=h(d),e===m?c[e].p(d,p):(xe(),Y(c[m],1,1,()=>{c[m]=null}),Se(),i=c[e],i?i.p(d,p):(i=c[e]=l[e](d),i.c()),H(i,1),i.m(t,null)),p&1&&(o=d[3]&&d[8].dimension&&Array.isArray(d[8].dimension.vertical)&&d[8].dimension.vertical.length>0&&Array.isArray(d[8].dimension.horizontal)&&d[8].dimension.horizontal.length>0),o?u?(u.p(d,p),p&1&&H(u,1)):(u=pf(d),u.c(),H(u,1),u.m(r.parentNode,r)):u&&(xe(),Y(u,1,1,()=>{u=null}),Se())},i(d){a||(H(i),H(u),a=!0)},o(d){Y(i),Y(u),a=!1},d(d){d&&X(t),c[e].d(),d&&X(s),u&&u.d(d),d&&X(r)}}}function $3(n){let t,e,i=n[0],s=[];for(let r=0;r<i.length;r+=1)s[r]=mf(ff(n,i,r));const o=r=>Y(s[r],1,1,()=>{s[r]=null});return{c(){t=U("div");for(let r=0;r<s.length;r+=1)s[r].c();P(t,"class","floorplan-plugin__room-material svelte-1dykexu")},m(r,a){Z(r,t,a);for(let l=0;l<s.length;l+=1)s[l]&&s[l].m(t,null);e=!0},p(r,[a]){if(a&15){i=r[0];let l;for(l=0;l<i.length;l+=1){const c=ff(r,i,l);s[l]?(s[l].p(c,a),H(s[l],1)):(s[l]=mf(c),s[l].c(),H(s[l],1),s[l].m(t,null))}for(xe(),l=i.length;l<s.length;l+=1)o(l);Se()}},i(r){if(!e){for(let a=0;a<i.length;a+=1)H(s[a]);e=!0}},o(r){s=s.filter(Boolean);for(let a=0;a<s.length;a+=1)Y(s[a]);e=!1},d(r){r&&X(t),Ti(s,r)}}}function eP(n,t,e){let i,{roomLabelsEnable:s}=t,{roomDimensionEnable:o}=t,{floorIndex:r}=t,{floorplanData:a}=t;const l=a.bounding.max.x-a.bounding.min.x,c=a.bounding.max.y-a.bounding.min.y,h=s&&o;return n.$$set=u=>{"roomLabelsEnable"in u&&e(4,s=u.roomLabelsEnable),"roomDimensionEnable"in u&&e(5,o=u.roomDimensionEnable),"floorIndex"in u&&e(6,r=u.floorIndex),"floorplanData"in u&&e(7,a=u.floorplanData)},n.$$.update=()=>{n.$$.dirty&192&&e(0,i=a.floorDatas[r].rooms.map(u=>de(V({},u),{path:u.path.map(d=>s1(d,a.bounding))})))},[i,l,c,h,s,o,r,a]}class tP extends Ee{constructor(t){super(),Ie(this,t,eP,$3,Me,{roomLabelsEnable:4,roomDimensionEnable:5,floorIndex:6,floorplanData:7},Z3)}}function iP(n){Le(n,"svelte-qq2273","path.svelte-qq2273{--opacity:0;opacity:var(--opacity)}path.svelte-qq2273:hover{opacity:calc(var(--opacity) + 0.1)}")}function nP(n){let t,e,i,s;return{c(){t=Te("path"),P(t,"d",n[5]),P(t,"fill","#fff"),P(t,"style",n[2]),P(t,"id",e=`${n[1]}_${n[0].id}`),P(t,"class","svelte-qq2273")},m(o,r){Z(o,t,r),i||(s=[_e(t,"mouseenter",n[3]),_e(t,"mouseleave",n[4])],i=!0)},p(o,[r]){r&4&&P(t,"style",o[2]),r&3&&e!==(e=`${o[1]}_${o[0].id}`)&&P(t,"id",e)},i:ce,o:ce,d(o){o&&X(t),i=!1,dt(s)}}}function sP(n,t,e){let i,s,{room:o}=t,{floorIndex:r}=t,{floorplanData:a}=t,{highlightData:l}=t,{hoveredRoom:c}=t;function h(){c==null||c.set(o)}function u(){c==null||c.set(void 0)}const{bounding:d}=a,p=ss(o.path,{needZ:!0,format:m=>s1(m,d)});return n.$$set=m=>{"room"in m&&e(0,o=m.room),"floorIndex"in m&&e(1,r=m.floorIndex),"floorplanData"in m&&e(6,a=m.floorplanData),"highlightData"in m&&e(7,l=m.highlightData),"hoveredRoom"in m&&e(8,c=m.hoveredRoom)},n.$$.update=()=>{n.$$.dirty&131&&e(9,i=l[`${r}_${o.id}`]),n.$$.dirty&512&&e(2,s=i?`fill: ${i.color}; --opacity: ${i.opacity}; pointer-events: ${i.disabled?"none":"auto"}`:null)},[o,r,s,h,u,p,a,l,c,i]}class oP extends Ee{constructor(t){super(),Ie(this,t,sP,nP,Me,{room:0,floorIndex:1,floorplanData:6,highlightData:7,hoveredRoom:8},iP)}}function rP(n){Le(n,"svelte-1kqo6e4",".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}")}function gf(n,t,e){const i=n.slice();return i[6]=t[e],i}function vf(n,t){let e,i,s;const o=[{room:t[6],floorplanData:t[1],hoveredRoom:t[3],floorIndex:t[0],highlightData:t[2]}];let r={};for(let a=0;a<o.length;a+=1)r=pt(r,o[a]);return i=new oP({props:r}),{key:n,first:null,c(){e=Be(),ge(i.$$.fragment),this.first=e},m(a,l){Z(a,e,l),pe(i,a,l),s=!0},p(a,l){t=a;const c=l&15?yt(o,[{room:t[6],floorplanData:t[1],hoveredRoom:t[3],floorIndex:t[0],highlightData:t[2]}]):{};i.$set(c)},i(a){s||(H(i.$$.fragment,a),s=!0)},o(a){Y(i.$$.fragment,a),s=!1},d(a){a&&X(e),me(i,a)}}}function aP(n){let t,e,i=[],s=new Map,o,r=n[1].floorDatas[n[0]].rooms;const a=l=>l[6].id;for(let l=0;l<r.length;l+=1){let c=gf(n,r,l),h=a(c);s.set(h,i[l]=vf(h,c))}return{c(){t=U("div"),e=Te("svg");for(let l=0;l<i.length;l+=1)i[l].c();P(e,"width","100%"),P(e,"height","100%"),P(e,"viewBox",`0 0 ${n[4]} ${n[5]}`),P(e,"class","svelte-1kqo6e4"),P(t,"class","floorplan-plugin__room-highlight svelte-1kqo6e4")},m(l,c){Z(l,t,c),B(t,e);for(let h=0;h<i.length;h+=1)i[h]&&i[h].m(e,null);o=!0},p(l,[c]){c&15&&(r=l[1].floorDatas[l[0]].rooms,xe(),i=ai(i,c,a,1,l,r,s,e,fn,vf,null,gf),Se())},i(l){if(!o){for(let c=0;c<r.length;c+=1)H(i[c]);o=!0}},o(l){for(let c=0;c<i.length;c+=1)Y(i[c]);o=!1},d(l){l&&X(t);for(let c=0;c<i.length;c+=1)i[c].d()}}}function lP(n,t,e){let{floorIndex:i}=t,{floorplanData:s}=t,{highlightData:o}=t,{hoveredRoom:r}=t;const a=s.bounding.max.x-s.bounding.min.x,l=s.bounding.max.y-s.bounding.min.y;return n.$$set=c=>{"floorIndex"in c&&e(0,i=c.floorIndex),"floorplanData"in c&&e(1,s=c.floorplanData),"highlightData"in c&&e(2,o=c.highlightData),"hoveredRoom"in c&&e(3,r=c.hoveredRoom)},[i,s,o,r,a,l]}class Tu extends Ee{constructor(t){super(),Ie(this,t,lP,aP,Me,{floorIndex:0,floorplanData:1,highlightData:2,hoveredRoom:3},rP)}}function cP(n){Le(n,"svelte-3vzs9z",".missing-floor.svelte-3vzs9z{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);display:flex;flex-direction:column;align-items:center}.text.svelte-3vzs9z{margin-top:0.75rem;color:#fff;opacity:0.3;white-space:nowrap}")}function yf(n){let t,e=n[0].text+"",i;return{c(){t=U("span"),i=Fe(e),P(t,"class","text svelte-3vzs9z"),_(t,"font-size",n[0].textFontSize+"px")},m(s,o){Z(s,t,o),B(t,i)},p(s,o){o&1&&e!==(e=s[0].text+"")&&Ne(i,e),o&1&&_(t,"font-size",s[0].textFontSize+"px")},d(s){s&&X(t)}}}function hP(n){let t,e,i,s,o=n[0].text&&yf(n);return{c(){t=U("div"),e=U("img"),s=ue(),o&&o.c(),P(e,"class","image"),P(e,"alt","缺省楼层展位图"),at(e.src,i=n[0].imageURL)||P(e,"src",i),_(e,"width",n[0].imageWidth+"px"),_(e,"height",n[0].imageHeight+"px"),_(e,"max-width","none"),P(t,"class","missing-floor svelte-3vzs9z")},m(r,a){Z(r,t,a),B(t,e),B(t,s),o&&o.m(t,null)},p(r,[a]){a&1&&!at(e.src,i=r[0].imageURL)&&P(e,"src",i),a&1&&_(e,"width",r[0].imageWidth+"px"),a&1&&_(e,"height",r[0].imageHeight+"px"),r[0].text?o?o.p(r,a):(o=yf(r),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},i:ce,o:ce,d(r){r&&X(t),o&&o.d()}}}function uP(n,t,e){let{missingFloorConfig:i}=t;return n.$$set=s=>{"missingFloorConfig"in s&&e(0,i=s.missingFloorConfig)},[i]}class o1 extends Ee{constructor(t){super(),Ie(this,t,uP,hP,Me,{missingFloorConfig:0},cP)}}const hn="data:image/png;base64,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",hh="data:image/png;base64,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";function di(n){return n*180/Math.PI}function dP(n){Le(n,"svelte-17hhq1b",".floorplan__camera-position.svelte-17hhq1b{pointer-events:none;position:absolute;width:0;height:0}.floorplan__camera-rotate.svelte-17hhq1b{position:absolute;background-repeat:no-repeat;background-size:100%}")}function fP(n){let t,e;return{c(){t=U("div"),e=U("div"),P(e,"class","floorplan__camera-rotate svelte-17hhq1b"),_(e,"background-image",`url(${n[0]||hn})`),_(e,"width",n[4]),_(e,"height",n[4]),_(e,"left","-"+n[4]),_(e,"top","-"+n[4]),_(e,"transform",`rotate(${n[3]}deg)`),_(e,"transform-origin",`${n[4]} ${n[4]}`),P(t,"class","floorplan__camera-position svelte-17hhq1b"),_(t,"left",n[1]),_(t,"top",n[2])},m(i,s){Z(i,t,s),B(t,e)},p(i,[s]){s&1&&_(e,"background-image",`url(${i[0]||hn})`);const o=s&1;o&&_(e,"width",i[4]),o&&_(e,"height",i[4]),o&&_(e,"left","-"+i[4]),o&&_(e,"top","-"+i[4]),o&&_(e,"transform",`rotate(${i[3]}deg)`),o&&_(e,"transform-origin",`${i[4]} ${i[4]}`)},i:ce,o:ce,d(i){i&&X(t)}}}function pP(n,t,e){let{panoIndex:i}=t,{floorplanData:s}=t,{lastPanoramaLongitude:o}=t,{cameraImageUrl:r}=t;const{observers:a}=s,l=a[i],c=l.positionInImage.x,h=l.positionInImage.y,u=c*100+"%",d=h*100+"%",p=-di(o)+45,m=document.body.clientWidth,g=document.body.clientHeight,y=`${(m<500||g<500?17:37)/16}rem`;return n.$$set=w=>{"panoIndex"in w&&e(5,i=w.panoIndex),"floorplanData"in w&&e(6,s=w.floorplanData),"lastPanoramaLongitude"in w&&e(7,o=w.lastPanoramaLongitude),"cameraImageUrl"in w&&e(0,r=w.cameraImageUrl)},[r,u,d,p,y,i,s,o]}let mP=class extends Ee{constructor(t){super(),Ie(this,t,pP,fP,Me,{panoIndex:5,floorplanData:6,lastPanoramaLongitude:7,cameraImageUrl:0},dP)}};const r1="data:image/png;base64,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";function gP(n){Le(n,"svelte-rpkaro",".floorplan-plugin__compass.svelte-rpkaro{position:absolute;left:50%;top:-2.875rem;width:14.4375rem;height:2.5625rem;will-change:opacity;transform-origin:center 11.5rem}.floorplan-plugin__compass-image.svelte-rpkaro{width:100%;height:100%;position:absolute;left:0;top:0;opacity:0.1;background-repeat:no-repeat;background-size:100% 100%}.floorplan-plugin__compass-text.svelte-rpkaro{position:absolute;left:50%;top:0.9375rem;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:0.625rem;color:#fff}")}function vP(n){let t,e,i,s,o;return{c(){t=U("div"),e=U("div"),i=ue(),s=U("span"),o=Fe(n[0]),P(e,"class","floorplan-plugin__compass-image svelte-rpkaro"),_(e,"background-image",`url(${r1})`),P(s,"class","floorplan-plugin__compass-text svelte-rpkaro"),P(t,"class","floorplan-plugin__compass svelte-rpkaro"),_(t,"transform",n[2])},m(r,a){Z(r,t,a),B(t,e),B(t,i),B(t,s),B(s,o)},p(r,a){a&1&&Ne(o,r[0])},d(r){r&&X(t)}}}function yP(n){let t,e=n[1]&&vP(n);return{c(){e&&e.c(),t=Be()},m(i,s){e&&e.m(i,s),Z(i,t,s)},p(i,[s]){i[1]&&e.p(i,s)},i:ce,o:ce,d(i){e&&e.d(i),i&&X(t)}}}function bP(n,t,e){var c;let{floorplanData:i}=t,{northDesc:s}=t;const o=(c=i.entrance)==null?void 0:c.northRad,r=typeof o=="number",l=`translateX(-50%) translateZ(10px) rotate(${-(o?di(o):0)+90}deg)`;return n.$$set=h=>{"floorplanData"in h&&e(3,i=h.floorplanData),"northDesc"in h&&e(0,s=h.northDesc)},[s,r,l,i]}class AP extends Ee{constructor(t){super(),Ie(this,t,bP,yP,Me,{floorplanData:3,northDesc:0},gP)}}function wP(n){Le(n,"svelte-bl8zrz",".floorplan-plugin__floor.svelte-bl8zrz{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;pointer-events:none}.floorplan-plugin__floor--is-current.svelte-bl8zrz{opacity:1;pointer-events:auto}")}function PP(n){let t,e,i,s,o,r,a,l,c,h,u,d;const p=[{floorIndex:n[2],floorplanData:n[12],roomLabelsEnable:n[6],roomDimensionEnable:n[10]}];let m={};for(let z=0;z<p.length;z+=1)m=pt(m,p[z]);t=new tP({props:m});let g=(n[3]||n[5])&&bf(n);const v=[{floorplanData:n[12],floorIndex:n[2]}];let y={};for(let z=0;z<v.length;z+=1)y=pt(y,v[z]);s=new Su({props:y});const w=[{floorplanData:n[12],floorIndex:n[2]}];let C={};for(let z=0;z<w.length;z+=1)C=pt(C,w[z]);r=new p3({props:C});let E=n[6]&&Af(n),D=n[11]&&wf(n),L=n[4]&&Pf(n),R=n[23]&&Cf(n);return{c(){ge(t.$$.fragment),e=ue(),g&&g.c(),i=ue(),ge(s.$$.fragment),o=ue(),ge(r.$$.fragment),a=ue(),E&&E.c(),l=ue(),D&&D.c(),c=ue(),L&&L.c(),h=ue(),R&&R.c(),u=Be()},m(z,O){pe(t,z,O),Z(z,e,O),g&&g.m(z,O),Z(z,i,O),pe(s,z,O),Z(z,o,O),pe(r,z,O),Z(z,a,O),E&&E.m(z,O),Z(z,l,O),D&&D.m(z,O),Z(z,c,O),L&&L.m(z,O),Z(z,h,O),R&&R.m(z,O),Z(z,u,O),d=!0},p(z,O){const A=O&5188?yt(p,[{floorIndex:z[2],floorplanData:z[12],roomLabelsEnable:z[6],roomDimensionEnable:z[10]}]):{};t.$set(A),z[3]||z[5]?g?(g.p(z,O),O&40&&H(g,1)):(g=bf(z),g.c(),H(g,1),g.m(i.parentNode,i)):g&&(xe(),Y(g,1,1,()=>{g=null}),Se());const M=O&4100?yt(v,[{floorplanData:z[12],floorIndex:z[2]}]):{};s.$set(M);const I=O&4100?yt(w,[{floorplanData:z[12],floorIndex:z[2]}]):{};r.$set(I),z[6]?E?(E.p(z,O),O&64&&H(E,1)):(E=Af(z),E.c(),H(E,1),E.m(l.parentNode,l)):E&&(xe(),Y(E,1,1,()=>{E=null}),Se()),z[11]?D?(D.p(z,O),O&2048&&H(D,1)):(D=wf(z),D.c(),H(D,1),D.m(c.parentNode,c)):D&&(xe(),Y(D,1,1,()=>{D=null}),Se()),z[4]?L?(L.p(z,O),O&16&&H(L,1)):(L=Pf(z),L.c(),H(L,1),L.m(h.parentNode,h)):L&&(xe(),Y(L,1,1,()=>{L=null}),Se()),z[23]?R?(R.p(z,O),O&8388608&&H(R,1)):(R=Cf(z),R.c(),H(R,1),R.m(u.parentNode,u)):R&&(xe(),Y(R,1,1,()=>{R=null}),Se())},i(z){d||(H(t.$$.fragment,z),H(g),H(s.$$.fragment,z),H(r.$$.fragment,z),H(E),H(D),H(L),H(R),d=!0)},o(z){Y(t.$$.fragment,z),Y(g),Y(s.$$.fragment,z),Y(r.$$.fragment,z),Y(E),Y(D),Y(L),Y(R),d=!1},d(z){me(t,z),z&&X(e),g&&g.d(z),z&&X(i),me(s,z),z&&X(o),me(r,z),z&&X(a),E&&E.d(z),z&&X(l),D&&D.d(z),z&&X(c),L&&L.d(z),z&&X(h),R&&R.d(z),z&&X(u)}}}function CP(n){let t,e;return t=new o1({props:{missingFloorConfig:n[19]}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&524288&&(o.missingFloorConfig=i[19]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function bf(n){let t,e;const i=[{floorIndex:n[2],floorplanData:n[12],hoveredRoom:n[25],highlightData:n[18]}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new Tu({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r&33820676?yt(i,[{floorIndex:o[2],floorplanData:o[12],hoveredRoom:o[25],highlightData:o[18]}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function Af(n){let t,e;const i=[{floorplanData:n[12],roomAreaEnable:n[7],roomNameEnable:n[8],roomNameOtherTypeEnable:n[9],roomDimensionEnable:n[10],floorIndex:n[2],getRoomAreaText:n[13],getRoomDimensionText:n[14],getLabelElement:n[15],hoveredRoom:n[25],adaptiveRoomLabelVisibleEnable:n[17]}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new I3({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r&33748868?yt(i,[{floorplanData:o[12],roomAreaEnable:o[7],roomNameEnable:o[8],roomNameOtherTypeEnable:o[9],roomDimensionEnable:o[10],floorIndex:o[2],getRoomAreaText:o[13],getRoomDimensionText:o[14],getLabelElement:o[15],hoveredRoom:o[25],adaptiveRoomLabelVisibleEnable:o[17]}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function wf(n){let t,e;const i=[{floorplanData:n[12],floorIndex:n[2],getRuleDistanceText:n[16]}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new z3({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r&69636?yt(i,[{floorplanData:o[12],floorIndex:o[2],getRuleDistanceText:o[16]}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function Pf(n){let t,e;const i=[{panoIndex:n[0],floorplanData:n[12],lastPanoramaLongitude:n[20],cameraImageUrl:n[21]}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new mP({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r&3149825?yt(i,[{panoIndex:o[0],floorplanData:o[12],lastPanoramaLongitude:o[20],cameraImageUrl:o[21]}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function Cf(n){let t,e;return t=new AP({props:{floorplanData:n[12],northDesc:n[22]}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&4096&&(o.floorplanData=i[12]),s&4194304&&(o.northDesc=i[22]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function MP(n){let t,e,i,s,o;const r=[CP,PP],a=[];function l(c,h){return c[24]?1:0}return e=l(n),i=a[e]=r[e](n),{c(){t=U("div"),i.c(),P(t,"class",s=Mt(`floorplan-plugin__floor${n[1]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz")},m(c,h){Z(c,t,h),a[e].m(t,null),o=!0},p(c,[h]){let u=e;e=l(c),e===u?a[e].p(c,h):(xe(),Y(a[u],1,1,()=>{a[u]=null}),Se(),i=a[e],i?i.p(c,h):(i=a[e]=r[e](c),i.c()),H(i,1),i.m(t,null)),(!o||h&2&&s!==(s=Mt(`floorplan-plugin__floor${c[1]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz"))&&P(t,"class",s)},i(c){o||(H(i),o=!0)},o(c){Y(i),o=!1},d(c){c&&X(t),a[e].d()}}}function IP(n,t,e){let i,s,{panoIndex:o}=t,{isCurrent:r}=t,{floorIndex:a}=t,{highlightEnable:l}=t,{cameraEnable:c}=t,{hoverEnable:h}=t,{roomLabelsEnable:u}=t,{roomAreaEnable:d}=t,{roomNameEnable:p}=t,{roomNameOtherTypeEnable:m}=t,{roomDimensionEnable:g}=t,{ruleLabelsEnable:v}=t,{floorplanData:y}=t,{getRoomAreaText:w}=t,{getRoomDimensionText:C}=t,{getLabelElement:E}=t,{getRuleDistanceText:D}=t,{adaptiveRoomLabelVisibleEnable:L}=t,{highlightData:R}=t,{missingFloorConfig:z}=t,{lastPanoramaLongitude:O}=t,{cameraImageUrl:A}=t,{northDesc:M}=t,{compassEnable:I}=t,{store:k=void 0}=t;const x=xu(void 0);return x.subscribe(S=>{k&&e(26,k.roomOnMouse=S,k)}),n.$$set=S=>{"panoIndex"in S&&e(0,o=S.panoIndex),"isCurrent"in S&&e(1,r=S.isCurrent),"floorIndex"in S&&e(2,a=S.floorIndex),"highlightEnable"in S&&e(3,l=S.highlightEnable),"cameraEnable"in S&&e(4,c=S.cameraEnable),"hoverEnable"in S&&e(5,h=S.hoverEnable),"roomLabelsEnable"in S&&e(6,u=S.roomLabelsEnable),"roomAreaEnable"in S&&e(7,d=S.roomAreaEnable),"roomNameEnable"in S&&e(8,p=S.roomNameEnable),"roomNameOtherTypeEnable"in S&&e(9,m=S.roomNameOtherTypeEnable),"roomDimensionEnable"in S&&e(10,g=S.roomDimensionEnable),"ruleLabelsEnable"in S&&e(11,v=S.ruleLabelsEnable),"floorplanData"in S&&e(12,y=S.floorplanData),"getRoomAreaText"in S&&e(13,w=S.getRoomAreaText),"getRoomDimensionText"in S&&e(14,C=S.getRoomDimensionText),"getLabelElement"in S&&e(15,E=S.getLabelElement),"getRuleDistanceText"in S&&e(16,D=S.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in S&&e(17,L=S.adaptiveRoomLabelVisibleEnable),"highlightData"in S&&e(18,R=S.highlightData),"missingFloorConfig"in S&&e(19,z=S.missingFloorConfig),"lastPanoramaLongitude"in S&&e(20,O=S.lastPanoramaLongitude),"cameraImageUrl"in S&&e(21,A=S.cameraImageUrl),"northDesc"in S&&e(22,M=S.northDesc),"compassEnable"in S&&e(23,I=S.compassEnable),"store"in S&&e(26,k=S.store)},n.$$.update=()=>{n.$$.dirty&4100&&e(27,i=y.floorDatas[a]),n.$$.dirty&134217728&&e(24,s=i.rooms.length>0||i.is_has_wall)},[o,r,a,l,c,h,u,d,p,m,g,v,y,w,C,E,D,L,R,z,O,A,M,I,s,x,k,i]}let EP=class extends Ee{constructor(t){super(),Ie(this,t,IP,MP,Me,{panoIndex:0,isCurrent:1,floorIndex:2,highlightEnable:3,cameraEnable:4,hoverEnable:5,roomLabelsEnable:6,roomAreaEnable:7,roomNameEnable:8,roomNameOtherTypeEnable:9,roomDimensionEnable:10,ruleLabelsEnable:11,floorplanData:12,getRoomAreaText:13,getRoomDimensionText:14,getLabelElement:15,getRuleDistanceText:16,adaptiveRoomLabelVisibleEnable:17,highlightData:18,missingFloorConfig:19,lastPanoramaLongitude:20,cameraImageUrl:21,northDesc:22,compassEnable:23,store:26},wP)}};function kP(n){Le(n,"svelte-86bqav",".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}")}function Mf(n,t,e){const i=n.slice();return i[26]=t[e],i}function If(n){let t,e,i,s=n[15].floorDatas,o=[];for(let a=0;a<s.length;a+=1)o[a]=Ef(Mf(n,s,a));const r=a=>Y(o[a],1,1,()=>{o[a]=null});return{c(){t=U("div");for(let a=0;a<o.length;a+=1)o[a].c();P(t,"class","floorplan-main svelte-86bqav")},m(a,l){Z(a,t,l);for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(t,null);i=!0},p(a,l){if(n=a,l&67108860){s=n[15].floorDatas;let c;for(c=0;c<s.length;c+=1){const h=Mf(n,s,c);o[c]?(o[c].p(h,l),H(o[c],1)):(o[c]=Ef(h),o[c].c(),H(o[c],1),o[c].m(t,null))}for(xe(),c=s.length;c<o.length;c+=1)r(c);Se()}},i(a){if(!i){for(let l=0;l<s.length;l+=1)H(o[l]);e||At(()=>{e=vs(t,Ht,{duration:n[0],easing:Rn}),e.start()}),i=!0}},o(a){o=o.filter(Boolean);for(let l=0;l<o.length;l+=1)Y(o[l]);i=!1},d(a){a&&X(t),Ti(o,a)}}}function Ef(n){let t,e;const i=[{hoverEnable:n[6],highlightEnable:n[7],floorplanData:n[15],getRoomAreaText:n[18],getRoomDimensionText:n[19],getLabelElement:n[20],getRuleDistanceText:n[21],roomLabelsEnable:n[9],roomAreaEnable:n[10],roomNameEnable:n[11],roomNameOtherTypeEnable:n[12],roomDimensionEnable:n[13],ruleLabelsEnable:n[14],adaptiveRoomLabelVisibleEnable:n[22],highlightData:n[23],missingFloorConfig:n[24],panoIndex:n[3],cameraEnable:n[5],cameraImageUrl:n[17],lastPanoramaLongitude:n[16],compassEnable:n[8],northDesc:n[2],store:n[25]},{floorIndex:n[26].floorIndex},{isCurrent:n[26].floorIndex===n[4]},{items:n[26].items}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new EP({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r&67108860?yt(i,[r&67108844&&{hoverEnable:o[6],highlightEnable:o[7],floorplanData:o[15],getRoomAreaText:o[18],getRoomDimensionText:o[19],getLabelElement:o[20],getRuleDistanceText:o[21],roomLabelsEnable:o[9],roomAreaEnable:o[10],roomNameEnable:o[11],roomNameOtherTypeEnable:o[12],roomDimensionEnable:o[13],ruleLabelsEnable:o[14],adaptiveRoomLabelVisibleEnable:o[22],highlightData:o[23],missingFloorConfig:o[24],panoIndex:o[3],cameraEnable:o[5],cameraImageUrl:o[17],lastPanoramaLongitude:o[16],compassEnable:o[8],northDesc:o[2],store:o[25]},r&32768&&{floorIndex:o[26].floorIndex},r&32784&&{isCurrent:o[26].floorIndex===o[4]},r&32768&&{items:o[26].items}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function xP(n){let t,e,i=n[1]&&If(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[1]?i?(i.p(s,o),o&2&&H(i,1)):(i=If(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function SP(n,t,e){let{duration:i=0}=t,{visible:s}=t,{northDesc:o}=t,{panoIndex:r}=t,{floorIndex:a}=t,{cameraEnable:l}=t,{hoverEnable:c}=t,{highlightEnable:h}=t,{compassEnable:u}=t,{roomLabelsEnable:d}=t,{roomAreaEnable:p}=t,{roomNameEnable:m}=t,{roomNameOtherTypeEnable:g}=t,{roomDimensionEnable:v}=t,{ruleLabelsEnable:y}=t,{floorplanData:w}=t,{lastPanoramaLongitude:C}=t,{cameraImageUrl:E}=t,{getRoomAreaText:D}=t,{getRoomDimensionText:L}=t,{getLabelElement:R}=t,{getRuleDistanceText:z}=t,{adaptiveRoomLabelVisibleEnable:O}=t,{highlightData:A}=t,{missingFloorConfig:M}=t,{store:I=void 0}=t;return n.$$set=k=>{"duration"in k&&e(0,i=k.duration),"visible"in k&&e(1,s=k.visible),"northDesc"in k&&e(2,o=k.northDesc),"panoIndex"in k&&e(3,r=k.panoIndex),"floorIndex"in k&&e(4,a=k.floorIndex),"cameraEnable"in k&&e(5,l=k.cameraEnable),"hoverEnable"in k&&e(6,c=k.hoverEnable),"highlightEnable"in k&&e(7,h=k.highlightEnable),"compassEnable"in k&&e(8,u=k.compassEnable),"roomLabelsEnable"in k&&e(9,d=k.roomLabelsEnable),"roomAreaEnable"in k&&e(10,p=k.roomAreaEnable),"roomNameEnable"in k&&e(11,m=k.roomNameEnable),"roomNameOtherTypeEnable"in k&&e(12,g=k.roomNameOtherTypeEnable),"roomDimensionEnable"in k&&e(13,v=k.roomDimensionEnable),"ruleLabelsEnable"in k&&e(14,y=k.ruleLabelsEnable),"floorplanData"in k&&e(15,w=k.floorplanData),"lastPanoramaLongitude"in k&&e(16,C=k.lastPanoramaLongitude),"cameraImageUrl"in k&&e(17,E=k.cameraImageUrl),"getRoomAreaText"in k&&e(18,D=k.getRoomAreaText),"getRoomDimensionText"in k&&e(19,L=k.getRoomDimensionText),"getLabelElement"in k&&e(20,R=k.getLabelElement),"getRuleDistanceText"in k&&e(21,z=k.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in k&&e(22,O=k.adaptiveRoomLabelVisibleEnable),"highlightData"in k&&e(23,A=k.highlightData),"missingFloorConfig"in k&&e(24,M=k.missingFloorConfig),"store"in k&&e(25,I=k.store)},[i,s,o,r,a,l,c,h,u,d,p,m,g,v,y,w,C,E,D,L,R,z,O,A,M,I]}let Du=class extends Ee{constructor(t){super(),Ie(this,t,SP,xP,Me,{duration:0,visible:1,northDesc:2,panoIndex:3,floorIndex:4,cameraEnable:5,hoverEnable:6,highlightEnable:7,compassEnable:8,roomLabelsEnable:9,roomAreaEnable:10,roomNameEnable:11,roomNameOtherTypeEnable:12,roomDimensionEnable:13,ruleLabelsEnable:14,floorplanData:15,lastPanoramaLongitude:16,cameraImageUrl:17,getRoomAreaText:18,getRoomDimensionText:19,getLabelElement:20,getRuleDistanceText:21,adaptiveRoomLabelVisibleEnable:22,highlightData:23,missingFloorConfig:24,store:25},kP)}};const TP="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALaADAAQAAAABAAAAMAAAAADe2FZjAAAEF0lEQVRoBe2WzWskRRiHf13V092TxI2oEzYeVDwITtyDuCiihwiCePGgxIM3vYgHL4J4UIhBRA8i/gPqyUvWg7AiIuIeloDiYUHJLOK6BPwIk9nNODM9Xf1RVe1b3elJRjCZmQ6euqGmuqer33rq4e23GqiOykBloDJQGagMVAYqA5WBykBlYFYD1qwP/tdzaZqOx9zYOLxeX0+L5yzLGp0X/03a25MOnGRcBtx+6Rlo9SL08G4EooFnxa8Yiivox5/h5Ys/4cl7NVorNDRnngX+0MIkVMeMSf23zyKML8J7/Dy8hwF2Buh9CnS+AEQIdLspBuGb+M7/qLW4qJrNpsLapjYhpwVnx3BMfCtNNx3Etc9xywvnMf80wG8HmQainw0RxSGrnmeBp+8k5/j9S0HbvXb5io0Lz880/0wPHV1NlhLd316He+4xOCv5ragF7L9PrH1qBJyB0626x/lC+qrSvH5r/W+n1WpxUM5nMY4GPeH8lHJaPgfeAFQHCL+ntkXT+vnUc3W6pvTIwC0wy3rA4dwLmK2avZ7Eo9uKBuYJfgJscbs8dLCxDMt+EOEPBEZNEWyBYHqTz6bPXrzUnNrSShxHIsYiOL69zrCGLLcLqJP68tB+9w5wj+YhWDafQ2s61wNqxjZhmrQ2pvMFCEvXuCUZ7wqH794ZWs28LJqlTXSUyuksF2M/yOwqgkx2c1ADa4wLAQRk2sAGQQakhN6yFC2hltfz5kSY44NKQeeh+vtI/SSzWhg2CzCgmWISmKUGmaYFBDfCSymnfxJ6/+ospVcWOLLp5DGP/y0P/Rp66O99DQNq7Po3Ds0a0wY+My2QSv2N2mO/OyxR2o6UQk+Lv7yJ06JYSnnolZVU9cUn2O9SmaMWGFBqYXRwbqAJWIi94TX5biotpcGl1DXZ6LnqIbNDTnmUgi52Mv5l5ysMxIcZcGjy2DTK4ZHlcBC14zeSge4qphICjj3bS0A7o9nSp2TOkm7aZ8bGZy/jxhO87V91G0+dfY/Z7BWIIK9KYUi5qy/Hf8YfBG3sqJTHiQWhmTVkbip+wX3x6volVSx+LPAxF+VLXhZ8VQ+iP2Rta/iWe5v42Fngj0BbdnRTXh12ZIcKhTaGbcYjybRwXBU1lu9KlndXp04NM52poKWO0RZsviNaP9a6grkO972+st05pXhE5c1hTEluJy7XUejGUQNLMbAmTdWY1rKBLW3aTJqBZ7nZkb36DhYCreeYHbMUXHvaYi5XDK70EcgulmRjm77wNtenzuXCbmnTRaAx493rbGf3Jr/njMzj920CnKdUaFCjlDioy7NYNvOdGrQJNgI32/L2tkXfFPlxgToqjWVhD6KdLnQRdARf/HHQz2r2X2Gqy8pAZaAyUBmoDFQGKgP/q4F/AJYg9/s0ZoABAAAAAElFTkSuQmCC";function DP(n){return $(this,null,function*(){const t=new Headers({"Content-Type":"text/plain"}),e=function(s){return $(this,null,function*(){const o={index:s.index,url:s.url,svgUrl:s.svg_url};if(s.svg_url){const r=yield fetch(s.svg_url,{headers:t}).then(a=>a.text());o.svgContent=r}return o})};return yield Promise.all(n.map(e))})}function LP(n){const t={id:n.id,size:n.size,name:n.name,customizedName:n.customizedName||"",path:n.path,roomType:n.room_type,floorType:n.floor_type,roomLabel:{position:n.room_label.position,positionInImage:n.room_label.position_in_image},observerIndexs:n.observer_indexs};return n.dimension&&Object.assign(t,{dimension:n.dimension}),t}function zP(n){return{floorName:n.floor_name,floorIndex:n.floor_index,rooms:n.rooms.map(LP),rules:n.rules,is_has_wall:n.is_has_wall}}function OP(n){const t={index:n.index,floorIndex:n.floor_index,position:n.position,positionInImage:n.position_in_image};return n.styled_floorplan_position_in_image&&(t.styledFloorplanPositionInImage={guide:n.styled_floorplan_position_in_image.guide,miniMapFill:n.styled_floorplan_position_in_image.mini_map_fill}),t}function jP(n){return{rad:n.rad,position:n.position,positionInImage:n.position_in_image,northRad:n.north_rad,roomId:n.room_id,floorIndex:n.floor_index}}function un(n){return $(this,null,function*(){var r;const t=yield DP(n.outlines),e=n.computed_data.bounding,i=n.computed_data.floor_datas.map(zP),s=n.computed_data.entrance?jP(n.computed_data.entrance):null,o={outlines:t,entrance:s,bounding:e,floorDatas:i,observers:n.computed_data.observers.map(OP)};return((r=n.styled_floorplan)==null?void 0:r.version)===1&&(o.styledFloorplan={version:1,floors:n.styled_floorplan.floors.map(a=>({floorIndex:a.floor_index,guide:{url:a.guide.url,checksum:a.guide.checksum,width:a.guide.width,height:a.guide.height,floorplanToImage:a.guide.floorplan_to_image},miniMapFill:{url:a.mini_map_fill.url,checksum:a.mini_map_fill.checksum,width:a.mini_map_fill.width,height:a.mini_map_fill.height,floorplanToImage:a.mini_map_fill.floorplan_to_image},roomLabels:a.room_labels.map(l=>de(V({roomId:l.room_id},l.names?{names:l.names}:{}),{position:l.position,positionInImage:l.position_in_image}))}))}),o})}function a1(n,t,e){return n.map(s=>{const o=s.position,r=s.icon?s.icon:{url:TP,width:45,height:48},a=R3(o,t),l=O3(o,e),c=j3(l,e);return{floorIndex:a,icon:r,id:s.id,position:l,positionInImage:c}})}function RP(n,t){return t(n),n}function Wo(n,t){return RP({},e=>{for(const i in n)t.indexOf(i)===-1&&(e[i]=n[i])})}function kf(n,t){const e=Math.max(...n.work.observers.map(i=>i.floorIndex));return t>e?n.model.bounding.max.y:Math.max(...n.work.observers.filter(i=>i.floorIndex===t).map(i=>i.standingPosition.y))}function Qr(n,t,e=as.BOUNDING_CENTER){const i=kf(n,t),s=kf(n,t+1);return e===as.BOUNDING_CENTER?(n.model.bounding.max.y+n.model.bounding.min.y)/2:e===as.CEILING?s:i}function Lu(n,t,e,i){const s=Qr(n,e,i==null?void 0:i.attachedTo),o=new b.Vector3(0,s,0),r=new b.Vector3(1,s,0),a=o.clone().project(n.camera),l=r.clone().project(n.camera);return Math.abs((l.x-a.x)/1e3)*(t.getBoundingClientRect().width/2)}let ys=class{constructor(t,e){f(this,"VERSION","3.81.8");f(this,"NAME");f(this,"five");f(this,"workUtil");f(this,"fiveUtil");f(this,"hooks",new St);f(this,"staticPrefix",Bl);this.five=t,this.fiveUtil=new Sl(t),this.workUtil=this.fiveUtil.workUtil,e!=null&&e.staticPrefix&&(this.staticPrefix=e.staticPrefix)}set workCode(t){this.workUtil.workCode=t,this.onWorkCodeChange()}get workCode(){return this.workUtil.workCode}updateFive(t){this.five=t,this.fiveUtil.five=t,this.workUtil.five=t}getCurrentState(){return this.state}onWorkCodeChange(){}},pn=class extends ys{};var fi=(n=>(n.UnknownError="UnknownError",n.DataNotLoaded="DataNotLoaded",n.UpdateSizeError="UpdateSizeError",n.BreakOffByHide="BreakOffByHide",n.BreakOffByDisable="BreakOffByDisable",n.ModelNotLoaded="ModelNotLoaded",n.ChangeModeError="ChangeModeError",n.UpdateCameraError="UpdateCameraError",n))(fi||{});const l1=500,zu=80;function Vs(n,t,e=4){return Math.abs(n-t)<Math.pow(10,-e)}function c1(n,t,e=4){const i=Math.PI*2,s=n%i,o=t%i,r=Math.min(s,o),a=Math.max(s,o);return Vs(r,a,e)||Vs(r+i,a,e)}Object.assign(window,{nearlyEqual:Vs,nearlyEqualRad:c1});function _P(n){return Object.prototype.toString.call(n)==="[object Object]"}function xf(n){return _P(n)&&!!n.isVector3}function Ou(n,t){return $(this,null,function*(){const[e]=yield Us(n.changeMode(...t));if(e)throw new Error("change mode canceled");yield new Promise(r=>{n.once("initAnimationWillStart",()=>{n.once("initAnimationEnded",()=>r())})});const i=t[1];if(!i)return!0;const s=n.getCurrentState();if(!VP(i,s))throw new Error("pose 与预期不符")})}function VP(n,t){return Object.keys(n).every(e=>{const i=t[e],s=n[e];return i===void 0||s===void 0?!0:e==="longitude"||e==="latitude"?c1(i,s,2):typeof i=="number"&&typeof s=="number"?Vs(i,s,2):xf(s)&&xf(i)?s.distanceTo(i)<.01:i===s})}function FP(n,t,e){const i=n.bounding,s=Math.pow(Math.pow(i.max.x-i.min.x+1,2)+Math.pow(i.max.y-i.min.y+1,2)+Math.pow(i.max.z-i.min.z+1,2),1/2);let o=s/2/Math.tan(Math.PI*t/360);return e<1&&(o=o/e),isNaN(o)?s:o}function BP(n,t){if(n.currentMode!==t.mode)return!1;const{latitude:e,longitude:i,fov:s,offset:o}=t,{latitude:r,longitude:a,offset:l}=n.getCurrentState(),c=n.camera.fov;return!(!Vs(e,r,2)||!Vs(i,a,2)||o!==void 0&&o.distanceTo(l)>.01||!Vs(s,c,2))}function h1(n,t,e=!0){return $(this,null,function*(){if(BP(n,t)===!0)return;const s=n.getCurrentState();if(s.mode!==t.mode){const h=n.models.find(p=>p.name===n.state.workCode),u=typeof t.fov=="number"?t.fov:zu;h&&(t.distance=FP(h,u,n.camera.aspect));const[d]=yield Us(Ou(n,[t.mode,t,void 0,e]));if(d)throw d;return}const{latitude:o,longitude:r,fov:a}=s,l=Math.min(1e3,Math.max(200,Math.abs(o-Math.PI/2)*1e3,(r>Math.PI?2*Math.PI-r:r)*500,typeof t.fov=="number"?Math.abs(a-t.fov)*10:1/0)),[c]=yield Us(n.updateCamera(Wo(t,["mode"]),l,e));if(c)throw new Error(fi.UpdateCameraError)})}function Uo(n,t,e=300){var s,o;const i=n.getElement();if(i){i.style.opacity=t+"";for(let r=0;r<((o=(s=i.parentElement)==null?void 0:s.children)==null?void 0:o.length);r++){const a=i.parentElement.children[r];a instanceof HTMLElement&&a.dataset.infive==="1"&&(a.style.opacity=t+"")}i.style.transition=e===0?"none":`opacity ${e}ms linear`,e!==0&&Promise.race([new Promise(r=>i.addEventListener("transitionend",r,{once:!0})),new Promise(r=>setTimeout(r,e))]).then(()=>{i.style.transition="none"})}}function HP(n){const{latitude:t,longitude:e}=n,i=Math.abs(t-Math.PI/2)>5*Math.PI/180,s=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return i||s}function NP(n){const{latitude:t,longitude:e}=n,i=Math.abs(t-Math.PI/2)<10*Math.PI/180,s=e<30*(Math.PI/180)||e>330*(Math.PI/180);return i&&s}let GP=class extends pn{constructor(e,i){var l,c,h;super(e);f(this,"name","modelFloorplanPlugin");f(this,"state");f(this,"data");f(this,"showState");f(this,"showPromise");f(this,"app");f(this,"panoIndex",0);f(this,"floorIndex",0);f(this,"selector");f(this,"showRejection");f(this,"wrapper");f(this,"container",document.createElement("div"));f(this,"lastPanoramaLongitude",0);f(this,"size",{width:0,height:0});f(this,"defaultMissingFloorConfig");f(this,"hasAddedEventListener",!1);f(this,"isHiddenByHideFunc",!1);f(this,"highlightData",{});f(this,"store",{roomOnMouse:null});f(this,"dispose",()=>{var e,i;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(i=this.container)==null||i.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});f(this,"show",(...i)=>$(this,[...i],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const s=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},s),this._show(e)}));f(this,"hide",(...i)=>$(this,[...i],function*(e={}){this.state.enabled&&(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));f(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper)return!1;const{min:e,max:i}=this.data.bounding,s=i.x-e.x,o=i.y-e.y,r=this.getPxmmWithRotation(),a=Math.ceil(s*r),l=Math.ceil(o*r);return this.size.width===a&&this.size.height===l||(this.container.style.width=a+"px",this.container.style.height=l+"px",this.size={width:a,height:l}),!0});f(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});f(this,"unhighlight",()=>{this.highlightData={},this.render()});f(this,"updateShowState",e=>{this.showState=V(V({},this.showState),e)});f(this,"_disable",e=>{var s,o,r;const{userAction:i}=e;this.hooks.emit("disable",{userAction:i}),(s=this.showRejection)==null||s.call(this,fi.BreakOffByDisable),this.showPromise=void 0,(o=this.app)==null||o.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});f(this,"_enable",e=>{const{userAction:i}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:i}),this.state.visible&&this._show({userAction:i}))});f(this,"_show",e=>$(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(fi.ModelNotLoaded);if(!this.data)throw new Error(fi.DataNotLoaded);if(this.showPromise)return this.showPromise;const i={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},s=V(V({},i),e),o=()=>$(this,null,function*(){this.hooks.emit("show",{userAction:s.userAction,auto:s.isAutoShow});let a=!1,l;this.showRejection=u=>{a=!0,l=u};const[c]=yield Us(h1(this.five,this.showState,s.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(fi.UnknownError);if(!this.updateSize())throw new Error(fi.UpdateSizeError);this.floorIndex=s.floorIndex,this.five.model.show(this.floorIndex)});return this.isHiddenByHideFunc=!1,this.showPromise=o().then(()=>{this.showPromise=void 0,this.showRejection=void 0;const a=s.modelOpacity,l=s.immediately?0:l1;Uo(this.five,a,l),this.render(l),this.hooks.emit("showAnimationEnded",{auto:s.isAutoShow,userAction:s.userAction})}).catch(a=>{if(this.showPromise=void 0,this.showRejection=void 0,this.updateState({visible:!1},s.userAction),!s.isAutoShow&&a instanceof Error)throw a}),this.showPromise}));f(this,"_hide",e=>{var o;(o=this.showRejection)==null||o.call(this,fi.BreakOffByHide),this.showPromise=void 0;const s=V(V({},{userAction:!0,isAutoHide:!1}),e);Uo(this.five,1,0),this.hooks.emit("hide",{auto:s.isAutoHide,userAction:s.userAction}),this.render()});f(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click",this.store.roomOnMouse))return!1});f(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("不正确的父容器选择器");this.wrapper=e,e.append(this.container)});f(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});f(this,"onFiveInteriaPan",(e,i)=>{if(!i||this.state.config.autoShowEnable===!1||this.isHiddenByHideFunc)return;const s=this.five.getCurrentState();s.mode==="Floorplan"&&(this.state.visible||NP(s)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})))});f(this,"onFivePanoArrived",e=>{var i;(i=this.five)!=null&&i.work&&(this.panoIndex=e,this.floorIndex=this.workUtil.observers[e].floorIndex)});f(this,"onFiveCameraUpdate",(e,i)=>{if(!this.state.visible||this.showPromise)return;const s=this.five.getCurrentState();HP(s)&&(this.updateState({visible:!1},i),this._hide({userAction:i,isAutoHide:!0}))});f(this,"onFiveWantsGesture",(e,i)=>{if(this.state.visible&&(i.length>1||e==="mouseWheel"))return!1});f(this,"onFiveWantsPanGesture",(e,i)=>{if(this.five.getCurrentState().mode==="Floorplan"&&this.state.config.autoShowEnable!==!1&&i&&this.state.visible)return this.five.updateCamera(this.showState,0),!1});f(this,"onFiveWantsTapGesture",()=>this.handleClick());f(this,"onFiveWantsChangeMode",(e,i)=>{i==="Panorama"&&e==="Floorplan"&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});f(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const i=this.five.getCurrentState().panoIndex;this.floorIndex=this.workUtil.observers[i].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});i!=null&&i.selector&&(this.selector=i.selector,console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法")),this.showState=V({mode:"Floorplan",longitude:0,latitude:Math.PI/2,fov:zu/((l=i==null?void 0:i.scale)!=null?l:1)},i==null?void 0:i.showState),this.defaultMissingFloorConfig={imageURL:Wi(i==null?void 0:i.staticPrefix,cs),imageWidth:200,imageHeight:120,text:(h=(c=i.i18n)==null?void 0:c.call(i,"暂无平面图"))!=null?h:"暂无平面图",textFontSize:14};const s={northDesc:"北",modelOpacity:1,cameraEnable:!0,highlightEnable:!1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,roomNameOtherTypeEnable:!0,roomDimensionEnable:!0,adaptiveRoomLabelVisibleEnable:!0,cameraImageUrl:hn,attachedTo:as.BOUNDING_CENTER,getLabelElement:void 0,missingFloorConfig:V(V({},this.defaultMissingFloorConfig),i.missingFloorConfig),i18n:u=>u,getRoomAreaText:u=>(u/1e6).toFixed(1)+"㎡",getRoomDimensionText:(u,d)=>(u/1e3).toFixed(1)+"m × "+(d/1e3).toFixed(1)+"m",getRuleDistanceText:u=>u.toString()},o=i?Wo(i,["selector","scale"]):{},r=V(V({},s.missingFloorConfig),o.missingFloorConfig),a=de(V(V({},s),o),{missingFloorConfig:r});this.state={enabled:!0,visible:!1,config:a},this.panoIndex=e.getCurrentState().panoIndex,this.initContainer(),e.once("dispose",this.dispose),this.addEventListener()}load(e,i,s=!0){return $(this,null,function*(){function o(h){return Object.prototype.hasOwnProperty.apply(h,["version"])}const r=e;r&&yi(r.version)&&console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");const a=JSON.parse(JSON.stringify(e)),l=o(a)?a.data:a,c=this.data;this.data=yield un(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),i&&this.updateState(i,s),this.render()})}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}enable(e={}){if(this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||i),this._enable({userAction:i})}disable(e={}){if(!this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||i),this._disable({userAction:i})}setState(e,i={}){const s=this.state,o=i.userAction!==void 0?i.userAction:!0;if(this.updateState(e,o),e.enabled!==void 0&&s.enabled!==e.enabled&&(e.enabled?this._enable({userAction:o}):this._disable({userAction:o})),e.visible!==void 0&&s.visible!==e.visible){const r={userAction:o};e.visible?this._show(r):this._hide(r)}this.render()}changeConfigs(e,i=!0){this.updateState({config:e},i),this.render()}getPxmmWithRotation(){if(!this.wrapper)return 0;const e=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,i=this.showState.longitude,s=Math.abs((i%(2*Math.PI)+2*Math.PI)%(2*Math.PI));return s>Math.PI/4&&s<3*Math.PI/4||s>5*Math.PI/4&&s<7*Math.PI/4?this.getPxmmZAxis(e):Lu(this.five,this.wrapper,this.floorIndex,e)}getPxmmZAxis(e){if(!this.wrapper)return 0;const i=Qr(this.five,this.floorIndex,e==null?void 0:e.attachedTo),s=new b.Vector3(0,i,0),o=new b.Vector3(0,i,1),r=s.clone().project(this.five.camera),a=o.clone().project(this.five.camera);return Math.abs((a.x-r.x)/1e3)*(this.wrapper.getBoundingClientRect().width/2)}formatData(e){return $(this,null,function*(){return yield un(e.data)})}updateState(e,i){var a;const s=this.state,o=(a=e.config)!=null&&a.missingFloorConfig?V(V({},s.config.missingFloorConfig),e.config.missingFloorConfig):s.config.missingFloorConfig,r=e.config?de(V(V({},s.config),e.config),{missingFloorConfig:o}):s.config;this.state=de(V(V({},this.state),e),{config:r}),!Wt(this.state,s,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:i})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.on("modeChange",this.onFiveModeChange),e.on("interiaPan",this.onFiveInteriaPan),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("interiaPan",this.onFiveInteriaPan),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0||this.showPromise)return;const i=de(V({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude,highlightData:this.highlightData,store:this.store});if(this.app)return this.app.$set(i);this.app=new Du({target:this.container,intro:!0,props:i})}};const WP=(n,t)=>new GP(n,t),Sf=[{type:0,description:"车-2",href:"resource/items/{{ theme }}/car_2.png",width:4200,height:1800,tag:"其他",direction:3,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:1,description:"车-1",href:"resource/items/{{ theme }}/car_1.png",width:1900,height:4300,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:2,description:"中厨-1",href:"resource/items/{{ theme }}/kitchen_1.png",width:3158,height:1400,tag:"厨房",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:3,description:"8人餐桌",href:"resource/items/{{ theme }}/table_for_8.png",width:3240,height:1800,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:4,description:"衣柜-1",href:"resource/items/{{ theme }}/wardrobe_1.png",width:1820,height:600,tag:"卧室",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:5,description:"浴缸-2",href:"resource/items/{{ theme }}/bathtub_2.png",width:1500,height:694,tag:"卫生间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:6,description:"衣柜-3",href:"resource/items/{{ theme }}/wardrobe_3.png",width:2830,height:600,tag:"卧室",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:7,description:"植物-4",href:"resource/items/{{ theme }}/plant_4.png",width:700,height:628,tag:"装饰类",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:8,description:"植物-1",href:"resource/items/{{ theme }}/plant_1.png",width:700,height:565,tag:"装饰类",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:9,description:"植物-6",href:"resource/items/{{ theme }}/plant_6.png",width:800,height:758,tag:"装饰类",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:10,description:"书桌-1",href:"resource/items/{{ theme }}/desk_1.png",width:1200,height:930,tag:"书房",direction:0,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:11,description:"瓶艺-1",href:"resource/items/{{ theme }}/bottle_art_1.png",width:530,height:520,tag:"装饰类",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:12,description:"衣柜-2",href:"resource/items/{{ theme }}/wardrobe_2.png",width:2310,height:600,tag:"卧室",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:13,description:"植物-2",href:"resource/items/{{ theme }}/plant_2.png",width:600,height:600,tag:"装饰类",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:14,description:"西厨-1",href:"resource/items/{{ theme }}/western_kitchen_1.png",width:2180,height:550,tag:"厨房",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:15,description:"西厨-2",href:"resource/items/{{ theme }}/western_kitchen_2.png",width:1480,height:550,tag:"厨房",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:16,description:"浴缸-1",href:"resource/items/{{ theme }}/bathtub_1.png",width:1500,height:956,tag:"卫生间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:17,description:"植物-3",href:"resource/items/{{ theme }}/plant_3.png",width:700,height:639,tag:"装饰类",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:18,description:"书桌-2",href:"resource/items/{{ theme }}/desk_2.png",width:2200,height:2470,tag:"书房",direction:3,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:19,description:"吧台",href:"resource/items/{{ theme }}/bar_counter.png",width:1800,height:1130,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:20,description:"书柜-短",href:"resource/items/{{ theme }}/bookcase_short.png",width:1460,height:350,tag:"书房",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:21,description:"鞋柜-长",href:"resource/items/{{ theme }}/shoe_cabinet_long.png",width:2059,height:550,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:22,description:"鞋柜-短",href:"resource/items/{{ theme }}/shoe_cabinet_short.png",width:1308,height:550,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:23,description:"中厨-2",href:"resource/items/{{ theme }}/kitchen_2.png",width:2020,height:650,tag:"厨房",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:24,description:"椅子",href:"resource/items/{{ theme }}/chair.png",width:1050,height:950,tag:"客厅",direction:1,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:25,description:"秋千",href:"resource/items/{{ theme }}/swing.png",width:1600,height:1370,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:26,description:"茶几",href:"resource/items/{{ theme }}/tea_table.png",width:1090,height:800,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:27,description:"庭院",href:"resource/items/{{ theme }}/courtyard.png",width:2100,height:3020,tag:"其他",direction:3,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:28,description:"躺椅",href:"resource/items/{{ theme }}/deck_chair.png",width:900,height:1850,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:29,description:"钢琴",href:"resource/items/{{ theme }}/piano.png",width:1900,height:2260,tag:"其他",direction:0,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:30,description:"音响",href:"resource/items/{{ theme }}/sound.png",width:2500,height:550,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:31,description:"马桶",href:"resource/items/{{ theme }}/flush_toilet.png",width:450,height:750,tag:"卫生间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:32,description:"植物-5",href:"resource/items/{{ theme }}/plant_5.png",width:544,height:600,tag:"装饰类",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:33,description:"书柜-长",href:"resource/items/{{ theme }}/bookcase_long.png",width:2040,height:350,tag:"书房",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:34,description:"燃气灶-1",href:"resource/items/{{ theme }}/gas_stove_1.png",width:820,height:450,tag:"厨房",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:35,description:"洗脸池-单",href:"resource/items/{{ theme }}/wash_basin_single.png",width:1150,height:500,tag:"卫生间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:36,description:"洗手池-单",href:"resource/items/{{ theme }}/sink_single.png",width:1200,height:500,tag:"卫生间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:37,description:"双人床-4",href:"resource/items/{{ theme }}/double_4.png",width:2743,height:2e3,tag:"卧室",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:38,description:"电视柜-短",href:"resource/items/{{ theme }}/tv_cabinet_short.png",width:1580,height:350,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:39,description:"储物柜-1",href:"resource/items/{{ theme }}/locker_1.png",width:1400,height:600,tag:"储物间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:40,description:"双人床-3",href:"resource/items/{{ theme }}/double_3.png",width:2791,height:2300,tag:"卧室",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:41,description:"双人床-2",href:"resource/items/{{ theme }}/double_2.png",width:2791,height:2300,tag:"卧室",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:42,description:"洗手池-双",href:"resource/items/{{ theme }}/sink_double.png",width:2777,height:600,tag:"卫生间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:43,description:"洗脸池-双",href:"resource/items/{{ theme }}/wash_basin_double.png",width:2550,height:600,tag:"卫生间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:44,description:"双人床(无床头柜)-1",href:"resource/items/{{ theme }}/double_bed_without_bedside_table_1.png",width:1914,height:2e3,tag:"卧室",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:45,description:"电视柜-长",href:"resource/items/{{ theme }}/tv_cabinet_long.png",width:2040,height:350,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:46,description:"洽谈桌组合",href:"resource/items/{{ theme }}/negotiation_table_combination.png",width:2830,height:950,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:47,description:"哑铃架",href:"resource/items/{{ theme }}/dumbbell_rack.png",width:900,height:650,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:48,description:"沙发组合-1",href:"resource/items/{{ theme }}/sofa_combination_1.png",width:4e3,height:2792,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:49,description:"游泳池-2",href:"resource/items/{{ theme }}/swimming_pool_2.png",width:7680,height:3800,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:50,description:"美人榻",href:"resource/items/{{ theme }}/beauty_couch.png",width:1600,height:520,tag:"卧室",direction:1,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:51,description:"单人床(无床头柜)",href:"resource/items/{{ theme }}/single_bed_without_bedside_table.png",width:1200,height:2120,tag:"卧室",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:52,description:"沙发组合-2",href:"resource/items/{{ theme }}/sofa_combination_2.png",width:2e3,height:2054,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:53,description:"跑步机",href:"resource/items/{{ theme }}/treadmill.png",width:2120,height:950,tag:"其他",direction:1,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:54,description:"储物柜-3",href:"resource/items/{{ theme }}/lockers_3.png",width:2400,height:1360,tag:"储物间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:55,description:"洗菜池-1",href:"resource/items/{{ theme }}/vegetable_washing_pool_1.png",width:760,height:470,tag:"厨房",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:56,description:"组合沙发-4",href:"resource/items/{{ theme }}/combination_sofa_4.png",width:1800,height:1595,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:57,description:"台球桌",href:"resource/items/{{ theme }}/pool_table.png",width:2540,height:1400,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:58,description:"置物台-1",href:"resource/items/{{ theme }}/shelf_1.png",width:1632,height:560,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:59,description:"储物柜-2",href:"resource/items/{{ theme }}/locker_2.png",width:2640,height:600,tag:"储物间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:60,description:"户外桌椅",href:"resource/items/{{ theme }}/outdoor_tables_and_chairs.png",width:3e3,height:2800,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:61,description:"洗衣机-1",href:"resource/items/{{ theme }}/washing_machine_1.png",width:850,height:600,tag:"卫生间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:62,description:"双人床-1",href:"resource/items/{{ theme }}/double_1.png",width:2851,height:2200,tag:"卧室",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:63,description:"六人餐桌",href:"resource/items/{{ theme }}/table_for_six.png",width:2230,height:1700,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:64,description:"洽谈沙发椅",href:"resource/items/{{ theme }}/sofa_chair.png",width:1e3,height:950,tag:"其他",direction:1,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:65,description:"三人沙发",href:"resource/items/{{ theme }}/three_seat_sofa.png",width:2670,height:950,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:66,description:"会客桌",href:"resource/items/{{ theme }}/reception_table.png",width:1800,height:1800,tag:"其他",direction:1,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:67,description:"健身机",href:"resource/items/{{ theme }}/fitness_machine.png",width:2200,height:800,tag:"其他",direction:1,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:68,description:"沙发组合-3",href:"resource/items/{{ theme }}/sofa_combination_3.png",width:2670,height:2330,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:69,description:"双开冰箱",href:"resource/items/{{ theme }}/double_refrigerator.png",width:720,height:600,tag:"厨房",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:70,description:"车库工具箱",href:"resource/items/{{ theme }}/garage_toolbox.png",width:1280,height:500,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:71,description:"储物柜-4",href:"resource/items/{{ theme }}/locker_4.png",width:2440,height:2440,tag:"储物间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:72,description:"临时餐台",href:"resource/items/{{ theme }}/temporary_dining_table.png",width:1e3,height:1500,tag:"厨房",direction:1,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:73,description:"置物台-2",href:"resource/items/{{ theme }}/shelf_2.png",width:1590,height:600,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:74,description:"四人餐桌",href:"resource/items/{{ theme }}/table_for_four.png",width:1700,height:1700,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:75,description:"洽谈桌",href:"resource/items/{{ theme }}/negotiating_table.png",width:950,height:950,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:76,description:"游泳池-1",href:"resource/items/{{ theme }}/swimming_pool_1.png",width:4300,height:5340,tag:"其他",direction:1,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:77,description:"毛巾凳",href:"resource/items/{{ theme }}/towel_stool.png",width:800,height:500,tag:"卫生间",direction:0,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:78,description:"电梯",href:"resource/items/{{ theme }}/lift.png",width:2e3,height:2e3,tag:"楼梯",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:79,description:"AC",href:"resource/items/{{ theme }}/ac.png",width:850,height:320,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:80,description:"二人餐桌",href:"resource/items/{{ theme }}/table_for_two.png",width:780,height:1500,tag:"客厅",direction:1,keywords:["default"],themes:["realsee"],label:!0},{type:81,description:"双人床(无床头柜)-2",href:"resource/items/{{ theme }}/double_bed_without_bedside_table_2.png",width:1500,height:2200,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:82,description:"双人床(无床头柜)-3",href:"resource/items/{{ theme }}/double_bed_without_bedside_table_3.png",width:1800,height:2200,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:83,description:"床头柜",href:"resource/items/{{ theme }}/bedstand.png",width:500,height:500,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:84,description:"单开门冰箱",href:"resource/items/{{ theme }}/refrigerator.png",width:650,height:670,tag:"厨房",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:85,description:"沙发组合-5",href:"resource/items/{{ theme }}/sofa_combination_5.png",width:1598,height:1418,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:86,description:"沙发组合-6",href:"resource/items/{{ theme }}/sofa_combination_6.png",width:2680,height:1790,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:87,description:"四人餐桌-1",href:"resource/items/{{ theme }}/table_for_four_1.png",width:1600,height:1700,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:88,description:"小单人沙发",href:"resource/items/{{ theme }}/chair_2.png",width:460,height:416,tag:"客厅",direction:1,keywords:["default"],themes:["realsee"],label:!0},{type:89,description:"小洗手池",href:"resource/items/{{ theme }}/sink_small.png",width:600,height:500,tag:"卫生间",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:90,description:"小厨",href:"resource/items/{{ theme }}/kitchen_small.png",width:740,height:550,tag:"厨房",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:91,description:"小衣柜",href:"resource/items/{{ theme }}/wardrobe_small.png",width:910,height:600,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:92,description:"淋浴房",href:"resource/items/{{ theme }}/shower.png",width:650,height:670,tag:"卫生间",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:93,description:"鞋柜-1",href:"resource/items/{{ theme }}/shoe_cabinet_1.png",width:900,height:400,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:94,description:"鞋柜-2",href:"resource/items/{{ theme }}/shoe_cabinet_2.png",width:1500,height:400,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:95,description:"鞋柜-3",href:"resource/items/{{ theme }}/shoe_cabinet_3.png",width:2e3,height:400,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:96,description:"电视柜-1",href:"resource/items/{{ theme }}/tv_cabinet_1.png",width:1500,height:350,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:97,description:"电视柜-2",href:"resource/items/{{ theme }}/tv_cabinet_2.png",width:2040,height:350,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:98,description:"电视柜-3",href:"resource/items/{{ theme }}/tv_cabinet_3.png",width:3e3,height:350,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:99,description:"餐边柜-1",href:"resource/items/{{ theme }}/sideboard_1.png",width:900,height:550,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:100,description:"餐边柜-2",href:"resource/items/{{ theme }}/sideboard_2.png",width:1500,height:550,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:101,description:"餐边柜-3",href:"resource/items/{{ theme }}/sideboard_3.png",width:2e3,height:550,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:102,description:"燃气灶-2",href:"resource/items/{{ theme }}/gas_stove_2.png",width:900,height:550,tag:"厨房",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:103,description:"洗菜池-2",href:"resource/items/{{ theme }}/vegetable_washing_pool_2.png",width:900,height:550,tag:"厨房",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:104,description:"橱柜-1",href:"resource/items/{{ theme }}/kitchen_cabinet_1.png",width:550,height:550,tag:"厨房",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:105,description:"橱柜-2",href:"resource/items/{{ theme }}/kitchen_cabinet_2.png",width:900,height:550,tag:"厨房",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:106,description:"花洒",href:"resource/items/{{ theme }}/shower_head.png",width:260,height:200,tag:"卫生间",direction:1,keywords:["default"],themes:["realsee"],label:!0},{type:107,description:"淋浴屏",href:"resource/items/{{ theme }}/shower_panel.png",width:1500,height:100,tag:"卫生间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:108,description:"洗衣机-2",href:"resource/items/{{ theme }}/washing_machine_2.png",width:600,height:500,tag:"卫生间",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:109,description:"双人床-5",href:"resource/items/{{ theme }}/double_5.png",width:1500,height:2e3,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:110,description:"双人床-6",href:"resource/items/{{ theme }}/double_6.png",width:1800,height:2e3,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:111,description:"双人床-7",href:"resource/items/{{ theme }}/double_7.png",width:2e3,height:2200,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:112,description:"双人床-8",href:"resource/items/{{ theme }}/double_8.png",width:2300,height:2200,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:113,description:"梳妆台",href:"resource/items/{{ theme }}/dressing_table.png",width:1200,height:900,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:114,description:"儿童床-1",href:"resource/items/{{ theme }}/children_bed_1.png",width:1400,height:2e3,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:115,description:"儿童床-2",href:"resource/items/{{ theme }}/children_bed_2.png",width:1700,height:2e3,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:116,description:"儿童床-3",href:"resource/items/{{ theme }}/children_bed_3.png",width:2e3,height:2200,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:117,description:"儿童书桌-1",href:"resource/items/{{ theme }}/children_desk_1.png",width:1e3,height:800,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:118,description:"儿童书桌-2",href:"resource/items/{{ theme }}/children_desk_2.png",width:1200,height:800,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:119,description:"儿童书桌-3",href:"resource/items/{{ theme }}/children_desk_3.png",width:1500,height:800,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:120,description:"儿童活动区域-1",href:"resource/items/{{ theme }}/children_carpet_1.png",width:600,height:600,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:121,description:"儿童活动区域-2",href:"resource/items/{{ theme }}/children_carpet_2.png",width:1200,height:1200,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:122,description:"儿童活动区域-3",href:"resource/items/{{ theme }}/children_carpet_3.png",width:1800,height:1800,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:123,description:"茶榻组合-1",href:"resource/items/{{ theme }}/tea_table_combination_1.png",width:2e3,height:1400,tag:"其他",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:124,description:"茶榻组合-2",href:"resource/items/{{ theme }}/tea_table_combination_2.png",width:2500,height:1400,tag:"其他",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:125,description:"茶榻组合-3",href:"resource/items/{{ theme }}/tea_table_combination_3.png",width:3e3,height:1800,tag:"其他",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:126,description:"儿童衣柜-1",href:"resource/items/{{ theme }}/children_wardrobe_1.png",width:900,height:500,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:127,description:"儿童衣柜-2",href:"resource/items/{{ theme }}/children_wardrobe_2.png",width:1200,height:500,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:128,description:"儿童衣柜-3",href:"resource/items/{{ theme }}/children_wardrobe_3.png",width:1500,height:500,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:129,description:"儿童书柜-1",href:"resource/items/{{ theme }}/children_bookcase_1.png",width:800,height:450,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:130,description:"儿童书柜-2",href:"resource/items/{{ theme }}/children_bookcase_2.png",width:1200,height:450,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:131,description:"折行双跑楼梯",href:"resource/items/{{ theme }}/folding_double_running_stairs.png",width:3e3,height:3e3,tag:"楼梯",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:132,description:"平行双跑楼梯",href:"resource/items/{{ theme }}/parallel_double_running_stairs.png",width:2500,height:3600,tag:"楼梯",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:133,description:"折行三跑楼梯",href:"resource/items/{{ theme }}/folding_treble_running_stairs.png",width:4300,height:2700,tag:"楼梯",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:134,description:"手枪",href:"resource/items/{{ theme }}/pistol.png",width:500,height:500,tag:"物证痕迹",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!1},{type:135,description:"血迹",href:"resource/items/{{ theme }}/bloodstain.png",width:500,height:500,tag:"物证痕迹",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!1},{type:136,description:"手印",href:"resource/items/{{ theme }}/handprint.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["legacy","realsee"],label:!1},{type:137,description:"足迹",href:"resource/items/{{ theme }}/footprint.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["legacy","realsee"],label:!1},{type:138,description:"车轮轨迹",href:"resource/items/{{ theme }}/wheelprint.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["legacy","realsee"],label:!1},{type:139,description:"弹头",href:"resource/items/{{ theme }}/bullet.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["legacy","realsee"],label:!1},{type:140,description:"弹壳",href:"resource/items/{{ theme }}/shell.png",width:500,height:500,tag:"物证痕迹",direction:1,keywords:["default"],themes:["legacy","realsee"],label:!1},{type:141,description:"尸体",href:"resource/items/{{ theme }}/corpse.png",width:1500,height:1500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["legacy","realsee"],label:!1},{type:142,description:"空气净化器",href:"resource/items/{{ theme }}/airscrubber.png",width:580,height:380,tag:"其他",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:143,description:"吹风机",href:"resource/items/{{ theme }}/airblower.png",width:640,height:600,tag:"其他",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:144,description:"除湿器",href:"resource/items/{{ theme }}/dehumidifier.png",width:480,height:430,tag:"其他",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:145,description:"冰柜",href:"resource/items/{{ theme }}/freezer.png",width:800,height:460,tag:"厨房",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:146,description:"架子",href:"resource/items/{{ theme }}/shelf.png",width:1e3,height:380,tag:"其他",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:147,description:"杂物",href:"resource/items/{{ theme }}/sundries.png",width:800,height:800,tag:"其他",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:148,description:"L型沙发",href:"resource/items/{{ theme }}/L_sofa.png",width:3500,height:1800,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:149,description:"书桌3",href:"resource/items/{{ theme }}/desk_3.png",width:1200,height:680,tag:"书房",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:150,description:"会议桌-1",href:"resource/items/{{ theme }}/conference_table_1.png",width:1600,height:1100,tag:"客厅",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:151,description:"衣架",href:"resource/items/{{ theme }}/coat_hanger.png",width:1200,height:400,tag:"卧室",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:152,description:"上下铺",href:"resource/items/{{ theme }}/bunk_beds.png",width:2e3,height:1040,tag:"卧室",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:153,description:"蹲坑",href:"resource/items/{{ theme }}/squatting.png",width:600,height:480,tag:"卫生间",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:154,description:"男尸",href:"resource/items/{{ theme }}/male_corpse.png",width:1600,height:800,tag:"物证痕迹",direction:1,keywords:["default"],themes:["realsee"],label:!1},{type:155,description:"女尸",href:"resource/items/{{ theme }}/female_corpse.png",width:1500,height:800,tag:"物证痕迹",direction:1,keywords:["default"],themes:["realsee"],label:!1},{type:156,description:"擦蹭状血迹",href:"resource/items/{{ theme }}/rub-like-bookd-stains.png",width:1200,height:800,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:157,description:"擦拭物",href:"resource/items/{{ theme }}/wipes.png",width:300,height:60,tag:"物证痕迹",direction:3,keywords:["default"],themes:["realsee"],label:!1},{type:158,description:"纸团",href:"resource/items/{{ theme }}/paper_ball.png",width:400,height:400,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:159,description:"未整理的被子",href:"resource/items/{{ theme }}/unarranged_quilts.png",width:800,height:500,tag:"其他",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:160,description:"手机",href:"resource/items/{{ theme }}/mobile_phone.png",width:400,height:280,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:161,description:"菜刀",href:"resource/items/{{ theme }}/kitchen_knife.png",width:500,height:220,tag:"物证痕迹",direction:3,keywords:["default"],themes:["realsee"],label:!1},{type:162,description:"矩形",href:"resource/items/{{ theme }}/rectangle.png",width:900,height:600,tag:"自定义",direction:0,keywords:["default"],themes:["realsee"],label:!0,svgWidth:90,svgHeight:60,svg:'<rect x=".75" y=".75" width="88.5" height="58.5" rx="4" fill="#FFF" stroke="#3D404E" fill-rule="evenodd" vector-effect="non-scaling-stroke"/>'},{type:163,description:"圆形",href:"resource/items/{{ theme }}/circle.png",width:600,height:600,tag:"自定义",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:164,description:"三角形",href:"resource/items/{{ theme }}/triangle.png",width:600,height:600,tag:"自定义",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:165,description:"五角星形",href:"resource/items/{{ theme }}/five_pointedstar.png",width:800,height:800,tag:"自定义",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:166,description:"会议桌-2",href:"resource/items/{{ theme }}/conference_table_2.png",width:2800,height:1800,tag:"客厅",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:167,description:"餐椅",href:"resource/items/{{ theme }}/dining_chair.png",width:500,height:580,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:168,description:"转椅-1",href:"resource/items/{{ theme }}/rotating_chair_1.png",width:500,height:580,tag:"书房",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:169,description:"转椅-2",href:"resource/items/{{ theme }}/rotating_chair_2.png",width:640,height:640,tag:"书房",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:170,description:"长方形茶几",href:"resource/items/{{ theme }}/rectangular_coffee_table.png",width:1090,height:800,tag:"客厅",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:171,description:"抽油烟机",href:"resource/items/{{ theme }}/smoke_lampblack_machine.png",width:1200,height:800,tag:"厨房",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:172,description:"电话机",href:"resource/items/{{ theme }}/telephone.png",width:500,height:500,tag:"日常用品",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:173,description:"对讲机",href:"resource/items/{{ theme }}/walkie_talkie.png",width:240,height:540,tag:"日常用品",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:174,description:"花盆",href:"resource/items/{{ theme }}/flower_pot.png",width:500,height:500,tag:"其他",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:175,description:"剪刀",href:"resource/items/{{ theme }}/scissors.png",width:500,height:460,tag:"日常用品",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:176,description:"角柜",href:"resource/items/{{ theme }}/corner_cabinet.png",width:1e3,height:1e3,tag:"其他",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:177,description:"口杯",href:"resource/items/{{ theme }}/mouth_cup.png",width:500,height:400,tag:"日常用品",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:178,description:"盘子",href:"resource/items/{{ theme }}/plate.png",width:500,height:500,tag:"日常用品",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:179,description:"勺子",href:"resource/items/{{ theme }}/spoon.png",width:600,height:180,tag:"日常用品",direction:1,keywords:["default"],themes:["realsee"],label:!1},{type:180,description:"手提包",href:"resource/items/{{ theme }}/handbag.png",width:500,height:500,tag:"日常用品",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:181,description:"双人沙发",href:"resource/items/{{ theme }}/double_sofa.png",width:1600,height:850,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:182,description:"藤椅",href:"resource/items/{{ theme }}/cane_chair.png",width:640,height:640,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:183,description:"拖把",href:"resource/items/{{ theme }}/mop.png",width:490,height:1e3,tag:"日常用品",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:184,description:"卫生纸",href:"resource/items/{{ theme }}/toilet_paper.png",width:280,height:300,tag:"日常用品",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:185,description:"烟盒",href:"resource/items/{{ theme }}/cigarette_case.png",width:220,height:300,tag:"日常用品",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:186,description:"烟头",href:"resource/items/{{ theme }}/cigarette_butt.png",width:280,height:220,tag:"日常用品",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:187,description:"鱼缸",href:"resource/items/{{ theme }}/fish_tank.png",width:1e3,height:500,tag:"客厅",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:188,description:"笔记本电脑",href:"resource/items/{{ theme }}/notebook_computer.png",width:500,height:500,tag:"日常用品",direction:2,keywords:["default"],themes:["realsee"],label:!1},{type:189,description:"微波炉",href:"resource/items/{{ theme }}/microwave_oven.png",width:600,height:400,tag:"厨房",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:190,description:"断口",href:"resource/items/{{ theme }}/fracture.png",width:1200,height:300,tag:"其他",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:191,description:"遗物堆",href:"resource/items/{{ theme }}/relic_pile.png",width:800,height:800,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:192,description:"衣物",href:"resource/items/{{ theme }}/clothing.png",width:830,height:810,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:193,description:"浴巾",href:"resource/items/{{ theme }}/bath_towel.png",width:420,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:194,description:"水渍",href:"resource/items/{{ theme }}/water_stains.png",width:1070,height:600,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:195,description:"螺丝刀",href:"resource/items/{{ theme }}/bolt_driver.png",width:300,height:300,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:196,description:"凉鞋",href:"resource/items/{{ theme }}/sandals.png",width:430,height:460,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:197,description:"水果刀",href:"resource/items/{{ theme }}/fruit_knife.png",width:300,height:260,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:198,description:"匕首",href:"resource/items/{{ theme }}/dragger.png",width:400,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:199,description:"玻璃弹孔",href:"resource/items/{{ theme }}/glass_bullet_hole.png",width:1160,height:1e3,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:200,description:"电视",href:"resource/items/{{ theme }}/tv.png",width:1120,height:160,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!1},{type:201,description:"单向楼梯",href:"resource/items/{{ theme }}/stairs.png",width:1400,height:3600,tag:"楼梯",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:202,description:"电脑",href:"resource/items/{{ theme }}/computer.png",width:700,height:120,tag:"书房",direction:2,keywords:["default"],themes:["realsee"],label:!1},{type:203,description:"工具",href:"resource/items/{{ theme }}/tool.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:204,description:"特殊",href:"resource/items/{{ theme }}/special.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:205,description:"生物",href:"resource/items/{{ theme }}/biology.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:206,description:"毒化",href:"resource/items/{{ theme }}/poison.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:207,description:"理化",href:"resource/items/{{ theme }}/physics&chemistry.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:208,description:"文检",href:"resource/items/{{ theme }}/document.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:209,description:"电子",href:"resource/items/{{ theme }}/electronic.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:210,description:"人像",href:"resource/items/{{ theme }}/portrait.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:211,description:"提取物品",href:"resource/items/{{ theme }}/extract_items.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:212,description:"左脚足迹",href:"resource/items/{{ theme }}/footprint_l.png",width:220,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:213,description:"右脚足迹",href:"resource/items/{{ theme }}/footprint_r.png",width:220,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:214,description:"电动车",href:"resource/items/{{ theme }}/electric_car.png",width:480,height:1320,tag:"交通工具",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:215,description:"自行车",href:"resource/items/{{ theme }}/bike.png",width:380,height:1480,tag:"交通工具",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:216,description:"摩托车",href:"resource/items/{{ theme }}/motorcycle.png",width:500,height:1780,tag:"交通工具",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:217,description:"越野车",href:"resource/items/{{ theme }}/off_road_vehicle.png",width:1700,height:4360,tag:"交通工具",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:218,description:"卡车",href:"resource/items/{{ theme }}/truck.png",width:1880,height:6800,tag:"交通工具",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:219,description:"客车",href:"resource/items/{{ theme }}/bus.png",width:3160,height:8e3,tag:"交通工具",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:220,description:"叉车",href:"resource/items/{{ theme }}/forklift.png",width:940,height:2720,tag:"交通工具",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:221,description:"拖拉机",href:"resource/items/{{ theme }}/tractor.png",width:1740,height:3060,tag:"交通工具",direction:0,keywords:["default"],themes:["realsee"],label:!1}],UP="//vr-image-4.realsee-cdn.cn/release/static/image/doctorstrange/0.6.201-beta/";function QP(n){const{latitude:t,longitude:e}=n,i=Math.abs(t-Math.PI/2)>5*Math.PI/180,s=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return i||s}function XP(n){const{latitude:t,longitude:e}=n,i=Math.abs(t-Math.PI/2)<10*Math.PI/180,s=e<30*(Math.PI/180)||e>330*(Math.PI/180);return i&&s}let YP=class extends pn{constructor(e,i){var l,c,h;super(e);f(this,"name","modelFloorplanPlugin");f(this,"state");f(this,"data");f(this,"showState");f(this,"showPromise");f(this,"app");f(this,"panoIndex",0);f(this,"floorIndex",0);f(this,"selector");f(this,"showRejection");f(this,"wrapper");f(this,"container",document.createElement("div"));f(this,"lastPanoramaLongitude",0);f(this,"size",{width:0,height:0});f(this,"defaultMissingFloorConfig");f(this,"hasAddedEventListener",!1);f(this,"isHiddenByHideFunc",!1);f(this,"highlightData",{});f(this,"items");f(this,"store",{roomOnMouse:null});f(this,"dispose",()=>{var e,i;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(i=this.container)==null||i.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});f(this,"show",(...i)=>$(this,[...i],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const s=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},s),this._show(e)}));f(this,"hide",(...i)=>$(this,[...i],function*(e={}){this.state.enabled&&(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));f(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper)return!1;const{min:e,max:i}=this.data.bounding,s=i.x-e.x,o=i.y-e.y,r=this.getPxmmWithRotation(),a=Math.ceil(s*r),l=Math.ceil(o*r);return this.size.width===a&&this.size.height===l||(this.container.style.width=a+"px",this.container.style.height=l+"px",this.size={width:a,height:l}),!0});f(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});f(this,"unhighlight",()=>{this.highlightData={},this.render()});f(this,"updateShowState",e=>{this.showState=V(V({},this.showState),e)});f(this,"_disable",e=>{var s,o,r;const{userAction:i}=e;this.hooks.emit("disable",{userAction:i}),(s=this.showRejection)==null||s.call(this,fi.BreakOffByDisable),this.showPromise=void 0,(o=this.app)==null||o.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});f(this,"_enable",e=>{const{userAction:i}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:i}),this.state.visible&&this._show({userAction:i}))});f(this,"_show",e=>$(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.fiveUtil.model)!=null&&r.loaded))throw new Error(fi.ModelNotLoaded);if(!this.data)throw new Error(fi.DataNotLoaded);if(this.showPromise)return this.showPromise;const i={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},s=V(V({},i),e),o=()=>$(this,null,function*(){this.hooks.emit("show",{userAction:s.userAction,auto:s.isAutoShow});let a=!1,l;this.showRejection=u=>{a=!0,l=u};const[c]=yield Us(h1(this.five,this.showState,s.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(fi.UnknownError);if(!this.updateSize())throw new Error(fi.UpdateSizeError);this.updatePosition(),this.floorIndex=s.floorIndex,this.fiveUtil.model.show(this.floorIndex)});return this.isHiddenByHideFunc=!1,this.showPromise=o().then(()=>{this.showPromise=void 0,this.showRejection=void 0;const a=s.modelOpacity,l=s.immediately?0:l1;Uo(this.five,a,l),this.render(l),this.hooks.emit("showAnimationEnded",{auto:s.isAutoShow,userAction:s.userAction})}).catch(a=>{if(this.showPromise=void 0,this.showRejection=void 0,this.updateState({visible:!1},s.userAction),!s.isAutoShow&&a instanceof Error)throw a}),this.showPromise}));f(this,"_hide",e=>{var o;(o=this.showRejection)==null||o.call(this,fi.BreakOffByHide),this.showPromise=void 0;const s=V(V({},{userAction:!0,isAutoHide:!1}),e);Uo(this.five,1,0),this.hooks.emit("hide",{auto:s.isAutoHide,userAction:s.userAction}),this.render()});f(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click",this.store.roomOnMouse))return!1});f(this,"onFiveModelLoaded",()=>{const s=this.five.models.find(r=>r.name===this.five.state.workCode).bounding.getCenter(new b.Vector3);if(this.showState.offset=s,this.state.enabled===!1||this.wrapper||!this.selector)return;const o=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!o)throw new Error("不正确的父容器选择器");this.wrapper=o,o.append(this.container)});f(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});f(this,"onFiveInteriaPan",(e,i)=>{if(!i||this.state.visible||this.state.config.autoShowEnable===!1||this.isHiddenByHideFunc)return;const s=this.five.getCurrentState();if(s.mode!==this.showState.mode)return;const o=this.getRelativePose(s);XP(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0}))});f(this,"onFivePanoArrived",e=>{var i;(i=this.five)!=null&&i.work&&(this.panoIndex=e,this.floorIndex=this.workUtil.observers[e].floorIndex)});f(this,"onFiveCameraUpdate",(e,i)=>{if(!this.state.visible||this.showPromise)return;const s=this.five.getCurrentState();this.updatePosition(),this.updateSize();const o=this.getRelativePose(s);QP(o)&&(this.updateState({visible:!1},i),this._hide({userAction:i}))});f(this,"onFiveWantsPanGesture",(e,i)=>{if(this.five.getCurrentState().mode===this.showState.mode&&this.state.config.autoShowEnable!==!1&&i&&this.state.visible)return this.five.updateCamera(Wo(this.showState,["offset"]),0),!1});f(this,"onFiveWantsTapGesture",()=>this.handleClick());f(this,"onFiveWantsChangeMode",(e,i)=>{i==="Panorama"&&e===this.showState.mode&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});f(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const i=this.five.getCurrentState().panoIndex;this.floorIndex=this.workUtil.observers[i].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});i!=null&&i.selector&&(this.selector=i.selector,console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法")),this.showState=V({mode:"Mapview",longitude:0,latitude:Math.PI/2,fov:zu/((l=i==null?void 0:i.scale)!=null?l:1)},i==null?void 0:i.showState),this.defaultMissingFloorConfig={imageURL:Wi(i==null?void 0:i.staticPrefix,cs),imageWidth:200,imageHeight:120,text:(h=(c=i.i18n)==null?void 0:c.call(i,"暂无平面图"))!=null?h:"暂无平面图",textFontSize:14};const s={northDesc:"北",modelOpacity:1,cameraEnable:!0,highlightEnable:!1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,roomNameOtherTypeEnable:!0,roomDimensionEnable:!0,cameraImageUrl:hn,attachedTo:as.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,missingFloorConfig:V(V({},this.defaultMissingFloorConfig),i.missingFloorConfig),i18n:u=>u,getRoomAreaText:u=>(u/1e6).toFixed(1)+"㎡",getRoomDimensionText:(u,d)=>(u/1e3).toFixed(1)+"m × "+(d/1e3).toFixed(1)+"m",getRuleDistanceText:u=>u.toString()},o=i?Wo(i,["selector","scale"]):{},r=V(V({},s.missingFloorConfig),o.missingFloorConfig),a=de(V(V({},s),o),{missingFloorConfig:r});this.state={enabled:!0,visible:!1,config:a},this.panoIndex=e.getCurrentState().panoIndex,this.initContainer(),xi(e).then(this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,i,s=!0){return $(this,null,function*(){function o(h){return Object.prototype.hasOwnProperty.apply(h,["version"])}const r=e;r&&yi(r.version)&&console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");const a=JSON.parse(JSON.stringify(e)),l=o(a)?a.data:a,c=this.data;this.data=yield un(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),i&&this.updateState(i,s),this.render()})}loadItems(e){const{min:i,max:s}=this.data.bounding,o=s.x-i.x,r=s.y-i.y;this.data.floorDatas.forEach((a,l)=>{a.items=e[l].filter(c=>c.displayName==="Item-SimpleItem").map(c=>{const{x:h,y:u,width:d,height:p,notes:m,type:g,id:v,rotateX:y,rotateY:w,rotateZ:C=0}=c;return{id:v,positionInImage:{x:(h-i.x)/o,y:(s.y-u)/r},width:d/o,height:p/r,src:UP+Sf[g].href.replace(/\{\{\stheme\s\}\}/,"realsee"),notes:m||Sf[g].description,rotateX:y,rotateY:w,rotateZ:C}})})}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}enable(e={}){if(this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||i),this._enable({userAction:i})}disable(e={}){if(!this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||i),this._disable({userAction:i})}setState(e,i={}){const s=this.state,o=i.userAction!==void 0?i.userAction:!0;if(this.updateState(e,o),e.enabled!==void 0&&s.enabled!==e.enabled&&(e.enabled?this._enable({userAction:o}):this._disable({userAction:o})),e.visible!==void 0&&s.visible!==e.visible){const r={userAction:o};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,i=!0){this.updateState({config:e},i),this.render()}getPxmmWithRotation(){if(!this.wrapper)return 0;const e=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,i=this.showState.longitude,s=Math.abs((i%(2*Math.PI)+2*Math.PI)%(2*Math.PI));return s>Math.PI/4&&s<3*Math.PI/4||s>5*Math.PI/4&&s<7*Math.PI/4?this.getPxmmZAxis(e):Lu(this.five,this.wrapper,this.floorIndex,e)}getPxmmZAxis(e){if(!this.wrapper)return 0;const i=Qr(this.five,this.floorIndex,e==null?void 0:e.attachedTo),s=new b.Vector3(0,i,0),o=new b.Vector3(0,i,1),r=s.clone().project(this.five.camera),a=o.clone().project(this.five.camera);return Math.abs((a.x-r.x)/1e3)*(this.wrapper.getBoundingClientRect().width/2)}updatePosition(){var a;const e=Qr(this.five,this.floorIndex,this.state.config.attachedTo),i=(a=this.fiveUtil.model)==null?void 0:a.bounding.getCenter(new b.Vector3).setY(e);if(!i)return;const s=i.clone().project(this.five.camera),o=(s.x+1)/2,r=-(s.y-1)/2;this.container.style.left=o*100+"%",this.container.style.top=r*100+"%"}formatData(e){return $(this,null,function*(){return yield un(e.data)})}updateState(e,i){var a;const s=this.state,o=(a=e.config)!=null&&a.missingFloorConfig?V(V({},s.config.missingFloorConfig),e.config.missingFloorConfig):s.config.missingFloorConfig,r=e.config?de(V(V({},s.config),e.config),{missingFloorConfig:o}):s.config;this.state=de(V(V({},this.state),e),{config:r}),!Wt(this.state,s,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:i})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("interiaPan",this.onFiveInteriaPan),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}getRelativePose(e){const i=this.showState.longitude||0,o=((e.longitude-i)%(2*Math.PI)+2*Math.PI)%(2*Math.PI);return de(V({},e),{longitude:o})}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0||this.showPromise)return;const i=de(V({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude,highlightData:this.highlightData,items:this.items,store:this.store});if(this.app)return this.app.$set(i);this.app=new Du({target:this.container,intro:!0,props:i})}};const ZP=(n,t)=>new YP(n,t);let qP=class extends pn{constructor(e,i){var l,c;super(e);f(this,"name","topviewFloorplanPlugin");f(this,"state");f(this,"data");f(this,"app");f(this,"selector");f(this,"panoIndex",0);f(this,"floorIndex",0);f(this,"wrapper");f(this,"container",document.createElement("div"));f(this,"lastPanoramaLongitude",0);f(this,"size",{width:0,height:0});f(this,"defaultMissingFloorConfig");f(this,"hasAddedEventListener",!1);f(this,"isHiddenByHideFunc",!1);f(this,"highlightData",{});f(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper||this.five.getCurrentState().mode!=="Topview")return!1;const{min:e,max:i}=this.data.bounding,s=i.x-e.x,o=i.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=Lu(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(s*a),c=Math.ceil(o*a);return this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c}),!0});f(this,"dispose",()=>{var e,i;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(i=this.container)==null||i.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});f(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});f(this,"unhighlight",()=>{this.highlightData={},this.render()});f(this,"_disable",e=>{var s,o;const{userAction:i}=e;(s=this.app)==null||s.$destroy(),this.app=void 0,(o=this.container)==null||o.remove(),this.removeEventListener(),this.hooks.emit("disable",{userAction:i})});f(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("不正确的父容器选择器");this.wrapper=e,e.append(this.container)});f(this,"onFiveModeChange",(...[e,,,,i])=>{e!=="Topview"&&this.state.visible&&(this.updateState({visible:!1},i),this._hide({userAction:i}))});f(this,"onFivePanoArrived",e=>{var i;(i=this.five)!=null&&i.work&&(this.panoIndex=e,this.floorIndex=this.workUtil.observers[e].floorIndex)});f(this,"onFiveCameraUpdate",(e,i)=>{this.state.visible&&(this.updatePosition(),this.updateSize())});f(this,"onFiveWantsGesture",e=>{if(!(e!=="pan"&&e!=="pinch"&&e!=="mouseWheel")&&this.state.visible&&!this.state.config.gestureEnable)return!1});f(this,"onFiveWantsMoveToPano",()=>{if(this.state.visible&&this.state.config.preventRoomClick)return!1});f(this,"onFiveInitAnimationEnded",(...[,,e])=>{const{mode:i}=this.five.getCurrentState();i==="Topview"&&!this.isHiddenByHideFunc&&!this.state.visible&&this.state.config.autoShowEnable&&(this.updateState({visible:!0},e),this._show({userAction:e}))});f(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const i=this.five.getCurrentState().panoIndex;this.floorIndex=this.workUtil.observers[i].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});i!=null&&i.selector&&(this.selector=i.selector,console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法")),this.defaultMissingFloorConfig={imageURL:Wi(i==null?void 0:i.staticPrefix,cs),imageWidth:200,imageHeight:120,text:(c=(l=i.i18n)==null?void 0:l.call(i,"暂无平面图"))!=null?c:"暂无平面图",textFontSize:14};const s={northDesc:"北",modelOpacity:1,cameraEnable:!0,hoverEnable:!0,highlightEnable:!1,compassEnable:!0,gestureEnable:!1,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,roomNameOtherTypeEnable:!0,roomDimensionEnable:!0,cameraImageUrl:hn,attachedTo:as.BOUNDING_CENTER,getLabelElement:void 0,missingFloorConfig:V(V({},this.defaultMissingFloorConfig),i.missingFloorConfig),i18n:h=>h,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:h=>(h/1e6).toFixed(1)+"㎡",getRoomDimensionText:(h,u)=>(h/1e3).toFixed(1)+"m × "+(u/1e3).toFixed(1)+"m",getRuleDistanceText:h=>h.toString()},o=i?Wo(i,["selector","scale"]):{},r=V(V({},s.missingFloorConfig),o.missingFloorConfig),a=de(V(V({},s),o),{missingFloorConfig:r});this.state={enabled:!0,visible:!1,config:a},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,i,s=!0){return $(this,null,function*(){function o(h){return Object.prototype.hasOwnProperty.apply(h,["version"])}const r=e;r&&yi(r.version)&&console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");const a=JSON.parse(JSON.stringify(e)),l=o(a)?a.data:a,c=this.data;this.data=yield un(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),i&&this.updateState(i,s),this.render()})}updatePosition(){var a;const e=Qr(this.five,this.floorIndex,this.state.config.attachedTo),i=(a=this.five.model)==null?void 0:a.bounding.getCenter(new b.Vector3).setY(e);if(!i)return;const s=i.clone().project(this.five.camera),o=(s.x+1)/2,r=-(s.y-1)/2;this.container.style.left=o*100+"%",this.container.style.top=r*100+"%"}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}show(){return $(this,arguments,function*(e={}){if(this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},i),this._show({userAction:i})})}hide(){return $(this,arguments,function*(e={}){if(this.isHiddenByHideFunc=!0,!this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},i),this._hide({userAction:i})})}enable(e={}){if(this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||i),this._enable({userAction:i})}disable(e={}){if(!this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||i),this._disable({userAction:i})}setState(e,i={}){const s=this.state,o=i.userAction!==void 0?i.userAction:!0;if(this.updateState(e,o),e.enabled!==void 0&&s.enabled!==e.enabled){const r={userAction:o};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&s.visible!==e.visible){const r={userAction:o};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,i=!0){this.updateState({config:e},i),this.render()}formatData(e){return $(this,null,function*(){return yield un(e.data)})}_show(e){return $(this,null,function*(){if(!this.state.enabled)return;this.isHiddenByHideFunc=!1;const{userAction:i}=e;this.hooks.emit("show",{userAction:i,auto:!1}),this.five.getCurrentState().mode!=="Topview"&&(yield Ou(this.five,["Topview",void 0,void 0,i])),this.five.model.show(this.floorIndex),this.updatePosition(),this.updateSize();const s=500,o=this.state.config.modelOpacity;Uo(this.five,o,s),this.hooks.emit("showAnimationEnded",{userAction:i,auto:!1}),this.render()})}_hide(e){return $(this,null,function*(){if(!this.state.enabled)return;const{userAction:i}=e;this.hooks.emit("hide",{userAction:i,auto:!1});const s=1,o=0;Uo(this.five,s,o),this.render()})}_enable(e){const{userAction:i}=e;this.addEventListener(),this.wrapper&&this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:i}),this.state.visible&&this._show({userAction:i})}updateState(e,i){var a;const s=this.state,o=(a=e.config)!=null&&a.missingFloorConfig?V(V({},s.config.missingFloorConfig),e.config.missingFloorConfig):s.config.missingFloorConfig,r=e.config?de(V(V({},s.config),e.config),{missingFloorConfig:o}):s.config;this.state=de(V(V({},this.state),e),{config:r}),!Wt(this.state,s,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:i})}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsMoveToPano",this.onFiveWantsMoveToPano),e.on("initAnimationEnded",this.onFiveInitAnimationEnded),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsMoveToPano",this.onFiveWantsMoveToPano),e.off("initAnimationEnded",this.onFiveInitAnimationEnded),e.off("modelShownFloorChange",this.onModelShownFloorChange)}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate3d(-50%, -50%, 10px)",zIndex:10,pointerEvents:"none","will-change":"width, height"}),this.five.addExtraElement(this.container)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const i=de(V({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude,highlightData:this.highlightData});if(this.app)return this.app.$set(i);this.app=new Du({target:this.container,intro:!0,props:i})}};const JP=(n,t)=>new qP(n,t);function KP(n){Le(n,"svelte-1nqrlxd",".plugin-radar__camera-wrapper.svelte-1nqrlxd{width:100%;height:100%;position:absolute;pointer-events:none}.plugin-radar__camera-position.svelte-1nqrlxd{position:absolute;left:0;top:0;width:0;height:0;transform:none;pointer-events:none;transition:transform 1s linear}.plugin-radar__camera-rotate.svelte-1nqrlxd{position:absolute;left:-0.9375rem;top:-0.9375rem;width:1.0625rem;height:1.0625rem;transform-origin:0.9375rem 0.9375rem;transform:rotate(45deg);background-repeat:no-repeat;background-size:100%}")}function $P(n){let t,e,i;return{c(){t=U("div"),e=U("div"),i=U("div"),P(i,"class","plugin-radar__camera-rotate svelte-1nqrlxd"),_(i,"background-image","url("+(n[0]||hn)+")"),_(i,"transform",n[1]),P(e,"class","plugin-radar__camera-position svelte-1nqrlxd"),_(e,"transform",n[2]),P(t,"class","plugin-radar__camera-wrapper svelte-1nqrlxd"),_(t,"opacity",n[3]?1:0)},m(s,o){Z(s,t,o),B(t,e),B(e,i)},p(s,[o]){o&1&&_(i,"background-image","url("+(s[0]||hn)+")"),(o&1||o&3)&&_(i,"transform",s[1]),o&4&&_(e,"transform",s[2]),o&8&&_(t,"opacity",s[3]?1:0)},i:ce,o:ce,d(s){s&&X(t)}}}function eC(n){return`rotate(${Math.floor(n/Math.PI*180)*-1+45}deg)`}function tC(n,t,e){var w,C;let i,s,o,r,{five:a}=t,{pxmm:l}=t,{floorplanData:c}=t,{cameraImageUrl:h}=t,u=a.getCurrentState().panoIndex,d=a.getCurrentState().longitude,p=(C=(w=a.work.observers[a.getCurrentState().panoIndex])==null?void 0:w.floorIndex)!=null?C:0;function m(E,D){const L=E.bounding,R=E.observers[D];if(!R)return"";const z=(L.max.x-L.min.x)*l,O=(L.max.y-L.min.y)*l,A=Math.floor(R.positionInImage.x*z),M=Math.floor(R.positionInImage.y*O);return`translate(${A}px, ${M}px)`}function g(E){e(7,u=E)}function v(E){e(9,p=a.work.observers[E].floorIndex)}const y=ta(E=>{e(8,d=E.longitude)},1e3/60);return zt(()=>(a.on("panoWillArrive",g),a.on("panoArrived",v),a.on("cameraDirectionUpdate",y),function(){a.off("panoWillArrive",g),a.off("panoArrived",v),a.off("cameraDirectionUpdate",y)})),n.$$set=E=>{"five"in E&&e(4,a=E.five),"pxmm"in E&&e(5,l=E.pxmm),"floorplanData"in E&&e(6,c=E.floorplanData),"cameraImageUrl"in E&&e(0,h=E.cameraImageUrl)},n.$$.update=()=>{n.$$.dirty&576&&e(10,i=c.floorDatas[p]),n.$$.dirty&1024&&e(3,s=i.rooms.length>0),n.$$.dirty&192&&e(2,o=m(c,u)),n.$$.dirty&256&&e(1,r=eC(d))},[h,r,o,s,a,l,c,u,d,p,i]}let iC=class extends Ee{constructor(t){super(),Ie(this,t,tC,$P,Me,{five:4,pxmm:5,floorplanData:6,cameraImageUrl:0},KP)}};function nC(n){Le(n,"svelte-1i87fz7",".plugin-pano-floorplan__extra-objects.svelte-1i87fz7{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.plugin-pano-floorplan__extra-object-item--position.svelte-1i87fz7{position:absolute;width:0;height:0}.plugin-pano-floorplan__extra-object-item.svelte-1i87fz7{transform:translate(-50%, -50%)}")}function Tf(n,t,e){const i=n.slice();return i[1]=t[e],i}function Df(n,t){let e,i,s=`${t[1].icon.width/16}rem`,o=`${t[1].icon.height/16}rem`,r,a=`${t[1].positionInImage.y*100}%`,l=`${t[1].positionInImage.x*100}%`;return{key:n,first:null,c(){e=U("div"),i=U("div"),r=ue(),P(i,"class","plugin-pano-floorplan__extra-object-item svelte-1i87fz7"),_(i,"background-image",`url(${t[1].icon.url})`),_(i,"width",s),_(i,"height",o),P(e,"class","plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7"),_(e,"top",a),_(e,"left",l),this.first=e},m(c,h){Z(c,e,h),B(e,i),B(e,r)},p(c,h){t=c,h&1&&_(i,"background-image",`url(${t[1].icon.url})`);const u=h&1;u&&_(i,"width",s),u&&_(i,"height",o),h&1&&a!==(a=`${t[1].positionInImage.y*100}%`)&&_(e,"top",a),h&1&&l!==(l=`${t[1].positionInImage.x*100}%`)&&_(e,"left",l)},d(c){c&&X(e)}}}function sC(n){let t,e=[],i=new Map,s=n[0];const o=r=>r[1].id;for(let r=0;r<s.length;r+=1){let a=Tf(n,s,r),l=o(a);i.set(l,e[r]=Df(l,a))}return{c(){t=U("div");for(let r=0;r<e.length;r+=1)e[r].c();P(t,"class","plugin-pano-floorplan__extra-objects svelte-1i87fz7")},m(r,a){Z(r,t,a);for(let l=0;l<e.length;l+=1)e[l]&&e[l].m(t,null)},p(r,[a]){a&1&&(s=r[0],e=ai(e,a,o,1,r,s,i,t,la,Df,null,Tf))},i:ce,o:ce,d(r){r&&X(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function oC(n,t,e){let{extraObjects:i=[]}=t;return n.$$set=s=>{"extraObjects"in s&&e(0,i=s.extraObjects)},[i]}let rC=class extends Ee{constructor(t){super(),Ie(this,t,oC,sC,Me,{extraObjects:0},nC)}};function aC(n){Le(n,"svelte-17nccx",".floorplan-plugin__styled-image.svelte-17nccx{position:absolute;inset:0;width:100%;height:100%;overflow:hidden;pointer-events:none}img.svelte-17nccx{display:block;max-width:none;transform-origin:0 0}")}function lC(n){let t,e,i;return{c(){t=U("div"),e=U("img"),at(e.src,i=n[0].url)||P(e,"src",i),P(e,"alt",""),P(e,"draggable","false"),P(e,"class","svelte-17nccx"),_(e,"width",n[1]?`${n[0].width}px`:"100%"),_(e,"height",n[1]?`${n[0].height}px`:"100%"),_(e,"transform",n[1]?`matrix(${n[1].join(",")})`:void 0),P(t,"class","floorplan-plugin__styled-image svelte-17nccx"),_(t,"z-index",n[2])},m(s,o){Z(s,t,o),B(t,e)},p(s,[o]){o&1&&!at(e.src,i=s[0].url)&&P(e,"src",i),o&3&&_(e,"width",s[1]?`${s[0].width}px`:"100%"),o&3&&_(e,"height",s[1]?`${s[0].height}px`:"100%"),o&2&&_(e,"transform",s[1]?`matrix(${s[1].join(",")})`:void 0),o&4&&_(t,"z-index",s[2])},i:ce,o:ce,d(s){s&&X(t)}}}function cC(n,t,e){let{image:i}=t,{transform:s}=t,{zIndex:o=5}=t;return n.$$set=r=>{"image"in r&&e(0,i=r.image),"transform"in r&&e(1,s=r.transform),"zIndex"in r&&e(2,o=r.zIndex)},[i,s,o]}class u1 extends Ee{constructor(t){super(),Ie(this,t,cC,lC,Me,{image:0,transform:1,zIndex:2},aC)}}function hC(n,t){const[e,i,s,o,r,a]=n,[l,c,h,u,d,p]=t;return[e*l+s*c,i*l+o*c,e*h+s*u,i*h+o*u,e*d+s*p+r,i*d+o*p+a]}function uC([n,t,e,i,s,o]){const r=n*i-t*e;if(!Number.isFinite(r)||r===0)throw new Error("styled floorplan transform is singular");return[i/r,-t/r,-e/r,n/r,(e*o-i*s)/r,(t*s-n*o)/r]}function d1(n,t,e){const i=[e,0,0,-e,-t.min.x*e,t.max.y*e];return hC(i,uC(n))}function dC(n){Le(n,"svelte-18287ai",".missing-floor-wrapper.svelte-18287ai{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:flex;justify-content:center;align-items:center}.missing-floor-image.svelte-18287ai{max-width:100%;max-height:100%}")}function fC(n){let t,e,i,s,o,r,a;const l=[gC,mC],c=[];function h(d,p){return d[7]&&d[8]?0:1}t=h(n),e=c[t]=l[t](n),s=new rC({props:{extraObjects:n[9]}});let u=n[3]&&Lf(n);return{c(){e.c(),i=ue(),ge(s.$$.fragment),o=ue(),u&&u.c(),r=Be()},m(d,p){c[t].m(d,p),Z(d,i,p),pe(s,d,p),Z(d,o,p),u&&u.m(d,p),Z(d,r,p),a=!0},p(d,p){let m=t;t=h(d),t===m?c[t].p(d,p):(xe(),Y(c[m],1,1,()=>{c[m]=null}),Se(),e=c[t],e?e.p(d,p):(e=c[t]=l[t](d),e.c()),H(e,1),e.m(i.parentNode,i));const g={};p&512&&(g.extraObjects=d[9]),s.$set(g),d[3]?u?(u.p(d,p),p&8&&H(u,1)):(u=Lf(d),u.c(),H(u,1),u.m(r.parentNode,r)):u&&(xe(),Y(u,1,1,()=>{u=null}),Se())},i(d){a||(H(e),H(s.$$.fragment,d),H(u),a=!0)},o(d){Y(e),Y(s.$$.fragment,d),Y(u),a=!1},d(d){c[t].d(d),d&&X(i),me(s,d),d&&X(o),u&&u.d(d),d&&X(r)}}}function pC(n){let t,e,i;return{c(){t=U("div"),e=U("img"),P(e,"class","missing-floor-image svelte-18287ai"),at(e.src,i=n[6])||P(e,"src",i),P(e,"alt","缺省楼层"),P(t,"class","missing-floor-wrapper svelte-18287ai")},m(s,o){Z(s,t,o),B(t,e)},p(s,o){o&64&&!at(e.src,i=s[6])&&P(e,"src",i)},i:ce,o:ce,d(s){s&&X(t)}}}function mC(n){let t,e;const i=[{floorIndex:n[2],floorplanData:n[4]}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new Su({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r&20?yt(i,[{floorIndex:o[2],floorplanData:o[4]}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function gC(n){let t,e;return t=new u1({props:{image:n[7].miniMapFill,transform:n[8],zIndex:0}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&128&&(o.image=i[7].miniMapFill),s&256&&(o.transform=i[8]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function Lf(n){let t,e;const i=[{five:n[0],pxmm:n[1],floorIndex:n[2],floorplanData:n[4],onRoomHeightClick:n[11],highlightData:n[5],hoveredRoom:void 0}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new Tu({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r&2103?yt(i,[{five:o[0],pxmm:o[1],floorIndex:o[2],floorplanData:o[4],onRoomHeightClick:o[11],highlightData:o[5],hoveredRoom:void 0}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function vC(n){let t,e,i,s;const o=[pC,fC],r=[];function a(l,c){return l[10]?1:0}return t=a(n),e=r[t]=o[t](n),{c(){e.c(),i=Be()},m(l,c){r[t].m(l,c),Z(l,i,c),s=!0},p(l,[c]){let h=t;t=a(l),t===h?r[t].p(l,c):(xe(),Y(r[h],1,1,()=>{r[h]=null}),Se(),e=r[t],e?e.p(l,c):(e=r[t]=o[t](l),e.c()),H(e,1),e.m(i.parentNode,i))},i(l){s||(H(e),s=!0)},o(l){Y(e),s=!1},d(l){r[t].d(l),l&&X(i)}}}function yC(n,t,e){let i,s,o,r,a,{five:l}=t,{pxmm:c}=t,{floorIndex:h}=t,{hoverEnable:u}=t,{floorplanData:d}=t,{extraObjects:p=[]}=t,{highlightData:m}=t,{missingFloorImageUrl:g}=t,{styledFloorplanEnable:v=!1}=t;const y=void 0;return n.$$set=w=>{"five"in w&&e(0,l=w.five),"pxmm"in w&&e(1,c=w.pxmm),"floorIndex"in w&&e(2,h=w.floorIndex),"hoverEnable"in w&&e(3,u=w.hoverEnable),"floorplanData"in w&&e(4,d=w.floorplanData),"extraObjects"in w&&e(12,p=w.extraObjects),"highlightData"in w&&e(5,m=w.highlightData),"missingFloorImageUrl"in w&&e(6,g=w.missingFloorImageUrl),"styledFloorplanEnable"in w&&e(13,v=w.styledFloorplanEnable)},n.$$.update=()=>{var w;n.$$.dirty&20&&e(14,i=d.floorDatas[h]),n.$$.dirty&16384&&e(10,s=i.rooms.length>0),n.$$.dirty&4100&&e(9,o=p==null?void 0:p.filter(C=>C.floorIndex===h)),n.$$.dirty&8212&&e(7,r=v?(w=d.styledFloorplan)==null?void 0:w.floors.find(C=>C.floorIndex===h):void 0),n.$$.dirty&146&&e(8,a=r?d1(r.miniMapFill.floorplanToImage,d.bounding,c):void 0)},[l,c,h,u,d,m,g,r,a,o,s,y,p,v,i]}let bC=class extends Ee{constructor(t){super(),Ie(this,t,yC,vC,Me,{five:0,pxmm:1,floorIndex:2,hoverEnable:3,floorplanData:4,extraObjects:12,highlightData:5,missingFloorImageUrl:6,styledFloorplanEnable:13},dC)}};function AC(n){Le(n,"svelte-ij0sxa",".plugin-floorplan-radar.svelte-ij0sxa{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-ij0sxa{position:relative}.floorplan-radar-plugin__styled-realsee .floorplan-plugin__styled-image{filter:drop-shadow(0.0625rem 0 0 #fff) drop-shadow(-0.0625rem 0 0 #fff) drop-shadow(0 0.0625rem 0 #fff) drop-shadow(0 -0.0625rem 0 #fff)}")}function zf(n){let t,e,i,s,o=n[10]!==0&&Of(n);return{c(){t=U("div"),o&&o.c(),P(t,"class","plugin-floorplan-radar svelte-ij0sxa")},m(r,a){Z(r,t,a),o&&o.m(t,null),e=!0,i||(s=[oi(_i.call(null,t)),_e(t,"clientWidth",n[16]),_e(t,"clientHeight",n[17])],i=!0)},p(r,a){r[10]!==0?o?(o.p(r,a),a&1024&&H(o,1)):(o=Of(r),o.c(),H(o,1),o.m(t,null)):o&&(xe(),Y(o,1,1,()=>{o=null}),Se())},i(r){e||(H(o),e=!0)},o(r){Y(o),e=!1},d(r){r&&X(t),o&&o.d(),i=!1,dt(s)}}}function Of(n){let t,e,i,s,o=`${n[12]}px`,r=`${n[14]}px`,a;const l=[{five:n[0],pxmm:n[13],floorIndex:n[9],floorplanData:n[3],hoverEnable:n[2],extraObjects:n[5],highlightData:n[6],missingFloorImageUrl:n[7],styledFloorplanEnable:n[8]}];let c={};for(let d=0;d<l.length;d+=1)c=pt(c,l[d]);e=new bC({props:c});const h=[{pxmm:n[13],five:n[0],floorplanData:n[3],cameraImageUrl:n[4]}];let u={};for(let d=0;d<h.length;d+=1)u=pt(u,h[d]);return s=new iC({props:u}),{c(){t=U("div"),ge(e.$$.fragment),i=ue(),ge(s.$$.fragment),P(t,"class","plugin-floorplan-radar-container svelte-ij0sxa"),Pe(t,"floorplan-radar-plugin__styled-realsee",!!n[15]),_(t,"width",o),_(t,"height",r)},m(d,p){Z(d,t,p),pe(e,t,null),B(t,i),pe(s,t,null),a=!0},p(d,p){const m=p&9197?yt(l,[{five:d[0],pxmm:d[13],floorIndex:d[9],floorplanData:d[3],hoverEnable:d[2],extraObjects:d[5],highlightData:d[6],missingFloorImageUrl:d[7],styledFloorplanEnable:d[8]}]):{};e.$set(m);const g=p&8217?yt(h,[{pxmm:d[13],five:d[0],floorplanData:d[3],cameraImageUrl:d[4]}]):{};s.$set(g),(!a||p&32768)&&Pe(t,"floorplan-radar-plugin__styled-realsee",!!d[15]),p&4096&&o!==(o=`${d[12]}px`)&&_(t,"width",o),p&16384&&r!==(r=`${d[14]}px`)&&_(t,"height",r)},i(d){a||(H(e.$$.fragment,d),H(s.$$.fragment,d),a=!0)},o(d){Y(e.$$.fragment,d),Y(s.$$.fragment,d),a=!1},d(d){d&&X(t),me(e),me(s)}}}function wC(n){let t,e,i=n[1]&&zf(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[1]?i?(i.p(s,o),o&2&&H(i,1)):(i=zf(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function PC(n,t,e){var L,R;let i,{five:s}=t,{visible:o}=t,{hoverEnable:r}=t,{floorplanData:a}=t,{cameraImageUrl:l}=t,{extraObjects:c=[]}=t,{highlightData:h}=t,{missingFloorImageUrl:u}=t,{styledFloorplanEnable:d=!1}=t,p=0,m=(R=(L=s.work.observers[s.getCurrentState().panoIndex])==null?void 0:L.floorIndex)!=null?R:0,g=0,v=0,y=0,w=0;function C(z){e(9,m=s.work.observers[z].floorIndex)}zt(()=>(s.on("panoArrived",C),()=>{s.off("panoArrived",C)}));const E=z=>{e(10,g=z.detail)},D=z=>{e(11,v=z.detail)};return n.$$set=z=>{"five"in z&&e(0,s=z.five),"visible"in z&&e(1,o=z.visible),"hoverEnable"in z&&e(2,r=z.hoverEnable),"floorplanData"in z&&e(3,a=z.floorplanData),"cameraImageUrl"in z&&e(4,l=z.cameraImageUrl),"extraObjects"in z&&e(5,c=z.extraObjects),"highlightData"in z&&e(6,h=z.highlightData),"missingFloorImageUrl"in z&&e(7,u=z.missingFloorImageUrl),"styledFloorplanEnable"in z&&e(8,d=z.styledFloorplanEnable)},n.$$.update=()=>{var z;if(n.$$.dirty&776&&e(15,i=d?(z=a.styledFloorplan)==null?void 0:z.floors.find(O=>O.floorIndex===m):void 0),n.$$.dirty&7176){const O=Math.min(g,v),{max:A,min:M}=a.bounding,I=A.x-M.x,k=A.y-M.y,x=function(){return I>k?[O,O/I*k]:[O/k*I,O]}();e(12,y=x[0]),e(14,w=x[1]),e(13,p=y/I)}},[s,o,r,a,l,c,h,u,d,m,g,v,y,p,w,i,E,D]}let CC=class extends Ee{constructor(t){super(),Ie(this,t,PC,wC,Me,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5,highlightData:6,missingFloorImageUrl:7,styledFloorplanEnable:8},AC)}},MC=class extends pn{constructor(e,i){super(e);f(this,"name","panoFloorplanRadarPlugin");f(this,"state");f(this,"data");f(this,"app");f(this,"wrapperSelector","");f(this,"wrapper",null);f(this,"disposed",!1);f(this,"extraObjects",[]);f(this,"highlightData",{});f(this,"dispose",()=>{var e;this.disposed=!0,(e=this.app)==null||e.$destroy(),this.wrapper=null,this.wrapperSelector="",this.hooks.emit("dispose")});f(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});f(this,"unhighlight",()=>{this.highlightData={},this.render()});f(this,"_disable",e=>{var s;const{userAction:i}=e;(s=this.app)==null||s.$destroy(),this.app=void 0,this.hooks.emit("disable",{userAction:i})});this.five=e;const s={styledFloorplanEnable:!1,hoverEnable:!1,highlightEnable:!1,cameraImageUrl:hn,missingFloorImageUrl:Wi(i==null?void 0:i.staticPrefix,cs)},o=V(V({},s),i==null?void 0:i.configs);this.state={enabled:!0,visible:!0,config:o},i!=null&&i.wrapper&&console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法"),typeof(i==null?void 0:i.wrapper)=="string"?this.wrapperSelector=i.wrapper:(i==null?void 0:i.wrapper)instanceof Element&&(this.wrapper=i.wrapper),e.once("dispose",this.dispose)}load(e,i,s=!0){return $(this,null,function*(){function o(c){return Object.prototype.hasOwnProperty.apply(c,["version"])}const r=JSON.parse(JSON.stringify(e)),a=o(r)?r.data:r,l=this.data;this.data=yield un(a),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,l),i&&this.updateState(i,s),this.render()})}show(){return $(this,arguments,function*(e={}){if(this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},i),this._show({userAction:i})})}hide(){return $(this,arguments,function*(e={}){if(!this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},i),this._hide({userAction:i})})}enable(e={}){if(this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||i),this._enable({userAction:i})}disable(e={}){if(!this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||i),this._disable({userAction:i})}setState(e,i={}){const s=this.state,o=i.userAction!==void 0?i.userAction:!0;if(this.updateState(e,o),e.enabled!==void 0&&s.enabled!==e.enabled){const r={userAction:o};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&s.visible!==e.visible){const r={userAction:o};e.visible?this._show(r):this._hide(r)}}appendTo(e){this.wrapper!==e&&this.app&&(this.app.$destroy(),this.app=void 0),this.wrapper=e,this.render()}changeConfigs(e,i=!0){this.setState({config:e},{userAction:i}),this.render()}setExtraObjectsWith3DPositions(e){this.data&&(this.extraObjects=a1(e,this.five,this.data),this.render())}formatData(e){return $(this,null,function*(){return yield un(e.data)})}_enable(e){const{userAction:i}=e;this.hooks.emit("enable",{userAction:i}),this.state.visible&&this._show({userAction:i})}_show(e){if(this.disposed||!this.state.enabled)return;const{userAction:i}=e;this.hooks.emit("show",{userAction:i}),this.render()}_hide(e){if(this.disposed||!this.state.enabled)return;const{userAction:i}=e;this.hooks.emit("hide",{userAction:i}),this.render()}updateState(e,i){const s=this.state,o=e.config?V(V({},s.config),e.config):s.config;this.state=de(V(V({},this.state),e),{config:o}),!Wt(this.state,s,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:i})}render(){if(this.disposed||!this.state.enabled)return;if(!this.wrapper&&this.wrapperSelector){const i=document.querySelector(this.wrapperSelector);this.wrapper=i}if(!this.data||!this.wrapper)return;const e=de(V({},this.state.config),{five:this.five,floorplanData:this.data,visible:this.state.visible,extraObjects:this.extraObjects,highlightData:this.highlightData});this.app?this.app.$set(e):this.app=new CC({target:this.wrapper,props:e})}};const IC=(n,t)=>new MC(n,t);function EC(n){Le(n,"svelte-ryb078",".plugin-radar__camera-wrapper.svelte-ryb078{width:100%;height:100%;position:absolute;pointer-events:none;z-index:20}.plugin-radar__camera-position.svelte-ryb078{position:absolute;left:0;top:0;width:0;height:0;transform:none;pointer-events:none;transition:transform 1s linear;transform-origin:0 0;z-index:20}.plugin-radar__camera-rotate.svelte-ryb078{position:absolute;transform:rotate(45deg);background-repeat:no-repeat;background-size:100%;z-index:20}.floorplan-guide-plugin__styled-realsee .floorplan-guide-plugin__default-camera.svelte-ryb078::after{content:'';position:absolute;left:var(--camera-offset);top:var(--camera-offset);width:33.333%;height:33.333%;border-radius:50%;background:#3366ff;transform:translate(-50%, -50%)}")}function kC(n){let t,e,i,s=`${n[1]}px`,o=`${n[1]}px`,r=`-${n[2]}px`,a=`-${n[2]}px`,l=`${n[2]}px`,c=`${n[2]}px ${n[2]}px`;return{c(){t=U("div"),e=U("div"),i=U("div"),P(i,"class","plugin-radar__camera-rotate svelte-ryb078"),_(i,"background-image","url("+(n[0]||hn)+")"),Pe(i,"floorplan-guide-plugin__default-camera",n[0]===hh),_(i,"transform",n[4]),_(i,"width",s),_(i,"height",o),_(i,"left",r),_(i,"top",a),_(i,"--camera-offset",l),_(i,"transform-origin",c),P(e,"class","plugin-radar__camera-position svelte-ryb078"),_(e,"transform",n[3]),P(t,"class","plugin-radar__camera-wrapper svelte-ryb078"),_(t,"opacity",n[5]?1:0)},m(h,u){Z(h,t,u),B(t,e),B(e,i)},p(h,[u]){u&1&&_(i,"background-image","url("+(h[0]||hn)+")"),u&1&&Pe(i,"floorplan-guide-plugin__default-camera",h[0]===hh);const d=u&1;(d||u&17)&&_(i,"transform",h[4]),(d||u&3&&s!==(s=`${h[1]}px`))&&_(i,"width",s),(d||u&3&&o!==(o=`${h[1]}px`))&&_(i,"height",o),(d||u&5&&r!==(r=`-${h[2]}px`))&&_(i,"left",r),(d||u&5&&a!==(a=`-${h[2]}px`))&&_(i,"top",a),(d||u&5&&l!==(l=`${h[2]}px`))&&_(i,"--camera-offset",l),(d||u&5&&c!==(c=`${h[2]}px ${h[2]}px`))&&_(i,"transform-origin",c),u&8&&_(e,"transform",h[3]),u&32&&_(t,"opacity",h[5]?1:0)},i:ce,o:ce,d(h){h&&X(t)}}}function xC(n){return`rotate(${Math.floor(n/Math.PI*180)*-1+45}deg)`}function SC(n,t,e){var C,E;let i,s,o,{five:r}=t,{pxmm:a}=t,{floorplanData:l}=t,{cameraImageUrl:c}=t,{cameraSize:h=36}=t,{cameraOffset:u=28.5}=t,d=r.getCurrentState().panoIndex,p=r.getCurrentState().longitude,m=(E=(C=r.work.observers[r.getCurrentState().panoIndex])==null?void 0:C.floorIndex)!=null?E:0,g="";function v(D){e(9,d=D)}function y(D){e(11,m=r.work.observers[D].floorIndex)}const w=ta(D=>{e(10,p=D.longitude)},1e3/60);return zt(()=>(r.on("panoWillArrive",v),r.on("panoArrived",y),r.on("cameraDirectionUpdate",w),function(){r.off("panoWillArrive",v),r.off("panoArrived",y),r.off("cameraDirectionUpdate",w)})),n.$$set=D=>{"five"in D&&e(6,r=D.five),"pxmm"in D&&e(7,a=D.pxmm),"floorplanData"in D&&e(8,l=D.floorplanData),"cameraImageUrl"in D&&e(0,c=D.cameraImageUrl),"cameraSize"in D&&e(1,h=D.cameraSize),"cameraOffset"in D&&e(2,u=D.cameraOffset)},n.$$.update=()=>{if(n.$$.dirty&2304&&e(12,i=l.floorDatas[m]),n.$$.dirty&4096&&e(5,s=i.rooms.length>0),n.$$.dirty&896){const D=l.observers[d];if(!D)e(3,g="");else{const L=(l.bounding.max.x-l.bounding.min.x)*a,R=(l.bounding.max.y-l.bounding.min.y)*a,z=Math.floor(D.positionInImage.x*L),O=Math.floor(D.positionInImage.y*R);e(3,g=`translate(${z}px, ${O}px)`)}}n.$$.dirty&1024&&e(4,o=xC(p))},[c,h,u,g,o,s,r,a,l,d,p,m,i]}class TC extends Ee{constructor(t){super(),Ie(this,t,SC,kC,Me,{five:6,pxmm:7,floorplanData:8,cameraImageUrl:0,cameraSize:1,cameraOffset:2},EC)}}function DC(n){Le(n,"svelte-1i87fz7",".plugin-pano-floorplan__extra-objects.svelte-1i87fz7{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.plugin-pano-floorplan__extra-object-item--position.svelte-1i87fz7{position:absolute;width:0;height:0}.plugin-pano-floorplan__extra-object-item.svelte-1i87fz7{transform:translate(-50%, -50%)}")}function jf(n,t,e){const i=n.slice();return i[1]=t[e],i}function Rf(n,t){let e,i,s=`${t[1].icon.width/16}rem`,o=`${t[1].icon.height/16}rem`,r,a=`${t[1].positionInImage.y*100}%`,l=`${t[1].positionInImage.x*100}%`;return{key:n,first:null,c(){e=U("div"),i=U("div"),r=ue(),P(i,"class","plugin-pano-floorplan__extra-object-item svelte-1i87fz7"),_(i,"background-image",`url(${t[1].icon.url})`),_(i,"width",s),_(i,"height",o),P(e,"class","plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7"),_(e,"top",a),_(e,"left",l),this.first=e},m(c,h){Z(c,e,h),B(e,i),B(e,r)},p(c,h){t=c,h&1&&_(i,"background-image",`url(${t[1].icon.url})`);const u=h&1;u&&_(i,"width",s),u&&_(i,"height",o),h&1&&a!==(a=`${t[1].positionInImage.y*100}%`)&&_(e,"top",a),h&1&&l!==(l=`${t[1].positionInImage.x*100}%`)&&_(e,"left",l)},d(c){c&&X(e)}}}function LC(n){let t,e=[],i=new Map,s=n[0];const o=r=>r[1].id;for(let r=0;r<s.length;r+=1){let a=jf(n,s,r),l=o(a);i.set(l,e[r]=Rf(l,a))}return{c(){t=U("div");for(let r=0;r<e.length;r+=1)e[r].c();P(t,"class","plugin-pano-floorplan__extra-objects svelte-1i87fz7")},m(r,a){Z(r,t,a);for(let l=0;l<e.length;l+=1)e[l]&&e[l].m(t,null)},p(r,[a]){a&1&&(s=r[0],e=ai(e,a,o,1,r,s,i,t,la,Rf,null,jf))},i:ce,o:ce,d(r){r&&X(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function zC(n,t,e){let{extraObjects:i=[]}=t;return n.$$set=s=>{"extraObjects"in s&&e(0,i=s.extraObjects)},[i]}class OC extends Ee{constructor(t){super(),Ie(this,t,zC,LC,Me,{extraObjects:0},DC)}}function jC(n){let t,e,i,s,o,r,a;const l=[VC,_C],c=[];function h(d,p){return d[7]&&d[9]?0:1}t=h(n),e=c[t]=l[t](n),s=new OC({props:{extraObjects:n[8]}});let u=n[3]&&_f(n);return{c(){e.c(),i=ue(),ge(s.$$.fragment),o=ue(),u&&u.c(),r=Be()},m(d,p){c[t].m(d,p),Z(d,i,p),pe(s,d,p),Z(d,o,p),u&&u.m(d,p),Z(d,r,p),a=!0},p(d,p){let m=t;t=h(d),t===m?c[t].p(d,p):(xe(),Y(c[m],1,1,()=>{c[m]=null}),Se(),e=c[t],e?e.p(d,p):(e=c[t]=l[t](d),e.c()),H(e,1),e.m(i.parentNode,i));const g={};p&256&&(g.extraObjects=d[8]),s.$set(g),d[3]?u?(u.p(d,p),p&8&&H(u,1)):(u=_f(d),u.c(),H(u,1),u.m(r.parentNode,r)):u&&(xe(),Y(u,1,1,()=>{u=null}),Se())},i(d){a||(H(e),H(s.$$.fragment,d),H(u),a=!0)},o(d){Y(e),Y(s.$$.fragment,d),Y(u),a=!1},d(d){c[t].d(d),d&&X(i),me(s,d),d&&X(o),u&&u.d(d),d&&X(r)}}}function RC(n){let t,e;return t=new o1({props:{missingFloorConfig:n[6]}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&64&&(o.missingFloorConfig=i[6]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function _C(n){let t,e;const i=[{floorIndex:n[2],floorplanData:n[4]}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new Su({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r&20?yt(i,[{floorIndex:o[2],floorplanData:o[4]}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function VC(n){let t,e;return t=new u1({props:{image:n[7].guide,transform:n[9],zIndex:0}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&128&&(o.image=i[7].guide),s&512&&(o.transform=i[9]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function _f(n){let t,e;const i=[{five:n[0],pxmm:n[1],floorIndex:n[2],floorplanData:n[4],onRoomHeightClick:n[11],highlightData:n[5],hoveredRoom:void 0}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new Tu({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r&2103?yt(i,[{five:o[0],pxmm:o[1],floorIndex:o[2],floorplanData:o[4],onRoomHeightClick:o[11],highlightData:o[5],hoveredRoom:void 0}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function FC(n){let t,e,i,s;const o=[RC,jC],r=[];function a(l,c){return!l[10]&&!l[7]?0:1}return t=a(n),e=r[t]=o[t](n),{c(){e.c(),i=Be()},m(l,c){r[t].m(l,c),Z(l,i,c),s=!0},p(l,[c]){let h=t;t=a(l),t===h?r[t].p(l,c):(xe(),Y(r[h],1,1,()=>{r[h]=null}),Se(),e=r[t],e?e.p(l,c):(e=r[t]=o[t](l),e.c()),H(e,1),e.m(i.parentNode,i))},i(l){s||(H(e),s=!0)},o(l){Y(e),s=!1},d(l){r[t].d(l),l&&X(i)}}}function BC(n,t,e){let i,s,o,r,a,{five:l}=t,{pxmm:c}=t,{floorIndex:h}=t,{hoverEnable:u}=t,{floorplanData:d}=t,{extraObjects:p=[]}=t,{highlightData:m}=t,{missingFloorConfig:g}=t,{missingFloorImageUrl:v}=t,{styledFloorplanEnable:y=!1}=t;const w=void 0;return n.$$set=C=>{"five"in C&&e(0,l=C.five),"pxmm"in C&&e(1,c=C.pxmm),"floorIndex"in C&&e(2,h=C.floorIndex),"hoverEnable"in C&&e(3,u=C.hoverEnable),"floorplanData"in C&&e(4,d=C.floorplanData),"extraObjects"in C&&e(12,p=C.extraObjects),"highlightData"in C&&e(5,m=C.highlightData),"missingFloorConfig"in C&&e(6,g=C.missingFloorConfig),"missingFloorImageUrl"in C&&e(13,v=C.missingFloorImageUrl),"styledFloorplanEnable"in C&&e(14,y=C.styledFloorplanEnable)},n.$$.update=()=>{var C;n.$$.dirty&20&&e(15,i=d.floorDatas[h]),n.$$.dirty&32768&&e(10,s=i.rooms.length>0),n.$$.dirty&16404&&e(7,o=y?(C=d.styledFloorplan)==null?void 0:C.floors.find(E=>E.floorIndex===h):void 0),n.$$.dirty&146&&e(9,r=o?d1(o.guide.floorplanToImage,d.bounding,c):void 0),n.$$.dirty&4100&&e(8,a=p==null?void 0:p.filter(E=>E.floorIndex===h))},[l,c,h,u,d,m,g,o,a,r,s,w,p,v,y,i]}class HC extends Ee{constructor(t){super(),Ie(this,t,BC,FC,Me,{five:0,pxmm:1,floorIndex:2,hoverEnable:3,floorplanData:4,extraObjects:12,highlightData:5,missingFloorConfig:6,missingFloorImageUrl:13,styledFloorplanEnable:14})}}function NC(n){Le(n,"svelte-13ou6ew",".floorplan-guide-plugin__observer-dots.svelte-13ou6ew{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:10}.floorplan-guide-plugin__observer-dot.svelte-13ou6ew{position:absolute;background:#7dacff80;border:0.0375rem solid #96cfff;border-radius:50%;pointer-events:none;transform:translate(-50%, -50%);transition:opacity 0.8s ease-in-out}.floorplan-guide-plugin__styled-realsee .floorplan-guide-plugin__observer-dot.svelte-13ou6ew{background:#3366ff66;border:0;box-shadow:inset 0 0 0 0.03125rem #3366ff}")}function Vf(n,t,e){const i=n.slice();return i[6]=t[e],i}function Ff(n,t){let e;return{key:n,first:null,c(){e=U("div"),P(e,"class","floorplan-guide-plugin__observer-dot svelte-13ou6ew"),_(e,"left",t[6].positionInImage.x*t[0]+"px"),_(e,"top",t[6].positionInImage.y*t[1]+"px"),_(e,"width",t[2]+"px"),_(e,"height",t[2]+"px"),this.first=e},m(i,s){Z(i,e,s)},p(i,s){t=i,s&9&&_(e,"left",t[6].positionInImage.x*t[0]+"px"),s&10&&_(e,"top",t[6].positionInImage.y*t[1]+"px"),s&4&&_(e,"width",t[2]+"px"),s&4&&_(e,"height",t[2]+"px")},d(i){i&&X(e)}}}function GC(n){let t,e=[],i=new Map,s=n[3];const o=r=>r[6].index;for(let r=0;r<s.length;r+=1){let a=Vf(n,s,r),l=o(a);i.set(l,e[r]=Ff(l,a))}return{c(){t=U("div");for(let r=0;r<e.length;r+=1)e[r].c();P(t,"class","floorplan-guide-plugin__observer-dots svelte-13ou6ew")},m(r,a){Z(r,t,a);for(let l=0;l<e.length;l+=1)e[l]&&e[l].m(t,null)},p(r,[a]){a&15&&(s=r[3],e=ai(e,a,o,1,r,s,i,t,la,Ff,null,Vf))},i:ce,o:ce,d(r){r&&X(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function WC(n,t,e){let i,{floorplanData:s}=t,{floorIndex:o}=t,{contentWidth:r}=t,{contentHeight:a}=t,{observerDotSize:l=12}=t;return n.$$set=c=>{"floorplanData"in c&&e(4,s=c.floorplanData),"floorIndex"in c&&e(5,o=c.floorIndex),"contentWidth"in c&&e(0,r=c.contentWidth),"contentHeight"in c&&e(1,a=c.contentHeight),"observerDotSize"in c&&e(2,l=c.observerDotSize)},n.$$.update=()=>{var c,h;n.$$.dirty&48&&e(3,i=(h=(c=s.observers)==null?void 0:c.filter(u=>u.floorIndex===o))!=null?h:[])},[r,a,l,i,s,o]}class UC extends Ee{constructor(t){super(),Ie(this,t,WC,GC,Me,{floorplanData:4,floorIndex:5,contentWidth:0,contentHeight:1,observerDotSize:2},NC)}}function QC(n){Le(n,"svelte-qulme3",".floorplan-guide-plugin__room-label.svelte-qulme3{position:absolute;display:flex;flex-direction:column;align-items:center;transform:translate(-50%, -50%);color:#fff;text-shadow:0.0625rem 0.0625rem 0.125rem rgba(0, 0, 0, 0.8);line-height:1.2;white-space:nowrap;pointer-events:auto;cursor:pointer;transition:opacity 300ms;opacity:1}.floorplan-guide-plugin__room-label--hidden.svelte-qulme3{opacity:0}.floorplan-guide-plugin__room-label--hovered.svelte-qulme3{opacity:1 !important}.floorplan-guide-plugin__room-content.svelte-qulme3{display:flex;flex-direction:column;align-items:center}.floorplan-guide-plugin__room-name.svelte-qulme3{font-family:PingFangSC-Regular;font-weight:400;font-size:0.875rem;color:#FFFFFF;margin-bottom:0.125rem}.floorplan-guide-plugin__room-area.svelte-qulme3{opacity:0.6;font-family:PingFangSC-Regular;font-weight:400;font-size:0.75rem;color:#FFFFFF;text-align:center}")}function XC(n){let t,e,i=n[2]&&n[0]&&Bf(n),s=n[3]&&n[4]&&Hf(n);return{c(){t=U("div"),i&&i.c(),e=ue(),s&&s.c(),P(t,"class","floorplan-guide-plugin__room-content svelte-qulme3")},m(o,r){Z(o,t,r),i&&i.m(t,null),B(t,e),s&&s.m(t,null)},p(o,r){o[2]&&o[0]?i?i.p(o,r):(i=Bf(o),i.c(),i.m(t,e)):i&&(i.d(1),i=null),o[3]&&o[4]?s?s.p(o,r):(s=Hf(o),s.c(),s.m(t,null)):s&&(s.d(1),s=null)},d(o){o&&X(t),i&&i.d(),s&&s.d()}}}function YC(n){let t,e=n[5].outerHTML+"",i;return{c(){t=new Bo(!1),i=Be(),t.a=i},m(s,o){t.m(e,s,o),Z(s,i,o)},p(s,o){o&32&&e!==(e=s[5].outerHTML+"")&&t.p(e)},d(s){s&&X(i),s&&t.d()}}}function Bf(n){let t,e;return{c(){t=U("span"),e=Fe(n[0]),P(t,"class","floorplan-guide-plugin__room-name svelte-qulme3")},m(i,s){Z(i,t,s),B(t,e)},p(i,s){s&1&&Ne(e,i[0])},d(i){i&&X(t)}}}function Hf(n){let t,e;return{c(){t=U("span"),e=Fe(n[4]),P(t,"class","floorplan-guide-plugin__room-area svelte-qulme3")},m(i,s){Z(i,t,s),B(t,e)},p(i,s){s&16&&Ne(e,i[4])},d(i){i&&X(t)}}}function ZC(n){let t,e,i;function s(a,l){return a[5]?YC:XC}let o=s(n),r=o(n);return{c(){t=U("div"),r.c(),P(t,"class","floorplan-guide-plugin__room-label svelte-qulme3"),P(t,"role","button"),P(t,"tabindex","0"),Pe(t,"floorplan-guide-plugin__room-label--hovered",n[1]),Pe(t,"floorplan-guide-plugin__room-label--hidden",!n[10]),_(t,"left",n[6]),_(t,"top",n[7])},m(a,l){Z(a,t,l),r.m(t,null),e||(i=[_e(t,"mouseenter",n[18]),_e(t,"mouseleave",n[19]),_e(t,"keydown",qC),oi(_i.call(null,t)),_e(t,"clientWidth",n[20]),_e(t,"clientHeight",n[21])],e=!0)},p(a,[l]){o===(o=s(a))&&r?r.p(a,l):(r.d(1),r=o(a),r&&(r.c(),r.m(t,null))),l&2&&Pe(t,"floorplan-guide-plugin__room-label--hovered",a[1]),l&1024&&Pe(t,"floorplan-guide-plugin__room-label--hidden",!a[10]),l&64&&_(t,"left",a[6]),l&128&&_(t,"top",a[7])},i:ce,o:ce,d(a){a&&X(t),r.d(),e=!1,dt(i)}}}const qC=()=>{};function JC(n,t,e){let i,s,o,{room:r}=t,{roomName:a}=t,{isHovered:l}=t,{roomNameEnable:c}=t,{roomAreaEnable:h}=t,{roomAreaSize:u}=t,{userConfigElement:d}=t,{adaptiveRoomLabelVisibleEnable:p}=t,{pxmm:m}=t,{left:g}=t,{top:v}=t,{createLabelInRoomChecker:y}=t;const w=Vn();let C=0,E=0;const D=()=>w("mouseenter"),L=()=>w("mouseleave"),R=O=>{e(8,C=O.detail)},z=O=>{e(9,E=O.detail)};return n.$$set=O=>{"room"in O&&e(12,r=O.room),"roomName"in O&&e(0,a=O.roomName),"isHovered"in O&&e(1,l=O.isHovered),"roomNameEnable"in O&&e(2,c=O.roomNameEnable),"roomAreaEnable"in O&&e(3,h=O.roomAreaEnable),"roomAreaSize"in O&&e(4,u=O.roomAreaSize),"userConfigElement"in O&&e(5,d=O.userConfigElement),"adaptiveRoomLabelVisibleEnable"in O&&e(13,p=O.adaptiveRoomLabelVisibleEnable),"pxmm"in O&&e(14,m=O.pxmm),"left"in O&&e(6,g=O.left),"top"in O&&e(7,v=O.top),"createLabelInRoomChecker"in O&&e(15,y=O.createLabelInRoomChecker)},n.$$.update=()=>{n.$$.dirty&768&&e(17,i={width:C,height:E}),n.$$.dirty&167936&&e(16,s=i?y(r,i):void 0),n.$$.dirty&90114&&e(10,o=p?l||(s?s(m):!0):!0)},[a,l,c,h,u,d,g,v,C,E,o,w,r,p,m,y,s,i,D,L,R,z]}class KC extends Ee{constructor(t){super(),Ie(this,t,JC,ZC,Me,{room:12,roomName:0,isHovered:1,roomNameEnable:2,roomAreaEnable:3,roomAreaSize:4,userConfigElement:5,adaptiveRoomLabelVisibleEnable:13,pxmm:14,left:6,top:7,createLabelInRoomChecker:15},QC)}}const{Map:$C}=qv;function e5(n){Le(n,"svelte-k2rax0",".floorplan-guide-plugin__room-labels.svelte-k2rax0{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:15}")}function Nf(n,t,e){const i=n.slice();return i[23]=t[e].room,i[24]=t[e].label,i[25]=t[e].roomName,i}function Gf(n,t){let e,i,s;function o(...a){return t[20](t[24],...a)}function r(){return t[21](t[23])}return i=new KC({props:{room:t[23],roomName:t[25],isHovered:t[7]===t[23].id,roomNameEnable:t[0],roomAreaEnable:t[1],roomAreaSize:t[23].size?t[3](t[23].size):"",userConfigElement:t[4]?t[4](t[23]):null,adaptiveRoomLabelVisibleEnable:t[2],pxmm:t[6],left:t[24].positionInImage.x*100+"%",top:t[24].positionInImage.y*100+"%",createLabelInRoomChecker:o}}),i.$on("mouseenter",r),i.$on("mouseleave",t[10]),{key:n,first:null,c(){e=Be(),ge(i.$$.fragment),this.first=e},m(a,l){Z(a,e,l),pe(i,a,l),s=!0},p(a,l){t=a;const c={};l&256&&(c.room=t[23]),l&256&&(c.roomName=t[25]),l&384&&(c.isHovered=t[7]===t[23].id),l&1&&(c.roomNameEnable=t[0]),l&2&&(c.roomAreaEnable=t[1]),l&264&&(c.roomAreaSize=t[23].size?t[3](t[23].size):""),l&272&&(c.userConfigElement=t[4]?t[4](t[23]):null),l&4&&(c.adaptiveRoomLabelVisibleEnable=t[2]),l&64&&(c.pxmm=t[6]),l&256&&(c.left=t[24].positionInImage.x*100+"%"),l&256&&(c.top=t[24].positionInImage.y*100+"%"),l&256&&(c.createLabelInRoomChecker=o),i.$set(c)},i(a){s||(H(i.$$.fragment,a),s=!0)},o(a){Y(i.$$.fragment,a),s=!1},d(a){a&&X(e),me(i,a)}}}function t5(n){let t,e=[],i=new $C,s,o,r,a=n[8];const l=c=>c[23].id;for(let c=0;c<a.length;c+=1){let h=Nf(n,a,c),u=l(h);i.set(u,e[c]=Gf(u,h))}return{c(){t=U("div");for(let c=0;c<e.length;c+=1)e[c].c();P(t,"class","floorplan-guide-plugin__room-labels svelte-k2rax0")},m(c,h){Z(c,t,h);for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(t,null);s=!0,o||(r=[oi(_i.call(null,t)),_e(t,"clientWidth",n[22])],o=!0)},p(c,[h]){h&2015&&(a=c[8],xe(),e=ai(e,h,l,1,c,a,i,t,fn,Gf,null,Nf),Se())},i(c){if(!s){for(let h=0;h<a.length;h+=1)H(e[h]);s=!0}},o(c){for(let h=0;h<e.length;h+=1)Y(e[h]);s=!1},d(c){c&&X(t);for(let h=0;h<e.length;h+=1)e[h].d();o=!1,dt(r)}}}function i5(n,t){const e=n[0],i=n[1];let s=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){const a=t[o][0],l=t[o][1],c=t[r][0],h=t[r][1];l>i!=h>i&&e<(c-a)*(i-l)/(h-l)+a&&(s=!s)}return s}function n5(n,t,e=n.roomLabel.position){if(t.width===0||t.height===0)return()=>!1;const i=n.path.map(({x:h,y:u})=>[h,u]),{x:s,y:o}=e,{width:r,height:a}=t,l=r/2,c=a/2;return function(u){const d=s*u,p=o*u,m=i.map(([v,y])=>[v*u,y*u]);return[[d+l,p-c],[d-l,p-c],[d-l,p+c],[d+l,p+c]].every(v=>i5(v,m))}}function s5(n,t,e){let i,s,o,r,{floorplanData:a}=t,{floorIndex:l}=t,{roomNameEnable:c=!0}=t,{roomNameOtherTypeEnable:h=!0}=t,{roomAreaEnable:u=!0}=t,{adaptiveRoomLabelVisibleEnable:d=!0}=t,{getRoomAreaText:p}=t,{getLabelElement:m}=t,{locale:g}=t,{styledFloorplanEnable:v=!1}=t,{styledRoomLabels:y}=t,w=0,C=0,E=null;function D(A){e(7,E=A.id)}function L(){e(7,E=null)}const R=(A,M,I)=>n5(M,I,A.position),z=A=>D(A),O=A=>{e(5,w=A.detail)};return n.$$set=A=>{"floorplanData"in A&&e(11,a=A.floorplanData),"floorIndex"in A&&e(12,l=A.floorIndex),"roomNameEnable"in A&&e(0,c=A.roomNameEnable),"roomNameOtherTypeEnable"in A&&e(13,h=A.roomNameOtherTypeEnable),"roomAreaEnable"in A&&e(1,u=A.roomAreaEnable),"adaptiveRoomLabelVisibleEnable"in A&&e(2,d=A.adaptiveRoomLabelVisibleEnable),"getRoomAreaText"in A&&e(3,p=A.getRoomAreaText),"getLabelElement"in A&&e(4,m=A.getLabelElement),"locale"in A&&e(14,g=A.locale),"styledFloorplanEnable"in A&&e(15,v=A.styledFloorplanEnable),"styledRoomLabels"in A&&e(16,y=A.styledRoomLabels)},n.$$.update=()=>{var A,M;if(n.$$.dirty&6144&&e(19,i=(M=(A=a.floorDatas[l])==null?void 0:A.rooms)!=null?M:[]),n.$$.dirty&532480&&e(18,s=h?i:i.filter(I=>I.roomType!=="100900000012")),n.$$.dirty&65536&&e(17,o=new Map(y==null?void 0:y.map(I=>[I.roomId,I]))),n.$$.dirty&442368&&e(8,r=s.flatMap(I=>{var S,j;const k=o.get(I.id),x=v?k:I.roomLabel;return x?v?[{room:I,label:x,roomName:(j=(S=k==null?void 0:k.names)==null?void 0:S[g])!=null?j:""}]:[{room:I,label:x,roomName:I.name}]:[]})),n.$$.dirty&2080){const{max:I,min:k}=a.bounding,x=I.x-k.x;e(6,C=w/x)}},[c,u,d,p,m,w,C,E,r,D,L,a,l,h,g,v,y,o,s,i,R,z,O]}class o5 extends Ee{constructor(t){super(),Ie(this,t,s5,t5,Me,{floorplanData:11,floorIndex:12,roomNameEnable:0,roomNameOtherTypeEnable:13,roomAreaEnable:1,adaptiveRoomLabelVisibleEnable:2,getRoomAreaText:3,getLabelElement:4,locale:14,styledFloorplanEnable:15,styledRoomLabels:16},e5)}}function r5(n){Le(n,"svelte-19jnco7",".floorplan-plugin__compass.svelte-19jnco7{position:absolute;will-change:opacity}.floorplan-plugin__compass-image.svelte-19jnco7{width:14.4375rem;height:2.5625rem;position:absolute;left:50%;top:50%;transform:translateX(-50%) translateY(-50%);opacity:0.1;background-repeat:no-repeat;background-size:100% 100%}.floorplan-plugin__compass-text.svelte-19jnco7{position:absolute;left:50%;top:50%;transform:translateX(-50%) translateY(-50%);opacity:0.2;font-weight:bold;font-size:0.625rem;color:#fff}")}function a5(n){let t,e,i,s,o,r=`${n[1]}px`,a=`${n[2]}px`,l=`-${n[2]}px`,c=`${n[5]}px ${n[6]}px`;return{c(){t=U("div"),e=U("div"),i=ue(),s=U("span"),o=Fe(n[0]),P(e,"class","floorplan-plugin__compass-image svelte-19jnco7"),_(e,"background-image",`url(${r1})`),P(s,"class","floorplan-plugin__compass-text svelte-19jnco7"),P(t,"class","floorplan-plugin__compass svelte-19jnco7"),_(t,"transform",n[4]),_(t,"width",r),_(t,"height",a),_(t,"top",l),_(t,"transform-origin",c)},m(h,u){Z(h,t,u),B(t,e),B(t,i),B(t,s),B(s,o)},p(h,u){u&1&&Ne(o,h[0]),u&2&&r!==(r=`${h[1]}px`)&&_(t,"width",r),u&4&&a!==(a=`${h[2]}px`)&&_(t,"height",a),u&4&&l!==(l=`-${h[2]}px`)&&_(t,"top",l)},d(h){h&&X(t)}}}function l5(n){let t,e=n[3]&&a5(n);return{c(){e&&e.c(),t=Be()},m(i,s){e&&e.m(i,s),Z(i,t,s)},p(i,[s]){i[3]&&e.p(i,s)},i:ce,o:ce,d(i){e&&e.d(i),i&&X(t)}}}function c5(n,t,e){var m;let{floorplanData:i}=t,{northDesc:s}=t,{containerWidth:o}=t,{containerHeight:r}=t,{height:a=50}=t;const l=(m=i.entrance)==null?void 0:m.northRad,c=typeof l=="number",u=`rotate(${-(l?di(l):0)+90}deg)`,d=o/2,p=a+r/2;return n.$$set=g=>{"floorplanData"in g&&e(7,i=g.floorplanData),"northDesc"in g&&e(0,s=g.northDesc),"containerWidth"in g&&e(1,o=g.containerWidth),"containerHeight"in g&&e(8,r=g.containerHeight),"height"in g&&e(2,a=g.height)},[s,o,a,c,u,d,p,i,r]}class h5 extends Ee{constructor(t){super(),Ie(this,t,c5,l5,Me,{floorplanData:7,northDesc:0,containerWidth:1,containerHeight:8,height:2},r5)}}function u5(n){Le(n,"svelte-5trsl8",".plugin-floorplan-radar.svelte-5trsl8{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-5trsl8{position:relative}.floorplan-guide-plugin__styled-realsee .floorplan-plugin__styled-image{filter:drop-shadow(0.0625rem 0 0 #fff) drop-shadow(-0.0625rem 0 0 #fff) drop-shadow(0 0.0625rem 0 #fff) drop-shadow(0 -0.0625rem 0 #fff)}.plugin-floorplan-radar-container.floorplan-guide-plugin__styled-realsee .floorplan-guide-plugin__room-label{text-shadow:none}.plugin-floorplan-radar-container.floorplan-guide-plugin__styled-realsee .floorplan-guide-plugin__room-name,.plugin-floorplan-radar-container.floorplan-guide-plugin__styled-realsee .floorplan-guide-plugin__room-area{color:rgba(0, 0, 0, 0.85)}.plugin-floorplan-radar-container.floorplan-guide-plugin__styled-realsee .floorplan-guide-plugin__room-area{font-size:0.625rem;opacity:1}")}function Wf(n){let t,e,i,s,o=n[27]!==0&&Uf(n);return{c(){t=U("div"),o&&o.c(),P(t,"class","plugin-floorplan-radar svelte-5trsl8")},m(r,a){Z(r,t,a),o&&o.m(t,null),e=!0,i||(s=[oi(_i.call(null,t)),_e(t,"clientWidth",n[36]),_e(t,"clientHeight",n[37])],i=!0)},p(r,a){r[27]!==0?o?(o.p(r,a),a[0]&134217728&&H(o,1)):(o=Uf(r),o.c(),H(o,1),o.m(t,null)):o&&(xe(),Y(o,1,1,()=>{o=null}),Se())},i(r){e||(H(o),e=!0)},o(r){Y(o),e=!1},d(r){r&&X(t),o&&o.d(),i=!1,dt(s)}}}function Uf(n){let t,e,i,s=`${n[29]}px`,o=`${n[32]}px`,r,a,l;const c=[{five:n[0],pxmm:n[31],floorIndex:n[21],floorplanData:n[3],hoverEnable:n[2],extraObjects:n[5],highlightData:n[6],missingFloorImageUrl:n[7],missingFloorConfig:n[8],styledFloorplanEnable:n[26]}];let h={};for(let d=0;d<c.length;d+=1)h=pt(h,c[d]);e=new HC({props:h});let u=n[33]&&Qf(n);return{c(){t=U("div"),ge(e.$$.fragment),i=ue(),u&&u.c(),P(t,"class","plugin-floorplan-radar-container svelte-5trsl8"),Pe(t,"floorplan-guide-plugin__styled-realsee",!!n[30]),_(t,"width",s),_(t,"height",o),_(t,"cursor",n[9]?"pointer":"default")},m(d,p){Z(d,t,p),pe(e,t,null),B(t,i),u&&u.m(t,null),r=!0,a||(l=_e(t,"click",n[34]),a=!0)},p(d,p){const m=p[0]&69206509|p[1]&1?yt(c,[{five:d[0],pxmm:d[31],floorIndex:d[21],floorplanData:d[3],hoverEnable:d[2],extraObjects:d[5],highlightData:d[6],missingFloorImageUrl:d[7],missingFloorConfig:d[8],styledFloorplanEnable:d[26]}]):{};e.$set(m),d[33]?u?(u.p(d,p),p[1]&4&&H(u,1)):(u=Qf(d),u.c(),H(u,1),u.m(t,null)):u&&(xe(),Y(u,1,1,()=>{u=null}),Se()),(!r||p[0]&1073741824)&&Pe(t,"floorplan-guide-plugin__styled-realsee",!!d[30]),p[0]&536870912&&s!==(s=`${d[29]}px`)&&_(t,"width",s),p[1]&2&&o!==(o=`${d[32]}px`)&&_(t,"height",o),p[0]&512&&_(t,"cursor",d[9]?"pointer":"default")},i(d){r||(H(e.$$.fragment,d),H(u),r=!0)},o(d){Y(e.$$.fragment,d),Y(u),r=!1},d(d){d&&X(t),me(e),u&&u.d(),a=!1,l()}}}function Qf(n){let t,e,i,s,o,r;const a=[{floorplanData:n[3],floorIndex:n[21],contentWidth:n[29],contentHeight:n[32],observerDotSize:n[20]}];let l={};for(let d=0;d<a.length;d+=1)l=pt(l,a[d]);t=new UC({props:l});let c=n[10]&&Xf(n),h=n[17]&&!n[30]&&Yf(n),u=n[22]&&Zf(n);return{c(){ge(t.$$.fragment),e=ue(),c&&c.c(),i=ue(),h&&h.c(),s=ue(),u&&u.c(),o=Be()},m(d,p){pe(t,d,p),Z(d,e,p),c&&c.m(d,p),Z(d,i,p),h&&h.m(d,p),Z(d,s,p),u&&u.m(d,p),Z(d,o,p),r=!0},p(d,p){const m=p[0]&540016648|p[1]&2?yt(a,[{floorplanData:d[3],floorIndex:d[21],contentWidth:d[29],contentHeight:d[32],observerDotSize:d[20]}]):{};t.$set(m),d[10]?c?(c.p(d,p),p[0]&1024&&H(c,1)):(c=Xf(d),c.c(),H(c,1),c.m(i.parentNode,i)):c&&(xe(),Y(c,1,1,()=>{c=null}),Se()),d[17]&&!d[30]?h?(h.p(d,p),p[0]&1073872896&&H(h,1)):(h=Yf(d),h.c(),H(h,1),h.m(s.parentNode,s)):h&&(xe(),Y(h,1,1,()=>{h=null}),Se()),d[22]?u?(u.p(d,p),p[0]&4194304&&H(u,1)):(u=Zf(d),u.c(),H(u,1),u.m(o.parentNode,o)):u&&(xe(),Y(u,1,1,()=>{u=null}),Se())},i(d){r||(H(t.$$.fragment,d),H(c),H(h),H(u),r=!0)},o(d){Y(t.$$.fragment,d),Y(c),Y(h),Y(u),r=!1},d(d){me(t,d),d&&X(e),c&&c.d(d),d&&X(i),h&&h.d(d),d&&X(s),u&&u.d(d),d&&X(o)}}}function Xf(n){var o;let t,e;const i=[{floorplanData:n[3],floorIndex:n[21],roomNameEnable:n[11],roomNameOtherTypeEnable:n[12],roomAreaEnable:n[13],adaptiveRoomLabelVisibleEnable:n[14],getRoomAreaText:n[15],getLabelElement:n[16],locale:n[25],styledFloorplanEnable:!!n[30],styledRoomLabels:(o=n[30])==null?void 0:o.roomLabels}];let s={};for(let r=0;r<i.length;r+=1)s=pt(s,i[r]);return t=new o5({props:s}),{c(){ge(t.$$.fragment)},m(r,a){pe(t,r,a),e=!0},p(r,a){var c;const l=a[0]&1109522440?yt(i,[{floorplanData:r[3],floorIndex:r[21],roomNameEnable:r[11],roomNameOtherTypeEnable:r[12],roomAreaEnable:r[13],adaptiveRoomLabelVisibleEnable:r[14],getRoomAreaText:r[15],getLabelElement:r[16],locale:r[25],styledFloorplanEnable:!!r[30],styledRoomLabels:(c=r[30])==null?void 0:c.roomLabels}]):{};t.$set(l)},i(r){e||(H(t.$$.fragment,r),e=!0)},o(r){Y(t.$$.fragment,r),e=!1},d(r){me(t,r)}}}function Yf(n){let t,e;const i=[{floorplanData:n[3],northDesc:n[18],containerWidth:n[29],containerHeight:n[32],height:n[19]}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new h5({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r[0]&537657352|r[1]&2?yt(i,[{floorplanData:o[3],northDesc:o[18],containerWidth:o[29],containerHeight:o[32],height:o[19]}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function Zf(n){let t,e;const i=[{pxmm:n[31],five:n[0],floorplanData:n[3],cameraImageUrl:n[4],cameraSize:n[23],cameraOffset:n[24]}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new TC({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r[0]&25165849|r[1]&1?yt(i,[{pxmm:o[31],five:o[0],floorplanData:o[3],cameraImageUrl:o[4],cameraSize:o[23],cameraOffset:o[24]}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function d5(n){let t,e,i=n[1]&&Wf(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,o){s[1]?i?(i.p(s,o),o[0]&2&&H(i,1)):(i=Wf(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function f5(n,t,e){let i,s,{five:o}=t,{visible:r}=t,{hoverEnable:a}=t,{floorplanData:l}=t,{cameraImageUrl:c}=t,{extraObjects:h=[]}=t,{highlightData:u}=t,{missingFloorImageUrl:d}=t,{missingFloorConfig:p}=t,{clickEnable:m=!0}=t,{roomLabelsEnable:g=!1}=t,{roomNameEnable:v=!0}=t,{roomNameOtherTypeEnable:y=!0}=t,{roomAreaEnable:w=!0}=t,{adaptiveRoomLabelVisibleEnable:C=!0}=t,{getRoomAreaText:E=ee=>(ee/1e6).toFixed(1)+"㎡"}=t,{getLabelElement:D=void 0}=t,{compassEnable:L=!1}=t,{northDesc:R="北"}=t,{compassHeight:z=50}=t,{observerDotSize:O=12}=t,{displayedFloorIndex:A}=t,{shouldShowRadar:M=!0}=t,{cameraSize:I=36}=t,{cameraOffset:k=28.5}=t,{onFloorplanClick:x=void 0}=t,{locale:S}=t,{styledFloorplanEnable:j=!1}=t,F=0,J=0,ne=0,q=0,oe=0;function se(ee){if(!m||!x)return;const le=ee.currentTarget.getBoundingClientRect(),he=ee.clientX-le.left,be=ee.clientY-le.top,te=he/q,ke=be/oe;x({imageX:te,imageY:ke,floorIndex:A,originalEvent:ee})}const ae=ee=>{e(27,J=ee.detail)},ze=ee=>{e(28,ne=ee.detail)};return n.$$set=ee=>{"five"in ee&&e(0,o=ee.five),"visible"in ee&&e(1,r=ee.visible),"hoverEnable"in ee&&e(2,a=ee.hoverEnable),"floorplanData"in ee&&e(3,l=ee.floorplanData),"cameraImageUrl"in ee&&e(4,c=ee.cameraImageUrl),"extraObjects"in ee&&e(5,h=ee.extraObjects),"highlightData"in ee&&e(6,u=ee.highlightData),"missingFloorImageUrl"in ee&&e(7,d=ee.missingFloorImageUrl),"missingFloorConfig"in ee&&e(8,p=ee.missingFloorConfig),"clickEnable"in ee&&e(9,m=ee.clickEnable),"roomLabelsEnable"in ee&&e(10,g=ee.roomLabelsEnable),"roomNameEnable"in ee&&e(11,v=ee.roomNameEnable),"roomNameOtherTypeEnable"in ee&&e(12,y=ee.roomNameOtherTypeEnable),"roomAreaEnable"in ee&&e(13,w=ee.roomAreaEnable),"adaptiveRoomLabelVisibleEnable"in ee&&e(14,C=ee.adaptiveRoomLabelVisibleEnable),"getRoomAreaText"in ee&&e(15,E=ee.getRoomAreaText),"getLabelElement"in ee&&e(16,D=ee.getLabelElement),"compassEnable"in ee&&e(17,L=ee.compassEnable),"northDesc"in ee&&e(18,R=ee.northDesc),"compassHeight"in ee&&e(19,z=ee.compassHeight),"observerDotSize"in ee&&e(20,O=ee.observerDotSize),"displayedFloorIndex"in ee&&e(21,A=ee.displayedFloorIndex),"shouldShowRadar"in ee&&e(22,M=ee.shouldShowRadar),"cameraSize"in ee&&e(23,I=ee.cameraSize),"cameraOffset"in ee&&e(24,k=ee.cameraOffset),"onFloorplanClick"in ee&&e(35,x=ee.onFloorplanClick),"locale"in ee&&e(25,S=ee.locale),"styledFloorplanEnable"in ee&&e(26,j=ee.styledFloorplanEnable)},n.$$.update=()=>{var ee,we;if(n.$$.dirty[0]&69206024&&e(30,i=j?(ee=l.styledFloorplan)==null?void 0:ee.floors.find(le=>le.floorIndex===A):void 0),n.$$.dirty[0]&939524104){const le=Math.min(J,ne),{max:he,min:be}=l.bounding,te=he.x-be.x,ke=he.y-be.y,Re=function(){return te>ke?[le,le/te*ke]:[le/ke*te,le]}();e(29,q=Re[0]),e(32,oe=Re[1]),e(31,F=q/te)}n.$$.dirty[0]&1075838984&&e(33,s=!!i||((we=l.floorDatas[A])==null?void 0:we.rooms.length)>0)},[o,r,a,l,c,h,u,d,p,m,g,v,y,w,C,E,D,L,R,z,O,A,M,I,k,S,j,J,ne,q,i,F,oe,s,se,x,ae,ze]}class p5 extends Ee{constructor(t){super(),Ie(this,t,f5,d5,Me,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5,highlightData:6,missingFloorImageUrl:7,missingFloorConfig:8,clickEnable:9,roomLabelsEnable:10,roomNameEnable:11,roomNameOtherTypeEnable:12,roomAreaEnable:13,adaptiveRoomLabelVisibleEnable:14,getRoomAreaText:15,getLabelElement:16,compassEnable:17,northDesc:18,compassHeight:19,observerDotSize:20,displayedFloorIndex:21,shouldShowRadar:22,cameraSize:23,cameraOffset:24,onFloorplanClick:35,locale:25,styledFloorplanEnable:26},u5,[-1,-1])}}let m5=class extends pn{constructor(e,i){var r,a,l;super(e);f(this,"name","floorplanGuidePlugin");f(this,"state");f(this,"data");f(this,"app");f(this,"wrapperSelector","");f(this,"wrapper",null);f(this,"disposed",!1);f(this,"extraObjects",[]);f(this,"highlightData",{});f(this,"defaultMissingFloorConfig");f(this,"dispose",()=>{var e;this.disposed=!0,(e=this.app)==null||e.$destroy(),this.wrapper=null,this.wrapperSelector="",this.five.off("panoArrived",this.handlePanoArrived),this.hooks.emit("dispose")});f(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});f(this,"unhighlight",()=>{this.highlightData={},this.render()});f(this,"handleFloorplanClick",e=>{var c;const i=(c=this.data)==null?void 0:c.observers;if(!i||i.length===0){console.warn("No floorplan observers found");return}const s=e.imageX,o=e.imageY,r=e.floorIndex;let a=null,l=1/0;i.forEach(h=>{if(h.floorIndex!==r)return;const u=h.positionInImage,d=u.x,p=u.y,m=Math.sqrt(Math.pow(s-d,2)+Math.pow(o-p,2));m<l&&(l=m,a={panoIndex:h.index,distance:m,observer:h})}),a?this.five.emit("wantsToMoveToPano",a.panoIndex,{},!0)||this.five.moveToPano(a.panoIndex):console.warn("No suitable observer found on the same floor")});f(this,"_disable",e=>{var s;const{userAction:i}=e;(s=this.app)==null||s.$destroy(),this.app=void 0,this.hooks.emit("disable",{userAction:i})});f(this,"handlePanoArrived",()=>{var i,s;const e=(s=(i=this.five.work.observers[this.five.getCurrentState().panoIndex])==null?void 0:i.floorIndex)!=null?s:0;this.updateState({displayedFloorIndex:e},!0),this.render()});this.five=e,this.defaultMissingFloorConfig={imageURL:Wi(i==null?void 0:i.staticPrefix,cs),imageWidth:200,imageHeight:120,text:(a=(r=i==null?void 0:i.i18n)==null?void 0:r.call(i,"暂无平面图"))!=null?a:"暂无平面图",textFontSize:14};const s={locale:(l=i==null?void 0:i.locale)!=null?l:"zh-CN",styledFloorplanEnable:!1,hoverEnable:!1,highlightEnable:!1,cameraImageUrl:hh,missingFloorImageUrl:Wi(i==null?void 0:i.staticPrefix,cs),missingFloorConfig:V(V({},this.defaultMissingFloorConfig),i==null?void 0:i.missingFloorConfig),clickEnable:!0,roomLabelsEnable:!1,roomNameEnable:!0,roomNameOtherTypeEnable:!1,roomAreaEnable:!0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:c=>(c/1e6).toFixed(1)+"㎡",getLabelElement:void 0,compassEnable:!1,northDesc:"北",compassHeight:50,observerDotSize:12,cameraSize:36,cameraOffset:28.5,i18n:(i==null?void 0:i.i18n)||(c=>c)},o=V(V({},s),i==null?void 0:i.configs);this.state={enabled:!0,visible:!0,config:o},i!=null&&i.wrapper&&console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法"),typeof(i==null?void 0:i.wrapper)=="string"?this.wrapperSelector=i.wrapper:(i==null?void 0:i.wrapper)instanceof Element&&(this.wrapper=i.wrapper),e.once("dispose",this.dispose),e.on("panoArrived",this.handlePanoArrived)}load(e,i,s=!0){return $(this,null,function*(){function o(c){return Object.prototype.hasOwnProperty.apply(c,["version"])}const r=JSON.parse(JSON.stringify(e)),a=o(r)?r.data:r,l=this.data;this.data=yield un(a),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,l),i&&this.updateState(i,s),this.render()})}show(){return $(this,arguments,function*(e={}){if(this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},i),this._show({userAction:i})})}hide(){return $(this,arguments,function*(e={}){if(!this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},i),this._hide({userAction:i})})}enable(e={}){if(this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||i),this._enable({userAction:i})}disable(e={}){if(!this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||i),this._disable({userAction:i})}setState(e,i={}){const s=this.state,o=i.userAction!==void 0?i.userAction:!0;if(this.updateState(e,o),e.enabled!==void 0&&s.enabled!==e.enabled){const r={userAction:o};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&s.visible!==e.visible){const r={userAction:o};e.visible?this._show(r):this._hide(r)}}appendTo(e){this.wrapper!==e&&this.app&&(this.app.$destroy(),this.app=void 0),this.wrapper=e,this.render()}changeConfigs(e,i=!0){this.setState({config:e},{userAction:i}),this.render()}setExtraObjectsWith3DPositions(e){this.data&&(this.extraObjects=a1(e,this.five,this.data),this.render())}changeFloor(e){if(!this.data){console.warn("No floorplan data loaded");return}if(e<0||e>=this.data.floorDatas.length){console.warn(`Invalid floor index: ${e}. Available floors: 0-${this.data.floorDatas.length-1}`);return}this.updateState({displayedFloorIndex:e},!0),this.render()}formatData(e){return $(this,null,function*(){return yield un(e.data)})}_enable(e){const{userAction:i}=e;this.hooks.emit("enable",{userAction:i}),this.state.visible&&this._show({userAction:i})}_show(e){if(this.disposed||!this.state.enabled)return;const{userAction:i}=e;this.hooks.emit("show",{userAction:i}),this.render()}_hide(e){if(this.disposed||!this.state.enabled)return;const{userAction:i}=e;this.hooks.emit("hide",{userAction:i}),this.render()}updateState(e,i){var a;const s=this.state,o=(a=e.config)!=null&&a.missingFloorConfig?V(V({},s.config.missingFloorConfig),e.config.missingFloorConfig):s.config.missingFloorConfig,r=e.config?de(V(V({},s.config),e.config),{missingFloorConfig:o}):s.config;this.state=de(V(V({},this.state),e),{config:r}),!Wt(this.state,s,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:i})}render(){var r,a;if(this.disposed||!this.state.enabled)return;if(!this.wrapper&&this.wrapperSelector){const l=document.querySelector(this.wrapperSelector);this.wrapper=l}if(!this.data||!this.wrapper)return;const e=(a=(r=this.five.work.observers[this.five.getCurrentState().panoIndex])==null?void 0:r.floorIndex)!=null?a:0,i=this.state.displayedFloorIndex!==void 0?this.state.displayedFloorIndex:e,s=i===e,o=de(V({},this.state.config),{five:this.five,floorplanData:this.data,visible:this.state.visible,extraObjects:this.extraObjects,highlightData:this.highlightData,displayedFloorIndex:i,shouldShowRadar:s,cameraSize:this.state.config.cameraSize||36,cameraOffset:this.state.config.cameraOffset||28.5,onFloorplanClick:this.state.config.clickEnable?this.handleFloorplanClick:void 0});this.app?this.app.$set(o):this.app=new p5({target:this.wrapper,props:o})}};const g5=(n,t)=>new m5(n,t),v5=[{type:0,floorType:1,roomType:"100900000012",name:"其他"},{type:1,floorType:1,roomType:"100900000002",name:"客厅"},{type:2,floorType:1,roomType:"100900000002",name:"餐厅"},{type:3,floorType:0,roomType:"100900000001",name:"卧室"},{type:4,floorType:0,roomType:"100900000001",name:"书房"},{type:5,floorType:3,roomType:"100900000004",name:"卫生间"},{type:6,floorType:3,roomType:"100900000004",name:"淋浴间"},{type:7,floorType:3,roomType:"100900000004",name:"洗手间"},{type:8,floorType:3,roomType:"100900000003",name:"厨房"},{type:9,floorType:1,roomType:"100900000003",name:"开放厨房",onlySubArea:!0},{type:10,floorType:0,roomType:"100900000001",name:"多功能间"},{type:11,floorType:0,roomType:"100900000009",name:"保姆间"},{type:12,floorType:4,roomType:"100900000005",name:"阳台"},{type:13,floorType:4,roomType:"100900000006",name:"露台"},{type:14,floorType:0,roomType:"100900000008",name:"储物间"},{type:15,floorType:0,roomType:"100900000013",name:"衣帽间"},{type:16,floorType:0,roomType:"100900000011",name:"阁楼"},{type:17,floorType:2,roomType:"100900000007",name:"花园"},{type:18,floorType:5,roomType:"100900000010",name:"车库"},{type:19,floorType:1,roomType:"100900000012",name:"电梯"},{type:20,floorType:1,roomType:"100900000012",name:"地下室"},{type:21,floorType:1,roomType:"100900000012",name:"天井"},{type:22,floorType:1,roomType:"100900000012",name:"阳光房"},{type:23,floorType:1,roomType:"100900000012",name:"过道"},{type:24,floorType:1,roomType:"100900000012",name:"楼梯间"},{type:25,floorType:1,roomType:"100900000012",name:"门厅"},{type:26,floorType:2,roomType:"100900000012",name:"入户花园"},{type:27,floorType:1,roomType:"100900000012",name:"玄关"},{type:28,floorType:1,roomType:"100900000012",name:"挑空"},{type:29,floorType:4,roomType:"100900000012",name:"晾晒区"},{type:30,floorType:4,roomType:"100900000012",name:"洗衣房"},{type:31,floorType:0,roomType:"100900000012",name:"娱乐区"},{type:32,floorType:0,roomType:"100900000012",name:"健身区"},{type:33,floorType:0,roomType:"100900000012",name:"接待区"},{type:34,floorType:0,roomType:"100900000012",name:"影音区"},{type:35,floorType:1,roomType:"100900000012",name:"餐饮区"},{type:36,floorType:1,roomType:"100900000012",name:"其他",onlySubArea:!0},{type:37,floorType:1,roomType:"100900000002",name:"起居室"},{type:38,floorType:0,roomType:"100900000001",name:"主卧"},{type:39,floorType:0,roomType:"100900000001",name:"次卧"},{type:40,floorType:0,roomType:"100900000001",name:"优化间"},{type:41,floorType:0,roomType:"100900000001",name:"办公室"},{type:42,floorType:0,roomType:"100900000001",name:"会议室"},{type:43,floorType:0,roomType:"100900000001",name:"洽谈间"},{type:44,floorType:1,roomType:"100900000002",name:"共享大厅"},{type:45,floorType:1,roomType:"100900000012",name:"水吧"},{type:46,floorType:0,roomType:"100900000015",name:"出入口"},{type:47,floorType:0,roomType:"100900000015",name:"大厅"},{type:48,floorType:0,roomType:"100900000015",name:"包厢"},{type:49,floorType:0,roomType:"100900000015",name:"其他"},{type:50,floorType:0,roomType:"100900000016",name:"出入口"},{type:51,floorType:0,roomType:"100900000016",name:"办公区"},{type:52,floorType:0,roomType:"100900000016",name:"老板间"},{type:53,floorType:0,roomType:"100900000016",name:"会议室"},{type:54,floorType:0,roomType:"100900000016",name:"休息区/水吧"},{type:55,floorType:0,roomType:"100900000016",name:"其他"},{type:56,floorType:2,roomType:"100900000012",name:"空中花园"},{type:57,floorType:0,roomType:"100900000001",name:"洋室"},{type:58,floorType:0,roomType:"100900000001",name:"和室"}],y5=[{type:0,description:"木质地板"},{type:1,description:"瓷砖地面"},{type:2,description:"户外地面"},{type:3,description:"卫生间地面"},{type:4,description:"阳台地面"},{type:5,description:"车库地面"}],b5=[{roomType:"100900000001",description:"室"},{roomType:"100900000002",description:"厅"},{roomType:"100900000003",description:"厨"},{roomType:"100900000004",description:"卫"},{roomType:"100900000005",description:"阳台"},{roomType:"100900000006",description:"露台"},{roomType:"100900000007",description:"花园"},{roomType:"100900000008",description:"储"},{roomType:"100900000009",description:"保姆间"},{roomType:"100900000010",description:"车库"},{roomType:"100900000011",description:"阁楼"},{roomType:"100900000012",description:"其他"},{roomType:"100900000013",description:"衣"},{roomType:"100900000015",description:"商铺"},{roomType:"100900000016",description:"写字楼"}],wc=(n,t,e)=>{const i=new b.Matrix4,s=new b.Euler(n,t,e,"YXZ");return i.makeRotationFromEuler(s),i},A5=(n,{scale:t,rotation:e,position:i})=>{if(t&&n.scale.set(t,t,t),e){const[s,o,r]=e;s&&n.applyMatrix4(wc(s,0,0)),o&&n.applyMatrix4(wc(0,o,0)),r&&n.applyMatrix4(wc(0,0,r))}return i&&n.position.set(i.x,i.y,i.z),n};function f1(n,t){n.traverse(e=>{var i;if(e.type==="Mesh"){const s=e,o=V({map:s.material.map||{}},t);s.material=new G.MeshBasicMaterial(o),s.renderOrder=1,((i=e.parent)==null?void 0:i.type)==="Mesh"&&(e.renderOrder=e.parent.renderOrder+1)}})}/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */var p1={},Ci=void 0,w5=p1;function ju(n,t){var e=n.split("."),i=w5;!(e[0]in i)&&i.execScript&&i.execScript("var "+e[0]);for(var s;e.length&&(s=e.shift());)!e.length&&t!==Ci?i[s]=t:i=i[s]?i[s]:i[s]={}}var vt=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Uint32Array!="undefined"&&typeof DataView!="undefined";function Ss(n){var t=n.length,e=0,i=Number.POSITIVE_INFINITY,s,o,r,a,l,c,h,u,d,p;for(u=0;u<t;++u)n[u]>e&&(e=n[u]),n[u]<i&&(i=n[u]);for(s=1<<e,o=new(vt?Uint32Array:Array)(s),r=1,a=0,l=2;r<=e;){for(u=0;u<t;++u)if(n[u]===r){for(c=0,h=a,d=0;d<r;++d)c=c<<1|h&1,h>>=1;for(p=r<<16|u,d=c;d<s;d+=l)o[d]=p;++a}++r,a<<=1,l<<=1}return[o,e,i]}function bs(n,t){switch(this.g=[],this.h=32768,this.d=this.f=this.a=this.l=0,this.input=vt?new Uint8Array(n):n,this.m=!1,this.i=gl,this.r=!1,(t||!(t={}))&&(t.index&&(this.a=t.index),t.bufferSize&&(this.h=t.bufferSize),t.bufferType&&(this.i=t.bufferType),t.resize&&(this.r=t.resize)),this.i){case Ru:this.b=32768,this.c=new(vt?Uint8Array:Array)(32768+this.h+258);break;case gl:this.b=0,this.c=new(vt?Uint8Array:Array)(this.h),this.e=this.z,this.n=this.v,this.j=this.w;break;default:throw Error("invalid inflate mode")}}var Ru=0,gl=1,qf={t:Ru,s:gl};bs.prototype.k=function(){for(;!this.m;){var n=Oi(this,3);switch(n&1&&(this.m=!0),n>>>=1,n){case 0:var t=this.input,e=this.a,i=this.c,s=this.b,o=t.length,r=Ci,a=Ci,l=i.length,c=Ci;if(this.d=this.f=0,e+1>=o)throw Error("invalid uncompressed block header: LEN");if(r=t[e++]|t[e++]<<8,e+1>=o)throw Error("invalid uncompressed block header: NLEN");if(a=t[e++]|t[e++]<<8,r===~a)throw Error("invalid uncompressed block header: length verify");if(e+r>t.length)throw Error("input buffer is broken");switch(this.i){case Ru:for(;s+r>i.length;){if(c=l-s,r-=c,vt)i.set(t.subarray(e,e+c),s),s+=c,e+=c;else for(;c--;)i[s++]=t[e++];this.b=s,i=this.e(),s=this.b}break;case gl:for(;s+r>i.length;)i=this.e({p:2});break;default:throw Error("invalid inflate mode")}if(vt)i.set(t.subarray(e,e+r),s),s+=r,e+=r;else for(;r--;)i[s++]=t[e++];this.a=e,this.b=s,this.c=i;break;case 1:this.j(P5,C5);break;case 2:for(var h=Oi(this,5)+257,u=Oi(this,5)+1,d=Oi(this,4)+4,p=new(vt?Uint8Array:Array)(Pc.length),m=Ci,g=Ci,v=Ci,y=Ci,w=Ci,C=Ci,E=Ci,L=Ci,D=Ci,L=0;L<d;++L)p[Pc[L]]=Oi(this,3);if(!vt)for(L=d,d=p.length;L<d;++L)p[Pc[L]]=0;for(m=Ss(p),y=new(vt?Uint8Array:Array)(h+u),L=0,D=h+u;L<D;)switch(w=Xr(this,m),w){case 16:for(E=3+Oi(this,2);E--;)y[L++]=C;break;case 17:for(E=3+Oi(this,3);E--;)y[L++]=0;C=0;break;case 18:for(E=11+Oi(this,7);E--;)y[L++]=0;C=0;break;default:C=y[L++]=w}g=Ss(vt?y.subarray(0,h):y.slice(0,h)),v=Ss(vt?y.subarray(h):y.slice(h)),this.j(g,v);break;default:throw Error("unknown BTYPE: "+n)}}return this.n()};var Jf=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Pc=vt?new Uint16Array(Jf):Jf,Kf=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],m1=vt?new Uint16Array(Kf):Kf,$f=[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],vl=vt?new Uint8Array($f):$f,ep=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],g1=vt?new Uint16Array(ep):ep,tp=[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],yl=vt?new Uint8Array(tp):tp,uh=new(vt?Uint8Array:Array)(288),xs,ip;xs=0;for(ip=uh.length;xs<ip;++xs)uh[xs]=143>=xs?8:255>=xs?9:279>=xs?7:8;var P5=Ss(uh),dh=new(vt?Uint8Array:Array)(30),Qa,np;Qa=0;for(np=dh.length;Qa<np;++Qa)dh[Qa]=5;var C5=Ss(dh);function Oi(n,t){for(var e=n.f,i=n.d,s=n.input,o=n.a,r=s.length,a;i<t;){if(o>=r)throw Error("input buffer is broken");e|=s[o++]<<i,i+=8}return a=e&(1<<t)-1,n.f=e>>>t,n.d=i-t,n.a=o,a}function Xr(n,t){for(var e=n.f,i=n.d,s=n.input,o=n.a,r=s.length,a=t[0],l=t[1],c,h;i<l&&!(o>=r);)e|=s[o++]<<i,i+=8;if(c=a[e&(1<<l)-1],h=c>>>16,h>i)throw Error("invalid code length: "+h);return n.f=e>>h,n.d=i-h,n.a=o,c&65535}bs.prototype.j=function(n,t){var e=this.c,i=this.b;this.o=n;for(var s=e.length-258,o,r,a,l;(o=Xr(this,n))!==256;)if(256>o)i>=s&&(this.b=i,e=this.e(),i=this.b),e[i++]=o;else for(r=o-257,l=m1[r],0<vl[r]&&(l+=Oi(this,vl[r])),o=Xr(this,t),a=g1[o],0<yl[o]&&(a+=Oi(this,yl[o])),i>=s&&(this.b=i,e=this.e(),i=this.b);l--;)e[i]=e[i++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=i};bs.prototype.w=function(n,t){var e=this.c,i=this.b;this.o=n;for(var s=e.length,o,r,a,l;(o=Xr(this,n))!==256;)if(256>o)i>=s&&(e=this.e(),s=e.length),e[i++]=o;else for(r=o-257,l=m1[r],0<vl[r]&&(l+=Oi(this,vl[r])),o=Xr(this,t),a=g1[o],0<yl[o]&&(a+=Oi(this,yl[o])),i+l>s&&(e=this.e(),s=e.length);l--;)e[i]=e[i++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=i};bs.prototype.e=function(){var n=new(vt?Uint8Array:Array)(this.b-32768),t=this.b-32768,e,i,s=this.c;if(vt)n.set(s.subarray(32768,n.length));else for(e=0,i=n.length;e<i;++e)n[e]=s[e+32768];if(this.g.push(n),this.l+=n.length,vt)s.set(s.subarray(t,t+32768));else for(e=0;32768>e;++e)s[e]=s[t+e];return this.b=32768,s};bs.prototype.z=function(n){var t,e=this.input.length/this.a+1|0,i,s,o,r=this.input,a=this.c;return n&&(typeof n.p=="number"&&(e=n.p),typeof n.u=="number"&&(e+=n.u)),2>e?(i=(r.length-this.a)/this.o[2],o=258*(i/2)|0,s=o<a.length?a.length+o:a.length<<1):s=a.length*e,vt?(t=new Uint8Array(s),t.set(a)):t=a,this.c=t};bs.prototype.n=function(){var n=0,t=this.c,e=this.g,i,s=new(vt?Uint8Array:Array)(this.l+(this.b-32768)),o,r,a,l;if(e.length===0)return vt?this.c.subarray(32768,this.b):this.c.slice(32768,this.b);for(o=0,r=e.length;o<r;++o)for(i=e[o],a=0,l=i.length;a<l;++a)s[n++]=i[a];for(o=32768,r=this.b;o<r;++o)s[n++]=t[o];return this.g=[],this.buffer=s};bs.prototype.v=function(){var n,t=this.b;return vt?this.r?(n=new Uint8Array(t),n.set(this.c.subarray(0,t))):n=this.c.subarray(0,t):(this.c.length>t&&(this.c.length=t),n=this.c),this.buffer=n};function _u(n,t){var e,i;switch(this.input=n,this.a=0,(t||!(t={}))&&(t.index&&(this.a=t.index),t.verify&&(this.A=t.verify)),e=n[this.a++],i=n[this.a++],e&15){case sp:this.method=sp;break;default:throw Error("unsupported compression method")}if(((e<<8)+i)%31!==0)throw Error("invalid fcheck flag:"+((e<<8)+i)%31);if(i&32)throw Error("fdict flag is not supported");this.q=new bs(n,{index:this.a,bufferSize:t.bufferSize,bufferType:t.bufferType,resize:t.resize})}_u.prototype.k=function(){var n=this.input,t,e;if(t=this.q.k(),this.a=this.q.a,this.A){e=(n[this.a++]<<24|n[this.a++]<<16|n[this.a++]<<8|n[this.a++])>>>0;var i=t;if(typeof i=="string"){var s=i.split(""),o,r;for(o=0,r=s.length;o<r;o++)s[o]=(s[o].charCodeAt(0)&255)>>>0;i=s}for(var a=1,l=0,c=i.length,h,u=0;0<c;){h=1024<c?1024:c,c-=h;do a+=i[u++],l+=a;while(--h);a%=65521,l%=65521}if(e!==(l<<16|a)>>>0)throw Error("invalid adler-32 checksum")}return t};var sp=8;ju("Zlib.Inflate",_u);ju("Zlib.Inflate.prototype.decompress",_u.prototype.k);var fh={ADAPTIVE:qf.s,BLOCK:qf.t},Tr,Dr,To,op;if(Object.keys)Tr=Object.keys(fh);else for(Dr in Tr=[],To=0,fh)Tr[To++]=Dr;To=0;for(op=Tr.length;To<op;++To)Dr=Tr[To],ju("Zlib.Inflate.BufferType."+Dr,fh[Dr]);var rp=p1.Zlib,v1={findSpan:function(n,t,e){var i=e.length-n-1;if(t>=e[i])return i-1;if(t<=e[n])return n;for(var s=n,o=i,r=Math.floor((s+o)/2);t<e[r]||t>=e[r+1];)t<e[r]?o=r:s=r,r=Math.floor((s+o)/2);return r},calcBasisFunctions:function(n,t,e,i){var s=[],o=[],r=[];s[0]=1;for(var a=1;a<=e;++a){o[a]=t-i[n+1-a],r[a]=i[n+a]-t;for(var l=0,c=0;c<a;++c){var h=r[c+1],u=o[a-c],d=s[c]/(h+u);s[c]=l+h*d,l=u*d}s[a]=l}return s},calcBSplinePoint:function(n,t,e,i){for(var s=this.findSpan(n,i,t),o=this.calcBasisFunctions(s,i,n,t),r=new G.Vector4(0,0,0,0),a=0;a<=n;++a){var l=e[s-n+a],c=o[a],h=l.w*c;r.x+=l.x*h,r.y+=l.y*h,r.z+=l.z*h,r.w+=l.w*c}return r},calcBasisFunctionDerivatives:function(n,t,e,i,s){for(var o=[],r=0;r<=e;++r)o[r]=0;for(var a=[],r=0;r<=i;++r)a[r]=o.slice(0);for(var l=[],r=0;r<=e;++r)l[r]=o.slice(0);l[0][0]=1;for(var c=o.slice(0),h=o.slice(0),u=1;u<=e;++u){c[u]=t-s[n+1-u],h[u]=s[n+u]-t;for(var d=0,O=0;O<u;++O){var p=h[O+1],m=c[u-O];l[u][O]=p+m;var g=l[O][u-1]/l[u][O];l[O][u]=d+p*g,d=m*g}l[u][u]=d}for(var u=0;u<=e;++u)a[0][u]=l[u][e];for(var O=0;O<=e;++O){for(var v=0,y=1,w=[],r=0;r<=e;++r)w[r]=o.slice(0);w[0][0]=1;for(var C=1;C<=i;++C){var E=0,D=O-C,L=e-C;O>=C&&(w[y][0]=w[v][0]/l[L+1][D],E=w[y][0]*l[D][L]);for(var R=D>=-1?1:-D,z=O-1<=L?C-1:e-O,u=R;u<=z;++u)w[y][u]=(w[v][u]-w[v][u-1])/l[L+1][D+u],E+=w[y][u]*l[D+u][L];O<=L&&(w[y][C]=-w[v][C-1]/l[L+1][O],E+=w[y][C]*l[O][L]),a[C][O]=E;var u=v;v=y,y=u}}for(var O=e,C=1;C<=i;++C){for(var u=0;u<=e;++u)a[C][u]*=O;O*=e-C}return a},calcBSplineDerivatives:function(n,t,e,i,s){for(var o=s<n?s:n,r=[],a=this.findSpan(n,i,t),l=this.calcBasisFunctionDerivatives(a,i,n,o,t),c=[],h=0;h<e.length;++h){var u=e[h].clone(),d=u.w;u.x*=d,u.y*=d,u.z*=d,c[h]=u}for(var p=0;p<=o;++p){for(var u=c[a-n].clone().multiplyScalar(l[p][0]),m=1;m<=n;++m)u.add(c[a-n+m].clone().multiplyScalar(l[p][m]));r[p]=u}for(var p=o+1;p<=s+1;++p)r[p]=new G.Vector4(0,0,0);return r},calcKoverI:function(n,t){for(var e=1,i=2;i<=n;++i)e*=i;for(var s=1,i=2;i<=t;++i)s*=i;for(var i=2;i<=n-t;++i)s*=i;return e/s},calcRationalCurveDerivatives:function(n){for(var t=n.length,e=[],i=[],s=0;s<t;++s){var o=n[s];e[s]=new G.Vector3(o.x,o.y,o.z),i[s]=o.w}for(var r=[],a=0;a<t;++a){for(var l=e[a].clone(),s=1;s<=a;++s)l.sub(r[a-s].clone().multiplyScalar(this.calcKoverI(a,s)*i[s]));r[a]=l.divideScalar(i[0])}return r},calcNURBSDerivatives:function(n,t,e,i,s){var o=this.calcBSplineDerivatives(n,t,e,i,s);return this.calcRationalCurveDerivatives(o)},calcSurfacePoint:function(n,t,e,i,s,o,r,a){for(var l=this.findSpan(n,o,e),c=this.findSpan(t,r,i),h=this.calcBasisFunctions(l,o,n,e),u=this.calcBasisFunctions(c,r,t,i),d=[],p=0;p<=t;++p){d[p]=new G.Vector4(0,0,0,0);for(var m=0;m<=n;++m){var g=s[l-n+m][c-t+p].clone(),v=g.w;g.x*=v,g.y*=v,g.z*=v,d[p].add(g.multiplyScalar(h[m]))}}for(var y=new G.Vector4(0,0,0,0),p=0;p<=t;++p)y.add(d[p].multiplyScalar(u[p]));y.divideScalar(y.w),a.set(y.x,y.y,y.z)}},Qs=function(n,t,e,i,s){G.Curve.call(this),this.degree=n,this.knots=t,this.controlPoints=[],this.startKnot=i||0,this.endKnot=s||this.knots.length-1;for(var o=0;o<e.length;++o){var r=e[o];this.controlPoints[o]=new G.Vector4(r.x,r.y,r.z,r.w)}};Qs.prototype=Object.create(G.Curve.prototype);Qs.prototype.constructor=Qs;Qs.prototype.getPoint=function(n,t){var e=t||new G.Vector3,i=this.knots[this.startKnot]+n*(this.knots[this.endKnot]-this.knots[this.startKnot]),s=v1.calcBSplinePoint(this.degree,this.knots,this.controlPoints,i);return s.w!=1&&s.divideScalar(s.w),e.set(s.x,s.y,s.z)};Qs.prototype.getTangent=function(n,t){var e=t||new G.Vector3,i=this.knots[0]+n*(this.knots[this.knots.length-1]-this.knots[0]),s=v1.calcNURBSDerivatives(this.degree,this.knots,this.controlPoints,i,1);return e.copy(s[1]).normalize(),e};var y1=function(){var n,t,e;function i(A){G.Loader.call(this,A)}i.prototype=Object.assign(Object.create(G.Loader.prototype),{constructor:i,load:function(A,M,I,k){var x=this,S=x.path===""?G.LoaderUtils.extractUrlBase(A):x.path,j=new G.FileLoader(this.manager);j.setPath(x.path),j.setResponseType("arraybuffer"),j.load(A,function(F){try{M(x.parse(F,S))}catch(J){k?k(J):console.error(J),x.manager.itemError(A)}},I,k)},parse:function(A,M){if(u(A))n=new l().parse(A);else{var I=L(A);if(!d(I))throw new Error("THREE.FBXLoader: Unknown format.");if(p(I)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+p(I));n=new a().parse(I)}var k=new G.TextureLoader(this.manager).setPath(this.resourcePath||M).setCrossOrigin(this.crossOrigin);return new s(k,this.manager).parse(n)}});function s(A,M){this.textureLoader=A,this.manager=M}s.prototype={constructor:s,parse:function(){t=this.parseConnections();var A=this.parseImages(),M=this.parseTextures(A),I=this.parseMaterials(M),k=this.parseDeformers(),x=new o().parse(k);return this.parseScene(k,x,I),e},parseConnections:function(){var A=new Map;if("Connections"in n){var M=n.Connections.connections;M.forEach(function(I){var k=I[0],x=I[1],S=I[2];A.has(k)||A.set(k,{parents:[],children:[]});var j={ID:x,relationship:S};A.get(k).parents.push(j),A.has(x)||A.set(x,{parents:[],children:[]});var F={ID:k,relationship:S};A.get(x).children.push(F)})}return A},parseImages:function(){var A={},M={};if("Video"in n.Objects){var I=n.Objects.Video;for(var k in I){var x=I[k],S=parseInt(k);if(A[S]=x.RelativeFilename||x.Filename,"Content"in x){var j=x.Content instanceof ArrayBuffer&&x.Content.byteLength>0,F=typeof x.Content=="string"&&x.Content!=="";if(j||F){var J=this.parseImage(I[k]);M[x.RelativeFilename||x.Filename]=J}}}}for(var S in A){var ne=A[S];M[ne]!==void 0?A[S]=M[ne]:A[S]=A[S].split("\\").pop()}return A},parseImage:function(A){var M=A.Content,I=A.RelativeFilename||A.Filename,k=I.slice(I.lastIndexOf(".")+1).toLowerCase(),x;switch(k){case"bmp":x="image/bmp";break;case"jpg":case"jpeg":x="image/jpeg";break;case"png":x="image/png";break;case"tif":x="image/tiff";break;case"tga":this.manager.getHandler(".tga")===null&&console.warn("FBXLoader: TGA loader not found, skipping ",I),x="image/tga";break;default:console.warn('FBXLoader: Image type "'+k+'" is not supported.');return}if(typeof M=="string")return"data:"+x+";base64,"+M;var S=new Uint8Array(M);return window.URL.createObjectURL(new Blob([S],{type:x}))},parseTextures:function(A){var M=new Map;if("Texture"in n.Objects){var I=n.Objects.Texture;for(var k in I){var x=this.parseTexture(I[k],A);M.set(parseInt(k),x)}}return M},parseTexture:function(A,M){var I=this.loadTexture(A,M);I.ID=A.id,I.name=A.attrName;var k=A.WrapModeU,x=A.WrapModeV,S=k!==void 0?k.value:0,j=x!==void 0?x.value:0;if(I.wrapS=S===0?G.RepeatWrapping:G.ClampToEdgeWrapping,I.wrapT=j===0?G.RepeatWrapping:G.ClampToEdgeWrapping,"Scaling"in A){var F=A.Scaling.value;I.repeat.x=F[0],I.repeat.y=F[1]}return I},loadTexture:function(A,M){var I,k=this.textureLoader.path,x=t.get(A.id).children;x!==void 0&&x.length>0&&M[x[0].ID]!==void 0&&(I=M[x[0].ID],(I.indexOf("blob:")===0||I.indexOf("data:")===0)&&this.textureLoader.setPath(void 0));var S,j=A.FileName.slice(-3).toLowerCase();if(j==="tga"){var F=this.manager.getHandler(".tga");F===null?(console.warn("FBXLoader: TGA loader not found, creating placeholder texture for",A.RelativeFilename),S=new G.Texture):S=F.load(I)}else j==="psd"?(console.warn("FBXLoader: PSD textures are not supported, creating placeholder texture for",A.RelativeFilename),S=new G.Texture):S=this.textureLoader.load(I);return this.textureLoader.setPath(k),S},parseMaterials:function(A){var M=new Map;if("Material"in n.Objects){var I=n.Objects.Material;for(var k in I){var x=this.parseMaterial(I[k],A);x!==null&&M.set(parseInt(k),x)}}return M},parseMaterial:function(A,M){var I=A.id,k=A.attrName,x=A.ShadingModel;if(typeof x=="object"&&(x=x.value),!t.has(I))return null;var S=this.parseParameters(A,M,I),j;switch(x.toLowerCase()){case"phong":j=new G.MeshPhongMaterial;break;case"lambert":j=new G.MeshLambertMaterial;break;default:console.warn('THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.',x),j=new G.MeshPhongMaterial;break}return j.setValues(S),j.name=k,j},parseParameters:function(A,M,I){var k={};A.BumpFactor&&(k.bumpScale=A.BumpFactor.value),A.Diffuse?k.color=new G.Color().fromArray(A.Diffuse.value):A.DiffuseColor&&A.DiffuseColor.type==="Color"&&(k.color=new G.Color().fromArray(A.DiffuseColor.value)),A.DisplacementFactor&&(k.displacementScale=A.DisplacementFactor.value),A.Emissive?k.emissive=new G.Color().fromArray(A.Emissive.value):A.EmissiveColor&&A.EmissiveColor.type==="Color"&&(k.emissive=new G.Color().fromArray(A.EmissiveColor.value)),A.EmissiveFactor&&(k.emissiveIntensity=parseFloat(A.EmissiveFactor.value)),A.Opacity&&(k.opacity=parseFloat(A.Opacity.value)),k.opacity<1&&(k.transparent=!0),A.ReflectionFactor&&(k.reflectivity=A.ReflectionFactor.value),A.Shininess&&(k.shininess=A.Shininess.value),A.Specular?k.specular=new G.Color().fromArray(A.Specular.value):A.SpecularColor&&A.SpecularColor.type==="Color"&&(k.specular=new G.Color().fromArray(A.SpecularColor.value));var x=this;return t.get(I).children.forEach(function(S){var j=S.relationship;switch(j){case"Bump":k.bumpMap=x.getTexture(M,S.ID);break;case"Maya|TEX_ao_map":k.aoMap=x.getTexture(M,S.ID);break;case"DiffuseColor":case"Maya|TEX_color_map":k.map=x.getTexture(M,S.ID),k.map.encoding=G.sRGBEncoding;break;case"DisplacementColor":k.displacementMap=x.getTexture(M,S.ID);break;case"EmissiveColor":k.emissiveMap=x.getTexture(M,S.ID),k.emissiveMap.encoding=G.sRGBEncoding;break;case"NormalMap":case"Maya|TEX_normal_map":k.normalMap=x.getTexture(M,S.ID);break;case"ReflectionColor":k.envMap=x.getTexture(M,S.ID),k.envMap.mapping=G.EquirectangularReflectionMapping,k.envMap.encoding=G.sRGBEncoding;break;case"SpecularColor":k.specularMap=x.getTexture(M,S.ID),k.specularMap.encoding=G.sRGBEncoding;break;case"TransparentColor":case"TransparencyFactor":k.alphaMap=x.getTexture(M,S.ID),k.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",j);break}}),k},getTexture:function(A,M){return"LayeredTexture"in n.Objects&&M in n.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),M=t.get(M).children[0].ID),A.get(M)},parseDeformers:function(){var A={},M={};if("Deformer"in n.Objects){var I=n.Objects.Deformer;for(var k in I){var x=I[k],S=t.get(parseInt(k));if(x.attrType==="Skin"){var j=this.parseSkeleton(S,I);j.ID=k,S.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),j.geometryID=S.parents[0].ID,A[k]=j}else if(x.attrType==="BlendShape"){var F={id:k};F.rawTargets=this.parseMorphTargets(S,I),F.id=k,S.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),M[k]=F}}}return{skeletons:A,morphTargets:M}},parseSkeleton:function(A,M){var I=[];return A.children.forEach(function(k){var x=M[k.ID];if(x.attrType==="Cluster"){var S={ID:k.ID,indices:[],weights:[],transformLink:new G.Matrix4().fromArray(x.TransformLink.a)};"Indexes"in x&&(S.indices=x.Indexes.a,S.weights=x.Weights.a),I.push(S)}}),{rawBones:I,bones:[]}},parseMorphTargets:function(A,M){for(var I=[],k=0;k<A.children.length;k++){var x=A.children[k],S=M[x.ID],j={name:S.attrName,initialWeight:S.DeformPercent,id:S.id,fullWeights:S.FullWeights.a};if(S.attrType!=="BlendShapeChannel")return;j.geoID=t.get(parseInt(x.ID)).children.filter(function(F){return F.relationship===void 0})[0].ID,I.push(j)}return I},parseScene:function(A,M,I){e=new G.Group;var k=this.parseModels(A.skeletons,M,I),x=n.Objects.Model,S=this;k.forEach(function(F){var J=x[F.ID];S.setLookAtProperties(F,J);var ne=t.get(F.ID).parents;ne.forEach(function(q){var oe=k.get(q.ID);oe!==void 0&&oe.add(F)}),F.parent===null&&e.add(F)}),this.bindSkeleton(A.skeletons,M,k),this.createAmbientLight(),this.setupMorphMaterials(),e.traverse(function(F){if(F.userData.transformData){F.parent&&(F.userData.transformData.parentMatrixWorld=F.parent.matrix);var J=C(F.userData.transformData);F.applyMatrix4(J)}});var j=new r().parse();e.children.length===1&&e.children[0].isGroup&&(e.children[0].animations=j,e=e.children[0]),e.animations=j},parseModels:function(A,M,I){var k=new Map,x=n.Objects.Model;for(var S in x){var j=parseInt(S),F=x[S],J=t.get(j),ne=this.buildSkeleton(J,A,j,F.attrName);if(!ne){switch(F.attrType){case"Camera":ne=this.createCamera(J);break;case"Light":ne=this.createLight(J);break;case"Mesh":ne=this.createMesh(J,M,I);break;case"NurbsCurve":ne=this.createCurve(J,M);break;case"LimbNode":case"Root":ne=new G.Bone;break;case"Null":default:ne=new G.Group;break}ne.name=F.attrName?G.PropertyBinding.sanitizeNodeName(F.attrName):"",ne.ID=j}this.getTransformData(ne,F),k.set(j,ne)}return k},buildSkeleton:function(A,M,I,k){var x=null;return A.parents.forEach(function(S){for(var j in M){var F=M[j];F.rawBones.forEach(function(J,ne){if(J.ID===S.ID){var q=x;x=new G.Bone,x.matrixWorld.copy(J.transformLink),x.name=k?G.PropertyBinding.sanitizeNodeName(k):"",x.ID=I,F.bones[ne]=x,q!==null&&x.add(q)}})}}),x},createCamera:function(A){var M,I;if(A.children.forEach(function(oe){var se=n.Objects.NodeAttribute[oe.ID];se!==void 0&&(I=se)}),I===void 0)M=new G.Object3D;else{var k=0;I.CameraProjectionType!==void 0&&I.CameraProjectionType.value===1&&(k=1);var x=1;I.NearPlane!==void 0&&(x=I.NearPlane.value/1e3);var S=1e3;I.FarPlane!==void 0&&(S=I.FarPlane.value/1e3);var j=window.innerWidth,F=window.innerHeight;I.AspectWidth!==void 0&&I.AspectHeight!==void 0&&(j=I.AspectWidth.value,F=I.AspectHeight.value);var J=j/F,ne=45;I.FieldOfView!==void 0&&(ne=I.FieldOfView.value);var q=I.FocalLength?I.FocalLength.value:null;switch(k){case 0:M=new G.PerspectiveCamera(ne,J,x,S),q!==null&&M.setFocalLength(q);break;case 1:M=new G.OrthographicCamera(-j/2,j/2,F/2,-F/2,x,S);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+k+"."),M=new G.Object3D;break}}return M},createLight:function(A){var M,I;if(A.children.forEach(function(q){var oe=n.Objects.NodeAttribute[q.ID];oe!==void 0&&(I=oe)}),I===void 0)M=new G.Object3D;else{var k;I.LightType===void 0?k=0:k=I.LightType.value;var x=16777215;I.Color!==void 0&&(x=new G.Color().fromArray(I.Color.value));var S=I.Intensity===void 0?1:I.Intensity.value/100;I.CastLightOnObject!==void 0&&I.CastLightOnObject.value===0&&(S=0);var j=0;I.FarAttenuationEnd!==void 0&&(I.EnableFarAttenuation!==void 0&&I.EnableFarAttenuation.value===0?j=0:j=I.FarAttenuationEnd.value);var F=1;switch(k){case 0:M=new G.PointLight(x,S,j,F);break;case 1:M=new G.DirectionalLight(x,S);break;case 2:var J=Math.PI/3;I.InnerAngle!==void 0&&(J=G.MathUtils.degToRad(I.InnerAngle.value));var ne=0;I.OuterAngle!==void 0&&(ne=G.MathUtils.degToRad(I.OuterAngle.value),ne=Math.max(ne,1)),M=new G.SpotLight(x,S,j,J,ne,F);break;default:console.warn("THREE.FBXLoader: Unknown light type "+I.LightType.value+", defaulting to a PointLight."),M=new G.PointLight(x,S);break}I.CastShadows!==void 0&&I.CastShadows.value===1&&(M.castShadow=!0)}return M},createMesh:function(A,M,I){var k,x=null,S=null,j=[];return A.children.forEach(function(F){M.has(F.ID)&&(x=M.get(F.ID)),I.has(F.ID)&&j.push(I.get(F.ID))}),j.length>1?S=j:j.length>0?S=j[0]:(S=new G.MeshPhongMaterial({color:13421772}),j.push(S)),"color"in x.attributes&&j.forEach(function(F){F.vertexColors=!0}),x.FBX_Deformer?(j.forEach(function(F){F.skinning=!0}),k=new G.SkinnedMesh(x,S),k.normalizeSkinWeights()):k=new G.Mesh(x,S),k},createCurve:function(A,M){var I=A.children.reduce(function(x,S){return M.has(S.ID)&&(x=M.get(S.ID)),x},null),k=new G.LineBasicMaterial({color:3342591,linewidth:1});return new G.Line(I,k)},getTransformData:function(A,M){var I={};"InheritType"in M&&(I.inheritType=parseInt(M.InheritType.value)),"RotationOrder"in M?I.eulerOrder=E(M.RotationOrder.value):I.eulerOrder="ZYX","Lcl_Translation"in M&&(I.translation=M.Lcl_Translation.value),"PreRotation"in M&&(I.preRotation=M.PreRotation.value),"Lcl_Rotation"in M&&(I.rotation=M.Lcl_Rotation.value),"PostRotation"in M&&(I.postRotation=M.PostRotation.value),"Lcl_Scaling"in M&&(I.scale=M.Lcl_Scaling.value),"ScalingOffset"in M&&(I.scalingOffset=M.ScalingOffset.value),"ScalingPivot"in M&&(I.scalingPivot=M.ScalingPivot.value),"RotationOffset"in M&&(I.rotationOffset=M.RotationOffset.value),"RotationPivot"in M&&(I.rotationPivot=M.RotationPivot.value),A.userData.transformData=I},setLookAtProperties:function(A,M){if("LookAtProperty"in M){var I=t.get(A.ID).children;I.forEach(function(k){if(k.relationship==="LookAtProperty"){var x=n.Objects.Model[k.ID];if("Lcl_Translation"in x){var S=x.Lcl_Translation.value;A.target!==void 0?(A.target.position.fromArray(S),e.add(A.target)):A.lookAt(new G.Vector3().fromArray(S))}}})}},bindSkeleton:function(A,M,I){var k=this.parsePoseNodes();for(var x in A){var S=A[x],j=t.get(parseInt(S.ID)).parents;j.forEach(function(F){if(M.has(F.ID)){var J=F.ID,ne=t.get(J);ne.parents.forEach(function(q){if(I.has(q.ID)){var oe=I.get(q.ID);oe.bind(new G.Skeleton(S.bones),k[q.ID])}})}})}},parsePoseNodes:function(){var A={};if("Pose"in n.Objects){var M=n.Objects.Pose;for(var I in M)if(M[I].attrType==="BindPose"){var k=M[I].PoseNode;Array.isArray(k)?k.forEach(function(x){A[x.Node]=new G.Matrix4().fromArray(x.Matrix.a)}):A[k.Node]=new G.Matrix4().fromArray(k.Matrix.a)}}return A},createAmbientLight:function(){if("GlobalSettings"in n&&"AmbientColor"in n.GlobalSettings){var A=n.GlobalSettings.AmbientColor.value,M=A[0],I=A[1],k=A[2];if(M!==0||I!==0||k!==0){var x=new G.Color(M,I,k);e.add(new G.AmbientLight(x,1))}}},setupMorphMaterials:function(){var A=this;e.traverse(function(M){M.isMesh&&M.geometry.morphAttributes.position&&M.geometry.morphAttributes.position.length&&(Array.isArray(M.material)?M.material.forEach(function(I,k){A.setupMorphMaterial(M,I,k)}):A.setupMorphMaterial(M,M.material))})},setupMorphMaterial:function(A,M,I){var k=A.uuid,x=M.uuid,S=!1;if(e.traverse(function(F){F.isMesh&&(Array.isArray(F.material)?F.material.forEach(function(J){J.uuid===x&&F.uuid!==k&&(S=!0)}):F.material.uuid===x&&F.uuid!==k&&(S=!0))}),S===!0){var j=M.clone();j.morphTargets=!0,I===void 0?A.material=j:A.material[I]=j}else M.morphTargets=!0}};function o(){}o.prototype={constructor:o,parse:function(A){var M=new Map;if("Geometry"in n.Objects){var I=n.Objects.Geometry;for(var k in I){var x=t.get(parseInt(k)),S=this.parseGeometry(x,I[k],A);M.set(parseInt(k),S)}}return M},parseGeometry:function(A,M,I){switch(M.attrType){case"Mesh":return this.parseMeshGeometry(A,M,I);case"NurbsCurve":return this.parseNurbsGeometry(M)}},parseMeshGeometry:function(A,M,I){var k=I.skeletons,x=[],S=A.parents.map(function(q){return n.Objects.Model[q.ID]});if(S.length!==0){var j=A.children.reduce(function(q,oe){return k[oe.ID]!==void 0&&(q=k[oe.ID]),q},null);A.children.forEach(function(q){I.morphTargets[q.ID]!==void 0&&x.push(I.morphTargets[q.ID])});var F=S[0],J={};"RotationOrder"in F&&(J.eulerOrder=E(F.RotationOrder.value)),"InheritType"in F&&(J.inheritType=parseInt(F.InheritType.value)),"GeometricTranslation"in F&&(J.translation=F.GeometricTranslation.value),"GeometricRotation"in F&&(J.rotation=F.GeometricRotation.value),"GeometricScaling"in F&&(J.scale=F.GeometricScaling.value);var ne=C(J);return this.genGeometry(M,j,x,ne)}},genGeometry:function(A,M,I,k){var x=new G.BufferGeometry;A.attrName&&(x.name=A.attrName);var S=this.parseGeoNode(A,M),j=this.genBuffers(S),F=new G.Float32BufferAttribute(j.vertex,3);if(F.applyMatrix4(k),x.setAttribute("position",F),j.colors.length>0&&x.setAttribute("color",new G.Float32BufferAttribute(j.colors,3)),M&&(x.setAttribute("skinIndex",new G.Uint16BufferAttribute(j.weightsIndices,4)),x.setAttribute("skinWeight",new G.Float32BufferAttribute(j.vertexWeights,4)),x.FBX_Deformer=M),j.normal.length>0){var J=new G.Matrix3().getNormalMatrix(k),ne=new G.Float32BufferAttribute(j.normal,3);ne.applyNormalMatrix(J),x.setAttribute("normal",ne)}if(j.uvs.forEach(function(ze,ee){var we="uv"+(ee+1).toString();ee===0&&(we="uv"),x.setAttribute(we,new G.Float32BufferAttribute(j.uvs[ee],2))}),S.material&&S.material.mappingType!=="AllSame"){var q=j.materialIndex[0],oe=0;if(j.materialIndex.forEach(function(ze,ee){ze!==q&&(x.addGroup(oe,ee-oe,q),q=ze,oe=ee)}),x.groups.length>0){var se=x.groups[x.groups.length-1],ae=se.start+se.count;ae!==j.materialIndex.length&&x.addGroup(ae,j.materialIndex.length-ae,q)}x.groups.length===0&&x.addGroup(0,j.materialIndex.length,j.materialIndex[0])}return this.addMorphTargets(x,A,I,k),x},parseGeoNode:function(A,M){var I={};if(I.vertexPositions=A.Vertices!==void 0?A.Vertices.a:[],I.vertexIndices=A.PolygonVertexIndex!==void 0?A.PolygonVertexIndex.a:[],A.LayerElementColor&&(I.color=this.parseVertexColors(A.LayerElementColor[0])),A.LayerElementMaterial&&(I.material=this.parseMaterialIndices(A.LayerElementMaterial[0])),A.LayerElementNormal&&(I.normal=this.parseNormals(A.LayerElementNormal[0])),A.LayerElementUV){I.uv=[];for(var k=0;A.LayerElementUV[k];)I.uv.push(this.parseUVs(A.LayerElementUV[k])),k++}return I.weightTable={},M!==null&&(I.skeleton=M,M.rawBones.forEach(function(x,S){x.indices.forEach(function(j,F){I.weightTable[j]===void 0&&(I.weightTable[j]=[]),I.weightTable[j].push({id:S,weight:x.weights[F]})})})),I},genBuffers:function(A){var M={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},I=0,k=0,x=!1,S=[],j=[],F=[],J=[],ne=[],q=[],oe=this;return A.vertexIndices.forEach(function(se,ae){var ze=!1;se<0&&(se=se^-1,ze=!0);var ee=[],we=[];if(S.push(se*3,se*3+1,se*3+2),A.color){var le=v(ae,I,se,A.color);F.push(le[0],le[1],le[2])}if(A.skeleton){if(A.weightTable[se]!==void 0&&A.weightTable[se].forEach(function(Re){we.push(Re.weight),ee.push(Re.id)}),we.length>4){x||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),x=!0);var he=[0,0,0,0],be=[0,0,0,0];we.forEach(function(Re,ye){var De=Re,ve=ee[ye];be.forEach(function(Ae,Oe,Xe){if(De>Ae){Xe[Oe]=De,De=Ae;var Ze=he[Oe];he[Oe]=ve,ve=Ze}})}),ee=he,we=be}for(;we.length<4;)we.push(0),ee.push(0);for(var te=0;te<4;++te)ne.push(we[te]),q.push(ee[te])}if(A.normal){var le=v(ae,I,se,A.normal);j.push(le[0],le[1],le[2])}if(A.material&&A.material.mappingType!=="AllSame")var ke=v(ae,I,se,A.material)[0];A.uv&&A.uv.forEach(function(Re,ye){var De=v(ae,I,se,Re);J[ye]===void 0&&(J[ye]=[]),J[ye].push(De[0]),J[ye].push(De[1])}),k++,ze&&(oe.genFace(M,A,S,ke,j,F,J,ne,q,k),I++,k=0,S=[],j=[],F=[],J=[],ne=[],q=[])}),M},genFace:function(A,M,I,k,x,S,j,F,J,ne){for(var q=2;q<ne;q++)A.vertex.push(M.vertexPositions[I[0]]),A.vertex.push(M.vertexPositions[I[1]]),A.vertex.push(M.vertexPositions[I[2]]),A.vertex.push(M.vertexPositions[I[(q-1)*3]]),A.vertex.push(M.vertexPositions[I[(q-1)*3+1]]),A.vertex.push(M.vertexPositions[I[(q-1)*3+2]]),A.vertex.push(M.vertexPositions[I[q*3]]),A.vertex.push(M.vertexPositions[I[q*3+1]]),A.vertex.push(M.vertexPositions[I[q*3+2]]),M.skeleton&&(A.vertexWeights.push(F[0]),A.vertexWeights.push(F[1]),A.vertexWeights.push(F[2]),A.vertexWeights.push(F[3]),A.vertexWeights.push(F[(q-1)*4]),A.vertexWeights.push(F[(q-1)*4+1]),A.vertexWeights.push(F[(q-1)*4+2]),A.vertexWeights.push(F[(q-1)*4+3]),A.vertexWeights.push(F[q*4]),A.vertexWeights.push(F[q*4+1]),A.vertexWeights.push(F[q*4+2]),A.vertexWeights.push(F[q*4+3]),A.weightsIndices.push(J[0]),A.weightsIndices.push(J[1]),A.weightsIndices.push(J[2]),A.weightsIndices.push(J[3]),A.weightsIndices.push(J[(q-1)*4]),A.weightsIndices.push(J[(q-1)*4+1]),A.weightsIndices.push(J[(q-1)*4+2]),A.weightsIndices.push(J[(q-1)*4+3]),A.weightsIndices.push(J[q*4]),A.weightsIndices.push(J[q*4+1]),A.weightsIndices.push(J[q*4+2]),A.weightsIndices.push(J[q*4+3])),M.color&&(A.colors.push(S[0]),A.colors.push(S[1]),A.colors.push(S[2]),A.colors.push(S[(q-1)*3]),A.colors.push(S[(q-1)*3+1]),A.colors.push(S[(q-1)*3+2]),A.colors.push(S[q*3]),A.colors.push(S[q*3+1]),A.colors.push(S[q*3+2])),M.material&&M.material.mappingType!=="AllSame"&&(A.materialIndex.push(k),A.materialIndex.push(k),A.materialIndex.push(k)),M.normal&&(A.normal.push(x[0]),A.normal.push(x[1]),A.normal.push(x[2]),A.normal.push(x[(q-1)*3]),A.normal.push(x[(q-1)*3+1]),A.normal.push(x[(q-1)*3+2]),A.normal.push(x[q*3]),A.normal.push(x[q*3+1]),A.normal.push(x[q*3+2])),M.uv&&M.uv.forEach(function(oe,se){A.uvs[se]===void 0&&(A.uvs[se]=[]),A.uvs[se].push(j[se][0]),A.uvs[se].push(j[se][1]),A.uvs[se].push(j[se][(q-1)*2]),A.uvs[se].push(j[se][(q-1)*2+1]),A.uvs[se].push(j[se][q*2]),A.uvs[se].push(j[se][q*2+1])})},addMorphTargets:function(A,M,I,k){if(I.length!==0){A.morphTargetsRelative=!0,A.morphAttributes.position=[];var x=this;I.forEach(function(S){S.rawTargets.forEach(function(j){var F=n.Objects.Geometry[j.geoID];F!==void 0&&x.genMorphGeometry(A,M,F,k,j.name)})})}},genMorphGeometry:function(A,M,I,k,x){for(var S=M.PolygonVertexIndex!==void 0?M.PolygonVertexIndex.a:[],j=I.Vertices!==void 0?I.Vertices.a:[],F=I.Indexes!==void 0?I.Indexes.a:[],J=A.attributes.position.count*3,ne=new Float32Array(J),q=0;q<F.length;q++){var oe=F[q]*3;ne[oe]=j[q*3],ne[oe+1]=j[q*3+1],ne[oe+2]=j[q*3+2]}var se={vertexIndices:S,vertexPositions:ne},ae=this.genBuffers(se),ze=new G.Float32BufferAttribute(ae.vertex,3);ze.name=x||I.attrName,ze.applyMatrix4(k),A.morphAttributes.position.push(ze)},parseNormals:function(A){var M=A.MappingInformationType,I=A.ReferenceInformationType,k=A.Normals.a,x=[];return I==="IndexToDirect"&&("NormalIndex"in A?x=A.NormalIndex.a:"NormalsIndex"in A&&(x=A.NormalsIndex.a)),{dataSize:3,buffer:k,indices:x,mappingType:M,referenceType:I}},parseUVs:function(A){var M=A.MappingInformationType,I=A.ReferenceInformationType,k=A.UV.a,x=[];return I==="IndexToDirect"&&(x=A.UVIndex.a),{dataSize:2,buffer:k,indices:x,mappingType:M,referenceType:I}},parseVertexColors:function(A){var M=A.MappingInformationType,I=A.ReferenceInformationType,k=A.Colors.a,x=[];return I==="IndexToDirect"&&(x=A.ColorIndex.a),{dataSize:4,buffer:k,indices:x,mappingType:M,referenceType:I}},parseMaterialIndices:function(A){var M=A.MappingInformationType,I=A.ReferenceInformationType;if(M==="NoMappingInformation")return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:I};for(var k=A.Materials.a,x=[],S=0;S<k.length;++S)x.push(S);return{dataSize:1,buffer:k,indices:x,mappingType:M,referenceType:I}},parseNurbsGeometry:function(A){if(Qs===void 0)return console.error("THREE.FBXLoader: The loader relies on NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."),new G.BufferGeometry;var M=parseInt(A.Order);if(isNaN(M))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",A.Order,A.id),new G.BufferGeometry;for(var I=M-1,k=A.KnotVector.a,x=[],S=A.Points.a,j=0,F=S.length;j<F;j+=4)x.push(new G.Vector4().fromArray(S,j));var J,ne;if(A.Form==="Closed")x.push(x[0]);else if(A.Form==="Periodic"){J=I,ne=k.length-1-J;for(var j=0;j<I;++j)x.push(x[j])}var q=new Qs(I,k,x,J,ne),oe=q.getPoints(x.length*7),se=new Float32Array(oe.length*3);oe.forEach(function(ze,ee){ze.toArray(se,ee*3)});var ae=new G.BufferGeometry;return ae.setAttribute("position",new G.BufferAttribute(se,3)),ae}};function r(){}r.prototype={constructor:r,parse:function(){var A=[],M=this.parseClips();if(M!==void 0)for(var I in M){var k=M[I],x=this.addClip(k);A.push(x)}return A},parseClips:function(){if(n.Objects.AnimationCurve!==void 0){var A=this.parseAnimationCurveNodes();this.parseAnimationCurves(A);var M=this.parseAnimationLayers(A),I=this.parseAnimStacks(M);return I}},parseAnimationCurveNodes:function(){var A=n.Objects.AnimationCurveNode,M=new Map;for(var I in A){var k=A[I];if(k.attrName.match(/S|R|T|DeformPercent/)!==null){var x={id:k.id,attr:k.attrName,curves:{}};M.set(x.id,x)}}return M},parseAnimationCurves:function(A){var M=n.Objects.AnimationCurve;for(var I in M){var k={id:M[I].id,times:M[I].KeyTime.a.map(m),values:M[I].KeyValueFloat.a},x=t.get(k.id);if(x!==void 0){var S=x.parents[0].ID,j=x.parents[0].relationship;j.match(/X/)?A.get(S).curves.x=k:j.match(/Y/)?A.get(S).curves.y=k:j.match(/Z/)?A.get(S).curves.z=k:j.match(/d|DeformPercent/)&&A.has(S)&&(A.get(S).curves.morph=k)}}},parseAnimationLayers:function(A){var M=n.Objects.AnimationLayer,I=new Map;for(var k in M){var x=[],S=t.get(parseInt(k));if(S!==void 0){var j=S.children;j.forEach(function(F,J){if(A.has(F.ID)){var ne=A.get(F.ID);if(ne.curves.x!==void 0||ne.curves.y!==void 0||ne.curves.z!==void 0){if(x[J]===void 0){var q=t.get(F.ID).parents.filter(function(we){return we.relationship!==void 0})[0].ID;if(q!==void 0){var oe=n.Objects.Model[q.toString()];if(oe===void 0){console.warn("THREE.FBXLoader: Encountered a unused curve.",F);return}var se={modelName:oe.attrName?G.PropertyBinding.sanitizeNodeName(oe.attrName):"",ID:oe.id,initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};e.traverse(function(we){we.ID===oe.id&&(se.transform=we.matrix,we.userData.transformData&&(se.eulerOrder=we.userData.transformData.eulerOrder))}),se.transform||(se.transform=new G.Matrix4),"PreRotation"in oe&&(se.preRotation=oe.PreRotation.value),"PostRotation"in oe&&(se.postRotation=oe.PostRotation.value),x[J]=se}}x[J]&&(x[J][ne.attr]=ne)}else if(ne.curves.morph!==void 0){if(x[J]===void 0){var ae=t.get(F.ID).parents.filter(function(be){return be.relationship!==void 0})[0].ID,ze=t.get(ae).parents[0].ID,ee=t.get(ze).parents[0].ID,q=t.get(ee).parents[0].ID,oe=n.Objects.Model[q],se={modelName:oe.attrName?G.PropertyBinding.sanitizeNodeName(oe.attrName):"",morphName:n.Objects.Deformer[ae].attrName};x[J]=se}x[J][ne.attr]=ne}}}),I.set(parseInt(k),x)}}return I},parseAnimStacks:function(A){var M=n.Objects.AnimationStack,I={};for(var k in M){var x=t.get(parseInt(k)).children;x.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var S=A.get(x[0].ID);I[k]={name:M[k].attrName,layer:S}}return I},addClip:function(A){var M=[],I=this;return A.layer.forEach(function(k){M=M.concat(I.generateTracks(k))}),new G.AnimationClip(A.name,-1,M)},generateTracks:function(A){var M=[],I=new G.Vector3,k=new G.Quaternion,x=new G.Vector3;if(A.transform&&A.transform.decompose(I,k,x),I=I.toArray(),k=new G.Euler().setFromQuaternion(k,A.eulerOrder).toArray(),x=x.toArray(),A.T!==void 0&&Object.keys(A.T.curves).length>0){var S=this.generateVectorTrack(A.modelName,A.T.curves,I,"position");S!==void 0&&M.push(S)}if(A.R!==void 0&&Object.keys(A.R.curves).length>0){var j=this.generateRotationTrack(A.modelName,A.R.curves,k,A.preRotation,A.postRotation,A.eulerOrder);j!==void 0&&M.push(j)}if(A.S!==void 0&&Object.keys(A.S.curves).length>0){var F=this.generateVectorTrack(A.modelName,A.S.curves,x,"scale");F!==void 0&&M.push(F)}if(A.DeformPercent!==void 0){var J=this.generateMorphTrack(A);J!==void 0&&M.push(J)}return M},generateVectorTrack:function(A,M,I,k){var x=this.getTimesForAllAxes(M),S=this.getKeyframeTrackValues(x,M,I);return new G.VectorKeyframeTrack(A+"."+k,x,S)},generateRotationTrack:function(A,M,I,k,x,S){M.x!==void 0&&(this.interpolateRotations(M.x),M.x.values=M.x.values.map(G.MathUtils.degToRad)),M.y!==void 0&&(this.interpolateRotations(M.y),M.y.values=M.y.values.map(G.MathUtils.degToRad)),M.z!==void 0&&(this.interpolateRotations(M.z),M.z.values=M.z.values.map(G.MathUtils.degToRad));var j=this.getTimesForAllAxes(M),F=this.getKeyframeTrackValues(j,M,I);k!==void 0&&(k=k.map(G.MathUtils.degToRad),k.push(S),k=new G.Euler().fromArray(k),k=new G.Quaternion().setFromEuler(k)),x!==void 0&&(x=x.map(G.MathUtils.degToRad),x.push(S),x=new G.Euler().fromArray(x),x=new G.Quaternion().setFromEuler(x).inverse());for(var J=new G.Quaternion,ne=new G.Euler,q=[],oe=0;oe<F.length;oe+=3)ne.set(F[oe],F[oe+1],F[oe+2],S),J.setFromEuler(ne),k!==void 0&&J.premultiply(k),x!==void 0&&J.multiply(x),J.toArray(q,oe/3*4);return new G.QuaternionKeyframeTrack(A+".quaternion",j,q)},generateMorphTrack:function(A){var M=A.DeformPercent.curves.morph,I=M.values.map(function(x){return x/100}),k=e.getObjectByName(A.modelName).morphTargetDictionary[A.morphName];return new G.NumberKeyframeTrack(A.modelName+".morphTargetInfluences["+k+"]",M.times,I)},getTimesForAllAxes:function(A){var M=[];return A.x!==void 0&&(M=M.concat(A.x.times)),A.y!==void 0&&(M=M.concat(A.y.times)),A.z!==void 0&&(M=M.concat(A.z.times)),M=M.sort(function(I,k){return I-k}).filter(function(I,k,x){return x.indexOf(I)==k}),M},getKeyframeTrackValues:function(A,M,I){var k=I,x=[],S=-1,j=-1,F=-1;return A.forEach(function(J){if(M.x&&(S=M.x.times.indexOf(J)),M.y&&(j=M.y.times.indexOf(J)),M.z&&(F=M.z.times.indexOf(J)),S!==-1){var ne=M.x.values[S];x.push(ne),k[0]=ne}else x.push(k[0]);if(j!==-1){var q=M.y.values[j];x.push(q),k[1]=q}else x.push(k[1]);if(F!==-1){var oe=M.z.values[F];x.push(oe),k[2]=oe}else x.push(k[2])}),x},interpolateRotations:function(A){for(var M=1;M<A.values.length;M++){var I=A.values[M-1],k=A.values[M]-I,x=Math.abs(k);if(x>=180){for(var S=x/180,j=k/S,F=I+j,J=A.times[M-1],ne=A.times[M]-J,q=ne/S,oe=J+q,se=[],ae=[];oe<A.times[M];)se.push(oe),oe+=q,ae.push(F),F+=j;A.times=O(A.times,M,se),A.values=O(A.values,M,ae)}}}};function a(){}a.prototype={constructor:a,getPrevNode:function(){return this.nodeStack[this.currentIndent-2]},getCurrentNode:function(){return this.nodeStack[this.currentIndent-1]},getCurrentProp:function(){return this.currentProp},pushStack:function(A){this.nodeStack.push(A),this.currentIndent+=1},popStack:function(){this.nodeStack.pop(),this.currentIndent-=1},setCurrentProp:function(A,M){this.currentProp=A,this.currentPropName=M},parse:function(A){this.currentIndent=0,this.allNodes=new h,this.nodeStack=[],this.currentProp=[],this.currentPropName="";var M=this,I=A.split(/[\r\n]+/);return I.forEach(function(k,x){var S=k.match(/^[\s\t]*;/),j=k.match(/^[\s\t]*$/);if(!(S||j)){var F=k.match("^\\t{"+M.currentIndent+"}(\\w+):(.*){",""),J=k.match("^\\t{"+M.currentIndent+"}(\\w+):[\\s\\t\\r\\n](.*)"),ne=k.match("^\\t{"+(M.currentIndent-1)+"}}");F?M.parseNodeBegin(k,F):J?M.parseNodeProperty(k,J,I[++x]):ne?M.popStack():k.match(/^[^\s\t}]/)&&M.parseNodePropertyContinued(k)}}),this.allNodes},parseNodeBegin:function(A,M){var I=M[1].trim().replace(/^"/,"").replace(/"$/,""),k=M[2].split(",").map(function(F){return F.trim().replace(/^"/,"").replace(/"$/,"")}),x={name:I},S=this.parseNodeAttr(k),j=this.getCurrentNode();this.currentIndent===0?this.allNodes.add(I,x):I in j?(I==="PoseNode"?j.PoseNode.push(x):j[I].id!==void 0&&(j[I]={},j[I][j[I].id]=j[I]),S.id!==""&&(j[I][S.id]=x)):typeof S.id=="number"?(j[I]={},j[I][S.id]=x):I!=="Properties70"&&(I==="PoseNode"?j[I]=[x]:j[I]=x),typeof S.id=="number"&&(x.id=S.id),S.name!==""&&(x.attrName=S.name),S.type!==""&&(x.attrType=S.type),this.pushStack(x)},parseNodeAttr:function(A){var M=A[0];A[0]!==""&&(M=parseInt(A[0]),isNaN(M)&&(M=A[0]));var I="",k="";return A.length>1&&(I=A[1].replace(/^(\w+)::/,""),k=A[2]),{id:M,name:I,type:k}},parseNodeProperty:function(A,M,I){var k=M[1].replace(/^"/,"").replace(/"$/,"").trim(),x=M[2].replace(/^"/,"").replace(/"$/,"").trim();k==="Content"&&x===","&&(x=I.replace(/"/g,"").replace(/,$/,"").trim());var S=this.getCurrentNode(),j=S.name;if(j==="Properties70"){this.parseNodeSpecialProperty(A,k,x);return}if(k==="C"){var F=x.split(",").slice(1),J=parseInt(F[0]),ne=parseInt(F[1]),q=x.split(",").slice(3);q=q.map(function(oe){return oe.trim().replace(/^"/,"")}),k="connections",x=[J,ne],R(x,q),S[k]===void 0&&(S[k]=[])}k==="Node"&&(S.id=x),k in S&&Array.isArray(S[k])?S[k].push(x):k!=="a"?S[k]=x:S.a=x,this.setCurrentProp(S,k),k==="a"&&x.slice(-1)!==","&&(S.a=D(x))},parseNodePropertyContinued:function(A){var M=this.getCurrentNode();M.a+=A,A.slice(-1)!==","&&(M.a=D(M.a))},parseNodeSpecialProperty:function(A,M,I){var k=I.split('",').map(function(ne){return ne.trim().replace(/^\"/,"").replace(/\s/,"_")}),x=k[0],S=k[1],j=k[2],F=k[3],J=k[4];switch(S){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":J=parseFloat(J);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":J=D(J);break}this.getPrevNode()[x]={type:S,type2:j,flag:F,value:J},this.setCurrentProp(this.getPrevNode(),x)}};function l(){}l.prototype={constructor:l,parse:function(A){var M=new c(A);M.skip(23);var I=M.getUint32();console.info("THREE.FBXLoader: FBX binary version: "+I);for(var k=new h;!this.endOfContent(M);){var x=this.parseNode(M,I);x!==null&&k.add(x.name,x)}return k},endOfContent:function(A){return A.size()%16===0?(A.getOffset()+160+16&-16)>=A.size():A.getOffset()+160+16>=A.size()},parseNode:function(A,M){var I={},k=M>=7500?A.getUint64():A.getUint32(),x=M>=7500?A.getUint64():A.getUint32();M>=7500?A.getUint64():A.getUint32();var S=A.getUint8(),j=A.getString(S);if(k===0)return null;for(var F=[],J=0;J<x;J++)F.push(this.parseProperty(A));var ne=F.length>0?F[0]:"",q=F.length>1?F[1]:"",oe=F.length>2?F[2]:"";for(I.singleProperty=x===1&&A.getOffset()===k;k>A.getOffset();){var se=this.parseNode(A,M);se!==null&&this.parseSubNode(j,I,se)}return I.propertyList=F,typeof ne=="number"&&(I.id=ne),q!==""&&(I.attrName=q),oe!==""&&(I.attrType=oe),j!==""&&(I.name=j),I},parseSubNode:function(A,M,I){if(I.singleProperty===!0){var k=I.propertyList[0];Array.isArray(k)?(M[I.name]=I,I.a=k):M[I.name]=k}else if(A==="Connections"&&I.name==="C"){var x=[];I.propertyList.forEach(function(oe,se){se!==0&&x.push(oe)}),M.connections===void 0&&(M.connections=[]),M.connections.push(x)}else if(I.name==="Properties70"){var S=Object.keys(I);S.forEach(function(oe){M[oe]=I[oe]})}else if(A==="Properties70"&&I.name==="P"){var j=I.propertyList[0],F=I.propertyList[1],J=I.propertyList[2],ne=I.propertyList[3],q;j.indexOf("Lcl ")===0&&(j=j.replace("Lcl ","Lcl_")),F.indexOf("Lcl ")===0&&(F=F.replace("Lcl ","Lcl_")),F==="Color"||F==="ColorRGB"||F==="Vector"||F==="Vector3D"||F.indexOf("Lcl_")===0?q=[I.propertyList[4],I.propertyList[5],I.propertyList[6]]:q=I.propertyList[4],M[j]={type:F,type2:J,flag:ne,value:q}}else M[I.name]===void 0?typeof I.id=="number"?(M[I.name]={},M[I.name][I.id]=I):M[I.name]=I:I.name==="PoseNode"?(Array.isArray(M[I.name])||(M[I.name]=[M[I.name]]),M[I.name].push(I)):M[I.name][I.id]===void 0&&(M[I.name][I.id]=I)},parseProperty:function(A){var M=A.getString(1);switch(M){case"C":return A.getBoolean();case"D":return A.getFloat64();case"F":return A.getFloat32();case"I":return A.getInt32();case"L":return A.getInt64();case"R":var I=A.getUint32();return A.getArrayBuffer(I);case"S":var I=A.getUint32();return A.getString(I);case"Y":return A.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var k=A.getUint32(),x=A.getUint32(),S=A.getUint32();if(x===0)switch(M){case"b":case"c":return A.getBooleanArray(k);case"d":return A.getFloat64Array(k);case"f":return A.getFloat32Array(k);case"i":return A.getInt32Array(k);case"l":return A.getInt64Array(k)}typeof rp=="undefined"&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var j=new rp.Inflate(new Uint8Array(A.getArrayBuffer(S))),F=new c(j.decompress().buffer);switch(M){case"b":case"c":return F.getBooleanArray(k);case"d":return F.getFloat64Array(k);case"f":return F.getFloat32Array(k);case"i":return F.getInt32Array(k);case"l":return F.getInt64Array(k)}default:throw new Error("THREE.FBXLoader: Unknown property type "+M)}}};function c(A,M){this.dv=new DataView(A),this.offset=0,this.littleEndian=M!==void 0?M:!0}c.prototype={constructor:c,getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(A){this.offset+=A},getBoolean:function(){return(this.getUint8()&1)===1},getBooleanArray:function(A){for(var M=[],I=0;I<A;I++)M.push(this.getBoolean());return M},getUint8:function(){var A=this.dv.getUint8(this.offset);return this.offset+=1,A},getInt16:function(){var A=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,A},getInt32:function(){var A=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,A},getInt32Array:function(A){for(var M=[],I=0;I<A;I++)M.push(this.getInt32());return M},getUint32:function(){var A=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,A},getInt64:function(){var A,M;return this.littleEndian?(A=this.getUint32(),M=this.getUint32()):(M=this.getUint32(),A=this.getUint32()),M&2147483648?(M=~M&4294967295,A=~A&4294967295,A===4294967295&&(M=M+1&4294967295),A=A+1&4294967295,-(M*4294967296+A)):M*4294967296+A},getInt64Array:function(A){for(var M=[],I=0;I<A;I++)M.push(this.getInt64());return M},getUint64:function(){var A,M;return this.littleEndian?(A=this.getUint32(),M=this.getUint32()):(M=this.getUint32(),A=this.getUint32()),M*4294967296+A},getFloat32:function(){var A=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,A},getFloat32Array:function(A){for(var M=[],I=0;I<A;I++)M.push(this.getFloat32());return M},getFloat64:function(){var A=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,A},getFloat64Array:function(A){for(var M=[],I=0;I<A;I++)M.push(this.getFloat64());return M},getArrayBuffer:function(A){var M=this.dv.buffer.slice(this.offset,this.offset+A);return this.offset+=A,M},getString:function(A){for(var M=[],I=0;I<A;I++)M[I]=this.getUint8();var k=M.indexOf(0);return k>=0&&(M=M.slice(0,k)),G.LoaderUtils.decodeText(new Uint8Array(M))}};function h(){}h.prototype={constructor:h,add:function(A,M){this[A]=M}};function u(A){var M="Kaydara FBX Binary \0";return A.byteLength>=M.length&&M===L(A,0,M.length)}function d(A){var M=["K","a","y","d","a","r","a","\\","F","B","X","\\","B","i","n","a","r","y","\\","\\"],I=0;function k(j){var F=A[j-1];return A=A.slice(I+j),I++,F}for(var x=0;x<M.length;++x){var S=k(1);if(S===M[x])return!1}return!0}function p(A){var M=/FBXVersion: (\d+)/,I=A.match(M);if(I){var k=parseInt(I[1]);return k}throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function m(A){return A/46186158e3}var g=[];function v(A,M,I,k){var x;switch(k.mappingType){case"ByPolygonVertex":x=A;break;case"ByPolygon":x=M;break;case"ByVertice":x=I;break;case"AllSame":x=k.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+k.mappingType)}k.referenceType==="IndexToDirect"&&(x=k.indices[x]);var S=x*k.dataSize,j=S+k.dataSize;return z(g,k.buffer,S,j)}var y=new G.Euler,w=new G.Vector3;function C(A){var M=new G.Matrix4,I=new G.Matrix4,k=new G.Matrix4,x=new G.Matrix4,S=new G.Matrix4,j=new G.Matrix4,F=new G.Matrix4,J=new G.Matrix4,ne=new G.Matrix4,q=new G.Matrix4,oe=new G.Matrix4,se=A.inheritType?A.inheritType:0;if(A.translation&&M.setPosition(w.fromArray(A.translation)),A.preRotation){var ae=A.preRotation.map(G.MathUtils.degToRad);ae.push(A.eulerOrder),I.makeRotationFromEuler(y.fromArray(ae))}if(A.rotation){var ae=A.rotation.map(G.MathUtils.degToRad);ae.push(A.eulerOrder),k.makeRotationFromEuler(y.fromArray(ae))}if(A.postRotation){var ae=A.postRotation.map(G.MathUtils.degToRad);ae.push(A.eulerOrder),x.makeRotationFromEuler(y.fromArray(ae))}A.scale&&S.scale(w.fromArray(A.scale)),A.scalingOffset&&F.setPosition(w.fromArray(A.scalingOffset)),A.scalingPivot&&j.setPosition(w.fromArray(A.scalingPivot)),A.rotationOffset&&J.setPosition(w.fromArray(A.rotationOffset)),A.rotationPivot&&ne.setPosition(w.fromArray(A.rotationPivot)),A.parentMatrixWorld&&(q=A.parentMatrixWorld);var ze=I.multiply(k).multiply(x),ee=new G.Matrix4;q.extractRotation(ee);var we=new G.Matrix4;we.copyPosition(q);var le=new G.Matrix4;le.getInverse(ee).multiply(q);var he=new G.Matrix4;if(se===0)he.copy(ee).multiply(ze).multiply(le).multiply(S);else if(se===1)he.copy(ee).multiply(le).multiply(ze).multiply(S);else{var be=new G.Matrix4().getInverse(S),te=new G.Matrix4().multiply(le).multiply(be);he.copy(ee).multiply(ze).multiply(te).multiply(S)}var ke=new G.Matrix4().getInverse(ne),Re=new G.Matrix4().getInverse(j),ye=new G.Matrix4;ye.copy(M).multiply(J).multiply(ne).multiply(I).multiply(k).multiply(x).multiply(ke).multiply(F).multiply(j).multiply(S).multiply(Re);var De=new G.Matrix4().copyPosition(ye),ve=new G.Matrix4().copy(q).multiply(De);return oe.copyPosition(ve),ye=new G.Matrix4().multiply(oe).multiply(he),ye}function E(A){A=A||0;var M=["ZYX","YZX","XZY","ZXY","YXZ","XYZ"];return A===6?(console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect."),M[0]):M[A]}function D(A){var M=A.split(",").map(function(I){return parseFloat(I)});return M}function L(A,M,I){return M===void 0&&(M=0),I===void 0&&(I=A.byteLength),G.LoaderUtils.decodeText(new Uint8Array(A,M,I))}function R(A,M){for(var I=0,k=A.length,x=M.length;I<x;I++,k++)A[k]=M[I]}function z(A,M,I,k){for(var x=I,S=0;x<k;x++,S++)A[S]=M[x];return A}function O(A,M,I){return A.slice(0,M).concat(I).concat(A.slice(M))}return i}();const M5=(n,t)=>{var g;const e=(t==null?void 0:t.fbx_url)||du,i=(g=t==null?void 0:t.north_rad)!=null?g:void 0,s={};let o={x:0,y:0,z:0},r=[0,0,0],a=1,l=i;n.on("modelLoaded",m);const c=v=>$(exports,null,function*(){var E;const y=(v==null?void 0:v.fbx_url)||e;if(l=(E=v==null?void 0:v.north_rad)!=null?E:i,typeof l!="number")throw new Error('"northRad"配置参数缺失:未配置指南针指向!');s.object&&(s.object.parent&&s.object.parent.remove(s.object),s.object.traverse(D=>{var L,R;D instanceof b.Mesh&&((L=D.geometry)==null||L.dispose(),Array.isArray(D.material)?D.material.forEach(z=>z.dispose()):(R=D.material)==null||R.dispose())}));const C=yield new y1().loadAsync(y);return f1(C,{transparent:!0,side:b.DoubleSide,blending:b.AdditiveBlending}),s.object=C,m(),!0}),h=({latitude:v})=>{if(!s.object)return;const y=u(v);y&&(s.object.position.y=y)},u=v=>{if(s.yBase===void 0)return;const y=.6;if(v>=Math.PI/4)return s.yBase-(y+1.6);const w=v*(4/Math.PI);return s.yBase-(y*w+1.6)},d=()=>{if(!s.object)return;const v=u(n.getPose().latitude);v&&(s.object.position.y=v),n.scene.add(s.object),n.needsRender=!0,n.on("cameraDirectionUpdate",h)},p=()=>{s.object&&(n.scene.remove(s.object),n.needsRender=!0,n.off("cameraDirectionUpdate",h))};function m(){const v=s.object;if(!v)return;const y=n.model.bounding,w=y.max.x-y.min.x,C=y.max.z-y.min.z,E=Math.max(w,C),{max:{x:D,z:L},min:{x:R,y:z,z:O}}=y;s.yBase=z,o={x:(D+R)/2,y:z-1.6,z:(L+O)/2},r=[0,l-Math.PI/2,0],a=.0045*E,A5(v,{position:o,rotation:r,scale:a})}return{load:c,disable:p,enable:d}};function I5(n,t){var c,h,u,d,p;const e=(c=t==null?void 0:t.size)!=null?c:512,i=(h=t==null?void 0:t.fontSize)!=null?h:e*(35/256)*1.2,s=(u=t==null?void 0:t.backgroundColor)!=null?u:"rgba(0,0,0,0)",o=(d=t==null?void 0:t.fontColor)!=null?d:"#fff",r=(p=t==null?void 0:t.textAlign)!=null?p:"center",a=document.createElement("canvas");a.setAttribute("width",e+""),a.setAttribute("height",e+"");const l=a.getContext("2d");return l.fillStyle=s,l.fillRect(0,0,e,e),l.font=`${i}px "微软雅黑"`,l.textAlign=r,l.fillStyle=o,l.fillText(n,e/2,e*.7),new G.CanvasTexture(a)}const E5=({x:n,y:t,z:e})=>new G.Vector3(n,t,e),k5=(n,t)=>{var g,v,y;const e={},i=(g=t==null?void 0:t.animationEnabled)!=null?g:!0,s=(v=t==null?void 0:t.position)!=null?v:void 0,o=(y=t==null?void 0:t.rad)!=null?y:void 0,r=(t==null?void 0:t.fbx_url)||pu,a=[],l=w=>$(exports,null,function*(){var A,M,I,k,x,S,j,F;const C=(A=w==null?void 0:w.position)!=null?A:s;if(!C)return Promise.reject(new Error("ModelEntryDoorGuidePlugin.load(): position is undefined"));const E=E5(C),D=(M=w==null?void 0:w.rad)!=null?M:o,L=(I=w==null?void 0:w.fbx_url)!=null?I:r;if(e.rad=D,D===void 0)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): rad is ${D}`));const R=yield new y1().loadAsync(L);R.position.copy(E),R.rotation.z=D,R.scale.set(.8,.8,.8),f1(R,{transparent:!0,side:b.DoubleSide});const z=(j=(S=(x=(k=R.children)==null?void 0:k[0])==null?void 0:x.children)==null?void 0:S[3])==null?void 0:j.clone();if(!z)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): textMesh is ${z}`));const O=(F=t.name)!=null?F:"入户门";return z.material=new G.MeshBasicMaterial({transparent:!0,map:I5(O)}),z.renderOrder=3,R.children[0].add(z),e.object=R,!0}),c=()=>{if(e.animation)return;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.initAnimation(): state.object is ",e.object);const w=1,C=new G.AnimationMixer(e.object);a.push(C);const E=C.clipAction(e.object.animations[0]);E.timeScale=w;let D;const L=()=>{let A=0,M=0;const I=1e3/30,k=x=>{A=requestAnimationFrame(k);const S=x-M;S<I||(M=x,a.forEach(j=>j.update(S/1e3)),n.needsRender=!0)};return A=requestAnimationFrame(k),()=>{cancelAnimationFrame(A)}},O={play:()=>{D||(E.play(),D=L(),requestAnimationFrame(()=>{e.object&&e.object.rotation.z!==e.rad&&(e.object.rotation.z=e.rad)}))},stop:()=>{E.stop(),D==null||D(),D=void 0}};e.animation=O},h=w=>{var E;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.enable(): object is ",e.object);((E=w==null?void 0:w.animationEnable)!=null?E:i)&&(e.animation||c(),e.animation.play()),n.scene.add(e.object),n.needsRender=!0},u=()=>{e.object&&(e.animation&&e.animation.stop(),n.scene.remove(e.object),n.needsRender=!0)},d=w=>w==="Floorplan"?h():u();return{load:l,enable:w=>(e.enabled||(e.enabled=!0,d(n.currentMode),n.on("modeChange",d),h(w)),!0),disable:()=>(e.enabled&&(e.enabled=!1,u(),n.off("modeChange",d)),!0)}},x5=Gi;function S5(n,t,e,i=x5.Linear.None){const s=new xl(n).to(t,e).easing(i);aa(()=>s.start(0));const o=Zo(a=>{s.update(a)===!1&&o()}),r=[];return s.onDestroy=a=>(r.push(a),s),s.destroy=function(){this.stop(),Object.assign(s,{_onStartCallback:null,_onUpdateCallback:null,_onCompleteCallback:null,_onStopCallbackL:null});let a;for(;a=r.shift();)a();o()},s}function T5(n,t){return S5({progress:0},{progress:1},n,t)}var b1=(n=>(n.Move="Move",n.Rotate="Rotate",n))(b1||{}),nn=(n=>(n.Clockwise="Clockwise",n.Anticlockwise="Anticlockwise",n.Loop="Loop",n))(nn||{});const Xa=Math.PI*2;function ap(n){return(n%Xa+Xa)%Xa}function lp(n){return n%Xa}function Cc(n,t,e){return n+(t-n)*e}const ph=(n,t,e)=>{const i=Math.PI,s=i*2;let o=ap(n),r=ap(t);return e===nn.Anticlockwise&&o<r&&(o+=s),e===nn.Clockwise&&r<o&&(r+=s),e===nn.Loop&&r-o>i?ph(o,r,nn.Anticlockwise):e===nn.Loop&&o-r>i?ph(o,r,nn.Clockwise):{from:o,to:r}},D5=n=>{const t={},e=(l,c,...h)=>$(exports,[l,c,...h],function*(o,r,a={preload:!0}){return t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),o.mode&&o.mode!==n.currentMode&&(yield n.changeMode(o.mode)),a.preload&&o.panoIndex!==void 0&&o.panoIndex!==n.panoIndex&&(yield n.preloadPano(o.panoIndex)),a.asyncEndCallback&&(yield a.asyncEndCallback()),o.panoIndex===void 0&&o.fov===void 0&&o.latitude===void 0&&o.longitude===void 0?!0:yield new Promise((u,d)=>{const p=o.panoIndex!==void 0?o.panoIndex:n.panoIndex;p!==void 0?n.moveToPano(p,V({duration:r,moveEndCallback:()=>u(!0),moveCancelCallback:()=>d(new Error("move canceled"))},o)):d(new Error("unexpected error"))})}),i=o=>{const r=n.state,a=lp(r.latitude),l=lp(o.latitude),{from:c,to:h}=ph(r.longitude,o.longitude,o.rotation||nn.Loop),u=r.fov,d=o.fov;return{from:{latitude:a,longitude:c,fov:u},to:{latitude:l,longitude:h,fov:d}}};return{move:e,rotate:(l,c,...h)=>$(exports,[l,c,...h],function*(o,r,a={}){t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),n.currentMode!==rt.Five.Mode.Panorama&&(yield n.changeMode(rt.Five.Mode.Panorama)),o.panoIndex!==void 0&&o.panoIndex!==n.panoIndex&&(a.preload&&(yield n.preloadPano(o.panoIndex)),yield new Promise((p,m)=>{if(!o.panoIndex){p(!0);return}n.moveToPano(o.panoIndex,{moveEndCallback:()=>p(!0),moveCancelCallback:()=>m(new Error("move canceled"))})})),a.asyncEndCallback&&(yield a.asyncEndCallback());const{from:u,to:d}=i(o);return yield new Promise(p=>{const m=({progress:C})=>{const E={};E.longitude=Cc(u.longitude,d.longitude,C),E.latitude=Cc(u.latitude,d.latitude,C),E.fov=Cc(u.fov,d.fov,C),n.setState(E,!0)},g=()=>{p(!0)},v=()=>{p(!1)},y=o.rotateSpeed?Math.ceil(Math.abs(d.longitude-u.longitude)/o.rotateSpeed*1e3):r,w=T5(y,Gi.Linear.None).onUpdate(m).onComplete(g).onDestroy(v);o.rotation===nn.Loop&&w.repeat(1/0).yoyo(!0),t.interruptCallback=(C=!0)=>{w.destroy(),t.interruptCallback=void 0,t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=void 0),p(C)},t.timeoutId=setTimeout(()=>{t.interruptCallback&&t.interruptCallback(!0)},r)})})}};function cp(n,t){return n.x===t.x&&n.y===t.y}function A1(n,t){return Math.abs(n)===1/0&&Math.abs(t)===1/0?!0:Math.abs(n-t)<.001}function bl(n,t){return(t.y-n.y)/(t.x-n.x)}function w1(n,t,e){const i=bl(n[1],n[0]),s=bl(t[1],t[0]);if(isNaN(i)||isNaN(s)||A1(i,s))return!1;if(za(n[0],t))return n[0];if(za(n[1],t))return n[1];if(za(t[0],n))return t[0];if(za(t[1],n))return t[1];if(e&&!z5(n,t))return!1;const o=n[0],r=t[0];if(Math.abs(i)===1/0)return{x:o.x,y:t[1].y-(t[1].x-o.x)*s};if(Math.abs(s)===1/0)return{x:r.x,y:n[1].y-(n[1].x-r.x)*i};const a=(r.y-o.y+i*o.x-s*r.x)/(i-s),l=i*a-i*o.x+o.y;return{x:a,y:l}}function za(n,t){return cp(n,t[0])||cp(n,t[1])?!0:(t[0].x-n.x)*(n.x-t[1].x)>=0&&(t[0].y-n.y)*(n.y-t[1].y)>=0&&A1(bl(t[0],n),bl(n,t[1]))}function L5(n){let t=1/0,e=-1/0,i=1/0,s=-1/0;return n.forEach(o=>{t=Math.min(t,o.x),e=Math.max(e,o.x),i=Math.min(i,o.y),s=Math.max(s,o.y)}),{x:(t+e)/2,y:(i+s)/2}}function Oa(n,t,e){return(n.x-e.x)*(t.y-e.y)-(t.x-e.x)*(n.y-e.y)}function z5(n,t){return Math.max(n[0].x,n[1].x)>=Math.min(t[0].x,t[1].x)&&Math.max(t[0].x,t[1].x)>=Math.min(n[0].x,n[1].x)&&Math.max(n[0].y,n[1].y)>=Math.min(t[0].y,t[1].y)&&Oa(t[0],n[1],n[0])*Oa(n[1],t[1],n[0])>0&&Oa(n[0],t[1],t[0])*Oa(t[1],n[1],t[0])>0?1:0}function P1(n,t=0){t<=0?requestAnimationFrame(n):requestAnimationFrame(()=>P1(n,t-1))}const O5=`<style type="text/css">
|
|
509
|
+
`;return n.$$set=o=>{"content"in o&&e(0,i=o.content)},[i,s]}class t3 extends Ee{constructor(t){super(),Ie(this,t,e3,$2,Me,{content:0},K2)}}function i3(n){Le(n,"svelte-ozpg4a",".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}")}function n3(n){let t,e;return t=new J2({props:{url:n[1].url}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.url=i[1].url),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function s3(n){let t,e;return t=new t3({props:{content:n[0]}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.content=i[0]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function o3(n){let t,e,i,s;const o=[s3,n3],r=[];function a(l,c){return l[0]?0:l[1]?1:-1}return~(e=a(n))&&(i=r[e]=o[e](n)),{c(){t=U("div"),i&&i.c(),P(t,"class","floorplan-plugin__base-image svelte-ozpg4a")},m(l,c){Z(l,t,c),~e&&r[e].m(t,null),s=!0},p(l,[c]){let h=e;e=a(l),e===h?~e&&r[e].p(l,c):(i&&(xe(),Y(r[h],1,1,()=>{r[h]=null}),Se()),~e?(i=r[e],i?i.p(l,c):(i=r[e]=o[e](l),i.c()),H(i,1),i.m(t,null)):i=null)},i(l){s||(H(i),s=!0)},o(l){Y(i),s=!1},d(l){l&&X(t),~e&&r[e].d()}}}function r3(n,t,e){let i,s,{floorIndex:o}=t,{floorplanData:r}=t;return n.$$set=a=>{"floorIndex"in a&&e(2,o=a.floorIndex),"floorplanData"in a&&e(3,r=a.floorplanData)},n.$$.update=()=>{var a,l;n.$$.dirty&12&&e(1,i=r.outlines[o]),n.$$.dirty&12&&e(0,s=(l=(a=r.outlines)==null?void 0:a[o])==null?void 0:l.svgContent)},[s,i,o,r]}class Su extends Ee{constructor(t){super(),Ie(this,t,r3,o3,Me,{floorIndex:2,floorplanData:3},i3)}}function a3(n){Le(n,"svelte-2r6702",".floorplan-plugin__item.svelte-2r6702{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:1;color:#fff;transform:translate(-50%, -50%);white-space:nowrap;will-change:opacity;transition:opacity 300ms}.floorplan-plugin__img.svelte-2r6702{width:100%;height:100%}.floorplan-plugin__notes.svelte-2r6702{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);padding:0.25rem;line-height:1;border-radius:0.25rem;color:#fff;background:rgba(0,0,0,.6);font-size:0.75rem}")}function l3(n){let t,e,i,s,o,r=n[0].notes+"",a;return{c(){t=U("div"),e=U("img"),s=ue(),o=U("span"),a=Fe(r),P(e,"class","floorplan-plugin__img svelte-2r6702"),at(e.src,i=n[6])||P(e,"src",i),P(e,"alt",""),_(e,"transform",n[5]),P(o,"class","floorplan-plugin__notes svelte-2r6702"),P(t,"class","floorplan-plugin__item svelte-2r6702"),_(t,"left",n[1]),_(t,"top",n[2]),_(t,"width",n[3]),_(t,"height",n[4])},m(l,c){Z(l,t,c),B(t,e),B(t,s),B(t,o),B(o,a)},p(l,[c]){c&1&&r!==(r=l[0].notes+"")&&Ne(a,r)},i:ce,o:ce,d(l){l&&X(t)}}}function c3(n,t,e){let{item:i}=t;const s=i.positionInImage.x*100+"%",o=i.positionInImage.y*100+"%",r=i.width*100+"%",a=i.height*100+"%",l=`rotate(${i.rotateZ}deg) scaleX(${i.rotateX?-1:1}) scaleY(${i.rotateY?-1:1})`,c=i.src;return n.$$set=h=>{"item"in h&&e(0,i=h.item)},[i,s,o,r,a,l,c]}class h3 extends Ee{constructor(t){super(),Ie(this,t,c3,l3,Me,{item:0},a3)}}function u3(n){Le(n,"svelte-1c5mqz0",".floorplan-plugin__room-items.svelte-1c5mqz0{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20;pointer-events:none}")}function Zd(n,t,e){const i=n.slice();return i[6]=t[e],i}function qd(n){let t,e=[],i=new Map,s,o,r,a=n[1];const l=c=>c[6].id;for(let c=0;c<a.length;c+=1){let h=Zd(n,a,c),u=l(h);i.set(u,e[c]=Jd(u,h))}return{c(){t=U("div");for(let c=0;c<e.length;c+=1)e[c].c();P(t,"class","floorplan-plugin__room-items svelte-1c5mqz0")},m(c,h){Z(c,t,h);for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(t,null);s=!0,o||(r=[oi(_i.call(null,t)),_e(t,"clientWidth",n[4])],o=!0)},p(c,h){h&2&&(a=c[1],xe(),e=ai(e,h,l,1,c,a,i,t,fn,Jd,null,Zd),Se())},i(c){if(!s){for(let h=0;h<a.length;h+=1)H(e[h]);s=!0}},o(c){for(let h=0;h<e.length;h+=1)Y(e[h]);s=!1},d(c){c&&X(t);for(let h=0;h<e.length;h+=1)e[h].d();o=!1,dt(r)}}}function Jd(n,t){let e,i,s;const o=[{item:t[6]}];let r={};for(let a=0;a<o.length;a+=1)r=pt(r,o[a]);return i=new h3({props:r}),{key:n,first:null,c(){e=Be(),ge(i.$$.fragment),this.first=e},m(a,l){Z(a,e,l),pe(i,a,l),s=!0},p(a,l){t=a;const c=l&2?yt(o,[{item:t[6]}]):{};i.$set(c)},i(a){s||(H(i.$$.fragment,a),s=!0)},o(a){Y(i.$$.fragment,a),s=!1},d(a){a&&X(e),me(i,a)}}}function d3(n){let t,e,i=n[1]&&qd(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[1]?i?(i.p(s,o),o&2&&H(i,1)):(i=qd(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function f3(n,t,e){let i,{floorIndex:s}=t,{floorplanData:o}=t,r=0;const a=l=>{e(0,r=l.detail)};return n.$$set=l=>{"floorIndex"in l&&e(2,s=l.floorIndex),"floorplanData"in l&&e(3,o=l.floorplanData)},n.$$.update=()=>{if(n.$$.dirty&12&&e(1,i=o.floorDatas[s].items),n.$$.dirty&9){const{max:l,min:c}=o.bounding;l.x-c.x}},[r,i,s,o,a]}class p3 extends Ee{constructor(t){super(),Ie(this,t,f3,d3,Me,{floorIndex:2,floorplanData:3},u3)}}function m3(n){Le(n,"svelte-9vzn2f",".floorplan-plugin__room-label-item.svelte-9vzn2f{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:1;color:#fff;transform:translate(-50%, -50%);white-space:nowrap;will-change:opacity;transition:opacity 300ms}.floorplan-plugin__room-part1.svelte-9vzn2f{display:flex;flex-flow:column;align-items:center;color:#fff;white-space:nowrap}.floorplan-plugin__room-area.svelte-9vzn2f{opacity:0.6;line-height:1.25;margin-top:0.125rem}")}function g3(n){let t,e=n[18].outerHTML+"",i;return{c(){t=new Bo(!1),i=Be(),t.a=i},m(s,o){t.m(e,s,o),Z(s,i,o)},p(s,o){o[0]&262144&&e!==(e=s[18].outerHTML+"")&&t.p(e)},d(s){s&&X(i),s&&t.d()}}}function v3(n){let t,e,i,s,o,r,a=n[1]&&Kd(n),l=n[0]&&$d(n),c=n[3]&&ef(n);return{c(){t=U("div"),a&&a.c(),e=ue(),l&&l.c(),i=ue(),c&&c.c(),s=Be(),P(t,"class","floorplan-plugin__room-part1 svelte-9vzn2f"),_(t,"opacity",n[14]?"1":"0")},m(h,u){Z(h,t,u),a&&a.m(t,null),B(t,e),l&&l.m(t,null),Z(h,i,u),c&&c.m(h,u),Z(h,s,u),o||(r=[oi(_i.call(null,t)),_e(t,"clientWidth",n[35]),_e(t,"clientHeight",n[36])],o=!0)},p(h,u){h[1]?a?a.p(h,u):(a=Kd(h),a.c(),a.m(t,e)):a&&(a.d(1),a=null),h[0]?l?l.p(h,u):(l=$d(h),l.c(),l.m(t,null)):l&&(l.d(1),l=null),u[0]&16384&&_(t,"opacity",h[14]?"1":"0"),h[3]?c?c.p(h,u):(c=ef(h),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null)},d(h){h&&X(t),a&&a.d(),l&&l.d(),h&&X(i),c&&c.d(h),h&&X(s),o=!1,dt(r)}}}function Kd(n){let t,e=(n[2]?n[4].name:n[4].roomType==="100900000012"?n[4].customizedName:n[4].name)+"",i;return{c(){t=U("span"),i=Fe(e),P(t,"class","floorplan-plugin__room-name"),_(t,"font-size",n[11])},m(s,o){Z(s,t,o),B(t,i)},p(s,o){o[0]&20&&e!==(e=(s[2]?s[4].name:s[4].roomType==="100900000012"?s[4].customizedName:s[4].name)+"")&&Ne(i,e),o[0]&2048&&_(t,"font-size",s[11])},d(s){s&&X(t)}}}function $d(n){let t,e;return{c(){t=U("span"),e=Fe(n[17]),P(t,"class","floorplan-plugin__room-area svelte-9vzn2f"),_(t,"font-size",n[10])},m(i,s){Z(i,t,s),B(t,e)},p(i,s){s[0]&131072&&Ne(e,i[17]),s[0]&1024&&_(t,"font-size",i[10])},d(i){i&&X(t)}}}function ef(n){let t,e;return{c(){t=U("span"),e=Fe(n[16]),P(t,"class","floorplan-plugin__room-size"),_(t,"font-size",n[10]),_(t,"opacity",n[13]?"0.6":"0")},m(i,s){Z(i,t,s),B(t,e)},p(i,s){s[0]&65536&&Ne(e,i[16]),s[0]&1024&&_(t,"font-size",i[10]),s[0]&8192&&_(t,"opacity",i[13]?"0.6":"0")},d(i){i&&X(t)}}}function y3(n){let t,e,i;function s(a,l){if(a[5]===void 0)return v3;if(a[18])return g3}let o=s(n),r=o&&o(n);return{c(){t=U("div"),r&&r.c(),P(t,"class","floorplan-plugin__room-label-item svelte-9vzn2f"),_(t,"left",n[19]),_(t,"top",n[20]),_(t,"font-size",n[11]),_(t,"opacity",n[15]?"1":"0"),_(t,"transform",n[12]?"translate(-50%, calc(-50% + 6px))":"translate(-50%, -50%)")},m(a,l){Z(a,t,l),r&&r.m(t,null),e||(i=[oi(_i.call(null,t)),_e(t,"clientWidth",n[37]),_e(t,"clientHeight",n[38])],e=!0)},p(a,l){o===(o=s(a))&&r?r.p(a,l):(r&&r.d(1),r=o&&o(a),r&&(r.c(),r.m(t,null))),l[0]&2048&&_(t,"font-size",a[11]),l[0]&32768&&_(t,"opacity",a[15]?"1":"0"),l[0]&4096&&_(t,"transform",a[12]?"translate(-50%, calc(-50% + 6px))":"translate(-50%, -50%)")},i:ce,o:ce,d(a){a&&X(t),r&&r.d(),e=!1,dt(i)}}}function b3(n,t){const e=n[0],i=n[1];let s=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){const a=t[o][0],l=t[o][1],c=t[r][0],h=t[r][1];l>i!=h>i&&e<(c-a)*(i-l)/(h-l)+a&&(s=!s)}return s}function A3(n,t,e){let i,s,o,r,a,l,c,h,u,d,p,m,g,v,y,w,{pxmm:C}=t,{roomAreaEnable:E}=t,{roomNameEnable:D}=t,{roomNameOtherTypeEnable:L}=t,{roomDimensionEnable:R}=t,{room:z}=t,{hoveredRoom:O}=t,{getRoomAreaText:A}=t,{getRoomDimensionText:M}=t,{getLabelElement:I}=t,{adaptiveRoomLabelVisibleEnable:k}=t,{fontSize:x}=t;function S(he,be){if(be.width===0||be.height===0)return()=>!1;const te=he.path.map(({x:Ye,y:Ze})=>[Ye,Ze]),ke=he.roomLabel.position,{x:Re,y:ye}=ke,{width:De,height:ve}=be,Ae=De/2,Oe=ve/2;return function(Ze){const ot=Re*Ze,Ke=ye*Ze,et=te.map(([ht,Ft])=>[ht*Ze,Ft*Ze]);return[[ot+Ae,Ke-Oe],[ot-Ae,Ke-Oe],[ot-Ae,Ke+Oe],[ot+Ae,Ke+Oe]].every(ht=>b3(ht,et))}}const j=z.roomLabel,F=j.positionInImage.x*100+"%",J=j.positionInImage.y*100+"%";let ne=0,q=0,oe=0,se=0,ae=!1;O.subscribe(function(be){e(27,ae=!!be&&be.id===z.id)});const ze=he=>{e(8,oe=he.detail)},ee=he=>{e(9,se=he.detail)},we=he=>{e(6,ne=he.detail)},le=he=>{e(7,q=he.detail)};return n.$$set=he=>{"pxmm"in he&&e(21,C=he.pxmm),"roomAreaEnable"in he&&e(0,E=he.roomAreaEnable),"roomNameEnable"in he&&e(1,D=he.roomNameEnable),"roomNameOtherTypeEnable"in he&&e(2,L=he.roomNameOtherTypeEnable),"roomDimensionEnable"in he&&e(3,R=he.roomDimensionEnable),"room"in he&&e(4,z=he.room),"hoveredRoom"in he&&e(22,O=he.hoveredRoom),"getRoomAreaText"in he&&e(23,A=he.getRoomAreaText),"getRoomDimensionText"in he&&e(24,M=he.getRoomDimensionText),"getLabelElement"in he&&e(5,I=he.getLabelElement),"adaptiveRoomLabelVisibleEnable"in he&&e(25,k=he.adaptiveRoomLabelVisibleEnable),"fontSize"in he&&e(26,x=he.fontSize)},n.$$.update=()=>{var he,be;n.$$.dirty[0]&67108864&&e(28,i=ku[x]),n.$$.dirty[0]&48&&e(18,s=I==null?void 0:I(z)),n.$$.dirty[0]&8388624&&e(17,o=z.size?A(z.size):""),n.$$.dirty[0]&16777232&&e(16,r=z!=null&&z.dimension?M((he=z.dimension)==null?void 0:he.width,(be=z.dimension)==null?void 0:be.height):""),n.$$.dirty[0]&768&&e(34,a={width:oe,height:se}),n.$$.dirty[0]&16|n.$$.dirty[1]&8&&e(33,l=a?S(z,a):void 0),n.$$.dirty[0]&35651584|n.$$.dirty[1]&4&&e(30,c=k?!!(l!=null&&l(C)):!0),n.$$.dirty[0]&192&&e(32,h={width:ne,height:q}),n.$$.dirty[0]&16|n.$$.dirty[1]&2&&e(31,u=h?S(z,h):void 0),n.$$.dirty[0]&35651584|n.$$.dirty[1]&1&&e(29,d=k?!!(u!=null&&u(C)):!0),n.$$.dirty[0]&1744830464&&e(15,p=d||c||ae),n.$$.dirty[0]&1207959552&&e(14,m=c||ae),n.$$.dirty[0]&671088640&&e(13,g=d||ae),n.$$.dirty[0]&1610612736&&e(12,v=c&&!d),n.$$.dirty[0]&268435456&&e(11,y=ft((i==null?void 0:i.name)||12)),n.$$.dirty[0]&268435456&&e(10,w=ft((i==null?void 0:i.area)||10))},[E,D,L,R,z,I,ne,q,oe,se,w,y,v,g,m,p,r,o,s,F,J,C,O,A,M,k,x,ae,i,d,c,u,h,l,a,ze,ee,we,le]}class w3 extends Ee{constructor(t){super(),Ie(this,t,A3,y3,Me,{pxmm:21,roomAreaEnable:0,roomNameEnable:1,roomNameOtherTypeEnable:2,roomDimensionEnable:3,room:4,hoveredRoom:22,getRoomAreaText:23,getRoomDimensionText:24,getLabelElement:5,adaptiveRoomLabelVisibleEnable:25,fontSize:26},m3,[-1,-1])}}function P3(n){Le(n,"svelte-13xux0b",".floorplan-plugin__room-labels.svelte-13xux0b{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20;pointer-events:none}")}function tf(n,t,e){const i=n.slice();return i[17]=t[e],i}function nf(n){let t,e=[],i=new Map,s,o,r,a=n[12];const l=c=>c[17].id;for(let c=0;c<a.length;c+=1){let h=tf(n,a,c),u=l(h);i.set(u,e[c]=sf(u,h))}return{c(){t=U("div");for(let c=0;c<e.length;c+=1)e[c].c();P(t,"class","floorplan-plugin__room-labels svelte-13xux0b")},m(c,h){Z(c,t,h);for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(t,null);s=!0,o||(r=[oi(_i.call(null,t)),_e(t,"clientWidth",n[15])],o=!0)},p(c,h){h&7679&&(a=c[12],xe(),e=ai(e,h,l,1,c,a,i,t,fn,sf,null,tf),Se())},i(c){if(!s){for(let h=0;h<a.length;h+=1)H(e[h]);s=!0}},o(c){for(let h=0;h<e.length;h+=1)Y(e[h]);s=!1},d(c){c&&X(t);for(let h=0;h<e.length;h+=1)e[h].d();o=!1,dt(r)}}}function sf(n,t){let e,i,s;const o=[{pxmm:t[10],room:t[17],hoveredRoom:t[4],roomAreaEnable:t[0],roomNameEnable:t[1],roomNameOtherTypeEnable:t[2],roomDimensionEnable:t[3],getLabelElement:t[7],getRoomAreaText:t[5],getRoomDimensionText:t[6],adaptiveRoomLabelVisibleEnable:t[8],fontSize:t[11]}];let r={};for(let a=0;a<o.length;a+=1)r=pt(r,o[a]);return i=new w3({props:r}),{key:n,first:null,c(){e=Be(),ge(i.$$.fragment),this.first=e},m(a,l){Z(a,e,l),pe(i,a,l),s=!0},p(a,l){t=a;const c=l&7679?yt(o,[{pxmm:t[10],room:t[17],hoveredRoom:t[4],roomAreaEnable:t[0],roomNameEnable:t[1],roomNameOtherTypeEnable:t[2],roomDimensionEnable:t[3],getLabelElement:t[7],getRoomAreaText:t[5],getRoomDimensionText:t[6],adaptiveRoomLabelVisibleEnable:t[8],fontSize:t[11]}]):{};i.$set(c)},i(a){s||(H(i.$$.fragment,a),s=!0)},o(a){Y(i.$$.fragment,a),s=!1},d(a){a&&X(e),me(i,a)}}}function C3(n){let t,e,i=n[12]&&nf(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[12]?i?(i.p(s,o),o&4096&&H(i,1)):(i=nf(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function M3(n,t,e){let i,{floorIndex:s}=t,{roomAreaEnable:o}=t,{roomNameEnable:r}=t,{roomNameOtherTypeEnable:a}=t,{roomDimensionEnable:l}=t,{floorplanData:c}=t,{hoveredRoom:h}=t,{getRoomAreaText:u}=t,{getRoomDimensionText:d}=t,{getLabelElement:p}=t,{adaptiveRoomLabelVisibleEnable:m}=t,g=0,v=0;const y=ca();let w=Jo();typeof y=="object"&&"subscribe"in y&&y.subscribe(E=>{e(11,w=E)});const C=E=>{e(9,g=E.detail)};return n.$$set=E=>{"floorIndex"in E&&e(13,s=E.floorIndex),"roomAreaEnable"in E&&e(0,o=E.roomAreaEnable),"roomNameEnable"in E&&e(1,r=E.roomNameEnable),"roomNameOtherTypeEnable"in E&&e(2,a=E.roomNameOtherTypeEnable),"roomDimensionEnable"in E&&e(3,l=E.roomDimensionEnable),"floorplanData"in E&&e(14,c=E.floorplanData),"hoveredRoom"in E&&e(4,h=E.hoveredRoom),"getRoomAreaText"in E&&e(5,u=E.getRoomAreaText),"getRoomDimensionText"in E&&e(6,d=E.getRoomDimensionText),"getLabelElement"in E&&e(7,p=E.getLabelElement),"adaptiveRoomLabelVisibleEnable"in E&&e(8,m=E.adaptiveRoomLabelVisibleEnable)},n.$$.update=()=>{if(n.$$.dirty&24576&&e(12,i=c.floorDatas[s].rooms),n.$$.dirty&16896){const{max:E,min:D}=c.bounding,L=E.x-D.x;e(10,v=g/L)}},[o,r,a,l,h,u,d,p,m,g,v,w,i,s,c,C]}let I3=class extends Ee{constructor(t){super(),Ie(this,t,M3,C3,Me,{floorIndex:13,roomAreaEnable:0,roomNameEnable:1,roomNameOtherTypeEnable:2,roomDimensionEnable:3,floorplanData:14,hoveredRoom:4,getRoomAreaText:5,getRoomDimensionText:6,getLabelElement:7,adaptiveRoomLabelVisibleEnable:8},P3)}};function E3(n){Le(n,"svelte-1fuyezq",".floorplan-plugin__rule-labels.svelte-1fuyezq.svelte-1fuyezq{position:absolute;display:flex}.floorplan-plugin__rule-labels--top.svelte-1fuyezq.svelte-1fuyezq{left:0;top:-1.25rem}.floorplan-plugin__rule-labels--bottom.svelte-1fuyezq.svelte-1fuyezq{left:0;bottom:-1.25rem}.floorplan-plugin__rule-labels--left.svelte-1fuyezq.svelte-1fuyezq{top:0;left:-1.25rem}.floorplan-plugin__rule-labels--right.svelte-1fuyezq.svelte-1fuyezq{top:0;right:-1.25rem}.floorplan-plugin__rule-line.svelte-1fuyezq.svelte-1fuyezq{background:#fff;opacity:0.2;width:100%;height:100%}.floorplan-plugin__rule-scale-wrapper.svelte-1fuyezq.svelte-1fuyezq{position:absolute;width:0.3125rem;height:100%;left:50%;top:0;transform:translateX(-50%)}.floorplan-plugin__rule-labels.is-row.svelte-1fuyezq .floorplan-plugin__rule-scale-wrapper.svelte-1fuyezq{width:100%;height:0.3125rem;top:50%;left:0;transform:translateY(-50%)}.floorplan-plugin__rule-scale.svelte-1fuyezq.svelte-1fuyezq{position:absolute;background:#fff;opacity:0.2;width:100%;height:0.0625rem}.floorplan-plugin__rule-labels.is-row.svelte-1fuyezq .floorplan-plugin__rule-scale.svelte-1fuyezq{width:0.0625rem;height:100%}.floorplan-plugin__rule-text-wrapper.svelte-1fuyezq.svelte-1fuyezq{position:absolute}.floorplan-plugin__rule-labels--top.svelte-1fuyezq .floorplan-plugin__rule-text-wrapper.svelte-1fuyezq{width:100%;height:0;top:0.625rem}.floorplan-plugin__rule-labels--bottom.svelte-1fuyezq .floorplan-plugin__rule-text-wrapper.svelte-1fuyezq{width:100%;height:0;bottom:0.625rem}.floorplan-plugin__rule-labels--left.svelte-1fuyezq .floorplan-plugin__rule-text-wrapper.svelte-1fuyezq{width:0;height:100%;left:0.625rem}.floorplan-plugin__rule-labels--right.svelte-1fuyezq .floorplan-plugin__rule-text-wrapper.svelte-1fuyezq{width:0;height:100%;right:0.625rem}.floorplan-plugin__rule-text-item.svelte-1fuyezq.svelte-1fuyezq{width:0;height:0;position:absolute;transform:rotate(90deg)}.floorplan-plugin__rule-labels.is-row.svelte-1fuyezq .floorplan-plugin__rule-text-item.svelte-1fuyezq{transform:rotate(0)}.floorplan-plugin__rule-text.svelte-1fuyezq.svelte-1fuyezq{width:-moz-max-content;width:max-content;transform:translate(-50%, -50%);font-size:0.625rem;color:#fff;opacity:0.35}")}function of(n,t,e){const i=n.slice();return i[11]=t[e],i[13]=e,i}function rf(n,t,e){const i=n.slice();return i[14]=t[e],i}function af(n){let t;return{c(){t=U("div"),P(t,"class","floorplan-plugin__rule-scale svelte-1fuyezq"),_(t,"left",n[14].left*100+"%"),_(t,"bottom",n[14].bottom*100+"%")},m(e,i){Z(e,t,i)},p:ce,d(e){e&&X(t)}}}function lf(n,t){let e,i,s=t[1](t[11].distance)+"",o,r;return{key:n,first:null,c(){e=U("div"),i=U("div"),o=Fe(s),r=ue(),P(i,"class","floorplan-plugin__rule-text svelte-1fuyezq"),Pe(i,"is-row",t[2]),P(e,"class","floorplan-plugin__rule-text-item svelte-1fuyezq"),_(e,"left",t[11].left*100+"%"),_(e,"bottom",t[11].bottom*100+"%"),this.first=e},m(a,l){Z(a,e,l),B(e,i),B(i,o),B(e,r)},p(a,l){t=a,l&2&&s!==(s=t[1](t[11].distance)+"")&&Ne(o,s)},d(a){a&&X(e)}}}function k3(n){let t,e,i,s,o,r,a=[],l=new Map,c,h=n[3],u=[];for(let m=0;m<h.length;m+=1)u[m]=af(rf(n,h,m));let d=n[4];const p=m=>m[13];for(let m=0;m<d.length;m+=1){let g=of(n,d,m),v=p(g);l.set(v,a[m]=lf(v,g))}return{c(){t=U("div"),e=U("div"),i=ue(),s=U("div");for(let m=0;m<u.length;m+=1)u[m].c();o=ue(),r=U("div");for(let m=0;m<a.length;m+=1)a[m].c();P(e,"class","floorplan-plugin__rule-line svelte-1fuyezq"),P(s,"class","floorplan-plugin__rule-scale-wrapper svelte-1fuyezq"),Pe(s,"is-row",n[2]),P(r,"class","floorplan-plugin__rule-text-wrapper svelte-1fuyezq"),P(t,"class",c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+n[0]+" svelte-1fuyezq"),Pe(t,"is-row",n[2]),_(t,"width",n[2]?"100%":1/16+"rem"),_(t,"height",n[2]?1/16+"rem":"100%")},m(m,g){Z(m,t,g),B(t,e),B(t,i),B(t,s);for(let v=0;v<u.length;v+=1)u[v]&&u[v].m(s,null);B(t,o),B(t,r);for(let v=0;v<a.length;v+=1)a[v]&&a[v].m(r,null)},p(m,[g]){if(g&8){h=m[3];let v;for(v=0;v<h.length;v+=1){const y=rf(m,h,v);u[v]?u[v].p(y,g):(u[v]=af(y),u[v].c(),u[v].m(s,null))}for(;v<u.length;v+=1)u[v].d(1);u.length=h.length}g&22&&(d=m[4],a=ai(a,g,p,1,m,d,l,r,la,lf,null,of)),g&1&&c!==(c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+m[0]+" svelte-1fuyezq")&&P(t,"class",c),g&5&&Pe(t,"is-row",m[2])},i:ce,o:ce,d(m){m&&X(t),Ti(u,m);for(let g=0;g<a.length;g+=1)a[g].d()}}}const yo=1e3,bo=180;function x3(n,t,e){let{type:i}=t,{data:s}=t,{bounding:o}=t,{getRuleDistanceText:r}=t;const a=i==="top"||i==="bottom",l=o.max.x-o.min.x-(yo-bo)*2,c=o.max.y-o.min.y-(yo-bo)*2,h=s.map(([m,g])=>a?[m.x,g.x]:[m.y,g.y]).flat().sort().filter((m,g,v)=>g===0?!0:m!==v[g-1]),u=h.map(m=>{const g=a?(m-o.min.x-yo+bo)/l:0,v=a?0:(m-o.min.y-yo+bo)/c;return{left:g,bottom:v}});u.unshift({left:0,bottom:0}),u.push(a?{left:1,bottom:0}:{left:0,bottom:1});const d=h[h.length-1]-h[0],p=h.map((m,g,v)=>{const y=g===0?0:m-v[g-1],w=g===0?0:(m+v[g-1])/2,C=a?(w-o.min.x-yo+bo)/l:0,E=a?0:(w-o.min.y-yo+bo)/c;return{left:C,bottom:E,distance:y}}).filter(({distance:m})=>m/d>.1);return n.$$set=m=>{"type"in m&&e(0,i=m.type),"data"in m&&e(5,s=m.data),"bounding"in m&&e(6,o=m.bounding),"getRuleDistanceText"in m&&e(1,r=m.getRuleDistanceText)},[i,r,a,u,p,s,o]}class S3 extends Ee{constructor(t){super(),Ie(this,t,x3,k3,Me,{type:0,data:5,bounding:6,getRuleDistanceText:1},E3)}}function T3(n){Le(n,"svelte-1mzj9p3",".floorplan-plugin__rule-labels-wrapper.svelte-1mzj9p3{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}")}function cf(n,t,e){const i=n.slice();return i[13]=t[e][0],i[14]=t[e][1],i}function hf(n,t){let e,i,s;const o=[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}];let r={};for(let a=0;a<o.length;a+=1)r=pt(r,o[a]);return i=new S3({props:r}),{key:n,first:null,c(){e=Be(),ge(i.$$.fragment),this.first=e},m(a,l){Z(a,e,l),pe(i,a,l),s=!0},p(a,l){t=a;const c=l&19?yt(o,[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}]):{};i.$set(c)},i(a){s||(H(i.$$.fragment,a),s=!0)},o(a){Y(i.$$.fragment,a),s=!1},d(a){a&&X(e),me(i,a)}}}function D3(n){let t,e=[],i=new Map,s,o=n[4];const r=a=>a[13];for(let a=0;a<o.length;a+=1){let l=cf(n,o,a),c=r(l);i.set(c,e[a]=hf(c,l))}return{c(){t=U("div");for(let a=0;a<e.length;a+=1)e[a].c();P(t,"class","floorplan-plugin__rule-labels-wrapper svelte-1mzj9p3"),_(t,"width",n[3]),_(t,"height",n[2])},m(a,l){Z(a,t,l);for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(t,null);s=!0},p(a,[l]){l&19&&(o=a[4],xe(),e=ai(e,l,r,1,a,o,i,t,fn,hf,null,cf),Se()),l&8&&_(t,"width",a[3]),l&4&&_(t,"height",a[2])},i(a){if(!s){for(let l=0;l<o.length;l+=1)H(e[l]);s=!0}},o(a){for(let l=0;l<e.length;l+=1)Y(e[l]);s=!1},d(a){a&&X(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}const uf=1e3,df=180;function L3(n,t,e){let i,s,o,r,a,l,c,h,u,d,{floorIndex:p}=t,{floorplanData:m}=t,{getRuleDistanceText:g}=t;return n.$$set=v=>{"floorIndex"in v&&e(5,p=v.floorIndex),"floorplanData"in v&&e(6,m=v.floorplanData),"getRuleDistanceText"in v&&e(0,g=v.getRuleDistanceText)},n.$$.update=()=>{n.$$.dirty&64&&e(1,i=m.bounding),n.$$.dirty&96&&e(11,s=m.floorDatas[p].rules),n.$$.dirty&2048&&e(12,o=Object.keys(s)),n.$$.dirty&6144&&e(4,r=o.map(v=>[v,s[v]])),n.$$.dirty&2&&e(9,a=i.max.x-i.min.x),n.$$.dirty&2&&e(7,l=i.max.y-i.min.y),n.$$.dirty&2&&e(10,c=i.max.x-i.min.x-(uf-df)*2),n.$$.dirty&2&&e(8,h=i.max.y-i.min.y-(uf-df)*2),n.$$.dirty&1536&&e(3,u=c/a*100+"%"),n.$$.dirty&384&&e(2,d=h/l*100+"%")},[g,i,d,u,r,p,m,l,h,a,c,s,o]}class z3 extends Ee{constructor(t){super(),Ie(this,t,L3,D3,Me,{floorIndex:5,floorplanData:6,getRuleDistanceText:0},T3)}}function ss(n,t={}){let e="";const{needZ:i,needA:s}=t;return(i?n.slice().concat(n[0]):n.slice()).forEach((r,a)=>{const{x:l,y:c}=t.format?t.format(r):r,h=l+","+c;return a===0?(e+="M"+h,e):s!=null&&s[a]?(e+="A"+s[a]+","+h,e):(e+="L"+h,e)}),e+(i?"Z":"")}function s1({x:n,y:t},e){const{max:i,min:s}=e;return{x:n-s.x,y:i.y-t}}function O3(n,t){const e=n.x*1e3+t.bounding.origin.x,i=-n.z*1e3+t.bounding.origin.y;return{x:e,y:i}}function j3(n,t){const e=t.bounding,i=e.max.x-e.min.x,s=e.max.y-e.min.y;return{x:(n.x-e.min.x)/i,y:(e.max.y-n.y)/s}}function R3(n,t){return Math.max(...t.work.observers.map(i=>n.z>=i.standingPosition.z?i.floorIndex:0))}function _3(n){let t;return{c(){t=Te("path"),P(t,"d",n[0]),P(t,"fill","#2F313A")},m(e,i){Z(e,t,i)},p(e,[i]){i&1&&P(t,"d",e[0])},i:ce,o:ce,d(e){e&&X(t)}}}function V3(n,t,e){let i,{path:s}=t;return n.$$set=o=>{"path"in o&&e(1,s=o.path)},n.$$.update=()=>{n.$$.dirty&2&&e(0,i=ss(s,{needZ:!0}))},[i,s]}class F3 extends Ee{constructor(t){super(),Ie(this,t,V3,_3,Me,{path:1})}}function B3(n){let t,e,i,s,o,r;return{c(){t=Te("defs"),e=Te("pattern"),i=Te("rect"),s=Te("path"),o=ue(),r=Te("path"),P(i,"x","0"),P(i,"y","0"),P(i,"width",n[1]),P(i,"height",n[1]),P(i,"fill","#323747"),P(s,"d",n[2]),P(s,"stroke","#ffffff"),P(s,"stroke-opacity","0.06"),P(s,"stroke-width","0.5"),P(s,"fill","none"),P(e,"id","fpm-room-pattern-0"),P(e,"x","0"),P(e,"y","0"),P(e,"width",n[1]),P(e,"height",n[1]),P(e,"patternUnits","userSpaceOnUse"),P(e,"patternTransform","scale(50 50)"),P(r,"d",n[0]),P(r,"fill","url(#fpm-room-pattern-0)")},m(a,l){Z(a,t,l),B(t,e),B(e,i),B(e,s),Z(a,o,l),Z(a,r,l)},p(a,[l]){l&1&&P(r,"d",a[0])},i:ce,o:ce,d(a){a&&X(t),a&&X(o),a&&X(r)}}}const Ac=6;function H3(n,t,e){let i,{path:s}=t;const o=Ac*2,r=`M0 ${Ac} h ${o} M${Ac} 0 v ${o}`;return n.$$set=a=>{"path"in a&&e(3,s=a.path)},n.$$.update=()=>{n.$$.dirty&8&&e(0,i=ss(s,{needZ:!0}))},[i,o,r,s]}class N3 extends Ee{constructor(t){super(),Ie(this,t,H3,B3,Me,{path:3})}}function G3(n){let t,e,i,s,o,r,a,l,c,h,u;return{c(){t=Te("defs"),e=Te("pattern"),i=Te("rect"),s=Te("pattern"),o=Te("rect"),r=ue(),a=Te("path"),l=ue(),c=Te("path"),h=ue(),u=Te("path"),P(i,"x","0"),P(i,"y","0"),P(i,"width","6"),P(i,"height","50"),P(i,"fill","none"),P(i,"stroke","#4B4B57"),P(i,"stroke-width","0.5"),P(e,"id","room-material-pattern-1"),P(e,"x","0"),P(e,"y","0"),P(e,"width","12"),P(e,"height","50"),P(e,"patternUnits","userSpaceOnUse"),P(e,"patternTransform","scale(50 50)"),P(o,"x","0"),P(o,"y","0"),P(o,"width","6"),P(o,"height","50"),P(o,"fill","none"),P(o,"stroke","#4B4B57"),P(o,"stroke-width","0.5"),P(s,"id","room-material-pattern-2"),P(s,"x","6"),P(s,"y","25"),P(s,"width","12"),P(s,"height","50"),P(s,"patternUnits","userSpaceOnUse"),P(s,"patternTransform","scale(50 50)"),P(a,"d",n[0]),P(a,"fill","#43434D"),P(c,"d",n[0]),P(c,"fill","url(#room-material-pattern-1)"),P(u,"d",n[0]),P(u,"fill","url(#room-material-pattern-2)")},m(d,p){Z(d,t,p),B(t,e),B(e,i),B(t,s),B(s,o),Z(d,r,p),Z(d,a,p),Z(d,l,p),Z(d,c,p),Z(d,h,p),Z(d,u,p)},p(d,[p]){p&1&&P(a,"d",d[0]),p&1&&P(c,"d",d[0]),p&1&&P(u,"d",d[0])},i:ce,o:ce,d(d){d&&X(t),d&&X(r),d&&X(a),d&&X(l),d&&X(c),d&&X(h),d&&X(u)}}}function W3(n,t,e){let i,{path:s}=t;return n.$$set=o=>{"path"in o&&e(1,s=o.path)},n.$$.update=()=>{n.$$.dirty&2&&e(0,i=ss(s,{needZ:!0}))},[i,s]}class U3 extends Ee{constructor(t){super(),Ie(this,t,W3,G3,Me,{path:1})}}function Q3(n){let t;return{c(){t=Te("path"),P(t,"d",n[0]),P(t,"fill","#969696"),P(t,"stroke","#969696"),P(t,"stroke-width","1"),P(t,"fill-rule","evenodd")},m(e,i){Z(e,t,i)},p:ce,i:ce,o:ce,d(e){e&&X(t)}}}function X3(n,t,e){let{dimension:i}=t;const s=ss([{x:i.vertical[1].x,y:i.vertical[1].y+53},{x:i.vertical[1].x-60,y:i.vertical[1].y+124},{x:i.vertical[1].x+60,y:i.vertical[1].y+124}],{needZ:!0}),o=ss([{x:i.vertical[0].x,y:i.vertical[0].y-53},{x:i.vertical[0].x-60,y:i.vertical[0].y-124},{x:i.vertical[0].x+60,y:i.vertical[0].y-124}],{needZ:!0}),r=ss([{x:i.horizontal[0].x+53,y:i.horizontal[0].y},{x:i.horizontal[0].x+124,y:i.horizontal[0].y+60},{x:i.horizontal[0].x+124,y:i.horizontal[0].y-60}],{needZ:!0}),a=ss([{x:i.horizontal[1].x-53,y:i.horizontal[1].y},{x:i.horizontal[1].x-124,y:i.horizontal[1].y+60},{x:i.horizontal[1].x-124,y:i.horizontal[1].y-60}],{needZ:!0}),l=`${s} ${o} ${r} ${a}`;return n.$$set=c=>{"dimension"in c&&e(1,i=c.dimension)},[l,i]}class Y3 extends Ee{constructor(t){super(),Ie(this,t,X3,Q3,Me,{dimension:1})}}function Z3(n){Le(n,"svelte-1dykexu",".floorplan-plugin__room-material.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%}svg.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible}")}function ff(n,t,e){const i=n.slice();return i[8]=t[e],i}function q3(n){let t,e;return t=new N3({props:{path:n[8].path}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.path=i[8].path),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function J3(n){let t,e;return t=new U3({props:{path:n[8].path}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.path=i[8].path),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function K3(n){let t,e;return t=new F3({props:{path:n[8].path}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.path=i[8].path),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function pf(n){let t,e,i;return e=new Y3({props:{dimension:n[8].dimension}}),{c(){t=Te("svg"),ge(e.$$.fragment),P(t,"width","100%"),P(t,"height","100%"),P(t,"viewBox",`0 0 ${n[1]} ${n[2]}`),P(t,"class","svelte-1dykexu")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,o){const r={};o&1&&(r.dimension=s[8].dimension),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function mf(n){let t,e,i,s,o=n[3]&&n[8].dimension&&Array.isArray(n[8].dimension.vertical)&&n[8].dimension.vertical.length>0&&Array.isArray(n[8].dimension.horizontal)&&n[8].dimension.horizontal.length>0,r,a;const l=[K3,J3,q3],c=[];function h(d,p){return d[8].floorType===1?0:d[8].floorType===0?1:2}e=h(n),i=c[e]=l[e](n);let u=o&&pf(n);return{c(){t=Te("svg"),i.c(),s=ue(),u&&u.c(),r=Be(),P(t,"width","100%"),P(t,"height","100%"),P(t,"viewBox",`0 0 ${n[1]} ${n[2]}`),P(t,"class","svelte-1dykexu")},m(d,p){Z(d,t,p),c[e].m(t,null),Z(d,s,p),u&&u.m(d,p),Z(d,r,p),a=!0},p(d,p){let m=e;e=h(d),e===m?c[e].p(d,p):(xe(),Y(c[m],1,1,()=>{c[m]=null}),Se(),i=c[e],i?i.p(d,p):(i=c[e]=l[e](d),i.c()),H(i,1),i.m(t,null)),p&1&&(o=d[3]&&d[8].dimension&&Array.isArray(d[8].dimension.vertical)&&d[8].dimension.vertical.length>0&&Array.isArray(d[8].dimension.horizontal)&&d[8].dimension.horizontal.length>0),o?u?(u.p(d,p),p&1&&H(u,1)):(u=pf(d),u.c(),H(u,1),u.m(r.parentNode,r)):u&&(xe(),Y(u,1,1,()=>{u=null}),Se())},i(d){a||(H(i),H(u),a=!0)},o(d){Y(i),Y(u),a=!1},d(d){d&&X(t),c[e].d(),d&&X(s),u&&u.d(d),d&&X(r)}}}function $3(n){let t,e,i=n[0],s=[];for(let r=0;r<i.length;r+=1)s[r]=mf(ff(n,i,r));const o=r=>Y(s[r],1,1,()=>{s[r]=null});return{c(){t=U("div");for(let r=0;r<s.length;r+=1)s[r].c();P(t,"class","floorplan-plugin__room-material svelte-1dykexu")},m(r,a){Z(r,t,a);for(let l=0;l<s.length;l+=1)s[l]&&s[l].m(t,null);e=!0},p(r,[a]){if(a&15){i=r[0];let l;for(l=0;l<i.length;l+=1){const c=ff(r,i,l);s[l]?(s[l].p(c,a),H(s[l],1)):(s[l]=mf(c),s[l].c(),H(s[l],1),s[l].m(t,null))}for(xe(),l=i.length;l<s.length;l+=1)o(l);Se()}},i(r){if(!e){for(let a=0;a<i.length;a+=1)H(s[a]);e=!0}},o(r){s=s.filter(Boolean);for(let a=0;a<s.length;a+=1)Y(s[a]);e=!1},d(r){r&&X(t),Ti(s,r)}}}function eP(n,t,e){let i,{roomLabelsEnable:s}=t,{roomDimensionEnable:o}=t,{floorIndex:r}=t,{floorplanData:a}=t;const l=a.bounding.max.x-a.bounding.min.x,c=a.bounding.max.y-a.bounding.min.y,h=s&&o;return n.$$set=u=>{"roomLabelsEnable"in u&&e(4,s=u.roomLabelsEnable),"roomDimensionEnable"in u&&e(5,o=u.roomDimensionEnable),"floorIndex"in u&&e(6,r=u.floorIndex),"floorplanData"in u&&e(7,a=u.floorplanData)},n.$$.update=()=>{n.$$.dirty&192&&e(0,i=a.floorDatas[r].rooms.map(u=>de(V({},u),{path:u.path.map(d=>s1(d,a.bounding))})))},[i,l,c,h,s,o,r,a]}class tP extends Ee{constructor(t){super(),Ie(this,t,eP,$3,Me,{roomLabelsEnable:4,roomDimensionEnable:5,floorIndex:6,floorplanData:7},Z3)}}function iP(n){Le(n,"svelte-qq2273","path.svelte-qq2273{--opacity:0;opacity:var(--opacity)}path.svelte-qq2273:hover{opacity:calc(var(--opacity) + 0.1)}")}function nP(n){let t,e,i,s;return{c(){t=Te("path"),P(t,"d",n[5]),P(t,"fill","#fff"),P(t,"style",n[2]),P(t,"id",e=`${n[1]}_${n[0].id}`),P(t,"class","svelte-qq2273")},m(o,r){Z(o,t,r),i||(s=[_e(t,"mouseenter",n[3]),_e(t,"mouseleave",n[4])],i=!0)},p(o,[r]){r&4&&P(t,"style",o[2]),r&3&&e!==(e=`${o[1]}_${o[0].id}`)&&P(t,"id",e)},i:ce,o:ce,d(o){o&&X(t),i=!1,dt(s)}}}function sP(n,t,e){let i,s,{room:o}=t,{floorIndex:r}=t,{floorplanData:a}=t,{highlightData:l}=t,{hoveredRoom:c}=t;function h(){c==null||c.set(o)}function u(){c==null||c.set(void 0)}const{bounding:d}=a,p=ss(o.path,{needZ:!0,format:m=>s1(m,d)});return n.$$set=m=>{"room"in m&&e(0,o=m.room),"floorIndex"in m&&e(1,r=m.floorIndex),"floorplanData"in m&&e(6,a=m.floorplanData),"highlightData"in m&&e(7,l=m.highlightData),"hoveredRoom"in m&&e(8,c=m.hoveredRoom)},n.$$.update=()=>{n.$$.dirty&131&&e(9,i=l[`${r}_${o.id}`]),n.$$.dirty&512&&e(2,s=i?`fill: ${i.color}; --opacity: ${i.opacity}; pointer-events: ${i.disabled?"none":"auto"}`:null)},[o,r,s,h,u,p,a,l,c,i]}class oP extends Ee{constructor(t){super(),Ie(this,t,sP,nP,Me,{room:0,floorIndex:1,floorplanData:6,highlightData:7,hoveredRoom:8},iP)}}function rP(n){Le(n,"svelte-1kqo6e4",".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}")}function gf(n,t,e){const i=n.slice();return i[6]=t[e],i}function vf(n,t){let e,i,s;const o=[{room:t[6],floorplanData:t[1],hoveredRoom:t[3],floorIndex:t[0],highlightData:t[2]}];let r={};for(let a=0;a<o.length;a+=1)r=pt(r,o[a]);return i=new oP({props:r}),{key:n,first:null,c(){e=Be(),ge(i.$$.fragment),this.first=e},m(a,l){Z(a,e,l),pe(i,a,l),s=!0},p(a,l){t=a;const c=l&15?yt(o,[{room:t[6],floorplanData:t[1],hoveredRoom:t[3],floorIndex:t[0],highlightData:t[2]}]):{};i.$set(c)},i(a){s||(H(i.$$.fragment,a),s=!0)},o(a){Y(i.$$.fragment,a),s=!1},d(a){a&&X(e),me(i,a)}}}function aP(n){let t,e,i=[],s=new Map,o,r=n[1].floorDatas[n[0]].rooms;const a=l=>l[6].id;for(let l=0;l<r.length;l+=1){let c=gf(n,r,l),h=a(c);s.set(h,i[l]=vf(h,c))}return{c(){t=U("div"),e=Te("svg");for(let l=0;l<i.length;l+=1)i[l].c();P(e,"width","100%"),P(e,"height","100%"),P(e,"viewBox",`0 0 ${n[4]} ${n[5]}`),P(e,"class","svelte-1kqo6e4"),P(t,"class","floorplan-plugin__room-highlight svelte-1kqo6e4")},m(l,c){Z(l,t,c),B(t,e);for(let h=0;h<i.length;h+=1)i[h]&&i[h].m(e,null);o=!0},p(l,[c]){c&15&&(r=l[1].floorDatas[l[0]].rooms,xe(),i=ai(i,c,a,1,l,r,s,e,fn,vf,null,gf),Se())},i(l){if(!o){for(let c=0;c<r.length;c+=1)H(i[c]);o=!0}},o(l){for(let c=0;c<i.length;c+=1)Y(i[c]);o=!1},d(l){l&&X(t);for(let c=0;c<i.length;c+=1)i[c].d()}}}function lP(n,t,e){let{floorIndex:i}=t,{floorplanData:s}=t,{highlightData:o}=t,{hoveredRoom:r}=t;const a=s.bounding.max.x-s.bounding.min.x,l=s.bounding.max.y-s.bounding.min.y;return n.$$set=c=>{"floorIndex"in c&&e(0,i=c.floorIndex),"floorplanData"in c&&e(1,s=c.floorplanData),"highlightData"in c&&e(2,o=c.highlightData),"hoveredRoom"in c&&e(3,r=c.hoveredRoom)},[i,s,o,r,a,l]}class Tu extends Ee{constructor(t){super(),Ie(this,t,lP,aP,Me,{floorIndex:0,floorplanData:1,highlightData:2,hoveredRoom:3},rP)}}function cP(n){Le(n,"svelte-3vzs9z",".missing-floor.svelte-3vzs9z{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);display:flex;flex-direction:column;align-items:center}.text.svelte-3vzs9z{margin-top:0.75rem;color:#fff;opacity:0.3;white-space:nowrap}")}function yf(n){let t,e=n[0].text+"",i;return{c(){t=U("span"),i=Fe(e),P(t,"class","text svelte-3vzs9z"),_(t,"font-size",n[0].textFontSize+"px")},m(s,o){Z(s,t,o),B(t,i)},p(s,o){o&1&&e!==(e=s[0].text+"")&&Ne(i,e),o&1&&_(t,"font-size",s[0].textFontSize+"px")},d(s){s&&X(t)}}}function hP(n){let t,e,i,s,o=n[0].text&&yf(n);return{c(){t=U("div"),e=U("img"),s=ue(),o&&o.c(),P(e,"class","image"),P(e,"alt","缺省楼层展位图"),at(e.src,i=n[0].imageURL)||P(e,"src",i),_(e,"width",n[0].imageWidth+"px"),_(e,"height",n[0].imageHeight+"px"),_(e,"max-width","none"),P(t,"class","missing-floor svelte-3vzs9z")},m(r,a){Z(r,t,a),B(t,e),B(t,s),o&&o.m(t,null)},p(r,[a]){a&1&&!at(e.src,i=r[0].imageURL)&&P(e,"src",i),a&1&&_(e,"width",r[0].imageWidth+"px"),a&1&&_(e,"height",r[0].imageHeight+"px"),r[0].text?o?o.p(r,a):(o=yf(r),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},i:ce,o:ce,d(r){r&&X(t),o&&o.d()}}}function uP(n,t,e){let{missingFloorConfig:i}=t;return n.$$set=s=>{"missingFloorConfig"in s&&e(0,i=s.missingFloorConfig)},[i]}class o1 extends Ee{constructor(t){super(),Ie(this,t,uP,hP,Me,{missingFloorConfig:0},cP)}}const hn="data:image/png;base64,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",hh="data:image/png;base64,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";function di(n){return n*180/Math.PI}function dP(n){Le(n,"svelte-17hhq1b",".floorplan__camera-position.svelte-17hhq1b{pointer-events:none;position:absolute;width:0;height:0}.floorplan__camera-rotate.svelte-17hhq1b{position:absolute;background-repeat:no-repeat;background-size:100%}")}function fP(n){let t,e;return{c(){t=U("div"),e=U("div"),P(e,"class","floorplan__camera-rotate svelte-17hhq1b"),_(e,"background-image",`url(${n[0]||hn})`),_(e,"width",n[4]),_(e,"height",n[4]),_(e,"left","-"+n[4]),_(e,"top","-"+n[4]),_(e,"transform",`rotate(${n[3]}deg)`),_(e,"transform-origin",`${n[4]} ${n[4]}`),P(t,"class","floorplan__camera-position svelte-17hhq1b"),_(t,"left",n[1]),_(t,"top",n[2])},m(i,s){Z(i,t,s),B(t,e)},p(i,[s]){s&1&&_(e,"background-image",`url(${i[0]||hn})`);const o=s&1;o&&_(e,"width",i[4]),o&&_(e,"height",i[4]),o&&_(e,"left","-"+i[4]),o&&_(e,"top","-"+i[4]),o&&_(e,"transform",`rotate(${i[3]}deg)`),o&&_(e,"transform-origin",`${i[4]} ${i[4]}`)},i:ce,o:ce,d(i){i&&X(t)}}}function pP(n,t,e){let{panoIndex:i}=t,{floorplanData:s}=t,{lastPanoramaLongitude:o}=t,{cameraImageUrl:r}=t;const{observers:a}=s,l=a[i],c=l.positionInImage.x,h=l.positionInImage.y,u=c*100+"%",d=h*100+"%",p=-di(o)+45,m=document.body.clientWidth,g=document.body.clientHeight,y=`${(m<500||g<500?17:37)/16}rem`;return n.$$set=w=>{"panoIndex"in w&&e(5,i=w.panoIndex),"floorplanData"in w&&e(6,s=w.floorplanData),"lastPanoramaLongitude"in w&&e(7,o=w.lastPanoramaLongitude),"cameraImageUrl"in w&&e(0,r=w.cameraImageUrl)},[r,u,d,p,y,i,s,o]}let mP=class extends Ee{constructor(t){super(),Ie(this,t,pP,fP,Me,{panoIndex:5,floorplanData:6,lastPanoramaLongitude:7,cameraImageUrl:0},dP)}};const r1="data:image/png;base64,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";function gP(n){Le(n,"svelte-rpkaro",".floorplan-plugin__compass.svelte-rpkaro{position:absolute;left:50%;top:-2.875rem;width:14.4375rem;height:2.5625rem;will-change:opacity;transform-origin:center 11.5rem}.floorplan-plugin__compass-image.svelte-rpkaro{width:100%;height:100%;position:absolute;left:0;top:0;opacity:0.1;background-repeat:no-repeat;background-size:100% 100%}.floorplan-plugin__compass-text.svelte-rpkaro{position:absolute;left:50%;top:0.9375rem;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:0.625rem;color:#fff}")}function vP(n){let t,e,i,s,o;return{c(){t=U("div"),e=U("div"),i=ue(),s=U("span"),o=Fe(n[0]),P(e,"class","floorplan-plugin__compass-image svelte-rpkaro"),_(e,"background-image",`url(${r1})`),P(s,"class","floorplan-plugin__compass-text svelte-rpkaro"),P(t,"class","floorplan-plugin__compass svelte-rpkaro"),_(t,"transform",n[2])},m(r,a){Z(r,t,a),B(t,e),B(t,i),B(t,s),B(s,o)},p(r,a){a&1&&Ne(o,r[0])},d(r){r&&X(t)}}}function yP(n){let t,e=n[1]&&vP(n);return{c(){e&&e.c(),t=Be()},m(i,s){e&&e.m(i,s),Z(i,t,s)},p(i,[s]){i[1]&&e.p(i,s)},i:ce,o:ce,d(i){e&&e.d(i),i&&X(t)}}}function bP(n,t,e){var c;let{floorplanData:i}=t,{northDesc:s}=t;const o=(c=i.entrance)==null?void 0:c.northRad,r=typeof o=="number",l=`translateX(-50%) translateZ(10px) rotate(${-(o?di(o):0)+90}deg)`;return n.$$set=h=>{"floorplanData"in h&&e(3,i=h.floorplanData),"northDesc"in h&&e(0,s=h.northDesc)},[s,r,l,i]}class AP extends Ee{constructor(t){super(),Ie(this,t,bP,yP,Me,{floorplanData:3,northDesc:0},gP)}}function wP(n){Le(n,"svelte-bl8zrz",".floorplan-plugin__floor.svelte-bl8zrz{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;pointer-events:none}.floorplan-plugin__floor--is-current.svelte-bl8zrz{opacity:1;pointer-events:auto}")}function PP(n){let t,e,i,s,o,r,a,l,c,h,u,d;const p=[{floorIndex:n[2],floorplanData:n[12],roomLabelsEnable:n[6],roomDimensionEnable:n[10]}];let m={};for(let z=0;z<p.length;z+=1)m=pt(m,p[z]);t=new tP({props:m});let g=(n[3]||n[5])&&bf(n);const v=[{floorplanData:n[12],floorIndex:n[2]}];let y={};for(let z=0;z<v.length;z+=1)y=pt(y,v[z]);s=new Su({props:y});const w=[{floorplanData:n[12],floorIndex:n[2]}];let C={};for(let z=0;z<w.length;z+=1)C=pt(C,w[z]);r=new p3({props:C});let E=n[6]&&Af(n),D=n[11]&&wf(n),L=n[4]&&Pf(n),R=n[23]&&Cf(n);return{c(){ge(t.$$.fragment),e=ue(),g&&g.c(),i=ue(),ge(s.$$.fragment),o=ue(),ge(r.$$.fragment),a=ue(),E&&E.c(),l=ue(),D&&D.c(),c=ue(),L&&L.c(),h=ue(),R&&R.c(),u=Be()},m(z,O){pe(t,z,O),Z(z,e,O),g&&g.m(z,O),Z(z,i,O),pe(s,z,O),Z(z,o,O),pe(r,z,O),Z(z,a,O),E&&E.m(z,O),Z(z,l,O),D&&D.m(z,O),Z(z,c,O),L&&L.m(z,O),Z(z,h,O),R&&R.m(z,O),Z(z,u,O),d=!0},p(z,O){const A=O&5188?yt(p,[{floorIndex:z[2],floorplanData:z[12],roomLabelsEnable:z[6],roomDimensionEnable:z[10]}]):{};t.$set(A),z[3]||z[5]?g?(g.p(z,O),O&40&&H(g,1)):(g=bf(z),g.c(),H(g,1),g.m(i.parentNode,i)):g&&(xe(),Y(g,1,1,()=>{g=null}),Se());const M=O&4100?yt(v,[{floorplanData:z[12],floorIndex:z[2]}]):{};s.$set(M);const I=O&4100?yt(w,[{floorplanData:z[12],floorIndex:z[2]}]):{};r.$set(I),z[6]?E?(E.p(z,O),O&64&&H(E,1)):(E=Af(z),E.c(),H(E,1),E.m(l.parentNode,l)):E&&(xe(),Y(E,1,1,()=>{E=null}),Se()),z[11]?D?(D.p(z,O),O&2048&&H(D,1)):(D=wf(z),D.c(),H(D,1),D.m(c.parentNode,c)):D&&(xe(),Y(D,1,1,()=>{D=null}),Se()),z[4]?L?(L.p(z,O),O&16&&H(L,1)):(L=Pf(z),L.c(),H(L,1),L.m(h.parentNode,h)):L&&(xe(),Y(L,1,1,()=>{L=null}),Se()),z[23]?R?(R.p(z,O),O&8388608&&H(R,1)):(R=Cf(z),R.c(),H(R,1),R.m(u.parentNode,u)):R&&(xe(),Y(R,1,1,()=>{R=null}),Se())},i(z){d||(H(t.$$.fragment,z),H(g),H(s.$$.fragment,z),H(r.$$.fragment,z),H(E),H(D),H(L),H(R),d=!0)},o(z){Y(t.$$.fragment,z),Y(g),Y(s.$$.fragment,z),Y(r.$$.fragment,z),Y(E),Y(D),Y(L),Y(R),d=!1},d(z){me(t,z),z&&X(e),g&&g.d(z),z&&X(i),me(s,z),z&&X(o),me(r,z),z&&X(a),E&&E.d(z),z&&X(l),D&&D.d(z),z&&X(c),L&&L.d(z),z&&X(h),R&&R.d(z),z&&X(u)}}}function CP(n){let t,e;return t=new o1({props:{missingFloorConfig:n[19]}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&524288&&(o.missingFloorConfig=i[19]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function bf(n){let t,e;const i=[{floorIndex:n[2],floorplanData:n[12],hoveredRoom:n[25],highlightData:n[18]}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new Tu({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r&33820676?yt(i,[{floorIndex:o[2],floorplanData:o[12],hoveredRoom:o[25],highlightData:o[18]}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function Af(n){let t,e;const i=[{floorplanData:n[12],roomAreaEnable:n[7],roomNameEnable:n[8],roomNameOtherTypeEnable:n[9],roomDimensionEnable:n[10],floorIndex:n[2],getRoomAreaText:n[13],getRoomDimensionText:n[14],getLabelElement:n[15],hoveredRoom:n[25],adaptiveRoomLabelVisibleEnable:n[17]}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new I3({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r&33748868?yt(i,[{floorplanData:o[12],roomAreaEnable:o[7],roomNameEnable:o[8],roomNameOtherTypeEnable:o[9],roomDimensionEnable:o[10],floorIndex:o[2],getRoomAreaText:o[13],getRoomDimensionText:o[14],getLabelElement:o[15],hoveredRoom:o[25],adaptiveRoomLabelVisibleEnable:o[17]}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function wf(n){let t,e;const i=[{floorplanData:n[12],floorIndex:n[2],getRuleDistanceText:n[16]}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new z3({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r&69636?yt(i,[{floorplanData:o[12],floorIndex:o[2],getRuleDistanceText:o[16]}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function Pf(n){let t,e;const i=[{panoIndex:n[0],floorplanData:n[12],lastPanoramaLongitude:n[20],cameraImageUrl:n[21]}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new mP({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r&3149825?yt(i,[{panoIndex:o[0],floorplanData:o[12],lastPanoramaLongitude:o[20],cameraImageUrl:o[21]}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function Cf(n){let t,e;return t=new AP({props:{floorplanData:n[12],northDesc:n[22]}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&4096&&(o.floorplanData=i[12]),s&4194304&&(o.northDesc=i[22]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function MP(n){let t,e,i,s,o;const r=[CP,PP],a=[];function l(c,h){return c[24]?1:0}return e=l(n),i=a[e]=r[e](n),{c(){t=U("div"),i.c(),P(t,"class",s=Mt(`floorplan-plugin__floor${n[1]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz")},m(c,h){Z(c,t,h),a[e].m(t,null),o=!0},p(c,[h]){let u=e;e=l(c),e===u?a[e].p(c,h):(xe(),Y(a[u],1,1,()=>{a[u]=null}),Se(),i=a[e],i?i.p(c,h):(i=a[e]=r[e](c),i.c()),H(i,1),i.m(t,null)),(!o||h&2&&s!==(s=Mt(`floorplan-plugin__floor${c[1]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz"))&&P(t,"class",s)},i(c){o||(H(i),o=!0)},o(c){Y(i),o=!1},d(c){c&&X(t),a[e].d()}}}function IP(n,t,e){let i,s,{panoIndex:o}=t,{isCurrent:r}=t,{floorIndex:a}=t,{highlightEnable:l}=t,{cameraEnable:c}=t,{hoverEnable:h}=t,{roomLabelsEnable:u}=t,{roomAreaEnable:d}=t,{roomNameEnable:p}=t,{roomNameOtherTypeEnable:m}=t,{roomDimensionEnable:g}=t,{ruleLabelsEnable:v}=t,{floorplanData:y}=t,{getRoomAreaText:w}=t,{getRoomDimensionText:C}=t,{getLabelElement:E}=t,{getRuleDistanceText:D}=t,{adaptiveRoomLabelVisibleEnable:L}=t,{highlightData:R}=t,{missingFloorConfig:z}=t,{lastPanoramaLongitude:O}=t,{cameraImageUrl:A}=t,{northDesc:M}=t,{compassEnable:I}=t,{store:k=void 0}=t;const x=xu(void 0);return x.subscribe(S=>{k&&e(26,k.roomOnMouse=S,k)}),n.$$set=S=>{"panoIndex"in S&&e(0,o=S.panoIndex),"isCurrent"in S&&e(1,r=S.isCurrent),"floorIndex"in S&&e(2,a=S.floorIndex),"highlightEnable"in S&&e(3,l=S.highlightEnable),"cameraEnable"in S&&e(4,c=S.cameraEnable),"hoverEnable"in S&&e(5,h=S.hoverEnable),"roomLabelsEnable"in S&&e(6,u=S.roomLabelsEnable),"roomAreaEnable"in S&&e(7,d=S.roomAreaEnable),"roomNameEnable"in S&&e(8,p=S.roomNameEnable),"roomNameOtherTypeEnable"in S&&e(9,m=S.roomNameOtherTypeEnable),"roomDimensionEnable"in S&&e(10,g=S.roomDimensionEnable),"ruleLabelsEnable"in S&&e(11,v=S.ruleLabelsEnable),"floorplanData"in S&&e(12,y=S.floorplanData),"getRoomAreaText"in S&&e(13,w=S.getRoomAreaText),"getRoomDimensionText"in S&&e(14,C=S.getRoomDimensionText),"getLabelElement"in S&&e(15,E=S.getLabelElement),"getRuleDistanceText"in S&&e(16,D=S.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in S&&e(17,L=S.adaptiveRoomLabelVisibleEnable),"highlightData"in S&&e(18,R=S.highlightData),"missingFloorConfig"in S&&e(19,z=S.missingFloorConfig),"lastPanoramaLongitude"in S&&e(20,O=S.lastPanoramaLongitude),"cameraImageUrl"in S&&e(21,A=S.cameraImageUrl),"northDesc"in S&&e(22,M=S.northDesc),"compassEnable"in S&&e(23,I=S.compassEnable),"store"in S&&e(26,k=S.store)},n.$$.update=()=>{n.$$.dirty&4100&&e(27,i=y.floorDatas[a]),n.$$.dirty&134217728&&e(24,s=i.rooms.length>0||i.is_has_wall)},[o,r,a,l,c,h,u,d,p,m,g,v,y,w,C,E,D,L,R,z,O,A,M,I,s,x,k,i]}let EP=class extends Ee{constructor(t){super(),Ie(this,t,IP,MP,Me,{panoIndex:0,isCurrent:1,floorIndex:2,highlightEnable:3,cameraEnable:4,hoverEnable:5,roomLabelsEnable:6,roomAreaEnable:7,roomNameEnable:8,roomNameOtherTypeEnable:9,roomDimensionEnable:10,ruleLabelsEnable:11,floorplanData:12,getRoomAreaText:13,getRoomDimensionText:14,getLabelElement:15,getRuleDistanceText:16,adaptiveRoomLabelVisibleEnable:17,highlightData:18,missingFloorConfig:19,lastPanoramaLongitude:20,cameraImageUrl:21,northDesc:22,compassEnable:23,store:26},wP)}};function kP(n){Le(n,"svelte-86bqav",".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}")}function Mf(n,t,e){const i=n.slice();return i[26]=t[e],i}function If(n){let t,e,i,s=n[15].floorDatas,o=[];for(let a=0;a<s.length;a+=1)o[a]=Ef(Mf(n,s,a));const r=a=>Y(o[a],1,1,()=>{o[a]=null});return{c(){t=U("div");for(let a=0;a<o.length;a+=1)o[a].c();P(t,"class","floorplan-main svelte-86bqav")},m(a,l){Z(a,t,l);for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(t,null);i=!0},p(a,l){if(n=a,l&67108860){s=n[15].floorDatas;let c;for(c=0;c<s.length;c+=1){const h=Mf(n,s,c);o[c]?(o[c].p(h,l),H(o[c],1)):(o[c]=Ef(h),o[c].c(),H(o[c],1),o[c].m(t,null))}for(xe(),c=s.length;c<o.length;c+=1)r(c);Se()}},i(a){if(!i){for(let l=0;l<s.length;l+=1)H(o[l]);e||At(()=>{e=vs(t,Ht,{duration:n[0],easing:Rn}),e.start()}),i=!0}},o(a){o=o.filter(Boolean);for(let l=0;l<o.length;l+=1)Y(o[l]);i=!1},d(a){a&&X(t),Ti(o,a)}}}function Ef(n){let t,e;const i=[{hoverEnable:n[6],highlightEnable:n[7],floorplanData:n[15],getRoomAreaText:n[18],getRoomDimensionText:n[19],getLabelElement:n[20],getRuleDistanceText:n[21],roomLabelsEnable:n[9],roomAreaEnable:n[10],roomNameEnable:n[11],roomNameOtherTypeEnable:n[12],roomDimensionEnable:n[13],ruleLabelsEnable:n[14],adaptiveRoomLabelVisibleEnable:n[22],highlightData:n[23],missingFloorConfig:n[24],panoIndex:n[3],cameraEnable:n[5],cameraImageUrl:n[17],lastPanoramaLongitude:n[16],compassEnable:n[8],northDesc:n[2],store:n[25]},{floorIndex:n[26].floorIndex},{isCurrent:n[26].floorIndex===n[4]},{items:n[26].items}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new EP({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r&67108860?yt(i,[r&67108844&&{hoverEnable:o[6],highlightEnable:o[7],floorplanData:o[15],getRoomAreaText:o[18],getRoomDimensionText:o[19],getLabelElement:o[20],getRuleDistanceText:o[21],roomLabelsEnable:o[9],roomAreaEnable:o[10],roomNameEnable:o[11],roomNameOtherTypeEnable:o[12],roomDimensionEnable:o[13],ruleLabelsEnable:o[14],adaptiveRoomLabelVisibleEnable:o[22],highlightData:o[23],missingFloorConfig:o[24],panoIndex:o[3],cameraEnable:o[5],cameraImageUrl:o[17],lastPanoramaLongitude:o[16],compassEnable:o[8],northDesc:o[2],store:o[25]},r&32768&&{floorIndex:o[26].floorIndex},r&32784&&{isCurrent:o[26].floorIndex===o[4]},r&32768&&{items:o[26].items}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function xP(n){let t,e,i=n[1]&&If(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[1]?i?(i.p(s,o),o&2&&H(i,1)):(i=If(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function SP(n,t,e){let{duration:i=0}=t,{visible:s}=t,{northDesc:o}=t,{panoIndex:r}=t,{floorIndex:a}=t,{cameraEnable:l}=t,{hoverEnable:c}=t,{highlightEnable:h}=t,{compassEnable:u}=t,{roomLabelsEnable:d}=t,{roomAreaEnable:p}=t,{roomNameEnable:m}=t,{roomNameOtherTypeEnable:g}=t,{roomDimensionEnable:v}=t,{ruleLabelsEnable:y}=t,{floorplanData:w}=t,{lastPanoramaLongitude:C}=t,{cameraImageUrl:E}=t,{getRoomAreaText:D}=t,{getRoomDimensionText:L}=t,{getLabelElement:R}=t,{getRuleDistanceText:z}=t,{adaptiveRoomLabelVisibleEnable:O}=t,{highlightData:A}=t,{missingFloorConfig:M}=t,{store:I=void 0}=t;return n.$$set=k=>{"duration"in k&&e(0,i=k.duration),"visible"in k&&e(1,s=k.visible),"northDesc"in k&&e(2,o=k.northDesc),"panoIndex"in k&&e(3,r=k.panoIndex),"floorIndex"in k&&e(4,a=k.floorIndex),"cameraEnable"in k&&e(5,l=k.cameraEnable),"hoverEnable"in k&&e(6,c=k.hoverEnable),"highlightEnable"in k&&e(7,h=k.highlightEnable),"compassEnable"in k&&e(8,u=k.compassEnable),"roomLabelsEnable"in k&&e(9,d=k.roomLabelsEnable),"roomAreaEnable"in k&&e(10,p=k.roomAreaEnable),"roomNameEnable"in k&&e(11,m=k.roomNameEnable),"roomNameOtherTypeEnable"in k&&e(12,g=k.roomNameOtherTypeEnable),"roomDimensionEnable"in k&&e(13,v=k.roomDimensionEnable),"ruleLabelsEnable"in k&&e(14,y=k.ruleLabelsEnable),"floorplanData"in k&&e(15,w=k.floorplanData),"lastPanoramaLongitude"in k&&e(16,C=k.lastPanoramaLongitude),"cameraImageUrl"in k&&e(17,E=k.cameraImageUrl),"getRoomAreaText"in k&&e(18,D=k.getRoomAreaText),"getRoomDimensionText"in k&&e(19,L=k.getRoomDimensionText),"getLabelElement"in k&&e(20,R=k.getLabelElement),"getRuleDistanceText"in k&&e(21,z=k.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in k&&e(22,O=k.adaptiveRoomLabelVisibleEnable),"highlightData"in k&&e(23,A=k.highlightData),"missingFloorConfig"in k&&e(24,M=k.missingFloorConfig),"store"in k&&e(25,I=k.store)},[i,s,o,r,a,l,c,h,u,d,p,m,g,v,y,w,C,E,D,L,R,z,O,A,M,I]}let Du=class extends Ee{constructor(t){super(),Ie(this,t,SP,xP,Me,{duration:0,visible:1,northDesc:2,panoIndex:3,floorIndex:4,cameraEnable:5,hoverEnable:6,highlightEnable:7,compassEnable:8,roomLabelsEnable:9,roomAreaEnable:10,roomNameEnable:11,roomNameOtherTypeEnable:12,roomDimensionEnable:13,ruleLabelsEnable:14,floorplanData:15,lastPanoramaLongitude:16,cameraImageUrl:17,getRoomAreaText:18,getRoomDimensionText:19,getLabelElement:20,getRuleDistanceText:21,adaptiveRoomLabelVisibleEnable:22,highlightData:23,missingFloorConfig:24,store:25},kP)}};const TP="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALaADAAQAAAABAAAAMAAAAADe2FZjAAAEF0lEQVRoBe2WzWskRRiHf13V092TxI2oEzYeVDwITtyDuCiihwiCePGgxIM3vYgHL4J4UIhBRA8i/gPqyUvWg7AiIuIeloDiYUHJLOK6BPwIk9nNODM9Xf1RVe1b3elJRjCZmQ6euqGmuqer33rq4e23GqiOykBloDJQGagMVAYqA5WBykBlYFYD1qwP/tdzaZqOx9zYOLxeX0+L5yzLGp0X/03a25MOnGRcBtx+6Rlo9SL08G4EooFnxa8Yiivox5/h5Ys/4cl7NVorNDRnngX+0MIkVMeMSf23zyKML8J7/Dy8hwF2Buh9CnS+AEQIdLspBuGb+M7/qLW4qJrNpsLapjYhpwVnx3BMfCtNNx3Etc9xywvnMf80wG8HmQainw0RxSGrnmeBp+8k5/j9S0HbvXb5io0Lz880/0wPHV1NlhLd316He+4xOCv5ragF7L9PrH1qBJyB0626x/lC+qrSvH5r/W+n1WpxUM5nMY4GPeH8lHJaPgfeAFQHCL+ntkXT+vnUc3W6pvTIwC0wy3rA4dwLmK2avZ7Eo9uKBuYJfgJscbs8dLCxDMt+EOEPBEZNEWyBYHqTz6bPXrzUnNrSShxHIsYiOL69zrCGLLcLqJP68tB+9w5wj+YhWDafQ2s61wNqxjZhmrQ2pvMFCEvXuCUZ7wqH794ZWs28LJqlTXSUyuksF2M/yOwqgkx2c1ADa4wLAQRk2sAGQQakhN6yFC2hltfz5kSY44NKQeeh+vtI/SSzWhg2CzCgmWISmKUGmaYFBDfCSymnfxJ6/+ospVcWOLLp5DGP/y0P/Rp66O99DQNq7Po3Ds0a0wY+My2QSv2N2mO/OyxR2o6UQk+Lv7yJ06JYSnnolZVU9cUn2O9SmaMWGFBqYXRwbqAJWIi94TX5biotpcGl1DXZ6LnqIbNDTnmUgi52Mv5l5ysMxIcZcGjy2DTK4ZHlcBC14zeSge4qphICjj3bS0A7o9nSp2TOkm7aZ8bGZy/jxhO87V91G0+dfY/Z7BWIIK9KYUi5qy/Hf8YfBG3sqJTHiQWhmTVkbip+wX3x6volVSx+LPAxF+VLXhZ8VQ+iP2Rta/iWe5v42Fngj0BbdnRTXh12ZIcKhTaGbcYjybRwXBU1lu9KlndXp04NM52poKWO0RZsviNaP9a6grkO972+st05pXhE5c1hTEluJy7XUejGUQNLMbAmTdWY1rKBLW3aTJqBZ7nZkb36DhYCreeYHbMUXHvaYi5XDK70EcgulmRjm77wNtenzuXCbmnTRaAx493rbGf3Jr/njMzj920CnKdUaFCjlDioy7NYNvOdGrQJNgI32/L2tkXfFPlxgToqjWVhD6KdLnQRdARf/HHQz2r2X2Gqy8pAZaAyUBmoDFQGKgP/q4F/AJYg9/s0ZoABAAAAAElFTkSuQmCC";function DP(n){return $(this,null,function*(){const t=new Headers({"Content-Type":"text/plain"}),e=function(s){return $(this,null,function*(){const o={index:s.index,url:s.url,svgUrl:s.svg_url};if(s.svg_url){const r=yield fetch(s.svg_url,{headers:t}).then(a=>a.text());o.svgContent=r}return o})};return yield Promise.all(n.map(e))})}function LP(n){const t={id:n.id,size:n.size,name:n.name,customizedName:n.customizedName||"",path:n.path,roomType:n.room_type,floorType:n.floor_type,roomLabel:{position:n.room_label.position,positionInImage:n.room_label.position_in_image},observerIndexs:n.observer_indexs};return n.dimension&&Object.assign(t,{dimension:n.dimension}),t}function zP(n){return{floorName:n.floor_name,floorIndex:n.floor_index,rooms:n.rooms.map(LP),rules:n.rules,is_has_wall:n.is_has_wall}}function OP(n){const t={index:n.index,floorIndex:n.floor_index,position:n.position,positionInImage:n.position_in_image};return n.styled_floorplan_position_in_image&&(t.styledFloorplanPositionInImage={guide:n.styled_floorplan_position_in_image.guide,miniMapFill:n.styled_floorplan_position_in_image.mini_map_fill}),t}function jP(n){return{rad:n.rad,position:n.position,positionInImage:n.position_in_image,northRad:n.north_rad,roomId:n.room_id,floorIndex:n.floor_index}}function un(n){return $(this,null,function*(){var r;const t=yield DP(n.outlines),e=n.computed_data.bounding,i=n.computed_data.floor_datas.map(zP),s=n.computed_data.entrance?jP(n.computed_data.entrance):null,o={outlines:t,entrance:s,bounding:e,floorDatas:i,observers:n.computed_data.observers.map(OP)};return((r=n.styled_floorplan)==null?void 0:r.version)===1&&(o.styledFloorplan={version:1,floors:n.styled_floorplan.floors.map(a=>({floorIndex:a.floor_index,guide:{url:a.guide.url,checksum:a.guide.checksum,width:a.guide.width,height:a.guide.height,floorplanToImage:a.guide.floorplan_to_image},miniMapFill:{url:a.mini_map_fill.url,checksum:a.mini_map_fill.checksum,width:a.mini_map_fill.width,height:a.mini_map_fill.height,floorplanToImage:a.mini_map_fill.floorplan_to_image},roomLabels:a.room_labels.map(l=>de(V({roomId:l.room_id},l.names?{names:l.names}:{}),{position:l.position,positionInImage:l.position_in_image}))}))}),o})}function a1(n,t,e){return n.map(s=>{const o=s.position,r=s.icon?s.icon:{url:TP,width:45,height:48},a=R3(o,t),l=O3(o,e),c=j3(l,e);return{floorIndex:a,icon:r,id:s.id,position:l,positionInImage:c}})}function RP(n,t){return t(n),n}function Wo(n,t){return RP({},e=>{for(const i in n)t.indexOf(i)===-1&&(e[i]=n[i])})}function kf(n,t){const e=Math.max(...n.work.observers.map(i=>i.floorIndex));return t>e?n.model.bounding.max.y:Math.max(...n.work.observers.filter(i=>i.floorIndex===t).map(i=>i.standingPosition.y))}function Qr(n,t,e=as.BOUNDING_CENTER){const i=kf(n,t),s=kf(n,t+1);return e===as.BOUNDING_CENTER?(n.model.bounding.max.y+n.model.bounding.min.y)/2:e===as.CEILING?s:i}function Lu(n,t,e,i){const s=Qr(n,e,i==null?void 0:i.attachedTo),o=new b.Vector3(0,s,0),r=new b.Vector3(1,s,0),a=o.clone().project(n.camera),l=r.clone().project(n.camera);return Math.abs((l.x-a.x)/1e3)*(t.getBoundingClientRect().width/2)}let ys=class{constructor(t,e){f(this,"VERSION","3.81.9");f(this,"NAME");f(this,"five");f(this,"workUtil");f(this,"fiveUtil");f(this,"hooks",new St);f(this,"staticPrefix",Bl);this.five=t,this.fiveUtil=new Sl(t),this.workUtil=this.fiveUtil.workUtil,e!=null&&e.staticPrefix&&(this.staticPrefix=e.staticPrefix)}set workCode(t){this.workUtil.workCode=t,this.onWorkCodeChange()}get workCode(){return this.workUtil.workCode}updateFive(t){this.five=t,this.fiveUtil.five=t,this.workUtil.five=t}getCurrentState(){return this.state}onWorkCodeChange(){}},pn=class extends ys{};var fi=(n=>(n.UnknownError="UnknownError",n.DataNotLoaded="DataNotLoaded",n.UpdateSizeError="UpdateSizeError",n.BreakOffByHide="BreakOffByHide",n.BreakOffByDisable="BreakOffByDisable",n.ModelNotLoaded="ModelNotLoaded",n.ChangeModeError="ChangeModeError",n.UpdateCameraError="UpdateCameraError",n))(fi||{});const l1=500,zu=80;function Vs(n,t,e=4){return Math.abs(n-t)<Math.pow(10,-e)}function c1(n,t,e=4){const i=Math.PI*2,s=n%i,o=t%i,r=Math.min(s,o),a=Math.max(s,o);return Vs(r,a,e)||Vs(r+i,a,e)}Object.assign(window,{nearlyEqual:Vs,nearlyEqualRad:c1});function _P(n){return Object.prototype.toString.call(n)==="[object Object]"}function xf(n){return _P(n)&&!!n.isVector3}function Ou(n,t){return $(this,null,function*(){const[e]=yield Us(n.changeMode(...t));if(e)throw new Error("change mode canceled");yield new Promise(r=>{n.once("initAnimationWillStart",()=>{n.once("initAnimationEnded",()=>r())})});const i=t[1];if(!i)return!0;const s=n.getCurrentState();if(!VP(i,s))throw new Error("pose 与预期不符")})}function VP(n,t){return Object.keys(n).every(e=>{const i=t[e],s=n[e];return i===void 0||s===void 0?!0:e==="longitude"||e==="latitude"?c1(i,s,2):typeof i=="number"&&typeof s=="number"?Vs(i,s,2):xf(s)&&xf(i)?s.distanceTo(i)<.01:i===s})}function FP(n,t,e){const i=n.bounding,s=Math.pow(Math.pow(i.max.x-i.min.x+1,2)+Math.pow(i.max.y-i.min.y+1,2)+Math.pow(i.max.z-i.min.z+1,2),1/2);let o=s/2/Math.tan(Math.PI*t/360);return e<1&&(o=o/e),isNaN(o)?s:o}function BP(n,t){if(n.currentMode!==t.mode)return!1;const{latitude:e,longitude:i,fov:s,offset:o}=t,{latitude:r,longitude:a,offset:l}=n.getCurrentState(),c=n.camera.fov;return!(!Vs(e,r,2)||!Vs(i,a,2)||o!==void 0&&o.distanceTo(l)>.01||!Vs(s,c,2))}function h1(n,t,e=!0){return $(this,null,function*(){if(BP(n,t)===!0)return;const s=n.getCurrentState();if(s.mode!==t.mode){const h=n.models.find(p=>p.name===n.state.workCode),u=typeof t.fov=="number"?t.fov:zu;h&&(t.distance=FP(h,u,n.camera.aspect));const[d]=yield Us(Ou(n,[t.mode,t,void 0,e]));if(d)throw d;return}const{latitude:o,longitude:r,fov:a}=s,l=Math.min(1e3,Math.max(200,Math.abs(o-Math.PI/2)*1e3,(r>Math.PI?2*Math.PI-r:r)*500,typeof t.fov=="number"?Math.abs(a-t.fov)*10:1/0)),[c]=yield Us(n.updateCamera(Wo(t,["mode"]),l,e));if(c)throw new Error(fi.UpdateCameraError)})}function Uo(n,t,e=300){var s,o;const i=n.getElement();if(i){i.style.opacity=t+"";for(let r=0;r<((o=(s=i.parentElement)==null?void 0:s.children)==null?void 0:o.length);r++){const a=i.parentElement.children[r];a instanceof HTMLElement&&a.dataset.infive==="1"&&(a.style.opacity=t+"")}i.style.transition=e===0?"none":`opacity ${e}ms linear`,e!==0&&Promise.race([new Promise(r=>i.addEventListener("transitionend",r,{once:!0})),new Promise(r=>setTimeout(r,e))]).then(()=>{i.style.transition="none"})}}function HP(n){const{latitude:t,longitude:e}=n,i=Math.abs(t-Math.PI/2)>5*Math.PI/180,s=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return i||s}function NP(n){const{latitude:t,longitude:e}=n,i=Math.abs(t-Math.PI/2)<10*Math.PI/180,s=e<30*(Math.PI/180)||e>330*(Math.PI/180);return i&&s}let GP=class extends pn{constructor(e,i){var l,c,h;super(e);f(this,"name","modelFloorplanPlugin");f(this,"state");f(this,"data");f(this,"showState");f(this,"showPromise");f(this,"app");f(this,"panoIndex",0);f(this,"floorIndex",0);f(this,"selector");f(this,"showRejection");f(this,"wrapper");f(this,"container",document.createElement("div"));f(this,"lastPanoramaLongitude",0);f(this,"size",{width:0,height:0});f(this,"defaultMissingFloorConfig");f(this,"hasAddedEventListener",!1);f(this,"isHiddenByHideFunc",!1);f(this,"highlightData",{});f(this,"store",{roomOnMouse:null});f(this,"dispose",()=>{var e,i;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(i=this.container)==null||i.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});f(this,"show",(...i)=>$(this,[...i],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const s=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},s),this._show(e)}));f(this,"hide",(...i)=>$(this,[...i],function*(e={}){this.state.enabled&&(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));f(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper)return!1;const{min:e,max:i}=this.data.bounding,s=i.x-e.x,o=i.y-e.y,r=this.getPxmmWithRotation(),a=Math.ceil(s*r),l=Math.ceil(o*r);return this.size.width===a&&this.size.height===l||(this.container.style.width=a+"px",this.container.style.height=l+"px",this.size={width:a,height:l}),!0});f(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});f(this,"unhighlight",()=>{this.highlightData={},this.render()});f(this,"updateShowState",e=>{this.showState=V(V({},this.showState),e)});f(this,"_disable",e=>{var s,o,r;const{userAction:i}=e;this.hooks.emit("disable",{userAction:i}),(s=this.showRejection)==null||s.call(this,fi.BreakOffByDisable),this.showPromise=void 0,(o=this.app)==null||o.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});f(this,"_enable",e=>{const{userAction:i}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:i}),this.state.visible&&this._show({userAction:i}))});f(this,"_show",e=>$(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(fi.ModelNotLoaded);if(!this.data)throw new Error(fi.DataNotLoaded);if(this.showPromise)return this.showPromise;const i={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},s=V(V({},i),e),o=()=>$(this,null,function*(){this.hooks.emit("show",{userAction:s.userAction,auto:s.isAutoShow});let a=!1,l;this.showRejection=u=>{a=!0,l=u};const[c]=yield Us(h1(this.five,this.showState,s.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(fi.UnknownError);if(!this.updateSize())throw new Error(fi.UpdateSizeError);this.floorIndex=s.floorIndex,this.five.model.show(this.floorIndex)});return this.isHiddenByHideFunc=!1,this.showPromise=o().then(()=>{this.showPromise=void 0,this.showRejection=void 0;const a=s.modelOpacity,l=s.immediately?0:l1;Uo(this.five,a,l),this.render(l),this.hooks.emit("showAnimationEnded",{auto:s.isAutoShow,userAction:s.userAction})}).catch(a=>{if(this.showPromise=void 0,this.showRejection=void 0,this.updateState({visible:!1},s.userAction),!s.isAutoShow&&a instanceof Error)throw a}),this.showPromise}));f(this,"_hide",e=>{var o;(o=this.showRejection)==null||o.call(this,fi.BreakOffByHide),this.showPromise=void 0;const s=V(V({},{userAction:!0,isAutoHide:!1}),e);Uo(this.five,1,0),this.hooks.emit("hide",{auto:s.isAutoHide,userAction:s.userAction}),this.render()});f(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click",this.store.roomOnMouse))return!1});f(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("不正确的父容器选择器");this.wrapper=e,e.append(this.container)});f(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});f(this,"onFiveInteriaPan",(e,i)=>{if(!i||this.state.config.autoShowEnable===!1||this.isHiddenByHideFunc)return;const s=this.five.getCurrentState();s.mode==="Floorplan"&&(this.state.visible||NP(s)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})))});f(this,"onFivePanoArrived",e=>{var i;(i=this.five)!=null&&i.work&&(this.panoIndex=e,this.floorIndex=this.workUtil.observers[e].floorIndex)});f(this,"onFiveCameraUpdate",(e,i)=>{if(!this.state.visible||this.showPromise)return;const s=this.five.getCurrentState();HP(s)&&(this.updateState({visible:!1},i),this._hide({userAction:i,isAutoHide:!0}))});f(this,"onFiveWantsGesture",(e,i)=>{if(this.state.visible&&(i.length>1||e==="mouseWheel"))return!1});f(this,"onFiveWantsPanGesture",(e,i)=>{if(this.five.getCurrentState().mode==="Floorplan"&&this.state.config.autoShowEnable!==!1&&i&&this.state.visible)return this.five.updateCamera(this.showState,0),!1});f(this,"onFiveWantsTapGesture",()=>this.handleClick());f(this,"onFiveWantsChangeMode",(e,i)=>{i==="Panorama"&&e==="Floorplan"&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});f(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const i=this.five.getCurrentState().panoIndex;this.floorIndex=this.workUtil.observers[i].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});i!=null&&i.selector&&(this.selector=i.selector,console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法")),this.showState=V({mode:"Floorplan",longitude:0,latitude:Math.PI/2,fov:zu/((l=i==null?void 0:i.scale)!=null?l:1)},i==null?void 0:i.showState),this.defaultMissingFloorConfig={imageURL:Wi(i==null?void 0:i.staticPrefix,cs),imageWidth:200,imageHeight:120,text:(h=(c=i.i18n)==null?void 0:c.call(i,"暂无平面图"))!=null?h:"暂无平面图",textFontSize:14};const s={northDesc:"北",modelOpacity:1,cameraEnable:!0,highlightEnable:!1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,roomNameOtherTypeEnable:!0,roomDimensionEnable:!0,adaptiveRoomLabelVisibleEnable:!0,cameraImageUrl:hn,attachedTo:as.BOUNDING_CENTER,getLabelElement:void 0,missingFloorConfig:V(V({},this.defaultMissingFloorConfig),i.missingFloorConfig),i18n:u=>u,getRoomAreaText:u=>(u/1e6).toFixed(1)+"㎡",getRoomDimensionText:(u,d)=>(u/1e3).toFixed(1)+"m × "+(d/1e3).toFixed(1)+"m",getRuleDistanceText:u=>u.toString()},o=i?Wo(i,["selector","scale"]):{},r=V(V({},s.missingFloorConfig),o.missingFloorConfig),a=de(V(V({},s),o),{missingFloorConfig:r});this.state={enabled:!0,visible:!1,config:a},this.panoIndex=e.getCurrentState().panoIndex,this.initContainer(),e.once("dispose",this.dispose),this.addEventListener()}load(e,i,s=!0){return $(this,null,function*(){function o(h){return Object.prototype.hasOwnProperty.apply(h,["version"])}const r=e;r&&yi(r.version)&&console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");const a=JSON.parse(JSON.stringify(e)),l=o(a)?a.data:a,c=this.data;this.data=yield un(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),i&&this.updateState(i,s),this.render()})}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}enable(e={}){if(this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||i),this._enable({userAction:i})}disable(e={}){if(!this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||i),this._disable({userAction:i})}setState(e,i={}){const s=this.state,o=i.userAction!==void 0?i.userAction:!0;if(this.updateState(e,o),e.enabled!==void 0&&s.enabled!==e.enabled&&(e.enabled?this._enable({userAction:o}):this._disable({userAction:o})),e.visible!==void 0&&s.visible!==e.visible){const r={userAction:o};e.visible?this._show(r):this._hide(r)}this.render()}changeConfigs(e,i=!0){this.updateState({config:e},i),this.render()}getPxmmWithRotation(){if(!this.wrapper)return 0;const e=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,i=this.showState.longitude,s=Math.abs((i%(2*Math.PI)+2*Math.PI)%(2*Math.PI));return s>Math.PI/4&&s<3*Math.PI/4||s>5*Math.PI/4&&s<7*Math.PI/4?this.getPxmmZAxis(e):Lu(this.five,this.wrapper,this.floorIndex,e)}getPxmmZAxis(e){if(!this.wrapper)return 0;const i=Qr(this.five,this.floorIndex,e==null?void 0:e.attachedTo),s=new b.Vector3(0,i,0),o=new b.Vector3(0,i,1),r=s.clone().project(this.five.camera),a=o.clone().project(this.five.camera);return Math.abs((a.x-r.x)/1e3)*(this.wrapper.getBoundingClientRect().width/2)}formatData(e){return $(this,null,function*(){return yield un(e.data)})}updateState(e,i){var a;const s=this.state,o=(a=e.config)!=null&&a.missingFloorConfig?V(V({},s.config.missingFloorConfig),e.config.missingFloorConfig):s.config.missingFloorConfig,r=e.config?de(V(V({},s.config),e.config),{missingFloorConfig:o}):s.config;this.state=de(V(V({},this.state),e),{config:r}),!Wt(this.state,s,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:i})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.on("modeChange",this.onFiveModeChange),e.on("interiaPan",this.onFiveInteriaPan),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("interiaPan",this.onFiveInteriaPan),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0||this.showPromise)return;const i=de(V({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude,highlightData:this.highlightData,store:this.store});if(this.app)return this.app.$set(i);this.app=new Du({target:this.container,intro:!0,props:i})}};const WP=(n,t)=>new GP(n,t),Sf=[{type:0,description:"车-2",href:"resource/items/{{ theme }}/car_2.png",width:4200,height:1800,tag:"其他",direction:3,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:1,description:"车-1",href:"resource/items/{{ theme }}/car_1.png",width:1900,height:4300,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:2,description:"中厨-1",href:"resource/items/{{ theme }}/kitchen_1.png",width:3158,height:1400,tag:"厨房",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:3,description:"8人餐桌",href:"resource/items/{{ theme }}/table_for_8.png",width:3240,height:1800,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:4,description:"衣柜-1",href:"resource/items/{{ theme }}/wardrobe_1.png",width:1820,height:600,tag:"卧室",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:5,description:"浴缸-2",href:"resource/items/{{ theme }}/bathtub_2.png",width:1500,height:694,tag:"卫生间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:6,description:"衣柜-3",href:"resource/items/{{ theme }}/wardrobe_3.png",width:2830,height:600,tag:"卧室",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:7,description:"植物-4",href:"resource/items/{{ theme }}/plant_4.png",width:700,height:628,tag:"装饰类",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:8,description:"植物-1",href:"resource/items/{{ theme }}/plant_1.png",width:700,height:565,tag:"装饰类",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:9,description:"植物-6",href:"resource/items/{{ theme }}/plant_6.png",width:800,height:758,tag:"装饰类",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:10,description:"书桌-1",href:"resource/items/{{ theme }}/desk_1.png",width:1200,height:930,tag:"书房",direction:0,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:11,description:"瓶艺-1",href:"resource/items/{{ theme }}/bottle_art_1.png",width:530,height:520,tag:"装饰类",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:12,description:"衣柜-2",href:"resource/items/{{ theme }}/wardrobe_2.png",width:2310,height:600,tag:"卧室",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:13,description:"植物-2",href:"resource/items/{{ theme }}/plant_2.png",width:600,height:600,tag:"装饰类",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:14,description:"西厨-1",href:"resource/items/{{ theme }}/western_kitchen_1.png",width:2180,height:550,tag:"厨房",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:15,description:"西厨-2",href:"resource/items/{{ theme }}/western_kitchen_2.png",width:1480,height:550,tag:"厨房",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:16,description:"浴缸-1",href:"resource/items/{{ theme }}/bathtub_1.png",width:1500,height:956,tag:"卫生间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:17,description:"植物-3",href:"resource/items/{{ theme }}/plant_3.png",width:700,height:639,tag:"装饰类",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:18,description:"书桌-2",href:"resource/items/{{ theme }}/desk_2.png",width:2200,height:2470,tag:"书房",direction:3,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:19,description:"吧台",href:"resource/items/{{ theme }}/bar_counter.png",width:1800,height:1130,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:20,description:"书柜-短",href:"resource/items/{{ theme }}/bookcase_short.png",width:1460,height:350,tag:"书房",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:21,description:"鞋柜-长",href:"resource/items/{{ theme }}/shoe_cabinet_long.png",width:2059,height:550,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:22,description:"鞋柜-短",href:"resource/items/{{ theme }}/shoe_cabinet_short.png",width:1308,height:550,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:23,description:"中厨-2",href:"resource/items/{{ theme }}/kitchen_2.png",width:2020,height:650,tag:"厨房",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:24,description:"椅子",href:"resource/items/{{ theme }}/chair.png",width:1050,height:950,tag:"客厅",direction:1,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:25,description:"秋千",href:"resource/items/{{ theme }}/swing.png",width:1600,height:1370,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:26,description:"茶几",href:"resource/items/{{ theme }}/tea_table.png",width:1090,height:800,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:27,description:"庭院",href:"resource/items/{{ theme }}/courtyard.png",width:2100,height:3020,tag:"其他",direction:3,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:28,description:"躺椅",href:"resource/items/{{ theme }}/deck_chair.png",width:900,height:1850,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:29,description:"钢琴",href:"resource/items/{{ theme }}/piano.png",width:1900,height:2260,tag:"其他",direction:0,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:30,description:"音响",href:"resource/items/{{ theme }}/sound.png",width:2500,height:550,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:31,description:"马桶",href:"resource/items/{{ theme }}/flush_toilet.png",width:450,height:750,tag:"卫生间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:32,description:"植物-5",href:"resource/items/{{ theme }}/plant_5.png",width:544,height:600,tag:"装饰类",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:33,description:"书柜-长",href:"resource/items/{{ theme }}/bookcase_long.png",width:2040,height:350,tag:"书房",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:34,description:"燃气灶-1",href:"resource/items/{{ theme }}/gas_stove_1.png",width:820,height:450,tag:"厨房",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:35,description:"洗脸池-单",href:"resource/items/{{ theme }}/wash_basin_single.png",width:1150,height:500,tag:"卫生间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:36,description:"洗手池-单",href:"resource/items/{{ theme }}/sink_single.png",width:1200,height:500,tag:"卫生间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:37,description:"双人床-4",href:"resource/items/{{ theme }}/double_4.png",width:2743,height:2e3,tag:"卧室",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:38,description:"电视柜-短",href:"resource/items/{{ theme }}/tv_cabinet_short.png",width:1580,height:350,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:39,description:"储物柜-1",href:"resource/items/{{ theme }}/locker_1.png",width:1400,height:600,tag:"储物间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:40,description:"双人床-3",href:"resource/items/{{ theme }}/double_3.png",width:2791,height:2300,tag:"卧室",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:41,description:"双人床-2",href:"resource/items/{{ theme }}/double_2.png",width:2791,height:2300,tag:"卧室",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:42,description:"洗手池-双",href:"resource/items/{{ theme }}/sink_double.png",width:2777,height:600,tag:"卫生间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:43,description:"洗脸池-双",href:"resource/items/{{ theme }}/wash_basin_double.png",width:2550,height:600,tag:"卫生间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:44,description:"双人床(无床头柜)-1",href:"resource/items/{{ theme }}/double_bed_without_bedside_table_1.png",width:1914,height:2e3,tag:"卧室",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:45,description:"电视柜-长",href:"resource/items/{{ theme }}/tv_cabinet_long.png",width:2040,height:350,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:46,description:"洽谈桌组合",href:"resource/items/{{ theme }}/negotiation_table_combination.png",width:2830,height:950,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:47,description:"哑铃架",href:"resource/items/{{ theme }}/dumbbell_rack.png",width:900,height:650,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:48,description:"沙发组合-1",href:"resource/items/{{ theme }}/sofa_combination_1.png",width:4e3,height:2792,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:49,description:"游泳池-2",href:"resource/items/{{ theme }}/swimming_pool_2.png",width:7680,height:3800,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:50,description:"美人榻",href:"resource/items/{{ theme }}/beauty_couch.png",width:1600,height:520,tag:"卧室",direction:1,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:51,description:"单人床(无床头柜)",href:"resource/items/{{ theme }}/single_bed_without_bedside_table.png",width:1200,height:2120,tag:"卧室",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:52,description:"沙发组合-2",href:"resource/items/{{ theme }}/sofa_combination_2.png",width:2e3,height:2054,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:53,description:"跑步机",href:"resource/items/{{ theme }}/treadmill.png",width:2120,height:950,tag:"其他",direction:1,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:54,description:"储物柜-3",href:"resource/items/{{ theme }}/lockers_3.png",width:2400,height:1360,tag:"储物间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:55,description:"洗菜池-1",href:"resource/items/{{ theme }}/vegetable_washing_pool_1.png",width:760,height:470,tag:"厨房",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:56,description:"组合沙发-4",href:"resource/items/{{ theme }}/combination_sofa_4.png",width:1800,height:1595,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:57,description:"台球桌",href:"resource/items/{{ theme }}/pool_table.png",width:2540,height:1400,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:58,description:"置物台-1",href:"resource/items/{{ theme }}/shelf_1.png",width:1632,height:560,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:59,description:"储物柜-2",href:"resource/items/{{ theme }}/locker_2.png",width:2640,height:600,tag:"储物间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:60,description:"户外桌椅",href:"resource/items/{{ theme }}/outdoor_tables_and_chairs.png",width:3e3,height:2800,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:61,description:"洗衣机-1",href:"resource/items/{{ theme }}/washing_machine_1.png",width:850,height:600,tag:"卫生间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:62,description:"双人床-1",href:"resource/items/{{ theme }}/double_1.png",width:2851,height:2200,tag:"卧室",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:63,description:"六人餐桌",href:"resource/items/{{ theme }}/table_for_six.png",width:2230,height:1700,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:64,description:"洽谈沙发椅",href:"resource/items/{{ theme }}/sofa_chair.png",width:1e3,height:950,tag:"其他",direction:1,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:65,description:"三人沙发",href:"resource/items/{{ theme }}/three_seat_sofa.png",width:2670,height:950,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:66,description:"会客桌",href:"resource/items/{{ theme }}/reception_table.png",width:1800,height:1800,tag:"其他",direction:1,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:67,description:"健身机",href:"resource/items/{{ theme }}/fitness_machine.png",width:2200,height:800,tag:"其他",direction:1,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:68,description:"沙发组合-3",href:"resource/items/{{ theme }}/sofa_combination_3.png",width:2670,height:2330,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:69,description:"双开冰箱",href:"resource/items/{{ theme }}/double_refrigerator.png",width:720,height:600,tag:"厨房",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:70,description:"车库工具箱",href:"resource/items/{{ theme }}/garage_toolbox.png",width:1280,height:500,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:71,description:"储物柜-4",href:"resource/items/{{ theme }}/locker_4.png",width:2440,height:2440,tag:"储物间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:72,description:"临时餐台",href:"resource/items/{{ theme }}/temporary_dining_table.png",width:1e3,height:1500,tag:"厨房",direction:1,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:73,description:"置物台-2",href:"resource/items/{{ theme }}/shelf_2.png",width:1590,height:600,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:74,description:"四人餐桌",href:"resource/items/{{ theme }}/table_for_four.png",width:1700,height:1700,tag:"客厅",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:75,description:"洽谈桌",href:"resource/items/{{ theme }}/negotiating_table.png",width:950,height:950,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:76,description:"游泳池-1",href:"resource/items/{{ theme }}/swimming_pool_1.png",width:4300,height:5340,tag:"其他",direction:1,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:77,description:"毛巾凳",href:"resource/items/{{ theme }}/towel_stool.png",width:800,height:500,tag:"卫生间",direction:0,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:78,description:"电梯",href:"resource/items/{{ theme }}/lift.png",width:2e3,height:2e3,tag:"楼梯",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:79,description:"AC",href:"resource/items/{{ theme }}/ac.png",width:850,height:320,tag:"其他",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:80,description:"二人餐桌",href:"resource/items/{{ theme }}/table_for_two.png",width:780,height:1500,tag:"客厅",direction:1,keywords:["default"],themes:["realsee"],label:!0},{type:81,description:"双人床(无床头柜)-2",href:"resource/items/{{ theme }}/double_bed_without_bedside_table_2.png",width:1500,height:2200,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:82,description:"双人床(无床头柜)-3",href:"resource/items/{{ theme }}/double_bed_without_bedside_table_3.png",width:1800,height:2200,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:83,description:"床头柜",href:"resource/items/{{ theme }}/bedstand.png",width:500,height:500,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:84,description:"单开门冰箱",href:"resource/items/{{ theme }}/refrigerator.png",width:650,height:670,tag:"厨房",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:85,description:"沙发组合-5",href:"resource/items/{{ theme }}/sofa_combination_5.png",width:1598,height:1418,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:86,description:"沙发组合-6",href:"resource/items/{{ theme }}/sofa_combination_6.png",width:2680,height:1790,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:87,description:"四人餐桌-1",href:"resource/items/{{ theme }}/table_for_four_1.png",width:1600,height:1700,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:88,description:"小单人沙发",href:"resource/items/{{ theme }}/chair_2.png",width:460,height:416,tag:"客厅",direction:1,keywords:["default"],themes:["realsee"],label:!0},{type:89,description:"小洗手池",href:"resource/items/{{ theme }}/sink_small.png",width:600,height:500,tag:"卫生间",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:90,description:"小厨",href:"resource/items/{{ theme }}/kitchen_small.png",width:740,height:550,tag:"厨房",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:91,description:"小衣柜",href:"resource/items/{{ theme }}/wardrobe_small.png",width:910,height:600,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:92,description:"淋浴房",href:"resource/items/{{ theme }}/shower.png",width:650,height:670,tag:"卫生间",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:93,description:"鞋柜-1",href:"resource/items/{{ theme }}/shoe_cabinet_1.png",width:900,height:400,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:94,description:"鞋柜-2",href:"resource/items/{{ theme }}/shoe_cabinet_2.png",width:1500,height:400,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:95,description:"鞋柜-3",href:"resource/items/{{ theme }}/shoe_cabinet_3.png",width:2e3,height:400,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:96,description:"电视柜-1",href:"resource/items/{{ theme }}/tv_cabinet_1.png",width:1500,height:350,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:97,description:"电视柜-2",href:"resource/items/{{ theme }}/tv_cabinet_2.png",width:2040,height:350,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:98,description:"电视柜-3",href:"resource/items/{{ theme }}/tv_cabinet_3.png",width:3e3,height:350,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:99,description:"餐边柜-1",href:"resource/items/{{ theme }}/sideboard_1.png",width:900,height:550,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:100,description:"餐边柜-2",href:"resource/items/{{ theme }}/sideboard_2.png",width:1500,height:550,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:101,description:"餐边柜-3",href:"resource/items/{{ theme }}/sideboard_3.png",width:2e3,height:550,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:102,description:"燃气灶-2",href:"resource/items/{{ theme }}/gas_stove_2.png",width:900,height:550,tag:"厨房",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:103,description:"洗菜池-2",href:"resource/items/{{ theme }}/vegetable_washing_pool_2.png",width:900,height:550,tag:"厨房",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:104,description:"橱柜-1",href:"resource/items/{{ theme }}/kitchen_cabinet_1.png",width:550,height:550,tag:"厨房",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:105,description:"橱柜-2",href:"resource/items/{{ theme }}/kitchen_cabinet_2.png",width:900,height:550,tag:"厨房",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:106,description:"花洒",href:"resource/items/{{ theme }}/shower_head.png",width:260,height:200,tag:"卫生间",direction:1,keywords:["default"],themes:["realsee"],label:!0},{type:107,description:"淋浴屏",href:"resource/items/{{ theme }}/shower_panel.png",width:1500,height:100,tag:"卫生间",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:108,description:"洗衣机-2",href:"resource/items/{{ theme }}/washing_machine_2.png",width:600,height:500,tag:"卫生间",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:109,description:"双人床-5",href:"resource/items/{{ theme }}/double_5.png",width:1500,height:2e3,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:110,description:"双人床-6",href:"resource/items/{{ theme }}/double_6.png",width:1800,height:2e3,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:111,description:"双人床-7",href:"resource/items/{{ theme }}/double_7.png",width:2e3,height:2200,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:112,description:"双人床-8",href:"resource/items/{{ theme }}/double_8.png",width:2300,height:2200,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:113,description:"梳妆台",href:"resource/items/{{ theme }}/dressing_table.png",width:1200,height:900,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:114,description:"儿童床-1",href:"resource/items/{{ theme }}/children_bed_1.png",width:1400,height:2e3,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:115,description:"儿童床-2",href:"resource/items/{{ theme }}/children_bed_2.png",width:1700,height:2e3,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:116,description:"儿童床-3",href:"resource/items/{{ theme }}/children_bed_3.png",width:2e3,height:2200,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:117,description:"儿童书桌-1",href:"resource/items/{{ theme }}/children_desk_1.png",width:1e3,height:800,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:118,description:"儿童书桌-2",href:"resource/items/{{ theme }}/children_desk_2.png",width:1200,height:800,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:119,description:"儿童书桌-3",href:"resource/items/{{ theme }}/children_desk_3.png",width:1500,height:800,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:120,description:"儿童活动区域-1",href:"resource/items/{{ theme }}/children_carpet_1.png",width:600,height:600,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:121,description:"儿童活动区域-2",href:"resource/items/{{ theme }}/children_carpet_2.png",width:1200,height:1200,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:122,description:"儿童活动区域-3",href:"resource/items/{{ theme }}/children_carpet_3.png",width:1800,height:1800,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:123,description:"茶榻组合-1",href:"resource/items/{{ theme }}/tea_table_combination_1.png",width:2e3,height:1400,tag:"其他",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:124,description:"茶榻组合-2",href:"resource/items/{{ theme }}/tea_table_combination_2.png",width:2500,height:1400,tag:"其他",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:125,description:"茶榻组合-3",href:"resource/items/{{ theme }}/tea_table_combination_3.png",width:3e3,height:1800,tag:"其他",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:126,description:"儿童衣柜-1",href:"resource/items/{{ theme }}/children_wardrobe_1.png",width:900,height:500,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:127,description:"儿童衣柜-2",href:"resource/items/{{ theme }}/children_wardrobe_2.png",width:1200,height:500,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:128,description:"儿童衣柜-3",href:"resource/items/{{ theme }}/children_wardrobe_3.png",width:1500,height:500,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:129,description:"儿童书柜-1",href:"resource/items/{{ theme }}/children_bookcase_1.png",width:800,height:450,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:130,description:"儿童书柜-2",href:"resource/items/{{ theme }}/children_bookcase_2.png",width:1200,height:450,tag:"卧室",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:131,description:"折行双跑楼梯",href:"resource/items/{{ theme }}/folding_double_running_stairs.png",width:3e3,height:3e3,tag:"楼梯",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:132,description:"平行双跑楼梯",href:"resource/items/{{ theme }}/parallel_double_running_stairs.png",width:2500,height:3600,tag:"楼梯",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:133,description:"折行三跑楼梯",href:"resource/items/{{ theme }}/folding_treble_running_stairs.png",width:4300,height:2700,tag:"楼梯",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!0},{type:134,description:"手枪",href:"resource/items/{{ theme }}/pistol.png",width:500,height:500,tag:"物证痕迹",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!1},{type:135,description:"血迹",href:"resource/items/{{ theme }}/bloodstain.png",width:500,height:500,tag:"物证痕迹",direction:2,keywords:["default"],themes:["legacy","realsee"],label:!1},{type:136,description:"手印",href:"resource/items/{{ theme }}/handprint.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["legacy","realsee"],label:!1},{type:137,description:"足迹",href:"resource/items/{{ theme }}/footprint.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["legacy","realsee"],label:!1},{type:138,description:"车轮轨迹",href:"resource/items/{{ theme }}/wheelprint.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["legacy","realsee"],label:!1},{type:139,description:"弹头",href:"resource/items/{{ theme }}/bullet.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["legacy","realsee"],label:!1},{type:140,description:"弹壳",href:"resource/items/{{ theme }}/shell.png",width:500,height:500,tag:"物证痕迹",direction:1,keywords:["default"],themes:["legacy","realsee"],label:!1},{type:141,description:"尸体",href:"resource/items/{{ theme }}/corpse.png",width:1500,height:1500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["legacy","realsee"],label:!1},{type:142,description:"空气净化器",href:"resource/items/{{ theme }}/airscrubber.png",width:580,height:380,tag:"其他",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:143,description:"吹风机",href:"resource/items/{{ theme }}/airblower.png",width:640,height:600,tag:"其他",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:144,description:"除湿器",href:"resource/items/{{ theme }}/dehumidifier.png",width:480,height:430,tag:"其他",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:145,description:"冰柜",href:"resource/items/{{ theme }}/freezer.png",width:800,height:460,tag:"厨房",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:146,description:"架子",href:"resource/items/{{ theme }}/shelf.png",width:1e3,height:380,tag:"其他",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:147,description:"杂物",href:"resource/items/{{ theme }}/sundries.png",width:800,height:800,tag:"其他",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:148,description:"L型沙发",href:"resource/items/{{ theme }}/L_sofa.png",width:3500,height:1800,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:149,description:"书桌3",href:"resource/items/{{ theme }}/desk_3.png",width:1200,height:680,tag:"书房",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:150,description:"会议桌-1",href:"resource/items/{{ theme }}/conference_table_1.png",width:1600,height:1100,tag:"客厅",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:151,description:"衣架",href:"resource/items/{{ theme }}/coat_hanger.png",width:1200,height:400,tag:"卧室",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:152,description:"上下铺",href:"resource/items/{{ theme }}/bunk_beds.png",width:2e3,height:1040,tag:"卧室",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:153,description:"蹲坑",href:"resource/items/{{ theme }}/squatting.png",width:600,height:480,tag:"卫生间",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:154,description:"男尸",href:"resource/items/{{ theme }}/male_corpse.png",width:1600,height:800,tag:"物证痕迹",direction:1,keywords:["default"],themes:["realsee"],label:!1},{type:155,description:"女尸",href:"resource/items/{{ theme }}/female_corpse.png",width:1500,height:800,tag:"物证痕迹",direction:1,keywords:["default"],themes:["realsee"],label:!1},{type:156,description:"擦蹭状血迹",href:"resource/items/{{ theme }}/rub-like-bookd-stains.png",width:1200,height:800,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:157,description:"擦拭物",href:"resource/items/{{ theme }}/wipes.png",width:300,height:60,tag:"物证痕迹",direction:3,keywords:["default"],themes:["realsee"],label:!1},{type:158,description:"纸团",href:"resource/items/{{ theme }}/paper_ball.png",width:400,height:400,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:159,description:"未整理的被子",href:"resource/items/{{ theme }}/unarranged_quilts.png",width:800,height:500,tag:"其他",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:160,description:"手机",href:"resource/items/{{ theme }}/mobile_phone.png",width:400,height:280,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:161,description:"菜刀",href:"resource/items/{{ theme }}/kitchen_knife.png",width:500,height:220,tag:"物证痕迹",direction:3,keywords:["default"],themes:["realsee"],label:!1},{type:162,description:"矩形",href:"resource/items/{{ theme }}/rectangle.png",width:900,height:600,tag:"自定义",direction:0,keywords:["default"],themes:["realsee"],label:!0,svgWidth:90,svgHeight:60,svg:'<rect x=".75" y=".75" width="88.5" height="58.5" rx="4" fill="#FFF" stroke="#3D404E" fill-rule="evenodd" vector-effect="non-scaling-stroke"/>'},{type:163,description:"圆形",href:"resource/items/{{ theme }}/circle.png",width:600,height:600,tag:"自定义",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:164,description:"三角形",href:"resource/items/{{ theme }}/triangle.png",width:600,height:600,tag:"自定义",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:165,description:"五角星形",href:"resource/items/{{ theme }}/five_pointedstar.png",width:800,height:800,tag:"自定义",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:166,description:"会议桌-2",href:"resource/items/{{ theme }}/conference_table_2.png",width:2800,height:1800,tag:"客厅",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:167,description:"餐椅",href:"resource/items/{{ theme }}/dining_chair.png",width:500,height:580,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:168,description:"转椅-1",href:"resource/items/{{ theme }}/rotating_chair_1.png",width:500,height:580,tag:"书房",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:169,description:"转椅-2",href:"resource/items/{{ theme }}/rotating_chair_2.png",width:640,height:640,tag:"书房",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:170,description:"长方形茶几",href:"resource/items/{{ theme }}/rectangular_coffee_table.png",width:1090,height:800,tag:"客厅",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:171,description:"抽油烟机",href:"resource/items/{{ theme }}/smoke_lampblack_machine.png",width:1200,height:800,tag:"厨房",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:172,description:"电话机",href:"resource/items/{{ theme }}/telephone.png",width:500,height:500,tag:"日常用品",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:173,description:"对讲机",href:"resource/items/{{ theme }}/walkie_talkie.png",width:240,height:540,tag:"日常用品",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:174,description:"花盆",href:"resource/items/{{ theme }}/flower_pot.png",width:500,height:500,tag:"其他",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:175,description:"剪刀",href:"resource/items/{{ theme }}/scissors.png",width:500,height:460,tag:"日常用品",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:176,description:"角柜",href:"resource/items/{{ theme }}/corner_cabinet.png",width:1e3,height:1e3,tag:"其他",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:177,description:"口杯",href:"resource/items/{{ theme }}/mouth_cup.png",width:500,height:400,tag:"日常用品",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:178,description:"盘子",href:"resource/items/{{ theme }}/plate.png",width:500,height:500,tag:"日常用品",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:179,description:"勺子",href:"resource/items/{{ theme }}/spoon.png",width:600,height:180,tag:"日常用品",direction:1,keywords:["default"],themes:["realsee"],label:!1},{type:180,description:"手提包",href:"resource/items/{{ theme }}/handbag.png",width:500,height:500,tag:"日常用品",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:181,description:"双人沙发",href:"resource/items/{{ theme }}/double_sofa.png",width:1600,height:850,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:182,description:"藤椅",href:"resource/items/{{ theme }}/cane_chair.png",width:640,height:640,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!0},{type:183,description:"拖把",href:"resource/items/{{ theme }}/mop.png",width:490,height:1e3,tag:"日常用品",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:184,description:"卫生纸",href:"resource/items/{{ theme }}/toilet_paper.png",width:280,height:300,tag:"日常用品",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:185,description:"烟盒",href:"resource/items/{{ theme }}/cigarette_case.png",width:220,height:300,tag:"日常用品",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:186,description:"烟头",href:"resource/items/{{ theme }}/cigarette_butt.png",width:280,height:220,tag:"日常用品",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:187,description:"鱼缸",href:"resource/items/{{ theme }}/fish_tank.png",width:1e3,height:500,tag:"客厅",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:188,description:"笔记本电脑",href:"resource/items/{{ theme }}/notebook_computer.png",width:500,height:500,tag:"日常用品",direction:2,keywords:["default"],themes:["realsee"],label:!1},{type:189,description:"微波炉",href:"resource/items/{{ theme }}/microwave_oven.png",width:600,height:400,tag:"厨房",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:190,description:"断口",href:"resource/items/{{ theme }}/fracture.png",width:1200,height:300,tag:"其他",direction:0,keywords:["default"],themes:["realsee"],label:!0},{type:191,description:"遗物堆",href:"resource/items/{{ theme }}/relic_pile.png",width:800,height:800,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:192,description:"衣物",href:"resource/items/{{ theme }}/clothing.png",width:830,height:810,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:193,description:"浴巾",href:"resource/items/{{ theme }}/bath_towel.png",width:420,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:194,description:"水渍",href:"resource/items/{{ theme }}/water_stains.png",width:1070,height:600,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:195,description:"螺丝刀",href:"resource/items/{{ theme }}/bolt_driver.png",width:300,height:300,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:196,description:"凉鞋",href:"resource/items/{{ theme }}/sandals.png",width:430,height:460,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:197,description:"水果刀",href:"resource/items/{{ theme }}/fruit_knife.png",width:300,height:260,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:198,description:"匕首",href:"resource/items/{{ theme }}/dragger.png",width:400,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:199,description:"玻璃弹孔",href:"resource/items/{{ theme }}/glass_bullet_hole.png",width:1160,height:1e3,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:200,description:"电视",href:"resource/items/{{ theme }}/tv.png",width:1120,height:160,tag:"客厅",direction:2,keywords:["default"],themes:["realsee"],label:!1},{type:201,description:"单向楼梯",href:"resource/items/{{ theme }}/stairs.png",width:1400,height:3600,tag:"楼梯",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:202,description:"电脑",href:"resource/items/{{ theme }}/computer.png",width:700,height:120,tag:"书房",direction:2,keywords:["default"],themes:["realsee"],label:!1},{type:203,description:"工具",href:"resource/items/{{ theme }}/tool.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:204,description:"特殊",href:"resource/items/{{ theme }}/special.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:205,description:"生物",href:"resource/items/{{ theme }}/biology.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:206,description:"毒化",href:"resource/items/{{ theme }}/poison.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:207,description:"理化",href:"resource/items/{{ theme }}/physics&chemistry.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:208,description:"文检",href:"resource/items/{{ theme }}/document.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:209,description:"电子",href:"resource/items/{{ theme }}/electronic.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:210,description:"人像",href:"resource/items/{{ theme }}/portrait.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:211,description:"提取物品",href:"resource/items/{{ theme }}/extract_items.png",width:500,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:212,description:"左脚足迹",href:"resource/items/{{ theme }}/footprint_l.png",width:220,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:213,description:"右脚足迹",href:"resource/items/{{ theme }}/footprint_r.png",width:220,height:500,tag:"物证痕迹",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:214,description:"电动车",href:"resource/items/{{ theme }}/electric_car.png",width:480,height:1320,tag:"交通工具",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:215,description:"自行车",href:"resource/items/{{ theme }}/bike.png",width:380,height:1480,tag:"交通工具",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:216,description:"摩托车",href:"resource/items/{{ theme }}/motorcycle.png",width:500,height:1780,tag:"交通工具",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:217,description:"越野车",href:"resource/items/{{ theme }}/off_road_vehicle.png",width:1700,height:4360,tag:"交通工具",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:218,description:"卡车",href:"resource/items/{{ theme }}/truck.png",width:1880,height:6800,tag:"交通工具",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:219,description:"客车",href:"resource/items/{{ theme }}/bus.png",width:3160,height:8e3,tag:"交通工具",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:220,description:"叉车",href:"resource/items/{{ theme }}/forklift.png",width:940,height:2720,tag:"交通工具",direction:0,keywords:["default"],themes:["realsee"],label:!1},{type:221,description:"拖拉机",href:"resource/items/{{ theme }}/tractor.png",width:1740,height:3060,tag:"交通工具",direction:0,keywords:["default"],themes:["realsee"],label:!1}],UP="//vr-image-4.realsee-cdn.cn/release/static/image/doctorstrange/0.6.201-beta/";function QP(n){const{latitude:t,longitude:e}=n,i=Math.abs(t-Math.PI/2)>5*Math.PI/180,s=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return i||s}function XP(n){const{latitude:t,longitude:e}=n,i=Math.abs(t-Math.PI/2)<10*Math.PI/180,s=e<30*(Math.PI/180)||e>330*(Math.PI/180);return i&&s}let YP=class extends pn{constructor(e,i){var l,c,h;super(e);f(this,"name","modelFloorplanPlugin");f(this,"state");f(this,"data");f(this,"showState");f(this,"showPromise");f(this,"app");f(this,"panoIndex",0);f(this,"floorIndex",0);f(this,"selector");f(this,"showRejection");f(this,"wrapper");f(this,"container",document.createElement("div"));f(this,"lastPanoramaLongitude",0);f(this,"size",{width:0,height:0});f(this,"defaultMissingFloorConfig");f(this,"hasAddedEventListener",!1);f(this,"isHiddenByHideFunc",!1);f(this,"highlightData",{});f(this,"items");f(this,"store",{roomOnMouse:null});f(this,"dispose",()=>{var e,i;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(i=this.container)==null||i.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});f(this,"show",(...i)=>$(this,[...i],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const s=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},s),this._show(e)}));f(this,"hide",(...i)=>$(this,[...i],function*(e={}){this.state.enabled&&(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));f(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper)return!1;const{min:e,max:i}=this.data.bounding,s=i.x-e.x,o=i.y-e.y,r=this.getPxmmWithRotation(),a=Math.ceil(s*r),l=Math.ceil(o*r);return this.size.width===a&&this.size.height===l||(this.container.style.width=a+"px",this.container.style.height=l+"px",this.size={width:a,height:l}),!0});f(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});f(this,"unhighlight",()=>{this.highlightData={},this.render()});f(this,"updateShowState",e=>{this.showState=V(V({},this.showState),e)});f(this,"_disable",e=>{var s,o,r;const{userAction:i}=e;this.hooks.emit("disable",{userAction:i}),(s=this.showRejection)==null||s.call(this,fi.BreakOffByDisable),this.showPromise=void 0,(o=this.app)==null||o.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});f(this,"_enable",e=>{const{userAction:i}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:i}),this.state.visible&&this._show({userAction:i}))});f(this,"_show",e=>$(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.fiveUtil.model)!=null&&r.loaded))throw new Error(fi.ModelNotLoaded);if(!this.data)throw new Error(fi.DataNotLoaded);if(this.showPromise)return this.showPromise;const i={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},s=V(V({},i),e),o=()=>$(this,null,function*(){this.hooks.emit("show",{userAction:s.userAction,auto:s.isAutoShow});let a=!1,l;this.showRejection=u=>{a=!0,l=u};const[c]=yield Us(h1(this.five,this.showState,s.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(fi.UnknownError);if(!this.updateSize())throw new Error(fi.UpdateSizeError);this.updatePosition(),this.floorIndex=s.floorIndex,this.fiveUtil.model.show(this.floorIndex)});return this.isHiddenByHideFunc=!1,this.showPromise=o().then(()=>{this.showPromise=void 0,this.showRejection=void 0;const a=s.modelOpacity,l=s.immediately?0:l1;Uo(this.five,a,l),this.render(l),this.hooks.emit("showAnimationEnded",{auto:s.isAutoShow,userAction:s.userAction})}).catch(a=>{if(this.showPromise=void 0,this.showRejection=void 0,this.updateState({visible:!1},s.userAction),!s.isAutoShow&&a instanceof Error)throw a}),this.showPromise}));f(this,"_hide",e=>{var o;(o=this.showRejection)==null||o.call(this,fi.BreakOffByHide),this.showPromise=void 0;const s=V(V({},{userAction:!0,isAutoHide:!1}),e);Uo(this.five,1,0),this.hooks.emit("hide",{auto:s.isAutoHide,userAction:s.userAction}),this.render()});f(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click",this.store.roomOnMouse))return!1});f(this,"onFiveModelLoaded",()=>{const s=this.five.models.find(r=>r.name===this.five.state.workCode).bounding.getCenter(new b.Vector3);if(this.showState.offset=s,this.state.enabled===!1||this.wrapper||!this.selector)return;const o=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!o)throw new Error("不正确的父容器选择器");this.wrapper=o,o.append(this.container)});f(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});f(this,"onFiveInteriaPan",(e,i)=>{if(!i||this.state.visible||this.state.config.autoShowEnable===!1||this.isHiddenByHideFunc)return;const s=this.five.getCurrentState();if(s.mode!==this.showState.mode)return;const o=this.getRelativePose(s);XP(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0}))});f(this,"onFivePanoArrived",e=>{var i;(i=this.five)!=null&&i.work&&(this.panoIndex=e,this.floorIndex=this.workUtil.observers[e].floorIndex)});f(this,"onFiveCameraUpdate",(e,i)=>{if(!this.state.visible||this.showPromise)return;const s=this.five.getCurrentState();this.updatePosition(),this.updateSize();const o=this.getRelativePose(s);QP(o)&&(this.updateState({visible:!1},i),this._hide({userAction:i}))});f(this,"onFiveWantsPanGesture",(e,i)=>{if(this.five.getCurrentState().mode===this.showState.mode&&this.state.config.autoShowEnable!==!1&&i&&this.state.visible)return this.five.updateCamera(Wo(this.showState,["offset"]),0),!1});f(this,"onFiveWantsTapGesture",()=>this.handleClick());f(this,"onFiveWantsChangeMode",(e,i)=>{i==="Panorama"&&e===this.showState.mode&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});f(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const i=this.five.getCurrentState().panoIndex;this.floorIndex=this.workUtil.observers[i].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});i!=null&&i.selector&&(this.selector=i.selector,console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法")),this.showState=V({mode:"Mapview",longitude:0,latitude:Math.PI/2,fov:zu/((l=i==null?void 0:i.scale)!=null?l:1)},i==null?void 0:i.showState),this.defaultMissingFloorConfig={imageURL:Wi(i==null?void 0:i.staticPrefix,cs),imageWidth:200,imageHeight:120,text:(h=(c=i.i18n)==null?void 0:c.call(i,"暂无平面图"))!=null?h:"暂无平面图",textFontSize:14};const s={northDesc:"北",modelOpacity:1,cameraEnable:!0,highlightEnable:!1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,roomNameOtherTypeEnable:!0,roomDimensionEnable:!0,cameraImageUrl:hn,attachedTo:as.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,missingFloorConfig:V(V({},this.defaultMissingFloorConfig),i.missingFloorConfig),i18n:u=>u,getRoomAreaText:u=>(u/1e6).toFixed(1)+"㎡",getRoomDimensionText:(u,d)=>(u/1e3).toFixed(1)+"m × "+(d/1e3).toFixed(1)+"m",getRuleDistanceText:u=>u.toString()},o=i?Wo(i,["selector","scale"]):{},r=V(V({},s.missingFloorConfig),o.missingFloorConfig),a=de(V(V({},s),o),{missingFloorConfig:r});this.state={enabled:!0,visible:!1,config:a},this.panoIndex=e.getCurrentState().panoIndex,this.initContainer(),xi(e).then(this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,i,s=!0){return $(this,null,function*(){function o(h){return Object.prototype.hasOwnProperty.apply(h,["version"])}const r=e;r&&yi(r.version)&&console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");const a=JSON.parse(JSON.stringify(e)),l=o(a)?a.data:a,c=this.data;this.data=yield un(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),i&&this.updateState(i,s),this.render()})}loadItems(e){const{min:i,max:s}=this.data.bounding,o=s.x-i.x,r=s.y-i.y;this.data.floorDatas.forEach((a,l)=>{a.items=e[l].filter(c=>c.displayName==="Item-SimpleItem").map(c=>{const{x:h,y:u,width:d,height:p,notes:m,type:g,id:v,rotateX:y,rotateY:w,rotateZ:C=0}=c;return{id:v,positionInImage:{x:(h-i.x)/o,y:(s.y-u)/r},width:d/o,height:p/r,src:UP+Sf[g].href.replace(/\{\{\stheme\s\}\}/,"realsee"),notes:m||Sf[g].description,rotateX:y,rotateY:w,rotateZ:C}})})}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}enable(e={}){if(this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||i),this._enable({userAction:i})}disable(e={}){if(!this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||i),this._disable({userAction:i})}setState(e,i={}){const s=this.state,o=i.userAction!==void 0?i.userAction:!0;if(this.updateState(e,o),e.enabled!==void 0&&s.enabled!==e.enabled&&(e.enabled?this._enable({userAction:o}):this._disable({userAction:o})),e.visible!==void 0&&s.visible!==e.visible){const r={userAction:o};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,i=!0){this.updateState({config:e},i),this.render()}getPxmmWithRotation(){if(!this.wrapper)return 0;const e=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,i=this.showState.longitude,s=Math.abs((i%(2*Math.PI)+2*Math.PI)%(2*Math.PI));return s>Math.PI/4&&s<3*Math.PI/4||s>5*Math.PI/4&&s<7*Math.PI/4?this.getPxmmZAxis(e):Lu(this.five,this.wrapper,this.floorIndex,e)}getPxmmZAxis(e){if(!this.wrapper)return 0;const i=Qr(this.five,this.floorIndex,e==null?void 0:e.attachedTo),s=new b.Vector3(0,i,0),o=new b.Vector3(0,i,1),r=s.clone().project(this.five.camera),a=o.clone().project(this.five.camera);return Math.abs((a.x-r.x)/1e3)*(this.wrapper.getBoundingClientRect().width/2)}updatePosition(){var a;const e=Qr(this.five,this.floorIndex,this.state.config.attachedTo),i=(a=this.fiveUtil.model)==null?void 0:a.bounding.getCenter(new b.Vector3).setY(e);if(!i)return;const s=i.clone().project(this.five.camera),o=(s.x+1)/2,r=-(s.y-1)/2;this.container.style.left=o*100+"%",this.container.style.top=r*100+"%"}formatData(e){return $(this,null,function*(){return yield un(e.data)})}updateState(e,i){var a;const s=this.state,o=(a=e.config)!=null&&a.missingFloorConfig?V(V({},s.config.missingFloorConfig),e.config.missingFloorConfig):s.config.missingFloorConfig,r=e.config?de(V(V({},s.config),e.config),{missingFloorConfig:o}):s.config;this.state=de(V(V({},this.state),e),{config:r}),!Wt(this.state,s,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:i})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("interiaPan",this.onFiveInteriaPan),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}getRelativePose(e){const i=this.showState.longitude||0,o=((e.longitude-i)%(2*Math.PI)+2*Math.PI)%(2*Math.PI);return de(V({},e),{longitude:o})}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0||this.showPromise)return;const i=de(V({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude,highlightData:this.highlightData,items:this.items,store:this.store});if(this.app)return this.app.$set(i);this.app=new Du({target:this.container,intro:!0,props:i})}};const ZP=(n,t)=>new YP(n,t);let qP=class extends pn{constructor(e,i){var l,c;super(e);f(this,"name","topviewFloorplanPlugin");f(this,"state");f(this,"data");f(this,"app");f(this,"selector");f(this,"panoIndex",0);f(this,"floorIndex",0);f(this,"wrapper");f(this,"container",document.createElement("div"));f(this,"lastPanoramaLongitude",0);f(this,"size",{width:0,height:0});f(this,"defaultMissingFloorConfig");f(this,"hasAddedEventListener",!1);f(this,"isHiddenByHideFunc",!1);f(this,"highlightData",{});f(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper||this.five.getCurrentState().mode!=="Topview")return!1;const{min:e,max:i}=this.data.bounding,s=i.x-e.x,o=i.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=Lu(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(s*a),c=Math.ceil(o*a);return this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c}),!0});f(this,"dispose",()=>{var e,i;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(i=this.container)==null||i.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});f(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});f(this,"unhighlight",()=>{this.highlightData={},this.render()});f(this,"_disable",e=>{var s,o;const{userAction:i}=e;(s=this.app)==null||s.$destroy(),this.app=void 0,(o=this.container)==null||o.remove(),this.removeEventListener(),this.hooks.emit("disable",{userAction:i})});f(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("不正确的父容器选择器");this.wrapper=e,e.append(this.container)});f(this,"onFiveModeChange",(...[e,,,,i])=>{e!=="Topview"&&this.state.visible&&(this.updateState({visible:!1},i),this._hide({userAction:i}))});f(this,"onFivePanoArrived",e=>{var i;(i=this.five)!=null&&i.work&&(this.panoIndex=e,this.floorIndex=this.workUtil.observers[e].floorIndex)});f(this,"onFiveCameraUpdate",(e,i)=>{this.state.visible&&(this.updatePosition(),this.updateSize())});f(this,"onFiveWantsGesture",e=>{if(!(e!=="pan"&&e!=="pinch"&&e!=="mouseWheel")&&this.state.visible&&!this.state.config.gestureEnable)return!1});f(this,"onFiveWantsMoveToPano",()=>{if(this.state.visible&&this.state.config.preventRoomClick)return!1});f(this,"onFiveInitAnimationEnded",(...[,,e])=>{const{mode:i}=this.five.getCurrentState();i==="Topview"&&!this.isHiddenByHideFunc&&!this.state.visible&&this.state.config.autoShowEnable&&(this.updateState({visible:!0},e),this._show({userAction:e}))});f(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const i=this.five.getCurrentState().panoIndex;this.floorIndex=this.workUtil.observers[i].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});i!=null&&i.selector&&(this.selector=i.selector,console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法")),this.defaultMissingFloorConfig={imageURL:Wi(i==null?void 0:i.staticPrefix,cs),imageWidth:200,imageHeight:120,text:(c=(l=i.i18n)==null?void 0:l.call(i,"暂无平面图"))!=null?c:"暂无平面图",textFontSize:14};const s={northDesc:"北",modelOpacity:1,cameraEnable:!0,hoverEnable:!0,highlightEnable:!1,compassEnable:!0,gestureEnable:!1,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,roomNameOtherTypeEnable:!0,roomDimensionEnable:!0,cameraImageUrl:hn,attachedTo:as.BOUNDING_CENTER,getLabelElement:void 0,missingFloorConfig:V(V({},this.defaultMissingFloorConfig),i.missingFloorConfig),i18n:h=>h,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:h=>(h/1e6).toFixed(1)+"㎡",getRoomDimensionText:(h,u)=>(h/1e3).toFixed(1)+"m × "+(u/1e3).toFixed(1)+"m",getRuleDistanceText:h=>h.toString()},o=i?Wo(i,["selector","scale"]):{},r=V(V({},s.missingFloorConfig),o.missingFloorConfig),a=de(V(V({},s),o),{missingFloorConfig:r});this.state={enabled:!0,visible:!1,config:a},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,i,s=!0){return $(this,null,function*(){function o(h){return Object.prototype.hasOwnProperty.apply(h,["version"])}const r=e;r&&yi(r.version)&&console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");const a=JSON.parse(JSON.stringify(e)),l=o(a)?a.data:a,c=this.data;this.data=yield un(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),i&&this.updateState(i,s),this.render()})}updatePosition(){var a;const e=Qr(this.five,this.floorIndex,this.state.config.attachedTo),i=(a=this.five.model)==null?void 0:a.bounding.getCenter(new b.Vector3).setY(e);if(!i)return;const s=i.clone().project(this.five.camera),o=(s.x+1)/2,r=-(s.y-1)/2;this.container.style.left=o*100+"%",this.container.style.top=r*100+"%"}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}show(){return $(this,arguments,function*(e={}){if(this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},i),this._show({userAction:i})})}hide(){return $(this,arguments,function*(e={}){if(this.isHiddenByHideFunc=!0,!this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},i),this._hide({userAction:i})})}enable(e={}){if(this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||i),this._enable({userAction:i})}disable(e={}){if(!this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||i),this._disable({userAction:i})}setState(e,i={}){const s=this.state,o=i.userAction!==void 0?i.userAction:!0;if(this.updateState(e,o),e.enabled!==void 0&&s.enabled!==e.enabled){const r={userAction:o};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&s.visible!==e.visible){const r={userAction:o};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,i=!0){this.updateState({config:e},i),this.render()}formatData(e){return $(this,null,function*(){return yield un(e.data)})}_show(e){return $(this,null,function*(){if(!this.state.enabled)return;this.isHiddenByHideFunc=!1;const{userAction:i}=e;this.hooks.emit("show",{userAction:i,auto:!1}),this.five.getCurrentState().mode!=="Topview"&&(yield Ou(this.five,["Topview",void 0,void 0,i])),this.five.model.show(this.floorIndex),this.updatePosition(),this.updateSize();const s=500,o=this.state.config.modelOpacity;Uo(this.five,o,s),this.hooks.emit("showAnimationEnded",{userAction:i,auto:!1}),this.render()})}_hide(e){return $(this,null,function*(){if(!this.state.enabled)return;const{userAction:i}=e;this.hooks.emit("hide",{userAction:i,auto:!1});const s=1,o=0;Uo(this.five,s,o),this.render()})}_enable(e){const{userAction:i}=e;this.addEventListener(),this.wrapper&&this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:i}),this.state.visible&&this._show({userAction:i})}updateState(e,i){var a;const s=this.state,o=(a=e.config)!=null&&a.missingFloorConfig?V(V({},s.config.missingFloorConfig),e.config.missingFloorConfig):s.config.missingFloorConfig,r=e.config?de(V(V({},s.config),e.config),{missingFloorConfig:o}):s.config;this.state=de(V(V({},this.state),e),{config:r}),!Wt(this.state,s,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:i})}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsMoveToPano",this.onFiveWantsMoveToPano),e.on("initAnimationEnded",this.onFiveInitAnimationEnded),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsMoveToPano",this.onFiveWantsMoveToPano),e.off("initAnimationEnded",this.onFiveInitAnimationEnded),e.off("modelShownFloorChange",this.onModelShownFloorChange)}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate3d(-50%, -50%, 10px)",zIndex:10,pointerEvents:"none","will-change":"width, height"}),this.five.addExtraElement(this.container)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const i=de(V({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude,highlightData:this.highlightData});if(this.app)return this.app.$set(i);this.app=new Du({target:this.container,intro:!0,props:i})}};const JP=(n,t)=>new qP(n,t);function KP(n){Le(n,"svelte-1nqrlxd",".plugin-radar__camera-wrapper.svelte-1nqrlxd{width:100%;height:100%;position:absolute;pointer-events:none}.plugin-radar__camera-position.svelte-1nqrlxd{position:absolute;left:0;top:0;width:0;height:0;transform:none;pointer-events:none;transition:transform 1s linear}.plugin-radar__camera-rotate.svelte-1nqrlxd{position:absolute;left:-0.9375rem;top:-0.9375rem;width:1.0625rem;height:1.0625rem;transform-origin:0.9375rem 0.9375rem;transform:rotate(45deg);background-repeat:no-repeat;background-size:100%}")}function $P(n){let t,e,i;return{c(){t=U("div"),e=U("div"),i=U("div"),P(i,"class","plugin-radar__camera-rotate svelte-1nqrlxd"),_(i,"background-image","url("+(n[0]||hn)+")"),_(i,"transform",n[1]),P(e,"class","plugin-radar__camera-position svelte-1nqrlxd"),_(e,"transform",n[2]),P(t,"class","plugin-radar__camera-wrapper svelte-1nqrlxd"),_(t,"opacity",n[3]?1:0)},m(s,o){Z(s,t,o),B(t,e),B(e,i)},p(s,[o]){o&1&&_(i,"background-image","url("+(s[0]||hn)+")"),(o&1||o&3)&&_(i,"transform",s[1]),o&4&&_(e,"transform",s[2]),o&8&&_(t,"opacity",s[3]?1:0)},i:ce,o:ce,d(s){s&&X(t)}}}function eC(n){return`rotate(${Math.floor(n/Math.PI*180)*-1+45}deg)`}function tC(n,t,e){var w,C;let i,s,o,r,{five:a}=t,{pxmm:l}=t,{floorplanData:c}=t,{cameraImageUrl:h}=t,u=a.getCurrentState().panoIndex,d=a.getCurrentState().longitude,p=(C=(w=a.work.observers[a.getCurrentState().panoIndex])==null?void 0:w.floorIndex)!=null?C:0;function m(E,D){const L=E.bounding,R=E.observers[D];if(!R)return"";const z=(L.max.x-L.min.x)*l,O=(L.max.y-L.min.y)*l,A=Math.floor(R.positionInImage.x*z),M=Math.floor(R.positionInImage.y*O);return`translate(${A}px, ${M}px)`}function g(E){e(7,u=E)}function v(E){e(9,p=a.work.observers[E].floorIndex)}const y=ta(E=>{e(8,d=E.longitude)},1e3/60);return zt(()=>(a.on("panoWillArrive",g),a.on("panoArrived",v),a.on("cameraDirectionUpdate",y),function(){a.off("panoWillArrive",g),a.off("panoArrived",v),a.off("cameraDirectionUpdate",y)})),n.$$set=E=>{"five"in E&&e(4,a=E.five),"pxmm"in E&&e(5,l=E.pxmm),"floorplanData"in E&&e(6,c=E.floorplanData),"cameraImageUrl"in E&&e(0,h=E.cameraImageUrl)},n.$$.update=()=>{n.$$.dirty&576&&e(10,i=c.floorDatas[p]),n.$$.dirty&1024&&e(3,s=i.rooms.length>0),n.$$.dirty&192&&e(2,o=m(c,u)),n.$$.dirty&256&&e(1,r=eC(d))},[h,r,o,s,a,l,c,u,d,p,i]}let iC=class extends Ee{constructor(t){super(),Ie(this,t,tC,$P,Me,{five:4,pxmm:5,floorplanData:6,cameraImageUrl:0},KP)}};function nC(n){Le(n,"svelte-1i87fz7",".plugin-pano-floorplan__extra-objects.svelte-1i87fz7{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.plugin-pano-floorplan__extra-object-item--position.svelte-1i87fz7{position:absolute;width:0;height:0}.plugin-pano-floorplan__extra-object-item.svelte-1i87fz7{transform:translate(-50%, -50%)}")}function Tf(n,t,e){const i=n.slice();return i[1]=t[e],i}function Df(n,t){let e,i,s=`${t[1].icon.width/16}rem`,o=`${t[1].icon.height/16}rem`,r,a=`${t[1].positionInImage.y*100}%`,l=`${t[1].positionInImage.x*100}%`;return{key:n,first:null,c(){e=U("div"),i=U("div"),r=ue(),P(i,"class","plugin-pano-floorplan__extra-object-item svelte-1i87fz7"),_(i,"background-image",`url(${t[1].icon.url})`),_(i,"width",s),_(i,"height",o),P(e,"class","plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7"),_(e,"top",a),_(e,"left",l),this.first=e},m(c,h){Z(c,e,h),B(e,i),B(e,r)},p(c,h){t=c,h&1&&_(i,"background-image",`url(${t[1].icon.url})`);const u=h&1;u&&_(i,"width",s),u&&_(i,"height",o),h&1&&a!==(a=`${t[1].positionInImage.y*100}%`)&&_(e,"top",a),h&1&&l!==(l=`${t[1].positionInImage.x*100}%`)&&_(e,"left",l)},d(c){c&&X(e)}}}function sC(n){let t,e=[],i=new Map,s=n[0];const o=r=>r[1].id;for(let r=0;r<s.length;r+=1){let a=Tf(n,s,r),l=o(a);i.set(l,e[r]=Df(l,a))}return{c(){t=U("div");for(let r=0;r<e.length;r+=1)e[r].c();P(t,"class","plugin-pano-floorplan__extra-objects svelte-1i87fz7")},m(r,a){Z(r,t,a);for(let l=0;l<e.length;l+=1)e[l]&&e[l].m(t,null)},p(r,[a]){a&1&&(s=r[0],e=ai(e,a,o,1,r,s,i,t,la,Df,null,Tf))},i:ce,o:ce,d(r){r&&X(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function oC(n,t,e){let{extraObjects:i=[]}=t;return n.$$set=s=>{"extraObjects"in s&&e(0,i=s.extraObjects)},[i]}let rC=class extends Ee{constructor(t){super(),Ie(this,t,oC,sC,Me,{extraObjects:0},nC)}};function aC(n){Le(n,"svelte-17nccx",".floorplan-plugin__styled-image.svelte-17nccx{position:absolute;inset:0;width:100%;height:100%;overflow:hidden;pointer-events:none}img.svelte-17nccx{display:block;max-width:none;transform-origin:0 0}")}function lC(n){let t,e,i;return{c(){t=U("div"),e=U("img"),at(e.src,i=n[0].url)||P(e,"src",i),P(e,"alt",""),P(e,"draggable","false"),P(e,"class","svelte-17nccx"),_(e,"width",n[1]?`${n[0].width}px`:"100%"),_(e,"height",n[1]?`${n[0].height}px`:"100%"),_(e,"transform",n[1]?`matrix(${n[1].join(",")})`:void 0),P(t,"class","floorplan-plugin__styled-image svelte-17nccx"),_(t,"z-index",n[2])},m(s,o){Z(s,t,o),B(t,e)},p(s,[o]){o&1&&!at(e.src,i=s[0].url)&&P(e,"src",i),o&3&&_(e,"width",s[1]?`${s[0].width}px`:"100%"),o&3&&_(e,"height",s[1]?`${s[0].height}px`:"100%"),o&2&&_(e,"transform",s[1]?`matrix(${s[1].join(",")})`:void 0),o&4&&_(t,"z-index",s[2])},i:ce,o:ce,d(s){s&&X(t)}}}function cC(n,t,e){let{image:i}=t,{transform:s}=t,{zIndex:o=5}=t;return n.$$set=r=>{"image"in r&&e(0,i=r.image),"transform"in r&&e(1,s=r.transform),"zIndex"in r&&e(2,o=r.zIndex)},[i,s,o]}class u1 extends Ee{constructor(t){super(),Ie(this,t,cC,lC,Me,{image:0,transform:1,zIndex:2},aC)}}function hC(n,t){const[e,i,s,o,r,a]=n,[l,c,h,u,d,p]=t;return[e*l+s*c,i*l+o*c,e*h+s*u,i*h+o*u,e*d+s*p+r,i*d+o*p+a]}function uC([n,t,e,i,s,o]){const r=n*i-t*e;if(!Number.isFinite(r)||r===0)throw new Error("styled floorplan transform is singular");return[i/r,-t/r,-e/r,n/r,(e*o-i*s)/r,(t*s-n*o)/r]}function d1(n,t,e){const i=[e,0,0,-e,-t.min.x*e,t.max.y*e];return hC(i,uC(n))}function dC(n){Le(n,"svelte-18287ai",".missing-floor-wrapper.svelte-18287ai{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:flex;justify-content:center;align-items:center}.missing-floor-image.svelte-18287ai{max-width:100%;max-height:100%}")}function fC(n){let t,e,i,s,o,r,a;const l=[gC,mC],c=[];function h(d,p){return d[7]&&d[8]?0:1}t=h(n),e=c[t]=l[t](n),s=new rC({props:{extraObjects:n[9]}});let u=n[3]&&Lf(n);return{c(){e.c(),i=ue(),ge(s.$$.fragment),o=ue(),u&&u.c(),r=Be()},m(d,p){c[t].m(d,p),Z(d,i,p),pe(s,d,p),Z(d,o,p),u&&u.m(d,p),Z(d,r,p),a=!0},p(d,p){let m=t;t=h(d),t===m?c[t].p(d,p):(xe(),Y(c[m],1,1,()=>{c[m]=null}),Se(),e=c[t],e?e.p(d,p):(e=c[t]=l[t](d),e.c()),H(e,1),e.m(i.parentNode,i));const g={};p&512&&(g.extraObjects=d[9]),s.$set(g),d[3]?u?(u.p(d,p),p&8&&H(u,1)):(u=Lf(d),u.c(),H(u,1),u.m(r.parentNode,r)):u&&(xe(),Y(u,1,1,()=>{u=null}),Se())},i(d){a||(H(e),H(s.$$.fragment,d),H(u),a=!0)},o(d){Y(e),Y(s.$$.fragment,d),Y(u),a=!1},d(d){c[t].d(d),d&&X(i),me(s,d),d&&X(o),u&&u.d(d),d&&X(r)}}}function pC(n){let t,e,i;return{c(){t=U("div"),e=U("img"),P(e,"class","missing-floor-image svelte-18287ai"),at(e.src,i=n[6])||P(e,"src",i),P(e,"alt","缺省楼层"),P(t,"class","missing-floor-wrapper svelte-18287ai")},m(s,o){Z(s,t,o),B(t,e)},p(s,o){o&64&&!at(e.src,i=s[6])&&P(e,"src",i)},i:ce,o:ce,d(s){s&&X(t)}}}function mC(n){let t,e;const i=[{floorIndex:n[2],floorplanData:n[4]}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new Su({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r&20?yt(i,[{floorIndex:o[2],floorplanData:o[4]}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function gC(n){let t,e;return t=new u1({props:{image:n[7].miniMapFill,transform:n[8],zIndex:0}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&128&&(o.image=i[7].miniMapFill),s&256&&(o.transform=i[8]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function Lf(n){let t,e;const i=[{five:n[0],pxmm:n[1],floorIndex:n[2],floorplanData:n[4],onRoomHeightClick:n[11],highlightData:n[5],hoveredRoom:void 0}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new Tu({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r&2103?yt(i,[{five:o[0],pxmm:o[1],floorIndex:o[2],floorplanData:o[4],onRoomHeightClick:o[11],highlightData:o[5],hoveredRoom:void 0}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function vC(n){let t,e,i,s;const o=[pC,fC],r=[];function a(l,c){return l[10]?1:0}return t=a(n),e=r[t]=o[t](n),{c(){e.c(),i=Be()},m(l,c){r[t].m(l,c),Z(l,i,c),s=!0},p(l,[c]){let h=t;t=a(l),t===h?r[t].p(l,c):(xe(),Y(r[h],1,1,()=>{r[h]=null}),Se(),e=r[t],e?e.p(l,c):(e=r[t]=o[t](l),e.c()),H(e,1),e.m(i.parentNode,i))},i(l){s||(H(e),s=!0)},o(l){Y(e),s=!1},d(l){r[t].d(l),l&&X(i)}}}function yC(n,t,e){let i,s,o,r,a,{five:l}=t,{pxmm:c}=t,{floorIndex:h}=t,{hoverEnable:u}=t,{floorplanData:d}=t,{extraObjects:p=[]}=t,{highlightData:m}=t,{missingFloorImageUrl:g}=t,{styledFloorplanEnable:v=!1}=t;const y=void 0;return n.$$set=w=>{"five"in w&&e(0,l=w.five),"pxmm"in w&&e(1,c=w.pxmm),"floorIndex"in w&&e(2,h=w.floorIndex),"hoverEnable"in w&&e(3,u=w.hoverEnable),"floorplanData"in w&&e(4,d=w.floorplanData),"extraObjects"in w&&e(12,p=w.extraObjects),"highlightData"in w&&e(5,m=w.highlightData),"missingFloorImageUrl"in w&&e(6,g=w.missingFloorImageUrl),"styledFloorplanEnable"in w&&e(13,v=w.styledFloorplanEnable)},n.$$.update=()=>{var w;n.$$.dirty&20&&e(14,i=d.floorDatas[h]),n.$$.dirty&16384&&e(10,s=i.rooms.length>0),n.$$.dirty&4100&&e(9,o=p==null?void 0:p.filter(C=>C.floorIndex===h)),n.$$.dirty&8212&&e(7,r=v?(w=d.styledFloorplan)==null?void 0:w.floors.find(C=>C.floorIndex===h):void 0),n.$$.dirty&146&&e(8,a=r?d1(r.miniMapFill.floorplanToImage,d.bounding,c):void 0)},[l,c,h,u,d,m,g,r,a,o,s,y,p,v,i]}let bC=class extends Ee{constructor(t){super(),Ie(this,t,yC,vC,Me,{five:0,pxmm:1,floorIndex:2,hoverEnable:3,floorplanData:4,extraObjects:12,highlightData:5,missingFloorImageUrl:6,styledFloorplanEnable:13},dC)}};function AC(n){Le(n,"svelte-ij0sxa",".plugin-floorplan-radar.svelte-ij0sxa{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-ij0sxa{position:relative}.floorplan-radar-plugin__styled-realsee .floorplan-plugin__styled-image{filter:drop-shadow(0.0625rem 0 0 #fff) drop-shadow(-0.0625rem 0 0 #fff) drop-shadow(0 0.0625rem 0 #fff) drop-shadow(0 -0.0625rem 0 #fff)}")}function zf(n){let t,e,i,s,o=n[10]!==0&&Of(n);return{c(){t=U("div"),o&&o.c(),P(t,"class","plugin-floorplan-radar svelte-ij0sxa")},m(r,a){Z(r,t,a),o&&o.m(t,null),e=!0,i||(s=[oi(_i.call(null,t)),_e(t,"clientWidth",n[16]),_e(t,"clientHeight",n[17])],i=!0)},p(r,a){r[10]!==0?o?(o.p(r,a),a&1024&&H(o,1)):(o=Of(r),o.c(),H(o,1),o.m(t,null)):o&&(xe(),Y(o,1,1,()=>{o=null}),Se())},i(r){e||(H(o),e=!0)},o(r){Y(o),e=!1},d(r){r&&X(t),o&&o.d(),i=!1,dt(s)}}}function Of(n){let t,e,i,s,o=`${n[12]}px`,r=`${n[14]}px`,a;const l=[{five:n[0],pxmm:n[13],floorIndex:n[9],floorplanData:n[3],hoverEnable:n[2],extraObjects:n[5],highlightData:n[6],missingFloorImageUrl:n[7],styledFloorplanEnable:n[8]}];let c={};for(let d=0;d<l.length;d+=1)c=pt(c,l[d]);e=new bC({props:c});const h=[{pxmm:n[13],five:n[0],floorplanData:n[3],cameraImageUrl:n[4]}];let u={};for(let d=0;d<h.length;d+=1)u=pt(u,h[d]);return s=new iC({props:u}),{c(){t=U("div"),ge(e.$$.fragment),i=ue(),ge(s.$$.fragment),P(t,"class","plugin-floorplan-radar-container svelte-ij0sxa"),Pe(t,"floorplan-radar-plugin__styled-realsee",!!n[15]),_(t,"width",o),_(t,"height",r)},m(d,p){Z(d,t,p),pe(e,t,null),B(t,i),pe(s,t,null),a=!0},p(d,p){const m=p&9197?yt(l,[{five:d[0],pxmm:d[13],floorIndex:d[9],floorplanData:d[3],hoverEnable:d[2],extraObjects:d[5],highlightData:d[6],missingFloorImageUrl:d[7],styledFloorplanEnable:d[8]}]):{};e.$set(m);const g=p&8217?yt(h,[{pxmm:d[13],five:d[0],floorplanData:d[3],cameraImageUrl:d[4]}]):{};s.$set(g),(!a||p&32768)&&Pe(t,"floorplan-radar-plugin__styled-realsee",!!d[15]),p&4096&&o!==(o=`${d[12]}px`)&&_(t,"width",o),p&16384&&r!==(r=`${d[14]}px`)&&_(t,"height",r)},i(d){a||(H(e.$$.fragment,d),H(s.$$.fragment,d),a=!0)},o(d){Y(e.$$.fragment,d),Y(s.$$.fragment,d),a=!1},d(d){d&&X(t),me(e),me(s)}}}function wC(n){let t,e,i=n[1]&&zf(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[1]?i?(i.p(s,o),o&2&&H(i,1)):(i=zf(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function PC(n,t,e){var L,R;let i,{five:s}=t,{visible:o}=t,{hoverEnable:r}=t,{floorplanData:a}=t,{cameraImageUrl:l}=t,{extraObjects:c=[]}=t,{highlightData:h}=t,{missingFloorImageUrl:u}=t,{styledFloorplanEnable:d=!1}=t,p=0,m=(R=(L=s.work.observers[s.getCurrentState().panoIndex])==null?void 0:L.floorIndex)!=null?R:0,g=0,v=0,y=0,w=0;function C(z){e(9,m=s.work.observers[z].floorIndex)}zt(()=>(s.on("panoArrived",C),()=>{s.off("panoArrived",C)}));const E=z=>{e(10,g=z.detail)},D=z=>{e(11,v=z.detail)};return n.$$set=z=>{"five"in z&&e(0,s=z.five),"visible"in z&&e(1,o=z.visible),"hoverEnable"in z&&e(2,r=z.hoverEnable),"floorplanData"in z&&e(3,a=z.floorplanData),"cameraImageUrl"in z&&e(4,l=z.cameraImageUrl),"extraObjects"in z&&e(5,c=z.extraObjects),"highlightData"in z&&e(6,h=z.highlightData),"missingFloorImageUrl"in z&&e(7,u=z.missingFloorImageUrl),"styledFloorplanEnable"in z&&e(8,d=z.styledFloorplanEnable)},n.$$.update=()=>{var z;if(n.$$.dirty&776&&e(15,i=d?(z=a.styledFloorplan)==null?void 0:z.floors.find(O=>O.floorIndex===m):void 0),n.$$.dirty&7176){const O=Math.min(g,v),{max:A,min:M}=a.bounding,I=A.x-M.x,k=A.y-M.y,x=function(){return I>k?[O,O/I*k]:[O/k*I,O]}();e(12,y=x[0]),e(14,w=x[1]),e(13,p=y/I)}},[s,o,r,a,l,c,h,u,d,m,g,v,y,p,w,i,E,D]}let CC=class extends Ee{constructor(t){super(),Ie(this,t,PC,wC,Me,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5,highlightData:6,missingFloorImageUrl:7,styledFloorplanEnable:8},AC)}},MC=class extends pn{constructor(e,i){super(e);f(this,"name","panoFloorplanRadarPlugin");f(this,"state");f(this,"data");f(this,"app");f(this,"wrapperSelector","");f(this,"wrapper",null);f(this,"disposed",!1);f(this,"extraObjects",[]);f(this,"highlightData",{});f(this,"dispose",()=>{var e;this.disposed=!0,(e=this.app)==null||e.$destroy(),this.wrapper=null,this.wrapperSelector="",this.hooks.emit("dispose")});f(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});f(this,"unhighlight",()=>{this.highlightData={},this.render()});f(this,"_disable",e=>{var s;const{userAction:i}=e;(s=this.app)==null||s.$destroy(),this.app=void 0,this.hooks.emit("disable",{userAction:i})});this.five=e;const s={styledFloorplanEnable:!1,hoverEnable:!1,highlightEnable:!1,cameraImageUrl:hn,missingFloorImageUrl:Wi(i==null?void 0:i.staticPrefix,cs)},o=V(V({},s),i==null?void 0:i.configs);this.state={enabled:!0,visible:!0,config:o},i!=null&&i.wrapper&&console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法"),typeof(i==null?void 0:i.wrapper)=="string"?this.wrapperSelector=i.wrapper:(i==null?void 0:i.wrapper)instanceof Element&&(this.wrapper=i.wrapper),e.once("dispose",this.dispose)}load(e,i,s=!0){return $(this,null,function*(){function o(c){return Object.prototype.hasOwnProperty.apply(c,["version"])}const r=JSON.parse(JSON.stringify(e)),a=o(r)?r.data:r,l=this.data;this.data=yield un(a),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,l),i&&this.updateState(i,s),this.render()})}show(){return $(this,arguments,function*(e={}){if(this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},i),this._show({userAction:i})})}hide(){return $(this,arguments,function*(e={}){if(!this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},i),this._hide({userAction:i})})}enable(e={}){if(this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||i),this._enable({userAction:i})}disable(e={}){if(!this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||i),this._disable({userAction:i})}setState(e,i={}){const s=this.state,o=i.userAction!==void 0?i.userAction:!0;if(this.updateState(e,o),e.enabled!==void 0&&s.enabled!==e.enabled){const r={userAction:o};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&s.visible!==e.visible){const r={userAction:o};e.visible?this._show(r):this._hide(r)}}appendTo(e){this.wrapper!==e&&this.app&&(this.app.$destroy(),this.app=void 0),this.wrapper=e,this.render()}changeConfigs(e,i=!0){this.setState({config:e},{userAction:i}),this.render()}setExtraObjectsWith3DPositions(e){this.data&&(this.extraObjects=a1(e,this.five,this.data),this.render())}formatData(e){return $(this,null,function*(){return yield un(e.data)})}_enable(e){const{userAction:i}=e;this.hooks.emit("enable",{userAction:i}),this.state.visible&&this._show({userAction:i})}_show(e){if(this.disposed||!this.state.enabled)return;const{userAction:i}=e;this.hooks.emit("show",{userAction:i}),this.render()}_hide(e){if(this.disposed||!this.state.enabled)return;const{userAction:i}=e;this.hooks.emit("hide",{userAction:i}),this.render()}updateState(e,i){const s=this.state,o=e.config?V(V({},s.config),e.config):s.config;this.state=de(V(V({},this.state),e),{config:o}),!Wt(this.state,s,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:i})}render(){if(this.disposed||!this.state.enabled)return;if(!this.wrapper&&this.wrapperSelector){const i=document.querySelector(this.wrapperSelector);this.wrapper=i}if(!this.data||!this.wrapper)return;const e=de(V({},this.state.config),{five:this.five,floorplanData:this.data,visible:this.state.visible,extraObjects:this.extraObjects,highlightData:this.highlightData});this.app?this.app.$set(e):this.app=new CC({target:this.wrapper,props:e})}};const IC=(n,t)=>new MC(n,t);function EC(n){Le(n,"svelte-ryb078",".plugin-radar__camera-wrapper.svelte-ryb078{width:100%;height:100%;position:absolute;pointer-events:none;z-index:20}.plugin-radar__camera-position.svelte-ryb078{position:absolute;left:0;top:0;width:0;height:0;transform:none;pointer-events:none;transition:transform 1s linear;transform-origin:0 0;z-index:20}.plugin-radar__camera-rotate.svelte-ryb078{position:absolute;transform:rotate(45deg);background-repeat:no-repeat;background-size:100%;z-index:20}.floorplan-guide-plugin__styled-realsee .floorplan-guide-plugin__default-camera.svelte-ryb078::after{content:'';position:absolute;left:var(--camera-offset);top:var(--camera-offset);width:33.333%;height:33.333%;border-radius:50%;background:#3366ff;transform:translate(-50%, -50%)}")}function kC(n){let t,e,i,s=`${n[1]}px`,o=`${n[1]}px`,r=`-${n[2]}px`,a=`-${n[2]}px`,l=`${n[2]}px`,c=`${n[2]}px ${n[2]}px`;return{c(){t=U("div"),e=U("div"),i=U("div"),P(i,"class","plugin-radar__camera-rotate svelte-ryb078"),_(i,"background-image","url("+(n[0]||hn)+")"),Pe(i,"floorplan-guide-plugin__default-camera",n[0]===hh),_(i,"transform",n[4]),_(i,"width",s),_(i,"height",o),_(i,"left",r),_(i,"top",a),_(i,"--camera-offset",l),_(i,"transform-origin",c),P(e,"class","plugin-radar__camera-position svelte-ryb078"),_(e,"transform",n[3]),P(t,"class","plugin-radar__camera-wrapper svelte-ryb078"),_(t,"opacity",n[5]?1:0)},m(h,u){Z(h,t,u),B(t,e),B(e,i)},p(h,[u]){u&1&&_(i,"background-image","url("+(h[0]||hn)+")"),u&1&&Pe(i,"floorplan-guide-plugin__default-camera",h[0]===hh);const d=u&1;(d||u&17)&&_(i,"transform",h[4]),(d||u&3&&s!==(s=`${h[1]}px`))&&_(i,"width",s),(d||u&3&&o!==(o=`${h[1]}px`))&&_(i,"height",o),(d||u&5&&r!==(r=`-${h[2]}px`))&&_(i,"left",r),(d||u&5&&a!==(a=`-${h[2]}px`))&&_(i,"top",a),(d||u&5&&l!==(l=`${h[2]}px`))&&_(i,"--camera-offset",l),(d||u&5&&c!==(c=`${h[2]}px ${h[2]}px`))&&_(i,"transform-origin",c),u&8&&_(e,"transform",h[3]),u&32&&_(t,"opacity",h[5]?1:0)},i:ce,o:ce,d(h){h&&X(t)}}}function xC(n){return`rotate(${Math.floor(n/Math.PI*180)*-1+45}deg)`}function SC(n,t,e){var C,E;let i,s,o,{five:r}=t,{pxmm:a}=t,{floorplanData:l}=t,{cameraImageUrl:c}=t,{cameraSize:h=36}=t,{cameraOffset:u=28.5}=t,d=r.getCurrentState().panoIndex,p=r.getCurrentState().longitude,m=(E=(C=r.work.observers[r.getCurrentState().panoIndex])==null?void 0:C.floorIndex)!=null?E:0,g="";function v(D){e(9,d=D)}function y(D){e(11,m=r.work.observers[D].floorIndex)}const w=ta(D=>{e(10,p=D.longitude)},1e3/60);return zt(()=>(r.on("panoWillArrive",v),r.on("panoArrived",y),r.on("cameraDirectionUpdate",w),function(){r.off("panoWillArrive",v),r.off("panoArrived",y),r.off("cameraDirectionUpdate",w)})),n.$$set=D=>{"five"in D&&e(6,r=D.five),"pxmm"in D&&e(7,a=D.pxmm),"floorplanData"in D&&e(8,l=D.floorplanData),"cameraImageUrl"in D&&e(0,c=D.cameraImageUrl),"cameraSize"in D&&e(1,h=D.cameraSize),"cameraOffset"in D&&e(2,u=D.cameraOffset)},n.$$.update=()=>{if(n.$$.dirty&2304&&e(12,i=l.floorDatas[m]),n.$$.dirty&4096&&e(5,s=i.rooms.length>0),n.$$.dirty&896){const D=l.observers[d];if(!D)e(3,g="");else{const L=(l.bounding.max.x-l.bounding.min.x)*a,R=(l.bounding.max.y-l.bounding.min.y)*a,z=Math.floor(D.positionInImage.x*L),O=Math.floor(D.positionInImage.y*R);e(3,g=`translate(${z}px, ${O}px)`)}}n.$$.dirty&1024&&e(4,o=xC(p))},[c,h,u,g,o,s,r,a,l,d,p,m,i]}class TC extends Ee{constructor(t){super(),Ie(this,t,SC,kC,Me,{five:6,pxmm:7,floorplanData:8,cameraImageUrl:0,cameraSize:1,cameraOffset:2},EC)}}function DC(n){Le(n,"svelte-1i87fz7",".plugin-pano-floorplan__extra-objects.svelte-1i87fz7{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.plugin-pano-floorplan__extra-object-item--position.svelte-1i87fz7{position:absolute;width:0;height:0}.plugin-pano-floorplan__extra-object-item.svelte-1i87fz7{transform:translate(-50%, -50%)}")}function jf(n,t,e){const i=n.slice();return i[1]=t[e],i}function Rf(n,t){let e,i,s=`${t[1].icon.width/16}rem`,o=`${t[1].icon.height/16}rem`,r,a=`${t[1].positionInImage.y*100}%`,l=`${t[1].positionInImage.x*100}%`;return{key:n,first:null,c(){e=U("div"),i=U("div"),r=ue(),P(i,"class","plugin-pano-floorplan__extra-object-item svelte-1i87fz7"),_(i,"background-image",`url(${t[1].icon.url})`),_(i,"width",s),_(i,"height",o),P(e,"class","plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7"),_(e,"top",a),_(e,"left",l),this.first=e},m(c,h){Z(c,e,h),B(e,i),B(e,r)},p(c,h){t=c,h&1&&_(i,"background-image",`url(${t[1].icon.url})`);const u=h&1;u&&_(i,"width",s),u&&_(i,"height",o),h&1&&a!==(a=`${t[1].positionInImage.y*100}%`)&&_(e,"top",a),h&1&&l!==(l=`${t[1].positionInImage.x*100}%`)&&_(e,"left",l)},d(c){c&&X(e)}}}function LC(n){let t,e=[],i=new Map,s=n[0];const o=r=>r[1].id;for(let r=0;r<s.length;r+=1){let a=jf(n,s,r),l=o(a);i.set(l,e[r]=Rf(l,a))}return{c(){t=U("div");for(let r=0;r<e.length;r+=1)e[r].c();P(t,"class","plugin-pano-floorplan__extra-objects svelte-1i87fz7")},m(r,a){Z(r,t,a);for(let l=0;l<e.length;l+=1)e[l]&&e[l].m(t,null)},p(r,[a]){a&1&&(s=r[0],e=ai(e,a,o,1,r,s,i,t,la,Rf,null,jf))},i:ce,o:ce,d(r){r&&X(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function zC(n,t,e){let{extraObjects:i=[]}=t;return n.$$set=s=>{"extraObjects"in s&&e(0,i=s.extraObjects)},[i]}class OC extends Ee{constructor(t){super(),Ie(this,t,zC,LC,Me,{extraObjects:0},DC)}}function jC(n){let t,e,i,s,o,r,a;const l=[VC,_C],c=[];function h(d,p){return d[7]&&d[9]?0:1}t=h(n),e=c[t]=l[t](n),s=new OC({props:{extraObjects:n[8]}});let u=n[3]&&_f(n);return{c(){e.c(),i=ue(),ge(s.$$.fragment),o=ue(),u&&u.c(),r=Be()},m(d,p){c[t].m(d,p),Z(d,i,p),pe(s,d,p),Z(d,o,p),u&&u.m(d,p),Z(d,r,p),a=!0},p(d,p){let m=t;t=h(d),t===m?c[t].p(d,p):(xe(),Y(c[m],1,1,()=>{c[m]=null}),Se(),e=c[t],e?e.p(d,p):(e=c[t]=l[t](d),e.c()),H(e,1),e.m(i.parentNode,i));const g={};p&256&&(g.extraObjects=d[8]),s.$set(g),d[3]?u?(u.p(d,p),p&8&&H(u,1)):(u=_f(d),u.c(),H(u,1),u.m(r.parentNode,r)):u&&(xe(),Y(u,1,1,()=>{u=null}),Se())},i(d){a||(H(e),H(s.$$.fragment,d),H(u),a=!0)},o(d){Y(e),Y(s.$$.fragment,d),Y(u),a=!1},d(d){c[t].d(d),d&&X(i),me(s,d),d&&X(o),u&&u.d(d),d&&X(r)}}}function RC(n){let t,e;return t=new o1({props:{missingFloorConfig:n[6]}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&64&&(o.missingFloorConfig=i[6]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function _C(n){let t,e;const i=[{floorIndex:n[2],floorplanData:n[4]}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new Su({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r&20?yt(i,[{floorIndex:o[2],floorplanData:o[4]}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function VC(n){let t,e;return t=new u1({props:{image:n[7].guide,transform:n[9],zIndex:0}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&128&&(o.image=i[7].guide),s&512&&(o.transform=i[9]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function _f(n){let t,e;const i=[{five:n[0],pxmm:n[1],floorIndex:n[2],floorplanData:n[4],onRoomHeightClick:n[11],highlightData:n[5],hoveredRoom:void 0}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new Tu({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r&2103?yt(i,[{five:o[0],pxmm:o[1],floorIndex:o[2],floorplanData:o[4],onRoomHeightClick:o[11],highlightData:o[5],hoveredRoom:void 0}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function FC(n){let t,e,i,s;const o=[RC,jC],r=[];function a(l,c){return!l[10]&&!l[7]?0:1}return t=a(n),e=r[t]=o[t](n),{c(){e.c(),i=Be()},m(l,c){r[t].m(l,c),Z(l,i,c),s=!0},p(l,[c]){let h=t;t=a(l),t===h?r[t].p(l,c):(xe(),Y(r[h],1,1,()=>{r[h]=null}),Se(),e=r[t],e?e.p(l,c):(e=r[t]=o[t](l),e.c()),H(e,1),e.m(i.parentNode,i))},i(l){s||(H(e),s=!0)},o(l){Y(e),s=!1},d(l){r[t].d(l),l&&X(i)}}}function BC(n,t,e){let i,s,o,r,a,{five:l}=t,{pxmm:c}=t,{floorIndex:h}=t,{hoverEnable:u}=t,{floorplanData:d}=t,{extraObjects:p=[]}=t,{highlightData:m}=t,{missingFloorConfig:g}=t,{missingFloorImageUrl:v}=t,{styledFloorplanEnable:y=!1}=t;const w=void 0;return n.$$set=C=>{"five"in C&&e(0,l=C.five),"pxmm"in C&&e(1,c=C.pxmm),"floorIndex"in C&&e(2,h=C.floorIndex),"hoverEnable"in C&&e(3,u=C.hoverEnable),"floorplanData"in C&&e(4,d=C.floorplanData),"extraObjects"in C&&e(12,p=C.extraObjects),"highlightData"in C&&e(5,m=C.highlightData),"missingFloorConfig"in C&&e(6,g=C.missingFloorConfig),"missingFloorImageUrl"in C&&e(13,v=C.missingFloorImageUrl),"styledFloorplanEnable"in C&&e(14,y=C.styledFloorplanEnable)},n.$$.update=()=>{var C;n.$$.dirty&20&&e(15,i=d.floorDatas[h]),n.$$.dirty&32768&&e(10,s=i.rooms.length>0),n.$$.dirty&16404&&e(7,o=y?(C=d.styledFloorplan)==null?void 0:C.floors.find(E=>E.floorIndex===h):void 0),n.$$.dirty&146&&e(9,r=o?d1(o.guide.floorplanToImage,d.bounding,c):void 0),n.$$.dirty&4100&&e(8,a=p==null?void 0:p.filter(E=>E.floorIndex===h))},[l,c,h,u,d,m,g,o,a,r,s,w,p,v,y,i]}class HC extends Ee{constructor(t){super(),Ie(this,t,BC,FC,Me,{five:0,pxmm:1,floorIndex:2,hoverEnable:3,floorplanData:4,extraObjects:12,highlightData:5,missingFloorConfig:6,missingFloorImageUrl:13,styledFloorplanEnable:14})}}function NC(n){Le(n,"svelte-13ou6ew",".floorplan-guide-plugin__observer-dots.svelte-13ou6ew{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:10}.floorplan-guide-plugin__observer-dot.svelte-13ou6ew{position:absolute;background:#7dacff80;border:0.0375rem solid #96cfff;border-radius:50%;pointer-events:none;transform:translate(-50%, -50%);transition:opacity 0.8s ease-in-out}.floorplan-guide-plugin__styled-realsee .floorplan-guide-plugin__observer-dot.svelte-13ou6ew{background:#3366ff66;border:0;box-shadow:inset 0 0 0 0.03125rem #3366ff}")}function Vf(n,t,e){const i=n.slice();return i[6]=t[e],i}function Ff(n,t){let e;return{key:n,first:null,c(){e=U("div"),P(e,"class","floorplan-guide-plugin__observer-dot svelte-13ou6ew"),_(e,"left",t[6].positionInImage.x*t[0]+"px"),_(e,"top",t[6].positionInImage.y*t[1]+"px"),_(e,"width",t[2]+"px"),_(e,"height",t[2]+"px"),this.first=e},m(i,s){Z(i,e,s)},p(i,s){t=i,s&9&&_(e,"left",t[6].positionInImage.x*t[0]+"px"),s&10&&_(e,"top",t[6].positionInImage.y*t[1]+"px"),s&4&&_(e,"width",t[2]+"px"),s&4&&_(e,"height",t[2]+"px")},d(i){i&&X(e)}}}function GC(n){let t,e=[],i=new Map,s=n[3];const o=r=>r[6].index;for(let r=0;r<s.length;r+=1){let a=Vf(n,s,r),l=o(a);i.set(l,e[r]=Ff(l,a))}return{c(){t=U("div");for(let r=0;r<e.length;r+=1)e[r].c();P(t,"class","floorplan-guide-plugin__observer-dots svelte-13ou6ew")},m(r,a){Z(r,t,a);for(let l=0;l<e.length;l+=1)e[l]&&e[l].m(t,null)},p(r,[a]){a&15&&(s=r[3],e=ai(e,a,o,1,r,s,i,t,la,Ff,null,Vf))},i:ce,o:ce,d(r){r&&X(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function WC(n,t,e){let i,{floorplanData:s}=t,{floorIndex:o}=t,{contentWidth:r}=t,{contentHeight:a}=t,{observerDotSize:l=12}=t;return n.$$set=c=>{"floorplanData"in c&&e(4,s=c.floorplanData),"floorIndex"in c&&e(5,o=c.floorIndex),"contentWidth"in c&&e(0,r=c.contentWidth),"contentHeight"in c&&e(1,a=c.contentHeight),"observerDotSize"in c&&e(2,l=c.observerDotSize)},n.$$.update=()=>{var c,h;n.$$.dirty&48&&e(3,i=(h=(c=s.observers)==null?void 0:c.filter(u=>u.floorIndex===o))!=null?h:[])},[r,a,l,i,s,o]}class UC extends Ee{constructor(t){super(),Ie(this,t,WC,GC,Me,{floorplanData:4,floorIndex:5,contentWidth:0,contentHeight:1,observerDotSize:2},NC)}}function QC(n){Le(n,"svelte-qulme3",".floorplan-guide-plugin__room-label.svelte-qulme3{position:absolute;display:flex;flex-direction:column;align-items:center;transform:translate(-50%, -50%);color:#fff;text-shadow:0.0625rem 0.0625rem 0.125rem rgba(0, 0, 0, 0.8);line-height:1.2;white-space:nowrap;pointer-events:auto;cursor:pointer;transition:opacity 300ms;opacity:1}.floorplan-guide-plugin__room-label--hidden.svelte-qulme3{opacity:0}.floorplan-guide-plugin__room-label--hovered.svelte-qulme3{opacity:1 !important}.floorplan-guide-plugin__room-content.svelte-qulme3{display:flex;flex-direction:column;align-items:center}.floorplan-guide-plugin__room-name.svelte-qulme3{font-family:PingFangSC-Regular;font-weight:400;font-size:0.875rem;color:#FFFFFF;margin-bottom:0.125rem}.floorplan-guide-plugin__room-area.svelte-qulme3{opacity:0.6;font-family:PingFangSC-Regular;font-weight:400;font-size:0.75rem;color:#FFFFFF;text-align:center}")}function XC(n){let t,e,i=n[2]&&n[0]&&Bf(n),s=n[3]&&n[4]&&Hf(n);return{c(){t=U("div"),i&&i.c(),e=ue(),s&&s.c(),P(t,"class","floorplan-guide-plugin__room-content svelte-qulme3")},m(o,r){Z(o,t,r),i&&i.m(t,null),B(t,e),s&&s.m(t,null)},p(o,r){o[2]&&o[0]?i?i.p(o,r):(i=Bf(o),i.c(),i.m(t,e)):i&&(i.d(1),i=null),o[3]&&o[4]?s?s.p(o,r):(s=Hf(o),s.c(),s.m(t,null)):s&&(s.d(1),s=null)},d(o){o&&X(t),i&&i.d(),s&&s.d()}}}function YC(n){let t,e=n[5].outerHTML+"",i;return{c(){t=new Bo(!1),i=Be(),t.a=i},m(s,o){t.m(e,s,o),Z(s,i,o)},p(s,o){o&32&&e!==(e=s[5].outerHTML+"")&&t.p(e)},d(s){s&&X(i),s&&t.d()}}}function Bf(n){let t,e;return{c(){t=U("span"),e=Fe(n[0]),P(t,"class","floorplan-guide-plugin__room-name svelte-qulme3")},m(i,s){Z(i,t,s),B(t,e)},p(i,s){s&1&&Ne(e,i[0])},d(i){i&&X(t)}}}function Hf(n){let t,e;return{c(){t=U("span"),e=Fe(n[4]),P(t,"class","floorplan-guide-plugin__room-area svelte-qulme3")},m(i,s){Z(i,t,s),B(t,e)},p(i,s){s&16&&Ne(e,i[4])},d(i){i&&X(t)}}}function ZC(n){let t,e,i;function s(a,l){return a[5]?YC:XC}let o=s(n),r=o(n);return{c(){t=U("div"),r.c(),P(t,"class","floorplan-guide-plugin__room-label svelte-qulme3"),P(t,"role","button"),P(t,"tabindex","0"),Pe(t,"floorplan-guide-plugin__room-label--hovered",n[1]),Pe(t,"floorplan-guide-plugin__room-label--hidden",!n[10]),_(t,"left",n[6]),_(t,"top",n[7])},m(a,l){Z(a,t,l),r.m(t,null),e||(i=[_e(t,"mouseenter",n[18]),_e(t,"mouseleave",n[19]),_e(t,"keydown",qC),oi(_i.call(null,t)),_e(t,"clientWidth",n[20]),_e(t,"clientHeight",n[21])],e=!0)},p(a,[l]){o===(o=s(a))&&r?r.p(a,l):(r.d(1),r=o(a),r&&(r.c(),r.m(t,null))),l&2&&Pe(t,"floorplan-guide-plugin__room-label--hovered",a[1]),l&1024&&Pe(t,"floorplan-guide-plugin__room-label--hidden",!a[10]),l&64&&_(t,"left",a[6]),l&128&&_(t,"top",a[7])},i:ce,o:ce,d(a){a&&X(t),r.d(),e=!1,dt(i)}}}const qC=()=>{};function JC(n,t,e){let i,s,o,{room:r}=t,{roomName:a}=t,{isHovered:l}=t,{roomNameEnable:c}=t,{roomAreaEnable:h}=t,{roomAreaSize:u}=t,{userConfigElement:d}=t,{adaptiveRoomLabelVisibleEnable:p}=t,{pxmm:m}=t,{left:g}=t,{top:v}=t,{createLabelInRoomChecker:y}=t;const w=Vn();let C=0,E=0;const D=()=>w("mouseenter"),L=()=>w("mouseleave"),R=O=>{e(8,C=O.detail)},z=O=>{e(9,E=O.detail)};return n.$$set=O=>{"room"in O&&e(12,r=O.room),"roomName"in O&&e(0,a=O.roomName),"isHovered"in O&&e(1,l=O.isHovered),"roomNameEnable"in O&&e(2,c=O.roomNameEnable),"roomAreaEnable"in O&&e(3,h=O.roomAreaEnable),"roomAreaSize"in O&&e(4,u=O.roomAreaSize),"userConfigElement"in O&&e(5,d=O.userConfigElement),"adaptiveRoomLabelVisibleEnable"in O&&e(13,p=O.adaptiveRoomLabelVisibleEnable),"pxmm"in O&&e(14,m=O.pxmm),"left"in O&&e(6,g=O.left),"top"in O&&e(7,v=O.top),"createLabelInRoomChecker"in O&&e(15,y=O.createLabelInRoomChecker)},n.$$.update=()=>{n.$$.dirty&768&&e(17,i={width:C,height:E}),n.$$.dirty&167936&&e(16,s=i?y(r,i):void 0),n.$$.dirty&90114&&e(10,o=p?l||(s?s(m):!0):!0)},[a,l,c,h,u,d,g,v,C,E,o,w,r,p,m,y,s,i,D,L,R,z]}class KC extends Ee{constructor(t){super(),Ie(this,t,JC,ZC,Me,{room:12,roomName:0,isHovered:1,roomNameEnable:2,roomAreaEnable:3,roomAreaSize:4,userConfigElement:5,adaptiveRoomLabelVisibleEnable:13,pxmm:14,left:6,top:7,createLabelInRoomChecker:15},QC)}}const{Map:$C}=qv;function e5(n){Le(n,"svelte-k2rax0",".floorplan-guide-plugin__room-labels.svelte-k2rax0{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:15}")}function Nf(n,t,e){const i=n.slice();return i[23]=t[e].room,i[24]=t[e].label,i[25]=t[e].roomName,i}function Gf(n,t){let e,i,s;function o(...a){return t[20](t[24],...a)}function r(){return t[21](t[23])}return i=new KC({props:{room:t[23],roomName:t[25],isHovered:t[7]===t[23].id,roomNameEnable:t[0],roomAreaEnable:t[1],roomAreaSize:t[23].size?t[3](t[23].size):"",userConfigElement:t[4]?t[4](t[23]):null,adaptiveRoomLabelVisibleEnable:t[2],pxmm:t[6],left:t[24].positionInImage.x*100+"%",top:t[24].positionInImage.y*100+"%",createLabelInRoomChecker:o}}),i.$on("mouseenter",r),i.$on("mouseleave",t[10]),{key:n,first:null,c(){e=Be(),ge(i.$$.fragment),this.first=e},m(a,l){Z(a,e,l),pe(i,a,l),s=!0},p(a,l){t=a;const c={};l&256&&(c.room=t[23]),l&256&&(c.roomName=t[25]),l&384&&(c.isHovered=t[7]===t[23].id),l&1&&(c.roomNameEnable=t[0]),l&2&&(c.roomAreaEnable=t[1]),l&264&&(c.roomAreaSize=t[23].size?t[3](t[23].size):""),l&272&&(c.userConfigElement=t[4]?t[4](t[23]):null),l&4&&(c.adaptiveRoomLabelVisibleEnable=t[2]),l&64&&(c.pxmm=t[6]),l&256&&(c.left=t[24].positionInImage.x*100+"%"),l&256&&(c.top=t[24].positionInImage.y*100+"%"),l&256&&(c.createLabelInRoomChecker=o),i.$set(c)},i(a){s||(H(i.$$.fragment,a),s=!0)},o(a){Y(i.$$.fragment,a),s=!1},d(a){a&&X(e),me(i,a)}}}function t5(n){let t,e=[],i=new $C,s,o,r,a=n[8];const l=c=>c[23].id;for(let c=0;c<a.length;c+=1){let h=Nf(n,a,c),u=l(h);i.set(u,e[c]=Gf(u,h))}return{c(){t=U("div");for(let c=0;c<e.length;c+=1)e[c].c();P(t,"class","floorplan-guide-plugin__room-labels svelte-k2rax0")},m(c,h){Z(c,t,h);for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(t,null);s=!0,o||(r=[oi(_i.call(null,t)),_e(t,"clientWidth",n[22])],o=!0)},p(c,[h]){h&2015&&(a=c[8],xe(),e=ai(e,h,l,1,c,a,i,t,fn,Gf,null,Nf),Se())},i(c){if(!s){for(let h=0;h<a.length;h+=1)H(e[h]);s=!0}},o(c){for(let h=0;h<e.length;h+=1)Y(e[h]);s=!1},d(c){c&&X(t);for(let h=0;h<e.length;h+=1)e[h].d();o=!1,dt(r)}}}function i5(n,t){const e=n[0],i=n[1];let s=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){const a=t[o][0],l=t[o][1],c=t[r][0],h=t[r][1];l>i!=h>i&&e<(c-a)*(i-l)/(h-l)+a&&(s=!s)}return s}function n5(n,t,e=n.roomLabel.position){if(t.width===0||t.height===0)return()=>!1;const i=n.path.map(({x:h,y:u})=>[h,u]),{x:s,y:o}=e,{width:r,height:a}=t,l=r/2,c=a/2;return function(u){const d=s*u,p=o*u,m=i.map(([v,y])=>[v*u,y*u]);return[[d+l,p-c],[d-l,p-c],[d-l,p+c],[d+l,p+c]].every(v=>i5(v,m))}}function s5(n,t,e){let i,s,o,r,{floorplanData:a}=t,{floorIndex:l}=t,{roomNameEnable:c=!0}=t,{roomNameOtherTypeEnable:h=!0}=t,{roomAreaEnable:u=!0}=t,{adaptiveRoomLabelVisibleEnable:d=!0}=t,{getRoomAreaText:p}=t,{getLabelElement:m}=t,{locale:g}=t,{styledFloorplanEnable:v=!1}=t,{styledRoomLabels:y}=t,w=0,C=0,E=null;function D(A){e(7,E=A.id)}function L(){e(7,E=null)}const R=(A,M,I)=>n5(M,I,A.position),z=A=>D(A),O=A=>{e(5,w=A.detail)};return n.$$set=A=>{"floorplanData"in A&&e(11,a=A.floorplanData),"floorIndex"in A&&e(12,l=A.floorIndex),"roomNameEnable"in A&&e(0,c=A.roomNameEnable),"roomNameOtherTypeEnable"in A&&e(13,h=A.roomNameOtherTypeEnable),"roomAreaEnable"in A&&e(1,u=A.roomAreaEnable),"adaptiveRoomLabelVisibleEnable"in A&&e(2,d=A.adaptiveRoomLabelVisibleEnable),"getRoomAreaText"in A&&e(3,p=A.getRoomAreaText),"getLabelElement"in A&&e(4,m=A.getLabelElement),"locale"in A&&e(14,g=A.locale),"styledFloorplanEnable"in A&&e(15,v=A.styledFloorplanEnable),"styledRoomLabels"in A&&e(16,y=A.styledRoomLabels)},n.$$.update=()=>{var A,M;if(n.$$.dirty&6144&&e(19,i=(M=(A=a.floorDatas[l])==null?void 0:A.rooms)!=null?M:[]),n.$$.dirty&532480&&e(18,s=h?i:i.filter(I=>I.roomType!=="100900000012")),n.$$.dirty&65536&&e(17,o=new Map(y==null?void 0:y.map(I=>[I.roomId,I]))),n.$$.dirty&442368&&e(8,r=s.flatMap(I=>{var S,j;const k=o.get(I.id),x=v?k:I.roomLabel;return x?v?[{room:I,label:x,roomName:(j=(S=k==null?void 0:k.names)==null?void 0:S[g])!=null?j:""}]:[{room:I,label:x,roomName:I.name}]:[]})),n.$$.dirty&2080){const{max:I,min:k}=a.bounding,x=I.x-k.x;e(6,C=w/x)}},[c,u,d,p,m,w,C,E,r,D,L,a,l,h,g,v,y,o,s,i,R,z,O]}class o5 extends Ee{constructor(t){super(),Ie(this,t,s5,t5,Me,{floorplanData:11,floorIndex:12,roomNameEnable:0,roomNameOtherTypeEnable:13,roomAreaEnable:1,adaptiveRoomLabelVisibleEnable:2,getRoomAreaText:3,getLabelElement:4,locale:14,styledFloorplanEnable:15,styledRoomLabels:16},e5)}}function r5(n){Le(n,"svelte-19jnco7",".floorplan-plugin__compass.svelte-19jnco7{position:absolute;will-change:opacity}.floorplan-plugin__compass-image.svelte-19jnco7{width:14.4375rem;height:2.5625rem;position:absolute;left:50%;top:50%;transform:translateX(-50%) translateY(-50%);opacity:0.1;background-repeat:no-repeat;background-size:100% 100%}.floorplan-plugin__compass-text.svelte-19jnco7{position:absolute;left:50%;top:50%;transform:translateX(-50%) translateY(-50%);opacity:0.2;font-weight:bold;font-size:0.625rem;color:#fff}")}function a5(n){let t,e,i,s,o,r=`${n[1]}px`,a=`${n[2]}px`,l=`-${n[2]}px`,c=`${n[5]}px ${n[6]}px`;return{c(){t=U("div"),e=U("div"),i=ue(),s=U("span"),o=Fe(n[0]),P(e,"class","floorplan-plugin__compass-image svelte-19jnco7"),_(e,"background-image",`url(${r1})`),P(s,"class","floorplan-plugin__compass-text svelte-19jnco7"),P(t,"class","floorplan-plugin__compass svelte-19jnco7"),_(t,"transform",n[4]),_(t,"width",r),_(t,"height",a),_(t,"top",l),_(t,"transform-origin",c)},m(h,u){Z(h,t,u),B(t,e),B(t,i),B(t,s),B(s,o)},p(h,u){u&1&&Ne(o,h[0]),u&2&&r!==(r=`${h[1]}px`)&&_(t,"width",r),u&4&&a!==(a=`${h[2]}px`)&&_(t,"height",a),u&4&&l!==(l=`-${h[2]}px`)&&_(t,"top",l)},d(h){h&&X(t)}}}function l5(n){let t,e=n[3]&&a5(n);return{c(){e&&e.c(),t=Be()},m(i,s){e&&e.m(i,s),Z(i,t,s)},p(i,[s]){i[3]&&e.p(i,s)},i:ce,o:ce,d(i){e&&e.d(i),i&&X(t)}}}function c5(n,t,e){var m;let{floorplanData:i}=t,{northDesc:s}=t,{containerWidth:o}=t,{containerHeight:r}=t,{height:a=50}=t;const l=(m=i.entrance)==null?void 0:m.northRad,c=typeof l=="number",u=`rotate(${-(l?di(l):0)+90}deg)`,d=o/2,p=a+r/2;return n.$$set=g=>{"floorplanData"in g&&e(7,i=g.floorplanData),"northDesc"in g&&e(0,s=g.northDesc),"containerWidth"in g&&e(1,o=g.containerWidth),"containerHeight"in g&&e(8,r=g.containerHeight),"height"in g&&e(2,a=g.height)},[s,o,a,c,u,d,p,i,r]}class h5 extends Ee{constructor(t){super(),Ie(this,t,c5,l5,Me,{floorplanData:7,northDesc:0,containerWidth:1,containerHeight:8,height:2},r5)}}function u5(n){Le(n,"svelte-5trsl8",".plugin-floorplan-radar.svelte-5trsl8{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-5trsl8{position:relative}.floorplan-guide-plugin__styled-realsee .floorplan-plugin__styled-image{filter:drop-shadow(0.0625rem 0 0 #fff) drop-shadow(-0.0625rem 0 0 #fff) drop-shadow(0 0.0625rem 0 #fff) drop-shadow(0 -0.0625rem 0 #fff)}.plugin-floorplan-radar-container.floorplan-guide-plugin__styled-realsee .floorplan-guide-plugin__room-label{text-shadow:none}.plugin-floorplan-radar-container.floorplan-guide-plugin__styled-realsee .floorplan-guide-plugin__room-name,.plugin-floorplan-radar-container.floorplan-guide-plugin__styled-realsee .floorplan-guide-plugin__room-area{color:rgba(0, 0, 0, 0.85)}.plugin-floorplan-radar-container.floorplan-guide-plugin__styled-realsee .floorplan-guide-plugin__room-area{font-size:0.625rem;opacity:1}")}function Wf(n){let t,e,i,s,o=n[27]!==0&&Uf(n);return{c(){t=U("div"),o&&o.c(),P(t,"class","plugin-floorplan-radar svelte-5trsl8")},m(r,a){Z(r,t,a),o&&o.m(t,null),e=!0,i||(s=[oi(_i.call(null,t)),_e(t,"clientWidth",n[36]),_e(t,"clientHeight",n[37])],i=!0)},p(r,a){r[27]!==0?o?(o.p(r,a),a[0]&134217728&&H(o,1)):(o=Uf(r),o.c(),H(o,1),o.m(t,null)):o&&(xe(),Y(o,1,1,()=>{o=null}),Se())},i(r){e||(H(o),e=!0)},o(r){Y(o),e=!1},d(r){r&&X(t),o&&o.d(),i=!1,dt(s)}}}function Uf(n){let t,e,i,s=`${n[29]}px`,o=`${n[32]}px`,r,a,l;const c=[{five:n[0],pxmm:n[31],floorIndex:n[21],floorplanData:n[3],hoverEnable:n[2],extraObjects:n[5],highlightData:n[6],missingFloorImageUrl:n[7],missingFloorConfig:n[8],styledFloorplanEnable:n[26]}];let h={};for(let d=0;d<c.length;d+=1)h=pt(h,c[d]);e=new HC({props:h});let u=n[33]&&Qf(n);return{c(){t=U("div"),ge(e.$$.fragment),i=ue(),u&&u.c(),P(t,"class","plugin-floorplan-radar-container svelte-5trsl8"),Pe(t,"floorplan-guide-plugin__styled-realsee",!!n[30]),_(t,"width",s),_(t,"height",o),_(t,"cursor",n[9]?"pointer":"default")},m(d,p){Z(d,t,p),pe(e,t,null),B(t,i),u&&u.m(t,null),r=!0,a||(l=_e(t,"click",n[34]),a=!0)},p(d,p){const m=p[0]&69206509|p[1]&1?yt(c,[{five:d[0],pxmm:d[31],floorIndex:d[21],floorplanData:d[3],hoverEnable:d[2],extraObjects:d[5],highlightData:d[6],missingFloorImageUrl:d[7],missingFloorConfig:d[8],styledFloorplanEnable:d[26]}]):{};e.$set(m),d[33]?u?(u.p(d,p),p[1]&4&&H(u,1)):(u=Qf(d),u.c(),H(u,1),u.m(t,null)):u&&(xe(),Y(u,1,1,()=>{u=null}),Se()),(!r||p[0]&1073741824)&&Pe(t,"floorplan-guide-plugin__styled-realsee",!!d[30]),p[0]&536870912&&s!==(s=`${d[29]}px`)&&_(t,"width",s),p[1]&2&&o!==(o=`${d[32]}px`)&&_(t,"height",o),p[0]&512&&_(t,"cursor",d[9]?"pointer":"default")},i(d){r||(H(e.$$.fragment,d),H(u),r=!0)},o(d){Y(e.$$.fragment,d),Y(u),r=!1},d(d){d&&X(t),me(e),u&&u.d(),a=!1,l()}}}function Qf(n){let t,e,i,s,o,r;const a=[{floorplanData:n[3],floorIndex:n[21],contentWidth:n[29],contentHeight:n[32],observerDotSize:n[20]}];let l={};for(let d=0;d<a.length;d+=1)l=pt(l,a[d]);t=new UC({props:l});let c=n[10]&&Xf(n),h=n[17]&&!n[30]&&Yf(n),u=n[22]&&Zf(n);return{c(){ge(t.$$.fragment),e=ue(),c&&c.c(),i=ue(),h&&h.c(),s=ue(),u&&u.c(),o=Be()},m(d,p){pe(t,d,p),Z(d,e,p),c&&c.m(d,p),Z(d,i,p),h&&h.m(d,p),Z(d,s,p),u&&u.m(d,p),Z(d,o,p),r=!0},p(d,p){const m=p[0]&540016648|p[1]&2?yt(a,[{floorplanData:d[3],floorIndex:d[21],contentWidth:d[29],contentHeight:d[32],observerDotSize:d[20]}]):{};t.$set(m),d[10]?c?(c.p(d,p),p[0]&1024&&H(c,1)):(c=Xf(d),c.c(),H(c,1),c.m(i.parentNode,i)):c&&(xe(),Y(c,1,1,()=>{c=null}),Se()),d[17]&&!d[30]?h?(h.p(d,p),p[0]&1073872896&&H(h,1)):(h=Yf(d),h.c(),H(h,1),h.m(s.parentNode,s)):h&&(xe(),Y(h,1,1,()=>{h=null}),Se()),d[22]?u?(u.p(d,p),p[0]&4194304&&H(u,1)):(u=Zf(d),u.c(),H(u,1),u.m(o.parentNode,o)):u&&(xe(),Y(u,1,1,()=>{u=null}),Se())},i(d){r||(H(t.$$.fragment,d),H(c),H(h),H(u),r=!0)},o(d){Y(t.$$.fragment,d),Y(c),Y(h),Y(u),r=!1},d(d){me(t,d),d&&X(e),c&&c.d(d),d&&X(i),h&&h.d(d),d&&X(s),u&&u.d(d),d&&X(o)}}}function Xf(n){var o;let t,e;const i=[{floorplanData:n[3],floorIndex:n[21],roomNameEnable:n[11],roomNameOtherTypeEnable:n[12],roomAreaEnable:n[13],adaptiveRoomLabelVisibleEnable:n[14],getRoomAreaText:n[15],getLabelElement:n[16],locale:n[25],styledFloorplanEnable:!!n[30],styledRoomLabels:(o=n[30])==null?void 0:o.roomLabels}];let s={};for(let r=0;r<i.length;r+=1)s=pt(s,i[r]);return t=new o5({props:s}),{c(){ge(t.$$.fragment)},m(r,a){pe(t,r,a),e=!0},p(r,a){var c;const l=a[0]&1109522440?yt(i,[{floorplanData:r[3],floorIndex:r[21],roomNameEnable:r[11],roomNameOtherTypeEnable:r[12],roomAreaEnable:r[13],adaptiveRoomLabelVisibleEnable:r[14],getRoomAreaText:r[15],getLabelElement:r[16],locale:r[25],styledFloorplanEnable:!!r[30],styledRoomLabels:(c=r[30])==null?void 0:c.roomLabels}]):{};t.$set(l)},i(r){e||(H(t.$$.fragment,r),e=!0)},o(r){Y(t.$$.fragment,r),e=!1},d(r){me(t,r)}}}function Yf(n){let t,e;const i=[{floorplanData:n[3],northDesc:n[18],containerWidth:n[29],containerHeight:n[32],height:n[19]}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new h5({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r[0]&537657352|r[1]&2?yt(i,[{floorplanData:o[3],northDesc:o[18],containerWidth:o[29],containerHeight:o[32],height:o[19]}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function Zf(n){let t,e;const i=[{pxmm:n[31],five:n[0],floorplanData:n[3],cameraImageUrl:n[4],cameraSize:n[23],cameraOffset:n[24]}];let s={};for(let o=0;o<i.length;o+=1)s=pt(s,i[o]);return t=new TC({props:s}),{c(){ge(t.$$.fragment)},m(o,r){pe(t,o,r),e=!0},p(o,r){const a=r[0]&25165849|r[1]&1?yt(i,[{pxmm:o[31],five:o[0],floorplanData:o[3],cameraImageUrl:o[4],cameraSize:o[23],cameraOffset:o[24]}]):{};t.$set(a)},i(o){e||(H(t.$$.fragment,o),e=!0)},o(o){Y(t.$$.fragment,o),e=!1},d(o){me(t,o)}}}function d5(n){let t,e,i=n[1]&&Wf(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,o){s[1]?i?(i.p(s,o),o[0]&2&&H(i,1)):(i=Wf(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function f5(n,t,e){let i,s,{five:o}=t,{visible:r}=t,{hoverEnable:a}=t,{floorplanData:l}=t,{cameraImageUrl:c}=t,{extraObjects:h=[]}=t,{highlightData:u}=t,{missingFloorImageUrl:d}=t,{missingFloorConfig:p}=t,{clickEnable:m=!0}=t,{roomLabelsEnable:g=!1}=t,{roomNameEnable:v=!0}=t,{roomNameOtherTypeEnable:y=!0}=t,{roomAreaEnable:w=!0}=t,{adaptiveRoomLabelVisibleEnable:C=!0}=t,{getRoomAreaText:E=ee=>(ee/1e6).toFixed(1)+"㎡"}=t,{getLabelElement:D=void 0}=t,{compassEnable:L=!1}=t,{northDesc:R="北"}=t,{compassHeight:z=50}=t,{observerDotSize:O=12}=t,{displayedFloorIndex:A}=t,{shouldShowRadar:M=!0}=t,{cameraSize:I=36}=t,{cameraOffset:k=28.5}=t,{onFloorplanClick:x=void 0}=t,{locale:S}=t,{styledFloorplanEnable:j=!1}=t,F=0,J=0,ne=0,q=0,oe=0;function se(ee){if(!m||!x)return;const le=ee.currentTarget.getBoundingClientRect(),he=ee.clientX-le.left,be=ee.clientY-le.top,te=he/q,ke=be/oe;x({imageX:te,imageY:ke,floorIndex:A,originalEvent:ee})}const ae=ee=>{e(27,J=ee.detail)},ze=ee=>{e(28,ne=ee.detail)};return n.$$set=ee=>{"five"in ee&&e(0,o=ee.five),"visible"in ee&&e(1,r=ee.visible),"hoverEnable"in ee&&e(2,a=ee.hoverEnable),"floorplanData"in ee&&e(3,l=ee.floorplanData),"cameraImageUrl"in ee&&e(4,c=ee.cameraImageUrl),"extraObjects"in ee&&e(5,h=ee.extraObjects),"highlightData"in ee&&e(6,u=ee.highlightData),"missingFloorImageUrl"in ee&&e(7,d=ee.missingFloorImageUrl),"missingFloorConfig"in ee&&e(8,p=ee.missingFloorConfig),"clickEnable"in ee&&e(9,m=ee.clickEnable),"roomLabelsEnable"in ee&&e(10,g=ee.roomLabelsEnable),"roomNameEnable"in ee&&e(11,v=ee.roomNameEnable),"roomNameOtherTypeEnable"in ee&&e(12,y=ee.roomNameOtherTypeEnable),"roomAreaEnable"in ee&&e(13,w=ee.roomAreaEnable),"adaptiveRoomLabelVisibleEnable"in ee&&e(14,C=ee.adaptiveRoomLabelVisibleEnable),"getRoomAreaText"in ee&&e(15,E=ee.getRoomAreaText),"getLabelElement"in ee&&e(16,D=ee.getLabelElement),"compassEnable"in ee&&e(17,L=ee.compassEnable),"northDesc"in ee&&e(18,R=ee.northDesc),"compassHeight"in ee&&e(19,z=ee.compassHeight),"observerDotSize"in ee&&e(20,O=ee.observerDotSize),"displayedFloorIndex"in ee&&e(21,A=ee.displayedFloorIndex),"shouldShowRadar"in ee&&e(22,M=ee.shouldShowRadar),"cameraSize"in ee&&e(23,I=ee.cameraSize),"cameraOffset"in ee&&e(24,k=ee.cameraOffset),"onFloorplanClick"in ee&&e(35,x=ee.onFloorplanClick),"locale"in ee&&e(25,S=ee.locale),"styledFloorplanEnable"in ee&&e(26,j=ee.styledFloorplanEnable)},n.$$.update=()=>{var ee,we;if(n.$$.dirty[0]&69206024&&e(30,i=j?(ee=l.styledFloorplan)==null?void 0:ee.floors.find(le=>le.floorIndex===A):void 0),n.$$.dirty[0]&939524104){const le=Math.min(J,ne),{max:he,min:be}=l.bounding,te=he.x-be.x,ke=he.y-be.y,Re=function(){return te>ke?[le,le/te*ke]:[le/ke*te,le]}();e(29,q=Re[0]),e(32,oe=Re[1]),e(31,F=q/te)}n.$$.dirty[0]&1075838984&&e(33,s=!!i||((we=l.floorDatas[A])==null?void 0:we.rooms.length)>0)},[o,r,a,l,c,h,u,d,p,m,g,v,y,w,C,E,D,L,R,z,O,A,M,I,k,S,j,J,ne,q,i,F,oe,s,se,x,ae,ze]}class p5 extends Ee{constructor(t){super(),Ie(this,t,f5,d5,Me,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5,highlightData:6,missingFloorImageUrl:7,missingFloorConfig:8,clickEnable:9,roomLabelsEnable:10,roomNameEnable:11,roomNameOtherTypeEnable:12,roomAreaEnable:13,adaptiveRoomLabelVisibleEnable:14,getRoomAreaText:15,getLabelElement:16,compassEnable:17,northDesc:18,compassHeight:19,observerDotSize:20,displayedFloorIndex:21,shouldShowRadar:22,cameraSize:23,cameraOffset:24,onFloorplanClick:35,locale:25,styledFloorplanEnable:26},u5,[-1,-1])}}let m5=class extends pn{constructor(e,i){var r,a,l;super(e);f(this,"name","floorplanGuidePlugin");f(this,"state");f(this,"data");f(this,"app");f(this,"wrapperSelector","");f(this,"wrapper",null);f(this,"disposed",!1);f(this,"extraObjects",[]);f(this,"highlightData",{});f(this,"defaultMissingFloorConfig");f(this,"dispose",()=>{var e;this.disposed=!0,(e=this.app)==null||e.$destroy(),this.wrapper=null,this.wrapperSelector="",this.five.off("panoArrived",this.handlePanoArrived),this.hooks.emit("dispose")});f(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});f(this,"unhighlight",()=>{this.highlightData={},this.render()});f(this,"handleFloorplanClick",e=>{var c;const i=(c=this.data)==null?void 0:c.observers;if(!i||i.length===0){console.warn("No floorplan observers found");return}const s=e.imageX,o=e.imageY,r=e.floorIndex;let a=null,l=1/0;i.forEach(h=>{if(h.floorIndex!==r)return;const u=h.positionInImage,d=u.x,p=u.y,m=Math.sqrt(Math.pow(s-d,2)+Math.pow(o-p,2));m<l&&(l=m,a={panoIndex:h.index,distance:m,observer:h})}),a?this.five.emit("wantsToMoveToPano",a.panoIndex,{},!0)||this.five.moveToPano(a.panoIndex):console.warn("No suitable observer found on the same floor")});f(this,"_disable",e=>{var s;const{userAction:i}=e;(s=this.app)==null||s.$destroy(),this.app=void 0,this.hooks.emit("disable",{userAction:i})});f(this,"handlePanoArrived",()=>{var i,s;const e=(s=(i=this.five.work.observers[this.five.getCurrentState().panoIndex])==null?void 0:i.floorIndex)!=null?s:0;this.updateState({displayedFloorIndex:e},!0),this.render()});this.five=e,this.defaultMissingFloorConfig={imageURL:Wi(i==null?void 0:i.staticPrefix,cs),imageWidth:200,imageHeight:120,text:(a=(r=i==null?void 0:i.i18n)==null?void 0:r.call(i,"暂无平面图"))!=null?a:"暂无平面图",textFontSize:14};const s={locale:(l=i==null?void 0:i.locale)!=null?l:"zh-CN",styledFloorplanEnable:!1,hoverEnable:!1,highlightEnable:!1,cameraImageUrl:hh,missingFloorImageUrl:Wi(i==null?void 0:i.staticPrefix,cs),missingFloorConfig:V(V({},this.defaultMissingFloorConfig),i==null?void 0:i.missingFloorConfig),clickEnable:!0,roomLabelsEnable:!1,roomNameEnable:!0,roomNameOtherTypeEnable:!1,roomAreaEnable:!0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:c=>(c/1e6).toFixed(1)+"㎡",getLabelElement:void 0,compassEnable:!1,northDesc:"北",compassHeight:50,observerDotSize:12,cameraSize:36,cameraOffset:28.5,i18n:(i==null?void 0:i.i18n)||(c=>c)},o=V(V({},s),i==null?void 0:i.configs);this.state={enabled:!0,visible:!0,config:o},i!=null&&i.wrapper&&console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法"),typeof(i==null?void 0:i.wrapper)=="string"?this.wrapperSelector=i.wrapper:(i==null?void 0:i.wrapper)instanceof Element&&(this.wrapper=i.wrapper),e.once("dispose",this.dispose),e.on("panoArrived",this.handlePanoArrived)}load(e,i,s=!0){return $(this,null,function*(){function o(c){return Object.prototype.hasOwnProperty.apply(c,["version"])}const r=JSON.parse(JSON.stringify(e)),a=o(r)?r.data:r,l=this.data;this.data=yield un(a),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,l),i&&this.updateState(i,s),this.render()})}show(){return $(this,arguments,function*(e={}){if(this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},i),this._show({userAction:i})})}hide(){return $(this,arguments,function*(e={}){if(!this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},i),this._hide({userAction:i})})}enable(e={}){if(this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||i),this._enable({userAction:i})}disable(e={}){if(!this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||i),this._disable({userAction:i})}setState(e,i={}){const s=this.state,o=i.userAction!==void 0?i.userAction:!0;if(this.updateState(e,o),e.enabled!==void 0&&s.enabled!==e.enabled){const r={userAction:o};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&s.visible!==e.visible){const r={userAction:o};e.visible?this._show(r):this._hide(r)}}appendTo(e){this.wrapper!==e&&this.app&&(this.app.$destroy(),this.app=void 0),this.wrapper=e,this.render()}changeConfigs(e,i=!0){this.setState({config:e},{userAction:i}),this.render()}setExtraObjectsWith3DPositions(e){this.data&&(this.extraObjects=a1(e,this.five,this.data),this.render())}changeFloor(e){if(!this.data){console.warn("No floorplan data loaded");return}if(e<0||e>=this.data.floorDatas.length){console.warn(`Invalid floor index: ${e}. Available floors: 0-${this.data.floorDatas.length-1}`);return}this.updateState({displayedFloorIndex:e},!0),this.render()}formatData(e){return $(this,null,function*(){return yield un(e.data)})}_enable(e){const{userAction:i}=e;this.hooks.emit("enable",{userAction:i}),this.state.visible&&this._show({userAction:i})}_show(e){if(this.disposed||!this.state.enabled)return;const{userAction:i}=e;this.hooks.emit("show",{userAction:i}),this.render()}_hide(e){if(this.disposed||!this.state.enabled)return;const{userAction:i}=e;this.hooks.emit("hide",{userAction:i}),this.render()}updateState(e,i){var a;const s=this.state,o=(a=e.config)!=null&&a.missingFloorConfig?V(V({},s.config.missingFloorConfig),e.config.missingFloorConfig):s.config.missingFloorConfig,r=e.config?de(V(V({},s.config),e.config),{missingFloorConfig:o}):s.config;this.state=de(V(V({},this.state),e),{config:r}),!Wt(this.state,s,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:i})}render(){var r,a;if(this.disposed||!this.state.enabled)return;if(!this.wrapper&&this.wrapperSelector){const l=document.querySelector(this.wrapperSelector);this.wrapper=l}if(!this.data||!this.wrapper)return;const e=(a=(r=this.five.work.observers[this.five.getCurrentState().panoIndex])==null?void 0:r.floorIndex)!=null?a:0,i=this.state.displayedFloorIndex!==void 0?this.state.displayedFloorIndex:e,s=i===e,o=de(V({},this.state.config),{five:this.five,floorplanData:this.data,visible:this.state.visible,extraObjects:this.extraObjects,highlightData:this.highlightData,displayedFloorIndex:i,shouldShowRadar:s,cameraSize:this.state.config.cameraSize||36,cameraOffset:this.state.config.cameraOffset||28.5,onFloorplanClick:this.state.config.clickEnable?this.handleFloorplanClick:void 0});this.app?this.app.$set(o):this.app=new p5({target:this.wrapper,props:o})}};const g5=(n,t)=>new m5(n,t),v5=[{type:0,floorType:1,roomType:"100900000012",name:"其他"},{type:1,floorType:1,roomType:"100900000002",name:"客厅"},{type:2,floorType:1,roomType:"100900000002",name:"餐厅"},{type:3,floorType:0,roomType:"100900000001",name:"卧室"},{type:4,floorType:0,roomType:"100900000001",name:"书房"},{type:5,floorType:3,roomType:"100900000004",name:"卫生间"},{type:6,floorType:3,roomType:"100900000004",name:"淋浴间"},{type:7,floorType:3,roomType:"100900000004",name:"洗手间"},{type:8,floorType:3,roomType:"100900000003",name:"厨房"},{type:9,floorType:1,roomType:"100900000003",name:"开放厨房",onlySubArea:!0},{type:10,floorType:0,roomType:"100900000001",name:"多功能间"},{type:11,floorType:0,roomType:"100900000009",name:"保姆间"},{type:12,floorType:4,roomType:"100900000005",name:"阳台"},{type:13,floorType:4,roomType:"100900000006",name:"露台"},{type:14,floorType:0,roomType:"100900000008",name:"储物间"},{type:15,floorType:0,roomType:"100900000013",name:"衣帽间"},{type:16,floorType:0,roomType:"100900000011",name:"阁楼"},{type:17,floorType:2,roomType:"100900000007",name:"花园"},{type:18,floorType:5,roomType:"100900000010",name:"车库"},{type:19,floorType:1,roomType:"100900000012",name:"电梯"},{type:20,floorType:1,roomType:"100900000012",name:"地下室"},{type:21,floorType:1,roomType:"100900000012",name:"天井"},{type:22,floorType:1,roomType:"100900000012",name:"阳光房"},{type:23,floorType:1,roomType:"100900000012",name:"过道"},{type:24,floorType:1,roomType:"100900000012",name:"楼梯间"},{type:25,floorType:1,roomType:"100900000012",name:"门厅"},{type:26,floorType:2,roomType:"100900000012",name:"入户花园"},{type:27,floorType:1,roomType:"100900000012",name:"玄关"},{type:28,floorType:1,roomType:"100900000012",name:"挑空"},{type:29,floorType:4,roomType:"100900000012",name:"晾晒区"},{type:30,floorType:4,roomType:"100900000012",name:"洗衣房"},{type:31,floorType:0,roomType:"100900000012",name:"娱乐区"},{type:32,floorType:0,roomType:"100900000012",name:"健身区"},{type:33,floorType:0,roomType:"100900000012",name:"接待区"},{type:34,floorType:0,roomType:"100900000012",name:"影音区"},{type:35,floorType:1,roomType:"100900000012",name:"餐饮区"},{type:36,floorType:1,roomType:"100900000012",name:"其他",onlySubArea:!0},{type:37,floorType:1,roomType:"100900000002",name:"起居室"},{type:38,floorType:0,roomType:"100900000001",name:"主卧"},{type:39,floorType:0,roomType:"100900000001",name:"次卧"},{type:40,floorType:0,roomType:"100900000001",name:"优化间"},{type:41,floorType:0,roomType:"100900000001",name:"办公室"},{type:42,floorType:0,roomType:"100900000001",name:"会议室"},{type:43,floorType:0,roomType:"100900000001",name:"洽谈间"},{type:44,floorType:1,roomType:"100900000002",name:"共享大厅"},{type:45,floorType:1,roomType:"100900000012",name:"水吧"},{type:46,floorType:0,roomType:"100900000015",name:"出入口"},{type:47,floorType:0,roomType:"100900000015",name:"大厅"},{type:48,floorType:0,roomType:"100900000015",name:"包厢"},{type:49,floorType:0,roomType:"100900000015",name:"其他"},{type:50,floorType:0,roomType:"100900000016",name:"出入口"},{type:51,floorType:0,roomType:"100900000016",name:"办公区"},{type:52,floorType:0,roomType:"100900000016",name:"老板间"},{type:53,floorType:0,roomType:"100900000016",name:"会议室"},{type:54,floorType:0,roomType:"100900000016",name:"休息区/水吧"},{type:55,floorType:0,roomType:"100900000016",name:"其他"},{type:56,floorType:2,roomType:"100900000012",name:"空中花园"},{type:57,floorType:0,roomType:"100900000001",name:"洋室"},{type:58,floorType:0,roomType:"100900000001",name:"和室"}],y5=[{type:0,description:"木质地板"},{type:1,description:"瓷砖地面"},{type:2,description:"户外地面"},{type:3,description:"卫生间地面"},{type:4,description:"阳台地面"},{type:5,description:"车库地面"}],b5=[{roomType:"100900000001",description:"室"},{roomType:"100900000002",description:"厅"},{roomType:"100900000003",description:"厨"},{roomType:"100900000004",description:"卫"},{roomType:"100900000005",description:"阳台"},{roomType:"100900000006",description:"露台"},{roomType:"100900000007",description:"花园"},{roomType:"100900000008",description:"储"},{roomType:"100900000009",description:"保姆间"},{roomType:"100900000010",description:"车库"},{roomType:"100900000011",description:"阁楼"},{roomType:"100900000012",description:"其他"},{roomType:"100900000013",description:"衣"},{roomType:"100900000015",description:"商铺"},{roomType:"100900000016",description:"写字楼"}],wc=(n,t,e)=>{const i=new b.Matrix4,s=new b.Euler(n,t,e,"YXZ");return i.makeRotationFromEuler(s),i},A5=(n,{scale:t,rotation:e,position:i})=>{if(t&&n.scale.set(t,t,t),e){const[s,o,r]=e;s&&n.applyMatrix4(wc(s,0,0)),o&&n.applyMatrix4(wc(0,o,0)),r&&n.applyMatrix4(wc(0,0,r))}return i&&n.position.set(i.x,i.y,i.z),n};function f1(n,t){n.traverse(e=>{var i;if(e.type==="Mesh"){const s=e,o=V({map:s.material.map||{}},t);s.material=new G.MeshBasicMaterial(o),s.renderOrder=1,((i=e.parent)==null?void 0:i.type)==="Mesh"&&(e.renderOrder=e.parent.renderOrder+1)}})}/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */var p1={},Ci=void 0,w5=p1;function ju(n,t){var e=n.split("."),i=w5;!(e[0]in i)&&i.execScript&&i.execScript("var "+e[0]);for(var s;e.length&&(s=e.shift());)!e.length&&t!==Ci?i[s]=t:i=i[s]?i[s]:i[s]={}}var vt=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Uint32Array!="undefined"&&typeof DataView!="undefined";function Ss(n){var t=n.length,e=0,i=Number.POSITIVE_INFINITY,s,o,r,a,l,c,h,u,d,p;for(u=0;u<t;++u)n[u]>e&&(e=n[u]),n[u]<i&&(i=n[u]);for(s=1<<e,o=new(vt?Uint32Array:Array)(s),r=1,a=0,l=2;r<=e;){for(u=0;u<t;++u)if(n[u]===r){for(c=0,h=a,d=0;d<r;++d)c=c<<1|h&1,h>>=1;for(p=r<<16|u,d=c;d<s;d+=l)o[d]=p;++a}++r,a<<=1,l<<=1}return[o,e,i]}function bs(n,t){switch(this.g=[],this.h=32768,this.d=this.f=this.a=this.l=0,this.input=vt?new Uint8Array(n):n,this.m=!1,this.i=gl,this.r=!1,(t||!(t={}))&&(t.index&&(this.a=t.index),t.bufferSize&&(this.h=t.bufferSize),t.bufferType&&(this.i=t.bufferType),t.resize&&(this.r=t.resize)),this.i){case Ru:this.b=32768,this.c=new(vt?Uint8Array:Array)(32768+this.h+258);break;case gl:this.b=0,this.c=new(vt?Uint8Array:Array)(this.h),this.e=this.z,this.n=this.v,this.j=this.w;break;default:throw Error("invalid inflate mode")}}var Ru=0,gl=1,qf={t:Ru,s:gl};bs.prototype.k=function(){for(;!this.m;){var n=Oi(this,3);switch(n&1&&(this.m=!0),n>>>=1,n){case 0:var t=this.input,e=this.a,i=this.c,s=this.b,o=t.length,r=Ci,a=Ci,l=i.length,c=Ci;if(this.d=this.f=0,e+1>=o)throw Error("invalid uncompressed block header: LEN");if(r=t[e++]|t[e++]<<8,e+1>=o)throw Error("invalid uncompressed block header: NLEN");if(a=t[e++]|t[e++]<<8,r===~a)throw Error("invalid uncompressed block header: length verify");if(e+r>t.length)throw Error("input buffer is broken");switch(this.i){case Ru:for(;s+r>i.length;){if(c=l-s,r-=c,vt)i.set(t.subarray(e,e+c),s),s+=c,e+=c;else for(;c--;)i[s++]=t[e++];this.b=s,i=this.e(),s=this.b}break;case gl:for(;s+r>i.length;)i=this.e({p:2});break;default:throw Error("invalid inflate mode")}if(vt)i.set(t.subarray(e,e+r),s),s+=r,e+=r;else for(;r--;)i[s++]=t[e++];this.a=e,this.b=s,this.c=i;break;case 1:this.j(P5,C5);break;case 2:for(var h=Oi(this,5)+257,u=Oi(this,5)+1,d=Oi(this,4)+4,p=new(vt?Uint8Array:Array)(Pc.length),m=Ci,g=Ci,v=Ci,y=Ci,w=Ci,C=Ci,E=Ci,L=Ci,D=Ci,L=0;L<d;++L)p[Pc[L]]=Oi(this,3);if(!vt)for(L=d,d=p.length;L<d;++L)p[Pc[L]]=0;for(m=Ss(p),y=new(vt?Uint8Array:Array)(h+u),L=0,D=h+u;L<D;)switch(w=Xr(this,m),w){case 16:for(E=3+Oi(this,2);E--;)y[L++]=C;break;case 17:for(E=3+Oi(this,3);E--;)y[L++]=0;C=0;break;case 18:for(E=11+Oi(this,7);E--;)y[L++]=0;C=0;break;default:C=y[L++]=w}g=Ss(vt?y.subarray(0,h):y.slice(0,h)),v=Ss(vt?y.subarray(h):y.slice(h)),this.j(g,v);break;default:throw Error("unknown BTYPE: "+n)}}return this.n()};var Jf=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Pc=vt?new Uint16Array(Jf):Jf,Kf=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],m1=vt?new Uint16Array(Kf):Kf,$f=[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],vl=vt?new Uint8Array($f):$f,ep=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],g1=vt?new Uint16Array(ep):ep,tp=[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],yl=vt?new Uint8Array(tp):tp,uh=new(vt?Uint8Array:Array)(288),xs,ip;xs=0;for(ip=uh.length;xs<ip;++xs)uh[xs]=143>=xs?8:255>=xs?9:279>=xs?7:8;var P5=Ss(uh),dh=new(vt?Uint8Array:Array)(30),Qa,np;Qa=0;for(np=dh.length;Qa<np;++Qa)dh[Qa]=5;var C5=Ss(dh);function Oi(n,t){for(var e=n.f,i=n.d,s=n.input,o=n.a,r=s.length,a;i<t;){if(o>=r)throw Error("input buffer is broken");e|=s[o++]<<i,i+=8}return a=e&(1<<t)-1,n.f=e>>>t,n.d=i-t,n.a=o,a}function Xr(n,t){for(var e=n.f,i=n.d,s=n.input,o=n.a,r=s.length,a=t[0],l=t[1],c,h;i<l&&!(o>=r);)e|=s[o++]<<i,i+=8;if(c=a[e&(1<<l)-1],h=c>>>16,h>i)throw Error("invalid code length: "+h);return n.f=e>>h,n.d=i-h,n.a=o,c&65535}bs.prototype.j=function(n,t){var e=this.c,i=this.b;this.o=n;for(var s=e.length-258,o,r,a,l;(o=Xr(this,n))!==256;)if(256>o)i>=s&&(this.b=i,e=this.e(),i=this.b),e[i++]=o;else for(r=o-257,l=m1[r],0<vl[r]&&(l+=Oi(this,vl[r])),o=Xr(this,t),a=g1[o],0<yl[o]&&(a+=Oi(this,yl[o])),i>=s&&(this.b=i,e=this.e(),i=this.b);l--;)e[i]=e[i++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=i};bs.prototype.w=function(n,t){var e=this.c,i=this.b;this.o=n;for(var s=e.length,o,r,a,l;(o=Xr(this,n))!==256;)if(256>o)i>=s&&(e=this.e(),s=e.length),e[i++]=o;else for(r=o-257,l=m1[r],0<vl[r]&&(l+=Oi(this,vl[r])),o=Xr(this,t),a=g1[o],0<yl[o]&&(a+=Oi(this,yl[o])),i+l>s&&(e=this.e(),s=e.length);l--;)e[i]=e[i++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=i};bs.prototype.e=function(){var n=new(vt?Uint8Array:Array)(this.b-32768),t=this.b-32768,e,i,s=this.c;if(vt)n.set(s.subarray(32768,n.length));else for(e=0,i=n.length;e<i;++e)n[e]=s[e+32768];if(this.g.push(n),this.l+=n.length,vt)s.set(s.subarray(t,t+32768));else for(e=0;32768>e;++e)s[e]=s[t+e];return this.b=32768,s};bs.prototype.z=function(n){var t,e=this.input.length/this.a+1|0,i,s,o,r=this.input,a=this.c;return n&&(typeof n.p=="number"&&(e=n.p),typeof n.u=="number"&&(e+=n.u)),2>e?(i=(r.length-this.a)/this.o[2],o=258*(i/2)|0,s=o<a.length?a.length+o:a.length<<1):s=a.length*e,vt?(t=new Uint8Array(s),t.set(a)):t=a,this.c=t};bs.prototype.n=function(){var n=0,t=this.c,e=this.g,i,s=new(vt?Uint8Array:Array)(this.l+(this.b-32768)),o,r,a,l;if(e.length===0)return vt?this.c.subarray(32768,this.b):this.c.slice(32768,this.b);for(o=0,r=e.length;o<r;++o)for(i=e[o],a=0,l=i.length;a<l;++a)s[n++]=i[a];for(o=32768,r=this.b;o<r;++o)s[n++]=t[o];return this.g=[],this.buffer=s};bs.prototype.v=function(){var n,t=this.b;return vt?this.r?(n=new Uint8Array(t),n.set(this.c.subarray(0,t))):n=this.c.subarray(0,t):(this.c.length>t&&(this.c.length=t),n=this.c),this.buffer=n};function _u(n,t){var e,i;switch(this.input=n,this.a=0,(t||!(t={}))&&(t.index&&(this.a=t.index),t.verify&&(this.A=t.verify)),e=n[this.a++],i=n[this.a++],e&15){case sp:this.method=sp;break;default:throw Error("unsupported compression method")}if(((e<<8)+i)%31!==0)throw Error("invalid fcheck flag:"+((e<<8)+i)%31);if(i&32)throw Error("fdict flag is not supported");this.q=new bs(n,{index:this.a,bufferSize:t.bufferSize,bufferType:t.bufferType,resize:t.resize})}_u.prototype.k=function(){var n=this.input,t,e;if(t=this.q.k(),this.a=this.q.a,this.A){e=(n[this.a++]<<24|n[this.a++]<<16|n[this.a++]<<8|n[this.a++])>>>0;var i=t;if(typeof i=="string"){var s=i.split(""),o,r;for(o=0,r=s.length;o<r;o++)s[o]=(s[o].charCodeAt(0)&255)>>>0;i=s}for(var a=1,l=0,c=i.length,h,u=0;0<c;){h=1024<c?1024:c,c-=h;do a+=i[u++],l+=a;while(--h);a%=65521,l%=65521}if(e!==(l<<16|a)>>>0)throw Error("invalid adler-32 checksum")}return t};var sp=8;ju("Zlib.Inflate",_u);ju("Zlib.Inflate.prototype.decompress",_u.prototype.k);var fh={ADAPTIVE:qf.s,BLOCK:qf.t},Tr,Dr,To,op;if(Object.keys)Tr=Object.keys(fh);else for(Dr in Tr=[],To=0,fh)Tr[To++]=Dr;To=0;for(op=Tr.length;To<op;++To)Dr=Tr[To],ju("Zlib.Inflate.BufferType."+Dr,fh[Dr]);var rp=p1.Zlib,v1={findSpan:function(n,t,e){var i=e.length-n-1;if(t>=e[i])return i-1;if(t<=e[n])return n;for(var s=n,o=i,r=Math.floor((s+o)/2);t<e[r]||t>=e[r+1];)t<e[r]?o=r:s=r,r=Math.floor((s+o)/2);return r},calcBasisFunctions:function(n,t,e,i){var s=[],o=[],r=[];s[0]=1;for(var a=1;a<=e;++a){o[a]=t-i[n+1-a],r[a]=i[n+a]-t;for(var l=0,c=0;c<a;++c){var h=r[c+1],u=o[a-c],d=s[c]/(h+u);s[c]=l+h*d,l=u*d}s[a]=l}return s},calcBSplinePoint:function(n,t,e,i){for(var s=this.findSpan(n,i,t),o=this.calcBasisFunctions(s,i,n,t),r=new G.Vector4(0,0,0,0),a=0;a<=n;++a){var l=e[s-n+a],c=o[a],h=l.w*c;r.x+=l.x*h,r.y+=l.y*h,r.z+=l.z*h,r.w+=l.w*c}return r},calcBasisFunctionDerivatives:function(n,t,e,i,s){for(var o=[],r=0;r<=e;++r)o[r]=0;for(var a=[],r=0;r<=i;++r)a[r]=o.slice(0);for(var l=[],r=0;r<=e;++r)l[r]=o.slice(0);l[0][0]=1;for(var c=o.slice(0),h=o.slice(0),u=1;u<=e;++u){c[u]=t-s[n+1-u],h[u]=s[n+u]-t;for(var d=0,O=0;O<u;++O){var p=h[O+1],m=c[u-O];l[u][O]=p+m;var g=l[O][u-1]/l[u][O];l[O][u]=d+p*g,d=m*g}l[u][u]=d}for(var u=0;u<=e;++u)a[0][u]=l[u][e];for(var O=0;O<=e;++O){for(var v=0,y=1,w=[],r=0;r<=e;++r)w[r]=o.slice(0);w[0][0]=1;for(var C=1;C<=i;++C){var E=0,D=O-C,L=e-C;O>=C&&(w[y][0]=w[v][0]/l[L+1][D],E=w[y][0]*l[D][L]);for(var R=D>=-1?1:-D,z=O-1<=L?C-1:e-O,u=R;u<=z;++u)w[y][u]=(w[v][u]-w[v][u-1])/l[L+1][D+u],E+=w[y][u]*l[D+u][L];O<=L&&(w[y][C]=-w[v][C-1]/l[L+1][O],E+=w[y][C]*l[O][L]),a[C][O]=E;var u=v;v=y,y=u}}for(var O=e,C=1;C<=i;++C){for(var u=0;u<=e;++u)a[C][u]*=O;O*=e-C}return a},calcBSplineDerivatives:function(n,t,e,i,s){for(var o=s<n?s:n,r=[],a=this.findSpan(n,i,t),l=this.calcBasisFunctionDerivatives(a,i,n,o,t),c=[],h=0;h<e.length;++h){var u=e[h].clone(),d=u.w;u.x*=d,u.y*=d,u.z*=d,c[h]=u}for(var p=0;p<=o;++p){for(var u=c[a-n].clone().multiplyScalar(l[p][0]),m=1;m<=n;++m)u.add(c[a-n+m].clone().multiplyScalar(l[p][m]));r[p]=u}for(var p=o+1;p<=s+1;++p)r[p]=new G.Vector4(0,0,0);return r},calcKoverI:function(n,t){for(var e=1,i=2;i<=n;++i)e*=i;for(var s=1,i=2;i<=t;++i)s*=i;for(var i=2;i<=n-t;++i)s*=i;return e/s},calcRationalCurveDerivatives:function(n){for(var t=n.length,e=[],i=[],s=0;s<t;++s){var o=n[s];e[s]=new G.Vector3(o.x,o.y,o.z),i[s]=o.w}for(var r=[],a=0;a<t;++a){for(var l=e[a].clone(),s=1;s<=a;++s)l.sub(r[a-s].clone().multiplyScalar(this.calcKoverI(a,s)*i[s]));r[a]=l.divideScalar(i[0])}return r},calcNURBSDerivatives:function(n,t,e,i,s){var o=this.calcBSplineDerivatives(n,t,e,i,s);return this.calcRationalCurveDerivatives(o)},calcSurfacePoint:function(n,t,e,i,s,o,r,a){for(var l=this.findSpan(n,o,e),c=this.findSpan(t,r,i),h=this.calcBasisFunctions(l,o,n,e),u=this.calcBasisFunctions(c,r,t,i),d=[],p=0;p<=t;++p){d[p]=new G.Vector4(0,0,0,0);for(var m=0;m<=n;++m){var g=s[l-n+m][c-t+p].clone(),v=g.w;g.x*=v,g.y*=v,g.z*=v,d[p].add(g.multiplyScalar(h[m]))}}for(var y=new G.Vector4(0,0,0,0),p=0;p<=t;++p)y.add(d[p].multiplyScalar(u[p]));y.divideScalar(y.w),a.set(y.x,y.y,y.z)}},Qs=function(n,t,e,i,s){G.Curve.call(this),this.degree=n,this.knots=t,this.controlPoints=[],this.startKnot=i||0,this.endKnot=s||this.knots.length-1;for(var o=0;o<e.length;++o){var r=e[o];this.controlPoints[o]=new G.Vector4(r.x,r.y,r.z,r.w)}};Qs.prototype=Object.create(G.Curve.prototype);Qs.prototype.constructor=Qs;Qs.prototype.getPoint=function(n,t){var e=t||new G.Vector3,i=this.knots[this.startKnot]+n*(this.knots[this.endKnot]-this.knots[this.startKnot]),s=v1.calcBSplinePoint(this.degree,this.knots,this.controlPoints,i);return s.w!=1&&s.divideScalar(s.w),e.set(s.x,s.y,s.z)};Qs.prototype.getTangent=function(n,t){var e=t||new G.Vector3,i=this.knots[0]+n*(this.knots[this.knots.length-1]-this.knots[0]),s=v1.calcNURBSDerivatives(this.degree,this.knots,this.controlPoints,i,1);return e.copy(s[1]).normalize(),e};var y1=function(){var n,t,e;function i(A){G.Loader.call(this,A)}i.prototype=Object.assign(Object.create(G.Loader.prototype),{constructor:i,load:function(A,M,I,k){var x=this,S=x.path===""?G.LoaderUtils.extractUrlBase(A):x.path,j=new G.FileLoader(this.manager);j.setPath(x.path),j.setResponseType("arraybuffer"),j.load(A,function(F){try{M(x.parse(F,S))}catch(J){k?k(J):console.error(J),x.manager.itemError(A)}},I,k)},parse:function(A,M){if(u(A))n=new l().parse(A);else{var I=L(A);if(!d(I))throw new Error("THREE.FBXLoader: Unknown format.");if(p(I)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+p(I));n=new a().parse(I)}var k=new G.TextureLoader(this.manager).setPath(this.resourcePath||M).setCrossOrigin(this.crossOrigin);return new s(k,this.manager).parse(n)}});function s(A,M){this.textureLoader=A,this.manager=M}s.prototype={constructor:s,parse:function(){t=this.parseConnections();var A=this.parseImages(),M=this.parseTextures(A),I=this.parseMaterials(M),k=this.parseDeformers(),x=new o().parse(k);return this.parseScene(k,x,I),e},parseConnections:function(){var A=new Map;if("Connections"in n){var M=n.Connections.connections;M.forEach(function(I){var k=I[0],x=I[1],S=I[2];A.has(k)||A.set(k,{parents:[],children:[]});var j={ID:x,relationship:S};A.get(k).parents.push(j),A.has(x)||A.set(x,{parents:[],children:[]});var F={ID:k,relationship:S};A.get(x).children.push(F)})}return A},parseImages:function(){var A={},M={};if("Video"in n.Objects){var I=n.Objects.Video;for(var k in I){var x=I[k],S=parseInt(k);if(A[S]=x.RelativeFilename||x.Filename,"Content"in x){var j=x.Content instanceof ArrayBuffer&&x.Content.byteLength>0,F=typeof x.Content=="string"&&x.Content!=="";if(j||F){var J=this.parseImage(I[k]);M[x.RelativeFilename||x.Filename]=J}}}}for(var S in A){var ne=A[S];M[ne]!==void 0?A[S]=M[ne]:A[S]=A[S].split("\\").pop()}return A},parseImage:function(A){var M=A.Content,I=A.RelativeFilename||A.Filename,k=I.slice(I.lastIndexOf(".")+1).toLowerCase(),x;switch(k){case"bmp":x="image/bmp";break;case"jpg":case"jpeg":x="image/jpeg";break;case"png":x="image/png";break;case"tif":x="image/tiff";break;case"tga":this.manager.getHandler(".tga")===null&&console.warn("FBXLoader: TGA loader not found, skipping ",I),x="image/tga";break;default:console.warn('FBXLoader: Image type "'+k+'" is not supported.');return}if(typeof M=="string")return"data:"+x+";base64,"+M;var S=new Uint8Array(M);return window.URL.createObjectURL(new Blob([S],{type:x}))},parseTextures:function(A){var M=new Map;if("Texture"in n.Objects){var I=n.Objects.Texture;for(var k in I){var x=this.parseTexture(I[k],A);M.set(parseInt(k),x)}}return M},parseTexture:function(A,M){var I=this.loadTexture(A,M);I.ID=A.id,I.name=A.attrName;var k=A.WrapModeU,x=A.WrapModeV,S=k!==void 0?k.value:0,j=x!==void 0?x.value:0;if(I.wrapS=S===0?G.RepeatWrapping:G.ClampToEdgeWrapping,I.wrapT=j===0?G.RepeatWrapping:G.ClampToEdgeWrapping,"Scaling"in A){var F=A.Scaling.value;I.repeat.x=F[0],I.repeat.y=F[1]}return I},loadTexture:function(A,M){var I,k=this.textureLoader.path,x=t.get(A.id).children;x!==void 0&&x.length>0&&M[x[0].ID]!==void 0&&(I=M[x[0].ID],(I.indexOf("blob:")===0||I.indexOf("data:")===0)&&this.textureLoader.setPath(void 0));var S,j=A.FileName.slice(-3).toLowerCase();if(j==="tga"){var F=this.manager.getHandler(".tga");F===null?(console.warn("FBXLoader: TGA loader not found, creating placeholder texture for",A.RelativeFilename),S=new G.Texture):S=F.load(I)}else j==="psd"?(console.warn("FBXLoader: PSD textures are not supported, creating placeholder texture for",A.RelativeFilename),S=new G.Texture):S=this.textureLoader.load(I);return this.textureLoader.setPath(k),S},parseMaterials:function(A){var M=new Map;if("Material"in n.Objects){var I=n.Objects.Material;for(var k in I){var x=this.parseMaterial(I[k],A);x!==null&&M.set(parseInt(k),x)}}return M},parseMaterial:function(A,M){var I=A.id,k=A.attrName,x=A.ShadingModel;if(typeof x=="object"&&(x=x.value),!t.has(I))return null;var S=this.parseParameters(A,M,I),j;switch(x.toLowerCase()){case"phong":j=new G.MeshPhongMaterial;break;case"lambert":j=new G.MeshLambertMaterial;break;default:console.warn('THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.',x),j=new G.MeshPhongMaterial;break}return j.setValues(S),j.name=k,j},parseParameters:function(A,M,I){var k={};A.BumpFactor&&(k.bumpScale=A.BumpFactor.value),A.Diffuse?k.color=new G.Color().fromArray(A.Diffuse.value):A.DiffuseColor&&A.DiffuseColor.type==="Color"&&(k.color=new G.Color().fromArray(A.DiffuseColor.value)),A.DisplacementFactor&&(k.displacementScale=A.DisplacementFactor.value),A.Emissive?k.emissive=new G.Color().fromArray(A.Emissive.value):A.EmissiveColor&&A.EmissiveColor.type==="Color"&&(k.emissive=new G.Color().fromArray(A.EmissiveColor.value)),A.EmissiveFactor&&(k.emissiveIntensity=parseFloat(A.EmissiveFactor.value)),A.Opacity&&(k.opacity=parseFloat(A.Opacity.value)),k.opacity<1&&(k.transparent=!0),A.ReflectionFactor&&(k.reflectivity=A.ReflectionFactor.value),A.Shininess&&(k.shininess=A.Shininess.value),A.Specular?k.specular=new G.Color().fromArray(A.Specular.value):A.SpecularColor&&A.SpecularColor.type==="Color"&&(k.specular=new G.Color().fromArray(A.SpecularColor.value));var x=this;return t.get(I).children.forEach(function(S){var j=S.relationship;switch(j){case"Bump":k.bumpMap=x.getTexture(M,S.ID);break;case"Maya|TEX_ao_map":k.aoMap=x.getTexture(M,S.ID);break;case"DiffuseColor":case"Maya|TEX_color_map":k.map=x.getTexture(M,S.ID),k.map.encoding=G.sRGBEncoding;break;case"DisplacementColor":k.displacementMap=x.getTexture(M,S.ID);break;case"EmissiveColor":k.emissiveMap=x.getTexture(M,S.ID),k.emissiveMap.encoding=G.sRGBEncoding;break;case"NormalMap":case"Maya|TEX_normal_map":k.normalMap=x.getTexture(M,S.ID);break;case"ReflectionColor":k.envMap=x.getTexture(M,S.ID),k.envMap.mapping=G.EquirectangularReflectionMapping,k.envMap.encoding=G.sRGBEncoding;break;case"SpecularColor":k.specularMap=x.getTexture(M,S.ID),k.specularMap.encoding=G.sRGBEncoding;break;case"TransparentColor":case"TransparencyFactor":k.alphaMap=x.getTexture(M,S.ID),k.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",j);break}}),k},getTexture:function(A,M){return"LayeredTexture"in n.Objects&&M in n.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),M=t.get(M).children[0].ID),A.get(M)},parseDeformers:function(){var A={},M={};if("Deformer"in n.Objects){var I=n.Objects.Deformer;for(var k in I){var x=I[k],S=t.get(parseInt(k));if(x.attrType==="Skin"){var j=this.parseSkeleton(S,I);j.ID=k,S.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),j.geometryID=S.parents[0].ID,A[k]=j}else if(x.attrType==="BlendShape"){var F={id:k};F.rawTargets=this.parseMorphTargets(S,I),F.id=k,S.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),M[k]=F}}}return{skeletons:A,morphTargets:M}},parseSkeleton:function(A,M){var I=[];return A.children.forEach(function(k){var x=M[k.ID];if(x.attrType==="Cluster"){var S={ID:k.ID,indices:[],weights:[],transformLink:new G.Matrix4().fromArray(x.TransformLink.a)};"Indexes"in x&&(S.indices=x.Indexes.a,S.weights=x.Weights.a),I.push(S)}}),{rawBones:I,bones:[]}},parseMorphTargets:function(A,M){for(var I=[],k=0;k<A.children.length;k++){var x=A.children[k],S=M[x.ID],j={name:S.attrName,initialWeight:S.DeformPercent,id:S.id,fullWeights:S.FullWeights.a};if(S.attrType!=="BlendShapeChannel")return;j.geoID=t.get(parseInt(x.ID)).children.filter(function(F){return F.relationship===void 0})[0].ID,I.push(j)}return I},parseScene:function(A,M,I){e=new G.Group;var k=this.parseModels(A.skeletons,M,I),x=n.Objects.Model,S=this;k.forEach(function(F){var J=x[F.ID];S.setLookAtProperties(F,J);var ne=t.get(F.ID).parents;ne.forEach(function(q){var oe=k.get(q.ID);oe!==void 0&&oe.add(F)}),F.parent===null&&e.add(F)}),this.bindSkeleton(A.skeletons,M,k),this.createAmbientLight(),this.setupMorphMaterials(),e.traverse(function(F){if(F.userData.transformData){F.parent&&(F.userData.transformData.parentMatrixWorld=F.parent.matrix);var J=C(F.userData.transformData);F.applyMatrix4(J)}});var j=new r().parse();e.children.length===1&&e.children[0].isGroup&&(e.children[0].animations=j,e=e.children[0]),e.animations=j},parseModels:function(A,M,I){var k=new Map,x=n.Objects.Model;for(var S in x){var j=parseInt(S),F=x[S],J=t.get(j),ne=this.buildSkeleton(J,A,j,F.attrName);if(!ne){switch(F.attrType){case"Camera":ne=this.createCamera(J);break;case"Light":ne=this.createLight(J);break;case"Mesh":ne=this.createMesh(J,M,I);break;case"NurbsCurve":ne=this.createCurve(J,M);break;case"LimbNode":case"Root":ne=new G.Bone;break;case"Null":default:ne=new G.Group;break}ne.name=F.attrName?G.PropertyBinding.sanitizeNodeName(F.attrName):"",ne.ID=j}this.getTransformData(ne,F),k.set(j,ne)}return k},buildSkeleton:function(A,M,I,k){var x=null;return A.parents.forEach(function(S){for(var j in M){var F=M[j];F.rawBones.forEach(function(J,ne){if(J.ID===S.ID){var q=x;x=new G.Bone,x.matrixWorld.copy(J.transformLink),x.name=k?G.PropertyBinding.sanitizeNodeName(k):"",x.ID=I,F.bones[ne]=x,q!==null&&x.add(q)}})}}),x},createCamera:function(A){var M,I;if(A.children.forEach(function(oe){var se=n.Objects.NodeAttribute[oe.ID];se!==void 0&&(I=se)}),I===void 0)M=new G.Object3D;else{var k=0;I.CameraProjectionType!==void 0&&I.CameraProjectionType.value===1&&(k=1);var x=1;I.NearPlane!==void 0&&(x=I.NearPlane.value/1e3);var S=1e3;I.FarPlane!==void 0&&(S=I.FarPlane.value/1e3);var j=window.innerWidth,F=window.innerHeight;I.AspectWidth!==void 0&&I.AspectHeight!==void 0&&(j=I.AspectWidth.value,F=I.AspectHeight.value);var J=j/F,ne=45;I.FieldOfView!==void 0&&(ne=I.FieldOfView.value);var q=I.FocalLength?I.FocalLength.value:null;switch(k){case 0:M=new G.PerspectiveCamera(ne,J,x,S),q!==null&&M.setFocalLength(q);break;case 1:M=new G.OrthographicCamera(-j/2,j/2,F/2,-F/2,x,S);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+k+"."),M=new G.Object3D;break}}return M},createLight:function(A){var M,I;if(A.children.forEach(function(q){var oe=n.Objects.NodeAttribute[q.ID];oe!==void 0&&(I=oe)}),I===void 0)M=new G.Object3D;else{var k;I.LightType===void 0?k=0:k=I.LightType.value;var x=16777215;I.Color!==void 0&&(x=new G.Color().fromArray(I.Color.value));var S=I.Intensity===void 0?1:I.Intensity.value/100;I.CastLightOnObject!==void 0&&I.CastLightOnObject.value===0&&(S=0);var j=0;I.FarAttenuationEnd!==void 0&&(I.EnableFarAttenuation!==void 0&&I.EnableFarAttenuation.value===0?j=0:j=I.FarAttenuationEnd.value);var F=1;switch(k){case 0:M=new G.PointLight(x,S,j,F);break;case 1:M=new G.DirectionalLight(x,S);break;case 2:var J=Math.PI/3;I.InnerAngle!==void 0&&(J=G.MathUtils.degToRad(I.InnerAngle.value));var ne=0;I.OuterAngle!==void 0&&(ne=G.MathUtils.degToRad(I.OuterAngle.value),ne=Math.max(ne,1)),M=new G.SpotLight(x,S,j,J,ne,F);break;default:console.warn("THREE.FBXLoader: Unknown light type "+I.LightType.value+", defaulting to a PointLight."),M=new G.PointLight(x,S);break}I.CastShadows!==void 0&&I.CastShadows.value===1&&(M.castShadow=!0)}return M},createMesh:function(A,M,I){var k,x=null,S=null,j=[];return A.children.forEach(function(F){M.has(F.ID)&&(x=M.get(F.ID)),I.has(F.ID)&&j.push(I.get(F.ID))}),j.length>1?S=j:j.length>0?S=j[0]:(S=new G.MeshPhongMaterial({color:13421772}),j.push(S)),"color"in x.attributes&&j.forEach(function(F){F.vertexColors=!0}),x.FBX_Deformer?(j.forEach(function(F){F.skinning=!0}),k=new G.SkinnedMesh(x,S),k.normalizeSkinWeights()):k=new G.Mesh(x,S),k},createCurve:function(A,M){var I=A.children.reduce(function(x,S){return M.has(S.ID)&&(x=M.get(S.ID)),x},null),k=new G.LineBasicMaterial({color:3342591,linewidth:1});return new G.Line(I,k)},getTransformData:function(A,M){var I={};"InheritType"in M&&(I.inheritType=parseInt(M.InheritType.value)),"RotationOrder"in M?I.eulerOrder=E(M.RotationOrder.value):I.eulerOrder="ZYX","Lcl_Translation"in M&&(I.translation=M.Lcl_Translation.value),"PreRotation"in M&&(I.preRotation=M.PreRotation.value),"Lcl_Rotation"in M&&(I.rotation=M.Lcl_Rotation.value),"PostRotation"in M&&(I.postRotation=M.PostRotation.value),"Lcl_Scaling"in M&&(I.scale=M.Lcl_Scaling.value),"ScalingOffset"in M&&(I.scalingOffset=M.ScalingOffset.value),"ScalingPivot"in M&&(I.scalingPivot=M.ScalingPivot.value),"RotationOffset"in M&&(I.rotationOffset=M.RotationOffset.value),"RotationPivot"in M&&(I.rotationPivot=M.RotationPivot.value),A.userData.transformData=I},setLookAtProperties:function(A,M){if("LookAtProperty"in M){var I=t.get(A.ID).children;I.forEach(function(k){if(k.relationship==="LookAtProperty"){var x=n.Objects.Model[k.ID];if("Lcl_Translation"in x){var S=x.Lcl_Translation.value;A.target!==void 0?(A.target.position.fromArray(S),e.add(A.target)):A.lookAt(new G.Vector3().fromArray(S))}}})}},bindSkeleton:function(A,M,I){var k=this.parsePoseNodes();for(var x in A){var S=A[x],j=t.get(parseInt(S.ID)).parents;j.forEach(function(F){if(M.has(F.ID)){var J=F.ID,ne=t.get(J);ne.parents.forEach(function(q){if(I.has(q.ID)){var oe=I.get(q.ID);oe.bind(new G.Skeleton(S.bones),k[q.ID])}})}})}},parsePoseNodes:function(){var A={};if("Pose"in n.Objects){var M=n.Objects.Pose;for(var I in M)if(M[I].attrType==="BindPose"){var k=M[I].PoseNode;Array.isArray(k)?k.forEach(function(x){A[x.Node]=new G.Matrix4().fromArray(x.Matrix.a)}):A[k.Node]=new G.Matrix4().fromArray(k.Matrix.a)}}return A},createAmbientLight:function(){if("GlobalSettings"in n&&"AmbientColor"in n.GlobalSettings){var A=n.GlobalSettings.AmbientColor.value,M=A[0],I=A[1],k=A[2];if(M!==0||I!==0||k!==0){var x=new G.Color(M,I,k);e.add(new G.AmbientLight(x,1))}}},setupMorphMaterials:function(){var A=this;e.traverse(function(M){M.isMesh&&M.geometry.morphAttributes.position&&M.geometry.morphAttributes.position.length&&(Array.isArray(M.material)?M.material.forEach(function(I,k){A.setupMorphMaterial(M,I,k)}):A.setupMorphMaterial(M,M.material))})},setupMorphMaterial:function(A,M,I){var k=A.uuid,x=M.uuid,S=!1;if(e.traverse(function(F){F.isMesh&&(Array.isArray(F.material)?F.material.forEach(function(J){J.uuid===x&&F.uuid!==k&&(S=!0)}):F.material.uuid===x&&F.uuid!==k&&(S=!0))}),S===!0){var j=M.clone();j.morphTargets=!0,I===void 0?A.material=j:A.material[I]=j}else M.morphTargets=!0}};function o(){}o.prototype={constructor:o,parse:function(A){var M=new Map;if("Geometry"in n.Objects){var I=n.Objects.Geometry;for(var k in I){var x=t.get(parseInt(k)),S=this.parseGeometry(x,I[k],A);M.set(parseInt(k),S)}}return M},parseGeometry:function(A,M,I){switch(M.attrType){case"Mesh":return this.parseMeshGeometry(A,M,I);case"NurbsCurve":return this.parseNurbsGeometry(M)}},parseMeshGeometry:function(A,M,I){var k=I.skeletons,x=[],S=A.parents.map(function(q){return n.Objects.Model[q.ID]});if(S.length!==0){var j=A.children.reduce(function(q,oe){return k[oe.ID]!==void 0&&(q=k[oe.ID]),q},null);A.children.forEach(function(q){I.morphTargets[q.ID]!==void 0&&x.push(I.morphTargets[q.ID])});var F=S[0],J={};"RotationOrder"in F&&(J.eulerOrder=E(F.RotationOrder.value)),"InheritType"in F&&(J.inheritType=parseInt(F.InheritType.value)),"GeometricTranslation"in F&&(J.translation=F.GeometricTranslation.value),"GeometricRotation"in F&&(J.rotation=F.GeometricRotation.value),"GeometricScaling"in F&&(J.scale=F.GeometricScaling.value);var ne=C(J);return this.genGeometry(M,j,x,ne)}},genGeometry:function(A,M,I,k){var x=new G.BufferGeometry;A.attrName&&(x.name=A.attrName);var S=this.parseGeoNode(A,M),j=this.genBuffers(S),F=new G.Float32BufferAttribute(j.vertex,3);if(F.applyMatrix4(k),x.setAttribute("position",F),j.colors.length>0&&x.setAttribute("color",new G.Float32BufferAttribute(j.colors,3)),M&&(x.setAttribute("skinIndex",new G.Uint16BufferAttribute(j.weightsIndices,4)),x.setAttribute("skinWeight",new G.Float32BufferAttribute(j.vertexWeights,4)),x.FBX_Deformer=M),j.normal.length>0){var J=new G.Matrix3().getNormalMatrix(k),ne=new G.Float32BufferAttribute(j.normal,3);ne.applyNormalMatrix(J),x.setAttribute("normal",ne)}if(j.uvs.forEach(function(ze,ee){var we="uv"+(ee+1).toString();ee===0&&(we="uv"),x.setAttribute(we,new G.Float32BufferAttribute(j.uvs[ee],2))}),S.material&&S.material.mappingType!=="AllSame"){var q=j.materialIndex[0],oe=0;if(j.materialIndex.forEach(function(ze,ee){ze!==q&&(x.addGroup(oe,ee-oe,q),q=ze,oe=ee)}),x.groups.length>0){var se=x.groups[x.groups.length-1],ae=se.start+se.count;ae!==j.materialIndex.length&&x.addGroup(ae,j.materialIndex.length-ae,q)}x.groups.length===0&&x.addGroup(0,j.materialIndex.length,j.materialIndex[0])}return this.addMorphTargets(x,A,I,k),x},parseGeoNode:function(A,M){var I={};if(I.vertexPositions=A.Vertices!==void 0?A.Vertices.a:[],I.vertexIndices=A.PolygonVertexIndex!==void 0?A.PolygonVertexIndex.a:[],A.LayerElementColor&&(I.color=this.parseVertexColors(A.LayerElementColor[0])),A.LayerElementMaterial&&(I.material=this.parseMaterialIndices(A.LayerElementMaterial[0])),A.LayerElementNormal&&(I.normal=this.parseNormals(A.LayerElementNormal[0])),A.LayerElementUV){I.uv=[];for(var k=0;A.LayerElementUV[k];)I.uv.push(this.parseUVs(A.LayerElementUV[k])),k++}return I.weightTable={},M!==null&&(I.skeleton=M,M.rawBones.forEach(function(x,S){x.indices.forEach(function(j,F){I.weightTable[j]===void 0&&(I.weightTable[j]=[]),I.weightTable[j].push({id:S,weight:x.weights[F]})})})),I},genBuffers:function(A){var M={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},I=0,k=0,x=!1,S=[],j=[],F=[],J=[],ne=[],q=[],oe=this;return A.vertexIndices.forEach(function(se,ae){var ze=!1;se<0&&(se=se^-1,ze=!0);var ee=[],we=[];if(S.push(se*3,se*3+1,se*3+2),A.color){var le=v(ae,I,se,A.color);F.push(le[0],le[1],le[2])}if(A.skeleton){if(A.weightTable[se]!==void 0&&A.weightTable[se].forEach(function(Re){we.push(Re.weight),ee.push(Re.id)}),we.length>4){x||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),x=!0);var he=[0,0,0,0],be=[0,0,0,0];we.forEach(function(Re,ye){var De=Re,ve=ee[ye];be.forEach(function(Ae,Oe,Ye){if(De>Ae){Ye[Oe]=De,De=Ae;var Ze=he[Oe];he[Oe]=ve,ve=Ze}})}),ee=he,we=be}for(;we.length<4;)we.push(0),ee.push(0);for(var te=0;te<4;++te)ne.push(we[te]),q.push(ee[te])}if(A.normal){var le=v(ae,I,se,A.normal);j.push(le[0],le[1],le[2])}if(A.material&&A.material.mappingType!=="AllSame")var ke=v(ae,I,se,A.material)[0];A.uv&&A.uv.forEach(function(Re,ye){var De=v(ae,I,se,Re);J[ye]===void 0&&(J[ye]=[]),J[ye].push(De[0]),J[ye].push(De[1])}),k++,ze&&(oe.genFace(M,A,S,ke,j,F,J,ne,q,k),I++,k=0,S=[],j=[],F=[],J=[],ne=[],q=[])}),M},genFace:function(A,M,I,k,x,S,j,F,J,ne){for(var q=2;q<ne;q++)A.vertex.push(M.vertexPositions[I[0]]),A.vertex.push(M.vertexPositions[I[1]]),A.vertex.push(M.vertexPositions[I[2]]),A.vertex.push(M.vertexPositions[I[(q-1)*3]]),A.vertex.push(M.vertexPositions[I[(q-1)*3+1]]),A.vertex.push(M.vertexPositions[I[(q-1)*3+2]]),A.vertex.push(M.vertexPositions[I[q*3]]),A.vertex.push(M.vertexPositions[I[q*3+1]]),A.vertex.push(M.vertexPositions[I[q*3+2]]),M.skeleton&&(A.vertexWeights.push(F[0]),A.vertexWeights.push(F[1]),A.vertexWeights.push(F[2]),A.vertexWeights.push(F[3]),A.vertexWeights.push(F[(q-1)*4]),A.vertexWeights.push(F[(q-1)*4+1]),A.vertexWeights.push(F[(q-1)*4+2]),A.vertexWeights.push(F[(q-1)*4+3]),A.vertexWeights.push(F[q*4]),A.vertexWeights.push(F[q*4+1]),A.vertexWeights.push(F[q*4+2]),A.vertexWeights.push(F[q*4+3]),A.weightsIndices.push(J[0]),A.weightsIndices.push(J[1]),A.weightsIndices.push(J[2]),A.weightsIndices.push(J[3]),A.weightsIndices.push(J[(q-1)*4]),A.weightsIndices.push(J[(q-1)*4+1]),A.weightsIndices.push(J[(q-1)*4+2]),A.weightsIndices.push(J[(q-1)*4+3]),A.weightsIndices.push(J[q*4]),A.weightsIndices.push(J[q*4+1]),A.weightsIndices.push(J[q*4+2]),A.weightsIndices.push(J[q*4+3])),M.color&&(A.colors.push(S[0]),A.colors.push(S[1]),A.colors.push(S[2]),A.colors.push(S[(q-1)*3]),A.colors.push(S[(q-1)*3+1]),A.colors.push(S[(q-1)*3+2]),A.colors.push(S[q*3]),A.colors.push(S[q*3+1]),A.colors.push(S[q*3+2])),M.material&&M.material.mappingType!=="AllSame"&&(A.materialIndex.push(k),A.materialIndex.push(k),A.materialIndex.push(k)),M.normal&&(A.normal.push(x[0]),A.normal.push(x[1]),A.normal.push(x[2]),A.normal.push(x[(q-1)*3]),A.normal.push(x[(q-1)*3+1]),A.normal.push(x[(q-1)*3+2]),A.normal.push(x[q*3]),A.normal.push(x[q*3+1]),A.normal.push(x[q*3+2])),M.uv&&M.uv.forEach(function(oe,se){A.uvs[se]===void 0&&(A.uvs[se]=[]),A.uvs[se].push(j[se][0]),A.uvs[se].push(j[se][1]),A.uvs[se].push(j[se][(q-1)*2]),A.uvs[se].push(j[se][(q-1)*2+1]),A.uvs[se].push(j[se][q*2]),A.uvs[se].push(j[se][q*2+1])})},addMorphTargets:function(A,M,I,k){if(I.length!==0){A.morphTargetsRelative=!0,A.morphAttributes.position=[];var x=this;I.forEach(function(S){S.rawTargets.forEach(function(j){var F=n.Objects.Geometry[j.geoID];F!==void 0&&x.genMorphGeometry(A,M,F,k,j.name)})})}},genMorphGeometry:function(A,M,I,k,x){for(var S=M.PolygonVertexIndex!==void 0?M.PolygonVertexIndex.a:[],j=I.Vertices!==void 0?I.Vertices.a:[],F=I.Indexes!==void 0?I.Indexes.a:[],J=A.attributes.position.count*3,ne=new Float32Array(J),q=0;q<F.length;q++){var oe=F[q]*3;ne[oe]=j[q*3],ne[oe+1]=j[q*3+1],ne[oe+2]=j[q*3+2]}var se={vertexIndices:S,vertexPositions:ne},ae=this.genBuffers(se),ze=new G.Float32BufferAttribute(ae.vertex,3);ze.name=x||I.attrName,ze.applyMatrix4(k),A.morphAttributes.position.push(ze)},parseNormals:function(A){var M=A.MappingInformationType,I=A.ReferenceInformationType,k=A.Normals.a,x=[];return I==="IndexToDirect"&&("NormalIndex"in A?x=A.NormalIndex.a:"NormalsIndex"in A&&(x=A.NormalsIndex.a)),{dataSize:3,buffer:k,indices:x,mappingType:M,referenceType:I}},parseUVs:function(A){var M=A.MappingInformationType,I=A.ReferenceInformationType,k=A.UV.a,x=[];return I==="IndexToDirect"&&(x=A.UVIndex.a),{dataSize:2,buffer:k,indices:x,mappingType:M,referenceType:I}},parseVertexColors:function(A){var M=A.MappingInformationType,I=A.ReferenceInformationType,k=A.Colors.a,x=[];return I==="IndexToDirect"&&(x=A.ColorIndex.a),{dataSize:4,buffer:k,indices:x,mappingType:M,referenceType:I}},parseMaterialIndices:function(A){var M=A.MappingInformationType,I=A.ReferenceInformationType;if(M==="NoMappingInformation")return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:I};for(var k=A.Materials.a,x=[],S=0;S<k.length;++S)x.push(S);return{dataSize:1,buffer:k,indices:x,mappingType:M,referenceType:I}},parseNurbsGeometry:function(A){if(Qs===void 0)return console.error("THREE.FBXLoader: The loader relies on NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."),new G.BufferGeometry;var M=parseInt(A.Order);if(isNaN(M))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",A.Order,A.id),new G.BufferGeometry;for(var I=M-1,k=A.KnotVector.a,x=[],S=A.Points.a,j=0,F=S.length;j<F;j+=4)x.push(new G.Vector4().fromArray(S,j));var J,ne;if(A.Form==="Closed")x.push(x[0]);else if(A.Form==="Periodic"){J=I,ne=k.length-1-J;for(var j=0;j<I;++j)x.push(x[j])}var q=new Qs(I,k,x,J,ne),oe=q.getPoints(x.length*7),se=new Float32Array(oe.length*3);oe.forEach(function(ze,ee){ze.toArray(se,ee*3)});var ae=new G.BufferGeometry;return ae.setAttribute("position",new G.BufferAttribute(se,3)),ae}};function r(){}r.prototype={constructor:r,parse:function(){var A=[],M=this.parseClips();if(M!==void 0)for(var I in M){var k=M[I],x=this.addClip(k);A.push(x)}return A},parseClips:function(){if(n.Objects.AnimationCurve!==void 0){var A=this.parseAnimationCurveNodes();this.parseAnimationCurves(A);var M=this.parseAnimationLayers(A),I=this.parseAnimStacks(M);return I}},parseAnimationCurveNodes:function(){var A=n.Objects.AnimationCurveNode,M=new Map;for(var I in A){var k=A[I];if(k.attrName.match(/S|R|T|DeformPercent/)!==null){var x={id:k.id,attr:k.attrName,curves:{}};M.set(x.id,x)}}return M},parseAnimationCurves:function(A){var M=n.Objects.AnimationCurve;for(var I in M){var k={id:M[I].id,times:M[I].KeyTime.a.map(m),values:M[I].KeyValueFloat.a},x=t.get(k.id);if(x!==void 0){var S=x.parents[0].ID,j=x.parents[0].relationship;j.match(/X/)?A.get(S).curves.x=k:j.match(/Y/)?A.get(S).curves.y=k:j.match(/Z/)?A.get(S).curves.z=k:j.match(/d|DeformPercent/)&&A.has(S)&&(A.get(S).curves.morph=k)}}},parseAnimationLayers:function(A){var M=n.Objects.AnimationLayer,I=new Map;for(var k in M){var x=[],S=t.get(parseInt(k));if(S!==void 0){var j=S.children;j.forEach(function(F,J){if(A.has(F.ID)){var ne=A.get(F.ID);if(ne.curves.x!==void 0||ne.curves.y!==void 0||ne.curves.z!==void 0){if(x[J]===void 0){var q=t.get(F.ID).parents.filter(function(we){return we.relationship!==void 0})[0].ID;if(q!==void 0){var oe=n.Objects.Model[q.toString()];if(oe===void 0){console.warn("THREE.FBXLoader: Encountered a unused curve.",F);return}var se={modelName:oe.attrName?G.PropertyBinding.sanitizeNodeName(oe.attrName):"",ID:oe.id,initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};e.traverse(function(we){we.ID===oe.id&&(se.transform=we.matrix,we.userData.transformData&&(se.eulerOrder=we.userData.transformData.eulerOrder))}),se.transform||(se.transform=new G.Matrix4),"PreRotation"in oe&&(se.preRotation=oe.PreRotation.value),"PostRotation"in oe&&(se.postRotation=oe.PostRotation.value),x[J]=se}}x[J]&&(x[J][ne.attr]=ne)}else if(ne.curves.morph!==void 0){if(x[J]===void 0){var ae=t.get(F.ID).parents.filter(function(be){return be.relationship!==void 0})[0].ID,ze=t.get(ae).parents[0].ID,ee=t.get(ze).parents[0].ID,q=t.get(ee).parents[0].ID,oe=n.Objects.Model[q],se={modelName:oe.attrName?G.PropertyBinding.sanitizeNodeName(oe.attrName):"",morphName:n.Objects.Deformer[ae].attrName};x[J]=se}x[J][ne.attr]=ne}}}),I.set(parseInt(k),x)}}return I},parseAnimStacks:function(A){var M=n.Objects.AnimationStack,I={};for(var k in M){var x=t.get(parseInt(k)).children;x.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var S=A.get(x[0].ID);I[k]={name:M[k].attrName,layer:S}}return I},addClip:function(A){var M=[],I=this;return A.layer.forEach(function(k){M=M.concat(I.generateTracks(k))}),new G.AnimationClip(A.name,-1,M)},generateTracks:function(A){var M=[],I=new G.Vector3,k=new G.Quaternion,x=new G.Vector3;if(A.transform&&A.transform.decompose(I,k,x),I=I.toArray(),k=new G.Euler().setFromQuaternion(k,A.eulerOrder).toArray(),x=x.toArray(),A.T!==void 0&&Object.keys(A.T.curves).length>0){var S=this.generateVectorTrack(A.modelName,A.T.curves,I,"position");S!==void 0&&M.push(S)}if(A.R!==void 0&&Object.keys(A.R.curves).length>0){var j=this.generateRotationTrack(A.modelName,A.R.curves,k,A.preRotation,A.postRotation,A.eulerOrder);j!==void 0&&M.push(j)}if(A.S!==void 0&&Object.keys(A.S.curves).length>0){var F=this.generateVectorTrack(A.modelName,A.S.curves,x,"scale");F!==void 0&&M.push(F)}if(A.DeformPercent!==void 0){var J=this.generateMorphTrack(A);J!==void 0&&M.push(J)}return M},generateVectorTrack:function(A,M,I,k){var x=this.getTimesForAllAxes(M),S=this.getKeyframeTrackValues(x,M,I);return new G.VectorKeyframeTrack(A+"."+k,x,S)},generateRotationTrack:function(A,M,I,k,x,S){M.x!==void 0&&(this.interpolateRotations(M.x),M.x.values=M.x.values.map(G.MathUtils.degToRad)),M.y!==void 0&&(this.interpolateRotations(M.y),M.y.values=M.y.values.map(G.MathUtils.degToRad)),M.z!==void 0&&(this.interpolateRotations(M.z),M.z.values=M.z.values.map(G.MathUtils.degToRad));var j=this.getTimesForAllAxes(M),F=this.getKeyframeTrackValues(j,M,I);k!==void 0&&(k=k.map(G.MathUtils.degToRad),k.push(S),k=new G.Euler().fromArray(k),k=new G.Quaternion().setFromEuler(k)),x!==void 0&&(x=x.map(G.MathUtils.degToRad),x.push(S),x=new G.Euler().fromArray(x),x=new G.Quaternion().setFromEuler(x).inverse());for(var J=new G.Quaternion,ne=new G.Euler,q=[],oe=0;oe<F.length;oe+=3)ne.set(F[oe],F[oe+1],F[oe+2],S),J.setFromEuler(ne),k!==void 0&&J.premultiply(k),x!==void 0&&J.multiply(x),J.toArray(q,oe/3*4);return new G.QuaternionKeyframeTrack(A+".quaternion",j,q)},generateMorphTrack:function(A){var M=A.DeformPercent.curves.morph,I=M.values.map(function(x){return x/100}),k=e.getObjectByName(A.modelName).morphTargetDictionary[A.morphName];return new G.NumberKeyframeTrack(A.modelName+".morphTargetInfluences["+k+"]",M.times,I)},getTimesForAllAxes:function(A){var M=[];return A.x!==void 0&&(M=M.concat(A.x.times)),A.y!==void 0&&(M=M.concat(A.y.times)),A.z!==void 0&&(M=M.concat(A.z.times)),M=M.sort(function(I,k){return I-k}).filter(function(I,k,x){return x.indexOf(I)==k}),M},getKeyframeTrackValues:function(A,M,I){var k=I,x=[],S=-1,j=-1,F=-1;return A.forEach(function(J){if(M.x&&(S=M.x.times.indexOf(J)),M.y&&(j=M.y.times.indexOf(J)),M.z&&(F=M.z.times.indexOf(J)),S!==-1){var ne=M.x.values[S];x.push(ne),k[0]=ne}else x.push(k[0]);if(j!==-1){var q=M.y.values[j];x.push(q),k[1]=q}else x.push(k[1]);if(F!==-1){var oe=M.z.values[F];x.push(oe),k[2]=oe}else x.push(k[2])}),x},interpolateRotations:function(A){for(var M=1;M<A.values.length;M++){var I=A.values[M-1],k=A.values[M]-I,x=Math.abs(k);if(x>=180){for(var S=x/180,j=k/S,F=I+j,J=A.times[M-1],ne=A.times[M]-J,q=ne/S,oe=J+q,se=[],ae=[];oe<A.times[M];)se.push(oe),oe+=q,ae.push(F),F+=j;A.times=O(A.times,M,se),A.values=O(A.values,M,ae)}}}};function a(){}a.prototype={constructor:a,getPrevNode:function(){return this.nodeStack[this.currentIndent-2]},getCurrentNode:function(){return this.nodeStack[this.currentIndent-1]},getCurrentProp:function(){return this.currentProp},pushStack:function(A){this.nodeStack.push(A),this.currentIndent+=1},popStack:function(){this.nodeStack.pop(),this.currentIndent-=1},setCurrentProp:function(A,M){this.currentProp=A,this.currentPropName=M},parse:function(A){this.currentIndent=0,this.allNodes=new h,this.nodeStack=[],this.currentProp=[],this.currentPropName="";var M=this,I=A.split(/[\r\n]+/);return I.forEach(function(k,x){var S=k.match(/^[\s\t]*;/),j=k.match(/^[\s\t]*$/);if(!(S||j)){var F=k.match("^\\t{"+M.currentIndent+"}(\\w+):(.*){",""),J=k.match("^\\t{"+M.currentIndent+"}(\\w+):[\\s\\t\\r\\n](.*)"),ne=k.match("^\\t{"+(M.currentIndent-1)+"}}");F?M.parseNodeBegin(k,F):J?M.parseNodeProperty(k,J,I[++x]):ne?M.popStack():k.match(/^[^\s\t}]/)&&M.parseNodePropertyContinued(k)}}),this.allNodes},parseNodeBegin:function(A,M){var I=M[1].trim().replace(/^"/,"").replace(/"$/,""),k=M[2].split(",").map(function(F){return F.trim().replace(/^"/,"").replace(/"$/,"")}),x={name:I},S=this.parseNodeAttr(k),j=this.getCurrentNode();this.currentIndent===0?this.allNodes.add(I,x):I in j?(I==="PoseNode"?j.PoseNode.push(x):j[I].id!==void 0&&(j[I]={},j[I][j[I].id]=j[I]),S.id!==""&&(j[I][S.id]=x)):typeof S.id=="number"?(j[I]={},j[I][S.id]=x):I!=="Properties70"&&(I==="PoseNode"?j[I]=[x]:j[I]=x),typeof S.id=="number"&&(x.id=S.id),S.name!==""&&(x.attrName=S.name),S.type!==""&&(x.attrType=S.type),this.pushStack(x)},parseNodeAttr:function(A){var M=A[0];A[0]!==""&&(M=parseInt(A[0]),isNaN(M)&&(M=A[0]));var I="",k="";return A.length>1&&(I=A[1].replace(/^(\w+)::/,""),k=A[2]),{id:M,name:I,type:k}},parseNodeProperty:function(A,M,I){var k=M[1].replace(/^"/,"").replace(/"$/,"").trim(),x=M[2].replace(/^"/,"").replace(/"$/,"").trim();k==="Content"&&x===","&&(x=I.replace(/"/g,"").replace(/,$/,"").trim());var S=this.getCurrentNode(),j=S.name;if(j==="Properties70"){this.parseNodeSpecialProperty(A,k,x);return}if(k==="C"){var F=x.split(",").slice(1),J=parseInt(F[0]),ne=parseInt(F[1]),q=x.split(",").slice(3);q=q.map(function(oe){return oe.trim().replace(/^"/,"")}),k="connections",x=[J,ne],R(x,q),S[k]===void 0&&(S[k]=[])}k==="Node"&&(S.id=x),k in S&&Array.isArray(S[k])?S[k].push(x):k!=="a"?S[k]=x:S.a=x,this.setCurrentProp(S,k),k==="a"&&x.slice(-1)!==","&&(S.a=D(x))},parseNodePropertyContinued:function(A){var M=this.getCurrentNode();M.a+=A,A.slice(-1)!==","&&(M.a=D(M.a))},parseNodeSpecialProperty:function(A,M,I){var k=I.split('",').map(function(ne){return ne.trim().replace(/^\"/,"").replace(/\s/,"_")}),x=k[0],S=k[1],j=k[2],F=k[3],J=k[4];switch(S){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":J=parseFloat(J);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":J=D(J);break}this.getPrevNode()[x]={type:S,type2:j,flag:F,value:J},this.setCurrentProp(this.getPrevNode(),x)}};function l(){}l.prototype={constructor:l,parse:function(A){var M=new c(A);M.skip(23);var I=M.getUint32();console.info("THREE.FBXLoader: FBX binary version: "+I);for(var k=new h;!this.endOfContent(M);){var x=this.parseNode(M,I);x!==null&&k.add(x.name,x)}return k},endOfContent:function(A){return A.size()%16===0?(A.getOffset()+160+16&-16)>=A.size():A.getOffset()+160+16>=A.size()},parseNode:function(A,M){var I={},k=M>=7500?A.getUint64():A.getUint32(),x=M>=7500?A.getUint64():A.getUint32();M>=7500?A.getUint64():A.getUint32();var S=A.getUint8(),j=A.getString(S);if(k===0)return null;for(var F=[],J=0;J<x;J++)F.push(this.parseProperty(A));var ne=F.length>0?F[0]:"",q=F.length>1?F[1]:"",oe=F.length>2?F[2]:"";for(I.singleProperty=x===1&&A.getOffset()===k;k>A.getOffset();){var se=this.parseNode(A,M);se!==null&&this.parseSubNode(j,I,se)}return I.propertyList=F,typeof ne=="number"&&(I.id=ne),q!==""&&(I.attrName=q),oe!==""&&(I.attrType=oe),j!==""&&(I.name=j),I},parseSubNode:function(A,M,I){if(I.singleProperty===!0){var k=I.propertyList[0];Array.isArray(k)?(M[I.name]=I,I.a=k):M[I.name]=k}else if(A==="Connections"&&I.name==="C"){var x=[];I.propertyList.forEach(function(oe,se){se!==0&&x.push(oe)}),M.connections===void 0&&(M.connections=[]),M.connections.push(x)}else if(I.name==="Properties70"){var S=Object.keys(I);S.forEach(function(oe){M[oe]=I[oe]})}else if(A==="Properties70"&&I.name==="P"){var j=I.propertyList[0],F=I.propertyList[1],J=I.propertyList[2],ne=I.propertyList[3],q;j.indexOf("Lcl ")===0&&(j=j.replace("Lcl ","Lcl_")),F.indexOf("Lcl ")===0&&(F=F.replace("Lcl ","Lcl_")),F==="Color"||F==="ColorRGB"||F==="Vector"||F==="Vector3D"||F.indexOf("Lcl_")===0?q=[I.propertyList[4],I.propertyList[5],I.propertyList[6]]:q=I.propertyList[4],M[j]={type:F,type2:J,flag:ne,value:q}}else M[I.name]===void 0?typeof I.id=="number"?(M[I.name]={},M[I.name][I.id]=I):M[I.name]=I:I.name==="PoseNode"?(Array.isArray(M[I.name])||(M[I.name]=[M[I.name]]),M[I.name].push(I)):M[I.name][I.id]===void 0&&(M[I.name][I.id]=I)},parseProperty:function(A){var M=A.getString(1);switch(M){case"C":return A.getBoolean();case"D":return A.getFloat64();case"F":return A.getFloat32();case"I":return A.getInt32();case"L":return A.getInt64();case"R":var I=A.getUint32();return A.getArrayBuffer(I);case"S":var I=A.getUint32();return A.getString(I);case"Y":return A.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var k=A.getUint32(),x=A.getUint32(),S=A.getUint32();if(x===0)switch(M){case"b":case"c":return A.getBooleanArray(k);case"d":return A.getFloat64Array(k);case"f":return A.getFloat32Array(k);case"i":return A.getInt32Array(k);case"l":return A.getInt64Array(k)}typeof rp=="undefined"&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var j=new rp.Inflate(new Uint8Array(A.getArrayBuffer(S))),F=new c(j.decompress().buffer);switch(M){case"b":case"c":return F.getBooleanArray(k);case"d":return F.getFloat64Array(k);case"f":return F.getFloat32Array(k);case"i":return F.getInt32Array(k);case"l":return F.getInt64Array(k)}default:throw new Error("THREE.FBXLoader: Unknown property type "+M)}}};function c(A,M){this.dv=new DataView(A),this.offset=0,this.littleEndian=M!==void 0?M:!0}c.prototype={constructor:c,getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(A){this.offset+=A},getBoolean:function(){return(this.getUint8()&1)===1},getBooleanArray:function(A){for(var M=[],I=0;I<A;I++)M.push(this.getBoolean());return M},getUint8:function(){var A=this.dv.getUint8(this.offset);return this.offset+=1,A},getInt16:function(){var A=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,A},getInt32:function(){var A=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,A},getInt32Array:function(A){for(var M=[],I=0;I<A;I++)M.push(this.getInt32());return M},getUint32:function(){var A=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,A},getInt64:function(){var A,M;return this.littleEndian?(A=this.getUint32(),M=this.getUint32()):(M=this.getUint32(),A=this.getUint32()),M&2147483648?(M=~M&4294967295,A=~A&4294967295,A===4294967295&&(M=M+1&4294967295),A=A+1&4294967295,-(M*4294967296+A)):M*4294967296+A},getInt64Array:function(A){for(var M=[],I=0;I<A;I++)M.push(this.getInt64());return M},getUint64:function(){var A,M;return this.littleEndian?(A=this.getUint32(),M=this.getUint32()):(M=this.getUint32(),A=this.getUint32()),M*4294967296+A},getFloat32:function(){var A=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,A},getFloat32Array:function(A){for(var M=[],I=0;I<A;I++)M.push(this.getFloat32());return M},getFloat64:function(){var A=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,A},getFloat64Array:function(A){for(var M=[],I=0;I<A;I++)M.push(this.getFloat64());return M},getArrayBuffer:function(A){var M=this.dv.buffer.slice(this.offset,this.offset+A);return this.offset+=A,M},getString:function(A){for(var M=[],I=0;I<A;I++)M[I]=this.getUint8();var k=M.indexOf(0);return k>=0&&(M=M.slice(0,k)),G.LoaderUtils.decodeText(new Uint8Array(M))}};function h(){}h.prototype={constructor:h,add:function(A,M){this[A]=M}};function u(A){var M="Kaydara FBX Binary \0";return A.byteLength>=M.length&&M===L(A,0,M.length)}function d(A){var M=["K","a","y","d","a","r","a","\\","F","B","X","\\","B","i","n","a","r","y","\\","\\"],I=0;function k(j){var F=A[j-1];return A=A.slice(I+j),I++,F}for(var x=0;x<M.length;++x){var S=k(1);if(S===M[x])return!1}return!0}function p(A){var M=/FBXVersion: (\d+)/,I=A.match(M);if(I){var k=parseInt(I[1]);return k}throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function m(A){return A/46186158e3}var g=[];function v(A,M,I,k){var x;switch(k.mappingType){case"ByPolygonVertex":x=A;break;case"ByPolygon":x=M;break;case"ByVertice":x=I;break;case"AllSame":x=k.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+k.mappingType)}k.referenceType==="IndexToDirect"&&(x=k.indices[x]);var S=x*k.dataSize,j=S+k.dataSize;return z(g,k.buffer,S,j)}var y=new G.Euler,w=new G.Vector3;function C(A){var M=new G.Matrix4,I=new G.Matrix4,k=new G.Matrix4,x=new G.Matrix4,S=new G.Matrix4,j=new G.Matrix4,F=new G.Matrix4,J=new G.Matrix4,ne=new G.Matrix4,q=new G.Matrix4,oe=new G.Matrix4,se=A.inheritType?A.inheritType:0;if(A.translation&&M.setPosition(w.fromArray(A.translation)),A.preRotation){var ae=A.preRotation.map(G.MathUtils.degToRad);ae.push(A.eulerOrder),I.makeRotationFromEuler(y.fromArray(ae))}if(A.rotation){var ae=A.rotation.map(G.MathUtils.degToRad);ae.push(A.eulerOrder),k.makeRotationFromEuler(y.fromArray(ae))}if(A.postRotation){var ae=A.postRotation.map(G.MathUtils.degToRad);ae.push(A.eulerOrder),x.makeRotationFromEuler(y.fromArray(ae))}A.scale&&S.scale(w.fromArray(A.scale)),A.scalingOffset&&F.setPosition(w.fromArray(A.scalingOffset)),A.scalingPivot&&j.setPosition(w.fromArray(A.scalingPivot)),A.rotationOffset&&J.setPosition(w.fromArray(A.rotationOffset)),A.rotationPivot&&ne.setPosition(w.fromArray(A.rotationPivot)),A.parentMatrixWorld&&(q=A.parentMatrixWorld);var ze=I.multiply(k).multiply(x),ee=new G.Matrix4;q.extractRotation(ee);var we=new G.Matrix4;we.copyPosition(q);var le=new G.Matrix4;le.getInverse(ee).multiply(q);var he=new G.Matrix4;if(se===0)he.copy(ee).multiply(ze).multiply(le).multiply(S);else if(se===1)he.copy(ee).multiply(le).multiply(ze).multiply(S);else{var be=new G.Matrix4().getInverse(S),te=new G.Matrix4().multiply(le).multiply(be);he.copy(ee).multiply(ze).multiply(te).multiply(S)}var ke=new G.Matrix4().getInverse(ne),Re=new G.Matrix4().getInverse(j),ye=new G.Matrix4;ye.copy(M).multiply(J).multiply(ne).multiply(I).multiply(k).multiply(x).multiply(ke).multiply(F).multiply(j).multiply(S).multiply(Re);var De=new G.Matrix4().copyPosition(ye),ve=new G.Matrix4().copy(q).multiply(De);return oe.copyPosition(ve),ye=new G.Matrix4().multiply(oe).multiply(he),ye}function E(A){A=A||0;var M=["ZYX","YZX","XZY","ZXY","YXZ","XYZ"];return A===6?(console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect."),M[0]):M[A]}function D(A){var M=A.split(",").map(function(I){return parseFloat(I)});return M}function L(A,M,I){return M===void 0&&(M=0),I===void 0&&(I=A.byteLength),G.LoaderUtils.decodeText(new Uint8Array(A,M,I))}function R(A,M){for(var I=0,k=A.length,x=M.length;I<x;I++,k++)A[k]=M[I]}function z(A,M,I,k){for(var x=I,S=0;x<k;x++,S++)A[S]=M[x];return A}function O(A,M,I){return A.slice(0,M).concat(I).concat(A.slice(M))}return i}();const M5=(n,t)=>{var g;const e=(t==null?void 0:t.fbx_url)||du,i=(g=t==null?void 0:t.north_rad)!=null?g:void 0,s={};let o={x:0,y:0,z:0},r=[0,0,0],a=1,l=i;n.on("modelLoaded",m);const c=v=>$(exports,null,function*(){var E;const y=(v==null?void 0:v.fbx_url)||e;if(l=(E=v==null?void 0:v.north_rad)!=null?E:i,typeof l!="number")throw new Error('"northRad"配置参数缺失:未配置指南针指向!');s.object&&(s.object.parent&&s.object.parent.remove(s.object),s.object.traverse(D=>{var L,R;D instanceof b.Mesh&&((L=D.geometry)==null||L.dispose(),Array.isArray(D.material)?D.material.forEach(z=>z.dispose()):(R=D.material)==null||R.dispose())}));const C=yield new y1().loadAsync(y);return f1(C,{transparent:!0,side:b.DoubleSide,blending:b.AdditiveBlending}),s.object=C,m(),!0}),h=({latitude:v})=>{if(!s.object)return;const y=u(v);y&&(s.object.position.y=y)},u=v=>{if(s.yBase===void 0)return;const y=.6;if(v>=Math.PI/4)return s.yBase-(y+1.6);const w=v*(4/Math.PI);return s.yBase-(y*w+1.6)},d=()=>{if(!s.object)return;const v=u(n.getPose().latitude);v&&(s.object.position.y=v),n.scene.add(s.object),n.needsRender=!0,n.on("cameraDirectionUpdate",h)},p=()=>{s.object&&(n.scene.remove(s.object),n.needsRender=!0,n.off("cameraDirectionUpdate",h))};function m(){const v=s.object;if(!v)return;const y=n.model.bounding,w=y.max.x-y.min.x,C=y.max.z-y.min.z,E=Math.max(w,C),{max:{x:D,z:L},min:{x:R,y:z,z:O}}=y;s.yBase=z,o={x:(D+R)/2,y:z-1.6,z:(L+O)/2},r=[0,l-Math.PI/2,0],a=.0045*E,A5(v,{position:o,rotation:r,scale:a})}return{load:c,disable:p,enable:d}};function I5(n,t){var c,h,u,d,p;const e=(c=t==null?void 0:t.size)!=null?c:512,i=(h=t==null?void 0:t.fontSize)!=null?h:e*(35/256)*1.2,s=(u=t==null?void 0:t.backgroundColor)!=null?u:"rgba(0,0,0,0)",o=(d=t==null?void 0:t.fontColor)!=null?d:"#fff",r=(p=t==null?void 0:t.textAlign)!=null?p:"center",a=document.createElement("canvas");a.setAttribute("width",e+""),a.setAttribute("height",e+"");const l=a.getContext("2d");return l.fillStyle=s,l.fillRect(0,0,e,e),l.font=`${i}px "微软雅黑"`,l.textAlign=r,l.fillStyle=o,l.fillText(n,e/2,e*.7),new G.CanvasTexture(a)}const E5=({x:n,y:t,z:e})=>new G.Vector3(n,t,e),k5=(n,t)=>{var g,v,y;const e={},i=(g=t==null?void 0:t.animationEnabled)!=null?g:!0,s=(v=t==null?void 0:t.position)!=null?v:void 0,o=(y=t==null?void 0:t.rad)!=null?y:void 0,r=(t==null?void 0:t.fbx_url)||pu,a=[],l=w=>$(exports,null,function*(){var A,M,I,k,x,S,j,F;const C=(A=w==null?void 0:w.position)!=null?A:s;if(!C)return Promise.reject(new Error("ModelEntryDoorGuidePlugin.load(): position is undefined"));const E=E5(C),D=(M=w==null?void 0:w.rad)!=null?M:o,L=(I=w==null?void 0:w.fbx_url)!=null?I:r;if(e.rad=D,D===void 0)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): rad is ${D}`));const R=yield new y1().loadAsync(L);R.position.copy(E),R.rotation.z=D,R.scale.set(.8,.8,.8),f1(R,{transparent:!0,side:b.DoubleSide});const z=(j=(S=(x=(k=R.children)==null?void 0:k[0])==null?void 0:x.children)==null?void 0:S[3])==null?void 0:j.clone();if(!z)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): textMesh is ${z}`));const O=(F=t.name)!=null?F:"入户门";return z.material=new G.MeshBasicMaterial({transparent:!0,map:I5(O)}),z.renderOrder=3,R.children[0].add(z),e.object=R,!0}),c=()=>{if(e.animation)return;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.initAnimation(): state.object is ",e.object);const w=1,C=new G.AnimationMixer(e.object);a.push(C);const E=C.clipAction(e.object.animations[0]);E.timeScale=w;let D;const L=()=>{let A=0,M=0;const I=1e3/30,k=x=>{A=requestAnimationFrame(k);const S=x-M;S<I||(M=x,a.forEach(j=>j.update(S/1e3)),n.needsRender=!0)};return A=requestAnimationFrame(k),()=>{cancelAnimationFrame(A)}},O={play:()=>{D||(E.play(),D=L(),requestAnimationFrame(()=>{e.object&&e.object.rotation.z!==e.rad&&(e.object.rotation.z=e.rad)}))},stop:()=>{E.stop(),D==null||D(),D=void 0}};e.animation=O},h=w=>{var E;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.enable(): object is ",e.object);((E=w==null?void 0:w.animationEnable)!=null?E:i)&&(e.animation||c(),e.animation.play()),n.scene.add(e.object),n.needsRender=!0},u=()=>{e.object&&(e.animation&&e.animation.stop(),n.scene.remove(e.object),n.needsRender=!0)},d=w=>w==="Floorplan"?h():u();return{load:l,enable:w=>(e.enabled||(e.enabled=!0,d(n.currentMode),n.on("modeChange",d),h(w)),!0),disable:()=>(e.enabled&&(e.enabled=!1,u(),n.off("modeChange",d)),!0)}},x5=Gi;function S5(n,t,e,i=x5.Linear.None){const s=new xl(n).to(t,e).easing(i);aa(()=>s.start(0));const o=Zo(a=>{s.update(a)===!1&&o()}),r=[];return s.onDestroy=a=>(r.push(a),s),s.destroy=function(){this.stop(),Object.assign(s,{_onStartCallback:null,_onUpdateCallback:null,_onCompleteCallback:null,_onStopCallbackL:null});let a;for(;a=r.shift();)a();o()},s}function T5(n,t){return S5({progress:0},{progress:1},n,t)}var b1=(n=>(n.Move="Move",n.Rotate="Rotate",n))(b1||{}),nn=(n=>(n.Clockwise="Clockwise",n.Anticlockwise="Anticlockwise",n.Loop="Loop",n))(nn||{});const Xa=Math.PI*2;function ap(n){return(n%Xa+Xa)%Xa}function lp(n){return n%Xa}function Cc(n,t,e){return n+(t-n)*e}const ph=(n,t,e)=>{const i=Math.PI,s=i*2;let o=ap(n),r=ap(t);return e===nn.Anticlockwise&&o<r&&(o+=s),e===nn.Clockwise&&r<o&&(r+=s),e===nn.Loop&&r-o>i?ph(o,r,nn.Anticlockwise):e===nn.Loop&&o-r>i?ph(o,r,nn.Clockwise):{from:o,to:r}},D5=n=>{const t={},e=(l,c,...h)=>$(exports,[l,c,...h],function*(o,r,a={preload:!0}){return t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),o.mode&&o.mode!==n.currentMode&&(yield n.changeMode(o.mode)),a.preload&&o.panoIndex!==void 0&&o.panoIndex!==n.panoIndex&&(yield n.preloadPano(o.panoIndex)),a.asyncEndCallback&&(yield a.asyncEndCallback()),o.panoIndex===void 0&&o.fov===void 0&&o.latitude===void 0&&o.longitude===void 0?!0:yield new Promise((u,d)=>{const p=o.panoIndex!==void 0?o.panoIndex:n.panoIndex;p!==void 0?n.moveToPano(p,V({duration:r,moveEndCallback:()=>u(!0),moveCancelCallback:()=>d(new Error("move canceled"))},o)):d(new Error("unexpected error"))})}),i=o=>{const r=n.state,a=lp(r.latitude),l=lp(o.latitude),{from:c,to:h}=ph(r.longitude,o.longitude,o.rotation||nn.Loop),u=r.fov,d=o.fov;return{from:{latitude:a,longitude:c,fov:u},to:{latitude:l,longitude:h,fov:d}}};return{move:e,rotate:(l,c,...h)=>$(exports,[l,c,...h],function*(o,r,a={}){t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),n.currentMode!==rt.Five.Mode.Panorama&&(yield n.changeMode(rt.Five.Mode.Panorama)),o.panoIndex!==void 0&&o.panoIndex!==n.panoIndex&&(a.preload&&(yield n.preloadPano(o.panoIndex)),yield new Promise((p,m)=>{if(!o.panoIndex){p(!0);return}n.moveToPano(o.panoIndex,{moveEndCallback:()=>p(!0),moveCancelCallback:()=>m(new Error("move canceled"))})})),a.asyncEndCallback&&(yield a.asyncEndCallback());const{from:u,to:d}=i(o);return yield new Promise(p=>{const m=({progress:C})=>{const E={};E.longitude=Cc(u.longitude,d.longitude,C),E.latitude=Cc(u.latitude,d.latitude,C),E.fov=Cc(u.fov,d.fov,C),n.setState(E,!0)},g=()=>{p(!0)},v=()=>{p(!1)},y=o.rotateSpeed?Math.ceil(Math.abs(d.longitude-u.longitude)/o.rotateSpeed*1e3):r,w=T5(y,Gi.Linear.None).onUpdate(m).onComplete(g).onDestroy(v);o.rotation===nn.Loop&&w.repeat(1/0).yoyo(!0),t.interruptCallback=(C=!0)=>{w.destroy(),t.interruptCallback=void 0,t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=void 0),p(C)},t.timeoutId=setTimeout(()=>{t.interruptCallback&&t.interruptCallback(!0)},r)})})}};function cp(n,t){return n.x===t.x&&n.y===t.y}function A1(n,t){return Math.abs(n)===1/0&&Math.abs(t)===1/0?!0:Math.abs(n-t)<.001}function bl(n,t){return(t.y-n.y)/(t.x-n.x)}function w1(n,t,e){const i=bl(n[1],n[0]),s=bl(t[1],t[0]);if(isNaN(i)||isNaN(s)||A1(i,s))return!1;if(za(n[0],t))return n[0];if(za(n[1],t))return n[1];if(za(t[0],n))return t[0];if(za(t[1],n))return t[1];if(e&&!z5(n,t))return!1;const o=n[0],r=t[0];if(Math.abs(i)===1/0)return{x:o.x,y:t[1].y-(t[1].x-o.x)*s};if(Math.abs(s)===1/0)return{x:r.x,y:n[1].y-(n[1].x-r.x)*i};const a=(r.y-o.y+i*o.x-s*r.x)/(i-s),l=i*a-i*o.x+o.y;return{x:a,y:l}}function za(n,t){return cp(n,t[0])||cp(n,t[1])?!0:(t[0].x-n.x)*(n.x-t[1].x)>=0&&(t[0].y-n.y)*(n.y-t[1].y)>=0&&A1(bl(t[0],n),bl(n,t[1]))}function L5(n){let t=1/0,e=-1/0,i=1/0,s=-1/0;return n.forEach(o=>{t=Math.min(t,o.x),e=Math.max(e,o.x),i=Math.min(i,o.y),s=Math.max(s,o.y)}),{x:(t+e)/2,y:(i+s)/2}}function Oa(n,t,e){return(n.x-e.x)*(t.y-e.y)-(t.x-e.x)*(n.y-e.y)}function z5(n,t){return Math.max(n[0].x,n[1].x)>=Math.min(t[0].x,t[1].x)&&Math.max(t[0].x,t[1].x)>=Math.min(n[0].x,n[1].x)&&Math.max(n[0].y,n[1].y)>=Math.min(t[0].y,t[1].y)&&Oa(t[0],n[1],n[0])*Oa(n[1],t[1],n[0])>0&&Oa(n[0],t[1],t[0])*Oa(t[1],n[1],t[0])>0?1:0}function P1(n,t=0){t<=0?requestAnimationFrame(n):requestAnimationFrame(()=>P1(n,t-1))}const O5=`<style type="text/css">
|
|
510
510
|
.PanoRulerPlugin-rule-line {
|
|
511
511
|
position: absolute;
|
|
512
512
|
transform-origin: left center;
|
|
@@ -908,7 +908,7 @@ void main() {
|
|
|
908
908
|
`)}switch(this.mode){case si.EVAL:this.source+=" ; "+t+`
|
|
909
909
|
`;break;case si.ESCAPED:this.source+=" ; __append(escapeFn("+Yp(t)+`))
|
|
910
910
|
`;break;case si.RAW:this.source+=" ; __append("+Yp(t)+`)
|
|
911
|
-
`;break;case si.COMMENT:break;case si.LITERAL:this._addOutput(t);break}}else this._addOutput(t)}}}const kc=.001,Zp=.01,qp=hu,tE=(n,t)=>{var ne,q,oe,se,ae,ze,ee,we;let e=t==null?void 0:t.container,i=1.4;const s=(ne=t==null?void 0:t.wait)!=null?ne:200,o=(q=t==null?void 0:t.maxNumberOnScreen)!=null?q:3,r=(oe=t==null?void 0:t.minRad)!=null?oe:Math.PI/4,a=(se=t==null?void 0:t.nearTolerance)!=null?se:100,l=(ae=t==null?void 0:t.upsideHeight)!=null?ae:1.6,c=(ze=t==null?void 0:t.minDistance)!=null?ze:1.2,h=(ee=t==null?void 0:t.maxDistance)!=null?ee:3.5,u=oa(n),d=document.createElement("div");d.classList.add("PanoSpatialTagPlugin"),Object.assign(d.style,qI);const p=new rt.Subscribe;let m=new Image;m.src=qp;const g={points:[],origins:[],tags:[],template:"",events:{},render:$I,folded:!1,enabled:!0,forbidden:!0},v=new UI({target:d,props:{origins:g.origins}}),y=(le,he)=>{D(),he&&L()},w=()=>{g.forbidden&&(g.forbidden=!1,L())},C=(le,he)=>{if(g.tags.length===0)return;const be=he.longitude-n.state.longitude,te=n.camera.clone();te.position.copy(he.offset),te.rotateOnWorldAxis(new b.Vector3(0,1,0),be),te.updateProjectionMatrix(),te.updateMatrixWorld(!0);const ke=new b.Frustum,Re=new b.Matrix4;Re.multiplyMatrices(te.projectionMatrix,te.matrixWorldInverse),ke.setFromProjectionMatrix(Re),g.tags.forEach(ye=>{const De=te.position.clone().setY(i).distanceTo(ye.position);if(De<c||De>h||!ke.containsPoint(ye.position))return ye.destroying=!0;const ve=ye.position.clone().sub(te.position).setY(0);if(ve.angleTo(ye.normal)>Math.PI/2-r&&ve.angleTo(ye.normal)<Math.PI/2+r)return ye.destroying=!0}),g.tags.forEach(ye=>{ye.destroying?ye.app.$set({contentZoom:.1+te.position.distanceTo(ye.position)/h,lineWidthZoom:.38*(.01+te.position.distanceTo(ye.position)/h),destroying:ye.destroying}):ye.app.$set({lineWidthZoom:.38*(.01+te.position.distanceTo(ye.position)/h),lineHeightZoom:.4+(te.position.distanceTo(ye.position)-c)/h*.6,contentZoom:.1+te.position.distanceTo(ye.position)/h})}),setTimeout(()=>{g.tags.forEach(ye=>{ye.destroying&&(ye.app.$destroy(),ye=null)}),g.tags=g.tags.filter(ye=>!ye.destroying),D()},1900)},E=le=>{le!==rt.Five.Mode.Panorama&&!g.forbidden&&(v.$set({origins:[]}),g.tags.forEach(he=>{he.app.$destroy(),he=null}),g.origins=[],g.tags=[],g.forbidden=!0)},D=()=>{if(g.forbidden||!g.enabled)return;const le=n.camera,he=le.getWorldDirection(new b.Vector3);g.origins=g.tags.map(be=>{const te=be.position.clone().project(le),ke=be.position.clone().sub(le.position).setY(0).angleTo(he.setY(0))<Math.PI/2;return{id:be.id,front:ke,left:(te.x+1)/2*100,top:(-te.y+1)/2*100,destroying:be.destroying}}),v.$set({origins:g.origins})},L=()=>{g.forbidden||!g.enabled||(g.timeoutId&&clearTimeout(g.timeoutId),g.timeoutId=setTimeout(()=>{g.timeoutId=void 0;const le=R();le.length&&(g.tags=g.tags.concat(le),D())},s))},R=()=>{const{clientWidth:le,clientHeight:he}=n.getElement(),be=[],te=n.camera,ke=new b.Frustum,Re=new b.Matrix4,ye=te.getWorldDirection(new b.Vector3);Re.multiplyMatrices(te.projectionMatrix,te.matrixWorldInverse),ke.setFromProjectionMatrix(Re);const De=g.tags.filter(Ae=>ke.containsPoint(Ae.position)&&!Ae.destroying).length,ve=g.points.reduce((Ae,Oe)=>{if(g.tags.find(lt=>Oe.id===lt.id&&!lt.destroying))return Ae;const
|
|
911
|
+
`;break;case si.COMMENT:break;case si.LITERAL:this._addOutput(t);break}}else this._addOutput(t)}}}const kc=.001,Zp=.01,qp=hu,tE=(n,t)=>{var ne,q,oe,se,ae,ze,ee,we;let e=t==null?void 0:t.container,i=1.4;const s=(ne=t==null?void 0:t.wait)!=null?ne:200,o=(q=t==null?void 0:t.maxNumberOnScreen)!=null?q:3,r=(oe=t==null?void 0:t.minRad)!=null?oe:Math.PI/4,a=(se=t==null?void 0:t.nearTolerance)!=null?se:100,l=(ae=t==null?void 0:t.upsideHeight)!=null?ae:1.6,c=(ze=t==null?void 0:t.minDistance)!=null?ze:1.2,h=(ee=t==null?void 0:t.maxDistance)!=null?ee:3.5,u=oa(n),d=document.createElement("div");d.classList.add("PanoSpatialTagPlugin"),Object.assign(d.style,qI);const p=new rt.Subscribe;let m=new Image;m.src=qp;const g={points:[],origins:[],tags:[],template:"",events:{},render:$I,folded:!1,enabled:!0,forbidden:!0},v=new UI({target:d,props:{origins:g.origins}}),y=(le,he)=>{D(),he&&L()},w=()=>{g.forbidden&&(g.forbidden=!1,L())},C=(le,he)=>{if(g.tags.length===0)return;const be=he.longitude-n.state.longitude,te=n.camera.clone();te.position.copy(he.offset),te.rotateOnWorldAxis(new b.Vector3(0,1,0),be),te.updateProjectionMatrix(),te.updateMatrixWorld(!0);const ke=new b.Frustum,Re=new b.Matrix4;Re.multiplyMatrices(te.projectionMatrix,te.matrixWorldInverse),ke.setFromProjectionMatrix(Re),g.tags.forEach(ye=>{const De=te.position.clone().setY(i).distanceTo(ye.position);if(De<c||De>h||!ke.containsPoint(ye.position))return ye.destroying=!0;const ve=ye.position.clone().sub(te.position).setY(0);if(ve.angleTo(ye.normal)>Math.PI/2-r&&ve.angleTo(ye.normal)<Math.PI/2+r)return ye.destroying=!0}),g.tags.forEach(ye=>{ye.destroying?ye.app.$set({contentZoom:.1+te.position.distanceTo(ye.position)/h,lineWidthZoom:.38*(.01+te.position.distanceTo(ye.position)/h),destroying:ye.destroying}):ye.app.$set({lineWidthZoom:.38*(.01+te.position.distanceTo(ye.position)/h),lineHeightZoom:.4+(te.position.distanceTo(ye.position)-c)/h*.6,contentZoom:.1+te.position.distanceTo(ye.position)/h})}),setTimeout(()=>{g.tags.forEach(ye=>{ye.destroying&&(ye.app.$destroy(),ye=null)}),g.tags=g.tags.filter(ye=>!ye.destroying),D()},1900)},E=le=>{le!==rt.Five.Mode.Panorama&&!g.forbidden&&(v.$set({origins:[]}),g.tags.forEach(he=>{he.app.$destroy(),he=null}),g.origins=[],g.tags=[],g.forbidden=!0)},D=()=>{if(g.forbidden||!g.enabled)return;const le=n.camera,he=le.getWorldDirection(new b.Vector3);g.origins=g.tags.map(be=>{const te=be.position.clone().project(le),ke=be.position.clone().sub(le.position).setY(0).angleTo(he.setY(0))<Math.PI/2;return{id:be.id,front:ke,left:(te.x+1)/2*100,top:(-te.y+1)/2*100,destroying:be.destroying}}),v.$set({origins:g.origins})},L=()=>{g.forbidden||!g.enabled||(g.timeoutId&&clearTimeout(g.timeoutId),g.timeoutId=setTimeout(()=>{g.timeoutId=void 0;const le=R();le.length&&(g.tags=g.tags.concat(le),D())},s))},R=()=>{const{clientWidth:le,clientHeight:he}=n.getElement(),be=[],te=n.camera,ke=new b.Frustum,Re=new b.Matrix4,ye=te.getWorldDirection(new b.Vector3);Re.multiplyMatrices(te.projectionMatrix,te.matrixWorldInverse),ke.setFromProjectionMatrix(Re);const De=g.tags.filter(Ae=>ke.containsPoint(Ae.position)&&!Ae.destroying).length,ve=g.points.reduce((Ae,Oe)=>{if(g.tags.find(lt=>Oe.id===lt.id&&!lt.destroying))return Ae;const Ye=te.position.clone().setY(i).distanceTo(Oe.position);if(Ye<c||Ye>h||!ke.containsPoint(Oe.position))return Ae;const Ze=Oe.position.clone().sub(te.position).setY(0);if(Ze.angleTo(Oe.normal)>Math.PI/2-r&&Ze.angleTo(Oe.normal)<Math.PI/2+r)return Ae;const ot=Oe.position.clone().project(te);if(!g.tags.every(lt=>{if(lt.position.clone().sub(te.position).setY(0).angleTo(ye.setY(0))>Math.PI/2)return!0;const ht=lt.position.clone().project(te);return Math.sqrt(Math.pow((ot.x-ht.x)/2*le,2)+Math.pow((ot.y-ht.y)/2*he,2))>a}))return Ae;const Ke={id:Oe.id,position:Oe.position,normal:Oe.normal,replacement:Oe.replacement,weight:Oe.weight,distance:Ye};let et;for(let lt=0,ht=Ae.length;lt<ht;lt++){const Ft=Ae[lt];if(Ke.weight>Ft.weight){et=lt;break}if(Ke.distance<Ft.distance){et=lt;break}}return et!==void 0?Ae.splice(et,0,Ke):Ae.push(Ke),Ae},[]);for(let Ae=0,Oe=ve.length;Ae<Oe&&!(De+be.length>=o);Ae++){const Ye=ve[Ae];if(be.find(et=>Ye.id===et.id))continue;const Ze=Ye.position.clone().project(te);if(!g.tags.concat(be).every(et=>{if(et.position.clone().sub(te.position).setY(0).angleTo(ye.setY(0))>Math.PI/2)return!0;const lt=et.position.clone().project(te);return Math.sqrt(Math.pow((Ze.x-lt.x)/2*le,2)+Math.pow((Ze.y-lt.y)/2*he,2))>a}))continue;const ot=new b.Raycaster(te.position.clone().setY(i),Ye.position.clone().sub(te.position.clone().setY(i)).normalize(),0,Ye.distance+Zp),[Ke]=g.intersectObjects?ot.intersectObjects(g.intersectObjects,!0):n.model.loaded?n.model.intersectRaycaster(ot):ot.intersectObjects(n.model.children,!0);if(Ke&&Ye.distance-Ke.distance<Zp){const{position:et,normal:lt,id:ht,replacement:Ft}=Ye,Zi=new b.Plane().setFromNormalAndCoplanarPoint(lt,et),Ut=et.clone().sub(te.position).cross(new b.Vector3(0,1,0)).setLength(kc),li=[et.clone(),et.clone().add(Ut),et.clone().add(new b.Vector3(0,kc,0)).add(Ut),et.clone().add(new b.Vector3(0,kc,0))].map(Xt=>Zi.projectPoint(Xt,new b.Vector3)),{container:Ai,dispose:ut}=u.create3DDomContainer(li)||{},Qt=new ZI({target:Ai,props:{id:ht,content:g.render(g.template,Ft),lineWidthZoom:.38*(.01+te.position.distanceTo(et)/h),lineHeightZoom:.4+(te.position.distanceTo(et)-c)/h*.6,contentZoom:.1+te.position.distanceTo(et)/h,upsideDown:et.y>l,folded:g.folded,events:g.events,hooks:p,dispose:ut,blurImageUrl:qp}});be.push({position:et,normal:lt,id:ht,app:Qt})}}return be},z=le=>{g.points=le.points.map(he=>{var be,te;return{id:he.id,position:new b.Vector3().fromArray(he.position),normal:new b.Vector3().fromArray(he.normal),replacement:(be=he.replacement)!=null?be:{},weight:(te=he.weight)!=null?te:-1}}),le.render&&(g.render=le.render),le.template&&(g.template=le.template),le.events&&(g.events=le.events),le.enabled===!1&&(g.enabled=le.enabled),le.folded===!0&&(g.folded=le.folded)},O=le=>{g.intersectObjects=le,L()},A=()=>{g.enabled=!0,L()},M=()=>{g.enabled=!1,v.$set({origins:[]}),g.tags.forEach(le=>{le.app.$destroy(),le=null}),g.origins=[],g.tags=[]},I=()=>{g.folded=!1,g.tags.forEach(le=>{le.app.$set({folded:g.folded})})},k=()=>{g.folded=!0,g.tags.forEach(le=>{le.app.$set({folded:g.folded})})},x=le=>{g.tags.forEach(he=>{he.id===le&&he.app.$set({folded:!1})})},S=le=>{g.tags.forEach(he=>{he.id===le&&he.app.$set({folded:!0})})},j=()=>{n.once("renderFrame",D)},F=()=>{e||(e=n.getElement().parentElement),e&&e.appendChild(d),g.forbidden=!1,i=n.model.bounding.getCenter(new b.Vector3).y,L(),n.on("panoWillArrive",C),n.on("panoArrived",w),n.on("modeChange",E),n.on("cameraUpdate",y)},J=()=>{m=null,u.disposeAll(),v.$destroy(),g.tags.forEach(le=>{le.app.$destroy(),le=null}),g.origins=[],g.tags=[],n.off("modelLoaded",F),n.off("renderFrame",D),n.off("panoWillArrive",C),n.off("panoArrived",w),n.off("modeChange",E),n.off("cameraUpdate",y),n.off("dispose",J),window.removeEventListener("resize",j,!1)};return window.addEventListener("resize",j,!1),(we=n==null?void 0:n.model)!=null&&we.loaded?F():n.once("modelLoaded",F),n.on("dispose",J),{load:z,setIntersectObjects:O,unfoldAll:I,foldAll:k,unfold:x,fold:S,enable:A,disable:M,hooks:p,dispose:J}};var Ds=(n=>(n.SMALL="small",n.MIDLLE="middle",n.LARGE="large",n.EXTRA_LARGE="x-large",n))(Ds||{}),yh={},iE={get exports(){return yh},set exports(n){yh=n}};/*!
|
|
912
912
|
Copyright (c) 2018 Jed Watson.
|
|
913
913
|
Licensed under the MIT License (MIT), see
|
|
914
914
|
http://jedwatson.github.io/classnames
|
|
@@ -928,7 +928,7 @@ void main() {
|
|
|
928
928
|
width: 100%;
|
|
929
929
|
height: 100%;
|
|
930
930
|
z-index: 5;
|
|
931
|
-
`,e.container.style.pointerEvents="none";const i=v=>(e.wrapper=v,v.appendChild(e.container),l(),!0),s=v=>{e.itemLabels=zE(v),l()},o=()=>(e.enabled||(e.enabled=!0,l()),!0),r=()=>(e.enabled&&(e.enabled=!1,l()),!0),a=()=>{h(),e.container.remove()},l=()=>{var v;if(e.wrapper){if(!e.enabled||!e.fiveModeEnabled){(v=e.app)==null||v.$destroy(),e.app=void 0;return}e.app?e.app.$set({five:n,itemLabels:e.itemLabels}):e.app=new LE({target:e.container,props:{five:n,modelOcclusionEnable:e.modelOcclusionEnable,itemLabels:e.itemLabels,hooks:e.hooks,displayStrategyType:e.displayStrategyType,maxVisibleDistance:e.maxVisibleDistance}})}},c=()=>{n.on("modeChange",u),n.once("dispose",a)},h=()=>{n.off("modeChange",u)},u=v=>{if(v!==rt.Five.Mode.Panorama){e.fiveModeEnabled=!1,r();return}n.once("initAnimationEnded",()=>{e.fiveModeEnabled=!0,o()})};return c(),{appendTo:i,load:s,enable:o,disable:r,dispose:a,hooks:e.hooks}},RE={name:"ItemLabelPlugin",version:0};function _E(n){Le(n,"svelte-1irjijd",'.plugin-DoorLabelPlugin-item.svelte-1irjijd.svelte-1irjijd{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;transition:opacity 0.3s ease}.plugin-DoorLabelPlugin-cnt.svelte-1irjijd.svelte-1irjijd{position:absolute;top:50%;left:50%;border-radius:0.125rem;background:rgba(0, 0, 0, 0.35);line-height:0.75rem;padding:0.375rem;white-space:nowrap;font-size:0.75rem;font-style:normal;color:white;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform ease 1s, background ease 0.3s, color ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-1irjijd.svelte-1irjijd::after{content:"";display:block;position:absolute;top:-0.0625rem;left:-0.0625rem;bottom:-0.0625rem;right:-0.0625rem;border-radius:0.125rem;border:0.0625rem solid rgba(0, 0, 0, 0);-o-border-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMAQMAAABsu86kAAAABlBMVEUAAAD///+l2Z/dAAAAAnRSTlMAIE397fAAAAAVSURBVAjXY2BjgCMQ+PABhIAASRwARxwD8fgzCQAAAAAASUVORK5CYII=") 4;border-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMAQMAAABsu86kAAAABlBMVEUAAAD///+l2Z/dAAAAAnRSTlMAIE397fAAAAAVSURBVAjXY2BjgCMQ+PABhIAASRwARxwD8fgzCQAAAAAASUVORK5CYII=") 4;transition:opacity ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-1irjijd.svelte-1irjijd:active,.plugin-DoorLabelPlugin-cnt.svelte-1irjijd.svelte-1irjijd:focus{background:rgba(0, 0, 0, 0.5);color:rgba(255, 255, 255, 0.5)}.plugin-DoorLabelPlugin-icon.svelte-1irjijd.svelte-1irjijd{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTBweCIgaGVpZ2h0PSIxMHB4IiB2aWV3Qm94PSIwIDAgMTAgMTAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+aW1hZ2Ut566t5aS0PC90aXRsZT4KICAgIDxkZWZzPgogICAgICAgIDxyZWN0IGlkPSJwYXRoLTEiIHg9IjAiIHk9IjAiIHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCI+PC9yZWN0PgogICAgICAgIDxsaW5lYXJHcmFkaWVudCB4MT0iNjYuMDYyMTk3NSUiIHkxPSI1MCUiIHgyPSItMS4xMzY4NjgzOGUtMTElIiB5Mj0iNTAlIiBpZD0ibGluZWFyR3JhZGllbnQtMyI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGRkZGRkYiIG9mZnNldD0iMCUiPjwvc3RvcD4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI0ZGRkZGRiIgc3RvcC1vcGFjaXR5PSIwLjg1IiBvZmZzZXQ9IjEwMCUiPjwvc3RvcD4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgICAgIDxsaW5lYXJHcmFkaWVudCB4MT0iODQuMzM5NzMxJSIgeTE9IjUwJSIgeDI9IjIzLjQyODMzNzclIiB5Mj0iNTAlIiBpZD0ibGluZWFyR3JhZGllbnQtNCI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGRkZGRkYiIHN0b3Atb3BhY2l0eT0iMCIgb2Zmc2V0PSIwJSI+PC9zdG9wPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjRkZGRkZGIiBzdG9wLW9wYWNpdHk9IjAuOCIgb2Zmc2V0PSIxMDAlIj48L3N0b3A+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxnIGlkPSLpobXpnaItMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9IlZSLeWIhumXtOW8leWvvOagh+etvuWkh+S7vS0zIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMzM5LjAwMDAwMCwgLTU0My4wMDAwMDApIj4KICAgICAgICAgICAgPGcgaWQ9Iue8lue7hC0y5aSH5Lu9LTEyIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzMDUuMDAwMDAwLCA1MzYuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0iaW1hZ2Ut566t5aS0IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNC4wMDAwMDAsIDcuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPG1hc2sgaWQ9Im1hc2stMiIgZmlsbD0id2hpdGUiPgogICAgICAgICAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNwYXRoLTEiPjwvdXNlPgogICAgICAgICAgICAgICAgICAgIDwvbWFzaz4KICAgICAgICAgICAgICAgICAgICA8dXNlIGlkPSJCRyIgZmlsbC1vcGFjaXR5PSIwIiBmaWxsPSIjRDhEOEQ4IiBvcGFjaXR5PSIwLjUxMTQ2Mjk4NCIgeGxpbms6aHJlZj0iI3BhdGgtMSI+PC91c2U+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTcuOTM4ODY5OCwxLjE0Mzc2MTI5IEM4LjI1NDY1NDA0LDEuMjU3NTgwMzUgOC4zMTc4Mjg0LDEuMzAyMTY5OTggOC4zMTc3ODUyMSwxLjM1ODE1MjIzIEM4LjMxNzc1MDcyLDEuNDAyODQzMzUgOC4zMDU3NDkwNywxLjQ0NzUyNTI0IDguMjgxNzg0MTEsMS40ODcyMDUyMSBMOC4yODE3ODQxMSwxLjQ4NzIwNTIxIEw2LjIwOTg5MDQxLDQuOTE3NzQyNDUgQzYuMTM3ODg4MDgsNS4wMzY5NjAyOSA2LjEwMTg4NjkxLDUuMTcxMjIwMiA2LjEwMTg4NjkxLDUuMzA1NDgwMTEgQzYuMTAxODg2OTEsNS40Mzk3NDAwMiA2LjEzNzg4ODA4LDUuNTczOTk5OTQgNi4yMDk4OTA0MSw1LjY5MzIxNzc4IEw2LjIwOTg5MDQxLDUuNjkzMjE3NzggTDguMjgxNzg0MTEsOS4xMjM3NTUwMSBDOC4zMTc0NzQzOCw5LjE4Mjg0OTE2IDguMzI1ODMzMjIsOS4yNTA4MTUyIDguMzEwNDk1OTUsOS4zMTI5MzAyOCBDOC4yOTUxNTg2OCw5LjM3NTA0NTM2IDguMjU2MTI1MzEsOS40MzEzMDk0NyA4LjE5NzAzMTE3LDkuNDY2OTk5NzMgQzguMTU3MzUxMTksOS40OTA5NjQ2OSA4LjExMjY2OTMxLDkuNTAyOTY2MzQgOC4wNjc5NzgxOCw5LjUwMzAwMDgzIEM4LjAyMzI4NzA2LDkuNTAzMDM1MzEgNy45Nzg1ODY3MSw5LjQ5MTEwMjYzIDcuOTM4ODY5OCw5LjQ2NzE5ODkzIEw3LjkzODg2OTgsOS40NjcxOTg5MyBMMS4zNzk5MTIxOCw1LjUxOTY3ODE1IEMxLjMyMDc2MzAyLDUuNDg0MDc5MTIgMS4yODE2NDI4Nyw1LjQyNzg3NTMyIDEuMjY2MjA5NzcsNS4zNjU3ODM5OCBDMS4yNTQ2OTI1Niw1LjMxOTQ0NzMyIDEuMjU2MzY2OTgsNS4yNjk4MzE4MiAxLjI3Mjc1MzMzLDUuMjIzMDU0MDUgTDEuMjcyNzUzMzMsNS4yMjMwNTQwNSBaIiBpZD0i566t5aS0IiBzdHJva2U9InVybCgjbGluZWFyR3JhZGllbnQtNCkiIHN0cm9rZS13aWR0aD0iMC41IiBmaWxsPSJ1cmwoI2xpbmVhckdyYWRpZW50LTMpIiBtYXNrPSJ1cmwoI21hc2stMikiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUuMDM5MjAwLCA1LjMwNTQ4MCkgc2NhbGUoMSwgLTEpIHJvdGF0ZSgtOTAuMDAwMDAwKSB0cmFuc2xhdGUoLTUuMDM5MjAwLCAtNS4zMDU0ODApICI+PC9wYXRoPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=") no-repeat;background-size:100%;display:inline-block;width:0.625rem;height:0.625rem;margin-left:0.25rem;transform-origin:center}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].left.svelte-1irjijd .plugin-DoorLabelPlugin-icon.svelte-1irjijd{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-1irjijd .plugin-DoorLabelPlugin-txt.svelte-1irjijd{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-1irjijd .plugin-DoorLabelPlugin-icon.svelte-1irjijd{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].forward.svelte-1irjijd .plugin-DoorLabelPlugin-icon.svelte-1irjijd{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-1irjijd .plugin-DoorLabelPlugin-txt.svelte-1irjijd{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-1irjijd .plugin-DoorLabelPlugin-icon.svelte-1irjijd{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].back.svelte-1irjijd .plugin-DoorLabelPlugin-icon.svelte-1irjijd{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-1irjijd .plugin-DoorLabelPlugin-txt.svelte-1irjijd{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-1irjijd .plugin-DoorLabelPlugin-icon.svelte-1irjijd{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].right.svelte-1irjijd .plugin-DoorLabelPlugin-icon.svelte-1irjijd{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-1irjijd .plugin-DoorLabelPlugin-txt.svelte-1irjijd{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-1irjijd .plugin-DoorLabelPlugin-icon.svelte-1irjijd{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-1irjijd.svelte-1irjijd{color:#f9eac1}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-1irjijd .plugin-DoorLabelPlugin-icon.svelte-1irjijd{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTBweCIgaGVpZ2h0PSI4cHgiIHZpZXdCb3g9IjAgMCAxMCA4IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPHRpdGxlPueureWktDwvdGl0bGU+CiAgICA8ZGVmcz4KICAgICAgICA8bGluZWFyR3JhZGllbnQgeDE9IjEwLjYzODU4ODQlIiB5MT0iMCUiIHgyPSI5Ni41MTYxNDc0JSIgeTI9IjEyOS43MzEzNTQlIiBpZD0ibGluZWFyR3JhZGllbnQtMSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGRkYyQ0MiIG9mZnNldD0iMCUiPjwvc3RvcD4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI0VBRDA5QSIgb2Zmc2V0PSI0OC43MTQ0NDc4JSI+PC9zdG9wPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjRDFCMTdFIiBvZmZzZXQ9IjEwMCUiPjwvc3RvcD4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgogICAgPGcgaWQ9Iumhtemdoi0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0i5pyq5p2l5a625aSH5Lu9LTI1IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMzA1LjAwMDAwMCwgLTU0NS4wMDAwMDApIiBmaWxsPSJ1cmwoI2xpbmVhckdyYWRpZW50LTEpIiBmaWxsLXJ1bGU9Im5vbnplcm8iPgogICAgICAgICAgICA8ZyBpZD0i57yW57uELTLlpIfku70tMTMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI0NS4wMDAwMDAsIDUzNy4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxnIGlkPSJpbWFnZS3nrq3lpLQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDYwLjAwMDAwMCwgNy4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNOC40OTU3ODI5NCwxLjYxNjQ1MTEgTDYuNDIzODg5MjUsNS4wNDY5ODgzMyBDNi4zMjc4ODYxMyw1LjIwNTk0NTQ1IDYuMzI3ODg2MTMsNS40MDUwMTQ3NyA2LjQyMzg4OTI1LDUuNTYzOTcxODkgTDguNDk1NzgyOTQsOC45OTQ1MDkxMiBDOC42Mzg1NDQwMSw5LjIzMDg4NTcxIDguNTYyNjUzNjQsOS41MzgyMzc1IDguMzI2Mjc3MDYsOS42ODA5OTg1NiBDOC4xNjc1NTcxNiw5Ljc3Njg1ODQgNy45Njg4MjE5NSw5Ljc3NzAxMTc1IDcuODA5OTU0MzEsOS42ODEzOTY5NyBMMS4yNTA5OTY2OSw1LjczMzg3NjE4IEMxLjAxNDQwMDA4LDUuNTkxNDgwMDcgMC45MzgwMzU0ODEsNS4yODQyNDU3NiAxLjA4MDQzMTU5LDUuMDQ3NjQ5MTQgQzEuMTIyNTE0OCw0Ljk3NzcyNjI4IDEuMTgxMDczODMsNC45MTkxNjcyNSAxLjI1MDk5NjY5LDQuODc3MDg0MDQgTDcuODA5OTU0MzEsMC45Mjk1NjMyNTMgQzguMDQ2NTUwOTMsMC43ODcxNjcxNDIgOC4zNTM3ODUyNCwwLjg2MzUzMTczOSA4LjQ5NjE4MTM1LDEuMTAwMTI4MzUgQzguNTkxNzk2MTMsMS4yNTg5OTYgOC41OTE2NDI3OCwxLjQ1NzczMTIgOC40OTU3ODI5NCwxLjYxNjQ1MTEgWiIgaWQ9IueureWktCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNS4wMzkyMDAsIDUuMzA1NDgwKSBzY2FsZSgxLCAtMSkgcm90YXRlKC05MC4wMDAwMDApIHRyYW5zbGF0ZSgtNS4wMzkyMDAsIC01LjMwNTQ4MCkgIj48L3BhdGg+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==") no-repeat}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-1irjijd.svelte-1irjijd:active,.plugin-DoorLabelPlugin-cnt--customBrand.svelte-1irjijd.svelte-1irjijd:focus{background:rgba(0, 0, 0, 0.5);color:rgba(249, 234, 193, 0.5)}')}function VE(n){let t,e,i,s=n[0].name+"",o,r,a,l,c,h,u,d,p;return{c(){t=U("div"),e=U("div"),i=U("span"),o=Fe(s),r=ue(),a=U("i"),P(i,"class","plugin-DoorLabelPlugin-txt svelte-1irjijd"),P(a,"class","plugin-DoorLabelPlugin-icon svelte-1irjijd"),P(e,"class",l=Mt(pi("plugin-DoorLabelPlugin-cnt",n[0].toward))+" svelte-1irjijd"),P(e,"style",c=`transform: ${n[0].transform||"initial"};pointer-events: ${n[0].inSight?"auto":"none"};opacity: ${n[0].inSight?1:0}`),P(e,"data-camera-toward",h=n[0].cameraToward),P(t,"style",u=`left: ${n[0].left||0}%;top: ${n[0].top||0}%;opacity: ${n[0].inSight?1:0}`),P(t,"class","plugin-DoorLabelPlugin-item svelte-1irjijd")},m(m,g){Z(m,t,g),B(t,e),B(e,i),B(i,o),B(e,r),B(e,a),n[4](t),d||(p=_e(e,"click",n[3]),d=!0)},p(m,[g]){g&1&&s!==(s=m[0].name+"")&&Ne(o,s),g&1&&l!==(l=Mt(pi("plugin-DoorLabelPlugin-cnt",m[0].toward))+" svelte-1irjijd")&&P(e,"class",l),g&1&&c!==(c=`transform: ${m[0].transform||"initial"};pointer-events: ${m[0].inSight?"auto":"none"};opacity: ${m[0].inSight?1:0}`)&&P(e,"style",c),g&1&&h!==(h=m[0].cameraToward)&&P(e,"data-camera-toward",h),g&1&&u!==(u=`left: ${m[0].left||0}%;top: ${m[0].top||0}%;opacity: ${m[0].inSight?1:0}`)&&P(t,"style",u)},i:ce,o:ce,d(m){m&&X(t),n[4](null),d=!1,p()}}}function FE(n,t,e){let{props:i}=t,{onClick:s}=t,o;const r=()=>{const{left:c,top:h,inSight:u,panoIndex:d}=i;if(!c||!h||!u||!o)return;const p=o.current.clientWidth/window.innerWidth*100,m=o.current.clientHeight/window.innerHeight*100;c<=p/2||c>=100-p/2||h<=m/2||h>=100-m/2},a=c=>{s&&s()};function l(c){qe[c?"unshift":"push"](()=>{o=c,e(2,o)})}return n.$$set=c=>{"props"in c&&e(0,i=c.props),"onClick"in c&&e(1,s=c.onClick)},r(),[i,s,o,a,l]}class BE extends Ee{constructor(t){super(),Ie(this,t,FE,VE,Me,{props:0,onClick:1},_E)}}function HE(n,t){const e=Math.abs(n.top+n.height/2-t.top-t.height/2),i=Math.abs(n.left+n.width/2-t.left-t.width/2),s=(n.height+t.height)/2,o=(n.width+t.width)/2;return!(e>s&&i>o)}function NE(n){const{camera:t}=n,e=t.getWorldDirection(new G.Vector3);let i=Math.atan(e.z/e.x)*180/Math.PI,s="";return e.x<0&&(i+=180),i<0&&(i+=360),i>315||i<=45?s="right":i>45&&i<=135?s="back":i>135&&i<=225?s="left":i>225&&i<=315&&(s="forward"),s}function GE(n,t){return Math.sqrt(Math.pow(n.z-t.z,2)+Math.pow(n.x-t.x,2))}function WE(n){const t=Math.PI/4;return n>-t&&n<=t?"left":n>t*3||n<=-t*3?"right":n>-t*3&&n<=-t?"forward":n>t&&n<=t*3?"back":""}const UE={userAction:!0};class QE extends ys{constructor(e){super(e);f(this,"state",{enabled:!0,visible:!0});f(this,"container");f(this,"MinVisibledistance",1.8);f(this,"MaxVisibledistance",5);f(this,"OffsetHeight",-1.3);f(this,"floorplanServerData");f(this,"visibleLabelMap",new Map);f(this,"labelItems",[]);f(this,"doorLabels");f(this,"roomObservers");f(this,"loadData",(e,i)=>{i&&(this.MaxVisibledistance=i.MaxVisibledistance,this.MinVisibledistance=i.MinVisibledistance,this.OffsetHeight=i.OffsetHeight),this.labelItems.forEach(s=>{var o;return(o=s.svelteApp)==null?void 0:o.$destroy()}),this.labelItems=[],this.doorLabels=[],this.floorplanServerData=e,xi(this.five).then(()=>{this.initData(),this.fixDoorVisibleAndPosition(),this.applyState()})});f(this,"dispose",()=>{var e,i,s,o,r,a,l;(e=this.five)==null||e.off("wantsToMoveToPano",this.hideAllLabels),(i=this.five)==null||i.off("modelLoaded",this.fixDoorVisibleAndPosition),(s=this.five)==null||s.off("panoArrived",this.fixDoorVisibleAndPosition),(o=this.five)==null||o.off("initAnimationEnded",this.fixDoorPosition),(r=this.five)==null||r.off("cameraUpdate",this.fixDoorPosition),(a=this.five)==null||a.off("mouseWheel",this.fixDoorPosition),(l=this.five)==null||l.off("pinchGesture",this.fixDoorPosition),this.applyState({enabled:!1})});f(this,"initRoomObservers",()=>{var o,r;const e=this.floorplanServerData.computed_data.floor_datas||[],s=(((r=(o=this.five)==null?void 0:o.work)==null?void 0:r.observers)||[]).map(a=>{const l=a.panoIndex,c=a.floorIndex,h=e==null?void 0:e.find(u=>u.floor_index===c);if(h){const u=h.rooms.find(d=>d.observer_indexs.includes(l));if(u)return{panoIndex:l,floorIndex:c,name:u.name}}}).filter(Boolean);this.roomObservers=s});f(this,"hideAllLabels",()=>{this.labelItems.forEach(e=>{e.visible=!1,e.inSight=!1})});f(this,"fixDoorVisibleAndPosition",()=>{this.initRoomObservers();const{panoIndex:e}=this.five;if(!this.state.visible||this.five.model.empty||e===null||!this.roomObservers.find(a=>a.panoIndex===e))return;const i=this.roomObservers.find(a=>a.panoIndex===e),o=this.five.work.observers.find(a=>a.panoIndex===e).position.clone(),r=(()=>{if(this.visibleLabelMap.has(e))return this.visibleLabelMap.get(e);{const a=[];return this.doorLabels.forEach((l,c)=>{if(l.roomName===i.name)return;const h=l.position.clone(),u=h.distanceTo(o);if(u<this.MinVisibledistance||u>this.MaxVisibledistance)return;const d=new G.Raycaster,p=h.clone().sub(o).normalize();d.set(o,p);const[m]=this.five.model.intersectRaycaster(d);m&&m.distance+.1<u||a.push(c)}),this.visibleLabelMap.set(e,a),a}})();this.labelItems.forEach((a,l)=>{a.visible=r.includes(l)}),this.fixDoorPosition()});f(this,"fixDoorPosition",()=>{var c,h,u,d,p,m,g,v,y,w,C,E;if(!this.state.enabled||!this.state.visible)return;const{panoIndex:e,camera:i}=this.five;if(e===null)return;if(this.five.currentMode!=="Panorama")return this.hideAllLabels();const s=this.five.getElement(),o=s.clientWidth,r=s.clientHeight,a=i.getWorldDirection(new G.Vector3),l=[];if(this.labelItems.forEach((D,L)=>{var A;if(D.visible){const M=i.position.distanceTo(D.position),I=D.position.clone().add(new G.Vector3(0,this.OffsetHeight,0)),x=I.clone().sub(i.position).normalize().angleTo(a),S=I.clone().project(i),j=(S.x+1)/2.2*100,F=(-S.y+1)/2.2*100,J=j>=0&&j<=100&&F>=0&&F<=100&&M>this.MinVisibledistance&&M<=this.MaxVisibledistance;D.left=j,D.top=F,D.inSight=J&&x<Math.PI/2,D.cameraToward=NE(this.five),J?l.push({disFromCameraToLabel:M,left:j,top:F,index:L}):D.transform="translate(-50%, -50%)"}else D.inSight=!1;const O=D,{svelteApp:R}=O,z=Kn(O,["svelteApp"]);(A=D.svelteApp)==null||A.$set({props:z})}),l.length>1){let D=0;l.sort((L,R)=>R.disFromCameraToLabel-L.disFromCameraToLabel);for(let L=1;L<l.length;L++){const{index:R,left:z,top:O}=l[L-1],{index:A,left:M,top:I}=l[L],k=this.container.children[R],x=this.container.children[A];if(!k||!x)return;const S={left:o*z/100,top:r*O/100,width:(u=(h=(c=k.children)==null?void 0:c[0])==null?void 0:h.clientWidth)!=null?u:0,height:(m=(p=(d=k.children)==null?void 0:d[0])==null?void 0:p.clientHeight)!=null?m:0},j={left:o*M/100,top:r*I/100,width:(y=(v=(g=x.children)==null?void 0:g[0])==null?void 0:v.clientWidth)!=null?y:0,height:(E=(C=(w=x.children)==null?void 0:w[0])==null?void 0:C.clientHeight)!=null?E:0};HE(S,j)&&(D++,this.labelItems[R].transform=`translate(-50%, ${(D-1)*100-50}%)`,this.labelItems[A].transform=`translate(-50%, ${D*100-50}%)`)}}});f(this,"onClick",(e,i)=>{if(!this.roomObservers)return;const{work:s}=this.five;let o,r,a=1/0;for(const l of s.observers)if(this.roomObservers.find(h=>h.panoIndex===l.panoIndex&&h.name===e)){const h=l.standingPosition,u=i.distanceTo(h);u<a&&(o=l.panoIndex,r=h.clone().sub(i).normalize(),a=u)}if(r!==void 0&&o!==void 0){const l={};if(a>0){const h=new G.Vector3(0,0,-1),u=r.clone(),d=new G.Quaternion;d.setFromUnitVectors(h,u);const p=new G.Euler;p.setFromQuaternion(d,"YXZ"),l.longitude=p.y}this.five.emit("wantsToMoveToPano",o,{},!0)||this.five.moveToPano(o,{longitude:l.longitude})}});f(this,"initData",()=>{var o;this.doorLabels=[],this.labelItems.forEach(r=>{var a;return(a=r.svelteApp)==null?void 0:a.$destroy()}),this.labelItems=[];const e=this.five.panoIndex,i=this.floorplanServerData.computed_data.observers[e].floor_index,s=this.floorplanServerData.computed_data.floor_datas[i];(o=this.floorplanServerData.computed_data.doors)==null||o.forEach(r=>{const a=this.five.work.observers.filter((d,p)=>{var m;return!!((m=s==null?void 0:s.rooms)!=null&&m.find(g=>g.observer_indexs.includes(p)))}),l=r.position;let c=1/0,h;a.forEach(d=>{const p=d.standingPosition,m={x:p.x,y:p.y,z:p.z},g=GE(l,m);g<c&&(c=g,h=m)}),h&&(l.y=h.y+.01);const u=new G.Vector3(l.x,l.y,l.z);u.add(new G.Vector3(-.2,1.8,0).applyEuler(new G.Euler(0,r.rad,0))),this.doorLabels.push({roomName:r.name,name:r.name,position:u,toward:WE(r.rad)})}),this.labelItems=this.doorLabels.map(r=>de(V({},r),{left:0,top:0,visible:!1,inSight:!1,transform:"",cameraToward:""})),this.five.on("wantsToMoveToPano",this.hideAllLabels),this.five.on("panoArrived",this.fixDoorVisibleAndPosition),this.five.on("initAnimationEnded",this.fixDoorPosition),this.five.on("cameraUpdate",this.fixDoorPosition),this.five.on("mouseWheel",this.fixDoorPosition),this.five.on("pinchGesture",this.fixDoorPosition),this.fixDoorVisibleAndPosition()})}appendTo(e){this.state.enabled&&(this.container=e)}setState(e,i){const s=this.state;this.state=V(V({},s),e);const o=s.enabled&&s.visible,r=this.state.enabled&&this.state.visible;o!==r&&this.applyState()}show(){this.setState({visible:!0})}hide(){this.setState({visible:!1})}enable(){this.setState({enabled:!0})}disable(){this.setState({enabled:!1})}stateChangedCallback(e,i){if(this.hooks.hasListener("stateChange")){const s={state:this.state,prevState:e,userAction:i?i.userAction:UE.userAction};this.hooks.emit("stateChange",s)}}applyState(e){const i=e!=null?e:this.state;i.enabled!==!1&&i.visible!==!1?(this.labelItems.forEach(o=>{o.svelteApp=new BE({target:this.container,props:{props:o,onClick:()=>{this.onClick(o.name,o.position)}}})}),this.fixDoorPosition()):this.labelItems.forEach(o=>{o.svelteApp.$destroy()})}initState(){return{enabled:!0,visible:!0}}}const XE=n=>new QE(n);function W1(n,t){console.warn(`🚫 ==> [${n}]: ${t}`)}var Zl={},YE=ZE;function ZE(n,t,e){return n[0]=t[0]+e[0],n[1]=t[1]+e[1],n}var qE=JE;function JE(n,t,e){return n[0]=t,n[1]=e,n}var KE=$E;function $E(n,t){var e=t[0],i=t[1],s=e*e+i*i;return s>0&&(s=1/Math.sqrt(s),n[0]=t[0]*s,n[1]=t[1]*s),n}var e4=t4;function t4(n,t,e){return n[0]=t[0]-e[0],n[1]=t[1]-e[1],n}var i4=n4;function n4(n,t){return n[0]*t[0]+n[1]*t[1]}var s4=YE,Ah=qE,U1=KE,o4=e4,r4=i4,rm=[0,0];Zl.computeMiter=function(t,e,i,s,o){return s4(t,i,s),U1(t,t),Ah(e,-t[1],t[0]),Ah(rm,-i[1],i[0]),o/r4(e,rm)};Zl.normal=function(t,e){return Ah(t,-e[1],e[0]),t};Zl.direction=function(t,e,i){return o4(t,e,i),U1(t,t),t};var Cn=Zl,ks=[0,0],Va=[0,0],am=[0,0],Ar=[0,0],a4=function(n,t){var e=null,i=[];t&&(n=n.slice(),n.push(n[0]));for(var s=n.length,o=1;o<s;o++){var r=n[o-1],a=n[o],l=o<n.length-1?n[o+1]:null;if(Cn.direction(ks,a,r),e||(e=[0,0],Cn.normal(e,ks)),o===1&&xc(i,e,1),!l)Cn.normal(e,ks),xc(i,e,1);else{Cn.direction(Va,l,a);var c=Cn.computeMiter(am,Ar,ks,Va,1);xc(i,Ar,c)}}if(n.length>2&&t){var h=n[s-2],u=n[0],d=n[1];Cn.direction(ks,u,h),Cn.direction(Va,d,u),Cn.normal(e,ks);var p=Cn.computeMiter(am,Ar,ks,Va,1);i[0][0]=Ar.slice(),i[s-1][0]=Ar.slice(),i[0][1]=p,i[s-1][1]=p,i.pop()}return i};function xc(n,t,e){n.push([[t[0],t[1]],e])}function Q1(n,t){const e=n[0],i=n[1],s=t[0],o=t[1];var r=(o.x-s.x)*(e.y-s.y)-(o.y-s.y)*(e.x-s.x),a=(i.x-e.x)*(e.y-s.y)-(i.y-e.y)*(e.x-s.x),l=(o.y-s.y)*(i.x-e.x)-(o.x-s.x)*(i.y-e.y);if(l!==0){var c=r/l,h=a/l;if(0<=c&&c<=1&&0<=h&&h<=1)return!0}return!1}function l4(n,t){for(let e=0;e<n.length-1;e++)for(let i=0;i<t.length-1;i++)if(Q1([n[e],n[e+1]],[t[i],t[i+1]]))return{x:(n[e].x+n[e+1].x)/2,y:(n[e].y+n[e+1].y)/2,line1RelativeIndex:e,line2RelativeIndex:i}}const c4=2,h4=3,u4=3,d4=2;function f4(n){const t=n.width,e=n.unitLength,i=t/2,s=n.path;if(s.length===0)return{geometry:new b.BufferGeometry,maxV:0,curvePath:null,curvePoints:null};const o=new b.CurvePath;s.forEach(O=>{const A=p4(O);A&&o.add(A)});const r=Math.ceil(o.getLength()*100);o.arcLengthDivisions=r;const a=o.getPoints(r),l=a.length;if(l<=2)return{geometry:new b.BufferGeometry,maxV:0,curvePath:null,curvePoints:null};const c=a4(a.map(O=>[O.x,O.z])),u=(l-1)*c4*h4,d=2*l,p=d*u4,m=d*d4,g=new Uint32Array(u),v=new Float32Array(p),y=new Float32Array(m);let w=0,C=0;for(let O=0;O<l;O++){const[A,M]=c[O][0],I=a[O],{x:k,y:x,z:S}=I,j=new G.Vector3(k+A*i,x+.05,S+M*i);v[O*6+0]=j.x,v[O*6+1]=j.y,v[O*6+2]=j.z;const F=new G.Vector3(k-A*i,x+.05,S-M*i);v[O*6+3]=F.x,v[O*6+4]=F.y,v[O*6+5]=F.z,w+=O>0?a[O-1].clone().sub(a[O]).length():0;const J=w/e;C=J,y[O*4+0]=0,y[O*4+1]=J,y[O*4+2]=1,y[O*4+3]=J;const ne=new b.Vector3().lerpVectors(j,F,.5);n.skipPositions&&n.skipPositions.some(oe=>oe.distanceTo(ne)<.26)||O!==l-1&&(g[O*6+0]=O*2+0,g[O*6+1]=O*2+2,g[O*6+2]=O*2+1,g[O*6+3]=O*2+2,g[O*6+4]=O*2+3,g[O*6+5]=O*2+1)}const E=[];let D;const L=[];for(let O=0;O<l-1;O++){if(D!==void 0&&O<=D)continue;const A=O+1,M={x:v[O*6+0],y:v[O*6+2]},I={x:v[O*6+3],y:v[O*6+5]},k={x:v[A*6+0],y:v[A*6+2]},x={x:v[A*6+3],y:v[A*6+5]},S=Q1([M,I],[k,x]);if(S&&E.push(O),!S&&E.length){E.push(O);const j=new b.Vector2(M.x,M.y).distanceTo(new b.Vector2(k.x,k.y)),F=new b.Vector2(I.x,I.y).distanceTo(new b.Vector2(x.x,x.y)),J=300,ne=[],q=[],oe=Math.max(0,E[0]-e*J),se=E[0];for(let we=oe;we<se;we++)j<F?ne.push({x:v[we*6+0],y:v[we*6+2]}):ne.push({x:v[we*6+3],y:v[we*6+5]});const ae=E[E.length-1],ze=Math.min(l-1,E[E.length-1]+e*J);for(let we=ae;we<ze;we++)j<F?q.push({x:v[we*6+0],y:v[we*6+2]}):q.push({x:v[we*6+3],y:v[we*6+5]});const ee=l4(ne,q);if(ee){const{line1RelativeIndex:we,line2RelativeIndex:le,x:he,y:be}=ee,te=oe+we,ke=ae+le+2;for(let Oe=te;Oe<ke;Oe++)j<F?(v[Oe*6+0]=he,v[Oe*6+2]=be):(v[Oe*6+3]=he,v[Oe*6+5]=be),D=Oe;let Re,ye,De,ve,Ae;j<F?(Re=v[oe*6+1],ye=v[te*6+1],De=v[ke*6+1],ve=v[ze*6+1],Ae=(ye+De)/2):(Re=v[oe*6+4],ye=v[te*6+4],De=v[ke*6+4],ve=v[ze*6+4],Ae=(ye+De)/2);for(let Oe=oe;Oe<te;Oe++){const Xe=te-oe,Ze=(Oe-oe)/Xe;j<F?v[Oe*6+1]=Re+(Ae-Re)*Ze:v[Oe*6+4]=Re+(Ae-Re)*Ze}for(let Oe=te;Oe<ke;Oe++)j<F?v[Oe*6+1]=Ae:v[Oe*6+4]=Ae;for(let Oe=ke;Oe<ze;Oe++){const Xe=ze-ke,Ze=(Oe-ke+1)/Xe;j<F?v[Oe*6+1]=Ae+(ve-Ae)*Ze:v[Oe*6+4]=Ae+(ve-Ae)*Ze}L.push({start:te,end:ke})}E.length=0}}const R=new Float32Array(d);L.forEach(O=>{for(let A=0;A<l-1;A++)A>=O.start&&A<=O.end?(R[A*2+0]=1,R[A*2+1]=1):R[A]!==1&&(R[A*2+0]=0,R[A*2+1]=0)});const z=new b.BufferGeometry;return z.setAttribute("position",new b.BufferAttribute(v,3)),z.setAttribute("uv",new b.BufferAttribute(y,2)),z.setIndex(new b.BufferAttribute(g,1)),{geometry:z,maxV:C,animationWillError:L,curvePath:o,curvePoints:a}}function p4(n){var t,e;if(m4(n)){const i=n.points.map(o=>new b.Vector3().fromArray(o));return new b.CatmullRomCurve3(i,(t=n.closed)!=null?t:!1,(e=n.curve_type)!=null?e:"centripetal",n.tension)}}function m4(n){return n.type==="CatmullRomCurve3"}function g4(n,t){t.forEach(e=>{const i=new b.SphereGeometry(.02,16,16),s=[],o=[new b.MeshBasicMaterial({color:16776960}),new b.MeshBasicMaterial({color:16711935}),new b.MeshBasicMaterial({color:16711680}),new b.MeshBasicMaterial({color:65535})];if(e.stickType==="3DBox"){const r=e.position;if(r!=null&&r.start&&(r!=null&&r.end)){const a=new b.Mesh(i,o[0]);a.position.copy(Lt(r.start)),s.push(a);const l=new b.Mesh(i,o[1]);l.position.copy(Lt(r.end)),s.push(l)}}else if(e.stickType==="Polygon"){const r=e.position;Array.isArray(r)&&r.length>0&&r.forEach((a,l)=>{const c=o[l%o.length],h=new b.Mesh(i,c);h.position.copy(Lt(a)),s.push(h)})}else if(Array.isArray(e.position)&&e.position.length===4)e.position.forEach((r,a)=>{const l=o[a],c=new b.Mesh(i,l);c.position.copy(Lt(r)),s.push(c)});else if(Array.isArray(e.position)){const r=o[0],a=new b.Mesh(i,r);a.position.copy(Lt(e.position)),s.push(a)}s.forEach(r=>{r.material.depthTest=!1,n.scene.add(r)})})}const mt=n=>n;function X1(n){if(!n||n.length<3)return;const t=n.map(Ve),e=t[1].clone().sub(t[0]),i=t[2].clone().sub(t[1]);return e.cross(i)}function v4(n){return n.stickType==="Plane"}function y4(n){return n.stickType==="3DPoint"}function Bs(n){return n.stickType==="Model"&&n.contentType==="MediaModel"}function b4(n){return n.stickType==="Model"&&n.contentType==="Model"}function A4(n){return n.stickType==="Model"&&n.contentType==="VirtualObject"}function w4(n){return b4(n)||A4(n)}function lm(n){return n.stickType==="Plane"&&n.contentType==="MediaPlane"}function P4(n){return n.stickType==="Polygon"}function C4(n){return n.stickType==="3DBox"}function M4(n){return n.stickType==="Mask"}function Y1(n,t){const e=Ve(n.start),i=Ve(n.end),s=new G.Euler().fromArray(n.rotation),o=Vt(new G.Vector3((e.x+i.x)/2,(e.y+i.y)/2,(e.z+i.z)/2),t),r=new G.Vector3(Math.abs(i.x-e.x)/2,Math.abs(i.y-e.y)/2,Math.abs(i.z-e.z)/2),a=new G.Matrix4().makeRotationFromEuler(s),l=[new G.Vector3(-.5,-.5,-.5),new G.Vector3(.5,-.5,-.5),new G.Vector3(.5,-.5,.5),new G.Vector3(-.5,-.5,.5),new G.Vector3(-.5,.5,-.5),new G.Vector3(.5,.5,-.5),new G.Vector3(.5,.5,.5),new G.Vector3(-.5,.5,.5)],c=r.clone().multiplyScalar(2);return l.map(u=>u.clone().multiply(c).applyMatrix4(a).add(o))}function qa(n,t){if(!t)return n;const e=new G.Matrix4().fromArray(t);return n.map(i=>i.clone().applyMatrix4(e))}function wh(n){const t=(()=>{var e,i;if(C4(n)&&n.position){const s=Y1(n.position,(i=(e=n.plugin)==null?void 0:e.workUtil)==null?void 0:i.transform);return qa(s,n.matrix)}if(P4(n)&&n.position){const s=n.position.map(o=>Ve(o));return qa(s,n.matrix)}if(Bs(n)&&n.matrix){const s=n.data.mediaPosition.map(o=>Ve(o));return qa(s,n.matrix)}return M4(n)?n.position&&Array.isArray(n.position)?Ve(n.position):(console.warn("[getTagPosition] Mask tag without position, tag id:",n.id),new G.Vector3(0,0,0)):n.position})();return Cb(t)}function cm(n){const t=wh(n);return Et(...Array.isArray(t)?t:[t])}function wr(n,t){if(n===void 0)return;const{min:e,max:i}=t!=null?t:{};if(!(e===void 0&&i===void 0))return!(typeof i=="number"&&i<n||typeof e=="number"&&e>n)}function I4(n,t,e){const s=new b.Plane().setFromNormalAndCoplanarPoint(e,t),o=t.clone().sub(n).cross(new b.Vector3(0,1,0)).setLength(.01),r=new b.Vector3(0,.01,0);return[t.clone().sub(o).sub(r),t.clone().add(o).sub(r),t.clone().add(o).add(r),t.clone().sub(o).add(r)].map(l=>s.projectPoint(l,new b.Vector3))}const hm=(n,t=1e3/60)=>{let e=null;const i=n;return(...o)=>{e&&clearTimeout(e),e=setTimeout(()=>{i==null||i(...o),e&&clearTimeout(e),e=null},t)}};function E4(n,t=200){let e;return function(...i){e||(n.apply(this,i),e=setTimeout(function(){e=null},t))}}function k4(n,t){const[e,i]=t;if(e>=i||i<=1||e<=1)return-1;const s={},o=r=>(s[r]||(s[r]=n(r)),s[r]);for(let r=e;r<i;r++){const a=o(r),l=o(r-1);if(a<l)return r}return-1}function Z1(n){if(!n)return null;try{if(n.includes("youtu.be"))return new URL(n).pathname.substring(1);if(n.includes("youtube.com")){const i=new URL(n),o=new URLSearchParams(i.search).get("v");if(o)return o;if(i.pathname.includes("/embed/"))return i.pathname.split("/embed/")[1];if(i.pathname.includes("/shorts/"))return i.pathname.split("/shorts/")[1];if(i.pathname.includes("/live/"))return i.pathname.split("/live/")[1]}}catch(i){}const t=/^.*(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/|shorts\/|live\/)|(?:(?:watch)?\?v(?:i)?=|\&v(?:i)?=))([^#\&\?]*).*/,e=n.match(t);return e&&e[1]?e[1]:null}function q1(n){if(!n)return null;try{if(n.includes("vimeo.com")){const s=new URL(n).pathname.split("/").filter(Boolean);if(s.length>0){const o=s[0];if(/^\d+$/.test(o)&&o.length>=5)return o}}}catch(i){}const t=/^.*vimeo\.com\/[A-Za-z\/]*(\d+)/,e=n.match(t);return e&&e[1]&&e[1].length>=5?e[1]:null}function Ph(n){return n?/^(http(s)?:\/\/)?((w){3}.)?youtu(be|.be)?(\.com)?\/.+/.test(n):!1}function Ch(n){return n?/^(http(s)?:\/\/)?((w){3}.)?vimeo\.com\/(.+)/.test(n):!1}function x4(n,t){if(Ph(n)){const e=Z1(n);if(!e)return"";const i=new URL(`https://www.youtube.com/embed/${e}`);return(t==null?void 0:t.start)!==void 0&&i.searchParams.set("start",t.start.toString()),(t==null?void 0:t.autoplay)!==void 0&&i.searchParams.set("autoplay",t.autoplay.toString()),i.toString()}if(Ch(n)){const e=q1(n);if(!e)return"";const i=new URL(`https://player.vimeo.com/video/${e}`);return(t==null?void 0:t.autoplay)!==void 0&&i.searchParams.set("autoplay",t.autoplay.toString()),i.toString()}return n}function Qu(n){return n.stickType?n.stickType:n.pointType==="PointTag"&&n.dimensionType==="3D"?"3DPoint":n.pointType==="PlaneTag"?"Plane":"2DPoint"}function S4(n){var t,e,i,s;if(n.stickType||(n.stickType=Qu(n)),n.contentType==="VRLink"||n.contentType==="PanoLink"||n.contentType==="Link"){const o=n;!((e=(t=o.data)==null?void 0:t.icon)!=null&&e.url)&&!((s=(i=o.style)==null?void 0:i.point)!=null&&s.url)&&(o.data.icon={url:uu,steps:28})}return n.extraData&&(n.data?n.data.extraData=n.extraData:n.data={extraData:n.extraData}),n}const Xo="data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAADAAAGhgBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVWqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr///////////////////////////////////////////8AAAA5TEFNRTMuOThyAc0AAAAAAAAAABSAJAiqQgAAgAAABobxtI73AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//uQxAACFEII9ACZ/sJZwWEoEb8w/////N//////JcxjHjf+7/v/H2PzCCFAiDtGeyBCIx7bJJ1mmEEMy6g8mm2c8nrGABB4h2Mkmn//4z/73u773R5qHHu/j/w7Kxkzh5lWRWdsifCkNAnY9Zc1HvDAhjhSHdFkHFzLmabt/AQxSg2wwzLhHIJOBnAWwVY4zrhIYhhc2kvhYDfQ4hDi2Gmh5KyFn8EcGIrHAngNgIwVIEMf5bzbAiTRoAD///8z/KVhkkWEle6IX+d/z4fvH3BShK1e5kmjkCMoxVmXhd4ROlTKo3iipasvTilY21q19ta30/v/0/idPX1v8PNxJL6ramnOVsdvMv2akO0iSYIzdJFirtzWXCZicS9vHqvSKyqm5XJBdqBwPxyfJdykhWTZ0G0ZyTZGpLKxsNwwoRhsx3tZfhwmeOBVISm3impAC/IT/8hP/EKEM1KMdVdVKM2rHV4x7HVXZvbVVKN/qq8CiV9VL9jjH/6l6qf7MBCjZmOqsAibjcP+qqqv0oxqpa/NVW286hPo1nz2L/h8+jXt//uSxCmDU2IK/ECN98KKtE5IYzNoCfbw+u9i5r8PoadUMFPKqWL4LK3T/LCraMSHGkW4bpLXR/E6LlHOVQxmslKVJ8IULktMN06N0FKCpHCoYsjC4F+Z0NVqdNFoGSTjSiyjzLdnZ2fNqTi2eHKONONKLMPMKLONKLMPQRJGlFxZRoKcJFAYEeIFiRQkUWUeYfef//Ko04soswso40UJAgMw8wosososy0EalnZyjQUGBRQGIFggOWUacWUeYmuadrZziQKKEgQsQLAhQkUJAgMQDghltLO1onp0cpkNInSFMqlYeSEJ5AHsqFdOwy1DA2sRmRJKxdKRfLhfLw5BzUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7ksRRA8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU=",zr={};var Xu=(n=>(n.Default="default",n.GetAudioDuration="getAudioDuration",n.PlayAudio="playAudio",n))(Xu||{});function T4(n,t){const e=(t==null?void 0:t.namespace)||"default",i=zr[e]||(zr[e]=[]);let s=i.find(o=>!o.realSrc||o.realSrc===Xo);return s||(console.warn("未找到缓存音频,已新建",zr),s=new J1(Xo),i.push(s)),n&&(s.src=n),s}function D4(n,t){const e=(t==null?void 0:t.namespace)||"default",i=zr[e]||(zr[e]=[]),s=n-i.length;if(!(s<=0))for(let o=0;o<s;o++)i.push(new J1(Xo))}class J1 extends(()=>typeof Audio=="undefined"?class{}:Audio)(){constructor(e){super(e);f(this,"preload","auto");f(this,"crossOrigin","anonymous");f(this,"realSrc","");f(this,"inited",!1);f(this,"removeDocumentEventListener");this.realSrc=e!=null?e:"",this.muted=!0,super.autoplay=!0,super.addEventListener("ended",()=>{this.src=""});const i=()=>L4(this);document.addEventListener("click",i),document.addEventListener("touchend",i),this.removeDocumentEventListener=()=>{document.removeEventListener("click",i),document.removeEventListener("touchend",i)}}get isBlankAudio(){return this.realSrc===Xo||!this.realSrc}get src(){return super.src}set src(e){super.src=e,this.realSrc=e,this.removeDocumentEventListener()}get muted(){return super.muted}set muted(e){super.muted=e}clear(){this.currentTime=0,this.src=Xo}}function L4(n){n&&(n.inited||(n.src&&(n.inited=!0,n.removeDocumentEventListener()),n.src===Xo&&n.play()))}const Yu={visibleConfig:{intersectRaycaster:{enabled:!0,distanceAccuracy:.04,checkPoints:"corner",needPassed:1}},clickable:!0,simulate3D:!1,renderType:"Dom"};var K1=(n=>(n.PointTag="PointTag",n.PlaneTag="PlaneTag",n))(K1||{}),$1=(n=>(n.Audio="Audio",n.Text="Text",n.ImageText="ImageText",n.Image="Image",n.Video="Video",n.Link="Link",n.Sticker="Sticker",n.VRLink="VRLink",n.PanoLink="PanoLink",n.Marketing="Marketing",n.MediaPlane="MediaPlane",n.MediaModel="MediaModel",n.Model="Model",n.VirtualObject="VirtualObject",n.Panorama="Panorama",n.Custom="Custom",n.Unknown="Unknown",n))($1||{}),ey=(n=>(n.Two="2D",n.Three="3D",n))(ey||{});const z4={globalConfig:{visibleConfig:{followModelVisibility:!0},unfoldedConfig:{autoUnfold:{enable:!0,strategy:"MinimumDistance",distance:{max:5}}},tag3DConfig:{ratio:.0035},popoverConfig:{enabled:!1,trigger:"hover",triggerDelay:500,placement:"auto",autoPlacementBaseSpace:{top:.2,right:.15,bottom:.2},transitionDuration:100,toolbar:{showMore:!0,showShare:!0},viewMoreText:"查看更多",showMedia:!1},tagNormalLineConfig:{enabled:!0,lineWidth:1.2}},contentTypeConfig:{"[Mapview]":{unfoldedConfig:{autoUnfold:{enable:!1,distance:{max:9999}}}},"[Floorplan]":{unfoldedConfig:{autoUnfold:{enable:!1,distance:{max:9999}}}},"Any-Audio-plane":{unfoldedConfig:{keep:"unfolded"}},Link:{unfoldedConfig:{keep:"unfolded"}},Panorama:{unfoldedConfig:{keep:"unfolded"}},VRLink:{unfoldedConfig:{keep:"unfolded"}},PanoLink:{unfoldedConfig:{keep:"unfolded"}},MediaPlane:{unfoldedConfig:{keep:"unfolded"},initialData:{autoplayConfig:{autoplayCarousel:!0,autoplayVideo:!1,autoplayVideoInCarousel:!1}}},"Model-Any":{unfoldedConfig:{keep:"unfolded"},visibleConfig:{visibleFiveMode:"all"}},Marketing:{popoverConfig:{enabled:!1}},Audio:{popoverConfig:{toolbar:{showMore:!1}}}}},O4=navigator.userAgent.toLowerCase().indexOf("iphone")!==-1;navigator.userAgent.toLowerCase().indexOf("android");const Ja=navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1,j4=O4&&Ja;function R4(n){if(n.length!==4)return!1;const[t,e,i,s]=n,o=t.distanceTo(e),r=e.distanceTo(i),a=i.distanceTo(s),l=s.distanceTo(t),c=t.distanceTo(i),h=e.distanceTo(s);return o===a&&r===l&&c===h}class Sc extends b.Mesh{constructor(e,i,s){if(e.length!==4)throw new Error("QuadrangleMesh: Invalid number of points, it's not a quadrangle");const[o,r,a,l]=e,c=Et(...e),h=[o.clone().sub(c),r.clone().sub(c),a.clone().sub(c),l.clone().sub(c)],u=new Do(h,s);super(u,i);f(this,"name","QuadrangleMesh");this.position.copy(c)}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}}class Do extends b.BufferGeometry{constructor(e,i){super();f(this,"name","QuadrangleGeometry");f(this,"points");this.points=e;const s=i!=null?i:R4(e)?64:1;if(e.length!==4){console.error("Invalid number of points, it's not a quadrangle");return}const[o,r,a,l]=e,[c,h,u,d]=[new b.Vector2(0,0),new b.Vector2(1,0),new b.Vector2(1,1),new b.Vector2(0,1)],p=[],m=[];p.push(...o.toArray()),m.push(...c.toArray());for(let v=1;v<s;v++)p.push(o.x+(r.x-o.x)*v/s,o.y+(r.y-o.y)*v/s,o.z+(r.z-o.z)*v/s),m.push(c.x+(h.x-c.x)*v/s,c.y+(h.y-c.y)*v/s);p.push(...r.toArray()),m.push(...h.toArray()),p.push(...a.toArray()),m.push(...u.toArray());for(let v=1;v<s;v++)p.push(a.x+(l.x-a.x)*v/s,a.y+(l.y-a.y)*v/s,a.z+(l.z-a.z)*v/s),m.push(u.x+(d.x-u.x)*v/s,u.y+(d.y-u.y)*v/s);p.push(...l.toArray()),m.push(...d.toArray());const g=[];for(let v=0;v<s;v++)g.push(v,v+1,s*2-v,v,s*2-v,s*2+1-v);this.setAttribute("position",new b.BufferAttribute(new Float32Array(p),3)),this.setAttribute("uv",new b.BufferAttribute(new Float32Array(m),2)),this.setIndex(new b.BufferAttribute(new Uint32Array(g),1))}}function _4(n,t){let e=!Ja;const i=t!=null?t:document.createElement("video");i.preload="metadata",i.crossOrigin="anonymous",i.muted=!0,i.loop=!0,i.playsInline=!0,i.autoplay=!0;const s=new b.VideoTexture(i);s.minFilter=b.LinearFilter,s.magFilter=b.LinearFilter,s.encoding=b.sRGBEncoding,s.metadataLoaded=!1,i.src=n;const o=()=>{s.metadataLoaded||(s.dispatchEvent({type:"videoLoaded"}),s.metadataLoaded=!0)};if(Ja||(i.onloadedmetadata=()=>{o()}),Ja){const r=()=>{if(!e){if(!i.paused){o();return}i.muted=!0,i.play().then(()=>{e=!0,i.pause(),i.currentTime=0,o()}).catch(()=>{console.warn("video auto play error")})}};document.addEventListener("click",r,{once:!0}),document.addEventListener("touchend",r,{once:!0})}return s}function tn(n,t,e){if(n==="fill")return t;if(n==="contain"){const[i,s,o,r]=t,a=i.distanceTo(s),l=o.distanceTo(r),c=i.distanceTo(r),h=s.distanceTo(o),u=a,d=c,p=u/d;if(p>e){const g=d*e,v=new b.Vector3().subVectors(s,i).multiplyScalar((a-g)/2/a),y=new b.Vector3().subVectors(o,r).multiplyScalar((l-g)/2/l);return[i.clone().add(v),s.clone().sub(v),o.clone().sub(y),r.clone().add(y)]}else if(p<e){const g=u/e,v=new b.Vector3().subVectors(r,i).multiplyScalar((c-g)/2/c),y=new b.Vector3().subVectors(o,s).multiplyScalar((h-g)/2/h);return[i.clone().add(v),s.clone().add(y),o.clone().sub(y),r.clone().sub(v)]}else return t}else return console.warn(`objectFit: ${n} is not supported yet`),t}class V4 extends b.ShaderMaterial{constructor(e){super();f(this,"transparent",!0);f(this,"depthWrite",!1);f(this,"blending",b.CustomBlending);f(this,"blendSrc",b.SrcAlphaFactor);f(this,"blendDst",b.OneMinusSrcAlphaFactor);f(this,"blendSrcAlpha",b.OneFactor);f(this,"blendDstAlpha",b.OneMinusSrcAlphaFactor);f(this,"vertexShader",`
|
|
931
|
+
`,e.container.style.pointerEvents="none";const i=v=>(e.wrapper=v,v.appendChild(e.container),l(),!0),s=v=>{e.itemLabels=zE(v),l()},o=()=>(e.enabled||(e.enabled=!0,l()),!0),r=()=>(e.enabled&&(e.enabled=!1,l()),!0),a=()=>{h(),e.container.remove()},l=()=>{var v;if(e.wrapper){if(!e.enabled||!e.fiveModeEnabled){(v=e.app)==null||v.$destroy(),e.app=void 0;return}e.app?e.app.$set({five:n,itemLabels:e.itemLabels}):e.app=new LE({target:e.container,props:{five:n,modelOcclusionEnable:e.modelOcclusionEnable,itemLabels:e.itemLabels,hooks:e.hooks,displayStrategyType:e.displayStrategyType,maxVisibleDistance:e.maxVisibleDistance}})}},c=()=>{n.on("modeChange",u),n.once("dispose",a)},h=()=>{n.off("modeChange",u)},u=v=>{if(v!==rt.Five.Mode.Panorama){e.fiveModeEnabled=!1,r();return}n.once("initAnimationEnded",()=>{e.fiveModeEnabled=!0,o()})};return c(),{appendTo:i,load:s,enable:o,disable:r,dispose:a,hooks:e.hooks}},RE={name:"ItemLabelPlugin",version:0};function _E(n){Le(n,"svelte-1irjijd",'.plugin-DoorLabelPlugin-item.svelte-1irjijd.svelte-1irjijd{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;transition:opacity 0.3s ease}.plugin-DoorLabelPlugin-cnt.svelte-1irjijd.svelte-1irjijd{position:absolute;top:50%;left:50%;border-radius:0.125rem;background:rgba(0, 0, 0, 0.35);line-height:0.75rem;padding:0.375rem;white-space:nowrap;font-size:0.75rem;font-style:normal;color:white;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform ease 1s, background ease 0.3s, color ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-1irjijd.svelte-1irjijd::after{content:"";display:block;position:absolute;top:-0.0625rem;left:-0.0625rem;bottom:-0.0625rem;right:-0.0625rem;border-radius:0.125rem;border:0.0625rem solid rgba(0, 0, 0, 0);-o-border-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMAQMAAABsu86kAAAABlBMVEUAAAD///+l2Z/dAAAAAnRSTlMAIE397fAAAAAVSURBVAjXY2BjgCMQ+PABhIAASRwARxwD8fgzCQAAAAAASUVORK5CYII=") 4;border-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMAQMAAABsu86kAAAABlBMVEUAAAD///+l2Z/dAAAAAnRSTlMAIE397fAAAAAVSURBVAjXY2BjgCMQ+PABhIAASRwARxwD8fgzCQAAAAAASUVORK5CYII=") 4;transition:opacity ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-1irjijd.svelte-1irjijd:active,.plugin-DoorLabelPlugin-cnt.svelte-1irjijd.svelte-1irjijd:focus{background:rgba(0, 0, 0, 0.5);color:rgba(255, 255, 255, 0.5)}.plugin-DoorLabelPlugin-icon.svelte-1irjijd.svelte-1irjijd{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTBweCIgaGVpZ2h0PSIxMHB4IiB2aWV3Qm94PSIwIDAgMTAgMTAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+aW1hZ2Ut566t5aS0PC90aXRsZT4KICAgIDxkZWZzPgogICAgICAgIDxyZWN0IGlkPSJwYXRoLTEiIHg9IjAiIHk9IjAiIHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCI+PC9yZWN0PgogICAgICAgIDxsaW5lYXJHcmFkaWVudCB4MT0iNjYuMDYyMTk3NSUiIHkxPSI1MCUiIHgyPSItMS4xMzY4NjgzOGUtMTElIiB5Mj0iNTAlIiBpZD0ibGluZWFyR3JhZGllbnQtMyI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGRkZGRkYiIG9mZnNldD0iMCUiPjwvc3RvcD4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI0ZGRkZGRiIgc3RvcC1vcGFjaXR5PSIwLjg1IiBvZmZzZXQ9IjEwMCUiPjwvc3RvcD4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgICAgIDxsaW5lYXJHcmFkaWVudCB4MT0iODQuMzM5NzMxJSIgeTE9IjUwJSIgeDI9IjIzLjQyODMzNzclIiB5Mj0iNTAlIiBpZD0ibGluZWFyR3JhZGllbnQtNCI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGRkZGRkYiIHN0b3Atb3BhY2l0eT0iMCIgb2Zmc2V0PSIwJSI+PC9zdG9wPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjRkZGRkZGIiBzdG9wLW9wYWNpdHk9IjAuOCIgb2Zmc2V0PSIxMDAlIj48L3N0b3A+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxnIGlkPSLpobXpnaItMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9IlZSLeWIhumXtOW8leWvvOagh+etvuWkh+S7vS0zIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMzM5LjAwMDAwMCwgLTU0My4wMDAwMDApIj4KICAgICAgICAgICAgPGcgaWQ9Iue8lue7hC0y5aSH5Lu9LTEyIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzMDUuMDAwMDAwLCA1MzYuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0iaW1hZ2Ut566t5aS0IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNC4wMDAwMDAsIDcuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPG1hc2sgaWQ9Im1hc2stMiIgZmlsbD0id2hpdGUiPgogICAgICAgICAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNwYXRoLTEiPjwvdXNlPgogICAgICAgICAgICAgICAgICAgIDwvbWFzaz4KICAgICAgICAgICAgICAgICAgICA8dXNlIGlkPSJCRyIgZmlsbC1vcGFjaXR5PSIwIiBmaWxsPSIjRDhEOEQ4IiBvcGFjaXR5PSIwLjUxMTQ2Mjk4NCIgeGxpbms6aHJlZj0iI3BhdGgtMSI+PC91c2U+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTcuOTM4ODY5OCwxLjE0Mzc2MTI5IEM4LjI1NDY1NDA0LDEuMjU3NTgwMzUgOC4zMTc4Mjg0LDEuMzAyMTY5OTggOC4zMTc3ODUyMSwxLjM1ODE1MjIzIEM4LjMxNzc1MDcyLDEuNDAyODQzMzUgOC4zMDU3NDkwNywxLjQ0NzUyNTI0IDguMjgxNzg0MTEsMS40ODcyMDUyMSBMOC4yODE3ODQxMSwxLjQ4NzIwNTIxIEw2LjIwOTg5MDQxLDQuOTE3NzQyNDUgQzYuMTM3ODg4MDgsNS4wMzY5NjAyOSA2LjEwMTg4NjkxLDUuMTcxMjIwMiA2LjEwMTg4NjkxLDUuMzA1NDgwMTEgQzYuMTAxODg2OTEsNS40Mzk3NDAwMiA2LjEzNzg4ODA4LDUuNTczOTk5OTQgNi4yMDk4OTA0MSw1LjY5MzIxNzc4IEw2LjIwOTg5MDQxLDUuNjkzMjE3NzggTDguMjgxNzg0MTEsOS4xMjM3NTUwMSBDOC4zMTc0NzQzOCw5LjE4Mjg0OTE2IDguMzI1ODMzMjIsOS4yNTA4MTUyIDguMzEwNDk1OTUsOS4zMTI5MzAyOCBDOC4yOTUxNTg2OCw5LjM3NTA0NTM2IDguMjU2MTI1MzEsOS40MzEzMDk0NyA4LjE5NzAzMTE3LDkuNDY2OTk5NzMgQzguMTU3MzUxMTksOS40OTA5NjQ2OSA4LjExMjY2OTMxLDkuNTAyOTY2MzQgOC4wNjc5NzgxOCw5LjUwMzAwMDgzIEM4LjAyMzI4NzA2LDkuNTAzMDM1MzEgNy45Nzg1ODY3MSw5LjQ5MTEwMjYzIDcuOTM4ODY5OCw5LjQ2NzE5ODkzIEw3LjkzODg2OTgsOS40NjcxOTg5MyBMMS4zNzk5MTIxOCw1LjUxOTY3ODE1IEMxLjMyMDc2MzAyLDUuNDg0MDc5MTIgMS4yODE2NDI4Nyw1LjQyNzg3NTMyIDEuMjY2MjA5NzcsNS4zNjU3ODM5OCBDMS4yNTQ2OTI1Niw1LjMxOTQ0NzMyIDEuMjU2MzY2OTgsNS4yNjk4MzE4MiAxLjI3Mjc1MzMzLDUuMjIzMDU0MDUgTDEuMjcyNzUzMzMsNS4yMjMwNTQwNSBaIiBpZD0i566t5aS0IiBzdHJva2U9InVybCgjbGluZWFyR3JhZGllbnQtNCkiIHN0cm9rZS13aWR0aD0iMC41IiBmaWxsPSJ1cmwoI2xpbmVhckdyYWRpZW50LTMpIiBtYXNrPSJ1cmwoI21hc2stMikiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUuMDM5MjAwLCA1LjMwNTQ4MCkgc2NhbGUoMSwgLTEpIHJvdGF0ZSgtOTAuMDAwMDAwKSB0cmFuc2xhdGUoLTUuMDM5MjAwLCAtNS4zMDU0ODApICI+PC9wYXRoPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=") no-repeat;background-size:100%;display:inline-block;width:0.625rem;height:0.625rem;margin-left:0.25rem;transform-origin:center}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].left.svelte-1irjijd .plugin-DoorLabelPlugin-icon.svelte-1irjijd{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-1irjijd .plugin-DoorLabelPlugin-txt.svelte-1irjijd{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-1irjijd .plugin-DoorLabelPlugin-icon.svelte-1irjijd{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].forward.svelte-1irjijd .plugin-DoorLabelPlugin-icon.svelte-1irjijd{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-1irjijd .plugin-DoorLabelPlugin-txt.svelte-1irjijd{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-1irjijd .plugin-DoorLabelPlugin-icon.svelte-1irjijd{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].back.svelte-1irjijd .plugin-DoorLabelPlugin-icon.svelte-1irjijd{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-1irjijd .plugin-DoorLabelPlugin-txt.svelte-1irjijd{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-1irjijd .plugin-DoorLabelPlugin-icon.svelte-1irjijd{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].right.svelte-1irjijd .plugin-DoorLabelPlugin-icon.svelte-1irjijd{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-1irjijd .plugin-DoorLabelPlugin-txt.svelte-1irjijd{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-1irjijd .plugin-DoorLabelPlugin-icon.svelte-1irjijd{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-1irjijd.svelte-1irjijd{color:#f9eac1}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-1irjijd .plugin-DoorLabelPlugin-icon.svelte-1irjijd{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTBweCIgaGVpZ2h0PSI4cHgiIHZpZXdCb3g9IjAgMCAxMCA4IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPHRpdGxlPueureWktDwvdGl0bGU+CiAgICA8ZGVmcz4KICAgICAgICA8bGluZWFyR3JhZGllbnQgeDE9IjEwLjYzODU4ODQlIiB5MT0iMCUiIHgyPSI5Ni41MTYxNDc0JSIgeTI9IjEyOS43MzEzNTQlIiBpZD0ibGluZWFyR3JhZGllbnQtMSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGRkYyQ0MiIG9mZnNldD0iMCUiPjwvc3RvcD4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI0VBRDA5QSIgb2Zmc2V0PSI0OC43MTQ0NDc4JSI+PC9zdG9wPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjRDFCMTdFIiBvZmZzZXQ9IjEwMCUiPjwvc3RvcD4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgogICAgPGcgaWQ9Iumhtemdoi0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0i5pyq5p2l5a625aSH5Lu9LTI1IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMzA1LjAwMDAwMCwgLTU0NS4wMDAwMDApIiBmaWxsPSJ1cmwoI2xpbmVhckdyYWRpZW50LTEpIiBmaWxsLXJ1bGU9Im5vbnplcm8iPgogICAgICAgICAgICA8ZyBpZD0i57yW57uELTLlpIfku70tMTMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI0NS4wMDAwMDAsIDUzNy4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxnIGlkPSJpbWFnZS3nrq3lpLQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDYwLjAwMDAwMCwgNy4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNOC40OTU3ODI5NCwxLjYxNjQ1MTEgTDYuNDIzODg5MjUsNS4wNDY5ODgzMyBDNi4zMjc4ODYxMyw1LjIwNTk0NTQ1IDYuMzI3ODg2MTMsNS40MDUwMTQ3NyA2LjQyMzg4OTI1LDUuNTYzOTcxODkgTDguNDk1NzgyOTQsOC45OTQ1MDkxMiBDOC42Mzg1NDQwMSw5LjIzMDg4NTcxIDguNTYyNjUzNjQsOS41MzgyMzc1IDguMzI2Mjc3MDYsOS42ODA5OTg1NiBDOC4xNjc1NTcxNiw5Ljc3Njg1ODQgNy45Njg4MjE5NSw5Ljc3NzAxMTc1IDcuODA5OTU0MzEsOS42ODEzOTY5NyBMMS4yNTA5OTY2OSw1LjczMzg3NjE4IEMxLjAxNDQwMDA4LDUuNTkxNDgwMDcgMC45MzgwMzU0ODEsNS4yODQyNDU3NiAxLjA4MDQzMTU5LDUuMDQ3NjQ5MTQgQzEuMTIyNTE0OCw0Ljk3NzcyNjI4IDEuMTgxMDczODMsNC45MTkxNjcyNSAxLjI1MDk5NjY5LDQuODc3MDg0MDQgTDcuODA5OTU0MzEsMC45Mjk1NjMyNTMgQzguMDQ2NTUwOTMsMC43ODcxNjcxNDIgOC4zNTM3ODUyNCwwLjg2MzUzMTczOSA4LjQ5NjE4MTM1LDEuMTAwMTI4MzUgQzguNTkxNzk2MTMsMS4yNTg5OTYgOC41OTE2NDI3OCwxLjQ1NzczMTIgOC40OTU3ODI5NCwxLjYxNjQ1MTEgWiIgaWQ9IueureWktCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNS4wMzkyMDAsIDUuMzA1NDgwKSBzY2FsZSgxLCAtMSkgcm90YXRlKC05MC4wMDAwMDApIHRyYW5zbGF0ZSgtNS4wMzkyMDAsIC01LjMwNTQ4MCkgIj48L3BhdGg+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==") no-repeat}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-1irjijd.svelte-1irjijd:active,.plugin-DoorLabelPlugin-cnt--customBrand.svelte-1irjijd.svelte-1irjijd:focus{background:rgba(0, 0, 0, 0.5);color:rgba(249, 234, 193, 0.5)}')}function VE(n){let t,e,i,s=n[0].name+"",o,r,a,l,c,h,u,d,p;return{c(){t=U("div"),e=U("div"),i=U("span"),o=Fe(s),r=ue(),a=U("i"),P(i,"class","plugin-DoorLabelPlugin-txt svelte-1irjijd"),P(a,"class","plugin-DoorLabelPlugin-icon svelte-1irjijd"),P(e,"class",l=Mt(pi("plugin-DoorLabelPlugin-cnt",n[0].toward))+" svelte-1irjijd"),P(e,"style",c=`transform: ${n[0].transform||"initial"};pointer-events: ${n[0].inSight?"auto":"none"};opacity: ${n[0].inSight?1:0}`),P(e,"data-camera-toward",h=n[0].cameraToward),P(t,"style",u=`left: ${n[0].left||0}%;top: ${n[0].top||0}%;opacity: ${n[0].inSight?1:0}`),P(t,"class","plugin-DoorLabelPlugin-item svelte-1irjijd")},m(m,g){Z(m,t,g),B(t,e),B(e,i),B(i,o),B(e,r),B(e,a),n[4](t),d||(p=_e(e,"click",n[3]),d=!0)},p(m,[g]){g&1&&s!==(s=m[0].name+"")&&Ne(o,s),g&1&&l!==(l=Mt(pi("plugin-DoorLabelPlugin-cnt",m[0].toward))+" svelte-1irjijd")&&P(e,"class",l),g&1&&c!==(c=`transform: ${m[0].transform||"initial"};pointer-events: ${m[0].inSight?"auto":"none"};opacity: ${m[0].inSight?1:0}`)&&P(e,"style",c),g&1&&h!==(h=m[0].cameraToward)&&P(e,"data-camera-toward",h),g&1&&u!==(u=`left: ${m[0].left||0}%;top: ${m[0].top||0}%;opacity: ${m[0].inSight?1:0}`)&&P(t,"style",u)},i:ce,o:ce,d(m){m&&X(t),n[4](null),d=!1,p()}}}function FE(n,t,e){let{props:i}=t,{onClick:s}=t,o;const r=()=>{const{left:c,top:h,inSight:u,panoIndex:d}=i;if(!c||!h||!u||!o)return;const p=o.current.clientWidth/window.innerWidth*100,m=o.current.clientHeight/window.innerHeight*100;c<=p/2||c>=100-p/2||h<=m/2||h>=100-m/2},a=c=>{s&&s()};function l(c){qe[c?"unshift":"push"](()=>{o=c,e(2,o)})}return n.$$set=c=>{"props"in c&&e(0,i=c.props),"onClick"in c&&e(1,s=c.onClick)},r(),[i,s,o,a,l]}class BE extends Ee{constructor(t){super(),Ie(this,t,FE,VE,Me,{props:0,onClick:1},_E)}}function HE(n,t){const e=Math.abs(n.top+n.height/2-t.top-t.height/2),i=Math.abs(n.left+n.width/2-t.left-t.width/2),s=(n.height+t.height)/2,o=(n.width+t.width)/2;return!(e>s&&i>o)}function NE(n){const{camera:t}=n,e=t.getWorldDirection(new G.Vector3);let i=Math.atan(e.z/e.x)*180/Math.PI,s="";return e.x<0&&(i+=180),i<0&&(i+=360),i>315||i<=45?s="right":i>45&&i<=135?s="back":i>135&&i<=225?s="left":i>225&&i<=315&&(s="forward"),s}function GE(n,t){return Math.sqrt(Math.pow(n.z-t.z,2)+Math.pow(n.x-t.x,2))}function WE(n){const t=Math.PI/4;return n>-t&&n<=t?"left":n>t*3||n<=-t*3?"right":n>-t*3&&n<=-t?"forward":n>t&&n<=t*3?"back":""}const UE={userAction:!0};class QE extends ys{constructor(e){super(e);f(this,"state",{enabled:!0,visible:!0});f(this,"container");f(this,"MinVisibledistance",1.8);f(this,"MaxVisibledistance",5);f(this,"OffsetHeight",-1.3);f(this,"floorplanServerData");f(this,"visibleLabelMap",new Map);f(this,"labelItems",[]);f(this,"doorLabels");f(this,"roomObservers");f(this,"loadData",(e,i)=>{i&&(this.MaxVisibledistance=i.MaxVisibledistance,this.MinVisibledistance=i.MinVisibledistance,this.OffsetHeight=i.OffsetHeight),this.labelItems.forEach(s=>{var o;return(o=s.svelteApp)==null?void 0:o.$destroy()}),this.labelItems=[],this.doorLabels=[],this.floorplanServerData=e,xi(this.five).then(()=>{this.initData(),this.fixDoorVisibleAndPosition(),this.applyState()})});f(this,"dispose",()=>{var e,i,s,o,r,a,l;(e=this.five)==null||e.off("wantsToMoveToPano",this.hideAllLabels),(i=this.five)==null||i.off("modelLoaded",this.fixDoorVisibleAndPosition),(s=this.five)==null||s.off("panoArrived",this.fixDoorVisibleAndPosition),(o=this.five)==null||o.off("initAnimationEnded",this.fixDoorPosition),(r=this.five)==null||r.off("cameraUpdate",this.fixDoorPosition),(a=this.five)==null||a.off("mouseWheel",this.fixDoorPosition),(l=this.five)==null||l.off("pinchGesture",this.fixDoorPosition),this.applyState({enabled:!1})});f(this,"initRoomObservers",()=>{var o,r;const e=this.floorplanServerData.computed_data.floor_datas||[],s=(((r=(o=this.five)==null?void 0:o.work)==null?void 0:r.observers)||[]).map(a=>{const l=a.panoIndex,c=a.floorIndex,h=e==null?void 0:e.find(u=>u.floor_index===c);if(h){const u=h.rooms.find(d=>d.observer_indexs.includes(l));if(u)return{panoIndex:l,floorIndex:c,name:u.name}}}).filter(Boolean);this.roomObservers=s});f(this,"hideAllLabels",()=>{this.labelItems.forEach(e=>{e.visible=!1,e.inSight=!1})});f(this,"fixDoorVisibleAndPosition",()=>{this.initRoomObservers();const{panoIndex:e}=this.five;if(!this.state.visible||this.five.model.empty||e===null||!this.roomObservers.find(a=>a.panoIndex===e))return;const i=this.roomObservers.find(a=>a.panoIndex===e),o=this.five.work.observers.find(a=>a.panoIndex===e).position.clone(),r=(()=>{if(this.visibleLabelMap.has(e))return this.visibleLabelMap.get(e);{const a=[];return this.doorLabels.forEach((l,c)=>{if(l.roomName===i.name)return;const h=l.position.clone(),u=h.distanceTo(o);if(u<this.MinVisibledistance||u>this.MaxVisibledistance)return;const d=new G.Raycaster,p=h.clone().sub(o).normalize();d.set(o,p);const[m]=this.five.model.intersectRaycaster(d);m&&m.distance+.1<u||a.push(c)}),this.visibleLabelMap.set(e,a),a}})();this.labelItems.forEach((a,l)=>{a.visible=r.includes(l)}),this.fixDoorPosition()});f(this,"fixDoorPosition",()=>{var c,h,u,d,p,m,g,v,y,w,C,E;if(!this.state.enabled||!this.state.visible)return;const{panoIndex:e,camera:i}=this.five;if(e===null)return;if(this.five.currentMode!=="Panorama")return this.hideAllLabels();const s=this.five.getElement(),o=s.clientWidth,r=s.clientHeight,a=i.getWorldDirection(new G.Vector3),l=[];if(this.labelItems.forEach((D,L)=>{var A;if(D.visible){const M=i.position.distanceTo(D.position),I=D.position.clone().add(new G.Vector3(0,this.OffsetHeight,0)),x=I.clone().sub(i.position).normalize().angleTo(a),S=I.clone().project(i),j=(S.x+1)/2.2*100,F=(-S.y+1)/2.2*100,J=j>=0&&j<=100&&F>=0&&F<=100&&M>this.MinVisibledistance&&M<=this.MaxVisibledistance;D.left=j,D.top=F,D.inSight=J&&x<Math.PI/2,D.cameraToward=NE(this.five),J?l.push({disFromCameraToLabel:M,left:j,top:F,index:L}):D.transform="translate(-50%, -50%)"}else D.inSight=!1;const O=D,{svelteApp:R}=O,z=Kn(O,["svelteApp"]);(A=D.svelteApp)==null||A.$set({props:z})}),l.length>1){let D=0;l.sort((L,R)=>R.disFromCameraToLabel-L.disFromCameraToLabel);for(let L=1;L<l.length;L++){const{index:R,left:z,top:O}=l[L-1],{index:A,left:M,top:I}=l[L],k=this.container.children[R],x=this.container.children[A];if(!k||!x)return;const S={left:o*z/100,top:r*O/100,width:(u=(h=(c=k.children)==null?void 0:c[0])==null?void 0:h.clientWidth)!=null?u:0,height:(m=(p=(d=k.children)==null?void 0:d[0])==null?void 0:p.clientHeight)!=null?m:0},j={left:o*M/100,top:r*I/100,width:(y=(v=(g=x.children)==null?void 0:g[0])==null?void 0:v.clientWidth)!=null?y:0,height:(E=(C=(w=x.children)==null?void 0:w[0])==null?void 0:C.clientHeight)!=null?E:0};HE(S,j)&&(D++,this.labelItems[R].transform=`translate(-50%, ${(D-1)*100-50}%)`,this.labelItems[A].transform=`translate(-50%, ${D*100-50}%)`)}}});f(this,"onClick",(e,i)=>{if(!this.roomObservers)return;const{work:s}=this.five;let o,r,a=1/0;for(const l of s.observers)if(this.roomObservers.find(h=>h.panoIndex===l.panoIndex&&h.name===e)){const h=l.standingPosition,u=i.distanceTo(h);u<a&&(o=l.panoIndex,r=h.clone().sub(i).normalize(),a=u)}if(r!==void 0&&o!==void 0){const l={};if(a>0){const h=new G.Vector3(0,0,-1),u=r.clone(),d=new G.Quaternion;d.setFromUnitVectors(h,u);const p=new G.Euler;p.setFromQuaternion(d,"YXZ"),l.longitude=p.y}this.five.emit("wantsToMoveToPano",o,{},!0)||this.five.moveToPano(o,{longitude:l.longitude})}});f(this,"initData",()=>{var o;this.doorLabels=[],this.labelItems.forEach(r=>{var a;return(a=r.svelteApp)==null?void 0:a.$destroy()}),this.labelItems=[];const e=this.five.panoIndex,i=this.floorplanServerData.computed_data.observers[e].floor_index,s=this.floorplanServerData.computed_data.floor_datas[i];(o=this.floorplanServerData.computed_data.doors)==null||o.forEach(r=>{const a=this.five.work.observers.filter((d,p)=>{var m;return!!((m=s==null?void 0:s.rooms)!=null&&m.find(g=>g.observer_indexs.includes(p)))}),l=r.position;let c=1/0,h;a.forEach(d=>{const p=d.standingPosition,m={x:p.x,y:p.y,z:p.z},g=GE(l,m);g<c&&(c=g,h=m)}),h&&(l.y=h.y+.01);const u=new G.Vector3(l.x,l.y,l.z);u.add(new G.Vector3(-.2,1.8,0).applyEuler(new G.Euler(0,r.rad,0))),this.doorLabels.push({roomName:r.name,name:r.name,position:u,toward:WE(r.rad)})}),this.labelItems=this.doorLabels.map(r=>de(V({},r),{left:0,top:0,visible:!1,inSight:!1,transform:"",cameraToward:""})),this.five.on("wantsToMoveToPano",this.hideAllLabels),this.five.on("panoArrived",this.fixDoorVisibleAndPosition),this.five.on("initAnimationEnded",this.fixDoorPosition),this.five.on("cameraUpdate",this.fixDoorPosition),this.five.on("mouseWheel",this.fixDoorPosition),this.five.on("pinchGesture",this.fixDoorPosition),this.fixDoorVisibleAndPosition()})}appendTo(e){this.state.enabled&&(this.container=e)}setState(e,i){const s=this.state;this.state=V(V({},s),e);const o=s.enabled&&s.visible,r=this.state.enabled&&this.state.visible;o!==r&&this.applyState()}show(){this.setState({visible:!0})}hide(){this.setState({visible:!1})}enable(){this.setState({enabled:!0})}disable(){this.setState({enabled:!1})}stateChangedCallback(e,i){if(this.hooks.hasListener("stateChange")){const s={state:this.state,prevState:e,userAction:i?i.userAction:UE.userAction};this.hooks.emit("stateChange",s)}}applyState(e){const i=e!=null?e:this.state;i.enabled!==!1&&i.visible!==!1?(this.labelItems.forEach(o=>{o.svelteApp=new BE({target:this.container,props:{props:o,onClick:()=>{this.onClick(o.name,o.position)}}})}),this.fixDoorPosition()):this.labelItems.forEach(o=>{o.svelteApp.$destroy()})}initState(){return{enabled:!0,visible:!0}}}const XE=n=>new QE(n);function W1(n,t){console.warn(`🚫 ==> [${n}]: ${t}`)}var Zl={},YE=ZE;function ZE(n,t,e){return n[0]=t[0]+e[0],n[1]=t[1]+e[1],n}var qE=JE;function JE(n,t,e){return n[0]=t,n[1]=e,n}var KE=$E;function $E(n,t){var e=t[0],i=t[1],s=e*e+i*i;return s>0&&(s=1/Math.sqrt(s),n[0]=t[0]*s,n[1]=t[1]*s),n}var e4=t4;function t4(n,t,e){return n[0]=t[0]-e[0],n[1]=t[1]-e[1],n}var i4=n4;function n4(n,t){return n[0]*t[0]+n[1]*t[1]}var s4=YE,Ah=qE,U1=KE,o4=e4,r4=i4,rm=[0,0];Zl.computeMiter=function(t,e,i,s,o){return s4(t,i,s),U1(t,t),Ah(e,-t[1],t[0]),Ah(rm,-i[1],i[0]),o/r4(e,rm)};Zl.normal=function(t,e){return Ah(t,-e[1],e[0]),t};Zl.direction=function(t,e,i){return o4(t,e,i),U1(t,t),t};var Cn=Zl,ks=[0,0],Va=[0,0],am=[0,0],Ar=[0,0],a4=function(n,t){var e=null,i=[];t&&(n=n.slice(),n.push(n[0]));for(var s=n.length,o=1;o<s;o++){var r=n[o-1],a=n[o],l=o<n.length-1?n[o+1]:null;if(Cn.direction(ks,a,r),e||(e=[0,0],Cn.normal(e,ks)),o===1&&xc(i,e,1),!l)Cn.normal(e,ks),xc(i,e,1);else{Cn.direction(Va,l,a);var c=Cn.computeMiter(am,Ar,ks,Va,1);xc(i,Ar,c)}}if(n.length>2&&t){var h=n[s-2],u=n[0],d=n[1];Cn.direction(ks,u,h),Cn.direction(Va,d,u),Cn.normal(e,ks);var p=Cn.computeMiter(am,Ar,ks,Va,1);i[0][0]=Ar.slice(),i[s-1][0]=Ar.slice(),i[0][1]=p,i[s-1][1]=p,i.pop()}return i};function xc(n,t,e){n.push([[t[0],t[1]],e])}function Q1(n,t){const e=n[0],i=n[1],s=t[0],o=t[1];var r=(o.x-s.x)*(e.y-s.y)-(o.y-s.y)*(e.x-s.x),a=(i.x-e.x)*(e.y-s.y)-(i.y-e.y)*(e.x-s.x),l=(o.y-s.y)*(i.x-e.x)-(o.x-s.x)*(i.y-e.y);if(l!==0){var c=r/l,h=a/l;if(0<=c&&c<=1&&0<=h&&h<=1)return!0}return!1}function l4(n,t){for(let e=0;e<n.length-1;e++)for(let i=0;i<t.length-1;i++)if(Q1([n[e],n[e+1]],[t[i],t[i+1]]))return{x:(n[e].x+n[e+1].x)/2,y:(n[e].y+n[e+1].y)/2,line1RelativeIndex:e,line2RelativeIndex:i}}const c4=2,h4=3,u4=3,d4=2;function f4(n){const t=n.width,e=n.unitLength,i=t/2,s=n.path;if(s.length===0)return{geometry:new b.BufferGeometry,maxV:0,curvePath:null,curvePoints:null};const o=new b.CurvePath;s.forEach(O=>{const A=p4(O);A&&o.add(A)});const r=Math.ceil(o.getLength()*100);o.arcLengthDivisions=r;const a=o.getPoints(r),l=a.length;if(l<=2)return{geometry:new b.BufferGeometry,maxV:0,curvePath:null,curvePoints:null};const c=a4(a.map(O=>[O.x,O.z])),u=(l-1)*c4*h4,d=2*l,p=d*u4,m=d*d4,g=new Uint32Array(u),v=new Float32Array(p),y=new Float32Array(m);let w=0,C=0;for(let O=0;O<l;O++){const[A,M]=c[O][0],I=a[O],{x:k,y:x,z:S}=I,j=new G.Vector3(k+A*i,x+.05,S+M*i);v[O*6+0]=j.x,v[O*6+1]=j.y,v[O*6+2]=j.z;const F=new G.Vector3(k-A*i,x+.05,S-M*i);v[O*6+3]=F.x,v[O*6+4]=F.y,v[O*6+5]=F.z,w+=O>0?a[O-1].clone().sub(a[O]).length():0;const J=w/e;C=J,y[O*4+0]=0,y[O*4+1]=J,y[O*4+2]=1,y[O*4+3]=J;const ne=new b.Vector3().lerpVectors(j,F,.5);n.skipPositions&&n.skipPositions.some(oe=>oe.distanceTo(ne)<.26)||O!==l-1&&(g[O*6+0]=O*2+0,g[O*6+1]=O*2+2,g[O*6+2]=O*2+1,g[O*6+3]=O*2+2,g[O*6+4]=O*2+3,g[O*6+5]=O*2+1)}const E=[];let D;const L=[];for(let O=0;O<l-1;O++){if(D!==void 0&&O<=D)continue;const A=O+1,M={x:v[O*6+0],y:v[O*6+2]},I={x:v[O*6+3],y:v[O*6+5]},k={x:v[A*6+0],y:v[A*6+2]},x={x:v[A*6+3],y:v[A*6+5]},S=Q1([M,I],[k,x]);if(S&&E.push(O),!S&&E.length){E.push(O);const j=new b.Vector2(M.x,M.y).distanceTo(new b.Vector2(k.x,k.y)),F=new b.Vector2(I.x,I.y).distanceTo(new b.Vector2(x.x,x.y)),J=300,ne=[],q=[],oe=Math.max(0,E[0]-e*J),se=E[0];for(let we=oe;we<se;we++)j<F?ne.push({x:v[we*6+0],y:v[we*6+2]}):ne.push({x:v[we*6+3],y:v[we*6+5]});const ae=E[E.length-1],ze=Math.min(l-1,E[E.length-1]+e*J);for(let we=ae;we<ze;we++)j<F?q.push({x:v[we*6+0],y:v[we*6+2]}):q.push({x:v[we*6+3],y:v[we*6+5]});const ee=l4(ne,q);if(ee){const{line1RelativeIndex:we,line2RelativeIndex:le,x:he,y:be}=ee,te=oe+we,ke=ae+le+2;for(let Oe=te;Oe<ke;Oe++)j<F?(v[Oe*6+0]=he,v[Oe*6+2]=be):(v[Oe*6+3]=he,v[Oe*6+5]=be),D=Oe;let Re,ye,De,ve,Ae;j<F?(Re=v[oe*6+1],ye=v[te*6+1],De=v[ke*6+1],ve=v[ze*6+1],Ae=(ye+De)/2):(Re=v[oe*6+4],ye=v[te*6+4],De=v[ke*6+4],ve=v[ze*6+4],Ae=(ye+De)/2);for(let Oe=oe;Oe<te;Oe++){const Ye=te-oe,Ze=(Oe-oe)/Ye;j<F?v[Oe*6+1]=Re+(Ae-Re)*Ze:v[Oe*6+4]=Re+(Ae-Re)*Ze}for(let Oe=te;Oe<ke;Oe++)j<F?v[Oe*6+1]=Ae:v[Oe*6+4]=Ae;for(let Oe=ke;Oe<ze;Oe++){const Ye=ze-ke,Ze=(Oe-ke+1)/Ye;j<F?v[Oe*6+1]=Ae+(ve-Ae)*Ze:v[Oe*6+4]=Ae+(ve-Ae)*Ze}L.push({start:te,end:ke})}E.length=0}}const R=new Float32Array(d);L.forEach(O=>{for(let A=0;A<l-1;A++)A>=O.start&&A<=O.end?(R[A*2+0]=1,R[A*2+1]=1):R[A]!==1&&(R[A*2+0]=0,R[A*2+1]=0)});const z=new b.BufferGeometry;return z.setAttribute("position",new b.BufferAttribute(v,3)),z.setAttribute("uv",new b.BufferAttribute(y,2)),z.setIndex(new b.BufferAttribute(g,1)),{geometry:z,maxV:C,animationWillError:L,curvePath:o,curvePoints:a}}function p4(n){var t,e;if(m4(n)){const i=n.points.map(o=>new b.Vector3().fromArray(o));return new b.CatmullRomCurve3(i,(t=n.closed)!=null?t:!1,(e=n.curve_type)!=null?e:"centripetal",n.tension)}}function m4(n){return n.type==="CatmullRomCurve3"}function g4(n,t){t.forEach(e=>{const i=new b.SphereGeometry(.02,16,16),s=[],o=[new b.MeshBasicMaterial({color:16776960}),new b.MeshBasicMaterial({color:16711935}),new b.MeshBasicMaterial({color:16711680}),new b.MeshBasicMaterial({color:65535})];if(e.stickType==="3DBox"){const r=e.position;if(r!=null&&r.start&&(r!=null&&r.end)){const a=new b.Mesh(i,o[0]);a.position.copy(Lt(r.start)),s.push(a);const l=new b.Mesh(i,o[1]);l.position.copy(Lt(r.end)),s.push(l)}}else if(e.stickType==="Polygon"){const r=e.position;Array.isArray(r)&&r.length>0&&r.forEach((a,l)=>{const c=o[l%o.length],h=new b.Mesh(i,c);h.position.copy(Lt(a)),s.push(h)})}else if(Array.isArray(e.position)&&e.position.length===4)e.position.forEach((r,a)=>{const l=o[a],c=new b.Mesh(i,l);c.position.copy(Lt(r)),s.push(c)});else if(Array.isArray(e.position)){const r=o[0],a=new b.Mesh(i,r);a.position.copy(Lt(e.position)),s.push(a)}s.forEach(r=>{r.material.depthTest=!1,n.scene.add(r)})})}const mt=n=>n;function X1(n){if(!n||n.length<3)return;const t=n.map(Ve),e=t[1].clone().sub(t[0]),i=t[2].clone().sub(t[1]);return e.cross(i)}function v4(n){return n.stickType==="Plane"}function y4(n){return n.stickType==="3DPoint"}function Bs(n){return n.stickType==="Model"&&n.contentType==="MediaModel"}function b4(n){return n.stickType==="Model"&&n.contentType==="Model"}function A4(n){return n.stickType==="Model"&&n.contentType==="VirtualObject"}function w4(n){return b4(n)||A4(n)}function lm(n){return n.stickType==="Plane"&&n.contentType==="MediaPlane"}function P4(n){return n.stickType==="Polygon"}function C4(n){return n.stickType==="3DBox"}function M4(n){return n.stickType==="Mask"}function Y1(n,t){const e=Ve(n.start),i=Ve(n.end),s=new G.Euler().fromArray(n.rotation),o=Vt(new G.Vector3((e.x+i.x)/2,(e.y+i.y)/2,(e.z+i.z)/2),t),r=new G.Vector3(Math.abs(i.x-e.x)/2,Math.abs(i.y-e.y)/2,Math.abs(i.z-e.z)/2),a=new G.Matrix4().makeRotationFromEuler(s),l=[new G.Vector3(-.5,-.5,-.5),new G.Vector3(.5,-.5,-.5),new G.Vector3(.5,-.5,.5),new G.Vector3(-.5,-.5,.5),new G.Vector3(-.5,.5,-.5),new G.Vector3(.5,.5,-.5),new G.Vector3(.5,.5,.5),new G.Vector3(-.5,.5,.5)],c=r.clone().multiplyScalar(2);return l.map(u=>u.clone().multiply(c).applyMatrix4(a).add(o))}function qa(n,t){if(!t)return n;const e=new G.Matrix4().fromArray(t);return n.map(i=>i.clone().applyMatrix4(e))}function wh(n){const t=(()=>{var e,i;if(C4(n)&&n.position){const s=Y1(n.position,(i=(e=n.plugin)==null?void 0:e.workUtil)==null?void 0:i.transform);return qa(s,n.matrix)}if(P4(n)&&n.position){const s=n.position.map(o=>Ve(o));return qa(s,n.matrix)}if(Bs(n)&&n.matrix){const s=n.data.mediaPosition.map(o=>Ve(o));return qa(s,n.matrix)}return M4(n)?n.position&&Array.isArray(n.position)?Ve(n.position):(console.warn("[getTagPosition] Mask tag without position, tag id:",n.id),new G.Vector3(0,0,0)):n.position})();return Cb(t)}function cm(n){const t=wh(n);return Et(...Array.isArray(t)?t:[t])}function wr(n,t){if(n===void 0)return;const{min:e,max:i}=t!=null?t:{};if(!(e===void 0&&i===void 0))return!(typeof i=="number"&&i<n||typeof e=="number"&&e>n)}function I4(n,t,e){const s=new b.Plane().setFromNormalAndCoplanarPoint(e,t),o=t.clone().sub(n).cross(new b.Vector3(0,1,0)).setLength(.01),r=new b.Vector3(0,.01,0);return[t.clone().sub(o).sub(r),t.clone().add(o).sub(r),t.clone().add(o).add(r),t.clone().sub(o).add(r)].map(l=>s.projectPoint(l,new b.Vector3))}const hm=(n,t=1e3/60)=>{let e=null;const i=n;return(...o)=>{e&&clearTimeout(e),e=setTimeout(()=>{i==null||i(...o),e&&clearTimeout(e),e=null},t)}};function E4(n,t=200){let e;return function(...i){e||(n.apply(this,i),e=setTimeout(function(){e=null},t))}}function k4(n,t){const[e,i]=t;if(e>=i||i<=1||e<=1)return-1;const s={},o=r=>(s[r]||(s[r]=n(r)),s[r]);for(let r=e;r<i;r++){const a=o(r),l=o(r-1);if(a<l)return r}return-1}function Z1(n){if(!n)return null;try{if(n.includes("youtu.be"))return new URL(n).pathname.substring(1);if(n.includes("youtube.com")){const i=new URL(n),o=new URLSearchParams(i.search).get("v");if(o)return o;if(i.pathname.includes("/embed/"))return i.pathname.split("/embed/")[1];if(i.pathname.includes("/shorts/"))return i.pathname.split("/shorts/")[1];if(i.pathname.includes("/live/"))return i.pathname.split("/live/")[1]}}catch(i){}const t=/^.*(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/|shorts\/|live\/)|(?:(?:watch)?\?v(?:i)?=|\&v(?:i)?=))([^#\&\?]*).*/,e=n.match(t);return e&&e[1]?e[1]:null}function q1(n){if(!n)return null;try{if(n.includes("vimeo.com")){const s=new URL(n).pathname.split("/").filter(Boolean);if(s.length>0){const o=s[0];if(/^\d+$/.test(o)&&o.length>=5)return o}}}catch(i){}const t=/^.*vimeo\.com\/[A-Za-z\/]*(\d+)/,e=n.match(t);return e&&e[1]&&e[1].length>=5?e[1]:null}function Ph(n){return n?/^(http(s)?:\/\/)?((w){3}.)?youtu(be|.be)?(\.com)?\/.+/.test(n):!1}function Ch(n){return n?/^(http(s)?:\/\/)?((w){3}.)?vimeo\.com\/(.+)/.test(n):!1}function x4(n,t){if(Ph(n)){const e=Z1(n);if(!e)return"";const i=new URL(`https://www.youtube.com/embed/${e}`);return(t==null?void 0:t.start)!==void 0&&i.searchParams.set("start",t.start.toString()),(t==null?void 0:t.autoplay)!==void 0&&i.searchParams.set("autoplay",t.autoplay.toString()),i.toString()}if(Ch(n)){const e=q1(n);if(!e)return"";const i=new URL(`https://player.vimeo.com/video/${e}`);return(t==null?void 0:t.autoplay)!==void 0&&i.searchParams.set("autoplay",t.autoplay.toString()),i.toString()}return n}function Qu(n){return n.stickType?n.stickType:n.pointType==="PointTag"&&n.dimensionType==="3D"?"3DPoint":n.pointType==="PlaneTag"?"Plane":"2DPoint"}function S4(n){var t,e,i,s;if(n.stickType||(n.stickType=Qu(n)),n.contentType==="VRLink"||n.contentType==="PanoLink"||n.contentType==="Link"){const o=n;!((e=(t=o.data)==null?void 0:t.icon)!=null&&e.url)&&!((s=(i=o.style)==null?void 0:i.point)!=null&&s.url)&&(o.data.icon={url:uu,steps:28})}return n.extraData&&(n.data?n.data.extraData=n.extraData:n.data={extraData:n.extraData}),n}const Xo="data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAADAAAGhgBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVWqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr///////////////////////////////////////////8AAAA5TEFNRTMuOThyAc0AAAAAAAAAABSAJAiqQgAAgAAABobxtI73AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//uQxAACFEII9ACZ/sJZwWEoEb8w/////N//////JcxjHjf+7/v/H2PzCCFAiDtGeyBCIx7bJJ1mmEEMy6g8mm2c8nrGABB4h2Mkmn//4z/73u773R5qHHu/j/w7Kxkzh5lWRWdsifCkNAnY9Zc1HvDAhjhSHdFkHFzLmabt/AQxSg2wwzLhHIJOBnAWwVY4zrhIYhhc2kvhYDfQ4hDi2Gmh5KyFn8EcGIrHAngNgIwVIEMf5bzbAiTRoAD///8z/KVhkkWEle6IX+d/z4fvH3BShK1e5kmjkCMoxVmXhd4ROlTKo3iipasvTilY21q19ta30/v/0/idPX1v8PNxJL6ramnOVsdvMv2akO0iSYIzdJFirtzWXCZicS9vHqvSKyqm5XJBdqBwPxyfJdykhWTZ0G0ZyTZGpLKxsNwwoRhsx3tZfhwmeOBVISm3impAC/IT/8hP/EKEM1KMdVdVKM2rHV4x7HVXZvbVVKN/qq8CiV9VL9jjH/6l6qf7MBCjZmOqsAibjcP+qqqv0oxqpa/NVW286hPo1nz2L/h8+jXt//uSxCmDU2IK/ECN98KKtE5IYzNoCfbw+u9i5r8PoadUMFPKqWL4LK3T/LCraMSHGkW4bpLXR/E6LlHOVQxmslKVJ8IULktMN06N0FKCpHCoYsjC4F+Z0NVqdNFoGSTjSiyjzLdnZ2fNqTi2eHKONONKLMPMKLONKLMPQRJGlFxZRoKcJFAYEeIFiRQkUWUeYfef//Ko04soswso40UJAgMw8wosososy0EalnZyjQUGBRQGIFggOWUacWUeYmuadrZziQKKEgQsQLAhQkUJAgMQDghltLO1onp0cpkNInSFMqlYeSEJ5AHsqFdOwy1DA2sRmRJKxdKRfLhfLw5BzUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7ksRRA8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU=",zr={};var Xu=(n=>(n.Default="default",n.GetAudioDuration="getAudioDuration",n.PlayAudio="playAudio",n))(Xu||{});function T4(n,t){const e=(t==null?void 0:t.namespace)||"default",i=zr[e]||(zr[e]=[]);let s=i.find(o=>!o.realSrc||o.realSrc===Xo);return s||(console.warn("未找到缓存音频,已新建",zr),s=new J1(Xo),i.push(s)),n&&(s.src=n),s}function D4(n,t){const e=(t==null?void 0:t.namespace)||"default",i=zr[e]||(zr[e]=[]),s=n-i.length;if(!(s<=0))for(let o=0;o<s;o++)i.push(new J1(Xo))}class J1 extends(()=>typeof Audio=="undefined"?class{}:Audio)(){constructor(e){super(e);f(this,"preload","auto");f(this,"crossOrigin","anonymous");f(this,"realSrc","");f(this,"inited",!1);f(this,"removeDocumentEventListener");this.realSrc=e!=null?e:"",this.muted=!0,super.autoplay=!0,super.addEventListener("ended",()=>{this.src=""});const i=()=>L4(this);document.addEventListener("click",i),document.addEventListener("touchend",i),this.removeDocumentEventListener=()=>{document.removeEventListener("click",i),document.removeEventListener("touchend",i)}}get isBlankAudio(){return this.realSrc===Xo||!this.realSrc}get src(){return super.src}set src(e){super.src=e,this.realSrc=e,this.removeDocumentEventListener()}get muted(){return super.muted}set muted(e){super.muted=e}clear(){this.currentTime=0,this.src=Xo}}function L4(n){n&&(n.inited||(n.src&&(n.inited=!0,n.removeDocumentEventListener()),n.src===Xo&&n.play()))}const Yu={visibleConfig:{intersectRaycaster:{enabled:!0,distanceAccuracy:.04,checkPoints:"corner",needPassed:1}},clickable:!0,simulate3D:!1,renderType:"Dom"};var K1=(n=>(n.PointTag="PointTag",n.PlaneTag="PlaneTag",n))(K1||{}),$1=(n=>(n.Audio="Audio",n.Text="Text",n.ImageText="ImageText",n.Image="Image",n.Video="Video",n.Link="Link",n.Sticker="Sticker",n.VRLink="VRLink",n.PanoLink="PanoLink",n.Marketing="Marketing",n.MediaPlane="MediaPlane",n.MediaModel="MediaModel",n.Model="Model",n.VirtualObject="VirtualObject",n.Panorama="Panorama",n.Custom="Custom",n.Unknown="Unknown",n))($1||{}),ey=(n=>(n.Two="2D",n.Three="3D",n))(ey||{});const z4={globalConfig:{visibleConfig:{followModelVisibility:!0},unfoldedConfig:{autoUnfold:{enable:!0,strategy:"MinimumDistance",distance:{max:5}}},tag3DConfig:{ratio:.0035},popoverConfig:{enabled:!1,trigger:"hover",triggerDelay:500,placement:"auto",autoPlacementBaseSpace:{top:.2,right:.15,bottom:.2},transitionDuration:100,toolbar:{showMore:!0,showShare:!0},viewMoreText:"查看更多",showMedia:!1},tagNormalLineConfig:{enabled:!0,lineWidth:1.2}},contentTypeConfig:{"[Mapview]":{unfoldedConfig:{autoUnfold:{enable:!1,distance:{max:9999}}}},"[Floorplan]":{unfoldedConfig:{autoUnfold:{enable:!1,distance:{max:9999}}}},"Any-Audio-plane":{unfoldedConfig:{keep:"unfolded"}},Link:{unfoldedConfig:{keep:"unfolded"}},Panorama:{unfoldedConfig:{keep:"unfolded"}},VRLink:{unfoldedConfig:{keep:"unfolded"}},PanoLink:{unfoldedConfig:{keep:"unfolded"}},MediaPlane:{unfoldedConfig:{keep:"unfolded"},initialData:{autoplayConfig:{autoplayCarousel:!0,autoplayVideo:!1,autoplayVideoInCarousel:!1}}},"Model-Any":{unfoldedConfig:{keep:"unfolded"},visibleConfig:{visibleFiveMode:"all"}},Marketing:{popoverConfig:{enabled:!1}},Audio:{popoverConfig:{toolbar:{showMore:!1}}}}},O4=navigator.userAgent.toLowerCase().indexOf("iphone")!==-1;navigator.userAgent.toLowerCase().indexOf("android");const Ja=navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1,j4=O4&&Ja;function R4(n){if(n.length!==4)return!1;const[t,e,i,s]=n,o=t.distanceTo(e),r=e.distanceTo(i),a=i.distanceTo(s),l=s.distanceTo(t),c=t.distanceTo(i),h=e.distanceTo(s);return o===a&&r===l&&c===h}class Sc extends b.Mesh{constructor(e,i,s){if(e.length!==4)throw new Error("QuadrangleMesh: Invalid number of points, it's not a quadrangle");const[o,r,a,l]=e,c=Et(...e),h=[o.clone().sub(c),r.clone().sub(c),a.clone().sub(c),l.clone().sub(c)],u=new Do(h,s);super(u,i);f(this,"name","QuadrangleMesh");this.position.copy(c)}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}}class Do extends b.BufferGeometry{constructor(e,i){super();f(this,"name","QuadrangleGeometry");f(this,"points");this.points=e;const s=i!=null?i:R4(e)?64:1;if(e.length!==4){console.error("Invalid number of points, it's not a quadrangle");return}const[o,r,a,l]=e,[c,h,u,d]=[new b.Vector2(0,0),new b.Vector2(1,0),new b.Vector2(1,1),new b.Vector2(0,1)],p=[],m=[];p.push(...o.toArray()),m.push(...c.toArray());for(let v=1;v<s;v++)p.push(o.x+(r.x-o.x)*v/s,o.y+(r.y-o.y)*v/s,o.z+(r.z-o.z)*v/s),m.push(c.x+(h.x-c.x)*v/s,c.y+(h.y-c.y)*v/s);p.push(...r.toArray()),m.push(...h.toArray()),p.push(...a.toArray()),m.push(...u.toArray());for(let v=1;v<s;v++)p.push(a.x+(l.x-a.x)*v/s,a.y+(l.y-a.y)*v/s,a.z+(l.z-a.z)*v/s),m.push(u.x+(d.x-u.x)*v/s,u.y+(d.y-u.y)*v/s);p.push(...l.toArray()),m.push(...d.toArray());const g=[];for(let v=0;v<s;v++)g.push(v,v+1,s*2-v,v,s*2-v,s*2+1-v);this.setAttribute("position",new b.BufferAttribute(new Float32Array(p),3)),this.setAttribute("uv",new b.BufferAttribute(new Float32Array(m),2)),this.setIndex(new b.BufferAttribute(new Uint32Array(g),1))}}function _4(n,t){let e=!Ja;const i=t!=null?t:document.createElement("video");i.preload="metadata",i.crossOrigin="anonymous",i.muted=!0,i.loop=!0,i.playsInline=!0,i.autoplay=!0;const s=new b.VideoTexture(i);s.minFilter=b.LinearFilter,s.magFilter=b.LinearFilter,s.encoding=b.sRGBEncoding,s.metadataLoaded=!1,i.src=n;const o=()=>{s.metadataLoaded||(s.dispatchEvent({type:"videoLoaded"}),s.metadataLoaded=!0)};if(Ja||(i.onloadedmetadata=()=>{o()}),Ja){const r=()=>{if(!e){if(!i.paused){o();return}i.muted=!0,i.play().then(()=>{e=!0,i.pause(),i.currentTime=0,o()}).catch(()=>{console.warn("video auto play error")})}};document.addEventListener("click",r,{once:!0}),document.addEventListener("touchend",r,{once:!0})}return s}function tn(n,t,e){if(n==="fill")return t;if(n==="contain"){const[i,s,o,r]=t,a=i.distanceTo(s),l=o.distanceTo(r),c=i.distanceTo(r),h=s.distanceTo(o),u=a,d=c,p=u/d;if(p>e){const g=d*e,v=new b.Vector3().subVectors(s,i).multiplyScalar((a-g)/2/a),y=new b.Vector3().subVectors(o,r).multiplyScalar((l-g)/2/l);return[i.clone().add(v),s.clone().sub(v),o.clone().sub(y),r.clone().add(y)]}else if(p<e){const g=u/e,v=new b.Vector3().subVectors(r,i).multiplyScalar((c-g)/2/c),y=new b.Vector3().subVectors(o,s).multiplyScalar((h-g)/2/h);return[i.clone().add(v),s.clone().add(y),o.clone().sub(y),r.clone().sub(v)]}else return t}else return console.warn(`objectFit: ${n} is not supported yet`),t}class V4 extends b.ShaderMaterial{constructor(e){super();f(this,"transparent",!0);f(this,"depthWrite",!1);f(this,"blending",b.CustomBlending);f(this,"blendSrc",b.SrcAlphaFactor);f(this,"blendDst",b.OneMinusSrcAlphaFactor);f(this,"blendSrcAlpha",b.OneFactor);f(this,"blendDstAlpha",b.OneMinusSrcAlphaFactor);f(this,"vertexShader",`
|
|
932
932
|
varying vec2 vUv;
|
|
933
933
|
void main() {
|
|
934
934
|
vUv = uv;
|
|
@@ -961,7 +961,7 @@ void main() {
|
|
|
961
961
|
`?d:A).map(A=>({id:It(),content:A})))),R}function y(){if(!m)return;const L=!a;m.reversed!==L&&m.reverse(),m.play()}function w(L){if(l){e(5,l=!1);return}clearTimeout(p),p=setTimeout(y,L?s:o)}function C(L){const R=function(){const z=k4(O=>L[O].getBoundingClientRect().x,[Math.min(L.length-1,10),Math.min(L.length-1,30)]);if(z>0)return z}();m=ct({targets:L.slice(0,R).filter(Ge),autoplay:!1,duration:400,scale:[.7,1],rotate:[20,0],opacity:[0,1],translateX:[4,0],translateY:[10,0],delay:ct.stagger(50),easing:"easeInOutCubic"}),a&&m.seek(m.duration)}function E(L,R){qe[L?"unshift":"push"](()=>{g[R]=L,e(1,g)})}function D(L,R){qe[L?"unshift":"push"](()=>{g[R]=L,e(1,g)})}return n.$$set=L=>{"inDelay"in L&&e(6,s=L.inDelay),"outDelay"in L&&e(7,o=L.outDelay),"content"in L&&e(0,r=L.content),"unfolded"in L&&e(8,a=L.unfolded),"isFistUnfoldedUpdate"in L&&e(5,l=L.isFistUnfoldedUpdate)},n.$$.update=()=>{n.$$.dirty&1&&e(2,i=v(r)),n.$$.dirty&256&&w(a),n.$$.dirty&2&&C(g.filter(L=>!!L))},[r,g,i,u,d,l,s,o,a,E,D]}class oy extends Ee{constructor(t){super(),Ie(this,t,ok,sk,Me,{inDelay:6,outDelay:7,content:0,unfolded:8,isFistUnfoldedUpdate:5},ek)}}function rk(n){Le(n,"svelte-1ogmlqq",".arrow.svelte-1ogmlqq{width:100%;height:100%;background-size:100%;transition:transform 400ms ease-in-out;cursor:pointer;pointer-events:auto}.arrow-wrapper.svelte-1ogmlqq{position:relative;width:100%;height:100%}.arrow.left.svelte-1ogmlqq{transform:rotate(0deg)}.arrow.right.svelte-1ogmlqq{transform:rotate(-180deg)}.arrow.top.svelte-1ogmlqq{transform:rotate(90deg)}.arrow.bottom.svelte-1ogmlqq{transform:rotate(-90deg)}")}function ym(n){let t,e,i,s,o,r,a,l,c,h;return e=new Xi({props:{center:!0,blurRadius:9,spreadRadius:3}}),{c(){t=U("div"),ge(e.$$.fragment),i=ue(),s=U("div"),P(s,"class",o="arrow "+n[0]+" svelte-1ogmlqq"),_(s,"background-image","url("+gE+")"),P(t,"class","arrow-wrapper svelte-1ogmlqq")},m(u,d){Z(u,t,d),pe(e,t,null),B(t,i),B(t,s),l=!0,c||(h=_e(s,"click",n[5]),c=!0)},p(u,d){n=u,(!l||d&1&&o!==(o="arrow "+n[0]+" svelte-1ogmlqq"))&&P(s,"class",o)},i(u){l||(H(e.$$.fragment,u),u&&At(()=>{l&&(a&&a.end(1),r=vs(s,Ht,{duration:n[2],delay:n[3],easing:Go}),r.start())}),l=!0)},o(u){Y(e.$$.fragment,u),r&&r.invalidate(),u&&(a=qo(s,Ht,{duration:n[2],delay:n[4],easing:Go})),l=!1},d(u){u&&X(t),me(e),u&&a&&a.end(),c=!1,h()}}}function ak(n){let t,e,i=n[1]&&ym(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[1]?i?(i.p(s,o),o&2&&H(i,1)):(i=ym(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function lk(n,t,e){let{direction:i="right"}=t,{visible:s=!0}=t,{duration:o=0}=t,{inDelay:r=0}=t,{outDelay:a=0}=t;function l(c){_n.call(this,n,c)}return n.$$set=c=>{"direction"in c&&e(0,i=c.direction),"visible"in c&&e(1,s=c.visible),"duration"in c&&e(2,o=c.duration),"inDelay"in c&&e(3,r=c.inDelay),"outDelay"in c&&e(4,a=c.outDelay)},[i,s,o,r,a,l]}let ck=class extends Ee{constructor(t){super(),Ie(this,t,lk,ak,Me,{direction:0,visible:1,duration:2,inDelay:3,outDelay:4},rk)}};function hk(n,t,e=20,i=5){return new Promise((s,o)=>{let r=0;const a=setInterval(()=>{const l=n();t(l)?(clearInterval(a),s(l)):r>=i&&(clearInterval(a),o(l)),r++},e)})}function uk(n){Le(n,"svelte-1fuzm7v",".text.svelte-1fuzm7v{pointer-events:auto;box-sizing:border-box;display:inline-block;max-width:7.5rem;transition:transform 400ms ease-in-out;font-size:0.75rem;line-height:1.125rem;white-space:initial;cursor:pointer}.arrow.svelte-1fuzm7v{pointer-events:auto;display:inline-block;vertical-align:top;width:0.875rem;height:0.875rem;margin-left:0.125rem;margin-top:0.125rem}")}function bm(n){let t,e,i;return e=new oy({props:{unfolded:n[0],content:n[1],inDelay:500,outDelay:n[5]}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","text svelte-1fuzm7v"),_(t,"transform",n[7])},m(s,o){Z(s,t,o),pe(e,t,null),n[10](t),i=!0},p(s,o){const r={};o&1&&(r.unfolded=s[0]),o&2&&(r.content=s[1]),o&32&&(r.outDelay=s[5]),e.$set(r),o&128&&_(t,"transform",s[7])},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e),n[10](null)}}}function Am(n){let t,e,i;return e=new ck({props:{direction:n[6],visible:n[0],inDelay:600,duration:1e3}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","arrow svelte-1fuzm7v")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,o){const r={};o&64&&(r.direction=s[6]),o&1&&(r.visible=s[0]),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function dk(n){let t,e,i,s=n[1]&&bm(n),o=n[3]<n[4]&&Am(n);return{c(){s&&s.c(),t=ue(),o&&o.c(),e=Be()},m(r,a){s&&s.m(r,a),Z(r,t,a),o&&o.m(r,a),Z(r,e,a),i=!0},p(r,[a]){r[1]?s?(s.p(r,a),a&2&&H(s,1)):(s=bm(r),s.c(),H(s,1),s.m(t.parentNode,t)):s&&(xe(),Y(s,1,1,()=>{s=null}),Se()),r[3]<r[4]?o?(o.p(r,a),a&24&&H(o,1)):(o=Am(r),o.c(),H(o,1),o.m(e.parentNode,e)):o&&(xe(),Y(o,1,1,()=>{o=null}),Se())},i(r){i||(H(s),H(o),i=!0)},o(r){Y(s),Y(o),i=!1},d(r){s&&s.d(r),r&&X(t),o&&o.d(r),r&&X(e)}}}function fk(n,t,e){let i,s,o,{visible:r=!1}=t,{textUnfolded:a=!1}=t,{content:l}=t,c,h=0,u=0,d=0;function p(m){qe[m?"unshift":"push"](()=>{c=m,e(2,c)})}return n.$$set=m=>{"visible"in m&&e(0,r=m.visible),"textUnfolded"in m&&e(8,a=m.textUnfolded),"content"in m&&e(1,l=m.content)},n.$$.update=()=>{if(n.$$.dirty&7&&c&&r&&l){const{lineHeight:m}=getComputedStyle(c);e(4,d=c.offsetHeight),hk(()=>c==null?void 0:c.offsetHeight,Boolean).then(()=>{e(4,d=c.offsetHeight)}),e(3,u=Number(m.replace("px","")))}n.$$.dirty&280&&e(9,h=a?u-d:0),n.$$.dirty&512&&e(7,i=`translateY(${h}px)`),n.$$.dirty&256&&e(6,s=a?"left":"right"),n.$$.dirty&256&&e(5,o=a?450:0)},[r,l,c,u,d,o,s,i,a,h,p]}class ry extends Ee{constructor(t){super(),Ie(this,t,fk,dk,Me,{visible:0,textUnfolded:8,content:1},uk)}}function pk(n){Le(n,"svelte-5hip41",".content.svelte-5hip41{--height:62.4375rem;width:-moz-max-content;width:max-content;height:var(--height);padding:calc(var(--height) - 1.125rem) 0.25rem 0 1rem;position:absolute;left:0;bottom:0;overflow:hidden;box-sizing:border-box;font-size:0;pointer-events:none;white-space:nowrap;font-weight:600}")}function wm(n){var h,u;let t,e,i,s,o,r,a,l,c;return t=new Xi({props:{visible:n[2],left:n[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),i=new Zu({props:{unfolded:n[2],length:n[3],outDelay:n[4]+40*Math.min((u=(h=n[6][0])==null?void 0:h.content.length)!=null?u:10,15),useLinearColor:!0}}),r=new ry({props:{visible:n[2],textUnfolded:n[1],content:n[5]}}),{c(){ge(t.$$.fragment),e=ue(),ge(i.$$.fragment),s=ue(),o=U("div"),ge(r.$$.fragment),P(o,"class","content svelte-5hip41")},m(d,p){pe(t,d,p),Z(d,e,p),pe(i,d,p),Z(d,s,p),Z(d,o,p),pe(r,o,null),a=!0,l||(c=[oi(_i.call(null,o)),_e(o,"clientWidth",n[10]),_e(o,"click",n[7])],l=!0)},p(d,p){var y,w;const m={};p&4&&(m.visible=d[2]),p&8&&(m.left=d[3]/2+"px"),t.$set(m);const g={};p&4&&(g.unfolded=d[2]),p&8&&(g.length=d[3]),p&16&&(g.outDelay=d[4]+40*Math.min((w=(y=d[6][0])==null?void 0:y.content.length)!=null?w:10,15)),i.$set(g);const v={};p&4&&(v.visible=d[2]),p&2&&(v.textUnfolded=d[1]),p&32&&(v.content=d[5]),r.$set(v)},i(d){a||(H(t.$$.fragment,d),H(i.$$.fragment,d),H(r.$$.fragment,d),a=!0)},o(d){Y(t.$$.fragment,d),Y(i.$$.fragment,d),Y(r.$$.fragment,d),a=!1},d(d){me(t,d),d&&X(e),me(i,d),d&&X(s),d&&X(o),me(r),l=!1,dt(c)}}}function mk(n){let t,e,i=n[0].state&&wm(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[0].state?i?(i.p(s,o),o&1&&H(i,1)):(i=wm(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function gk(n,t,e){let i,s,o,r,a,{tag:l}=t,c,h=!1,u=[];function d(){e(1,h=!h)}const p=m=>{e(3,c=m.detail)};return n.$$set=m=>{"tag"in m&&e(0,l=m.tag)},n.$$.update=()=>{var m,g,v,y;n.$$.dirty&1&&e(2,i=!!((m=l.state)!=null&&m.unfolded)),n.$$.dirty&1&&e(9,s=(v=(g=l.data.title)!=null?g:l.data.text)!=null?v:""),n.$$.dirty&1&&e(8,o=(y=l.data.description)!=null?y:""),n.$$.dirty&768&&e(5,r=(()=>{if(s&&o)return s+`
|
|
962
962
|
`+o;if(s)return s;if(o)return o})()),n.$$.dirty&4&&(i||setTimeout(()=>{e(1,h=!1)},20)),n.$$.dirty&2&&e(4,a=h?450:0)},[l,h,i,c,a,r,u,d,o,s,p]}class vk extends Ee{constructor(t){super(),Ie(this,t,gk,mk,Me,{tag:0},pk)}}function gi(n){return typeof n=="number"?n/16+"rem":n}function yk(n){Le(n,"svelte-1j0cz4o",'.text.svelte-1j0cz4o{display:-webkit-box;display:-ms-box;display:-moz-box;position:relative;width:-moz-max-content;width:max-content;max-width:100%;-webkit-box-orient:vertical;-ms-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}@keyframes svelte-1j0cz4o-blink{0%{opacity:1}50%{opacity:0}100%{opacity:1}}.caret.svelte-1j0cz4o{position:absolute;width:0.0625rem;height:100%;background-color:#fff;animation:svelte-1j0cz4o-blink 1.2s infinite}.placeholder.svelte-1j0cz4o{opacity:0.5}.placeholder.svelte-1j0cz4o:empty::after{content:" "}')}function bk(n){let t;const e=n[6].default,i=hs(e,n,n[5],null);return{c(){i&&i.c()},m(s,o){i&&i.m(s,o),t=!0},p(s,o){i&&i.p&&(!t||o&32)&&ds(i,e,s,s[5],t?us(e,s[5],o,null):fs(s[5]),null)},i(s){t||(H(i,s),t=!0)},o(s){Y(i,s),t=!1},d(s){i&&i.d(s)}}}function Ak(n){var o,r;let t,e,i=((o=n[3])==null?void 0:o.inputting)&&Pm(),s=typeof((r=n[3])==null?void 0:r.placeholder)=="string"&&Cm(n);return{c(){i&&i.c(),t=ue(),s&&s.c(),e=Be()},m(a,l){i&&i.m(a,l),Z(a,t,l),s&&s.m(a,l),Z(a,e,l)},p(a,l){var c,h;(c=a[3])!=null&&c.inputting?i||(i=Pm(),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null),typeof((h=a[3])==null?void 0:h.placeholder)=="string"?s?s.p(a,l):(s=Cm(a),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null)},i:ce,o:ce,d(a){i&&i.d(a),a&&X(t),s&&s.d(a),a&&X(e)}}}function wk(n){let t;return{c(){t=Fe(n[2])},m(e,i){Z(e,t,i)},p(e,i){i&4&&Ne(t,e[2])},i:ce,o:ce,d(e){e&&X(t)}}}function Pm(n){let t;return{c(){t=U("div"),P(t,"class","caret svelte-1j0cz4o")},m(e,i){Z(e,t,i)},d(e){e&&X(t)}}}function Cm(n){let t,e=n[3].placeholder+"",i;return{c(){t=U("span"),i=Fe(e),P(t,"class","placeholder svelte-1j0cz4o")},m(s,o){Z(s,t,o),B(t,i)},p(s,o){o&8&&e!==(e=s[3].placeholder+"")&&Ne(i,e)},d(s){s&&X(t)}}}function Pk(n){let t,e,i,s;const o=[wk,Ak,bk],r=[];function a(l,c){return l[2]?0:l[4]?1:2}return e=a(n),i=r[e]=o[e](n),{c(){t=U("div"),i.c(),P(t,"class","text svelte-1j0cz4o"),_(t,"max-width",typeof n[1]=="number"?gi(n[1]):n[1]),_(t,"-webkit-line-clamp",n[0])},m(l,c){Z(l,t,c),r[e].m(t,null),s=!0},p(l,[c]){let h=e;e=a(l),e===h?r[e].p(l,c):(xe(),Y(r[h],1,1,()=>{r[h]=null}),Se(),i=r[e],i?i.p(l,c):(i=r[e]=o[e](l),i.c()),H(i,1),i.m(t,null)),c&2&&_(t,"max-width",typeof l[1]=="number"?gi(l[1]):l[1]),c&1&&_(t,"-webkit-line-clamp",l[0])},i(l){s||(H(i),s=!0)},o(l){Y(i),s=!1},d(l){l&&X(t),r[e].d()}}}function Ck(n,t,e){let i,{$$slots:s={},$$scope:o}=t,{maxLine:r=null}=t,{maxWidth:a=null}=t,{text:l=null}=t,{edit:c=null}=t;return n.$$set=h=>{"maxLine"in h&&e(0,r=h.maxLine),"maxWidth"in h&&e(1,a=h.maxWidth),"text"in h&&e(2,l=h.text),"edit"in h&&e(3,c=h.edit),"$$scope"in h&&e(5,o=h.$$scope)},n.$$.update=()=>{n.$$.dirty&8&&e(4,i=typeof(c==null?void 0:c.placeholder)=="string"||(c==null?void 0:c.inputting))},[r,a,l,c,i,o,s]}class qu extends Ee{constructor(t){super(),Ie(this,t,Ck,Pk,Me,{maxLine:0,maxWidth:1,text:2,edit:3},yk)}}function Mk(n){Le(n,"svelte-1oxrkr1",".plane__container.svelte-1oxrkr1.svelte-1oxrkr1{position:absolute;left:50%;transform:translate(-50%, -100%);width:-moz-max-content;width:max-content}.plane__wrapper.svelte-1oxrkr1.svelte-1oxrkr1{transition:transform 500ms linear, opacity 200ms linear;padding:0.625rem;background-color:rgba(0, 0, 0, 0.5);border:0.03125rem solid rgba(255, 255, 255, 0.3);border-radius:0.25rem}.unfolded.svelte-1oxrkr1 .plane__wrapper.svelte-1oxrkr1{transition-delay:200ms, 500ms;opacity:1}.folded.svelte-1oxrkr1 .plane__wrapper.svelte-1oxrkr1{opacity:0}.plane.svelte-1oxrkr1.svelte-1oxrkr1{max-width:11.75rem}.title.svelte-1oxrkr1.svelte-1oxrkr1{white-space:pre-wrap;font-weight:bold;font-size:0.75rem;line-height:1.125rem}.description.svelte-1oxrkr1.svelte-1oxrkr1{margin-top:0.25rem;white-space:pre-wrap;font-size:0.6875rem;line-height:1rem}")}function Mm(n){var u,d;let t,e,i,s,o,r,a,l,c;t=new Zu({props:{unfolded:n[1],direction:"vertical",length:15,duration:500,inDelay:200,useLinearColor:!0}}),a=new qu({props:{text:n[4],edit:(u=n[0].data.edit)==null?void 0:u.title,maxLine:n[2]}});let h=(n[0].data.description||((d=n[0].data.edit)==null?void 0:d.description))&&Im(n);return{c(){ge(t.$$.fragment),e=ue(),i=U("div"),s=U("div"),o=U("div"),r=U("div"),ge(a.$$.fragment),l=ue(),h&&h.c(),P(r,"class","title svelte-1oxrkr1"),P(o,"class","plane svelte-1oxrkr1"),P(s,"class","plane__wrapper svelte-1oxrkr1"),_(s,"transform",n[1]?"translateY(-15px)":"translateY(0)"),P(i,"class","plane__container svelte-1oxrkr1"),Pe(i,"unfolded",n[1]),Pe(i,"folded",n[5])},m(p,m){pe(t,p,m),Z(p,e,m),Z(p,i,m),B(i,s),B(s,o),B(o,r),pe(a,r,null),B(o,l),h&&h.m(o,null),c=!0},p(p,m){var y,w;const g={};m&2&&(g.unfolded=p[1]),t.$set(g);const v={};m&16&&(v.text=p[4]),m&1&&(v.edit=(y=p[0].data.edit)==null?void 0:y.title),m&4&&(v.maxLine=p[2]),a.$set(v),p[0].data.description||(w=p[0].data.edit)!=null&&w.description?h?(h.p(p,m),m&1&&H(h,1)):(h=Im(p),h.c(),H(h,1),h.m(o,null)):h&&(xe(),Y(h,1,1,()=>{h=null}),Se()),m&2&&_(s,"transform",p[1]?"translateY(-15px)":"translateY(0)"),(!c||m&2)&&Pe(i,"unfolded",p[1]),(!c||m&32)&&Pe(i,"folded",p[5])},i(p){c||(H(t.$$.fragment,p),H(a.$$.fragment,p),H(h),c=!0)},o(p){Y(t.$$.fragment,p),Y(a.$$.fragment,p),Y(h),c=!1},d(p){me(t,p),p&&X(e),p&&X(i),me(a),h&&h.d()}}}function Im(n){var s;let t,e,i;return e=new qu({props:{text:n[0].data.description,edit:(s=n[0].data.edit)==null?void 0:s.description,maxLine:n[3]}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","description svelte-1oxrkr1")},m(o,r){Z(o,t,r),pe(e,t,null),i=!0},p(o,r){var l;const a={};r&1&&(a.text=o[0].data.description),r&1&&(a.edit=(l=o[0].data.edit)==null?void 0:l.description),r&8&&(a.maxLine=o[3]),e.$set(a)},i(o){i||(H(e.$$.fragment,o),i=!0)},o(o){Y(e.$$.fragment,o),i=!1},d(o){o&&X(t),me(e)}}}function Ik(n){let t,e,i=n[0].state&&Mm(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[0].state?i?(i.p(s,o),o&1&&H(i,1)):(i=Mm(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function Ek(n,t,e){let i,s,o,r,a,{tag:l}=t;return n.$$set=c=>{"tag"in c&&e(0,l=c.tag)},n.$$.update=()=>{var c,h,u,d,p;n.$$.dirty&1&&e(1,i=!!((c=l.state)!=null&&c.unfolded)),n.$$.dirty&2&&e(5,s=!i),n.$$.dirty&1&&e(4,o=(u=(h=l.data.title)!=null?h:l.data.text)!=null?u:""),n.$$.dirty&1&&e(3,r=(d=l.data.descriptionMaxRows)!=null?d:null),n.$$.dirty&1&&e(2,a=(p=l.data.titleMaxRows)!=null?p:null)},[l,i,a,r,o,s]}class kk extends Ee{constructor(t){super(),Ie(this,t,Ek,Ik,Me,{tag:0},Mk)}}function xk(n){let t,e;return t=new kk({props:{tag:n[0]}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=i[0]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function Sk(n){let t,e;return t=new vk({props:{tag:n[0]}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=i[0]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function Tk(n){let t,e,i,s;const o=[Sk,xk],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(n))&&(e=r[t]=o[t](n)),{c(){e&&e.c(),i=Be()},m(l,c){~t&&r[t].m(l,c),Z(l,i,c),s=!0},p(l,[c]){let h=t;t=a(l),t===h?~t&&r[t].p(l,c):(e&&(xe(),Y(r[h],1,1,()=>{r[h]=null}),Se()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=o[t](l),e.c()),H(e,1),e.m(i.parentNode,i)):e=null)},i(l){s||(H(e),s=!0)},o(l){Y(e),s=!1},d(l){~t&&r[t].d(l),l&&X(i)}}}function Dk(n,t,e){let i,{tag:s}=t;return n.$$set=o=>{"tag"in o&&e(0,s=o.tag)},n.$$.update=()=>{var o;n.$$.dirty&1&&e(1,i=(o=s.data.appearance)!=null?o:"line")},[s,i]}class Lk extends Ee{constructor(t){super(),Ie(this,t,Dk,Tk,Me,{tag:0})}}function zk(n){Le(n,"svelte-blgtit",".line.svelte-blgtit{width:100%;height:100%;overflow:visible;pointer-events:none}")}function Em(n){let t,e,i,s;return{c(){t=Te("path"),P(t,"fill","none"),P(t,"stroke","url(#"+n[4]+")"),P(t,"stroke-width","1"),P(t,"d","M0 21 L14 0.5 L105 0.5")},m(o,r){Z(o,t,r),s=!0},p(o,r){n=o},i(o){s||(o&&At(()=>{s&&(i&&i.end(1),e=vs(t,ml,{duration:n[1],delay:n[0],easing:Ur}),e.start())}),s=!0)},o(o){e&&e.invalidate(),o&&(i=qo(t,ml,{duration:n[1],delay:n[2],easing:Go})),s=!1},d(o){o&&X(t),o&&i&&i.end()}}}function Ok(n){let t,e,i,s,o,r=n[3]&&Em(n);return{c(){t=Te("svg"),e=Te("defs"),i=Te("linearGradient"),s=Te("stop"),o=Te("stop"),r&&r.c(),P(s,"offset","25%"),P(s,"stop-color","white"),P(s,"stop-opacity","1"),P(o,"offset","100%"),P(o,"stop-color","white"),P(o,"stop-opacity","0.5"),P(i,"id",n[4]),P(i,"gradientUnits","userSpaceOnUse"),P(t,"class","line svelte-blgtit"),P(t,"viewBox","0 0 105 21")},m(a,l){Z(a,t,l),B(t,e),B(e,i),B(i,s),B(i,o),r&&r.m(t,null)},p(a,[l]){a[3]?r?(r.p(a,l),l&8&&H(r,1)):(r=Em(a),r.c(),H(r,1),r.m(t,null)):r&&(xe(),Y(r,1,1,()=>{r=null}),Se())},i(a){H(r)},o(a){Y(r)},d(a){a&&X(t),r&&r.d()}}}function jk(n,t,e){let{inDelay:i=0}=t,{duration:s=1e3}=t,{outDelay:o=0}=t,{unfolded:r}=t;const a=It();return n.$$set=l=>{"inDelay"in l&&e(0,i=l.inDelay),"duration"in l&&e(1,s=l.duration),"outDelay"in l&&e(2,o=l.outDelay),"unfolded"in l&&e(3,r=l.unfolded)},[i,s,o,r,a]}let Rk=class extends Ee{constructor(t){super(),Ie(this,t,jk,Ok,Me,{inDelay:0,duration:1,outDelay:2,unfolded:3},zk)}};function _k(n){Le(n,"svelte-1mgyhhn",`:root{--sc-dot-size:6px;--sc-active-dot-size:8px;--sc-dot-size-animation-time:250ms}.sc-carousel-dot__dot.svelte-1mgyhhn{background-color:var(--sc-color-rgb-light);border-radius:50%;display:inline-block;opacity:0.5;transition:opacity 100ms ease,\r
|
|
963
963
|
height var(--sc-dot-size-animation-time) ease,\r
|
|
964
|
-
width var(--sc-dot-size-animation-time) ease;cursor:pointer;-webkit-tap-highlight-color:transparent;height:var(--sc-dot-size);width:var(--sc-dot-size)}.sc-carousel-dot__dot.svelte-1mgyhhn:hover{opacity:0.9}.sc-carousel-dot__dot_active.svelte-1mgyhhn{opacity:0.7;height:var(--sc-active-dot-size);width:var(--sc-active-dot-size)}`)}function Vk(n){let t,e,i;return{c(){t=U("button"),P(t,"class","sc-carousel-button sc-carousel-dot__dot svelte-1mgyhhn"),Pe(t,"sc-carousel-dot__dot_active",n[0])},m(s,o){Z(s,t,o),e||(i=_e(t,"click",n[1]),e=!0)},p(s,[o]){o&1&&Pe(t,"sc-carousel-dot__dot_active",s[0])},i:ce,o:ce,d(s){s&&X(t),e=!1,i()}}}function Fk(n,t,e){let{active:i=!1}=t;function s(o){_n.call(this,n,o)}return n.$$set=o=>{"active"in o&&e(0,i=o.active)},[i,s]}class Bk extends Ee{constructor(t){super(),Ie(this,t,Fk,Vk,Me,{active:0},_k)}}function Hk(n){Le(n,"svelte-670fde",".sc-carousel-dots__container.svelte-670fde{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;padding:0 30px}.sc-carousel-dots__dot-container.svelte-670fde{height:calc(var(--sc-dot-size) + 14px);width:calc(var(--sc-dot-size) + 10px);display:flex;align-items:center;justify-content:center}")}function km(n,t,e){const i=n.slice();return i[5]=t[e],i[7]=e,i}function xm(n,t){let e,i,s,o;function r(){return t[3](t[7])}return i=new Bk({props:{active:t[1]===t[7]}}),i.$on("click",r),{key:n,first:null,c(){e=U("div"),ge(i.$$.fragment),s=ue(),P(e,"class","sc-carousel-dots__dot-container svelte-670fde"),this.first=e},m(a,l){Z(a,e,l),pe(i,e,null),B(e,s),o=!0},p(a,l){t=a;const c={};l&3&&(c.active=t[1]===t[7]),i.$set(c)},i(a){o||(H(i.$$.fragment,a),o=!0)},o(a){Y(i.$$.fragment,a),o=!1},d(a){a&&X(e),me(i)}}}function Nk(n){let t,e=[],i=new Map,s,o=Array(n[0]);const r=a=>a[7];for(let a=0;a<o.length;a+=1){let l=km(n,o,a),c=r(l);i.set(c,e[a]=xm(c,l))}return{c(){t=U("div");for(let a=0;a<e.length;a+=1)e[a].c();P(t,"class","sc-carousel-dots__container svelte-670fde")},m(a,l){Z(a,t,l);for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(t,null);s=!0},p(a,[l]){l&7&&(o=Array(a[0]),xe(),e=ai(e,l,r,1,a,o,i,t,fn,xm,null,km),Se())},i(a){if(!s){for(let l=0;l<o.length;l+=1)H(e[l]);s=!0}},o(a){for(let l=0;l<e.length;l+=1)Y(e[l]);s=!1},d(a){a&&X(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function Gk(n,t,e){const i=Vn();let{pagesCount:s=1}=t,{currentPageIndex:o=0}=t;function r(l){i("pageChange",l)}const a=l=>r(l);return n.$$set=l=>{"pagesCount"in l&&e(0,s=l.pagesCount),"currentPageIndex"in l&&e(1,o=l.currentPageIndex)},[s,o,r,a]}class Wk extends Ee{constructor(t){super(),Ie(this,t,Gk,Nk,Me,{pagesCount:0,currentPageIndex:1},Hk)}}const Yo="prev",ps="next";function Uk(n){Le(n,"svelte-1bftafx",":root{--sc-arrow-size:2px}.sc-carousel-arrow__circle.svelte-1bftafx{width:20px;height:20px;border-radius:50%;background-color:var(--sc-color-rgb-light-50p);display:flex;align-items:center;justify-content:center;transition:opacity 100ms ease;cursor:pointer;-webkit-tap-highlight-color:transparent}.sc-carousel-arrow__circle.svelte-1bftafx:hover{opacity:0.9}.sc-carousel-arrow__arrow.svelte-1bftafx{border:solid var(--sc-color-hex-dark);border-width:0 var(--sc-arrow-size) var(--sc-arrow-size) 0;padding:var(--sc-arrow-size);position:relative}.sc-carousel-arrow__arrow-next.svelte-1bftafx{transform:rotate(-45deg);left:calc(var(--sc-arrow-size) / -2)}.sc-carousel-arrow__arrow-prev.svelte-1bftafx{transform:rotate(135deg);right:calc(var(--sc-arrow-size) / -2)}.sc-carousel-arrow__circle_disabled.svelte-1bftafx,.sc-carousel-arrow__circle_disabled.svelte-1bftafx:hover{opacity:0.5}")}function Qk(n){let t,e,i,s;return{c(){t=U("button"),e=U("i"),P(e,"class","sc-carousel-arrow__arrow svelte-1bftafx"),Pe(e,"sc-carousel-arrow__arrow-next",n[0]===ps),Pe(e,"sc-carousel-arrow__arrow-prev",n[0]===Yo),P(t,"class","sc-carousel-button sc-carousel-arrow__circle svelte-1bftafx"),Pe(t,"sc-carousel-arrow__circle_disabled",n[1])},m(o,r){Z(o,t,r),B(t,e),i||(s=_e(t,"click",n[2]),i=!0)},p(o,[r]){r&1&&Pe(e,"sc-carousel-arrow__arrow-next",o[0]===ps),r&1&&Pe(e,"sc-carousel-arrow__arrow-prev",o[0]===Yo),r&2&&Pe(t,"sc-carousel-arrow__circle_disabled",o[1])},i:ce,o:ce,d(o){o&&X(t),i=!1,s()}}}function Xk(n,t,e){let{direction:i=ps}=t,{disabled:s=!1}=t;function o(r){_n.call(this,n,r)}return n.$$set=r=>{"direction"in r&&e(0,i=r.direction),"disabled"in r&&e(1,s=r.disabled)},[i,s,o]}class ay extends Ee{constructor(t){super(),Ie(this,t,Xk,Qk,Me,{direction:0,disabled:1},Uk)}}function Yk(n){Le(n,"svelte-i7yfid",".sc-carousel-progress__indicator.svelte-i7yfid{height:100%;background-color:var(--sc-color-hex-dark-50p)}")}function Zk(n){let t;return{c(){t=U("div"),P(t,"class","sc-carousel-progress__indicator svelte-i7yfid"),_(t,"width",n[0]+"%")},m(e,i){Z(e,t,i)},p(e,[i]){i&1&&_(t,"width",e[0]+"%")},i:ce,o:ce,d(e){e&&X(t)}}}const Sm=100;function qk(n,t,e){let i,{value:s=0}=t;return n.$$set=o=>{"value"in o&&e(1,s=o.value)},n.$$.update=()=>{n.$$.dirty&2&&e(0,i=Math.min(Math.max(s*Sm,0),Sm))},[i,s]}class Jk extends Ee{constructor(t){super(),Ie(this,t,qk,Zk,Me,{value:1},Yk)}}function Kk(n,t){n.addEventListener("mousedown",t),n.addEventListener("touchstart",t,{passive:!0})}function $k(n,t){n.removeEventListener("mousedown",t),n.removeEventListener("touchstart",t)}function e8(n,t){n.addEventListener("mouseup",t),n.addEventListener("touchend",t)}function Tm(n,t){n.removeEventListener("mouseup",t),n.removeEventListener("touchend",t)}function t8(n,t){n.addEventListener("mousemove",t),n.addEventListener("touchmove",t)}function Dm(n,t){n.removeEventListener("mousemove",t),n.removeEventListener("touchmove",t)}function Ju(n){return function(t,e){n.dispatchEvent(new CustomEvent(t,{detail:e}))}}const i8=110,n8=9,s8=111,o8=20;function Lc(n){if("TouchEvent"in window&&n instanceof TouchEvent){const t=n.touches[0];return{x:t?t.clientX:0,y:t?t.clientY:0}}return{x:n.clientX,y:n.clientY}}function r8(n,{thresholdProvider:t}){const e=Ju(n);let i,s,o=0,r,a=!1;function l(){return Date.now()-r>=s8&&Math.abs(o)>=o8}function c(d){r=Date.now(),o=0,a=!0;const p=Lc(d);i=p.x,s=p.y,e("swipeStart",{x:i,y:s}),t8(window,h),e8(window,u)}function h(d){if(!a)return;const p=Lc(d),m=p.x-i,g=p.y-s;i=p.x,s=p.y,e("swipeMove",{x:i,y:s,dx:m,dy:g}),m!==0&&Math.sign(m)!==Math.sign(o)&&(o=0),o+=m,Math.abs(o)>t()&&(e("swipeThresholdReached",{direction:o>0?Yo:ps}),Tm(window,u),Dm(window,h))}function u(d){if(Tm(window,u),Dm(window,h),a=!1,!l()){e("swipeFailed");return}const p=Lc(d);e("swipeEnd",{x:p.x,y:p.y})}return Kk(n,c),{destroy(){$k(n,c)}}}function a8(n,t){n.addEventListener("mouseenter",t)}function l8(n,t){n.removeEventListener("mouseenter",t)}function c8(n,t){n.addEventListener("mouseleave",t)}function Lm(n,t){n.removeEventListener("mouseleave",t)}function h8(n){const t=Ju(n);function e(){c8(n,i),t("hovered",{value:!0})}function i(){t("hovered",{value:!1}),Lm(n,i)}return a8(n,e),{destroy(){l8(n,e),Lm(n,i)}}}const u8=(n,t)=>{const e=t.x-n.x,i=t.y-n.y;return Math.sqrt(e*e+i*i)};function Lo(n,t,e){return Math.max(n,Math.min(t,e))}function d8(n,t){n.addEventListener("touchstart",t,{passive:!0})}function f8(n,t){n.removeEventListener("touchstart",t)}function p8(n,t){n.addEventListener("touchend",t)}function zm(n,t){n.removeEventListener("touchend",t)}function m8(n){const t=Ju(n);let e=0,i={x:0,y:0};function s({tapEndedAt:a,tapEndedPos:l}){const c=a-e,h=u8(i,l);return c<=i8&&h<=n8}function o(a){e=Date.now();const l=a.touches[0];i={x:l.clientX,y:l.clientY},p8(n,r)}function r(a){zm(n,r);const l=a.changedTouches[0];s({tapEndedAt:Date.now(),tapEndedPos:{x:l.clientX,y:l.clientY}})&&t("tapped")}return d8(n,o),{destroy(){f8(n,o),zm(n,r)}}}function g8({currentParticleIndex:n,particlesCount:t,clonesCountHead:e,clonesCountTotal:i,particlesToScroll:s}){return n===t-e?0:n===0?ly({particlesCountWithoutClones:t-i,particlesToScroll:s})-1:Math.floor((n-e)/s)}function v8({currentParticleIndex:n,particlesToScroll:t}){return Math.ceil(n/t)}function y8({currentParticleIndex:n,particlesCount:t,clonesCountHead:e,clonesCountTotal:i,infinite:s,particlesToScroll:o}){return s?g8({currentParticleIndex:n,particlesCount:t,clonesCountHead:e,clonesCountTotal:i,particlesToScroll:o}):v8({currentParticleIndex:n,particlesToScroll:o})}function ly({particlesCountWithoutClones:n,particlesToScroll:t}){return Math.ceil(n/t)}function b8({particlesCountWithoutClones:n,particlesToScroll:t,particlesToShow:e}){const i=cy({particlesCountWithoutClones:n,particlesToScroll:t,particlesToShow:e});return Math.ceil(n/t)-i}function A8({infinite:n,particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:i}){return n?ly({particlesCountWithoutClones:t,particlesToScroll:e}):b8({particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:i})}function w8({pageIndex:n,clonesCountHead:t,clonesCountTail:e,particlesToScroll:i,particlesCount:s}){return Lo(0,Math.min(t+n*i,s-e),s-1)}function P8({pageIndex:n,particlesToScroll:t,particlesCount:e,particlesToShow:i}){return Lo(0,Math.min(n*t,e-i),e-1)}function zc({infinite:n,pageIndex:t,clonesCountHead:e,clonesCountTail:i,particlesToScroll:s,particlesCount:o,particlesToShow:r}){return n?w8({pageIndex:t,clonesCountHead:e,clonesCountTail:i,particlesToScroll:s,particlesCount:o}):P8({pageIndex:t,particlesToScroll:s,particlesCount:o,particlesToShow:r})}function C8({particlesContainerChildren:n,particleWidth:t}){for(let e=0;e<n.length;e++)n[e].style.minWidth=`${t}px`,n[e].style.maxWidth=`${t}px`}function cy({particlesToScroll:n,particlesToShow:t,particlesCountWithoutClones:e}){const i=n-t;let s=t;for(;;){const o=e-s-i;if(o<t)return Math.max(o,0);s+=t+i}}function M8(n){return new ResizeObserver(t=>{n({width:t[0].contentRect.width})})}function I8({clonesCountHead:n,clonesCountTail:t,particlesContainerChildren:e}){const i=[];for(let r=0;r<t;r++)i.push(e[r].cloneNode(!0));const s=[],o=e.length;for(let r=o-1;r>o-1-n;r--)s.push(e[r].cloneNode(!0));return{clonesToAppend:i,clonesToPrepend:s}}function E8({particlesContainer:n,clonesToAppend:t,clonesToPrepend:e}){for(let i=0;i<t.length;i++)n.append(t[i]);for(let i=0;i<e.length;i++)n.prepend(e[i])}function k8({infinite:n,particlesToShow:t,partialPageSize:e}){const i=n?{head:Math.ceil(e||t),tail:Math.ceil(t)}:{head:0,tail:0};return de(V({},i),{total:i.head+i.tail})}const Or=(n,t,e)=>{if(n&&n.hasOwnProperty(t))return n[t];if(e===void 0)throw new Error(`Required arg "${t}" was not provided`);return e},Ih=n=>t=>{n[t]&&n[t]()};var x8="Expected a function",hy="__lodash_hash_undefined__",uy=1/0,S8="[object Function]",T8="[object GeneratorFunction]",D8="[object Symbol]",L8=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,z8=/^\w*$/,O8=/^\./,j8=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,R8=/[\\^$.*+?()[\]{}|]/g,_8=/\\(\\)?/g,V8=/^\[object .+?Constructor\]$/,F8=typeof ji=="object"&&ji&&ji.Object===Object&&ji,B8=typeof self=="object"&&self&&self.Object===Object&&self,Ku=F8||B8||Function("return this")();function H8(n,t){return n==null?void 0:n[t]}function N8(n){var t=!1;if(n!=null&&typeof n.toString!="function")try{t=!!(n+"")}catch(e){}return t}var G8=Array.prototype,W8=Function.prototype,dy=Object.prototype,Oc=Ku["__core-js_shared__"],Om=function(){var n=/[^.]+$/.exec(Oc&&Oc.keys&&Oc.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),fy=W8.toString,$u=dy.hasOwnProperty,py=dy.toString,U8=RegExp("^"+fy.call($u).replace(R8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),jm=Ku.Symbol,Q8=G8.splice,X8=my(Ku,"Map"),Kr=my(Object,"create"),Rm=jm?jm.prototype:void 0,_m=Rm?Rm.toString:void 0;function Js(n){var t=-1,e=n?n.length:0;for(this.clear();++t<e;){var i=n[t];this.set(i[0],i[1])}}function Y8(){this.__data__=Kr?Kr(null):{}}function Z8(n){return this.has(n)&&delete this.__data__[n]}function q8(n){var t=this.__data__;if(Kr){var e=t[n];return e===hy?void 0:e}return $u.call(t,n)?t[n]:void 0}function J8(n){var t=this.__data__;return Kr?t[n]!==void 0:$u.call(t,n)}function K8(n,t){var e=this.__data__;return e[n]=Kr&&t===void 0?hy:t,this}Js.prototype.clear=Y8;Js.prototype.delete=Z8;Js.prototype.get=q8;Js.prototype.has=J8;Js.prototype.set=K8;function tr(n){var t=-1,e=n?n.length:0;for(this.clear();++t<e;){var i=n[t];this.set(i[0],i[1])}}function $8(){this.__data__=[]}function ex(n){var t=this.__data__,e=ql(t,n);if(e<0)return!1;var i=t.length-1;return e==i?t.pop():Q8.call(t,e,1),!0}function tx(n){var t=this.__data__,e=ql(t,n);return e<0?void 0:t[e][1]}function ix(n){return ql(this.__data__,n)>-1}function nx(n,t){var e=this.__data__,i=ql(e,n);return i<0?e.push([n,t]):e[i][1]=t,this}tr.prototype.clear=$8;tr.prototype.delete=ex;tr.prototype.get=tx;tr.prototype.has=ix;tr.prototype.set=nx;function to(n){var t=-1,e=n?n.length:0;for(this.clear();++t<e;){var i=n[t];this.set(i[0],i[1])}}function sx(){this.__data__={hash:new Js,map:new(X8||tr),string:new Js}}function ox(n){return Jl(this,n).delete(n)}function rx(n){return Jl(this,n).get(n)}function ax(n){return Jl(this,n).has(n)}function lx(n,t){return Jl(this,n).set(n,t),this}to.prototype.clear=sx;to.prototype.delete=ox;to.prototype.get=rx;to.prototype.has=ax;to.prototype.set=lx;function ql(n,t){for(var e=n.length;e--;)if(bx(n[e][0],t))return e;return-1}function cx(n,t){t=fx(t,n)?[t]:dx(t);for(var e=0,i=t.length;n!=null&&e<i;)n=n[vx(t[e++])];return e&&e==i?n:void 0}function hx(n){if(!vy(n)||mx(n))return!1;var t=Ax(n)||N8(n)?U8:V8;return t.test(yx(n))}function ux(n){if(typeof n=="string")return n;if(td(n))return _m?_m.call(n):"";var t=n+"";return t=="0"&&1/n==-uy?"-0":t}function dx(n){return gy(n)?n:gx(n)}function Jl(n,t){var e=n.__data__;return px(t)?e[typeof t=="string"?"string":"hash"]:e.map}function my(n,t){var e=H8(n,t);return hx(e)?e:void 0}function fx(n,t){if(gy(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||td(n)?!0:z8.test(n)||!L8.test(n)||t!=null&&n in Object(t)}function px(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function mx(n){return!!Om&&Om in n}var gx=ed(function(n){n=Px(n);var t=[];return O8.test(n)&&t.push(""),n.replace(j8,function(e,i,s,o){t.push(s?o.replace(_8,"$1"):i||e)}),t});function vx(n){if(typeof n=="string"||td(n))return n;var t=n+"";return t=="0"&&1/n==-uy?"-0":t}function yx(n){if(n!=null){try{return fy.call(n)}catch(t){}try{return n+""}catch(t){}}return""}function ed(n,t){if(typeof n!="function"||t&&typeof t!="function")throw new TypeError(x8);var e=function(){var i=arguments,s=t?t.apply(this,i):i[0],o=e.cache;if(o.has(s))return o.get(s);var r=n.apply(this,i);return e.cache=o.set(s,r),r};return e.cache=new(ed.Cache||to),e}ed.Cache=to;function bx(n,t){return n===t||n!==n&&t!==t}var gy=Array.isArray;function Ax(n){var t=vy(n)?py.call(n):"";return t==S8||t==T8}function vy(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function wx(n){return!!n&&typeof n=="object"}function td(n){return typeof n=="symbol"||wx(n)&&py.call(n)==D8}function Px(n){return n==null?"":ux(n)}function Cx(n,t,e){var i=n==null?void 0:cx(n,t);return i===void 0?e:i}var Ba=Cx,Ml={},Mx={get exports(){return Ml},set exports(n){Ml=n}};(function(n,t){var e=200,i="__lodash_hash_undefined__",s=9007199254740991,o="[object Arguments]",r="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",h="[object Function]",u="[object GeneratorFunction]",d="[object Map]",p="[object Number]",m="[object Object]",g="[object Promise]",v="[object RegExp]",y="[object Set]",w="[object String]",C="[object Symbol]",E="[object WeakMap]",D="[object ArrayBuffer]",L="[object DataView]",R="[object Float32Array]",z="[object Float64Array]",O="[object Int8Array]",A="[object Int16Array]",M="[object Int32Array]",I="[object Uint8Array]",k="[object Uint8ClampedArray]",x="[object Uint16Array]",S="[object Uint32Array]",j=/[\\^$.*+?()[\]{}|]/g,F=/\w*$/,J=/^\[object .+?Constructor\]$/,ne=/^(?:0|[1-9]\d*)$/,q={};q[o]=q[r]=q[D]=q[L]=q[a]=q[l]=q[R]=q[z]=q[O]=q[A]=q[M]=q[d]=q[p]=q[m]=q[v]=q[y]=q[w]=q[C]=q[I]=q[k]=q[x]=q[S]=!0,q[c]=q[h]=q[E]=!1;var oe=typeof ji=="object"&&ji&&ji.Object===Object&&ji,se=typeof self=="object"&&self&&self.Object===Object&&self,ae=oe||se||Function("return this")(),ze=t&&!t.nodeType&&t,ee=ze&&!0&&n&&!n.nodeType&&n,we=ee&&ee.exports===ze;function le(T,W){return T.set(W[0],W[1]),T}function he(T,W){return T.add(W),T}function be(T,W){for(var ie=-1,fe=T?T.length:0;++ie<fe&&W(T[ie],ie,T)!==!1;);return T}function te(T,W){for(var ie=-1,fe=W.length,Ue=T.length;++ie<fe;)T[Ue+ie]=W[ie];return T}function ke(T,W,ie,fe){var Ue=-1,He=T?T.length:0;for(fe&&He&&(ie=T[++Ue]);++Ue<He;)ie=W(ie,T[Ue],Ue,T);return ie}function Re(T,W){for(var ie=-1,fe=Array(T);++ie<T;)fe[ie]=W(ie);return fe}function ye(T,W){return T==null?void 0:T[W]}function De(T){var W=!1;if(T!=null&&typeof T.toString!="function")try{W=!!(T+"")}catch(ie){}return W}function ve(T){var W=-1,ie=Array(T.size);return T.forEach(function(fe,Ue){ie[++W]=[Ue,fe]}),ie}function Ae(T,W){return function(ie){return T(W(ie))}}function Oe(T){var W=-1,ie=Array(T.size);return T.forEach(function(fe){ie[++W]=fe}),ie}var Xe=Array.prototype,Ze=Function.prototype,ot=Object.prototype,Ke=ae["__core-js_shared__"],et=function(){var T=/[^.]+$/.exec(Ke&&Ke.keys&&Ke.keys.IE_PROTO||"");return T?"Symbol(src)_1."+T:""}(),lt=Ze.toString,ht=ot.hasOwnProperty,Ft=ot.toString,Zi=RegExp("^"+lt.call(ht).replace(j,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ut=we?ae.Buffer:void 0,li=ae.Symbol,Ai=ae.Uint8Array,ut=Ae(Object.getPrototypeOf,Object),Qt=Object.create,Xt=ot.propertyIsEnumerable,ir=Xe.splice,As=Object.getOwnPropertySymbols,Fn=Ut?Ut.isBuffer:void 0,io=Ae(Object.keys,Object),Bn=Q(ae,"DataView"),Di=Q(ae,"Map"),wi=Q(ae,"Promise"),Hn=Q(ae,"Set"),Nn=Q(ae,"WeakMap"),qi=Q(Object,"create"),mn=ni(Bn),gn=ni(Di),ws=ni(wi),Ps=ni(Hn),Gn=ni(Nn),Ji=li?li.prototype:void 0,no=Ji?Ji.valueOf:void 0;function Vi(T){var W=-1,ie=T?T.length:0;for(this.clear();++W<ie;){var fe=T[W];this.set(fe[0],fe[1])}}function Wn(){this.__data__=qi?qi(null):{}}function nr(T){return this.has(T)&&delete this.__data__[T]}function sr(T){var W=this.__data__;if(qi){var ie=W[T];return ie===i?void 0:ie}return ht.call(W,T)?W[T]:void 0}function Cs(T){var W=this.__data__;return qi?W[T]!==void 0:ht.call(W,T)}function vn(T,W){var ie=this.__data__;return ie[T]=qi&&W===void 0?i:W,this}Vi.prototype.clear=Wn,Vi.prototype.delete=nr,Vi.prototype.get=sr,Vi.prototype.has=Cs,Vi.prototype.set=vn;function Ot(T){var W=-1,ie=T?T.length:0;for(this.clear();++W<ie;){var fe=T[W];this.set(fe[0],fe[1])}}function so(){this.__data__=[]}function or(T){var W=this.__data__,ie=Li(W,T);if(ie<0)return!1;var fe=W.length-1;return ie==fe?W.pop():ir.call(W,ie,1),!0}function oo(T){var W=this.__data__,ie=Li(W,T);return ie<0?void 0:W[ie][1]}function ro(T){return Li(this.__data__,T)>-1}function ao(T,W){var ie=this.__data__,fe=Li(ie,T);return fe<0?ie.push([T,W]):ie[fe][1]=W,this}Ot.prototype.clear=so,Ot.prototype.delete=or,Ot.prototype.get=oo,Ot.prototype.has=ro,Ot.prototype.set=ao;function jt(T){var W=-1,ie=T?T.length:0;for(this.clear();++W<ie;){var fe=T[W];this.set(fe[0],fe[1])}}function Ms(){this.__data__={hash:new Vi,map:new(Di||Ot),string:new Vi}}function Fi(T){return N(this,T).delete(T)}function yn(T){return N(this,T).get(T)}function bn(T){return N(this,T).has(T)}function Un(T,W){return N(this,T).set(T,W),this}jt.prototype.clear=Ms,jt.prototype.delete=Fi,jt.prototype.get=yn,jt.prototype.has=bn,jt.prototype.set=Un;function Bt(T){this.__data__=new Ot(T)}function rr(){this.__data__=new Ot}function ar(T){return this.__data__.delete(T)}function Qn(T){return this.__data__.get(T)}function Yt(T){return this.__data__.has(T)}function Ki(T,W){var ie=this.__data__;if(ie instanceof Ot){var fe=ie.__data__;if(!Di||fe.length<e-1)return fe.push([T,W]),this;ie=this.__data__=new jt(fe)}return ie.set(T,W),this}Bt.prototype.clear=rr,Bt.prototype.delete=ar,Bt.prototype.get=Qn,Bt.prototype.has=Yt,Bt.prototype.set=Ki;function $t(T,W){var ie=ur(T)||uo(T)?Re(T.length,String):[],fe=ie.length,Ue=!!fe;for(var He in T)(W||ht.call(T,He))&&!(Ue&&(He=="length"||Ct(He,fe)))&&ie.push(He);return ie}function ci(T,W,ie){var fe=T[W];(!(ht.call(T,W)&&ya(fe,ie))||ie===void 0&&!(W in T))&&(T[W]=ie)}function Li(T,W){for(var ie=T.length;ie--;)if(ya(T[ie][0],W))return ie;return-1}function kt(T,W){return T&&qn(W,fr(W),T)}function ei(T,W,ie,fe,Ue,He,Je){var tt;if(fe&&(tt=He?fe(T,Ue,He,Je):fe(T)),tt!==void 0)return tt;if(!en(T))return T;var Tt=ur(T);if(Tt){if(tt=Ce(T),!W)return Is(T,tt)}else{var nt=re(T),Zt=nt==h||nt==u;if(ba(T))return $i(T,W);if(nt==m||nt==o||Zt&&!He){if(De(T))return He?T:{};if(tt=je(Zt?{}:T),!W)return cr(T,kt(tt,T))}else{if(!q[nt])return He?T:{};tt=Qe(T,nt,ei,W)}}Je||(Je=new Bt);var hi=Je.get(T);if(hi)return hi;if(Je.set(T,tt),!Tt)var _t=ie?hr(T):fr(T);return be(_t||T,function(qt,Nt){_t&&(Nt=qt,qt=T[Nt]),ci(tt,Nt,ei(qt,W,ie,fe,Nt,T,Je))}),tt}function lo(T){return en(T)?Qt(T):{}}function co(T,W,ie){var fe=W(T);return ur(T)?fe:te(fe,ie(T))}function Xn(T){return Ft.call(T)}function ti(T){if(!en(T)||Rt(T))return!1;var W=dr(T)||De(T)?Zi:J;return W.test(ni(T))}function Yn(T){if(!ii(T))return io(T);var W=[];for(var ie in Object(T))ht.call(T,ie)&&ie!="constructor"&&W.push(ie);return W}function $i(T,W){if(W)return T.slice();var ie=new T.constructor(T.length);return T.copy(ie),ie}function An(T){var W=new T.constructor(T.byteLength);return new Ai(W).set(new Ai(T)),W}function Bi(T,W){var ie=W?An(T.buffer):T.buffer;return new T.constructor(ie,T.byteOffset,T.byteLength)}function Zn(T,W,ie){var fe=W?ie(ve(T),!0):ve(T);return ke(fe,le,new T.constructor)}function wn(T){var W=new T.constructor(T.source,F.exec(T));return W.lastIndex=T.lastIndex,W}function Pi(T,W,ie){var fe=W?ie(Oe(T),!0):Oe(T);return ke(fe,he,new T.constructor)}function lr(T){return no?Object(no.call(T)):{}}function ho(T,W){var ie=W?An(T.buffer):T.buffer;return new T.constructor(ie,T.byteOffset,T.length)}function Is(T,W){var ie=-1,fe=T.length;for(W||(W=Array(fe));++ie<fe;)W[ie]=T[ie];return W}function qn(T,W,ie,fe){ie||(ie={});for(var Ue=-1,He=W.length;++Ue<He;){var Je=W[Ue],tt=fe?fe(ie[Je],T[Je],Je,ie,T):void 0;ci(ie,Je,tt===void 0?T[Je]:tt)}return ie}function cr(T,W){return qn(T,K(T),W)}function hr(T){return co(T,fr,K)}function N(T,W){var ie=T.__data__;return xt(W)?ie[typeof W=="string"?"string":"hash"]:ie.map}function Q(T,W){var ie=ye(T,W);return ti(ie)?ie:void 0}var K=As?Ae(As,Object):rc,re=Xn;(Bn&&re(new Bn(new ArrayBuffer(1)))!=L||Di&&re(new Di)!=d||wi&&re(wi.resolve())!=g||Hn&&re(new Hn)!=y||Nn&&re(new Nn)!=E)&&(re=function(T){var W=Ft.call(T),ie=W==m?T.constructor:void 0,fe=ie?ni(ie):void 0;if(fe)switch(fe){case mn:return L;case gn:return d;case ws:return g;case Ps:return y;case Gn:return E}return W});function Ce(T){var W=T.length,ie=T.constructor(W);return W&&typeof T[0]=="string"&&ht.call(T,"index")&&(ie.index=T.index,ie.input=T.input),ie}function je(T){return typeof T.constructor=="function"&&!ii(T)?lo(ut(T)):{}}function Qe(T,W,ie,fe){var Ue=T.constructor;switch(W){case D:return An(T);case a:case l:return new Ue(+T);case L:return Bi(T,fe);case R:case z:case O:case A:case M:case I:case k:case x:case S:return ho(T,fe);case d:return Zn(T,fe,ie);case p:case w:return new Ue(T);case v:return wn(T);case y:return Pi(T,fe,ie);case C:return lr(T)}}function Ct(T,W){return W=W==null?s:W,!!W&&(typeof T=="number"||ne.test(T))&&T>-1&&T%1==0&&T<W}function xt(T){var W=typeof T;return W=="string"||W=="number"||W=="symbol"||W=="boolean"?T!=="__proto__":T===null}function Rt(T){return!!et&&et in T}function ii(T){var W=T&&T.constructor,ie=typeof W=="function"&&W.prototype||ot;return T===ie}function ni(T){if(T!=null){try{return lt.call(T)}catch(W){}try{return T+""}catch(W){}}return""}function va(T){return ei(T,!0,!0)}function ya(T,W){return T===W||T!==T&&W!==W}function uo(T){return oc(T)&&ht.call(T,"callee")&&(!Xt.call(T,"callee")||Ft.call(T)==o)}var ur=Array.isArray;function fo(T){return T!=null&&Aa(T.length)&&!dr(T)}function oc(T){return wa(T)&&fo(T)}var ba=Fn||ac;function dr(T){var W=en(T)?Ft.call(T):"";return W==h||W==u}function Aa(T){return typeof T=="number"&&T>-1&&T%1==0&&T<=s}function en(T){var W=typeof T;return!!T&&(W=="object"||W=="function")}function wa(T){return!!T&&typeof T=="object"}function fr(T){return fo(T)?$t(T):Yn(T)}function rc(){return[]}function ac(){return!1}n.exports=va})(Mx,Ml);const Ix=Ml;var Il={},Ex={get exports(){return Il},set exports(n){Il=n}};(function(n,t){var e=200,i="__lodash_hash_undefined__",s=1,o=2,r=9007199254740991,a="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",h="[object Boolean]",u="[object Date]",d="[object Error]",p="[object Function]",m="[object GeneratorFunction]",g="[object Map]",v="[object Number]",y="[object Null]",w="[object Object]",C="[object Promise]",E="[object Proxy]",D="[object RegExp]",L="[object Set]",R="[object String]",z="[object Symbol]",O="[object Undefined]",A="[object WeakMap]",M="[object ArrayBuffer]",I="[object DataView]",k="[object Float32Array]",x="[object Float64Array]",S="[object Int8Array]",j="[object Int16Array]",F="[object Int32Array]",J="[object Uint8Array]",ne="[object Uint8ClampedArray]",q="[object Uint16Array]",oe="[object Uint32Array]",se=/[\\^$.*+?()[\]{}|]/g,ae=/^\[object .+?Constructor\]$/,ze=/^(?:0|[1-9]\d*)$/,ee={};ee[k]=ee[x]=ee[S]=ee[j]=ee[F]=ee[J]=ee[ne]=ee[q]=ee[oe]=!0,ee[a]=ee[l]=ee[M]=ee[h]=ee[I]=ee[u]=ee[d]=ee[p]=ee[g]=ee[v]=ee[w]=ee[D]=ee[L]=ee[R]=ee[A]=!1;var we=typeof ji=="object"&&ji&&ji.Object===Object&&ji,le=typeof self=="object"&&self&&self.Object===Object&&self,he=we||le||Function("return this")(),be=t&&!t.nodeType&&t,te=be&&!0&&n&&!n.nodeType&&n,ke=te&&te.exports===be,Re=ke&&we.process,ye=function(){try{return Re&&Re.binding&&Re.binding("util")}catch(T){}}(),De=ye&&ye.isTypedArray;function ve(T,W){for(var ie=-1,fe=T==null?0:T.length,Ue=0,He=[];++ie<fe;){var Je=T[ie];W(Je,ie,T)&&(He[Ue++]=Je)}return He}function Ae(T,W){for(var ie=-1,fe=W.length,Ue=T.length;++ie<fe;)T[Ue+ie]=W[ie];return T}function Oe(T,W){for(var ie=-1,fe=T==null?0:T.length;++ie<fe;)if(W(T[ie],ie,T))return!0;return!1}function Xe(T,W){for(var ie=-1,fe=Array(T);++ie<T;)fe[ie]=W(ie);return fe}function Ze(T){return function(W){return T(W)}}function ot(T,W){return T.has(W)}function Ke(T,W){return T==null?void 0:T[W]}function et(T){var W=-1,ie=Array(T.size);return T.forEach(function(fe,Ue){ie[++W]=[Ue,fe]}),ie}function lt(T,W){return function(ie){return T(W(ie))}}function ht(T){var W=-1,ie=Array(T.size);return T.forEach(function(fe){ie[++W]=fe}),ie}var Ft=Array.prototype,Zi=Function.prototype,Ut=Object.prototype,li=he["__core-js_shared__"],Ai=Zi.toString,ut=Ut.hasOwnProperty,Qt=function(){var T=/[^.]+$/.exec(li&&li.keys&&li.keys.IE_PROTO||"");return T?"Symbol(src)_1."+T:""}(),Xt=Ut.toString,ir=RegExp("^"+Ai.call(ut).replace(se,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),As=ke?he.Buffer:void 0,Fn=he.Symbol,io=he.Uint8Array,Bn=Ut.propertyIsEnumerable,Di=Ft.splice,wi=Fn?Fn.toStringTag:void 0,Hn=Object.getOwnPropertySymbols,Nn=As?As.isBuffer:void 0,qi=lt(Object.keys,Object),mn=K(he,"DataView"),gn=K(he,"Map"),ws=K(he,"Promise"),Ps=K(he,"Set"),Gn=K(he,"WeakMap"),Ji=K(Object,"create"),no=ni(mn),Vi=ni(gn),Wn=ni(ws),nr=ni(Ps),sr=ni(Gn),Cs=Fn?Fn.prototype:void 0,vn=Cs?Cs.valueOf:void 0;function Ot(T){var W=-1,ie=T==null?0:T.length;for(this.clear();++W<ie;){var fe=T[W];this.set(fe[0],fe[1])}}function so(){this.__data__=Ji?Ji(null):{},this.size=0}function or(T){var W=this.has(T)&&delete this.__data__[T];return this.size-=W?1:0,W}function oo(T){var W=this.__data__;if(Ji){var ie=W[T];return ie===i?void 0:ie}return ut.call(W,T)?W[T]:void 0}function ro(T){var W=this.__data__;return Ji?W[T]!==void 0:ut.call(W,T)}function ao(T,W){var ie=this.__data__;return this.size+=this.has(T)?0:1,ie[T]=Ji&&W===void 0?i:W,this}Ot.prototype.clear=so,Ot.prototype.delete=or,Ot.prototype.get=oo,Ot.prototype.has=ro,Ot.prototype.set=ao;function jt(T){var W=-1,ie=T==null?0:T.length;for(this.clear();++W<ie;){var fe=T[W];this.set(fe[0],fe[1])}}function Ms(){this.__data__=[],this.size=0}function Fi(T){var W=this.__data__,ie=$i(W,T);if(ie<0)return!1;var fe=W.length-1;return ie==fe?W.pop():Di.call(W,ie,1),--this.size,!0}function yn(T){var W=this.__data__,ie=$i(W,T);return ie<0?void 0:W[ie][1]}function bn(T){return $i(this.__data__,T)>-1}function Un(T,W){var ie=this.__data__,fe=$i(ie,T);return fe<0?(++this.size,ie.push([T,W])):ie[fe][1]=W,this}jt.prototype.clear=Ms,jt.prototype.delete=Fi,jt.prototype.get=yn,jt.prototype.has=bn,jt.prototype.set=Un;function Bt(T){var W=-1,ie=T==null?0:T.length;for(this.clear();++W<ie;){var fe=T[W];this.set(fe[0],fe[1])}}function rr(){this.size=0,this.__data__={hash:new Ot,map:new(gn||jt),string:new Ot}}function ar(T){var W=Q(this,T).delete(T);return this.size-=W?1:0,W}function Qn(T){return Q(this,T).get(T)}function Yt(T){return Q(this,T).has(T)}function Ki(T,W){var ie=Q(this,T),fe=ie.size;return ie.set(T,W),this.size+=ie.size==fe?0:1,this}Bt.prototype.clear=rr,Bt.prototype.delete=ar,Bt.prototype.get=Qn,Bt.prototype.has=Yt,Bt.prototype.set=Ki;function $t(T){var W=-1,ie=T==null?0:T.length;for(this.__data__=new Bt;++W<ie;)this.add(T[W])}function ci(T){return this.__data__.set(T,i),this}function Li(T){return this.__data__.has(T)}$t.prototype.add=$t.prototype.push=ci,$t.prototype.has=Li;function kt(T){var W=this.__data__=new jt(T);this.size=W.size}function ei(){this.__data__=new jt,this.size=0}function lo(T){var W=this.__data__,ie=W.delete(T);return this.size=W.size,ie}function co(T){return this.__data__.get(T)}function Xn(T){return this.__data__.has(T)}function ti(T,W){var ie=this.__data__;if(ie instanceof jt){var fe=ie.__data__;if(!gn||fe.length<e-1)return fe.push([T,W]),this.size=++ie.size,this;ie=this.__data__=new Bt(fe)}return ie.set(T,W),this.size=ie.size,this}kt.prototype.clear=ei,kt.prototype.delete=lo,kt.prototype.get=co,kt.prototype.has=Xn,kt.prototype.set=ti;function Yn(T,W){var ie=uo(T),fe=!ie&&ya(T),Ue=!ie&&!fe&&fo(T),He=!ie&&!fe&&!Ue&&wa(T),Je=ie||fe||Ue||He,tt=Je?Xe(T.length,String):[],Tt=tt.length;for(var nt in T)(W||ut.call(T,nt))&&!(Je&&(nt=="length"||Ue&&(nt=="offset"||nt=="parent")||He&&(nt=="buffer"||nt=="byteLength"||nt=="byteOffset")||Qe(nt,Tt)))&&tt.push(nt);return tt}function $i(T,W){for(var ie=T.length;ie--;)if(va(T[ie][0],W))return ie;return-1}function An(T,W,ie){var fe=W(T);return uo(T)?fe:Ae(fe,ie(T))}function Bi(T){return T==null?T===void 0?O:y:wi&&wi in Object(T)?re(T):ii(T)}function Zn(T){return en(T)&&Bi(T)==a}function wn(T,W,ie,fe,Ue){return T===W?!0:T==null||W==null||!en(T)&&!en(W)?T!==T&&W!==W:Pi(T,W,ie,fe,wn,Ue)}function Pi(T,W,ie,fe,Ue,He){var Je=uo(T),tt=uo(W),Tt=Je?l:je(T),nt=tt?l:je(W);Tt=Tt==a?w:Tt,nt=nt==a?w:nt;var Zt=Tt==w,hi=nt==w,_t=Tt==nt;if(_t&&fo(T)){if(!fo(W))return!1;Je=!0,Zt=!1}if(_t&&!Zt)return He||(He=new kt),Je||wa(T)?qn(T,W,ie,fe,Ue,He):cr(T,W,Tt,ie,fe,Ue,He);if(!(ie&s)){var qt=Zt&&ut.call(T,"__wrapped__"),Nt=hi&&ut.call(W,"__wrapped__");if(qt||Nt){var Jn=qt?T.value():T,Pn=Nt?W.value():W;return He||(He=new kt),Ue(Jn,Pn,ie,fe,He)}}return _t?(He||(He=new kt),hr(T,W,ie,fe,Ue,He)):!1}function lr(T){if(!Aa(T)||xt(T))return!1;var W=ba(T)?ir:ae;return W.test(ni(T))}function ho(T){return en(T)&&dr(T.length)&&!!ee[Bi(T)]}function Is(T){if(!Rt(T))return qi(T);var W=[];for(var ie in Object(T))ut.call(T,ie)&&ie!="constructor"&&W.push(ie);return W}function qn(T,W,ie,fe,Ue,He){var Je=ie&s,tt=T.length,Tt=W.length;if(tt!=Tt&&!(Je&&Tt>tt))return!1;var nt=He.get(T);if(nt&&He.get(W))return nt==W;var Zt=-1,hi=!0,_t=ie&o?new $t:void 0;for(He.set(T,W),He.set(W,T);++Zt<tt;){var qt=T[Zt],Nt=W[Zt];if(fe)var Jn=Je?fe(Nt,qt,Zt,W,T,He):fe(qt,Nt,Zt,T,W,He);if(Jn!==void 0){if(Jn)continue;hi=!1;break}if(_t){if(!Oe(W,function(Pn,Es){if(!ot(_t,Es)&&(qt===Pn||Ue(qt,Pn,ie,fe,He)))return _t.push(Es)})){hi=!1;break}}else if(!(qt===Nt||Ue(qt,Nt,ie,fe,He))){hi=!1;break}}return He.delete(T),He.delete(W),hi}function cr(T,W,ie,fe,Ue,He,Je){switch(ie){case I:if(T.byteLength!=W.byteLength||T.byteOffset!=W.byteOffset)return!1;T=T.buffer,W=W.buffer;case M:return!(T.byteLength!=W.byteLength||!He(new io(T),new io(W)));case h:case u:case v:return va(+T,+W);case d:return T.name==W.name&&T.message==W.message;case D:case R:return T==W+"";case g:var tt=et;case L:var Tt=fe&s;if(tt||(tt=ht),T.size!=W.size&&!Tt)return!1;var nt=Je.get(T);if(nt)return nt==W;fe|=o,Je.set(T,W);var Zt=qn(tt(T),tt(W),fe,Ue,He,Je);return Je.delete(T),Zt;case z:if(vn)return vn.call(T)==vn.call(W)}return!1}function hr(T,W,ie,fe,Ue,He){var Je=ie&s,tt=N(T),Tt=tt.length,nt=N(W),Zt=nt.length;if(Tt!=Zt&&!Je)return!1;for(var hi=Tt;hi--;){var _t=tt[hi];if(!(Je?_t in W:ut.call(W,_t)))return!1}var qt=He.get(T);if(qt&&He.get(W))return qt==W;var Nt=!0;He.set(T,W),He.set(W,T);for(var Jn=Je;++hi<Tt;){_t=tt[hi];var Pn=T[_t],Es=W[_t];if(fe)var wd=Je?fe(Es,Pn,_t,W,T,He):fe(Pn,Es,_t,T,W,He);if(!(wd===void 0?Pn===Es||Ue(Pn,Es,ie,fe,He):wd)){Nt=!1;break}Jn||(Jn=_t=="constructor")}if(Nt&&!Jn){var Pa=T.constructor,Ca=W.constructor;Pa!=Ca&&"constructor"in T&&"constructor"in W&&!(typeof Pa=="function"&&Pa instanceof Pa&&typeof Ca=="function"&&Ca instanceof Ca)&&(Nt=!1)}return He.delete(T),He.delete(W),Nt}function N(T){return An(T,fr,Ce)}function Q(T,W){var ie=T.__data__;return Ct(W)?ie[typeof W=="string"?"string":"hash"]:ie.map}function K(T,W){var ie=Ke(T,W);return lr(ie)?ie:void 0}function re(T){var W=ut.call(T,wi),ie=T[wi];try{T[wi]=void 0;var fe=!0}catch(He){}var Ue=Xt.call(T);return fe&&(W?T[wi]=ie:delete T[wi]),Ue}var Ce=Hn?function(T){return T==null?[]:(T=Object(T),ve(Hn(T),function(W){return Bn.call(T,W)}))}:rc,je=Bi;(mn&&je(new mn(new ArrayBuffer(1)))!=I||gn&&je(new gn)!=g||ws&&je(ws.resolve())!=C||Ps&&je(new Ps)!=L||Gn&&je(new Gn)!=A)&&(je=function(T){var W=Bi(T),ie=W==w?T.constructor:void 0,fe=ie?ni(ie):"";if(fe)switch(fe){case no:return I;case Vi:return g;case Wn:return C;case nr:return L;case sr:return A}return W});function Qe(T,W){return W=W==null?r:W,!!W&&(typeof T=="number"||ze.test(T))&&T>-1&&T%1==0&&T<W}function Ct(T){var W=typeof T;return W=="string"||W=="number"||W=="symbol"||W=="boolean"?T!=="__proto__":T===null}function xt(T){return!!Qt&&Qt in T}function Rt(T){var W=T&&T.constructor,ie=typeof W=="function"&&W.prototype||Ut;return T===ie}function ii(T){return Xt.call(T)}function ni(T){if(T!=null){try{return Ai.call(T)}catch(W){}try{return T+""}catch(W){}}return""}function va(T,W){return T===W||T!==T&&W!==W}var ya=Zn(function(){return arguments}())?Zn:function(T){return en(T)&&ut.call(T,"callee")&&!Bn.call(T,"callee")},uo=Array.isArray;function ur(T){return T!=null&&dr(T.length)&&!ba(T)}var fo=Nn||ac;function oc(T,W){return wn(T,W)}function ba(T){if(!Aa(T))return!1;var W=Bi(T);return W==p||W==m||W==c||W==E}function dr(T){return typeof T=="number"&&T>-1&&T%1==0&&T<=r}function Aa(T){var W=typeof T;return T!=null&&(W=="object"||W=="function")}function en(T){return T!=null&&typeof T=="object"}var wa=De?Ze(De):ho;function fr(T){return ur(T)?Yn(T):Is(T)}function rc(){return[]}function ac(){return!1}n.exports=oc})(Ex,Il);const kx=Il,xx=(n,t)=>kx(n,t),Sx=n=>Object.keys(n||{}),Tx=(n,t)=>{const e={};return n.forEach(i=>{e[i]=t[i]}),e},Dx=()=>{const n={},t=(e,i)=>{const{watcherName:s,fn:o}=e,{prop:r,value:a}=i;n[s]||(n[s]={deps:{},fn:o}),n[s].deps[r]=a};return{subscribers:n,subscribe(e,i){e&&t(e,i)},notify(e,i){Object.entries(n).forEach(([s,{deps:o,fn:r}])=>{const a=Sx(o);if(a.includes(i)){const l=Tx(a,e);xx(o,l)||(n[s].deps=l,r())}})}}},Lx=()=>{let n=null;return{targetWatcher(t,e){n={watcherName:t,fn:e},n.fn(),n=null},getTarget(){return n}}};function zx(n,t){const e=Ba(n,"data",{}),i=Ba(n,"watch",{}),s=Ba(n,"methods",{}),o=Ba(t,"onChange",()=>{}),{subscribe:r,notify:a,subscribers:l}=Dx(),{targetWatcher:c,getTarget:h}=Lx();let u;const d={},p=()=>({data:u,methods:d});let m=!1;const g=y=>(...w)=>{m=!0;const C=y(...w);return m=!1,C};Object.entries(s).forEach(([y,w])=>{d[y]=g((...C)=>w(p(),...C)),Object.defineProperty(d[y],"name",{value:y})}),u=new Proxy(Ix(e),{get(y,w){return h()&&!m&&r(h(),{prop:w,value:y[w]}),Reflect.get(...arguments)},set(y,w,C){return y[w]===C||(Reflect.set(...arguments),h()||(o&&o(w,C),a(u,w))),!0}}),Object.entries(i).forEach(([y,w])=>{c(y,()=>{w(p())})});const v=[u,d];return v._internal={_getSubscribers(){return l}},v}function Ox({pageIndex:n,particlesToShow:t,particlesToScroll:e,particlesCount:i}){const s=n===0?0:t-e,o=n*t-n*s,r=o+Math.max(t,e)-1,a=[];for(let l=o;l<=Math.min(i-1,r);l++)a.push(l);return a}function jx({infinite:n,pageIndex:t,pagesCount:e,particlesCount:i,particlesToShow:s,particlesToScroll:o}){const r=Lo(0,t,e-1);let a=r-1,l=r+1;a=n?a<0?e-1:a:Math.max(0,a),l=n?l>e-1?0:l:Math.min(e-1,l);const c=[...new Set([a,r,l,0,e-1])].sort((u,d)=>u-d),h=c.flatMap(u=>Ox({pageIndex:u,particlesToShow:s,particlesToScroll:o,particlesCount:i}));return{pageIndexes:c,particleIndexes:[...new Set(h)].sort((u,d)=>u-d)}}const Rx=(n,t)=>(n(),setInterval(n,t)),_x=35,Vm=1;class Vx{constructor({onProgressValueChange:t}){this._onProgressValueChange=t,this._autoplayDuration,this._onProgressValueChange,this._interval,this._paused=!1}setAutoplayDuration(t){this._autoplayDuration=t}start(t){return new Promise(e=>{this.reset();const i=Math.min(_x,Math.max(this._autoplayDuration,1));let s=-i;this._interval=Rx(()=>$(this,null,function*(){if(this._paused)return;s+=i;const o=s/this._autoplayDuration;this._onProgressValueChange(o),o>Vm&&(this.reset(),yield t(),e())}),i)})}pause(){this._paused=!0}resume(){this._paused=!1}reset(){clearInterval(this._interval),this._onProgressValueChange(Vm)}}function Fx(n){const t=new Vx({onProgressValueChange:r=>{n("progressValue",1-r)}}),e=zx({data:{particlesCountWithoutClones:0,particlesToShow:1,particlesToShowInit:1,particlesToScroll:1,particlesToScrollInit:1,particlesCount:1,currentParticleIndex:1,infinite:!1,autoplayDuration:1e3,clonesCountHead:0,clonesCountTail:0,clonesCountTotal:0,partialPageSize:1,currentPageIndex:1,pagesCount:1,pauseOnFocus:!1,focused:!1,autoplay:!1,autoplayDirection:"next",disabled:!1,durationMsInit:1e3,durationMs:1e3,offset:0,particleWidth:0,loaded:[]},watch:{setLoaded({data:r}){r.loaded=jx({infinite:r.infinite,pageIndex:r.currentPageIndex,pagesCount:r.pagesCount,particlesCount:r.particlesCountWithoutClones,particlesToShow:r.particlesToShow,particlesToScroll:r.particlesToScroll}).particleIndexes},setCurrentPageIndex({data:r}){r.currentPageIndex=y8({currentParticleIndex:r.currentParticleIndex,particlesCount:r.particlesCount,clonesCountHead:r.clonesCountHead,clonesCountTotal:r.clonesCountTotal,infinite:r.infinite,particlesToScroll:r.particlesToScroll})},setPartialPageSize({data:r}){r.partialPageSize=cy({particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow,particlesCountWithoutClones:r.particlesCountWithoutClones})},setClonesCount({data:r}){const{head:a,tail:l}=k8({infinite:r.infinite,particlesToShow:r.particlesToShow,partialPageSize:r.partialPageSize});r.clonesCountHead=a,r.clonesCountTail=l,r.clonesCountTotal=a+l},setProgressManagerAutoplayDuration({data:r}){t.setAutoplayDuration(r.autoplayDuration)},toggleProgressManager({data:{pauseOnFocus:r,focused:a}}){r&&(a?t.pause():t.resume())},initDuration({data:r}){r.durationMs=r.durationMsInit},applyAutoplay({data:r,methods:{_applyAutoplayIfNeeded:a}}){r.autoplay&&a(r.autoplay)},setPagesCount({data:r}){r.pagesCount=A8({infinite:r.infinite,particlesCountWithoutClones:r.particlesCountWithoutClones,particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow})},setParticlesToShow({data:r}){r.particlesToShow=Lo(1,r.particlesToShowInit,r.particlesCountWithoutClones)},setParticlesToScroll({data:r}){r.particlesToScroll=Lo(1,r.particlesToScrollInit,r.particlesCountWithoutClones)}},methods:{_prev({data:r}){r.currentParticleIndex=zc({infinite:r.infinite,pageIndex:r.currentPageIndex-1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_next({data:r}){r.currentParticleIndex=zc({infinite:r.infinite,pageIndex:r.currentPageIndex+1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_moveToParticle({data:r},a){r.currentParticleIndex=Lo(0,a,r.particlesCount-1)},toggleFocused({data:r}){r.focused=!r.focused},_applyAutoplayIfNeeded(l){return $(this,arguments,function*({data:r,methods:a}){if(!r.infinite&&(r.autoplayDirection===ps&&r.currentParticleIndex===r.particlesCount-1||r.autoplayDirection===Yo&&r.currentParticleIndex===0)){t.reset();return}if(r.autoplay){const c=()=>Ih({[ps]:()=>$(this,null,function*(){return a.showNextPage()}),[Yo]:()=>$(this,null,function*(){return a.showPrevPage()})})(r.autoplayDirection);yield t.start(c)}})},_jumpIfNeeded(l){return $(this,arguments,function*({data:r,methods:a}){let c=!1;return r.infinite&&(r.currentParticleIndex===0?(yield a.showParticle(r.particlesCount-r.clonesCountTotal,{animated:!1}),c=!0):r.currentParticleIndex===r.particlesCount-r.clonesCountTail&&(yield a.showParticle(r.clonesCountHead,{animated:!1}),c=!0)),c})},changePage(h,u,d){return $(this,arguments,function*({data:r,methods:a},l,c){if(t.reset(),r.disabled)return;r.disabled=!0,l(),yield a.offsetPage({animated:Or(c,"animated",!0)}),r.disabled=!1,!(yield a._jumpIfNeeded())&&a._applyAutoplayIfNeeded()})},showNextPage(c,h){return $(this,arguments,function*({data:r,methods:a},l){r.disabled||(yield a.changePage(a._next,l))})},showPrevPage(c,h){return $(this,arguments,function*({data:r,methods:a},l){r.disabled||(yield a.changePage(a._prev,l))})},showParticle(c,h,u){return $(this,arguments,function*({methods:r},a,l){yield r.changePage(()=>r._moveToParticle(a),l)})},_getParticleIndexByPageIndex({data:r},a){return zc({infinite:r.infinite,pageIndex:a,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},showPage(c,h,u){return $(this,arguments,function*({methods:r},a,l){const d=r._getParticleIndexByPageIndex(a);yield r.showParticle(d,l)})},offsetPage({data:r},a){const l=Or(a,"animated",!0);return new Promise(c=>{r.durationMs=l?r.durationMsInit:0,r.offset=-r.currentParticleIndex*r.particleWidth,setTimeout(()=>{c()},r.durationMs)})}}},{onChange:n}),[i,s]=e;return[{data:i,progressManager:t},s,e._internal]}function Bx(n){Le(n,"svelte-sme1z4",":root{--sc-color-rgb-light-50p:rgba(93, 93, 93, 0.5);--sc-color-rgb-light:#5d5d5d;--sc-color-hex-dark-50p:rgba(30, 30, 30, 0.5);--sc-color-hex-dark:#1e1e1e}.sc-carousel__carousel-container.svelte-sme1z4{display:flex;width:100%;flex-direction:column;align-items:center}.sc-carousel__content-container.svelte-sme1z4{position:relative;display:flex;width:100%}.sc-carousel__pages-window.svelte-sme1z4{flex:1;display:flex;overflow:hidden;box-sizing:border-box;position:relative}.sc-carousel__pages-container.svelte-sme1z4{width:100%;display:flex;transition-property:transform}.sc-carousel__arrow-container.svelte-sme1z4{padding:5px;box-sizing:border-box;display:flex;align-items:center;justify-content:center}.sc-carousel-progress__container.svelte-sme1z4{width:100%;height:5px;background-color:var(--sc-color-rgb-light-50p);position:absolute;bottom:0}.sc-carousel-button{all:unset;cursor:pointer}.sc-carousel-button:focus{outline:5px auto}")}const Hx=n=>({currentPageIndex:n[0]&32,pagesCount:n[0]&1024,loaded:n[0]&64}),Fm=n=>({currentPageIndex:n[5],pagesCount:n[10],showPage:n[15],loaded:n[6]}),Nx=n=>({loaded:n[0]&64,currentPageIndex:n[0]&32}),Bm=n=>({showNextPage:n[14].showNextPage,loaded:n[6],currentPageIndex:n[5]}),Gx=n=>({loaded:n[0]&64,currentPageIndex:n[0]&32}),Hm=n=>({loaded:n[6],currentPageIndex:n[5]}),Wx=n=>({loaded:n[0]&64,currentPageIndex:n[0]&32}),Nm=n=>({showPrevPage:n[14].showPrevPage,loaded:n[6],currentPageIndex:n[5]});function Gm(n){let t;const e=n[37].prev,i=hs(e,n,n[36],Nm),s=i||Ux(n);return{c(){s&&s.c()},m(o,r){s&&s.m(o,r),t=!0},p(o,r){i?i.p&&(!t||r[0]&96|r[1]&32)&&ds(i,e,o,o[36],t?us(e,o[36],r,Wx):fs(o[36]),Nm):s&&s.p&&(!t||r[0]&36)&&s.p(o,t?r:[-1,-1])},i(o){t||(H(s,o),t=!0)},o(o){Y(s,o),t=!1},d(o){s&&s.d(o)}}}function Ux(n){let t,e,i;return e=new ay({props:{direction:"prev",disabled:!n[2]&&n[5]===0}}),e.$on("click",n[23]),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,o){const r={};o[0]&36&&(r.disabled=!s[2]&&s[5]===0),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function Wm(n){let t,e,i;return e=new Jk({props:{value:n[7]}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","sc-carousel-progress__container svelte-sme1z4")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,o){const r={};o[0]&128&&(r.value=s[7]),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function Um(n){let t;const e=n[37].next,i=hs(e,n,n[36],Bm),s=i||Qx(n);return{c(){s&&s.c()},m(o,r){s&&s.m(o,r),t=!0},p(o,r){i?i.p&&(!t||r[0]&96|r[1]&32)&&ds(i,e,o,o[36],t?us(e,o[36],r,Nx):fs(o[36]),Bm):s&&s.p&&(!t||r[0]&1060)&&s.p(o,t?r:[-1,-1])},i(o){t||(H(s,o),t=!0)},o(o){Y(s,o),t=!1},d(o){s&&s.d(o)}}}function Qx(n){let t,e,i;return e=new ay({props:{direction:"next",disabled:!n[2]&&n[5]===n[10]-1}}),e.$on("click",n[14].showNextPage),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,o){const r={};o[0]&1060&&(r.disabled=!s[2]&&s[5]===s[10]-1),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function Qm(n){let t;const e=n[37].dots,i=hs(e,n,n[36],Fm),s=i||Xx(n);return{c(){s&&s.c()},m(o,r){s&&s.m(o,r),t=!0},p(o,r){i?i.p&&(!t||r[0]&1120|r[1]&32)&&ds(i,e,o,o[36],t?us(e,o[36],r,Hx):fs(o[36]),Fm):s&&s.p&&(!t||r[0]&1056)&&s.p(o,t?r:[-1,-1])},i(o){t||(H(s,o),t=!0)},o(o){Y(s,o),t=!1},d(o){s&&s.d(o)}}}function Xx(n){let t,e;return t=new Wk({props:{pagesCount:n[10],currentPageIndex:n[5]}}),t.$on("pageChange",n[41]),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s[0]&1024&&(o.pagesCount=i[10]),s[0]&32&&(o.currentPageIndex=i[5]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function Yx(n){let t,e,i,s,o,r,a,l,c,h,u,d,p=n[1]&&Gm(n);const m=n[37].default,g=hs(m,n,n[36],Hm);let v=n[3]&&Wm(n),y=n[1]&&Um(n),w=n[4]&&Qm(n);return{c(){t=U("div"),e=U("div"),p&&p.c(),i=ue(),s=U("div"),o=U("div"),g&&g.c(),a=ue(),v&&v.c(),l=ue(),y&&y.c(),c=ue(),w&&w.c(),P(o,"class","sc-carousel__pages-container svelte-sme1z4"),_(o,"transform","translateX("+n[8]+"px)"),_(o,"transition-duration",n[9]+"ms"),_(o,"transition-timing-function",n[0]),P(s,"class","sc-carousel__pages-window svelte-sme1z4"),P(e,"class","sc-carousel__content-container svelte-sme1z4"),P(t,"class","sc-carousel__carousel-container svelte-sme1z4")},m(C,E){Z(C,t,E),B(t,e),p&&p.m(e,null),B(e,i),B(e,s),B(s,o),g&&g.m(o,null),n[39](o),B(s,a),v&&v.m(s,null),n[40](s),B(e,l),y&&y.m(e,null),B(t,c),w&&w.m(t,null),h=!0,u||(d=[oi(r=r8.call(null,o,{thresholdProvider:n[38]})),_e(o,"swipeStart",n[16]),_e(o,"swipeMove",n[18]),_e(o,"swipeEnd",n[19]),_e(o,"swipeFailed",n[20]),_e(o,"swipeThresholdReached",n[17]),oi(h8.call(null,s)),_e(s,"hovered",n[21]),oi(m8.call(null,s)),_e(s,"tapped",n[22])],u=!0)},p(C,E){C[1]?p?(p.p(C,E),E[0]&2&&H(p,1)):(p=Gm(C),p.c(),H(p,1),p.m(e,i)):p&&(xe(),Y(p,1,1,()=>{p=null}),Se()),g&&g.p&&(!h||E[0]&96|E[1]&32)&&ds(g,m,C,C[36],h?us(m,C[36],E,Gx):fs(C[36]),Hm),(!h||E[0]&256)&&_(o,"transform","translateX("+C[8]+"px)"),(!h||E[0]&512)&&_(o,"transition-duration",C[9]+"ms"),(!h||E[0]&1)&&_(o,"transition-timing-function",C[0]),r&&vi(r.update)&&E[0]&2048&&r.update.call(null,{thresholdProvider:C[38]}),C[3]?v?(v.p(C,E),E[0]&8&&H(v,1)):(v=Wm(C),v.c(),H(v,1),v.m(s,null)):v&&(xe(),Y(v,1,1,()=>{v=null}),Se()),C[1]?y?(y.p(C,E),E[0]&2&&H(y,1)):(y=Um(C),y.c(),H(y,1),y.m(e,null)):y&&(xe(),Y(y,1,1,()=>{y=null}),Se()),C[4]?w?(w.p(C,E),E[0]&16&&H(w,1)):(w=Qm(C),w.c(),H(w,1),w.m(t,null)):w&&(xe(),Y(w,1,1,()=>{w=null}),Se())},i(C){h||(H(p),H(g,C),H(v),H(y),H(w),h=!0)},o(C){Y(p),Y(g,C),Y(v),Y(y),Y(w),h=!1},d(C){C&&X(t),p&&p.d(),g&&g.d(C),n[39](null),v&&v.d(),n[40](null),y&&y.d(),w&&w.d(),u=!1,dt(d)}}}function Zx(n,t,e){let{$$slots:i={},$$scope:s}=t,o=[],r,a,l=0,c=0,h=1;const[{data:u,progressManager:d},p,m]=Fx((ve,Ae)=>{Ih({currentPageIndex:()=>e(5,r=Ae),progressValue:()=>e(7,a=Ae),offset:()=>e(8,l=Ae),durationMs:()=>e(9,c=Ae),pagesCount:()=>e(10,h=Ae),loaded:()=>e(6,o=Ae)})(ve)}),g=Vn();let{timingFunction:v="ease-in-out"}=t,{arrows:y=!0}=t,{infinite:w=!0}=t,{initialPageIndex:C=0}=t,{duration:E=500}=t,{autoplay:D=!1}=t,{autoplayDuration:L=3e3}=t,{autoplayDirection:R=ps}=t,{pauseOnFocus:z=!1}=t,{autoplayProgressVisible:O=!1}=t,{dots:A=!0}=t,{swiping:M=!0}=t,{particlesToShow:I=1}=t,{particlesToScroll:k=1}=t;function x(ve,Ae){return $(this,null,function*(){const Oe=Or(Ae,"animated",!0);if(typeof ve!="number")throw new Error("pageIndex should be a number");yield p.showPage(ve,{animated:Oe})})}function S(ve){return $(this,null,function*(){const Ae=Or(ve,"animated",!0);yield p.showPrevPage({animated:Ae})})}function j(ve){return $(this,null,function*(){const Ae=Or(ve,"animated",!0);yield p.showNextPage({animated:Ae})})}let F=0,J,ne;const q=M8(({width:ve})=>{e(11,F=ve),u.particleWidth=F/u.particlesToShow,C8({particlesContainerChildren:ne.children,particleWidth:u.particleWidth}),p.offsetPage({animated:!1})});function oe(){const{clonesToAppend:ve,clonesToPrepend:Ae}=I8({clonesCountHead:u.clonesCountHead,clonesCountTail:u.clonesCountTail,particlesContainerChildren:ne.children});E8({particlesContainer:ne,clonesToAppend:ve,clonesToPrepend:Ae})}zt(()=>{$(this,null,function*(){yield dl(),ne&&J&&(u.particlesCountWithoutClones=ne.children.length,yield dl(),u.infinite&&oe(),u.particlesCount=ne.children.length,p.showPage(C,{animated:!1}),q.observe(J))})}),Kt(()=>{q.disconnect(),d.reset()});function se(ve){return $(this,null,function*(){yield p.showPage(ve,{animated:!0})})}function ae(){M&&(u.durationMs=0)}function ze(ve){return $(this,null,function*(){M&&(yield Ih({[ps]:p.showNextPage,[Yo]:p.showPrevPage})(ve.detail.direction))})}function ee(ve){M&&(u.offset+=ve.detail.dx)}function we(){M&&p.showParticle(u.currentParticleIndex)}function le(){return $(this,null,function*(){M&&(yield p.offsetPage({animated:!0}))})}function he(ve){u.focused=ve.detail.value}function be(){p.toggleFocused()}function te(){p.showPrevPage()}const ke=()=>F/3;function Re(ve){qe[ve?"unshift":"push"](()=>{ne=ve,e(13,ne)})}function ye(ve){qe[ve?"unshift":"push"](()=>{J=ve,e(12,J)})}const De=ve=>se(ve.detail);return n.$$set=ve=>{"timingFunction"in ve&&e(0,v=ve.timingFunction),"arrows"in ve&&e(1,y=ve.arrows),"infinite"in ve&&e(2,w=ve.infinite),"initialPageIndex"in ve&&e(24,C=ve.initialPageIndex),"duration"in ve&&e(25,E=ve.duration),"autoplay"in ve&&e(26,D=ve.autoplay),"autoplayDuration"in ve&&e(27,L=ve.autoplayDuration),"autoplayDirection"in ve&&e(28,R=ve.autoplayDirection),"pauseOnFocus"in ve&&e(29,z=ve.pauseOnFocus),"autoplayProgressVisible"in ve&&e(3,O=ve.autoplayProgressVisible),"dots"in ve&&e(4,A=ve.dots),"swiping"in ve&&e(30,M=ve.swiping),"particlesToShow"in ve&&e(31,I=ve.particlesToShow),"particlesToScroll"in ve&&e(32,k=ve.particlesToScroll),"$$scope"in ve&&e(36,s=ve.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&32&&g("pageChange",r),n.$$.dirty[0]&4&&(u.infinite=w),n.$$.dirty[0]&33554432&&(u.durationMsInit=E),n.$$.dirty[0]&67108864&&(u.autoplay=D),n.$$.dirty[0]&134217728&&(u.autoplayDuration=L),n.$$.dirty[0]&268435456&&(u.autoplayDirection=R),n.$$.dirty[0]&536870912&&(u.pauseOnFocus=z),n.$$.dirty[1]&1&&(u.particlesToShowInit=I),n.$$.dirty[1]&2&&(u.particlesToScrollInit=k)},[v,y,w,O,A,r,o,a,l,c,h,F,J,ne,p,se,ae,ze,ee,we,le,he,be,te,C,E,D,L,R,z,M,I,k,x,S,j,s,i,ke,Re,ye,De]}class qx extends Ee{constructor(t){super(),Ie(this,t,Zx,Yx,Me,{timingFunction:0,arrows:1,infinite:2,initialPageIndex:24,duration:25,autoplay:26,autoplayDuration:27,autoplayDirection:28,pauseOnFocus:29,autoplayProgressVisible:3,dots:4,swiping:30,particlesToShow:31,particlesToScroll:32,goTo:33,goToPrev:34,goToNext:35},Bx,[-1,-1])}get goTo(){return this.$$.ctx[33]}get goToPrev(){return this.$$.ctx[34]}get goToNext(){return this.$$.ctx[35]}}function Jx(n){Le(n,"svelte-159ski6",".media-item.svelte-159ski6.svelte-159ski6{position:relative;height:100%}.media-content.svelte-159ski6.svelte-159ski6{position:relative;pointer-events:auto;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:inherit;object-fit:inherit}.media-content.showPlayButton.svelte-159ski6.svelte-159ski6{pointer-events:none}.video-icon.svelte-159ski6.svelte-159ski6{width:12.5rem;height:6.25rem;max-width:60%;max-height:60%;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.video-play-button-container.svelte-159ski6.svelte-159ski6{display:none;position:absolute;width:100%;height:100%;top:0;left:0;transform:translate3d(0, 0, 0)}.video-play-button-container.showPlayButton.svelte-159ski6.svelte-159ski6{pointer-events:none;display:block}.video-icon.svelte-159ski6.svelte-159ski6{pointer-events:auto}.video-icon.large.svelte-159ski6.svelte-159ski6{width:12.5rem;height:6.25rem}.video-icon.small.svelte-159ski6.svelte-159ski6{width:1.75rem;height:1.75rem}.video-icon.svelte-159ski6 .video-icon-img.svelte-159ski6{width:100%;height:100%;background-position:center center;background-size:contain;background-repeat:no-repeat}.video-icon.svelte-159ski6 .video-icon-img.canPlay.svelte-159ski6{cursor:pointer}")}function Xm(n){let t;function e(o,r){if(o[2].type==="Image")return $x;if(o[2].type==="Video")return Kx}let i=e(n),s=i&&i(n);return{c(){t=U("div"),s&&s.c(),P(t,"class","media-item svelte-159ski6"),P(t,"draggable","false")},m(o,r){Z(o,t,r),s&&s.m(t,null)},p(o,r){i===(i=e(o))&&s?s.p(o,r):(s&&s.d(1),s=i&&i(o),s&&(s.c(),s.m(t,null)))},d(o){o&&X(t),s&&s.d()}}}function Kx(n){let t,e,i,s,o,r;function a(h,u){return h[8]&&h[2].videoCoverUrl?tS:eS}let l=a(n),c=l(n);return{c(){c.c(),t=ue(),e=U("div"),i=U("div"),s=U("div"),P(s,"class","video-icon-img svelte-159ski6"),_(s,"background-image","url("+n[21]()+")"),Pe(s,"canPlay",n[5]),P(i,"class","video-icon svelte-159ski6"),Pe(i,"large",n[4]==="large"),Pe(i,"small",n[4]==="small"),P(e,"class","video-play-button-container svelte-159ski6"),Pe(e,"showPlayButton",n[11])},m(h,u){c.m(h,u),Z(h,t,u),Z(h,e,u),B(e,i),B(i,s),o||(r=_e(s,"click",n[22]),o=!0)},p(h,u){l===(l=a(h))&&c?c.p(h,u):(c.d(1),c=l(h),c&&(c.c(),c.m(t.parentNode,t))),u&8&&_(s,"background-image","url("+h[21]()+")"),u&32&&Pe(s,"canPlay",h[5]),u&16&&Pe(i,"large",h[4]==="large"),u&16&&Pe(i,"small",h[4]==="small"),u&2048&&Pe(e,"showPlayButton",h[11])},d(h){c.d(h),h&&X(t),h&&X(e),o=!1,r()}}}function $x(n){let t,e,i;return{c(){t=U("img"),P(t,"class","media-content svelte-159ski6"),at(t.src,e=n[2].url)||P(t,"src",e),P(t,"alt",i=n[2].name),P(t,"draggable",!1),_(t,"object-fit",n[7])},m(s,o){Z(s,t,o)},p(s,o){o&4&&!at(t.src,e=s[2].url)&&P(t,"src",e),o&4&&i!==(i=s[2].name)&&P(t,"alt",i),o&128&&_(t,"object-fit",s[7])},d(s){s&&X(t)}}}function eS(n){let t,e,i,s,o,r;return{c(){t=U("video"),P(t,"class","media-content svelte-159ski6"),at(t.src,e=n[2].videoCoverUrl?n[2].url:n[2].url+"#t=0.1")||P(t,"src",e),P(t,"poster",i=n[2].videoCoverUrl),P(t,"preload",s=n[2].videoCoverUrl?"none":"auto"),P(t,"disablepictureinpicture",""),t.playsInline=!0,P(t,"paused",""),t.muted=!0,P(t,"draggable",!1),t.loop=!1,P(t,"crossorigin",""),t.autoplay=n[6],t.controls=!1,Pe(t,"showPlayButton",n[11]),_(t,"object-fit",n[7])},m(a,l){Z(a,t,l),n[20](t),o||(r=[_e(t,"play",n[15]),_e(t,"pause",n[16]),_e(t,"error",n[17]),_e(t,"ended",n[18]),_e(t,"click",n[19])],o=!0)},p(a,l){l&4&&!at(t.src,e=a[2].videoCoverUrl?a[2].url:a[2].url+"#t=0.1")&&P(t,"src",e),l&4&&i!==(i=a[2].videoCoverUrl)&&P(t,"poster",i),l&4&&s!==(s=a[2].videoCoverUrl?"none":"auto")&&P(t,"preload",s),l&64&&(t.autoplay=a[6]),l&2048&&Pe(t,"showPlayButton",a[11]),l&128&&_(t,"object-fit",a[7])},d(a){a&&X(t),n[20](null),o=!1,dt(r)}}}function tS(n){let t,e,i;return{c(){t=U("img"),P(t,"class","media-content svelte-159ski6"),at(t.src,e=n[2].videoCoverUrl)||P(t,"src",e),P(t,"alt",i=n[2].name),P(t,"draggable",!1),_(t,"object-fit",n[7])},m(s,o){Z(s,t,o)},p(s,o){o&4&&!at(t.src,e=s[2].videoCoverUrl)&&P(t,"src",e),o&4&&i!==(i=s[2].name)&&P(t,"alt",i),o&128&&_(t,"object-fit",s[7])},d(s){s&&X(t)}}}function iS(n){let t,e=n[2]&&Xm(n);return{c(){e&&e.c(),t=Be()},m(i,s){e&&e.m(i,s),Z(i,t,s)},p(i,[s]){i[2]?e?e.p(i,s):(e=Xm(i),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:ce,o:ce,d(i){e&&e.d(i),i&&X(t)}}}function nS(n,t,e){let i,s,{mediaInstance:o={videoInstance:void 0,paused:!0}}=t,{tag:r}=t,{media:a}=t,{playButtonIfNeed:l="withoutText"}=t,{playButtonSizeIfNeed:c="small"}=t,{canPlay:h=!0}=t,{autoplayVideo:u=!1}=t,{objectFit:d="fill"}=t,{disableVideoIfHavePoster:p=!1}=t,m=!0,g=!1;function v(){e(9,g=(a==null?void 0:a.type)==="Video"&&!!a.videoCoverUrl)}const y=cn("mediaStore"),w=cn("hooks"),C=()=>{g||i&&(e(10,i.muted=!0,i),i.play(),i.pause(),e(10,i.muted=!1,i),e(9,g=!0))};w.on("loadVideoFirstFrame",C),zt(()=>{y.subscribe(({currentMediaElement:I})=>{I!==i&&(i==null||i.pause())})});const E=I=>{e(11,m=!1),e(0,o.paused=!1,o),e(9,g=!0),i&&y.set({currentMediaElement:i}),w.emit("playStateChange",{event:I,state:"playing",tag:r,mediaInstance:i})},D=I=>{e(11,m=!0),e(0,o.paused=!0,o),w.emit("playStateChange",{event:I,state:"paused",tag:r,mediaInstance:i})},L=I=>{e(11,m=!0),e(0,o.paused=!0,o),w.emit("playStateChange",{event:I,state:"paused",tag:r,mediaInstance:i})},R=I=>{e(11,m=!0),e(0,o.paused=!0,o),w.emit("playStateChange",{event:I,state:"paused",tag:r,mediaInstance:i})},z=I=>{i&&i.pause()};function O(I){qe[I?"unshift":"push"](()=>{o.videoInstance=I,e(0,o)})}const A=()=>l==="withText"?Uu:l==="withoutText"?bh:l,M=I=>{h&&i&&(e(10,i.muted=!1,i),i.play())};return n.$$set=I=>{"mediaInstance"in I&&e(0,o=I.mediaInstance),"tag"in I&&e(1,r=I.tag),"media"in I&&e(2,a=I.media),"playButtonIfNeed"in I&&e(3,l=I.playButtonIfNeed),"playButtonSizeIfNeed"in I&&e(4,c=I.playButtonSizeIfNeed),"canPlay"in I&&e(5,h=I.canPlay),"autoplayVideo"in I&&e(6,u=I.autoplayVideo),"objectFit"in I&&e(7,d=I.objectFit),"disableVideoIfHavePoster"in I&&e(8,p=I.disableVideoIfHavePoster)},n.$$.update=()=>{if(n.$$.dirty&1&&e(10,i=o.videoInstance),n.$$.dirty&4&&e(14,s=a==null?void 0:a.url),n.$$.dirty&16384&&s&&v(),n.$$.dirty&1024&&i&&e(11,m=i.paused),n.$$.dirty&1540&&(a==null?void 0:a.type)==="Video"&&!g){const I=navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1,x=navigator.userAgent.toLowerCase().indexOf("iphone")!==-1&&I;i&&x&&i.paused&&(document.removeEventListener("WeixinJSBridgeReady",C),document.removeEventListener("touchstart",C),document.removeEventListener("click",C),document.addEventListener("WeixinJSBridgeReady",C),document.addEventListener("touchstart",C),document.addEventListener("click",C))}},[o,r,a,l,c,h,u,d,p,g,i,m,y,w,s,E,D,L,R,z,O,A,M]}class id extends Ee{constructor(t){super(),Ie(this,t,nS,iS,Me,{mediaInstance:0,tag:1,media:2,playButtonIfNeed:3,playButtonSizeIfNeed:4,canPlay:5,autoplayVideo:6,objectFit:7,disableVideoIfHavePoster:8},Jx)}}function sS(n){Le(n,"svelte-1mrbqlg",".media-list-wrapper.svelte-1mrbqlg.svelte-1mrbqlg{width:100%;height:100%;position:relative;overflow:hidden;border-radius:0.125rem}.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg{position:relative;pointer-events:auto;height:100%;left:50%;top:50%;transform:translate(-50%, -50%)}.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg .sc-carousel__carousel-container,.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg .sc-carousel__content-container{height:100%}")}function Ym(n,t,e){const i=n.slice();return i[28]=t[e],i[29]=t,i[30]=e,i}function Zm(n){let t,e,i,s,o,r,a;const l=[rS,oS],c=[];function h(u,d){return u[13]&&u[10].length>1?0:1}return i=h(n),s=c[i]=l[i](n),{c(){t=U("div"),e=U("div"),s.c(),P(e,"class","media-list svelte-1mrbqlg"),Pe(e,"carouselEnabled",n[13]),P(t,"class","media-list-wrapper svelte-1mrbqlg"),Pe(t,"unfolded",n[5])},m(u,d){Z(u,t,d),B(t,e),c[i].m(e,null),a=!0},p(u,d){n=u;let p=i;i=h(n),i===p?c[i].p(n,d):(xe(),Y(c[p],1,1,()=>{c[p]=null}),Se(),s=c[i],s?s.p(n,d):(s=c[i]=l[i](n),s.c()),H(s,1),s.m(e,null)),(!a||d[0]&8192)&&Pe(e,"carouselEnabled",n[13]),(!a||d[0]&32)&&Pe(t,"unfolded",n[5])},i(u){a||(H(s),u&&At(()=>{a&&(r&&r.end(1),o=vs(t,Yd,n[6]?{y:4,duration:n[4],delay:n[2],easing:Rn}:void 0),o.start())}),a=!0)},o(u){Y(s),o&&o.invalidate(),u&&(r=qo(t,Yd,n[6]?{y:4,duration:n[4],delay:n[3],easing:Rn}:void 0)),a=!1},d(u){u&&X(t),c[i].d(),u&&r&&r.end()}}}function oS(n){let t,e,i;const s=[{media:n[1][0]},{autoplayVideo:n[14]},n[7],{tag:n[0]}];function o(a){n[21](a)}let r={};for(let a=0;a<s.length;a+=1)r=pt(r,s[a]);return n[8][0]!==void 0&&(r.mediaInstance=n[8][0]),t=new id({props:r}),qe.push(()=>Wl(t,"mediaInstance",o)),{c(){ge(t.$$.fragment)},m(a,l){pe(t,a,l),i=!0},p(a,l){const c=l[0]&16515?yt(s,[l[0]&2&&{media:a[1][0]},l[0]&16384&&{autoplayVideo:a[14]},l[0]&128&&Jv(a[7]),l[0]&1&&{tag:a[0]}]):{};!e&&l[0]&256&&(e=!0,c.mediaInstance=a[8][0],Gl(()=>e=!1)),t.$set(c)},i(a){i||(H(t.$$.fragment,a),i=!0)},o(a){Y(t.$$.fragment,a),i=!1},d(a){me(t,a)}}}function rS(n){let t,e,i={dots:!1,arrows:!1,$$slots:{default:[aS]},$$scope:{ctx:n}};return t=new qx({props:i}),n[19](t),t.$on("pageChange",n[20]),{c(){ge(t.$$.fragment)},m(s,o){pe(t,s,o),e=!0},p(s,o){const r={};o[0]&1409|o[1]&1&&(r.$$scope={dirty:o,ctx:s}),t.$set(r)},i(s){e||(H(t.$$.fragment,s),e=!0)},o(s){Y(t.$$.fragment,s),e=!1},d(s){n[19](null),me(t,s)}}}function qm(n){let t,e,i;const s=[n[7],{media:n[28]},{tag:n[0]}];function o(a){n[18](a,n[30])}let r={};for(let a=0;a<s.length;a+=1)r=pt(r,s[a]);return n[8][n[30]]!==void 0&&(r.mediaInstance=n[8][n[30]]),t=new id({props:r}),qe.push(()=>Wl(t,"mediaInstance",o)),{c(){ge(t.$$.fragment)},m(a,l){pe(t,a,l),i=!0},p(a,l){n=a;const c=l[0]&1153?yt(s,[l[0]&128&&Jv(n[7]),l[0]&1024&&{media:n[28]},l[0]&1&&{tag:n[0]}]):{};!e&&l[0]&256&&(e=!0,c.mediaInstance=n[8][n[30]],Gl(()=>e=!1)),t.$set(c)},i(a){i||(H(t.$$.fragment,a),i=!0)},o(a){Y(t.$$.fragment,a),i=!1},d(a){me(t,a)}}}function aS(n){let t,e,i=n[10],s=[];for(let r=0;r<i.length;r+=1)s[r]=qm(Ym(n,i,r));const o=r=>Y(s[r],1,1,()=>{s[r]=null});return{c(){for(let r=0;r<s.length;r+=1)s[r].c();t=Be()},m(r,a){for(let l=0;l<s.length;l+=1)s[l]&&s[l].m(r,a);Z(r,t,a),e=!0},p(r,a){if(a[0]&1409){i=r[10];let l;for(l=0;l<i.length;l+=1){const c=Ym(r,i,l);s[l]?(s[l].p(c,a),H(s[l],1)):(s[l]=qm(c),s[l].c(),H(s[l],1),s[l].m(t.parentNode,t))}for(xe(),l=i.length;l<s.length;l+=1)o(l);Se()}},i(r){if(!e){for(let a=0;a<i.length;a+=1)H(s[a]);e=!0}},o(r){s=s.filter(Boolean);for(let a=0;a<s.length;a+=1)Y(s[a]);e=!1},d(r){Ti(s,r),r&&X(t)}}}function lS(n){let t,e,i=n[5]&&Zm(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,o){s[5]?i?(i.p(s,o),o[0]&32&&H(i,1)):(i=Zm(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function cS(n,t,e){let i,s,o,r,{tag:a}=t,{mediaData:l}=t,{inDelay:c=0}=t,{outDelay:h=0}=t,{duration:u=0}=t,{unfolded:d=!0}=t,{animation:p=!0}=t,{mediaItemConfig:m}=t,{enableCarousel:g=!0}=t,{autoplayConfig:v={}}=t;const{autoplayVideo:y=!1,autoplayCarousel:w=!0,autoplayVideoInCarousel:C=!1}=v;let E=[],D=0,L,R=null;const z=cn("hooks"),O=cn("mediaStore");function A(){const S=E[D],j=S==null?void 0:S.videoInstance;j&&(j.paused?(j.muted=!1,j.play()):j.pause())}zt(()=>{z.on("click",S=>{var j;(j=a.tag3DContentSvelte)!=null&&j.css3DInstance&&S.tag.id===a.id&&S.target==="TagContent"&&A()}),e(0,a.play=()=>{const S=E[D],j=S==null?void 0:S.videoInstance;j&&(j.muted=!1,j.play())},a),e(0,a.pause=()=>{const S=E[D],j=S==null?void 0:S.videoInstance;j&&j.pause()},a),R=setInterval(()=>{r&&(L==null||L.goToNext())},3e3)}),Kt(()=>{clearInterval(R),z.off("click",A)});function M(S,j){n.$$.not_equal(E[j],S)&&(E[j]=S,e(8,E))}function I(S){qe[S?"unshift":"push"](()=>{L=S,e(12,L)})}const k=S=>{i||O.set({currentMediaElement:null}),e(11,D=S.detail)};function x(S){n.$$.not_equal(E[0],S)&&(E[0]=S,e(8,E))}return n.$$set=S=>{"tag"in S&&e(0,a=S.tag),"mediaData"in S&&e(1,l=S.mediaData),"inDelay"in S&&e(2,c=S.inDelay),"outDelay"in S&&e(3,h=S.outDelay),"duration"in S&&e(4,u=S.duration),"unfolded"in S&&e(5,d=S.unfolded),"animation"in S&&e(6,p=S.animation),"mediaItemConfig"in S&&e(7,m=S.mediaItemConfig),"enableCarousel"in S&&e(16,g=S.enableCarousel),"autoplayConfig"in S&&e(17,v=S.autoplayConfig)},n.$$.update=()=>{n.$$.dirty[0]&256&&e(9,i=E.every(S=>S.paused)),n.$$.dirty[0]&65538&&e(13,s=g&&(l==null?void 0:l.length)>1),n.$$.dirty[0]&2&&e(10,o=l),n.$$.dirty[0]&1536&&(r=o.length>1&&w&&i)},[a,l,c,h,u,d,p,m,E,i,o,D,L,s,y,O,g,v,M,I,k,x]}class yy extends Ee{constructor(t){super(),Ie(this,t,cS,lS,Me,{tag:0,mediaData:1,inDelay:2,outDelay:3,duration:4,unfolded:5,animation:6,mediaItemConfig:7,enableCarousel:16,autoplayConfig:17},sS,[-1,-1])}}function hS(n){Le(n,"svelte-1f7m1lj",".line.svelte-1f7m1lj{position:absolute;width:6.5625rem;height:1.3125rem;transform:translateY(-100%)}.text.svelte-1f7m1lj{position:absolute;width:6.25rem;left:1rem;bottom:0.0625rem;font-weight:600}.media-wrapper.svelte-1f7m1lj{position:absolute;left:0.875rem;top:-5.3125rem;width:5.625rem;height:3.75rem;font-weight:600}")}function Jm(n){let t,e,i,s,o,r,a,l;t=new Xi({props:{visible:n[3],left:61,bottom:57,width:2,blurRadius:150,spreadRadius:75}}),s=new Rk({props:{unfolded:n[3],outDelay:400}});let c=n[2]&&Km(n),h=n[1]&&$m(n);return{c(){ge(t.$$.fragment),e=ue(),i=U("div"),ge(s.$$.fragment),o=ue(),c&&c.c(),r=ue(),h&&h.c(),a=Be(),P(i,"class","line svelte-1f7m1lj")},m(u,d){pe(t,u,d),Z(u,e,d),Z(u,i,d),pe(s,i,null),Z(u,o,d),c&&c.m(u,d),Z(u,r,d),h&&h.m(u,d),Z(u,a,d),l=!0},p(u,d){const p={};d&8&&(p.visible=u[3]),t.$set(p);const m={};d&8&&(m.unfolded=u[3]),s.$set(m),u[2]?c?(c.p(u,d),d&4&&H(c,1)):(c=Km(u),c.c(),H(c,1),c.m(r.parentNode,r)):c&&(xe(),Y(c,1,1,()=>{c=null}),Se()),u[1]?h?(h.p(u,d),d&2&&H(h,1)):(h=$m(u),h.c(),H(h,1),h.m(a.parentNode,a)):h&&(xe(),Y(h,1,1,()=>{h=null}),Se())},i(u){l||(H(t.$$.fragment,u),H(s.$$.fragment,u),H(c),H(h),l=!0)},o(u){Y(t.$$.fragment,u),Y(s.$$.fragment,u),Y(c),Y(h),l=!1},d(u){me(t,u),u&&X(e),u&&X(i),me(s),u&&X(o),c&&c.d(u),u&&X(r),h&&h.d(u),u&&X(a)}}}function Km(n){let t,e,i;return e=new oy({props:{unfolded:n[3],content:n[2],inDelay:500}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","text svelte-1f7m1lj")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,o){const r={};o&8&&(r.unfolded=s[3]),o&4&&(r.content=s[2]),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function $m(n){let t,e,i;return e=new yy({props:{autoplayConfig:{autoplayCarousel:!1},unfolded:n[3],mediaData:n[1],tag:n[0],enableCarousel:!1,mediaItemConfig:{canPlay:!1,playButtonSizeIfNeed:"small",disableVideoIfHavePoster:!0},inDelay:500,duration:500}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","media-wrapper svelte-1f7m1lj")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,o){const r={};o&8&&(r.unfolded=s[3]),o&2&&(r.mediaData=s[1]),o&1&&(r.tag=s[0]),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function uS(n){let t,e,i=n[0].state&&Jm(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[0].state?i?(i.p(s,o),o&1&&H(i,1)):(i=Jm(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function dS(n,t,e){let i,s,o,r,{tag:a}=t;return n.$$set=l=>{"tag"in l&&e(0,a=l.tag)},n.$$.update=()=>{var l,c,h;n.$$.dirty&1&&e(3,i=a.state?a.state.unfolded:!1),n.$$.dirty&1&&e(4,s=(c=(l=a.data.title)!=null?l:a.data.text)!=null?c:""),n.$$.dirty&16&&e(2,o=((h=s.length)!=null?h:0)>7?s.substring(0,6)+"...":s),n.$$.dirty&1&&e(1,r=a.data.mediaData)},[a,r,o,i,s]}class fS extends Ee{constructor(t){super(),Ie(this,t,dS,uS,Me,{tag:0},hS)}}const pS="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAMAAAAolt3jAAAAOVBMVEUAAAD///////////////////////////////////////////////////////////////////////8KOjVvAAAAE3RSTlMAZV7nzWlZRTewq5CJUlEeHA4Lu1bjhwAAADRJREFUCNdjIAz4mFC4gtyMKHx+TlYUPgcLKp+RmQmVy4aiGFlSgAtZToiHF1kjOzsDUQAAVSIA07bTGZwAAAAASUVORK5CYII=",mS="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAMAAAAolt3jAAAAM1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACjBUbJAAAAEXRSTlMAUUg+uqRVTBcKjop0bjUtK+w+Um4AAAA1SURBVAjXYyAMmNlRuJw8jCh8Di42FD4/KyqfkYUdlcuExBNgReZxcCPzOHmZkTXygXmEAQBMcAC8/O73cwAAAABJRU5ErkJggg==";function gS(n){Le(n,"svelte-biv7k0",'@charset "UTF-8";.svelte-biv7k0.svelte-biv7k0{box-sizing:border-box}.marketing.svelte-biv7k0.svelte-biv7k0{transform:translateY(-100%)}.marketing.svelte-biv7k0 .line.svelte-biv7k0{position:absolute;height:1.875rem;width:0.0625rem;left:50%;transform:translateX(-50%);background-color:white;bottom:0;transform-origin:bottom;transition:all 500ms}.marketing.svelte-biv7k0 .content.svelte-biv7k0{position:relative;min-width:7.5rem;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;border-radius:0.375rem;top:-1.875rem;left:-1rem;transition-property:opacity, transform;transition-duration:500ms}.marketing.svelte-biv7k0 .content .headerImage.svelte-biv7k0{width:100%;position:absolute;left:0;top:0;transform:translateY(-100%);border-top-left-radius:0.375rem;border-top-right-radius:0.375rem}.marketing.svelte-biv7k0 .content .content-wrapper.svelte-biv7k0{width:100%;padding:1.25rem}.title-wrapper.svelte-biv7k0.svelte-biv7k0{position:relative;width:100%}.title-wrapper.svelte-biv7k0 .title.svelte-biv7k0{border-radius:0.25rem;width:100%}.title-wrapper.svelte-biv7k0 .title .text.svelte-biv7k0{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-word;overflow-wrap:break-word;hyphens:auto;-webkit-hyphens:auto;letter-spacing:0;font-size:1rem;font-weight:600;line-height:1.375rem}.price-wrapper.svelte-biv7k0.svelte-biv7k0{box-sizing:border-box;width:100%;margin-top:0.5rem;display:flex;justify-content:space-between;align-items:center}.price-wrapper.svelte-biv7k0 .price-section.svelte-biv7k0{flex-shrink:0;overflow:hidden;white-space:nowrap}.price-wrapper.svelte-biv7k0 .price-section .value.svelte-biv7k0{font-size:1.25rem;font-weight:700;line-height:1.5rem;font-family:DINAlternate-Bold TG-TYPE, PingFangSC, Segoe UI, Rototo, sans-serif;letter-spacing:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.price-wrapper.svelte-biv7k0 .price-section .unit.svelte-biv7k0{font-size:1.25rem;font-weight:700;line-height:1.5rem;font-family:DINAlternate-Bold TG-TYPE, PingFangSC, Segoe UI, Rototo, sans-serif !important;letter-spacing:0}.price-wrapper.svelte-biv7k0 .action-section.svelte-biv7k0{display:flex;align-items:center;height:1.125rem}.price-wrapper.svelte-biv7k0 .action-section .highlight-text.svelte-biv7k0{font-size:0.75rem;line-height:1.125rem;font-weight:400;letter-spacing:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:8.75rem}.tags-wrapper.svelte-biv7k0.svelte-biv7k0{position:relative;overflow:hidden;margin-top:0.3125rem}.tags-wrapper.svelte-biv7k0 .tags.svelte-biv7k0{position:relative;display:inline-flex;max-width:100%;flex-wrap:wrap}.tags-wrapper.svelte-biv7k0 .tags .tag.svelte-biv7k0{display:block;text-align:center;flex-shrink:0;flex-grow:0;font-size:0.75rem;font-weight:400;height:1.125rem;line-height:1.125rem;margin-right:0.25rem;margin-bottom:0.25rem;padding:0 0.25rem;border-radius:0.125rem;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}.media-wrapper.svelte-biv7k0.svelte-biv7k0{margin-top:0.375rem;width:100%;aspect-ratio:16/9;border-radius:0.25rem;overflow:hidden}.description.svelte-biv7k0.svelte-biv7k0{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4;width:100%;overflow:hidden;text-overflow:ellipsis;word-break:break-word;overflow-wrap:break-word;hyphens:auto;-webkit-hyphens:auto;white-space:normal;margin-top:0.25rem;font-size:0.875rem;font-weight:400;line-height:1.25rem;letter-spacing:0}.more-share-wrapper.svelte-biv7k0.svelte-biv7k0{margin-top:0.75rem;display:block;width:100%;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between}.more-share-wrapper.svelte-biv7k0 .more-text.svelte-biv7k0{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:center;height:1.25rem;font-size:0.875rem;font-weight:500;line-height:1.25rem;letter-spacing:0}.more-share-wrapper.svelte-biv7k0 .more-text .more-icon.svelte-biv7k0{margin-left:0.125rem;width:0.875rem;height:0.875rem}.marketing.light.svelte-biv7k0 .content.svelte-biv7k0{background-color:white}.marketing.light.svelte-biv7k0 .content .title-wrapper .title .text.svelte-biv7k0{color:rgba(0, 0, 0, 0.8)}.marketing.light.svelte-biv7k0 .content .tags-wrapper .tags .primary-tag.svelte-biv7k0{background:rgba(234, 208, 154, 0.5);color:#946700}.marketing.light.svelte-biv7k0 .content .tags-wrapper .tags .secondary-tag.svelte-biv7k0{background:rgba(0, 0, 0, 0.06);color:rgba(0, 0, 0, 0.5)}.marketing.light.svelte-biv7k0 .content .description.svelte-biv7k0{color:#000}.marketing.light.svelte-biv7k0 .content .price-wrapper.svelte-biv7k0{color:#ae7900}.marketing.light.svelte-biv7k0 .content .more-share-wrapper .more-text.svelte-biv7k0{font-family:PingFangSC-Medium;color:rgba(0, 0, 0, 0.8509803922)}.marketing.dark.svelte-biv7k0 .content.svelte-biv7k0{background-color:rgba(0, 0, 0, 0.75)}.marketing.dark.svelte-biv7k0 .content .title-wrapper .title .text.svelte-biv7k0{color:white}.marketing.dark.svelte-biv7k0 .content .tags-wrapper .tags .primary-tag.svelte-biv7k0{background:rgba(234, 208, 154, 0.5);color:white}.marketing.dark.svelte-biv7k0 .content .tags-wrapper .tags .secondary-tag.svelte-biv7k0{background:rgba(255, 255, 255, 0.15);color:rgba(255, 255, 255, 0.85)}.marketing.dark.svelte-biv7k0 .content .description.svelte-biv7k0{color:#fff}.marketing.dark.svelte-biv7k0 .content .price-wrapper.svelte-biv7k0{color:#ead09a;fill:#ead09a}.marketing.dark.svelte-biv7k0 .content .more-share-wrapper .more-text.svelte-biv7k0{font-family:PingFangSC-Medium;color:#fff}.marketing.unfolded.svelte-biv7k0 .line.svelte-biv7k0{transform:translateX(-50%) scale(1, 1);transition-timing-function:ease-out}.marketing.folded.svelte-biv7k0 .line.svelte-biv7k0{transform:translateX(-50%) scale(1, 0);transition-timing-function:ease-in}.marketing.unfolded.svelte-biv7k0 .content.svelte-biv7k0{opacity:1;transform:translateY(0);transition-timing-function:ease-out}.marketing.folded.svelte-biv7k0 .content.svelte-biv7k0{opacity:0;transform:translateY(0.425rem);transition-timing-function:ease-in}.tag.svelte-biv7k0.svelte-biv7k0,.text.svelte-biv7k0.svelte-biv7k0{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}')}function eg(n,t,e){const i=n.slice();return i[0]=t[e],i}function tg(n,t,e){const i=n.slice();return i[0]=t[e],i}function ig(n){let t,e;return{c(){t=U("img"),P(t,"class","headerImage svelte-biv7k0"),at(t.src,e=n[2].headerPictureUrl)||P(t,"src",e),P(t,"alt","")},m(i,s){Z(i,t,s)},p(i,s){s[0]&4&&!at(t.src,e=i[2].headerPictureUrl)&&P(t,"src",e)},d(i){i&&X(t)}}}function ng(n){let t,e,i,s,o,r=n[5]||[],a=[];for(let h=0;h<r.length;h+=1)a[h]=sg(tg(n,r,h));let l=n[4]||[],c=[];for(let h=0;h<l.length;h+=1)c[h]=og(eg(n,l,h));return{c(){t=U("div"),e=U("div");for(let h=0;h<a.length;h+=1)a[h].c();i=ue();for(let h=0;h<c.length;h+=1)c[h].c();P(e,"class","tags svelte-biv7k0"),P(t,"class","tags-wrapper svelte-biv7k0")},m(h,u){Z(h,t,u),B(t,e);for(let d=0;d<a.length;d+=1)a[d]&&a[d].m(e,null);B(e,i);for(let d=0;d<c.length;d+=1)c[d]&&c[d].m(e,null);s||(o=[oi(_i.call(null,e)),_e(e,"clientHeight",n[26])],s=!0)},p(h,u){if(u[0]&32){r=h[5]||[];let d;for(d=0;d<r.length;d+=1){const p=tg(h,r,d);a[d]?a[d].p(p,u):(a[d]=sg(p),a[d].c(),a[d].m(e,i))}for(;d<a.length;d+=1)a[d].d(1);a.length=r.length}if(u[0]&16){l=h[4]||[];let d;for(d=0;d<l.length;d+=1){const p=eg(h,l,d);c[d]?c[d].p(p,u):(c[d]=og(p),c[d].c(),c[d].m(e,null))}for(;d<c.length;d+=1)c[d].d(1);c.length=l.length}},d(h){h&&X(t),Ti(a,h),Ti(c,h),s=!1,dt(o)}}}function sg(n){let t,e=n[0]+"",i;return{c(){t=U("div"),i=Fe(e),P(t,"class","tag primary-tag svelte-biv7k0"),_(t,"min-width",nd)},m(s,o){Z(s,t,o),B(t,i)},p(s,o){o[0]&32&&e!==(e=s[0]+"")&&Ne(i,e)},d(s){s&&X(t)}}}function og(n){let t,e=n[0]+"",i;return{c(){t=U("div"),i=Fe(e),P(t,"class","tag secondary-tag svelte-biv7k0"),_(t,"min-width",nd)},m(s,o){Z(s,t,o),B(t,i)},p(s,o){o[0]&16&&e!==(e=s[0]+"")&&Ne(i,e)},d(s){s&&X(t)}}}function rg(n){let t,e,i;return e=new id({props:{media:n[16][0],tag:n[0],objectFit:"cover"}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","media-wrapper svelte-biv7k0")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,o){const r={};o[0]&65536&&(r.media=s[16][0]),o[0]&1&&(r.tag=s[0]),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function ag(n){let t,e=n[2].description+"",i;return{c(){t=U("div"),i=Fe(e),P(t,"class","description svelte-biv7k0")},m(s,o){Z(s,t,o),B(t,i)},p(s,o){o[0]&4&&e!==(e=s[2].description+"")&&Ne(i,e)},d(s){s&&X(t)}}}function lg(n){let t,e,i,s=n[3]&&cg(n),o=!n[3]&&n[2].highlightText&&ug(n);return{c(){t=U("div"),s&&s.c(),e=ue(),i=U("div"),o&&o.c(),P(i,"class","action-section svelte-biv7k0"),P(t,"class","price-wrapper svelte-biv7k0")},m(r,a){Z(r,t,a),s&&s.m(t,null),B(t,e),B(t,i),o&&o.m(i,null)},p(r,a){r[3]?s?s.p(r,a):(s=cg(r),s.c(),s.m(t,e)):s&&(s.d(1),s=null),!r[3]&&r[2].highlightText?o?o.p(r,a):(o=ug(r),o.c(),o.m(i,null)):o&&(o.d(1),o=null)},d(r){r&&X(t),s&&s.d(),o&&o.d()}}}function cg(n){let t,e,i=n[2].price.value+"",s,o,r=n[2].price.unit&&hg(n);return{c(){t=U("div"),e=U("span"),s=Fe(i),o=ue(),r&&r.c(),P(e,"class","value svelte-biv7k0"),P(t,"class","price-section svelte-biv7k0")},m(a,l){Z(a,t,l),B(t,e),B(e,s),B(t,o),r&&r.m(t,null)},p(a,l){l[0]&4&&i!==(i=a[2].price.value+"")&&Ne(s,i),a[2].price.unit?r?r.p(a,l):(r=hg(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&X(t),r&&r.d()}}}function hg(n){let t,e=n[2].price.unit+"",i;return{c(){t=U("span"),i=Fe(e),P(t,"class","unit svelte-biv7k0")},m(s,o){Z(s,t,o),B(t,i)},p(s,o){o[0]&4&&e!==(e=s[2].price.unit+"")&&Ne(i,e)},d(s){s&&X(t)}}}function ug(n){let t,e=n[2].highlightText+"",i;return{c(){t=U("span"),i=Fe(e),P(t,"class","highlight-text svelte-biv7k0")},m(s,o){Z(s,t,o),B(t,i)},p(s,o){o[0]&4&&e!==(e=s[2].highlightText+"")&&Ne(i,e)},d(s){s&&X(t)}}}function dg(n){let t,e,i,s;function o(l,c){return l[17]?yS:vS}let r=o(n),a=r(n);return{c(){t=U("div"),e=U("div"),i=Fe(n[9]),s=ue(),a.c(),P(e,"class","more-text svelte-biv7k0"),P(t,"class","more-share-wrapper svelte-biv7k0")},m(l,c){Z(l,t,c),B(t,e),B(e,i),B(e,s),a.m(e,null)},p(l,c){c[0]&512&&Ne(i,l[9]),r===(r=o(l))&&a?a.p(l,c):(a.d(1),a=r(l),a&&(a.c(),a.m(e,null)))},d(l){l&&X(t),a.d()}}}function vS(n){let t,e;return{c(){t=U("img"),P(t,"class","more-icon svelte-biv7k0"),at(t.src,e=pS)||P(t,"src",e),P(t,"alt","查看更多")},m(i,s){Z(i,t,s)},p:ce,d(i){i&&X(t)}}}function yS(n){let t,e;return{c(){t=U("img"),P(t,"class","more-icon svelte-biv7k0"),at(t.src,e=mS)||P(t,"src",e),P(t,"alt","查看更多")},m(i,s){Z(i,t,s)},p:ce,d(i){i&&X(t)}}}function bS(n){let t,e,i,s,o,r,a,l,c,h,u,d=n[2].title+"",p,m,g,v,y,w,C,E,D,L;At(n[25]),e=new Xi({props:{visible:n[8],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let R=n[2].headerPictureUrl&&ig(n),z=n[11]&&ng(n),O=n[15]&&n[16]&&n[16].length>0&&rg(n),A=n[2].description&&ag(n),M=(n[3]||n[2].highlightText)&&lg(n),I=n[10]&&dg(n);return{c(){t=U("div"),ge(e.$$.fragment),i=ue(),s=U("div"),o=ue(),r=U("div"),R&&R.c(),a=ue(),l=U("div"),c=U("div"),h=U("div"),u=U("div"),p=Fe(d),m=ue(),z&&z.c(),g=ue(),O&&O.c(),v=ue(),A&&A.c(),y=ue(),M&&M.c(),w=ue(),I&&I.c(),P(s,"class","line svelte-biv7k0"),_(s,"transition-delay",n[8]?n[14]+"ms":n[13]+"ms"),P(u,"class","text svelte-biv7k0"),P(h,"class","title svelte-biv7k0"),P(c,"class","title-wrapper svelte-biv7k0"),P(l,"class","content-wrapper svelte-biv7k0"),_(l,"padding-top",n[2].headerPictureUrl?"10px":"20px"),P(r,"class","content svelte-biv7k0"),_(r,"max-width",gi(n[6])),_(r,"transition-delay",n[8]?n[12]+"ms":"0ms"),_(r,"border-top-left-radius",n[2].headerPictureUrl?"0px":"6px"),_(r,"border-top-right-radius",n[2].headerPictureUrl?"0px":"6px"),P(t,"class",C=Mt(`marketing ${n[7]}`)+" svelte-biv7k0"),Pe(t,"unfolded",n[8]),Pe(t,"folded",n[18])},m(k,x){Z(k,t,x),pe(e,t,null),B(t,i),B(t,s),B(t,o),B(t,r),R&&R.m(r,null),B(r,a),B(r,l),B(l,c),B(c,h),B(h,u),B(u,p),B(l,m),z&&z.m(l,null),B(l,g),O&&O.m(l,null),B(l,v),A&&A.m(l,null),B(l,y),M&&M.m(l,null),B(l,w),I&&I.m(l,null),E=!0,D||(L=_e(window,"resize",n[25]),D=!0)},p(k,x){const S={};x[0]&256&&(S.visible=k[8]),e.$set(S),x[0]&24832&&_(s,"transition-delay",k[8]?k[14]+"ms":k[13]+"ms"),k[2].headerPictureUrl?R?R.p(k,x):(R=ig(k),R.c(),R.m(r,a)):R&&(R.d(1),R=null),(!E||x[0]&4)&&d!==(d=k[2].title+"")&&Ne(p,d),k[11]?z?z.p(k,x):(z=ng(k),z.c(),z.m(l,g)):z&&(z.d(1),z=null),k[15]&&k[16]&&k[16].length>0?O?(O.p(k,x),x[0]&98304&&H(O,1)):(O=rg(k),O.c(),H(O,1),O.m(l,v)):O&&(xe(),Y(O,1,1,()=>{O=null}),Se()),k[2].description?A?A.p(k,x):(A=ag(k),A.c(),A.m(l,y)):A&&(A.d(1),A=null),k[3]||k[2].highlightText?M?M.p(k,x):(M=lg(k),M.c(),M.m(l,w)):M&&(M.d(1),M=null),k[10]?I?I.p(k,x):(I=dg(k),I.c(),I.m(l,null)):I&&(I.d(1),I=null),x[0]&4&&_(l,"padding-top",k[2].headerPictureUrl?"10px":"20px"),x[0]&64&&_(r,"max-width",gi(k[6])),x[0]&4352&&_(r,"transition-delay",k[8]?k[12]+"ms":"0ms"),x[0]&4&&_(r,"border-top-left-radius",k[2].headerPictureUrl?"0px":"6px"),x[0]&4&&_(r,"border-top-right-radius",k[2].headerPictureUrl?"0px":"6px"),(!E||x[0]&128&&C!==(C=Mt(`marketing ${k[7]}`)+" svelte-biv7k0"))&&P(t,"class",C),(!E||x[0]&384)&&Pe(t,"unfolded",k[8]),(!E||x[0]&262272)&&Pe(t,"folded",k[18])},i(k){E||(H(e.$$.fragment,k),H(O),E=!0)},o(k){Y(e.$$.fragment,k),Y(O),E=!1},d(k){k&&X(t),me(e),R&&R.d(),z&&z.d(),O&&O.d(),A&&A.d(),M&&M.d(),I&&I.d(),D=!1,L()}}}const AS=499,wS=238,PS=280,nd=40;function CS(n,t,e){let i,s,o,r,a,l,c,h,u,d,p,m,g,v,y,w,C,E,D,{tag:L}=t,R=0,z,O=0,A=!1;function M(x){Math.abs(z-x)>5&&(e(20,z=x),setTimeout(()=>{e(22,A=!1)},100))}function I(){e(1,R=window.innerWidth)}const k=x=>M(x.detail);return n.$$set=x=>{"tag"in x&&e(0,L=x.tag)},n.$$.update=()=>{var x,S,j,F,J;n.$$.dirty[0]&1&&e(8,i=(S=(x=L.state)==null?void 0:x.unfolded)!=null?S:!1),n.$$.dirty[0]&256&&e(18,s=!i),n.$$.dirty[0]&1&&e(2,o=L.data),n.$$.dirty[0]&4&&e(3,r=Ge((j=o.price)==null?void 0:j.value)&&((F=o.price)==null?void 0:F.value)!==""),n.$$.dirty[0]&1&&e(7,a=L.data.theme||"light"),n.$$.dirty[0]&128&&e(17,l=a==="light"),n.$$.dirty[0]&4&&e(16,c=o.mediaData),n.$$.dirty[0]&1&&e(15,h=((J=L.config.popoverConfig)==null?void 0:J.showMedia)===!0),n.$$.dirty[0]&2&&e(24,u=R>0&&R<=AS),n.$$.dirty[0]&16777217&&e(6,d=(()=>{var q;const ne=(q=L.data.limitWidth)!=null?q:!0;if(typeof ne=="number")return ne;if(ne===!0)return u?wS:PS})()),n.$$.dirty[0]&7340096&&(!A||d&&d>0)&&(e(21,O=Math.max(1,Math.floor(((d||172)-20)/nd))),z!==void 0&&z>40&&e(21,O=Math.max(1,O-1)),e(22,A=!0)),n.$$.dirty[0]&2097156&&e(5,p=(o.brandTags||[]).filter(Boolean).slice(0,O)),n.$$.dirty[0]&2097184&&e(23,m=Math.max(0,O-p.length)),n.$$.dirty[0]&8388612&&e(4,g=(o.tags||[]).filter(Boolean).slice(0,m)),n.$$.dirty[0]&48&&e(11,C=p.length>0||g.length>0),n.$$.dirty[0]&12&&(r||o.highlightText),n.$$.dirty[0]&1&&e(10,E=L.config.popoverConfig.toolbar.showMore),n.$$.dirty[0]&1&&e(9,D=(()=>Ge(L.config.popoverConfig.viewMoreText)&&L.config.popoverConfig.viewMoreText.trim()!==""?L.config.popoverConfig.viewMoreText:"查看更多")())},e(14,v=400),e(13,y=180+500-500-40),e(12,w=400+180),[L,R,o,r,g,p,d,a,i,D,E,C,w,y,v,h,c,l,s,M,z,O,A,m,u,I,k]}class MS extends Ee{constructor(t){super(),Ie(this,t,CS,bS,Me,{tag:0},gS,[-1,-1])}}class fg{static checkBrowserSupport(){var l,c,h,u;const t=navigator.userAgent,e=document.createElement("audio");let i="Unknown",s="Unknown";t.includes("Edge/")?(i="Microsoft Edge",s=((l=t.match(/Edge\/(\d+)/))==null?void 0:l[1])||"Unknown"):t.includes("Chrome/")?(i="Chrome",s=((c=t.match(/Chrome\/(\d+)/))==null?void 0:c[1])||"Unknown"):t.includes("Firefox/")?(i="Firefox",s=((h=t.match(/Firefox\/(\d+)/))==null?void 0:h[1])||"Unknown"):t.includes("Safari/")&&!t.includes("Chrome")&&(i="Safari",s=((u=t.match(/Version\/(\d+)/))==null?void 0:u[1])||"Unknown");const o=[{name:"MP3",mime:"audio/mpeg"},{name:"OGG",mime:"audio/ogg"},{name:"WAV",mime:"audio/wav"},{name:"M4A",mime:"audio/mp4"},{name:"AAC",mime:"audio/aac"},{name:"WEBM",mime:"audio/webm"}],r=[],a=[];return o.forEach(d=>{const p=e.canPlayType(d.mime);p==="probably"?r.push(`${d.name} (完全支持)`):p==="maybe"?(r.push(`${d.name} (可能支持)`),a.push(`${d.name} 格式支持不确定,建议使用其他格式`)):a.push(`${d.name} 格式不被支持`)}),{browser:`${i} ${s}`,version:s,supportedFormats:r,warnings:a}}static testAudioUrl(t){return $(this,null,function*(){try{const e=yield fetch(t,{method:"HEAD"});return{accessible:e.ok,status:e.status,contentType:e.headers.get("content-type")||void 0,contentLength:parseInt(e.headers.get("content-length")||"0")||void 0}}catch(e){return{accessible:!1,error:e instanceof Error?e.message:String(e)}}})}static testAudioElement(t){return $(this,null,function*(){return new Promise(e=>{const i=new Audio;let s=!1;const o=()=>{s||(s=!0,i.removeEventListener("loadedmetadata",r),i.removeEventListener("error",l),i.removeEventListener("canplay",a))},r=()=>{o(),e({success:!0,duration:i.duration,networkState:i.networkState,readyState:i.readyState})},a=()=>{o(),e({success:!0,canPlay:"canplay",duration:i.duration,networkState:i.networkState,readyState:i.readyState})},l=()=>{o(),e({success:!1,error:i.error?`${i.error.code}: ${i.error.message}`:"Unknown audio error",networkState:i.networkState,readyState:i.readyState})};i.addEventListener("loadedmetadata",r),i.addEventListener("canplay",a),i.addEventListener("error",l),setTimeout(()=>{s||(o(),e({success:!1,error:"音频加载超时",networkState:i.networkState,readyState:i.readyState}))},1e4),i.src=t,i.load()})})}static diagnoseAudio(t){return $(this,null,function*(){var r;console.group("🎵 音频诊断报告"),console.group("1. 浏览器支持检查");const e=this.checkBrowserSupport();console.log("浏览器:",e.browser),console.log("支持的格式:",e.supportedFormats),e.warnings.length>0&&console.warn("警告:",e.warnings),console.groupEnd(),console.group("2. 音频文件URL检查"),console.log("音频URL:",t);try{new URL(t,window.location.href),console.log("✅ URL格式正确")}catch(a){console.error("❌ URL格式错误"),console.groupEnd(),console.groupEnd();return}const i=(r=t.split(".").pop())==null?void 0:r.toLowerCase();i&&(console.log("文件扩展名:",i.toUpperCase()),["mp3","ogg","wav","m4a","aac","webm"].includes(i)?console.log("✅ 文件格式常见"):console.warn("⚠️ 不常见的文件格式,可能存在兼容性问题")),console.groupEnd(),console.group("3. 网络可访问性测试");const s=yield this.testAudioUrl(t);s.accessible?(console.log("✅ 文件可访问"),console.log("HTTP状态:",s.status),s.contentType&&console.log("内容类型:",s.contentType),s.contentLength&&console.log("文件大小:",(s.contentLength/1024).toFixed(2),"KB")):(console.error("❌ 文件无法访问"),s.status&&console.error("HTTP状态:",s.status),s.error&&console.error("错误:",s.error)),console.groupEnd(),console.group("4. 音频元素测试");const o=yield this.testAudioElement(t);o.success?(console.log("✅ 音频元素创建成功"),o.duration&&console.log("音频时长:",o.duration.toFixed(2),"秒"),console.log("网络状态:",this.getNetworkStateDescription(o.networkState)),console.log("就绪状态:",this.getReadyStateDescription(o.readyState))):(console.error("❌ 音频元素创建失败"),console.error("错误:",o.error),console.log("网络状态:",this.getNetworkStateDescription(o.networkState)),console.log("就绪状态:",this.getReadyStateDescription(o.readyState))),console.groupEnd(),console.groupEnd()})}static getNetworkStateDescription(t){switch(t){case 0:return"NETWORK_EMPTY - 音频元素尚未初始化";case 1:return"NETWORK_IDLE - 音频元素处于活动状态但未使用网络";case 2:return"NETWORK_LOADING - 浏览器正在下载数据";case 3:return"NETWORK_NO_SOURCE - 未找到合适的音频源";default:return`未知状态 (${t})`}}static getReadyStateDescription(t){switch(t){case 0:return"HAVE_NOTHING - 没有音频数据";case 1:return"HAVE_METADATA - 已获取元数据";case 2:return"HAVE_CURRENT_DATA - 有当前播放位置的数据";case 3:return"HAVE_FUTURE_DATA - 有足够的数据开始播放";case 4:return"HAVE_ENOUGH_DATA - 有足够的数据流畅播放";default:return`未知状态 (${t})`}}}class IS extends Audio{constructor(e){super();f(this,"sharedAudioSrc");f(this,"sharedAudioPaused",!0);f(this,"sharedAudioCurrentTime",0);f(this,"tryplaying",!1);f(this,"audioInstance");f(this,"eventListenerDisposer");this.sharedAudioSrc=e,e&&this.validateAudioSource(e)}get paused(){var e;return(e=this.sharedAudioPaused)!=null?e:!0}get currentTime(){return this.sharedAudioCurrentTime}get duration(){var e;return((e=this.audioInstance)==null?void 0:e.duration)||0}play(){return $(this,null,function*(){var i,s,o;if(this.tryplaying)return;this.tryplaying=!0,(!this.audioInstance||((i=this.audioInstance)==null?void 0:i.realSrc)!==this.sharedAudioSrc)&&(this.audioInstance=T4(this.sharedAudioSrc,{namespace:Xu.PlayAudio})),(s=this.eventListenerDisposer)==null||s.call(this),this.eventListenerDisposer=this.addEventListeners(),this.audioInstance.currentTime=(o=this.currentTime)!=null?o:0;const e=this.audioInstance.currentTime!==this.currentTime;this.audioInstance.play().then(()=>{var r;this.audioInstance.muted=!1,e&&(this.audioInstance.currentTime=(r=this.currentTime)!=null?r:0),this.sharedAudioPaused=!1}).catch(r=>{var a;this.handlePlayError(r),this.endedHandler(),(a=this.onerror)==null||a.call(this,r)}).finally(()=>{this.tryplaying=!1})})}pause(e){var i;if(this.audioInstance&&!this.paused){if(this.sharedAudioPaused=!0,(i=this.eventListenerDisposer)==null||i.call(this),this.audioInstance.ended){this.endedHandler();return}this.audioInstance.paused||this.audioInstance.pause(),this.onpause(e!=null?e:new Event("pause")),this.clear()}}dispose(){var e;(e=this.eventListenerDisposer)==null||e.call(this),this.clear(),this.audioInstance=void 0}clear(){var e;(e=this.audioInstance)==null||e.clear()}handlePlayError(e){var o,r,a,l;const i=navigator.userAgent,s=this.sharedAudioSrc;if(console.group("🎵 音频播放错误详情"),console.error("错误对象:",e),console.error("错误名称:",e.name),console.error("错误信息:",e.message),console.error("音频文件路径:",s),console.error("浏览器信息:",i),console.error("音频实例状态:",{exists:!!this.audioInstance,readyState:(o=this.audioInstance)==null?void 0:o.readyState,networkState:(r=this.audioInstance)==null?void 0:r.networkState,error:(a=this.audioInstance)==null?void 0:a.error}),e.name==="NotSupportedError"){if(e.message.includes("no supported source was found")&&(console.error("❌ 错误原因: 无法找到支持的音频源"),console.error("💡 可能的解决方案:"),console.error(" 1. 检查音频文件路径是否正确"),console.error(" 2. 检查音频文件是否存在"),console.error(" 3. 检查音频文件格式是否被浏览器支持 (推荐: MP3, OGG, WAV)"),console.error(" 4. 检查CORS设置,确保可以跨域访问音频文件"),s)){const c=(l=s.split(".").pop())==null?void 0:l.toLowerCase(),h=["mp3","ogg","wav","m4a","aac"];c&&!h.includes(c)&&(console.error(` ⚠️ 检测到不常见的音频格式: .${c}`),console.error(` 📝 建议使用: ${h.join(", ")}`))}}else e.name==="AbortError"?console.error("❌ 错误原因: 音频播放被中断"):e.name==="NotAllowedError"?console.error("❌ 错误原因: 浏览器阻止了音频播放 (通常需要用户交互)"):e.message==="The operation is not supported."?console.error("❌ 错误原因: 音频文件可能损坏或格式有问题"):console.error("❌ 未知的音频播放错误");console.groupEnd(),e.name==="NotSupportedError"&&s&&(console.error("💡 建议运行完整音频诊断来查找问题根源:"),console.error(`AudioDiagnostics.diagnoseAudio("${s}")`),process.env.NODE_ENV==="development"&&(console.warn("🔍 自动运行音频诊断..."),fg.diagnoseAudio(s)))}validateAudioSource(e){var o;try{new URL(e,window.location.href)}catch(r){console.warn("🎵 音频URL格式可能有问题:",e),fg.diagnoseAudio(e);return}const i=(o=e.split(".").pop())==null?void 0:o.toLowerCase(),s=["mp3","ogg","wav","m4a","aac","webm"];i&&!s.includes(i)&&(console.warn("🎵 音频格式可能不被广泛支持:",i),console.warn("💡 建议使用常见格式:",s.join(", ")),console.warn('💡 运行音频诊断:AudioDiagnostics.diagnoseAudio("'+e+'")')),this.checkBrowserSupport(i)}checkBrowserSupport(e){if(!e)return;const i=document.createElement("audio"),o={mp3:"audio/mpeg",ogg:"audio/ogg",wav:"audio/wav",m4a:"audio/mp4",aac:"audio/aac",webm:"audio/webm"}[e];if(o){const r=i.canPlayType(o);r===""?(console.warn(`🎵 当前浏览器可能不支持 ${e.toUpperCase()} 格式`),console.warn("💡 建议提供多种格式的音频文件作为备选")):console.info(r==="maybe"?`🎵 当前浏览器可能支持 ${e.toUpperCase()} 格式 (不确定)`:`🎵 当前浏览器支持 ${e.toUpperCase()} 格式`)}}endedHandler(e){var i,s;(i=this.onended)==null||i.call(this,e!=null?e:new Event("ended")),(s=this.eventListenerDisposer)==null||s.call(this),this.sharedAudioPaused=!0,this.sharedAudioCurrentTime=0,this.clear()}addEventListeners(){const e=this.audioInstance;if(!e)return;const i=d=>{var p;this.sharedAudioCurrentTime=e.currentTime,(p=this.ontimeupdate)==null||p.call(this,d)},s=d=>{var p;e.isBlankAudio||(this.sharedAudioPaused=!1,(p=this.onplay)==null||p.call(this,d))},o=d=>{this.pause(d)},r=d=>{this.endedHandler(d)},a=d=>{var p;this.sharedAudioPaused=!0,(p=this.onerror)==null||p.call(this,d)},l=d=>{var p;return(p=this.oncanplay)==null?void 0:p.call(this,d)},c=d=>{var p;return(p=this.oncanplaythrough)==null?void 0:p.call(this,d)},h=d=>{var p;return(p=this.onloadeddata)==null?void 0:p.call(this,d)},u=d=>{var p;return(p=this.onloadedmetadata)==null?void 0:p.call(this,d)};return e.addEventListener("timeupdate",i),e.addEventListener("play",s),e.addEventListener("pause",o),e.addEventListener("ended",r),e.addEventListener("error",a),e.addEventListener("canplay",l),e.addEventListener("canplaythrough",c),e.addEventListener("loadeddata",h),e.addEventListener("loadedmetadata",u),()=>{e.removeEventListener("timeupdate",i),e.removeEventListener("play",s),e.removeEventListener("pause",o),e.removeEventListener("ended",r),e.removeEventListener("error",a),e.removeEventListener("canplay",l),e.removeEventListener("canplaythrough",c),e.removeEventListener("loadeddata",h),e.removeEventListener("loadedmetadata",u)}}}function ES(n){Le(n,"svelte-13e7hxv",".audio.svelte-13e7hxv{pointer-events:auto;cursor:pointer;width:100%;height:100%}")}function kS(n){let t,e,i,s;const o=n[8].default,r=hs(o,n,n[7],null);return{c(){t=U("div"),r&&r.c(),P(t,"class","audio svelte-13e7hxv"),P(t,"style",n[0])},m(a,l){Z(a,t,l),r&&r.m(t,null),e=!0,i||(s=_e(t,"click",Uv(n[1])),i=!0)},p(a,[l]){r&&r.p&&(!e||l&128)&&ds(r,o,a,a[7],e?us(o,a[7],l,null):fs(a[7]),null),(!e||l&1)&&P(t,"style",a[0])},i(a){e||(H(r,a),e=!0)},o(a){Y(r,a),e=!1},d(a){a&&X(t),r&&r.d(a),i=!1,s()}}}function xS(n,t,e){let{$$slots:i={},$$scope:s}=t,{url:o}=t,{enable:r=!0}=t,{style:a=""}=t,{hooksInfo:l}=t;const c=Vn(),h=cn("hooks"),u=cn("mediaStore");let d,p=!0;function m(){e(5,d.onplay=v=>{h.emit("playStateChange",V({event:v,state:"playing",mediaInstance:d},l)),c("play"),e(6,p=!1)},d),e(5,d.onpause=v=>{h.emit("playStateChange",V({event:v,state:"paused",mediaInstance:d},l)),c("pause"),e(6,p=!0)},d),e(5,d.onended=v=>{h.emit("playStateChange",V({event:v,state:"paused",mediaInstance:d},l)),c("pause"),e(6,p=!0)},d),e(5,d.onloadedmetadata=v=>{typeof d.duration=="number"&&!Number.isNaN(d.duration)&&c("duration",d.duration)},d),e(5,d.onerror=v=>{c("pause"),e(6,p=!0)},d),e(5,d.ontimeupdate=v=>{c("timeupdate",d.currentTime)},d)}u.subscribe(({currentMediaElement:v})=>{v!==d&&(p||d==null||d.pause())});function g(v){d&&(h.emit("click",V({event:v,target:"AudioTagPlayIcon",audioInstance:d},l)),u.set({currentMediaElement:d}),h.emit("playStateChange",V({event:v,state:d.paused?"playing":"paused",mediaInstance:d},l)),d.paused?d.play():d.pause())}return n.$$set=v=>{"url"in v&&e(2,o=v.url),"enable"in v&&e(3,r=v.enable),"style"in v&&e(0,a=v.style),"hooksInfo"in v&&e(4,l=v.hooksInfo),"$$scope"in v&&e(7,s=v.$$scope)},n.$$.update=()=>{n.$$.dirty&4&&(o||c("duration",0)),n.$$.dirty&36&&(d==null||d.dispose(),e(5,d=new IS(o)),c("audioRef",d),setTimeout(()=>c("audioRef",d),200),m()),n.$$.dirty&40&&(r||d==null||d.pause()),n.$$.dirty&72&&c(r&&!p?"play":"pause")},[a,g,o,r,l,d,p,s,i]}let sd=class extends Ee{constructor(t){super(),Ie(this,t,xS,kS,Me,{url:2,enable:3,style:0,hooksInfo:4},ES)}};function SS(n){Le(n,"svelte-6pnkgc",".audio-icon__wrapper.svelte-6pnkgc.svelte-6pnkgc{display:inline-block}.audio-icon.svelte-6pnkgc.svelte-6pnkgc{display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:100%;border-radius:50%}.audio-icon.svelte-6pnkgc .sound-wave__container.svelte-6pnkgc{position:absolute;pointer-events:none;top:0;left:0;width:100%;height:100%}@keyframes svelte-6pnkgc-sound_wave_1_animation{0%,10%{opacity:0}25%,100%{opacity:1}}@keyframes svelte-6pnkgc-sound_wave_2_animation{0%,35%{opacity:0}50%,100%{opacity:1}}@keyframes svelte-6pnkgc-sound_wave_3_animation{0%,60%{opacity:0}75%,100%{opacity:1}}")}function pg(n){let t,e;return t=new Xi({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function TS(n){let t,e,i,s,o,r,a,l,c,h,u,d,p,m,g=n[0]&&pg();return{c(){t=U("div"),g&&g.c(),e=ue(),i=U("div"),s=U("div"),o=Te("svg"),r=Te("defs"),a=Te("linearGradient"),l=Te("stop"),c=Te("stop"),h=Te("linearGradient"),u=Te("stop"),d=Te("stop"),p=Te("path"),P(l,"stop-color","rgba(255, 255, 255, 1)"),P(l,"stop-opacity",".5"),P(l,"offset","0%"),P(c,"stop-color","rgba(255, 255, 255, 1)"),P(c,"offset","100%"),P(a,"x1","8.653%"),P(a,"y1","15.676%"),P(a,"x2","85.159%"),P(a,"y2","79.274%"),P(a,"id","dnalogel-audio-icon-linear-gradient-1"),P(u,"stop-color","rgba(255, 255, 255, 1)"),P(u,"offset","0%"),P(d,"stop-color","rgba(255, 255, 255, 1)"),P(d,"stop-opacity","0"),P(d,"offset","100%"),P(h,"x1","0%"),P(h,"y1","0%"),P(h,"x2","64.422%"),P(h,"y2","62.326%"),P(h,"id","dnalogel-audio-icon-linear-gradient-2"),P(p,"d",n[3]),P(p,"fill","url(#dnalogel-audio-icon-linear-gradient-1)"),P(p,"fill-rule","nonzero"),P(p,"stroke","url(#dnalogel-audio-icon-linear-gradient-2)"),P(p,"stroke-width",".5"),P(o,"viewBox","0 0 24 24"),P(o,"version","1.1"),P(o,"aria-label","audio-icon"),P(s,"class","sound-wave__container svelte-6pnkgc"),P(i,"class","audio-icon svelte-6pnkgc"),P(t,"class","audio-icon__wrapper svelte-6pnkgc"),P(t,"style",n[1]),_(t,"width",n[4]),_(t,"height",n[4])},m(v,y){Z(v,t,y),g&&g.m(t,null),B(t,e),B(t,i),B(i,s),B(s,o),B(o,r),B(r,a),B(a,l),B(a,c),B(r,h),B(h,u),B(h,d),B(o,p),n[10](s),m=!0},p(v,[y]){v[0]?g?y&1&&H(g,1):(g=pg(),g.c(),H(g,1),g.m(t,e)):g&&(xe(),Y(g,1,1,()=>{g=null}),Se()),(!m||y&8)&&P(p,"d",v[3]),(!m||y&2)&&P(t,"style",v[1]);const w=y&2;(w||y&18)&&_(t,"width",v[4]),(w||y&18)&&_(t,"height",v[4])},i(v){m||(H(g),m=!0)},o(v){Y(g),m=!1},d(v){v&&X(t),g&&g.d(),n[10](null)}}}function DS(n,t,e){let i,s,{playing:o}=t,{shadow:r=!1}=t,{style:a=null}=t,{width:l="100%"}=t,{animated:c=!0}=t,h,u=0,d=null;const p=["M12 3.25c2.416 0 4.604.98 6.187 2.563A8.723 8.723 0 0 1 20.75 12c0 2.416-.98 4.604-2.563 6.187A8.723 8.723 0 0 1 12 20.75a8.723 8.723 0 0 1-6.187-2.563A8.723 8.723 0 0 1 3.25 12c0-2.416.98-4.604 2.563-6.187A8.723 8.723 0 0 1 12 3.25Zm1.534 3.282-1.29 1.289.186.183a5.86 5.86 0 0 1 1.663 4.095c0 1.555-.605 2.965-1.786 4.236l1.118 1.12.2-.19a7.46 7.46 0 0 0 2.225-5.322 7.46 7.46 0 0 0-2.316-5.411Zm-2.046 2.047-1.245 1.243.14.133a3.04 3.04 0 0 1 .882 2.144c0 .795-.308 1.516-.955 2.24l1.23 1.231.168-.168a4.793 4.793 0 0 0 1.314-3.303c0-1.39-.59-2.643-1.534-3.52Zm-1.752 1.78-1.69 1.689 1.745 1.743.132-.13a2.29 2.29 0 0 0-.187-3.302Z","M12 3.25c2.416 0 4.604.98 6.187 2.563A8.723 8.723 0 0 1 20.75 12c0 2.416-.98 4.604-2.563 6.187A8.723 8.723 0 0 1 12 20.75a8.723 8.723 0 0 1-6.187-2.563A8.723 8.723 0 0 1 3.25 12c0-2.416.98-4.604 2.563-6.187A8.723 8.723 0 0 1 12 3.25Zm-2.264 7.109-1.69 1.689 1.745 1.743.132-.13a2.29 2.29 0 0 0-.187-3.302Z","M12 3.25c2.416 0 4.604.98 6.187 2.563A8.723 8.723 0 0 1 20.75 12c0 2.416-.98 4.604-2.563 6.187A8.723 8.723 0 0 1 12 20.75a8.723 8.723 0 0 1-6.187-2.563A8.723 8.723 0 0 1 3.25 12c0-2.416.98-4.604 2.563-6.187A8.723 8.723 0 0 1 12 3.25Zm-.512 5.329-1.245 1.243.14.133a3.04 3.04 0 0 1 .882 2.144c0 .795-.308 1.516-.955 2.24l1.23 1.231.168-.168a4.793 4.793 0 0 0 1.314-3.303c0-1.39-.59-2.643-1.534-3.52Zm-1.752 1.78-1.69 1.689 1.745 1.743.132-.13a2.29 2.29 0 0 0-.187-3.302Z"];Kt(()=>{d&&(clearInterval(d),e(9,d=null))});function m(g){qe[g?"unshift":"push"](()=>{h=g,e(2,h)})}return n.$$set=g=>{"playing"in g&&e(5,o=g.playing),"shadow"in g&&e(0,r=g.shadow),"style"in g&&e(1,a=g.style),"width"in g&&e(6,l=g.width),"animated"in g&&e(7,c=g.animated)},n.$$.update=()=>{var g;n.$$.dirty&64&&e(4,i=typeof l=="number"?gi(l):l),n.$$.dirty&800&&(o?d||e(9,d=setInterval(()=>{e(8,u=(u+1)%p.length)},500)):(d&&(clearInterval(d),e(9,d=null)),e(8,u=0))),n.$$.dirty&384&&e(3,s=(g=p[c?u:0])!=null?g:p[0])},[r,a,h,s,i,o,l,c,u,d,m]}class Kl extends Ee{constructor(t){super(),Ie(this,t,DS,TS,Me,{playing:5,shadow:0,style:1,width:6,animated:7},SS)}}function LS(n){Le(n,"svelte-1s6gk4a",".audio-tag.svelte-1s6gk4a{position:absolute;left:0;top:0;width:0;height:0;overflow:visible}.audio-icon__wrapper.svelte-1s6gk4a{position:relative;vertical-align:top;width:100%;height:100%}.content.svelte-1s6gk4a{width:-moz-max-content;width:max-content;height:3.375rem;padding:2.25rem 0.25rem 0 1rem;position:absolute;left:0;bottom:0.125rem;overflow:hidden;box-sizing:border-box;font-size:0;white-space:nowrap;font-weight:600}.wrapper.svelte-1s6gk4a{position:relative;width:100%;height:100%}.audio-icon.svelte-1s6gk4a{pointer-events:none;vertical-align:top;display:inline-block;width:1rem;height:1rem;margin-right:0.25rem;margin-top:0.0625rem}.audio.svelte-1s6gk4a{position:relative;width:100%;height:100%}")}function mg(n){var v,y;let t,e,i,s,o,r,a,l,c,h,u,d,p,m;e=new Xi({props:{visible:n[6],left:n[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}});let g=n[6]&&gg(n);return c=new ry({props:{visible:n[6],textUnfolded:n[1],content:n[5]}}),u=new Zu({props:{unfolded:n[6],length:n[3],outDelay:n[4]+20*Math.min((y=(v=n[5])==null?void 0:v.length)!=null?y:10,15),useLinearColor:!0}}),{c(){t=U("div"),ge(e.$$.fragment),i=ue(),s=U("div"),o=U("div"),r=U("div"),g&&g.c(),a=ue(),l=U("div"),ge(c.$$.fragment),h=ue(),ge(u.$$.fragment),P(r,"class","audio-icon svelte-1s6gk4a"),_(l,"display","inline-block"),P(o,"class","wrapper svelte-1s6gk4a"),P(s,"class","content svelte-1s6gk4a"),P(t,"class","audio-tag svelte-1s6gk4a"),Pe(t,"unfolded",n[6])},m(w,C){Z(w,t,C),pe(e,t,null),B(t,i),B(t,s),B(s,o),B(o,r),g&&g.m(r,null),B(o,a),B(o,l),pe(c,l,null),B(t,h),pe(u,t,null),d=!0,p||(m=[_e(l,"click",n[7]),oi(_i.call(null,l)),_e(l,"clientWidth",n[12])],p=!0)},p(w,C){var R,z;const E={};C&64&&(E.visible=w[6]),C&8&&(E.left=w[3]/2+"px"),e.$set(E),w[6]?g?(g.p(w,C),C&64&&H(g,1)):(g=gg(w),g.c(),H(g,1),g.m(r,null)):g&&(xe(),Y(g,1,1,()=>{g=null}),Se());const D={};C&64&&(D.visible=w[6]),C&2&&(D.textUnfolded=w[1]),C&32&&(D.content=w[5]),c.$set(D);const L={};C&64&&(L.unfolded=w[6]),C&8&&(L.length=w[3]),C&48&&(L.outDelay=w[4]+20*Math.min((z=(R=w[5])==null?void 0:R.length)!=null?z:10,15)),u.$set(L),(!d||C&64)&&Pe(t,"unfolded",w[6])},i(w){d||(H(e.$$.fragment,w),H(g),H(c.$$.fragment,w),H(u.$$.fragment,w),d=!0)},o(w){Y(e.$$.fragment,w),Y(g),Y(c.$$.fragment,w),Y(u.$$.fragment,w),d=!1},d(w){w&&X(t),me(e),g&&g.d(),me(c),me(u),p=!1,dt(m)}}}function gg(n){let t,e,i,s,o,r,a;return e=new Xi({props:{center:!0,blurRadius:15,spreadRadius:6}}),s=new sd({props:{enable:n[6],url:n[0].data.audioUrl,hooksInfo:{tag:n[0]},$$slots:{default:[zS]},$$scope:{ctx:n}}}),s.$on("play",n[8]),s.$on("pause",n[9]),s.$on("error",n[10]),s.$on("audioRef",n[11]),{c(){t=U("div"),ge(e.$$.fragment),i=ue(),ge(s.$$.fragment),P(t,"class","audio svelte-1s6gk4a")},m(l,c){Z(l,t,c),pe(e,t,null),B(t,i),pe(s,t,null),a=!0},p(l,c){n=l;const h={};c&64&&(h.enable=n[6]),c&1&&(h.url=n[0].data.audioUrl),c&1&&(h.hooksInfo={tag:n[0]}),c&8196&&(h.$$scope={dirty:c,ctx:n}),s.$set(h)},i(l){a||(H(e.$$.fragment,l),H(s.$$.fragment,l),l&&At(()=>{a&&(r&&r.end(1),o=vs(t,Ht,{duration:1e3,delay:0,easing:Go}),o.start())}),a=!0)},o(l){var c,h;Y(e.$$.fragment,l),Y(s.$$.fragment,l),o&&o.invalidate(),l&&(r=qo(t,Ht,{duration:1e3,delay:20*Math.min((h=(c=n[5])==null?void 0:c.length)!=null?h:10,15),easing:Go})),a=!1},d(l){l&&X(t),me(e),me(s),l&&r&&r.end()}}}function zS(n){let t,e,i;return e=new Kl({props:{playing:n[2]}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","audio-icon__wrapper svelte-1s6gk4a")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,o){const r={};o&4&&(r.playing=s[2]),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function OS(n){let t,e,i=n[0].state&&mg(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[0].state?i?(i.p(s,o),o&1&&H(i,1)):(i=mg(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function jS(n,t,e){let i,s,o,{tag:r}=t,a=!1,l=!1,c;function h(){e(1,a=!a)}const u=()=>{e(2,l=!0)},d=()=>{e(2,l=!1)},p=()=>{e(2,l=!1)};function m(v){_n.call(this,n,v)}const g=v=>{e(3,c=v.detail)};return n.$$set=v=>{"tag"in v&&e(0,r=v.tag)},n.$$.update=()=>{var v,y,w;n.$$.dirty&1&&e(6,i=!!((v=r.state)!=null&&v.unfolded)),n.$$.dirty&1&&e(5,s=(w=(y=r.data.title)!=null?y:r.data.text)!=null?w:""),n.$$.dirty&2&&e(4,o=a?450:0)},[r,a,l,c,o,s,i,h,u,d,p,m,g]}class RS extends Ee{constructor(t){super(),Ie(this,t,jS,OS,Me,{tag:0},LS)}}function _S(n){Le(n,"svelte-nclraj",".audio-tag__wrapper.svelte-nclraj{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.audio-tag.svelte-nclraj{position:relative;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;padding:0.25rem;padding-right:0.625rem;border-radius:624999.9375rem;border:0.0625rem solid rgba(255, 255, 255, 0.6);background:linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2));box-shadow:inset 0 0 0.25rem 0 rgba(255, 255, 255, 0.3)}.audio__inner.svelte-nclraj{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.text.svelte-nclraj{font-weight:bold;font-size:0.75rem;margin-left:0.25rem}.audio-icon__wrapper.svelte-nclraj{position:relative;vertical-align:top;pointer-events:none;width:1.5rem;height:1.5rem}")}function vg(n){let t,e,i,s;return i=new sd({props:{style:"width: max-content; height: max-content;",enable:n[0].state.visible,url:n[0].data.audioUrl,hooksInfo:{tag:n[0]},$$slots:{default:[FS]},$$scope:{ctx:n}}}),i.$on("play",n[5]),i.$on("pause",n[6]),i.$on("error",n[7]),i.$on("timeupdate",n[8]),i.$on("duration",n[9]),i.$on("audioRef",n[10]),{c(){t=U("div"),e=U("div"),ge(i.$$.fragment),P(e,"class","audio-tag svelte-nclraj"),P(t,"class","audio-tag__wrapper svelte-nclraj")},m(o,r){Z(o,t,r),B(t,e),pe(i,e,null),s=!0},p(o,r){const a={};r&1&&(a.enable=o[0].state.visible),r&1&&(a.url=o[0].data.audioUrl),r&1&&(a.hooksInfo={tag:o[0]}),r&2072&&(a.$$scope={dirty:r,ctx:o}),i.$set(a)},i(o){s||(H(i.$$.fragment,o),s=!0)},o(o){Y(i.$$.fragment,o),s=!1},d(o){o&&X(t),me(i)}}}function VS(n){let t;return{c(){t=Fe(n[4])},m(e,i){Z(e,t,i)},p(e,i){i&16&&Ne(t,e[4])},d(e){e&&X(t)}}}function FS(n){let t,e,i,s,o,r,a;return i=new Kl({props:{playing:n[3]}}),r=new qu({props:{maxWidth:72,maxLine:1,$$slots:{default:[VS]},$$scope:{ctx:n}}}),{c(){t=U("div"),e=U("div"),ge(i.$$.fragment),s=ue(),o=U("div"),ge(r.$$.fragment),P(e,"class","audio-icon__wrapper svelte-nclraj"),P(o,"class","text svelte-nclraj"),P(t,"class","audio__inner svelte-nclraj")},m(l,c){Z(l,t,c),B(t,e),pe(i,e,null),B(t,s),B(t,o),pe(r,o,null),a=!0},p(l,c){const h={};c&8&&(h.playing=l[3]),i.$set(h);const u={};c&2064&&(u.$$scope={dirty:c,ctx:l}),r.$set(u)},i(l){a||(H(i.$$.fragment,l),H(r.$$.fragment,l),a=!0)},o(l){Y(i.$$.fragment,l),Y(r.$$.fragment,l),a=!1},d(l){l&&X(t),me(i),me(r)}}}function BS(n){let t,e,i=n[0].state&&vg(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[0].state?i?(i.p(s,o),o&1&&H(i,1)):(i=vg(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function HS(n,t,e){let i,{tag:s}=t,o=0,r=0,a=!1;const l=()=>{e(3,a=!0)},c=()=>{e(3,a=!1)},h=()=>{e(3,a=!1)},u=m=>{e(1,o=m.detail)},d=m=>{e(2,r=m.detail)};function p(m){_n.call(this,n,m)}return n.$$set=m=>{"tag"in m&&e(0,s=m.tag)},n.$$.update=()=>{var m,g;n.$$.dirty&1&&e(4,i=(g=(m=s.data.title)!=null?m:s.data.text)!=null?g:"")},[s,o,r,a,i,l,c,h,u,d,p]}class NS extends Ee{constructor(t){super(),Ie(this,t,HS,BS,Me,{tag:0},_S)}}function GS(n){let t,e;return t=new NS({props:{tag:n[0]}}),t.$on("audioRef",n[2]),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=i[0]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function WS(n){let t,e;return t=new RS({props:{tag:n[0]}}),t.$on("audioRef",n[2]),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=i[0]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function US(n){let t,e,i,s;const o=[WS,GS],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(n))&&(e=r[t]=o[t](n)),{c(){e&&e.c(),i=Be()},m(l,c){~t&&r[t].m(l,c),Z(l,i,c),s=!0},p(l,[c]){let h=t;t=a(l),t===h?~t&&r[t].p(l,c):(e&&(xe(),Y(r[h],1,1,()=>{r[h]=null}),Se()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=o[t](l),e.c()),H(e,1),e.m(i.parentNode,i)):e=null)},i(l){s||(H(e),s=!0)},o(l){Y(e),s=!1},d(l){~t&&r[t].d(l),l&&X(i)}}}function QS(n,t,e){let i,{tag:s}=t,o;function r(a){o=a.detail}return s.play=()=>o.play(),s.pause=()=>o.pause(),n.$$set=a=>{"tag"in a&&e(0,s=a.tag)},n.$$.update=()=>{var a;n.$$.dirty&1&&e(1,i=(a=s.data.appearance)!=null?a:"line")},[s,i,r]}class XS extends Ee{constructor(t){super(),Ie(this,t,QS,US,Me,{tag:0})}}function YS(n){Le(n,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function yg(n){var s;let t,e,i;return e=new yy({props:{mediaItemConfig:{canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(s=n[4])!=null?s:"withText",disableVideoIfHavePoster:!1,objectFit:n[2]},unfolded:n[6],mediaData:n[5],enableCarousel:n[1],autoplayConfig:n[3],tag:n[0],inDelay:500,duration:500}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","media-wrapper svelte-10cw0el")},m(o,r){Z(o,t,r),pe(e,t,null),i=!0},p(o,r){var l;const a={};r&20&&(a.mediaItemConfig={canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(l=o[4])!=null?l:"withText",disableVideoIfHavePoster:!1,objectFit:o[2]}),r&64&&(a.unfolded=o[6]),r&32&&(a.mediaData=o[5]),r&2&&(a.enableCarousel=o[1]),r&8&&(a.autoplayConfig=o[3]),r&1&&(a.tag=o[0]),e.$set(a)},i(o){i||(H(e.$$.fragment,o),i=!0)},o(o){Y(e.$$.fragment,o),i=!1},d(o){o&&X(t),me(e)}}}function ZS(n){let t,e,i=n[0].state&&n[5]&&yg(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[0].state&&s[5]?i?(i.p(s,o),o&33&&H(i,1)):(i=yg(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function qS(n,t,e){let i,s,o,r,a,l,{tag:c}=t;return n.$$set=h=>{"tag"in h&&e(0,c=h.tag)},n.$$.update=()=>{var h,u;n.$$.dirty&1&&e(6,i=c.state?c.state.unfolded:!1),n.$$.dirty&1&&e(5,s=c.data.mediaData),n.$$.dirty&1&&e(1,o=c.data.enableCarousel),n.$$.dirty&1&&e(4,r=c.data.playIcon),n.$$.dirty&3&&e(3,a=(h=c.data.autoplayConfig)!=null?h:{autoplay:o!=null?o:!0,autoplayVideo:!0}),n.$$.dirty&1&&e(2,l=(u=c.data.objectFit)!=null?u:(()=>c.data.adaptationMode==="stretch"?"fill":c.data.adaptationMode==="proportional"?"contain":void 0)())},[c,o,l,a,r,s,i]}class JS extends Ee{constructor(t){super(),Ie(this,t,qS,ZS,Me,{tag:0},YS)}}const jc=new Map;function by(n){return $(this,null,function*(){return new Promise((t,e)=>{if(!n){e(Error("url is empty"));return}const i=new Image;i.src=n,i.onload=()=>t({width:i.width,height:i.height}),i.onerror=e})})}function KS(n){return $(this,null,function*(){const{url:t,ratio:e=3}=n,i=(()=>{if(jc.has(t))return jc.get(t);const r=by(t);return jc.set(t,r),r})(),{width:s,height:o}=yield i;return de(V({},n),{width:s/e,height:o/e})})}function $S(n){return $(this,null,function*(){const{steps:t,url:e,ratio:i=3,fps:s=24}=n;if(!t)throw new Error("KeyframeIcon requires steps");const{width:o,height:r}=yield by(e),a=o/i,l=r/i,c=a/t,h=l,u=1/s*t+"s";return de(V({},n),{width:c,height:h,duration:u})})}const Eo=class{constructor(){f(this,"styleRefs",new Map)}generateStyleKey(t,e){const{duration:i,timing:s,loop:o,loopInterval:r=0}=t,a=t.elements[e],{properties:l}=a;return`svg-anim-${[i,s,o,r,JSON.stringify(l)].join("-").replace(/[^a-zA-Z0-9-]/g,"").toLowerCase()}`}interpolateMulti(t,e){var a;if(t.length===2)return this.interpolate(t[0],t[1],e);if(t.length<2)return(a=t[0])!=null?a:0;const i=t.length-1,s=e*i,o=Math.floor(s),r=s-o;return o>=i?t[i]:this.interpolate(t[o],t[o+1],r)}generateTransformMulti(t,e){const i=[];if(t.scale){const s=this.interpolateMulti(t.scale,e);i.push(`scale(${s})`)}if(t.translateX){const s=this.interpolateMulti(t.translateX,e);i.push(`translateX(${s}px)`)}if(t.translateY){const s=this.interpolateMulti(t.translateY,e);i.push(`translateY(${s}px)`)}if(t.rotate){const s=this.interpolateMulti(t.rotate,e);i.push(`rotate(${s}deg)`)}return i.join(" ")}interpolate(t,e,i){return t+(e-t)*i}static getInstance(){return Eo.instance||(Eo.instance=new Eo),Eo.instance}getOrCreateStyle(t,e){const i=this.generateStyleKey(t,e);if(this.styleRefs.has(i)){const E=this.styleRefs.get(i);return E.count++,i}const{duration:s,timing:o="linear",loop:r,loopInterval:a=0}=t,l=t.elements[e],{properties:c}=l,h=`${i}-keyframe`;let u=2;const d=[c.translateX,c.translateY,c.scale,c.rotate,c.opacity].filter(E=>Array.isArray(E)&&E.length>0);d.length>0&&(u=Math.max(...d.map(E=>E.length)));const p=r&&a>0?s+a:s,m=Math.max(0,Math.min(100,s/p*100));let g=`@keyframes ${h} {
|
|
964
|
+
width var(--sc-dot-size-animation-time) ease;cursor:pointer;-webkit-tap-highlight-color:transparent;height:var(--sc-dot-size);width:var(--sc-dot-size)}.sc-carousel-dot__dot.svelte-1mgyhhn:hover{opacity:0.9}.sc-carousel-dot__dot_active.svelte-1mgyhhn{opacity:0.7;height:var(--sc-active-dot-size);width:var(--sc-active-dot-size)}`)}function Vk(n){let t,e,i;return{c(){t=U("button"),P(t,"class","sc-carousel-button sc-carousel-dot__dot svelte-1mgyhhn"),Pe(t,"sc-carousel-dot__dot_active",n[0])},m(s,o){Z(s,t,o),e||(i=_e(t,"click",n[1]),e=!0)},p(s,[o]){o&1&&Pe(t,"sc-carousel-dot__dot_active",s[0])},i:ce,o:ce,d(s){s&&X(t),e=!1,i()}}}function Fk(n,t,e){let{active:i=!1}=t;function s(o){_n.call(this,n,o)}return n.$$set=o=>{"active"in o&&e(0,i=o.active)},[i,s]}class Bk extends Ee{constructor(t){super(),Ie(this,t,Fk,Vk,Me,{active:0},_k)}}function Hk(n){Le(n,"svelte-670fde",".sc-carousel-dots__container.svelte-670fde{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;padding:0 30px}.sc-carousel-dots__dot-container.svelte-670fde{height:calc(var(--sc-dot-size) + 14px);width:calc(var(--sc-dot-size) + 10px);display:flex;align-items:center;justify-content:center}")}function km(n,t,e){const i=n.slice();return i[5]=t[e],i[7]=e,i}function xm(n,t){let e,i,s,o;function r(){return t[3](t[7])}return i=new Bk({props:{active:t[1]===t[7]}}),i.$on("click",r),{key:n,first:null,c(){e=U("div"),ge(i.$$.fragment),s=ue(),P(e,"class","sc-carousel-dots__dot-container svelte-670fde"),this.first=e},m(a,l){Z(a,e,l),pe(i,e,null),B(e,s),o=!0},p(a,l){t=a;const c={};l&3&&(c.active=t[1]===t[7]),i.$set(c)},i(a){o||(H(i.$$.fragment,a),o=!0)},o(a){Y(i.$$.fragment,a),o=!1},d(a){a&&X(e),me(i)}}}function Nk(n){let t,e=[],i=new Map,s,o=Array(n[0]);const r=a=>a[7];for(let a=0;a<o.length;a+=1){let l=km(n,o,a),c=r(l);i.set(c,e[a]=xm(c,l))}return{c(){t=U("div");for(let a=0;a<e.length;a+=1)e[a].c();P(t,"class","sc-carousel-dots__container svelte-670fde")},m(a,l){Z(a,t,l);for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(t,null);s=!0},p(a,[l]){l&7&&(o=Array(a[0]),xe(),e=ai(e,l,r,1,a,o,i,t,fn,xm,null,km),Se())},i(a){if(!s){for(let l=0;l<o.length;l+=1)H(e[l]);s=!0}},o(a){for(let l=0;l<e.length;l+=1)Y(e[l]);s=!1},d(a){a&&X(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function Gk(n,t,e){const i=Vn();let{pagesCount:s=1}=t,{currentPageIndex:o=0}=t;function r(l){i("pageChange",l)}const a=l=>r(l);return n.$$set=l=>{"pagesCount"in l&&e(0,s=l.pagesCount),"currentPageIndex"in l&&e(1,o=l.currentPageIndex)},[s,o,r,a]}class Wk extends Ee{constructor(t){super(),Ie(this,t,Gk,Nk,Me,{pagesCount:0,currentPageIndex:1},Hk)}}const Yo="prev",ps="next";function Uk(n){Le(n,"svelte-1bftafx",":root{--sc-arrow-size:2px}.sc-carousel-arrow__circle.svelte-1bftafx{width:20px;height:20px;border-radius:50%;background-color:var(--sc-color-rgb-light-50p);display:flex;align-items:center;justify-content:center;transition:opacity 100ms ease;cursor:pointer;-webkit-tap-highlight-color:transparent}.sc-carousel-arrow__circle.svelte-1bftafx:hover{opacity:0.9}.sc-carousel-arrow__arrow.svelte-1bftafx{border:solid var(--sc-color-hex-dark);border-width:0 var(--sc-arrow-size) var(--sc-arrow-size) 0;padding:var(--sc-arrow-size);position:relative}.sc-carousel-arrow__arrow-next.svelte-1bftafx{transform:rotate(-45deg);left:calc(var(--sc-arrow-size) / -2)}.sc-carousel-arrow__arrow-prev.svelte-1bftafx{transform:rotate(135deg);right:calc(var(--sc-arrow-size) / -2)}.sc-carousel-arrow__circle_disabled.svelte-1bftafx,.sc-carousel-arrow__circle_disabled.svelte-1bftafx:hover{opacity:0.5}")}function Qk(n){let t,e,i,s;return{c(){t=U("button"),e=U("i"),P(e,"class","sc-carousel-arrow__arrow svelte-1bftafx"),Pe(e,"sc-carousel-arrow__arrow-next",n[0]===ps),Pe(e,"sc-carousel-arrow__arrow-prev",n[0]===Yo),P(t,"class","sc-carousel-button sc-carousel-arrow__circle svelte-1bftafx"),Pe(t,"sc-carousel-arrow__circle_disabled",n[1])},m(o,r){Z(o,t,r),B(t,e),i||(s=_e(t,"click",n[2]),i=!0)},p(o,[r]){r&1&&Pe(e,"sc-carousel-arrow__arrow-next",o[0]===ps),r&1&&Pe(e,"sc-carousel-arrow__arrow-prev",o[0]===Yo),r&2&&Pe(t,"sc-carousel-arrow__circle_disabled",o[1])},i:ce,o:ce,d(o){o&&X(t),i=!1,s()}}}function Xk(n,t,e){let{direction:i=ps}=t,{disabled:s=!1}=t;function o(r){_n.call(this,n,r)}return n.$$set=r=>{"direction"in r&&e(0,i=r.direction),"disabled"in r&&e(1,s=r.disabled)},[i,s,o]}class ay extends Ee{constructor(t){super(),Ie(this,t,Xk,Qk,Me,{direction:0,disabled:1},Uk)}}function Yk(n){Le(n,"svelte-i7yfid",".sc-carousel-progress__indicator.svelte-i7yfid{height:100%;background-color:var(--sc-color-hex-dark-50p)}")}function Zk(n){let t;return{c(){t=U("div"),P(t,"class","sc-carousel-progress__indicator svelte-i7yfid"),_(t,"width",n[0]+"%")},m(e,i){Z(e,t,i)},p(e,[i]){i&1&&_(t,"width",e[0]+"%")},i:ce,o:ce,d(e){e&&X(t)}}}const Sm=100;function qk(n,t,e){let i,{value:s=0}=t;return n.$$set=o=>{"value"in o&&e(1,s=o.value)},n.$$.update=()=>{n.$$.dirty&2&&e(0,i=Math.min(Math.max(s*Sm,0),Sm))},[i,s]}class Jk extends Ee{constructor(t){super(),Ie(this,t,qk,Zk,Me,{value:1},Yk)}}function Kk(n,t){n.addEventListener("mousedown",t),n.addEventListener("touchstart",t,{passive:!0})}function $k(n,t){n.removeEventListener("mousedown",t),n.removeEventListener("touchstart",t)}function e8(n,t){n.addEventListener("mouseup",t),n.addEventListener("touchend",t)}function Tm(n,t){n.removeEventListener("mouseup",t),n.removeEventListener("touchend",t)}function t8(n,t){n.addEventListener("mousemove",t),n.addEventListener("touchmove",t)}function Dm(n,t){n.removeEventListener("mousemove",t),n.removeEventListener("touchmove",t)}function Ju(n){return function(t,e){n.dispatchEvent(new CustomEvent(t,{detail:e}))}}const i8=110,n8=9,s8=111,o8=20;function Lc(n){if("TouchEvent"in window&&n instanceof TouchEvent){const t=n.touches[0];return{x:t?t.clientX:0,y:t?t.clientY:0}}return{x:n.clientX,y:n.clientY}}function r8(n,{thresholdProvider:t}){const e=Ju(n);let i,s,o=0,r,a=!1;function l(){return Date.now()-r>=s8&&Math.abs(o)>=o8}function c(d){r=Date.now(),o=0,a=!0;const p=Lc(d);i=p.x,s=p.y,e("swipeStart",{x:i,y:s}),t8(window,h),e8(window,u)}function h(d){if(!a)return;const p=Lc(d),m=p.x-i,g=p.y-s;i=p.x,s=p.y,e("swipeMove",{x:i,y:s,dx:m,dy:g}),m!==0&&Math.sign(m)!==Math.sign(o)&&(o=0),o+=m,Math.abs(o)>t()&&(e("swipeThresholdReached",{direction:o>0?Yo:ps}),Tm(window,u),Dm(window,h))}function u(d){if(Tm(window,u),Dm(window,h),a=!1,!l()){e("swipeFailed");return}const p=Lc(d);e("swipeEnd",{x:p.x,y:p.y})}return Kk(n,c),{destroy(){$k(n,c)}}}function a8(n,t){n.addEventListener("mouseenter",t)}function l8(n,t){n.removeEventListener("mouseenter",t)}function c8(n,t){n.addEventListener("mouseleave",t)}function Lm(n,t){n.removeEventListener("mouseleave",t)}function h8(n){const t=Ju(n);function e(){c8(n,i),t("hovered",{value:!0})}function i(){t("hovered",{value:!1}),Lm(n,i)}return a8(n,e),{destroy(){l8(n,e),Lm(n,i)}}}const u8=(n,t)=>{const e=t.x-n.x,i=t.y-n.y;return Math.sqrt(e*e+i*i)};function Lo(n,t,e){return Math.max(n,Math.min(t,e))}function d8(n,t){n.addEventListener("touchstart",t,{passive:!0})}function f8(n,t){n.removeEventListener("touchstart",t)}function p8(n,t){n.addEventListener("touchend",t)}function zm(n,t){n.removeEventListener("touchend",t)}function m8(n){const t=Ju(n);let e=0,i={x:0,y:0};function s({tapEndedAt:a,tapEndedPos:l}){const c=a-e,h=u8(i,l);return c<=i8&&h<=n8}function o(a){e=Date.now();const l=a.touches[0];i={x:l.clientX,y:l.clientY},p8(n,r)}function r(a){zm(n,r);const l=a.changedTouches[0];s({tapEndedAt:Date.now(),tapEndedPos:{x:l.clientX,y:l.clientY}})&&t("tapped")}return d8(n,o),{destroy(){f8(n,o),zm(n,r)}}}function g8({currentParticleIndex:n,particlesCount:t,clonesCountHead:e,clonesCountTotal:i,particlesToScroll:s}){return n===t-e?0:n===0?ly({particlesCountWithoutClones:t-i,particlesToScroll:s})-1:Math.floor((n-e)/s)}function v8({currentParticleIndex:n,particlesToScroll:t}){return Math.ceil(n/t)}function y8({currentParticleIndex:n,particlesCount:t,clonesCountHead:e,clonesCountTotal:i,infinite:s,particlesToScroll:o}){return s?g8({currentParticleIndex:n,particlesCount:t,clonesCountHead:e,clonesCountTotal:i,particlesToScroll:o}):v8({currentParticleIndex:n,particlesToScroll:o})}function ly({particlesCountWithoutClones:n,particlesToScroll:t}){return Math.ceil(n/t)}function b8({particlesCountWithoutClones:n,particlesToScroll:t,particlesToShow:e}){const i=cy({particlesCountWithoutClones:n,particlesToScroll:t,particlesToShow:e});return Math.ceil(n/t)-i}function A8({infinite:n,particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:i}){return n?ly({particlesCountWithoutClones:t,particlesToScroll:e}):b8({particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:i})}function w8({pageIndex:n,clonesCountHead:t,clonesCountTail:e,particlesToScroll:i,particlesCount:s}){return Lo(0,Math.min(t+n*i,s-e),s-1)}function P8({pageIndex:n,particlesToScroll:t,particlesCount:e,particlesToShow:i}){return Lo(0,Math.min(n*t,e-i),e-1)}function zc({infinite:n,pageIndex:t,clonesCountHead:e,clonesCountTail:i,particlesToScroll:s,particlesCount:o,particlesToShow:r}){return n?w8({pageIndex:t,clonesCountHead:e,clonesCountTail:i,particlesToScroll:s,particlesCount:o}):P8({pageIndex:t,particlesToScroll:s,particlesCount:o,particlesToShow:r})}function C8({particlesContainerChildren:n,particleWidth:t}){for(let e=0;e<n.length;e++)n[e].style.minWidth=`${t}px`,n[e].style.maxWidth=`${t}px`}function cy({particlesToScroll:n,particlesToShow:t,particlesCountWithoutClones:e}){const i=n-t;let s=t;for(;;){const o=e-s-i;if(o<t)return Math.max(o,0);s+=t+i}}function M8(n){return new ResizeObserver(t=>{n({width:t[0].contentRect.width})})}function I8({clonesCountHead:n,clonesCountTail:t,particlesContainerChildren:e}){const i=[];for(let r=0;r<t;r++)i.push(e[r].cloneNode(!0));const s=[],o=e.length;for(let r=o-1;r>o-1-n;r--)s.push(e[r].cloneNode(!0));return{clonesToAppend:i,clonesToPrepend:s}}function E8({particlesContainer:n,clonesToAppend:t,clonesToPrepend:e}){for(let i=0;i<t.length;i++)n.append(t[i]);for(let i=0;i<e.length;i++)n.prepend(e[i])}function k8({infinite:n,particlesToShow:t,partialPageSize:e}){const i=n?{head:Math.ceil(e||t),tail:Math.ceil(t)}:{head:0,tail:0};return de(V({},i),{total:i.head+i.tail})}const Or=(n,t,e)=>{if(n&&n.hasOwnProperty(t))return n[t];if(e===void 0)throw new Error(`Required arg "${t}" was not provided`);return e},Ih=n=>t=>{n[t]&&n[t]()};var x8="Expected a function",hy="__lodash_hash_undefined__",uy=1/0,S8="[object Function]",T8="[object GeneratorFunction]",D8="[object Symbol]",L8=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,z8=/^\w*$/,O8=/^\./,j8=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,R8=/[\\^$.*+?()[\]{}|]/g,_8=/\\(\\)?/g,V8=/^\[object .+?Constructor\]$/,F8=typeof ji=="object"&&ji&&ji.Object===Object&&ji,B8=typeof self=="object"&&self&&self.Object===Object&&self,Ku=F8||B8||Function("return this")();function H8(n,t){return n==null?void 0:n[t]}function N8(n){var t=!1;if(n!=null&&typeof n.toString!="function")try{t=!!(n+"")}catch(e){}return t}var G8=Array.prototype,W8=Function.prototype,dy=Object.prototype,Oc=Ku["__core-js_shared__"],Om=function(){var n=/[^.]+$/.exec(Oc&&Oc.keys&&Oc.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),fy=W8.toString,$u=dy.hasOwnProperty,py=dy.toString,U8=RegExp("^"+fy.call($u).replace(R8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),jm=Ku.Symbol,Q8=G8.splice,X8=my(Ku,"Map"),Kr=my(Object,"create"),Rm=jm?jm.prototype:void 0,_m=Rm?Rm.toString:void 0;function Js(n){var t=-1,e=n?n.length:0;for(this.clear();++t<e;){var i=n[t];this.set(i[0],i[1])}}function Y8(){this.__data__=Kr?Kr(null):{}}function Z8(n){return this.has(n)&&delete this.__data__[n]}function q8(n){var t=this.__data__;if(Kr){var e=t[n];return e===hy?void 0:e}return $u.call(t,n)?t[n]:void 0}function J8(n){var t=this.__data__;return Kr?t[n]!==void 0:$u.call(t,n)}function K8(n,t){var e=this.__data__;return e[n]=Kr&&t===void 0?hy:t,this}Js.prototype.clear=Y8;Js.prototype.delete=Z8;Js.prototype.get=q8;Js.prototype.has=J8;Js.prototype.set=K8;function tr(n){var t=-1,e=n?n.length:0;for(this.clear();++t<e;){var i=n[t];this.set(i[0],i[1])}}function $8(){this.__data__=[]}function ex(n){var t=this.__data__,e=ql(t,n);if(e<0)return!1;var i=t.length-1;return e==i?t.pop():Q8.call(t,e,1),!0}function tx(n){var t=this.__data__,e=ql(t,n);return e<0?void 0:t[e][1]}function ix(n){return ql(this.__data__,n)>-1}function nx(n,t){var e=this.__data__,i=ql(e,n);return i<0?e.push([n,t]):e[i][1]=t,this}tr.prototype.clear=$8;tr.prototype.delete=ex;tr.prototype.get=tx;tr.prototype.has=ix;tr.prototype.set=nx;function to(n){var t=-1,e=n?n.length:0;for(this.clear();++t<e;){var i=n[t];this.set(i[0],i[1])}}function sx(){this.__data__={hash:new Js,map:new(X8||tr),string:new Js}}function ox(n){return Jl(this,n).delete(n)}function rx(n){return Jl(this,n).get(n)}function ax(n){return Jl(this,n).has(n)}function lx(n,t){return Jl(this,n).set(n,t),this}to.prototype.clear=sx;to.prototype.delete=ox;to.prototype.get=rx;to.prototype.has=ax;to.prototype.set=lx;function ql(n,t){for(var e=n.length;e--;)if(bx(n[e][0],t))return e;return-1}function cx(n,t){t=fx(t,n)?[t]:dx(t);for(var e=0,i=t.length;n!=null&&e<i;)n=n[vx(t[e++])];return e&&e==i?n:void 0}function hx(n){if(!vy(n)||mx(n))return!1;var t=Ax(n)||N8(n)?U8:V8;return t.test(yx(n))}function ux(n){if(typeof n=="string")return n;if(td(n))return _m?_m.call(n):"";var t=n+"";return t=="0"&&1/n==-uy?"-0":t}function dx(n){return gy(n)?n:gx(n)}function Jl(n,t){var e=n.__data__;return px(t)?e[typeof t=="string"?"string":"hash"]:e.map}function my(n,t){var e=H8(n,t);return hx(e)?e:void 0}function fx(n,t){if(gy(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||td(n)?!0:z8.test(n)||!L8.test(n)||t!=null&&n in Object(t)}function px(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function mx(n){return!!Om&&Om in n}var gx=ed(function(n){n=Px(n);var t=[];return O8.test(n)&&t.push(""),n.replace(j8,function(e,i,s,o){t.push(s?o.replace(_8,"$1"):i||e)}),t});function vx(n){if(typeof n=="string"||td(n))return n;var t=n+"";return t=="0"&&1/n==-uy?"-0":t}function yx(n){if(n!=null){try{return fy.call(n)}catch(t){}try{return n+""}catch(t){}}return""}function ed(n,t){if(typeof n!="function"||t&&typeof t!="function")throw new TypeError(x8);var e=function(){var i=arguments,s=t?t.apply(this,i):i[0],o=e.cache;if(o.has(s))return o.get(s);var r=n.apply(this,i);return e.cache=o.set(s,r),r};return e.cache=new(ed.Cache||to),e}ed.Cache=to;function bx(n,t){return n===t||n!==n&&t!==t}var gy=Array.isArray;function Ax(n){var t=vy(n)?py.call(n):"";return t==S8||t==T8}function vy(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function wx(n){return!!n&&typeof n=="object"}function td(n){return typeof n=="symbol"||wx(n)&&py.call(n)==D8}function Px(n){return n==null?"":ux(n)}function Cx(n,t,e){var i=n==null?void 0:cx(n,t);return i===void 0?e:i}var Ba=Cx,Ml={},Mx={get exports(){return Ml},set exports(n){Ml=n}};(function(n,t){var e=200,i="__lodash_hash_undefined__",s=9007199254740991,o="[object Arguments]",r="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",h="[object Function]",u="[object GeneratorFunction]",d="[object Map]",p="[object Number]",m="[object Object]",g="[object Promise]",v="[object RegExp]",y="[object Set]",w="[object String]",C="[object Symbol]",E="[object WeakMap]",D="[object ArrayBuffer]",L="[object DataView]",R="[object Float32Array]",z="[object Float64Array]",O="[object Int8Array]",A="[object Int16Array]",M="[object Int32Array]",I="[object Uint8Array]",k="[object Uint8ClampedArray]",x="[object Uint16Array]",S="[object Uint32Array]",j=/[\\^$.*+?()[\]{}|]/g,F=/\w*$/,J=/^\[object .+?Constructor\]$/,ne=/^(?:0|[1-9]\d*)$/,q={};q[o]=q[r]=q[D]=q[L]=q[a]=q[l]=q[R]=q[z]=q[O]=q[A]=q[M]=q[d]=q[p]=q[m]=q[v]=q[y]=q[w]=q[C]=q[I]=q[k]=q[x]=q[S]=!0,q[c]=q[h]=q[E]=!1;var oe=typeof ji=="object"&&ji&&ji.Object===Object&&ji,se=typeof self=="object"&&self&&self.Object===Object&&self,ae=oe||se||Function("return this")(),ze=t&&!t.nodeType&&t,ee=ze&&!0&&n&&!n.nodeType&&n,we=ee&&ee.exports===ze;function le(T,W){return T.set(W[0],W[1]),T}function he(T,W){return T.add(W),T}function be(T,W){for(var ie=-1,fe=T?T.length:0;++ie<fe&&W(T[ie],ie,T)!==!1;);return T}function te(T,W){for(var ie=-1,fe=W.length,Ue=T.length;++ie<fe;)T[Ue+ie]=W[ie];return T}function ke(T,W,ie,fe){var Ue=-1,He=T?T.length:0;for(fe&&He&&(ie=T[++Ue]);++Ue<He;)ie=W(ie,T[Ue],Ue,T);return ie}function Re(T,W){for(var ie=-1,fe=Array(T);++ie<T;)fe[ie]=W(ie);return fe}function ye(T,W){return T==null?void 0:T[W]}function De(T){var W=!1;if(T!=null&&typeof T.toString!="function")try{W=!!(T+"")}catch(ie){}return W}function ve(T){var W=-1,ie=Array(T.size);return T.forEach(function(fe,Ue){ie[++W]=[Ue,fe]}),ie}function Ae(T,W){return function(ie){return T(W(ie))}}function Oe(T){var W=-1,ie=Array(T.size);return T.forEach(function(fe){ie[++W]=fe}),ie}var Ye=Array.prototype,Ze=Function.prototype,ot=Object.prototype,Ke=ae["__core-js_shared__"],et=function(){var T=/[^.]+$/.exec(Ke&&Ke.keys&&Ke.keys.IE_PROTO||"");return T?"Symbol(src)_1."+T:""}(),lt=Ze.toString,ht=ot.hasOwnProperty,Ft=ot.toString,Zi=RegExp("^"+lt.call(ht).replace(j,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ut=we?ae.Buffer:void 0,li=ae.Symbol,Ai=ae.Uint8Array,ut=Ae(Object.getPrototypeOf,Object),Qt=Object.create,Xt=ot.propertyIsEnumerable,ir=Ye.splice,As=Object.getOwnPropertySymbols,Fn=Ut?Ut.isBuffer:void 0,io=Ae(Object.keys,Object),Bn=Q(ae,"DataView"),Di=Q(ae,"Map"),wi=Q(ae,"Promise"),Hn=Q(ae,"Set"),Nn=Q(ae,"WeakMap"),qi=Q(Object,"create"),mn=ni(Bn),gn=ni(Di),ws=ni(wi),Ps=ni(Hn),Gn=ni(Nn),Ji=li?li.prototype:void 0,no=Ji?Ji.valueOf:void 0;function Vi(T){var W=-1,ie=T?T.length:0;for(this.clear();++W<ie;){var fe=T[W];this.set(fe[0],fe[1])}}function Wn(){this.__data__=qi?qi(null):{}}function nr(T){return this.has(T)&&delete this.__data__[T]}function sr(T){var W=this.__data__;if(qi){var ie=W[T];return ie===i?void 0:ie}return ht.call(W,T)?W[T]:void 0}function Cs(T){var W=this.__data__;return qi?W[T]!==void 0:ht.call(W,T)}function vn(T,W){var ie=this.__data__;return ie[T]=qi&&W===void 0?i:W,this}Vi.prototype.clear=Wn,Vi.prototype.delete=nr,Vi.prototype.get=sr,Vi.prototype.has=Cs,Vi.prototype.set=vn;function Ot(T){var W=-1,ie=T?T.length:0;for(this.clear();++W<ie;){var fe=T[W];this.set(fe[0],fe[1])}}function so(){this.__data__=[]}function or(T){var W=this.__data__,ie=Li(W,T);if(ie<0)return!1;var fe=W.length-1;return ie==fe?W.pop():ir.call(W,ie,1),!0}function oo(T){var W=this.__data__,ie=Li(W,T);return ie<0?void 0:W[ie][1]}function ro(T){return Li(this.__data__,T)>-1}function ao(T,W){var ie=this.__data__,fe=Li(ie,T);return fe<0?ie.push([T,W]):ie[fe][1]=W,this}Ot.prototype.clear=so,Ot.prototype.delete=or,Ot.prototype.get=oo,Ot.prototype.has=ro,Ot.prototype.set=ao;function jt(T){var W=-1,ie=T?T.length:0;for(this.clear();++W<ie;){var fe=T[W];this.set(fe[0],fe[1])}}function Ms(){this.__data__={hash:new Vi,map:new(Di||Ot),string:new Vi}}function Fi(T){return N(this,T).delete(T)}function yn(T){return N(this,T).get(T)}function bn(T){return N(this,T).has(T)}function Un(T,W){return N(this,T).set(T,W),this}jt.prototype.clear=Ms,jt.prototype.delete=Fi,jt.prototype.get=yn,jt.prototype.has=bn,jt.prototype.set=Un;function Bt(T){this.__data__=new Ot(T)}function rr(){this.__data__=new Ot}function ar(T){return this.__data__.delete(T)}function Qn(T){return this.__data__.get(T)}function Yt(T){return this.__data__.has(T)}function Ki(T,W){var ie=this.__data__;if(ie instanceof Ot){var fe=ie.__data__;if(!Di||fe.length<e-1)return fe.push([T,W]),this;ie=this.__data__=new jt(fe)}return ie.set(T,W),this}Bt.prototype.clear=rr,Bt.prototype.delete=ar,Bt.prototype.get=Qn,Bt.prototype.has=Yt,Bt.prototype.set=Ki;function $t(T,W){var ie=ur(T)||uo(T)?Re(T.length,String):[],fe=ie.length,Ue=!!fe;for(var He in T)(W||ht.call(T,He))&&!(Ue&&(He=="length"||Ct(He,fe)))&&ie.push(He);return ie}function ci(T,W,ie){var fe=T[W];(!(ht.call(T,W)&&ya(fe,ie))||ie===void 0&&!(W in T))&&(T[W]=ie)}function Li(T,W){for(var ie=T.length;ie--;)if(ya(T[ie][0],W))return ie;return-1}function kt(T,W){return T&&qn(W,fr(W),T)}function ei(T,W,ie,fe,Ue,He,Je){var tt;if(fe&&(tt=He?fe(T,Ue,He,Je):fe(T)),tt!==void 0)return tt;if(!en(T))return T;var Tt=ur(T);if(Tt){if(tt=Ce(T),!W)return Is(T,tt)}else{var nt=re(T),Zt=nt==h||nt==u;if(ba(T))return $i(T,W);if(nt==m||nt==o||Zt&&!He){if(De(T))return He?T:{};if(tt=je(Zt?{}:T),!W)return cr(T,kt(tt,T))}else{if(!q[nt])return He?T:{};tt=Qe(T,nt,ei,W)}}Je||(Je=new Bt);var hi=Je.get(T);if(hi)return hi;if(Je.set(T,tt),!Tt)var _t=ie?hr(T):fr(T);return be(_t||T,function(qt,Nt){_t&&(Nt=qt,qt=T[Nt]),ci(tt,Nt,ei(qt,W,ie,fe,Nt,T,Je))}),tt}function lo(T){return en(T)?Qt(T):{}}function co(T,W,ie){var fe=W(T);return ur(T)?fe:te(fe,ie(T))}function Xn(T){return Ft.call(T)}function ti(T){if(!en(T)||Rt(T))return!1;var W=dr(T)||De(T)?Zi:J;return W.test(ni(T))}function Yn(T){if(!ii(T))return io(T);var W=[];for(var ie in Object(T))ht.call(T,ie)&&ie!="constructor"&&W.push(ie);return W}function $i(T,W){if(W)return T.slice();var ie=new T.constructor(T.length);return T.copy(ie),ie}function An(T){var W=new T.constructor(T.byteLength);return new Ai(W).set(new Ai(T)),W}function Bi(T,W){var ie=W?An(T.buffer):T.buffer;return new T.constructor(ie,T.byteOffset,T.byteLength)}function Zn(T,W,ie){var fe=W?ie(ve(T),!0):ve(T);return ke(fe,le,new T.constructor)}function wn(T){var W=new T.constructor(T.source,F.exec(T));return W.lastIndex=T.lastIndex,W}function Pi(T,W,ie){var fe=W?ie(Oe(T),!0):Oe(T);return ke(fe,he,new T.constructor)}function lr(T){return no?Object(no.call(T)):{}}function ho(T,W){var ie=W?An(T.buffer):T.buffer;return new T.constructor(ie,T.byteOffset,T.length)}function Is(T,W){var ie=-1,fe=T.length;for(W||(W=Array(fe));++ie<fe;)W[ie]=T[ie];return W}function qn(T,W,ie,fe){ie||(ie={});for(var Ue=-1,He=W.length;++Ue<He;){var Je=W[Ue],tt=fe?fe(ie[Je],T[Je],Je,ie,T):void 0;ci(ie,Je,tt===void 0?T[Je]:tt)}return ie}function cr(T,W){return qn(T,K(T),W)}function hr(T){return co(T,fr,K)}function N(T,W){var ie=T.__data__;return xt(W)?ie[typeof W=="string"?"string":"hash"]:ie.map}function Q(T,W){var ie=ye(T,W);return ti(ie)?ie:void 0}var K=As?Ae(As,Object):rc,re=Xn;(Bn&&re(new Bn(new ArrayBuffer(1)))!=L||Di&&re(new Di)!=d||wi&&re(wi.resolve())!=g||Hn&&re(new Hn)!=y||Nn&&re(new Nn)!=E)&&(re=function(T){var W=Ft.call(T),ie=W==m?T.constructor:void 0,fe=ie?ni(ie):void 0;if(fe)switch(fe){case mn:return L;case gn:return d;case ws:return g;case Ps:return y;case Gn:return E}return W});function Ce(T){var W=T.length,ie=T.constructor(W);return W&&typeof T[0]=="string"&&ht.call(T,"index")&&(ie.index=T.index,ie.input=T.input),ie}function je(T){return typeof T.constructor=="function"&&!ii(T)?lo(ut(T)):{}}function Qe(T,W,ie,fe){var Ue=T.constructor;switch(W){case D:return An(T);case a:case l:return new Ue(+T);case L:return Bi(T,fe);case R:case z:case O:case A:case M:case I:case k:case x:case S:return ho(T,fe);case d:return Zn(T,fe,ie);case p:case w:return new Ue(T);case v:return wn(T);case y:return Pi(T,fe,ie);case C:return lr(T)}}function Ct(T,W){return W=W==null?s:W,!!W&&(typeof T=="number"||ne.test(T))&&T>-1&&T%1==0&&T<W}function xt(T){var W=typeof T;return W=="string"||W=="number"||W=="symbol"||W=="boolean"?T!=="__proto__":T===null}function Rt(T){return!!et&&et in T}function ii(T){var W=T&&T.constructor,ie=typeof W=="function"&&W.prototype||ot;return T===ie}function ni(T){if(T!=null){try{return lt.call(T)}catch(W){}try{return T+""}catch(W){}}return""}function va(T){return ei(T,!0,!0)}function ya(T,W){return T===W||T!==T&&W!==W}function uo(T){return oc(T)&&ht.call(T,"callee")&&(!Xt.call(T,"callee")||Ft.call(T)==o)}var ur=Array.isArray;function fo(T){return T!=null&&Aa(T.length)&&!dr(T)}function oc(T){return wa(T)&&fo(T)}var ba=Fn||ac;function dr(T){var W=en(T)?Ft.call(T):"";return W==h||W==u}function Aa(T){return typeof T=="number"&&T>-1&&T%1==0&&T<=s}function en(T){var W=typeof T;return!!T&&(W=="object"||W=="function")}function wa(T){return!!T&&typeof T=="object"}function fr(T){return fo(T)?$t(T):Yn(T)}function rc(){return[]}function ac(){return!1}n.exports=va})(Mx,Ml);const Ix=Ml;var Il={},Ex={get exports(){return Il},set exports(n){Il=n}};(function(n,t){var e=200,i="__lodash_hash_undefined__",s=1,o=2,r=9007199254740991,a="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",h="[object Boolean]",u="[object Date]",d="[object Error]",p="[object Function]",m="[object GeneratorFunction]",g="[object Map]",v="[object Number]",y="[object Null]",w="[object Object]",C="[object Promise]",E="[object Proxy]",D="[object RegExp]",L="[object Set]",R="[object String]",z="[object Symbol]",O="[object Undefined]",A="[object WeakMap]",M="[object ArrayBuffer]",I="[object DataView]",k="[object Float32Array]",x="[object Float64Array]",S="[object Int8Array]",j="[object Int16Array]",F="[object Int32Array]",J="[object Uint8Array]",ne="[object Uint8ClampedArray]",q="[object Uint16Array]",oe="[object Uint32Array]",se=/[\\^$.*+?()[\]{}|]/g,ae=/^\[object .+?Constructor\]$/,ze=/^(?:0|[1-9]\d*)$/,ee={};ee[k]=ee[x]=ee[S]=ee[j]=ee[F]=ee[J]=ee[ne]=ee[q]=ee[oe]=!0,ee[a]=ee[l]=ee[M]=ee[h]=ee[I]=ee[u]=ee[d]=ee[p]=ee[g]=ee[v]=ee[w]=ee[D]=ee[L]=ee[R]=ee[A]=!1;var we=typeof ji=="object"&&ji&&ji.Object===Object&&ji,le=typeof self=="object"&&self&&self.Object===Object&&self,he=we||le||Function("return this")(),be=t&&!t.nodeType&&t,te=be&&!0&&n&&!n.nodeType&&n,ke=te&&te.exports===be,Re=ke&&we.process,ye=function(){try{return Re&&Re.binding&&Re.binding("util")}catch(T){}}(),De=ye&&ye.isTypedArray;function ve(T,W){for(var ie=-1,fe=T==null?0:T.length,Ue=0,He=[];++ie<fe;){var Je=T[ie];W(Je,ie,T)&&(He[Ue++]=Je)}return He}function Ae(T,W){for(var ie=-1,fe=W.length,Ue=T.length;++ie<fe;)T[Ue+ie]=W[ie];return T}function Oe(T,W){for(var ie=-1,fe=T==null?0:T.length;++ie<fe;)if(W(T[ie],ie,T))return!0;return!1}function Ye(T,W){for(var ie=-1,fe=Array(T);++ie<T;)fe[ie]=W(ie);return fe}function Ze(T){return function(W){return T(W)}}function ot(T,W){return T.has(W)}function Ke(T,W){return T==null?void 0:T[W]}function et(T){var W=-1,ie=Array(T.size);return T.forEach(function(fe,Ue){ie[++W]=[Ue,fe]}),ie}function lt(T,W){return function(ie){return T(W(ie))}}function ht(T){var W=-1,ie=Array(T.size);return T.forEach(function(fe){ie[++W]=fe}),ie}var Ft=Array.prototype,Zi=Function.prototype,Ut=Object.prototype,li=he["__core-js_shared__"],Ai=Zi.toString,ut=Ut.hasOwnProperty,Qt=function(){var T=/[^.]+$/.exec(li&&li.keys&&li.keys.IE_PROTO||"");return T?"Symbol(src)_1."+T:""}(),Xt=Ut.toString,ir=RegExp("^"+Ai.call(ut).replace(se,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),As=ke?he.Buffer:void 0,Fn=he.Symbol,io=he.Uint8Array,Bn=Ut.propertyIsEnumerable,Di=Ft.splice,wi=Fn?Fn.toStringTag:void 0,Hn=Object.getOwnPropertySymbols,Nn=As?As.isBuffer:void 0,qi=lt(Object.keys,Object),mn=K(he,"DataView"),gn=K(he,"Map"),ws=K(he,"Promise"),Ps=K(he,"Set"),Gn=K(he,"WeakMap"),Ji=K(Object,"create"),no=ni(mn),Vi=ni(gn),Wn=ni(ws),nr=ni(Ps),sr=ni(Gn),Cs=Fn?Fn.prototype:void 0,vn=Cs?Cs.valueOf:void 0;function Ot(T){var W=-1,ie=T==null?0:T.length;for(this.clear();++W<ie;){var fe=T[W];this.set(fe[0],fe[1])}}function so(){this.__data__=Ji?Ji(null):{},this.size=0}function or(T){var W=this.has(T)&&delete this.__data__[T];return this.size-=W?1:0,W}function oo(T){var W=this.__data__;if(Ji){var ie=W[T];return ie===i?void 0:ie}return ut.call(W,T)?W[T]:void 0}function ro(T){var W=this.__data__;return Ji?W[T]!==void 0:ut.call(W,T)}function ao(T,W){var ie=this.__data__;return this.size+=this.has(T)?0:1,ie[T]=Ji&&W===void 0?i:W,this}Ot.prototype.clear=so,Ot.prototype.delete=or,Ot.prototype.get=oo,Ot.prototype.has=ro,Ot.prototype.set=ao;function jt(T){var W=-1,ie=T==null?0:T.length;for(this.clear();++W<ie;){var fe=T[W];this.set(fe[0],fe[1])}}function Ms(){this.__data__=[],this.size=0}function Fi(T){var W=this.__data__,ie=$i(W,T);if(ie<0)return!1;var fe=W.length-1;return ie==fe?W.pop():Di.call(W,ie,1),--this.size,!0}function yn(T){var W=this.__data__,ie=$i(W,T);return ie<0?void 0:W[ie][1]}function bn(T){return $i(this.__data__,T)>-1}function Un(T,W){var ie=this.__data__,fe=$i(ie,T);return fe<0?(++this.size,ie.push([T,W])):ie[fe][1]=W,this}jt.prototype.clear=Ms,jt.prototype.delete=Fi,jt.prototype.get=yn,jt.prototype.has=bn,jt.prototype.set=Un;function Bt(T){var W=-1,ie=T==null?0:T.length;for(this.clear();++W<ie;){var fe=T[W];this.set(fe[0],fe[1])}}function rr(){this.size=0,this.__data__={hash:new Ot,map:new(gn||jt),string:new Ot}}function ar(T){var W=Q(this,T).delete(T);return this.size-=W?1:0,W}function Qn(T){return Q(this,T).get(T)}function Yt(T){return Q(this,T).has(T)}function Ki(T,W){var ie=Q(this,T),fe=ie.size;return ie.set(T,W),this.size+=ie.size==fe?0:1,this}Bt.prototype.clear=rr,Bt.prototype.delete=ar,Bt.prototype.get=Qn,Bt.prototype.has=Yt,Bt.prototype.set=Ki;function $t(T){var W=-1,ie=T==null?0:T.length;for(this.__data__=new Bt;++W<ie;)this.add(T[W])}function ci(T){return this.__data__.set(T,i),this}function Li(T){return this.__data__.has(T)}$t.prototype.add=$t.prototype.push=ci,$t.prototype.has=Li;function kt(T){var W=this.__data__=new jt(T);this.size=W.size}function ei(){this.__data__=new jt,this.size=0}function lo(T){var W=this.__data__,ie=W.delete(T);return this.size=W.size,ie}function co(T){return this.__data__.get(T)}function Xn(T){return this.__data__.has(T)}function ti(T,W){var ie=this.__data__;if(ie instanceof jt){var fe=ie.__data__;if(!gn||fe.length<e-1)return fe.push([T,W]),this.size=++ie.size,this;ie=this.__data__=new Bt(fe)}return ie.set(T,W),this.size=ie.size,this}kt.prototype.clear=ei,kt.prototype.delete=lo,kt.prototype.get=co,kt.prototype.has=Xn,kt.prototype.set=ti;function Yn(T,W){var ie=uo(T),fe=!ie&&ya(T),Ue=!ie&&!fe&&fo(T),He=!ie&&!fe&&!Ue&&wa(T),Je=ie||fe||Ue||He,tt=Je?Ye(T.length,String):[],Tt=tt.length;for(var nt in T)(W||ut.call(T,nt))&&!(Je&&(nt=="length"||Ue&&(nt=="offset"||nt=="parent")||He&&(nt=="buffer"||nt=="byteLength"||nt=="byteOffset")||Qe(nt,Tt)))&&tt.push(nt);return tt}function $i(T,W){for(var ie=T.length;ie--;)if(va(T[ie][0],W))return ie;return-1}function An(T,W,ie){var fe=W(T);return uo(T)?fe:Ae(fe,ie(T))}function Bi(T){return T==null?T===void 0?O:y:wi&&wi in Object(T)?re(T):ii(T)}function Zn(T){return en(T)&&Bi(T)==a}function wn(T,W,ie,fe,Ue){return T===W?!0:T==null||W==null||!en(T)&&!en(W)?T!==T&&W!==W:Pi(T,W,ie,fe,wn,Ue)}function Pi(T,W,ie,fe,Ue,He){var Je=uo(T),tt=uo(W),Tt=Je?l:je(T),nt=tt?l:je(W);Tt=Tt==a?w:Tt,nt=nt==a?w:nt;var Zt=Tt==w,hi=nt==w,_t=Tt==nt;if(_t&&fo(T)){if(!fo(W))return!1;Je=!0,Zt=!1}if(_t&&!Zt)return He||(He=new kt),Je||wa(T)?qn(T,W,ie,fe,Ue,He):cr(T,W,Tt,ie,fe,Ue,He);if(!(ie&s)){var qt=Zt&&ut.call(T,"__wrapped__"),Nt=hi&&ut.call(W,"__wrapped__");if(qt||Nt){var Jn=qt?T.value():T,Pn=Nt?W.value():W;return He||(He=new kt),Ue(Jn,Pn,ie,fe,He)}}return _t?(He||(He=new kt),hr(T,W,ie,fe,Ue,He)):!1}function lr(T){if(!Aa(T)||xt(T))return!1;var W=ba(T)?ir:ae;return W.test(ni(T))}function ho(T){return en(T)&&dr(T.length)&&!!ee[Bi(T)]}function Is(T){if(!Rt(T))return qi(T);var W=[];for(var ie in Object(T))ut.call(T,ie)&&ie!="constructor"&&W.push(ie);return W}function qn(T,W,ie,fe,Ue,He){var Je=ie&s,tt=T.length,Tt=W.length;if(tt!=Tt&&!(Je&&Tt>tt))return!1;var nt=He.get(T);if(nt&&He.get(W))return nt==W;var Zt=-1,hi=!0,_t=ie&o?new $t:void 0;for(He.set(T,W),He.set(W,T);++Zt<tt;){var qt=T[Zt],Nt=W[Zt];if(fe)var Jn=Je?fe(Nt,qt,Zt,W,T,He):fe(qt,Nt,Zt,T,W,He);if(Jn!==void 0){if(Jn)continue;hi=!1;break}if(_t){if(!Oe(W,function(Pn,Es){if(!ot(_t,Es)&&(qt===Pn||Ue(qt,Pn,ie,fe,He)))return _t.push(Es)})){hi=!1;break}}else if(!(qt===Nt||Ue(qt,Nt,ie,fe,He))){hi=!1;break}}return He.delete(T),He.delete(W),hi}function cr(T,W,ie,fe,Ue,He,Je){switch(ie){case I:if(T.byteLength!=W.byteLength||T.byteOffset!=W.byteOffset)return!1;T=T.buffer,W=W.buffer;case M:return!(T.byteLength!=W.byteLength||!He(new io(T),new io(W)));case h:case u:case v:return va(+T,+W);case d:return T.name==W.name&&T.message==W.message;case D:case R:return T==W+"";case g:var tt=et;case L:var Tt=fe&s;if(tt||(tt=ht),T.size!=W.size&&!Tt)return!1;var nt=Je.get(T);if(nt)return nt==W;fe|=o,Je.set(T,W);var Zt=qn(tt(T),tt(W),fe,Ue,He,Je);return Je.delete(T),Zt;case z:if(vn)return vn.call(T)==vn.call(W)}return!1}function hr(T,W,ie,fe,Ue,He){var Je=ie&s,tt=N(T),Tt=tt.length,nt=N(W),Zt=nt.length;if(Tt!=Zt&&!Je)return!1;for(var hi=Tt;hi--;){var _t=tt[hi];if(!(Je?_t in W:ut.call(W,_t)))return!1}var qt=He.get(T);if(qt&&He.get(W))return qt==W;var Nt=!0;He.set(T,W),He.set(W,T);for(var Jn=Je;++hi<Tt;){_t=tt[hi];var Pn=T[_t],Es=W[_t];if(fe)var wd=Je?fe(Es,Pn,_t,W,T,He):fe(Pn,Es,_t,T,W,He);if(!(wd===void 0?Pn===Es||Ue(Pn,Es,ie,fe,He):wd)){Nt=!1;break}Jn||(Jn=_t=="constructor")}if(Nt&&!Jn){var Pa=T.constructor,Ca=W.constructor;Pa!=Ca&&"constructor"in T&&"constructor"in W&&!(typeof Pa=="function"&&Pa instanceof Pa&&typeof Ca=="function"&&Ca instanceof Ca)&&(Nt=!1)}return He.delete(T),He.delete(W),Nt}function N(T){return An(T,fr,Ce)}function Q(T,W){var ie=T.__data__;return Ct(W)?ie[typeof W=="string"?"string":"hash"]:ie.map}function K(T,W){var ie=Ke(T,W);return lr(ie)?ie:void 0}function re(T){var W=ut.call(T,wi),ie=T[wi];try{T[wi]=void 0;var fe=!0}catch(He){}var Ue=Xt.call(T);return fe&&(W?T[wi]=ie:delete T[wi]),Ue}var Ce=Hn?function(T){return T==null?[]:(T=Object(T),ve(Hn(T),function(W){return Bn.call(T,W)}))}:rc,je=Bi;(mn&&je(new mn(new ArrayBuffer(1)))!=I||gn&&je(new gn)!=g||ws&&je(ws.resolve())!=C||Ps&&je(new Ps)!=L||Gn&&je(new Gn)!=A)&&(je=function(T){var W=Bi(T),ie=W==w?T.constructor:void 0,fe=ie?ni(ie):"";if(fe)switch(fe){case no:return I;case Vi:return g;case Wn:return C;case nr:return L;case sr:return A}return W});function Qe(T,W){return W=W==null?r:W,!!W&&(typeof T=="number"||ze.test(T))&&T>-1&&T%1==0&&T<W}function Ct(T){var W=typeof T;return W=="string"||W=="number"||W=="symbol"||W=="boolean"?T!=="__proto__":T===null}function xt(T){return!!Qt&&Qt in T}function Rt(T){var W=T&&T.constructor,ie=typeof W=="function"&&W.prototype||Ut;return T===ie}function ii(T){return Xt.call(T)}function ni(T){if(T!=null){try{return Ai.call(T)}catch(W){}try{return T+""}catch(W){}}return""}function va(T,W){return T===W||T!==T&&W!==W}var ya=Zn(function(){return arguments}())?Zn:function(T){return en(T)&&ut.call(T,"callee")&&!Bn.call(T,"callee")},uo=Array.isArray;function ur(T){return T!=null&&dr(T.length)&&!ba(T)}var fo=Nn||ac;function oc(T,W){return wn(T,W)}function ba(T){if(!Aa(T))return!1;var W=Bi(T);return W==p||W==m||W==c||W==E}function dr(T){return typeof T=="number"&&T>-1&&T%1==0&&T<=r}function Aa(T){var W=typeof T;return T!=null&&(W=="object"||W=="function")}function en(T){return T!=null&&typeof T=="object"}var wa=De?Ze(De):ho;function fr(T){return ur(T)?Yn(T):Is(T)}function rc(){return[]}function ac(){return!1}n.exports=oc})(Ex,Il);const kx=Il,xx=(n,t)=>kx(n,t),Sx=n=>Object.keys(n||{}),Tx=(n,t)=>{const e={};return n.forEach(i=>{e[i]=t[i]}),e},Dx=()=>{const n={},t=(e,i)=>{const{watcherName:s,fn:o}=e,{prop:r,value:a}=i;n[s]||(n[s]={deps:{},fn:o}),n[s].deps[r]=a};return{subscribers:n,subscribe(e,i){e&&t(e,i)},notify(e,i){Object.entries(n).forEach(([s,{deps:o,fn:r}])=>{const a=Sx(o);if(a.includes(i)){const l=Tx(a,e);xx(o,l)||(n[s].deps=l,r())}})}}},Lx=()=>{let n=null;return{targetWatcher(t,e){n={watcherName:t,fn:e},n.fn(),n=null},getTarget(){return n}}};function zx(n,t){const e=Ba(n,"data",{}),i=Ba(n,"watch",{}),s=Ba(n,"methods",{}),o=Ba(t,"onChange",()=>{}),{subscribe:r,notify:a,subscribers:l}=Dx(),{targetWatcher:c,getTarget:h}=Lx();let u;const d={},p=()=>({data:u,methods:d});let m=!1;const g=y=>(...w)=>{m=!0;const C=y(...w);return m=!1,C};Object.entries(s).forEach(([y,w])=>{d[y]=g((...C)=>w(p(),...C)),Object.defineProperty(d[y],"name",{value:y})}),u=new Proxy(Ix(e),{get(y,w){return h()&&!m&&r(h(),{prop:w,value:y[w]}),Reflect.get(...arguments)},set(y,w,C){return y[w]===C||(Reflect.set(...arguments),h()||(o&&o(w,C),a(u,w))),!0}}),Object.entries(i).forEach(([y,w])=>{c(y,()=>{w(p())})});const v=[u,d];return v._internal={_getSubscribers(){return l}},v}function Ox({pageIndex:n,particlesToShow:t,particlesToScroll:e,particlesCount:i}){const s=n===0?0:t-e,o=n*t-n*s,r=o+Math.max(t,e)-1,a=[];for(let l=o;l<=Math.min(i-1,r);l++)a.push(l);return a}function jx({infinite:n,pageIndex:t,pagesCount:e,particlesCount:i,particlesToShow:s,particlesToScroll:o}){const r=Lo(0,t,e-1);let a=r-1,l=r+1;a=n?a<0?e-1:a:Math.max(0,a),l=n?l>e-1?0:l:Math.min(e-1,l);const c=[...new Set([a,r,l,0,e-1])].sort((u,d)=>u-d),h=c.flatMap(u=>Ox({pageIndex:u,particlesToShow:s,particlesToScroll:o,particlesCount:i}));return{pageIndexes:c,particleIndexes:[...new Set(h)].sort((u,d)=>u-d)}}const Rx=(n,t)=>(n(),setInterval(n,t)),_x=35,Vm=1;class Vx{constructor({onProgressValueChange:t}){this._onProgressValueChange=t,this._autoplayDuration,this._onProgressValueChange,this._interval,this._paused=!1}setAutoplayDuration(t){this._autoplayDuration=t}start(t){return new Promise(e=>{this.reset();const i=Math.min(_x,Math.max(this._autoplayDuration,1));let s=-i;this._interval=Rx(()=>$(this,null,function*(){if(this._paused)return;s+=i;const o=s/this._autoplayDuration;this._onProgressValueChange(o),o>Vm&&(this.reset(),yield t(),e())}),i)})}pause(){this._paused=!0}resume(){this._paused=!1}reset(){clearInterval(this._interval),this._onProgressValueChange(Vm)}}function Fx(n){const t=new Vx({onProgressValueChange:r=>{n("progressValue",1-r)}}),e=zx({data:{particlesCountWithoutClones:0,particlesToShow:1,particlesToShowInit:1,particlesToScroll:1,particlesToScrollInit:1,particlesCount:1,currentParticleIndex:1,infinite:!1,autoplayDuration:1e3,clonesCountHead:0,clonesCountTail:0,clonesCountTotal:0,partialPageSize:1,currentPageIndex:1,pagesCount:1,pauseOnFocus:!1,focused:!1,autoplay:!1,autoplayDirection:"next",disabled:!1,durationMsInit:1e3,durationMs:1e3,offset:0,particleWidth:0,loaded:[]},watch:{setLoaded({data:r}){r.loaded=jx({infinite:r.infinite,pageIndex:r.currentPageIndex,pagesCount:r.pagesCount,particlesCount:r.particlesCountWithoutClones,particlesToShow:r.particlesToShow,particlesToScroll:r.particlesToScroll}).particleIndexes},setCurrentPageIndex({data:r}){r.currentPageIndex=y8({currentParticleIndex:r.currentParticleIndex,particlesCount:r.particlesCount,clonesCountHead:r.clonesCountHead,clonesCountTotal:r.clonesCountTotal,infinite:r.infinite,particlesToScroll:r.particlesToScroll})},setPartialPageSize({data:r}){r.partialPageSize=cy({particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow,particlesCountWithoutClones:r.particlesCountWithoutClones})},setClonesCount({data:r}){const{head:a,tail:l}=k8({infinite:r.infinite,particlesToShow:r.particlesToShow,partialPageSize:r.partialPageSize});r.clonesCountHead=a,r.clonesCountTail=l,r.clonesCountTotal=a+l},setProgressManagerAutoplayDuration({data:r}){t.setAutoplayDuration(r.autoplayDuration)},toggleProgressManager({data:{pauseOnFocus:r,focused:a}}){r&&(a?t.pause():t.resume())},initDuration({data:r}){r.durationMs=r.durationMsInit},applyAutoplay({data:r,methods:{_applyAutoplayIfNeeded:a}}){r.autoplay&&a(r.autoplay)},setPagesCount({data:r}){r.pagesCount=A8({infinite:r.infinite,particlesCountWithoutClones:r.particlesCountWithoutClones,particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow})},setParticlesToShow({data:r}){r.particlesToShow=Lo(1,r.particlesToShowInit,r.particlesCountWithoutClones)},setParticlesToScroll({data:r}){r.particlesToScroll=Lo(1,r.particlesToScrollInit,r.particlesCountWithoutClones)}},methods:{_prev({data:r}){r.currentParticleIndex=zc({infinite:r.infinite,pageIndex:r.currentPageIndex-1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_next({data:r}){r.currentParticleIndex=zc({infinite:r.infinite,pageIndex:r.currentPageIndex+1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_moveToParticle({data:r},a){r.currentParticleIndex=Lo(0,a,r.particlesCount-1)},toggleFocused({data:r}){r.focused=!r.focused},_applyAutoplayIfNeeded(l){return $(this,arguments,function*({data:r,methods:a}){if(!r.infinite&&(r.autoplayDirection===ps&&r.currentParticleIndex===r.particlesCount-1||r.autoplayDirection===Yo&&r.currentParticleIndex===0)){t.reset();return}if(r.autoplay){const c=()=>Ih({[ps]:()=>$(this,null,function*(){return a.showNextPage()}),[Yo]:()=>$(this,null,function*(){return a.showPrevPage()})})(r.autoplayDirection);yield t.start(c)}})},_jumpIfNeeded(l){return $(this,arguments,function*({data:r,methods:a}){let c=!1;return r.infinite&&(r.currentParticleIndex===0?(yield a.showParticle(r.particlesCount-r.clonesCountTotal,{animated:!1}),c=!0):r.currentParticleIndex===r.particlesCount-r.clonesCountTail&&(yield a.showParticle(r.clonesCountHead,{animated:!1}),c=!0)),c})},changePage(h,u,d){return $(this,arguments,function*({data:r,methods:a},l,c){if(t.reset(),r.disabled)return;r.disabled=!0,l(),yield a.offsetPage({animated:Or(c,"animated",!0)}),r.disabled=!1,!(yield a._jumpIfNeeded())&&a._applyAutoplayIfNeeded()})},showNextPage(c,h){return $(this,arguments,function*({data:r,methods:a},l){r.disabled||(yield a.changePage(a._next,l))})},showPrevPage(c,h){return $(this,arguments,function*({data:r,methods:a},l){r.disabled||(yield a.changePage(a._prev,l))})},showParticle(c,h,u){return $(this,arguments,function*({methods:r},a,l){yield r.changePage(()=>r._moveToParticle(a),l)})},_getParticleIndexByPageIndex({data:r},a){return zc({infinite:r.infinite,pageIndex:a,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},showPage(c,h,u){return $(this,arguments,function*({methods:r},a,l){const d=r._getParticleIndexByPageIndex(a);yield r.showParticle(d,l)})},offsetPage({data:r},a){const l=Or(a,"animated",!0);return new Promise(c=>{r.durationMs=l?r.durationMsInit:0,r.offset=-r.currentParticleIndex*r.particleWidth,setTimeout(()=>{c()},r.durationMs)})}}},{onChange:n}),[i,s]=e;return[{data:i,progressManager:t},s,e._internal]}function Bx(n){Le(n,"svelte-sme1z4",":root{--sc-color-rgb-light-50p:rgba(93, 93, 93, 0.5);--sc-color-rgb-light:#5d5d5d;--sc-color-hex-dark-50p:rgba(30, 30, 30, 0.5);--sc-color-hex-dark:#1e1e1e}.sc-carousel__carousel-container.svelte-sme1z4{display:flex;width:100%;flex-direction:column;align-items:center}.sc-carousel__content-container.svelte-sme1z4{position:relative;display:flex;width:100%}.sc-carousel__pages-window.svelte-sme1z4{flex:1;display:flex;overflow:hidden;box-sizing:border-box;position:relative}.sc-carousel__pages-container.svelte-sme1z4{width:100%;display:flex;transition-property:transform}.sc-carousel__arrow-container.svelte-sme1z4{padding:5px;box-sizing:border-box;display:flex;align-items:center;justify-content:center}.sc-carousel-progress__container.svelte-sme1z4{width:100%;height:5px;background-color:var(--sc-color-rgb-light-50p);position:absolute;bottom:0}.sc-carousel-button{all:unset;cursor:pointer}.sc-carousel-button:focus{outline:5px auto}")}const Hx=n=>({currentPageIndex:n[0]&32,pagesCount:n[0]&1024,loaded:n[0]&64}),Fm=n=>({currentPageIndex:n[5],pagesCount:n[10],showPage:n[15],loaded:n[6]}),Nx=n=>({loaded:n[0]&64,currentPageIndex:n[0]&32}),Bm=n=>({showNextPage:n[14].showNextPage,loaded:n[6],currentPageIndex:n[5]}),Gx=n=>({loaded:n[0]&64,currentPageIndex:n[0]&32}),Hm=n=>({loaded:n[6],currentPageIndex:n[5]}),Wx=n=>({loaded:n[0]&64,currentPageIndex:n[0]&32}),Nm=n=>({showPrevPage:n[14].showPrevPage,loaded:n[6],currentPageIndex:n[5]});function Gm(n){let t;const e=n[37].prev,i=hs(e,n,n[36],Nm),s=i||Ux(n);return{c(){s&&s.c()},m(o,r){s&&s.m(o,r),t=!0},p(o,r){i?i.p&&(!t||r[0]&96|r[1]&32)&&ds(i,e,o,o[36],t?us(e,o[36],r,Wx):fs(o[36]),Nm):s&&s.p&&(!t||r[0]&36)&&s.p(o,t?r:[-1,-1])},i(o){t||(H(s,o),t=!0)},o(o){Y(s,o),t=!1},d(o){s&&s.d(o)}}}function Ux(n){let t,e,i;return e=new ay({props:{direction:"prev",disabled:!n[2]&&n[5]===0}}),e.$on("click",n[23]),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,o){const r={};o[0]&36&&(r.disabled=!s[2]&&s[5]===0),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function Wm(n){let t,e,i;return e=new Jk({props:{value:n[7]}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","sc-carousel-progress__container svelte-sme1z4")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,o){const r={};o[0]&128&&(r.value=s[7]),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function Um(n){let t;const e=n[37].next,i=hs(e,n,n[36],Bm),s=i||Qx(n);return{c(){s&&s.c()},m(o,r){s&&s.m(o,r),t=!0},p(o,r){i?i.p&&(!t||r[0]&96|r[1]&32)&&ds(i,e,o,o[36],t?us(e,o[36],r,Nx):fs(o[36]),Bm):s&&s.p&&(!t||r[0]&1060)&&s.p(o,t?r:[-1,-1])},i(o){t||(H(s,o),t=!0)},o(o){Y(s,o),t=!1},d(o){s&&s.d(o)}}}function Qx(n){let t,e,i;return e=new ay({props:{direction:"next",disabled:!n[2]&&n[5]===n[10]-1}}),e.$on("click",n[14].showNextPage),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,o){const r={};o[0]&1060&&(r.disabled=!s[2]&&s[5]===s[10]-1),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function Qm(n){let t;const e=n[37].dots,i=hs(e,n,n[36],Fm),s=i||Xx(n);return{c(){s&&s.c()},m(o,r){s&&s.m(o,r),t=!0},p(o,r){i?i.p&&(!t||r[0]&1120|r[1]&32)&&ds(i,e,o,o[36],t?us(e,o[36],r,Hx):fs(o[36]),Fm):s&&s.p&&(!t||r[0]&1056)&&s.p(o,t?r:[-1,-1])},i(o){t||(H(s,o),t=!0)},o(o){Y(s,o),t=!1},d(o){s&&s.d(o)}}}function Xx(n){let t,e;return t=new Wk({props:{pagesCount:n[10],currentPageIndex:n[5]}}),t.$on("pageChange",n[41]),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s[0]&1024&&(o.pagesCount=i[10]),s[0]&32&&(o.currentPageIndex=i[5]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function Yx(n){let t,e,i,s,o,r,a,l,c,h,u,d,p=n[1]&&Gm(n);const m=n[37].default,g=hs(m,n,n[36],Hm);let v=n[3]&&Wm(n),y=n[1]&&Um(n),w=n[4]&&Qm(n);return{c(){t=U("div"),e=U("div"),p&&p.c(),i=ue(),s=U("div"),o=U("div"),g&&g.c(),a=ue(),v&&v.c(),l=ue(),y&&y.c(),c=ue(),w&&w.c(),P(o,"class","sc-carousel__pages-container svelte-sme1z4"),_(o,"transform","translateX("+n[8]+"px)"),_(o,"transition-duration",n[9]+"ms"),_(o,"transition-timing-function",n[0]),P(s,"class","sc-carousel__pages-window svelte-sme1z4"),P(e,"class","sc-carousel__content-container svelte-sme1z4"),P(t,"class","sc-carousel__carousel-container svelte-sme1z4")},m(C,E){Z(C,t,E),B(t,e),p&&p.m(e,null),B(e,i),B(e,s),B(s,o),g&&g.m(o,null),n[39](o),B(s,a),v&&v.m(s,null),n[40](s),B(e,l),y&&y.m(e,null),B(t,c),w&&w.m(t,null),h=!0,u||(d=[oi(r=r8.call(null,o,{thresholdProvider:n[38]})),_e(o,"swipeStart",n[16]),_e(o,"swipeMove",n[18]),_e(o,"swipeEnd",n[19]),_e(o,"swipeFailed",n[20]),_e(o,"swipeThresholdReached",n[17]),oi(h8.call(null,s)),_e(s,"hovered",n[21]),oi(m8.call(null,s)),_e(s,"tapped",n[22])],u=!0)},p(C,E){C[1]?p?(p.p(C,E),E[0]&2&&H(p,1)):(p=Gm(C),p.c(),H(p,1),p.m(e,i)):p&&(xe(),Y(p,1,1,()=>{p=null}),Se()),g&&g.p&&(!h||E[0]&96|E[1]&32)&&ds(g,m,C,C[36],h?us(m,C[36],E,Gx):fs(C[36]),Hm),(!h||E[0]&256)&&_(o,"transform","translateX("+C[8]+"px)"),(!h||E[0]&512)&&_(o,"transition-duration",C[9]+"ms"),(!h||E[0]&1)&&_(o,"transition-timing-function",C[0]),r&&vi(r.update)&&E[0]&2048&&r.update.call(null,{thresholdProvider:C[38]}),C[3]?v?(v.p(C,E),E[0]&8&&H(v,1)):(v=Wm(C),v.c(),H(v,1),v.m(s,null)):v&&(xe(),Y(v,1,1,()=>{v=null}),Se()),C[1]?y?(y.p(C,E),E[0]&2&&H(y,1)):(y=Um(C),y.c(),H(y,1),y.m(e,null)):y&&(xe(),Y(y,1,1,()=>{y=null}),Se()),C[4]?w?(w.p(C,E),E[0]&16&&H(w,1)):(w=Qm(C),w.c(),H(w,1),w.m(t,null)):w&&(xe(),Y(w,1,1,()=>{w=null}),Se())},i(C){h||(H(p),H(g,C),H(v),H(y),H(w),h=!0)},o(C){Y(p),Y(g,C),Y(v),Y(y),Y(w),h=!1},d(C){C&&X(t),p&&p.d(),g&&g.d(C),n[39](null),v&&v.d(),n[40](null),y&&y.d(),w&&w.d(),u=!1,dt(d)}}}function Zx(n,t,e){let{$$slots:i={},$$scope:s}=t,o=[],r,a,l=0,c=0,h=1;const[{data:u,progressManager:d},p,m]=Fx((ve,Ae)=>{Ih({currentPageIndex:()=>e(5,r=Ae),progressValue:()=>e(7,a=Ae),offset:()=>e(8,l=Ae),durationMs:()=>e(9,c=Ae),pagesCount:()=>e(10,h=Ae),loaded:()=>e(6,o=Ae)})(ve)}),g=Vn();let{timingFunction:v="ease-in-out"}=t,{arrows:y=!0}=t,{infinite:w=!0}=t,{initialPageIndex:C=0}=t,{duration:E=500}=t,{autoplay:D=!1}=t,{autoplayDuration:L=3e3}=t,{autoplayDirection:R=ps}=t,{pauseOnFocus:z=!1}=t,{autoplayProgressVisible:O=!1}=t,{dots:A=!0}=t,{swiping:M=!0}=t,{particlesToShow:I=1}=t,{particlesToScroll:k=1}=t;function x(ve,Ae){return $(this,null,function*(){const Oe=Or(Ae,"animated",!0);if(typeof ve!="number")throw new Error("pageIndex should be a number");yield p.showPage(ve,{animated:Oe})})}function S(ve){return $(this,null,function*(){const Ae=Or(ve,"animated",!0);yield p.showPrevPage({animated:Ae})})}function j(ve){return $(this,null,function*(){const Ae=Or(ve,"animated",!0);yield p.showNextPage({animated:Ae})})}let F=0,J,ne;const q=M8(({width:ve})=>{e(11,F=ve),u.particleWidth=F/u.particlesToShow,C8({particlesContainerChildren:ne.children,particleWidth:u.particleWidth}),p.offsetPage({animated:!1})});function oe(){const{clonesToAppend:ve,clonesToPrepend:Ae}=I8({clonesCountHead:u.clonesCountHead,clonesCountTail:u.clonesCountTail,particlesContainerChildren:ne.children});E8({particlesContainer:ne,clonesToAppend:ve,clonesToPrepend:Ae})}zt(()=>{$(this,null,function*(){yield dl(),ne&&J&&(u.particlesCountWithoutClones=ne.children.length,yield dl(),u.infinite&&oe(),u.particlesCount=ne.children.length,p.showPage(C,{animated:!1}),q.observe(J))})}),Kt(()=>{q.disconnect(),d.reset()});function se(ve){return $(this,null,function*(){yield p.showPage(ve,{animated:!0})})}function ae(){M&&(u.durationMs=0)}function ze(ve){return $(this,null,function*(){M&&(yield Ih({[ps]:p.showNextPage,[Yo]:p.showPrevPage})(ve.detail.direction))})}function ee(ve){M&&(u.offset+=ve.detail.dx)}function we(){M&&p.showParticle(u.currentParticleIndex)}function le(){return $(this,null,function*(){M&&(yield p.offsetPage({animated:!0}))})}function he(ve){u.focused=ve.detail.value}function be(){p.toggleFocused()}function te(){p.showPrevPage()}const ke=()=>F/3;function Re(ve){qe[ve?"unshift":"push"](()=>{ne=ve,e(13,ne)})}function ye(ve){qe[ve?"unshift":"push"](()=>{J=ve,e(12,J)})}const De=ve=>se(ve.detail);return n.$$set=ve=>{"timingFunction"in ve&&e(0,v=ve.timingFunction),"arrows"in ve&&e(1,y=ve.arrows),"infinite"in ve&&e(2,w=ve.infinite),"initialPageIndex"in ve&&e(24,C=ve.initialPageIndex),"duration"in ve&&e(25,E=ve.duration),"autoplay"in ve&&e(26,D=ve.autoplay),"autoplayDuration"in ve&&e(27,L=ve.autoplayDuration),"autoplayDirection"in ve&&e(28,R=ve.autoplayDirection),"pauseOnFocus"in ve&&e(29,z=ve.pauseOnFocus),"autoplayProgressVisible"in ve&&e(3,O=ve.autoplayProgressVisible),"dots"in ve&&e(4,A=ve.dots),"swiping"in ve&&e(30,M=ve.swiping),"particlesToShow"in ve&&e(31,I=ve.particlesToShow),"particlesToScroll"in ve&&e(32,k=ve.particlesToScroll),"$$scope"in ve&&e(36,s=ve.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&32&&g("pageChange",r),n.$$.dirty[0]&4&&(u.infinite=w),n.$$.dirty[0]&33554432&&(u.durationMsInit=E),n.$$.dirty[0]&67108864&&(u.autoplay=D),n.$$.dirty[0]&134217728&&(u.autoplayDuration=L),n.$$.dirty[0]&268435456&&(u.autoplayDirection=R),n.$$.dirty[0]&536870912&&(u.pauseOnFocus=z),n.$$.dirty[1]&1&&(u.particlesToShowInit=I),n.$$.dirty[1]&2&&(u.particlesToScrollInit=k)},[v,y,w,O,A,r,o,a,l,c,h,F,J,ne,p,se,ae,ze,ee,we,le,he,be,te,C,E,D,L,R,z,M,I,k,x,S,j,s,i,ke,Re,ye,De]}class qx extends Ee{constructor(t){super(),Ie(this,t,Zx,Yx,Me,{timingFunction:0,arrows:1,infinite:2,initialPageIndex:24,duration:25,autoplay:26,autoplayDuration:27,autoplayDirection:28,pauseOnFocus:29,autoplayProgressVisible:3,dots:4,swiping:30,particlesToShow:31,particlesToScroll:32,goTo:33,goToPrev:34,goToNext:35},Bx,[-1,-1])}get goTo(){return this.$$.ctx[33]}get goToPrev(){return this.$$.ctx[34]}get goToNext(){return this.$$.ctx[35]}}function Jx(n){Le(n,"svelte-159ski6",".media-item.svelte-159ski6.svelte-159ski6{position:relative;height:100%}.media-content.svelte-159ski6.svelte-159ski6{position:relative;pointer-events:auto;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:inherit;object-fit:inherit}.media-content.showPlayButton.svelte-159ski6.svelte-159ski6{pointer-events:none}.video-icon.svelte-159ski6.svelte-159ski6{width:12.5rem;height:6.25rem;max-width:60%;max-height:60%;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.video-play-button-container.svelte-159ski6.svelte-159ski6{display:none;position:absolute;width:100%;height:100%;top:0;left:0;transform:translate3d(0, 0, 0)}.video-play-button-container.showPlayButton.svelte-159ski6.svelte-159ski6{pointer-events:none;display:block}.video-icon.svelte-159ski6.svelte-159ski6{pointer-events:auto}.video-icon.large.svelte-159ski6.svelte-159ski6{width:12.5rem;height:6.25rem}.video-icon.small.svelte-159ski6.svelte-159ski6{width:1.75rem;height:1.75rem}.video-icon.svelte-159ski6 .video-icon-img.svelte-159ski6{width:100%;height:100%;background-position:center center;background-size:contain;background-repeat:no-repeat}.video-icon.svelte-159ski6 .video-icon-img.canPlay.svelte-159ski6{cursor:pointer}")}function Xm(n){let t;function e(o,r){if(o[2].type==="Image")return $x;if(o[2].type==="Video")return Kx}let i=e(n),s=i&&i(n);return{c(){t=U("div"),s&&s.c(),P(t,"class","media-item svelte-159ski6"),P(t,"draggable","false")},m(o,r){Z(o,t,r),s&&s.m(t,null)},p(o,r){i===(i=e(o))&&s?s.p(o,r):(s&&s.d(1),s=i&&i(o),s&&(s.c(),s.m(t,null)))},d(o){o&&X(t),s&&s.d()}}}function Kx(n){let t,e,i,s,o,r;function a(h,u){return h[8]&&h[2].videoCoverUrl?tS:eS}let l=a(n),c=l(n);return{c(){c.c(),t=ue(),e=U("div"),i=U("div"),s=U("div"),P(s,"class","video-icon-img svelte-159ski6"),_(s,"background-image","url("+n[21]()+")"),Pe(s,"canPlay",n[5]),P(i,"class","video-icon svelte-159ski6"),Pe(i,"large",n[4]==="large"),Pe(i,"small",n[4]==="small"),P(e,"class","video-play-button-container svelte-159ski6"),Pe(e,"showPlayButton",n[11])},m(h,u){c.m(h,u),Z(h,t,u),Z(h,e,u),B(e,i),B(i,s),o||(r=_e(s,"click",n[22]),o=!0)},p(h,u){l===(l=a(h))&&c?c.p(h,u):(c.d(1),c=l(h),c&&(c.c(),c.m(t.parentNode,t))),u&8&&_(s,"background-image","url("+h[21]()+")"),u&32&&Pe(s,"canPlay",h[5]),u&16&&Pe(i,"large",h[4]==="large"),u&16&&Pe(i,"small",h[4]==="small"),u&2048&&Pe(e,"showPlayButton",h[11])},d(h){c.d(h),h&&X(t),h&&X(e),o=!1,r()}}}function $x(n){let t,e,i;return{c(){t=U("img"),P(t,"class","media-content svelte-159ski6"),at(t.src,e=n[2].url)||P(t,"src",e),P(t,"alt",i=n[2].name),P(t,"draggable",!1),_(t,"object-fit",n[7])},m(s,o){Z(s,t,o)},p(s,o){o&4&&!at(t.src,e=s[2].url)&&P(t,"src",e),o&4&&i!==(i=s[2].name)&&P(t,"alt",i),o&128&&_(t,"object-fit",s[7])},d(s){s&&X(t)}}}function eS(n){let t,e,i,s,o,r;return{c(){t=U("video"),P(t,"class","media-content svelte-159ski6"),at(t.src,e=n[2].videoCoverUrl?n[2].url:n[2].url+"#t=0.1")||P(t,"src",e),P(t,"poster",i=n[2].videoCoverUrl),P(t,"preload",s=n[2].videoCoverUrl?"none":"auto"),P(t,"disablepictureinpicture",""),t.playsInline=!0,P(t,"paused",""),t.muted=!0,P(t,"draggable",!1),t.loop=!1,P(t,"crossorigin",""),t.autoplay=n[6],t.controls=!1,Pe(t,"showPlayButton",n[11]),_(t,"object-fit",n[7])},m(a,l){Z(a,t,l),n[20](t),o||(r=[_e(t,"play",n[15]),_e(t,"pause",n[16]),_e(t,"error",n[17]),_e(t,"ended",n[18]),_e(t,"click",n[19])],o=!0)},p(a,l){l&4&&!at(t.src,e=a[2].videoCoverUrl?a[2].url:a[2].url+"#t=0.1")&&P(t,"src",e),l&4&&i!==(i=a[2].videoCoverUrl)&&P(t,"poster",i),l&4&&s!==(s=a[2].videoCoverUrl?"none":"auto")&&P(t,"preload",s),l&64&&(t.autoplay=a[6]),l&2048&&Pe(t,"showPlayButton",a[11]),l&128&&_(t,"object-fit",a[7])},d(a){a&&X(t),n[20](null),o=!1,dt(r)}}}function tS(n){let t,e,i;return{c(){t=U("img"),P(t,"class","media-content svelte-159ski6"),at(t.src,e=n[2].videoCoverUrl)||P(t,"src",e),P(t,"alt",i=n[2].name),P(t,"draggable",!1),_(t,"object-fit",n[7])},m(s,o){Z(s,t,o)},p(s,o){o&4&&!at(t.src,e=s[2].videoCoverUrl)&&P(t,"src",e),o&4&&i!==(i=s[2].name)&&P(t,"alt",i),o&128&&_(t,"object-fit",s[7])},d(s){s&&X(t)}}}function iS(n){let t,e=n[2]&&Xm(n);return{c(){e&&e.c(),t=Be()},m(i,s){e&&e.m(i,s),Z(i,t,s)},p(i,[s]){i[2]?e?e.p(i,s):(e=Xm(i),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:ce,o:ce,d(i){e&&e.d(i),i&&X(t)}}}function nS(n,t,e){let i,s,{mediaInstance:o={videoInstance:void 0,paused:!0}}=t,{tag:r}=t,{media:a}=t,{playButtonIfNeed:l="withoutText"}=t,{playButtonSizeIfNeed:c="small"}=t,{canPlay:h=!0}=t,{autoplayVideo:u=!1}=t,{objectFit:d="fill"}=t,{disableVideoIfHavePoster:p=!1}=t,m=!0,g=!1;function v(){e(9,g=(a==null?void 0:a.type)==="Video"&&!!a.videoCoverUrl)}const y=cn("mediaStore"),w=cn("hooks"),C=()=>{g||i&&(e(10,i.muted=!0,i),i.play(),i.pause(),e(10,i.muted=!1,i),e(9,g=!0))};w.on("loadVideoFirstFrame",C),zt(()=>{y.subscribe(({currentMediaElement:I})=>{I!==i&&(i==null||i.pause())})});const E=I=>{e(11,m=!1),e(0,o.paused=!1,o),e(9,g=!0),i&&y.set({currentMediaElement:i}),w.emit("playStateChange",{event:I,state:"playing",tag:r,mediaInstance:i})},D=I=>{e(11,m=!0),e(0,o.paused=!0,o),w.emit("playStateChange",{event:I,state:"paused",tag:r,mediaInstance:i})},L=I=>{e(11,m=!0),e(0,o.paused=!0,o),w.emit("playStateChange",{event:I,state:"paused",tag:r,mediaInstance:i})},R=I=>{e(11,m=!0),e(0,o.paused=!0,o),w.emit("playStateChange",{event:I,state:"paused",tag:r,mediaInstance:i})},z=I=>{i&&i.pause()};function O(I){qe[I?"unshift":"push"](()=>{o.videoInstance=I,e(0,o)})}const A=()=>l==="withText"?Uu:l==="withoutText"?bh:l,M=I=>{h&&i&&(e(10,i.muted=!1,i),i.play())};return n.$$set=I=>{"mediaInstance"in I&&e(0,o=I.mediaInstance),"tag"in I&&e(1,r=I.tag),"media"in I&&e(2,a=I.media),"playButtonIfNeed"in I&&e(3,l=I.playButtonIfNeed),"playButtonSizeIfNeed"in I&&e(4,c=I.playButtonSizeIfNeed),"canPlay"in I&&e(5,h=I.canPlay),"autoplayVideo"in I&&e(6,u=I.autoplayVideo),"objectFit"in I&&e(7,d=I.objectFit),"disableVideoIfHavePoster"in I&&e(8,p=I.disableVideoIfHavePoster)},n.$$.update=()=>{if(n.$$.dirty&1&&e(10,i=o.videoInstance),n.$$.dirty&4&&e(14,s=a==null?void 0:a.url),n.$$.dirty&16384&&s&&v(),n.$$.dirty&1024&&i&&e(11,m=i.paused),n.$$.dirty&1540&&(a==null?void 0:a.type)==="Video"&&!g){const I=navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1,x=navigator.userAgent.toLowerCase().indexOf("iphone")!==-1&&I;i&&x&&i.paused&&(document.removeEventListener("WeixinJSBridgeReady",C),document.removeEventListener("touchstart",C),document.removeEventListener("click",C),document.addEventListener("WeixinJSBridgeReady",C),document.addEventListener("touchstart",C),document.addEventListener("click",C))}},[o,r,a,l,c,h,u,d,p,g,i,m,y,w,s,E,D,L,R,z,O,A,M]}class id extends Ee{constructor(t){super(),Ie(this,t,nS,iS,Me,{mediaInstance:0,tag:1,media:2,playButtonIfNeed:3,playButtonSizeIfNeed:4,canPlay:5,autoplayVideo:6,objectFit:7,disableVideoIfHavePoster:8},Jx)}}function sS(n){Le(n,"svelte-1mrbqlg",".media-list-wrapper.svelte-1mrbqlg.svelte-1mrbqlg{width:100%;height:100%;position:relative;overflow:hidden;border-radius:0.125rem}.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg{position:relative;pointer-events:auto;height:100%;left:50%;top:50%;transform:translate(-50%, -50%)}.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg .sc-carousel__carousel-container,.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg .sc-carousel__content-container{height:100%}")}function Ym(n,t,e){const i=n.slice();return i[28]=t[e],i[29]=t,i[30]=e,i}function Zm(n){let t,e,i,s,o,r,a;const l=[rS,oS],c=[];function h(u,d){return u[13]&&u[10].length>1?0:1}return i=h(n),s=c[i]=l[i](n),{c(){t=U("div"),e=U("div"),s.c(),P(e,"class","media-list svelte-1mrbqlg"),Pe(e,"carouselEnabled",n[13]),P(t,"class","media-list-wrapper svelte-1mrbqlg"),Pe(t,"unfolded",n[5])},m(u,d){Z(u,t,d),B(t,e),c[i].m(e,null),a=!0},p(u,d){n=u;let p=i;i=h(n),i===p?c[i].p(n,d):(xe(),Y(c[p],1,1,()=>{c[p]=null}),Se(),s=c[i],s?s.p(n,d):(s=c[i]=l[i](n),s.c()),H(s,1),s.m(e,null)),(!a||d[0]&8192)&&Pe(e,"carouselEnabled",n[13]),(!a||d[0]&32)&&Pe(t,"unfolded",n[5])},i(u){a||(H(s),u&&At(()=>{a&&(r&&r.end(1),o=vs(t,Yd,n[6]?{y:4,duration:n[4],delay:n[2],easing:Rn}:void 0),o.start())}),a=!0)},o(u){Y(s),o&&o.invalidate(),u&&(r=qo(t,Yd,n[6]?{y:4,duration:n[4],delay:n[3],easing:Rn}:void 0)),a=!1},d(u){u&&X(t),c[i].d(),u&&r&&r.end()}}}function oS(n){let t,e,i;const s=[{media:n[1][0]},{autoplayVideo:n[14]},n[7],{tag:n[0]}];function o(a){n[21](a)}let r={};for(let a=0;a<s.length;a+=1)r=pt(r,s[a]);return n[8][0]!==void 0&&(r.mediaInstance=n[8][0]),t=new id({props:r}),qe.push(()=>Wl(t,"mediaInstance",o)),{c(){ge(t.$$.fragment)},m(a,l){pe(t,a,l),i=!0},p(a,l){const c=l[0]&16515?yt(s,[l[0]&2&&{media:a[1][0]},l[0]&16384&&{autoplayVideo:a[14]},l[0]&128&&Jv(a[7]),l[0]&1&&{tag:a[0]}]):{};!e&&l[0]&256&&(e=!0,c.mediaInstance=a[8][0],Gl(()=>e=!1)),t.$set(c)},i(a){i||(H(t.$$.fragment,a),i=!0)},o(a){Y(t.$$.fragment,a),i=!1},d(a){me(t,a)}}}function rS(n){let t,e,i={dots:!1,arrows:!1,$$slots:{default:[aS]},$$scope:{ctx:n}};return t=new qx({props:i}),n[19](t),t.$on("pageChange",n[20]),{c(){ge(t.$$.fragment)},m(s,o){pe(t,s,o),e=!0},p(s,o){const r={};o[0]&1409|o[1]&1&&(r.$$scope={dirty:o,ctx:s}),t.$set(r)},i(s){e||(H(t.$$.fragment,s),e=!0)},o(s){Y(t.$$.fragment,s),e=!1},d(s){n[19](null),me(t,s)}}}function qm(n){let t,e,i;const s=[n[7],{media:n[28]},{tag:n[0]}];function o(a){n[18](a,n[30])}let r={};for(let a=0;a<s.length;a+=1)r=pt(r,s[a]);return n[8][n[30]]!==void 0&&(r.mediaInstance=n[8][n[30]]),t=new id({props:r}),qe.push(()=>Wl(t,"mediaInstance",o)),{c(){ge(t.$$.fragment)},m(a,l){pe(t,a,l),i=!0},p(a,l){n=a;const c=l[0]&1153?yt(s,[l[0]&128&&Jv(n[7]),l[0]&1024&&{media:n[28]},l[0]&1&&{tag:n[0]}]):{};!e&&l[0]&256&&(e=!0,c.mediaInstance=n[8][n[30]],Gl(()=>e=!1)),t.$set(c)},i(a){i||(H(t.$$.fragment,a),i=!0)},o(a){Y(t.$$.fragment,a),i=!1},d(a){me(t,a)}}}function aS(n){let t,e,i=n[10],s=[];for(let r=0;r<i.length;r+=1)s[r]=qm(Ym(n,i,r));const o=r=>Y(s[r],1,1,()=>{s[r]=null});return{c(){for(let r=0;r<s.length;r+=1)s[r].c();t=Be()},m(r,a){for(let l=0;l<s.length;l+=1)s[l]&&s[l].m(r,a);Z(r,t,a),e=!0},p(r,a){if(a[0]&1409){i=r[10];let l;for(l=0;l<i.length;l+=1){const c=Ym(r,i,l);s[l]?(s[l].p(c,a),H(s[l],1)):(s[l]=qm(c),s[l].c(),H(s[l],1),s[l].m(t.parentNode,t))}for(xe(),l=i.length;l<s.length;l+=1)o(l);Se()}},i(r){if(!e){for(let a=0;a<i.length;a+=1)H(s[a]);e=!0}},o(r){s=s.filter(Boolean);for(let a=0;a<s.length;a+=1)Y(s[a]);e=!1},d(r){Ti(s,r),r&&X(t)}}}function lS(n){let t,e,i=n[5]&&Zm(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,o){s[5]?i?(i.p(s,o),o[0]&32&&H(i,1)):(i=Zm(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function cS(n,t,e){let i,s,o,r,{tag:a}=t,{mediaData:l}=t,{inDelay:c=0}=t,{outDelay:h=0}=t,{duration:u=0}=t,{unfolded:d=!0}=t,{animation:p=!0}=t,{mediaItemConfig:m}=t,{enableCarousel:g=!0}=t,{autoplayConfig:v={}}=t;const{autoplayVideo:y=!1,autoplayCarousel:w=!0,autoplayVideoInCarousel:C=!1}=v;let E=[],D=0,L,R=null;const z=cn("hooks"),O=cn("mediaStore");function A(){const S=E[D],j=S==null?void 0:S.videoInstance;j&&(j.paused?(j.muted=!1,j.play()):j.pause())}zt(()=>{z.on("click",S=>{var j;(j=a.tag3DContentSvelte)!=null&&j.css3DInstance&&S.tag.id===a.id&&S.target==="TagContent"&&A()}),e(0,a.play=()=>{const S=E[D],j=S==null?void 0:S.videoInstance;j&&(j.muted=!1,j.play())},a),e(0,a.pause=()=>{const S=E[D],j=S==null?void 0:S.videoInstance;j&&j.pause()},a),R=setInterval(()=>{r&&(L==null||L.goToNext())},3e3)}),Kt(()=>{clearInterval(R),z.off("click",A)});function M(S,j){n.$$.not_equal(E[j],S)&&(E[j]=S,e(8,E))}function I(S){qe[S?"unshift":"push"](()=>{L=S,e(12,L)})}const k=S=>{i||O.set({currentMediaElement:null}),e(11,D=S.detail)};function x(S){n.$$.not_equal(E[0],S)&&(E[0]=S,e(8,E))}return n.$$set=S=>{"tag"in S&&e(0,a=S.tag),"mediaData"in S&&e(1,l=S.mediaData),"inDelay"in S&&e(2,c=S.inDelay),"outDelay"in S&&e(3,h=S.outDelay),"duration"in S&&e(4,u=S.duration),"unfolded"in S&&e(5,d=S.unfolded),"animation"in S&&e(6,p=S.animation),"mediaItemConfig"in S&&e(7,m=S.mediaItemConfig),"enableCarousel"in S&&e(16,g=S.enableCarousel),"autoplayConfig"in S&&e(17,v=S.autoplayConfig)},n.$$.update=()=>{n.$$.dirty[0]&256&&e(9,i=E.every(S=>S.paused)),n.$$.dirty[0]&65538&&e(13,s=g&&(l==null?void 0:l.length)>1),n.$$.dirty[0]&2&&e(10,o=l),n.$$.dirty[0]&1536&&(r=o.length>1&&w&&i)},[a,l,c,h,u,d,p,m,E,i,o,D,L,s,y,O,g,v,M,I,k,x]}class yy extends Ee{constructor(t){super(),Ie(this,t,cS,lS,Me,{tag:0,mediaData:1,inDelay:2,outDelay:3,duration:4,unfolded:5,animation:6,mediaItemConfig:7,enableCarousel:16,autoplayConfig:17},sS,[-1,-1])}}function hS(n){Le(n,"svelte-1f7m1lj",".line.svelte-1f7m1lj{position:absolute;width:6.5625rem;height:1.3125rem;transform:translateY(-100%)}.text.svelte-1f7m1lj{position:absolute;width:6.25rem;left:1rem;bottom:0.0625rem;font-weight:600}.media-wrapper.svelte-1f7m1lj{position:absolute;left:0.875rem;top:-5.3125rem;width:5.625rem;height:3.75rem;font-weight:600}")}function Jm(n){let t,e,i,s,o,r,a,l;t=new Xi({props:{visible:n[3],left:61,bottom:57,width:2,blurRadius:150,spreadRadius:75}}),s=new Rk({props:{unfolded:n[3],outDelay:400}});let c=n[2]&&Km(n),h=n[1]&&$m(n);return{c(){ge(t.$$.fragment),e=ue(),i=U("div"),ge(s.$$.fragment),o=ue(),c&&c.c(),r=ue(),h&&h.c(),a=Be(),P(i,"class","line svelte-1f7m1lj")},m(u,d){pe(t,u,d),Z(u,e,d),Z(u,i,d),pe(s,i,null),Z(u,o,d),c&&c.m(u,d),Z(u,r,d),h&&h.m(u,d),Z(u,a,d),l=!0},p(u,d){const p={};d&8&&(p.visible=u[3]),t.$set(p);const m={};d&8&&(m.unfolded=u[3]),s.$set(m),u[2]?c?(c.p(u,d),d&4&&H(c,1)):(c=Km(u),c.c(),H(c,1),c.m(r.parentNode,r)):c&&(xe(),Y(c,1,1,()=>{c=null}),Se()),u[1]?h?(h.p(u,d),d&2&&H(h,1)):(h=$m(u),h.c(),H(h,1),h.m(a.parentNode,a)):h&&(xe(),Y(h,1,1,()=>{h=null}),Se())},i(u){l||(H(t.$$.fragment,u),H(s.$$.fragment,u),H(c),H(h),l=!0)},o(u){Y(t.$$.fragment,u),Y(s.$$.fragment,u),Y(c),Y(h),l=!1},d(u){me(t,u),u&&X(e),u&&X(i),me(s),u&&X(o),c&&c.d(u),u&&X(r),h&&h.d(u),u&&X(a)}}}function Km(n){let t,e,i;return e=new oy({props:{unfolded:n[3],content:n[2],inDelay:500}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","text svelte-1f7m1lj")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,o){const r={};o&8&&(r.unfolded=s[3]),o&4&&(r.content=s[2]),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function $m(n){let t,e,i;return e=new yy({props:{autoplayConfig:{autoplayCarousel:!1},unfolded:n[3],mediaData:n[1],tag:n[0],enableCarousel:!1,mediaItemConfig:{canPlay:!1,playButtonSizeIfNeed:"small",disableVideoIfHavePoster:!0},inDelay:500,duration:500}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","media-wrapper svelte-1f7m1lj")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,o){const r={};o&8&&(r.unfolded=s[3]),o&2&&(r.mediaData=s[1]),o&1&&(r.tag=s[0]),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function uS(n){let t,e,i=n[0].state&&Jm(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[0].state?i?(i.p(s,o),o&1&&H(i,1)):(i=Jm(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function dS(n,t,e){let i,s,o,r,{tag:a}=t;return n.$$set=l=>{"tag"in l&&e(0,a=l.tag)},n.$$.update=()=>{var l,c,h;n.$$.dirty&1&&e(3,i=a.state?a.state.unfolded:!1),n.$$.dirty&1&&e(4,s=(c=(l=a.data.title)!=null?l:a.data.text)!=null?c:""),n.$$.dirty&16&&e(2,o=((h=s.length)!=null?h:0)>7?s.substring(0,6)+"...":s),n.$$.dirty&1&&e(1,r=a.data.mediaData)},[a,r,o,i,s]}class fS extends Ee{constructor(t){super(),Ie(this,t,dS,uS,Me,{tag:0},hS)}}const pS="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAMAAAAolt3jAAAAOVBMVEUAAAD///////////////////////////////////////////////////////////////////////8KOjVvAAAAE3RSTlMAZV7nzWlZRTewq5CJUlEeHA4Lu1bjhwAAADRJREFUCNdjIAz4mFC4gtyMKHx+TlYUPgcLKp+RmQmVy4aiGFlSgAtZToiHF1kjOzsDUQAAVSIA07bTGZwAAAAASUVORK5CYII=",mS="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAMAAAAolt3jAAAAM1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACjBUbJAAAAEXRSTlMAUUg+uqRVTBcKjop0bjUtK+w+Um4AAAA1SURBVAjXYyAMmNlRuJw8jCh8Di42FD4/KyqfkYUdlcuExBNgReZxcCPzOHmZkTXygXmEAQBMcAC8/O73cwAAAABJRU5ErkJggg==";function gS(n){Le(n,"svelte-biv7k0",'@charset "UTF-8";.svelte-biv7k0.svelte-biv7k0{box-sizing:border-box}.marketing.svelte-biv7k0.svelte-biv7k0{transform:translateY(-100%)}.marketing.svelte-biv7k0 .line.svelte-biv7k0{position:absolute;height:1.875rem;width:0.0625rem;left:50%;transform:translateX(-50%);background-color:white;bottom:0;transform-origin:bottom;transition:all 500ms}.marketing.svelte-biv7k0 .content.svelte-biv7k0{position:relative;min-width:7.5rem;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;border-radius:0.375rem;top:-1.875rem;left:-1rem;transition-property:opacity, transform;transition-duration:500ms}.marketing.svelte-biv7k0 .content .headerImage.svelte-biv7k0{width:100%;position:absolute;left:0;top:0;transform:translateY(-100%);border-top-left-radius:0.375rem;border-top-right-radius:0.375rem}.marketing.svelte-biv7k0 .content .content-wrapper.svelte-biv7k0{width:100%;padding:1.25rem}.title-wrapper.svelte-biv7k0.svelte-biv7k0{position:relative;width:100%}.title-wrapper.svelte-biv7k0 .title.svelte-biv7k0{border-radius:0.25rem;width:100%}.title-wrapper.svelte-biv7k0 .title .text.svelte-biv7k0{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-word;overflow-wrap:break-word;hyphens:auto;-webkit-hyphens:auto;letter-spacing:0;font-size:1rem;font-weight:600;line-height:1.375rem}.price-wrapper.svelte-biv7k0.svelte-biv7k0{box-sizing:border-box;width:100%;margin-top:0.5rem;display:flex;justify-content:space-between;align-items:center}.price-wrapper.svelte-biv7k0 .price-section.svelte-biv7k0{flex-shrink:0;overflow:hidden;white-space:nowrap}.price-wrapper.svelte-biv7k0 .price-section .value.svelte-biv7k0{font-size:1.25rem;font-weight:700;line-height:1.5rem;font-family:DINAlternate-Bold TG-TYPE, PingFangSC, Segoe UI, Rototo, sans-serif;letter-spacing:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.price-wrapper.svelte-biv7k0 .price-section .unit.svelte-biv7k0{font-size:1.25rem;font-weight:700;line-height:1.5rem;font-family:DINAlternate-Bold TG-TYPE, PingFangSC, Segoe UI, Rototo, sans-serif !important;letter-spacing:0}.price-wrapper.svelte-biv7k0 .action-section.svelte-biv7k0{display:flex;align-items:center;height:1.125rem}.price-wrapper.svelte-biv7k0 .action-section .highlight-text.svelte-biv7k0{font-size:0.75rem;line-height:1.125rem;font-weight:400;letter-spacing:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:8.75rem}.tags-wrapper.svelte-biv7k0.svelte-biv7k0{position:relative;overflow:hidden;margin-top:0.3125rem}.tags-wrapper.svelte-biv7k0 .tags.svelte-biv7k0{position:relative;display:inline-flex;max-width:100%;flex-wrap:wrap}.tags-wrapper.svelte-biv7k0 .tags .tag.svelte-biv7k0{display:block;text-align:center;flex-shrink:0;flex-grow:0;font-size:0.75rem;font-weight:400;height:1.125rem;line-height:1.125rem;margin-right:0.25rem;margin-bottom:0.25rem;padding:0 0.25rem;border-radius:0.125rem;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}.media-wrapper.svelte-biv7k0.svelte-biv7k0{margin-top:0.375rem;width:100%;aspect-ratio:16/9;border-radius:0.25rem;overflow:hidden}.description.svelte-biv7k0.svelte-biv7k0{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4;width:100%;overflow:hidden;text-overflow:ellipsis;word-break:break-word;overflow-wrap:break-word;hyphens:auto;-webkit-hyphens:auto;white-space:normal;margin-top:0.25rem;font-size:0.875rem;font-weight:400;line-height:1.25rem;letter-spacing:0}.more-share-wrapper.svelte-biv7k0.svelte-biv7k0{margin-top:0.75rem;display:block;width:100%;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between}.more-share-wrapper.svelte-biv7k0 .more-text.svelte-biv7k0{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:center;height:1.25rem;font-size:0.875rem;font-weight:500;line-height:1.25rem;letter-spacing:0}.more-share-wrapper.svelte-biv7k0 .more-text .more-icon.svelte-biv7k0{margin-left:0.125rem;width:0.875rem;height:0.875rem}.marketing.light.svelte-biv7k0 .content.svelte-biv7k0{background-color:white}.marketing.light.svelte-biv7k0 .content .title-wrapper .title .text.svelte-biv7k0{color:rgba(0, 0, 0, 0.8)}.marketing.light.svelte-biv7k0 .content .tags-wrapper .tags .primary-tag.svelte-biv7k0{background:rgba(234, 208, 154, 0.5);color:#946700}.marketing.light.svelte-biv7k0 .content .tags-wrapper .tags .secondary-tag.svelte-biv7k0{background:rgba(0, 0, 0, 0.06);color:rgba(0, 0, 0, 0.5)}.marketing.light.svelte-biv7k0 .content .description.svelte-biv7k0{color:#000}.marketing.light.svelte-biv7k0 .content .price-wrapper.svelte-biv7k0{color:#ae7900}.marketing.light.svelte-biv7k0 .content .more-share-wrapper .more-text.svelte-biv7k0{font-family:PingFangSC-Medium;color:rgba(0, 0, 0, 0.8509803922)}.marketing.dark.svelte-biv7k0 .content.svelte-biv7k0{background-color:rgba(0, 0, 0, 0.75)}.marketing.dark.svelte-biv7k0 .content .title-wrapper .title .text.svelte-biv7k0{color:white}.marketing.dark.svelte-biv7k0 .content .tags-wrapper .tags .primary-tag.svelte-biv7k0{background:rgba(234, 208, 154, 0.5);color:white}.marketing.dark.svelte-biv7k0 .content .tags-wrapper .tags .secondary-tag.svelte-biv7k0{background:rgba(255, 255, 255, 0.15);color:rgba(255, 255, 255, 0.85)}.marketing.dark.svelte-biv7k0 .content .description.svelte-biv7k0{color:#fff}.marketing.dark.svelte-biv7k0 .content .price-wrapper.svelte-biv7k0{color:#ead09a;fill:#ead09a}.marketing.dark.svelte-biv7k0 .content .more-share-wrapper .more-text.svelte-biv7k0{font-family:PingFangSC-Medium;color:#fff}.marketing.unfolded.svelte-biv7k0 .line.svelte-biv7k0{transform:translateX(-50%) scale(1, 1);transition-timing-function:ease-out}.marketing.folded.svelte-biv7k0 .line.svelte-biv7k0{transform:translateX(-50%) scale(1, 0);transition-timing-function:ease-in}.marketing.unfolded.svelte-biv7k0 .content.svelte-biv7k0{opacity:1;transform:translateY(0);transition-timing-function:ease-out}.marketing.folded.svelte-biv7k0 .content.svelte-biv7k0{opacity:0;transform:translateY(0.425rem);transition-timing-function:ease-in}.tag.svelte-biv7k0.svelte-biv7k0,.text.svelte-biv7k0.svelte-biv7k0{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}')}function eg(n,t,e){const i=n.slice();return i[0]=t[e],i}function tg(n,t,e){const i=n.slice();return i[0]=t[e],i}function ig(n){let t,e;return{c(){t=U("img"),P(t,"class","headerImage svelte-biv7k0"),at(t.src,e=n[2].headerPictureUrl)||P(t,"src",e),P(t,"alt","")},m(i,s){Z(i,t,s)},p(i,s){s[0]&4&&!at(t.src,e=i[2].headerPictureUrl)&&P(t,"src",e)},d(i){i&&X(t)}}}function ng(n){let t,e,i,s,o,r=n[5]||[],a=[];for(let h=0;h<r.length;h+=1)a[h]=sg(tg(n,r,h));let l=n[4]||[],c=[];for(let h=0;h<l.length;h+=1)c[h]=og(eg(n,l,h));return{c(){t=U("div"),e=U("div");for(let h=0;h<a.length;h+=1)a[h].c();i=ue();for(let h=0;h<c.length;h+=1)c[h].c();P(e,"class","tags svelte-biv7k0"),P(t,"class","tags-wrapper svelte-biv7k0")},m(h,u){Z(h,t,u),B(t,e);for(let d=0;d<a.length;d+=1)a[d]&&a[d].m(e,null);B(e,i);for(let d=0;d<c.length;d+=1)c[d]&&c[d].m(e,null);s||(o=[oi(_i.call(null,e)),_e(e,"clientHeight",n[26])],s=!0)},p(h,u){if(u[0]&32){r=h[5]||[];let d;for(d=0;d<r.length;d+=1){const p=tg(h,r,d);a[d]?a[d].p(p,u):(a[d]=sg(p),a[d].c(),a[d].m(e,i))}for(;d<a.length;d+=1)a[d].d(1);a.length=r.length}if(u[0]&16){l=h[4]||[];let d;for(d=0;d<l.length;d+=1){const p=eg(h,l,d);c[d]?c[d].p(p,u):(c[d]=og(p),c[d].c(),c[d].m(e,null))}for(;d<c.length;d+=1)c[d].d(1);c.length=l.length}},d(h){h&&X(t),Ti(a,h),Ti(c,h),s=!1,dt(o)}}}function sg(n){let t,e=n[0]+"",i;return{c(){t=U("div"),i=Fe(e),P(t,"class","tag primary-tag svelte-biv7k0"),_(t,"min-width",nd)},m(s,o){Z(s,t,o),B(t,i)},p(s,o){o[0]&32&&e!==(e=s[0]+"")&&Ne(i,e)},d(s){s&&X(t)}}}function og(n){let t,e=n[0]+"",i;return{c(){t=U("div"),i=Fe(e),P(t,"class","tag secondary-tag svelte-biv7k0"),_(t,"min-width",nd)},m(s,o){Z(s,t,o),B(t,i)},p(s,o){o[0]&16&&e!==(e=s[0]+"")&&Ne(i,e)},d(s){s&&X(t)}}}function rg(n){let t,e,i;return e=new id({props:{media:n[16][0],tag:n[0],objectFit:"cover"}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","media-wrapper svelte-biv7k0")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,o){const r={};o[0]&65536&&(r.media=s[16][0]),o[0]&1&&(r.tag=s[0]),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function ag(n){let t,e=n[2].description+"",i;return{c(){t=U("div"),i=Fe(e),P(t,"class","description svelte-biv7k0")},m(s,o){Z(s,t,o),B(t,i)},p(s,o){o[0]&4&&e!==(e=s[2].description+"")&&Ne(i,e)},d(s){s&&X(t)}}}function lg(n){let t,e,i,s=n[3]&&cg(n),o=!n[3]&&n[2].highlightText&&ug(n);return{c(){t=U("div"),s&&s.c(),e=ue(),i=U("div"),o&&o.c(),P(i,"class","action-section svelte-biv7k0"),P(t,"class","price-wrapper svelte-biv7k0")},m(r,a){Z(r,t,a),s&&s.m(t,null),B(t,e),B(t,i),o&&o.m(i,null)},p(r,a){r[3]?s?s.p(r,a):(s=cg(r),s.c(),s.m(t,e)):s&&(s.d(1),s=null),!r[3]&&r[2].highlightText?o?o.p(r,a):(o=ug(r),o.c(),o.m(i,null)):o&&(o.d(1),o=null)},d(r){r&&X(t),s&&s.d(),o&&o.d()}}}function cg(n){let t,e,i=n[2].price.value+"",s,o,r=n[2].price.unit&&hg(n);return{c(){t=U("div"),e=U("span"),s=Fe(i),o=ue(),r&&r.c(),P(e,"class","value svelte-biv7k0"),P(t,"class","price-section svelte-biv7k0")},m(a,l){Z(a,t,l),B(t,e),B(e,s),B(t,o),r&&r.m(t,null)},p(a,l){l[0]&4&&i!==(i=a[2].price.value+"")&&Ne(s,i),a[2].price.unit?r?r.p(a,l):(r=hg(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&X(t),r&&r.d()}}}function hg(n){let t,e=n[2].price.unit+"",i;return{c(){t=U("span"),i=Fe(e),P(t,"class","unit svelte-biv7k0")},m(s,o){Z(s,t,o),B(t,i)},p(s,o){o[0]&4&&e!==(e=s[2].price.unit+"")&&Ne(i,e)},d(s){s&&X(t)}}}function ug(n){let t,e=n[2].highlightText+"",i;return{c(){t=U("span"),i=Fe(e),P(t,"class","highlight-text svelte-biv7k0")},m(s,o){Z(s,t,o),B(t,i)},p(s,o){o[0]&4&&e!==(e=s[2].highlightText+"")&&Ne(i,e)},d(s){s&&X(t)}}}function dg(n){let t,e,i,s;function o(l,c){return l[17]?yS:vS}let r=o(n),a=r(n);return{c(){t=U("div"),e=U("div"),i=Fe(n[9]),s=ue(),a.c(),P(e,"class","more-text svelte-biv7k0"),P(t,"class","more-share-wrapper svelte-biv7k0")},m(l,c){Z(l,t,c),B(t,e),B(e,i),B(e,s),a.m(e,null)},p(l,c){c[0]&512&&Ne(i,l[9]),r===(r=o(l))&&a?a.p(l,c):(a.d(1),a=r(l),a&&(a.c(),a.m(e,null)))},d(l){l&&X(t),a.d()}}}function vS(n){let t,e;return{c(){t=U("img"),P(t,"class","more-icon svelte-biv7k0"),at(t.src,e=pS)||P(t,"src",e),P(t,"alt","查看更多")},m(i,s){Z(i,t,s)},p:ce,d(i){i&&X(t)}}}function yS(n){let t,e;return{c(){t=U("img"),P(t,"class","more-icon svelte-biv7k0"),at(t.src,e=mS)||P(t,"src",e),P(t,"alt","查看更多")},m(i,s){Z(i,t,s)},p:ce,d(i){i&&X(t)}}}function bS(n){let t,e,i,s,o,r,a,l,c,h,u,d=n[2].title+"",p,m,g,v,y,w,C,E,D,L;At(n[25]),e=new Xi({props:{visible:n[8],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let R=n[2].headerPictureUrl&&ig(n),z=n[11]&&ng(n),O=n[15]&&n[16]&&n[16].length>0&&rg(n),A=n[2].description&&ag(n),M=(n[3]||n[2].highlightText)&&lg(n),I=n[10]&&dg(n);return{c(){t=U("div"),ge(e.$$.fragment),i=ue(),s=U("div"),o=ue(),r=U("div"),R&&R.c(),a=ue(),l=U("div"),c=U("div"),h=U("div"),u=U("div"),p=Fe(d),m=ue(),z&&z.c(),g=ue(),O&&O.c(),v=ue(),A&&A.c(),y=ue(),M&&M.c(),w=ue(),I&&I.c(),P(s,"class","line svelte-biv7k0"),_(s,"transition-delay",n[8]?n[14]+"ms":n[13]+"ms"),P(u,"class","text svelte-biv7k0"),P(h,"class","title svelte-biv7k0"),P(c,"class","title-wrapper svelte-biv7k0"),P(l,"class","content-wrapper svelte-biv7k0"),_(l,"padding-top",n[2].headerPictureUrl?"10px":"20px"),P(r,"class","content svelte-biv7k0"),_(r,"max-width",gi(n[6])),_(r,"transition-delay",n[8]?n[12]+"ms":"0ms"),_(r,"border-top-left-radius",n[2].headerPictureUrl?"0px":"6px"),_(r,"border-top-right-radius",n[2].headerPictureUrl?"0px":"6px"),P(t,"class",C=Mt(`marketing ${n[7]}`)+" svelte-biv7k0"),Pe(t,"unfolded",n[8]),Pe(t,"folded",n[18])},m(k,x){Z(k,t,x),pe(e,t,null),B(t,i),B(t,s),B(t,o),B(t,r),R&&R.m(r,null),B(r,a),B(r,l),B(l,c),B(c,h),B(h,u),B(u,p),B(l,m),z&&z.m(l,null),B(l,g),O&&O.m(l,null),B(l,v),A&&A.m(l,null),B(l,y),M&&M.m(l,null),B(l,w),I&&I.m(l,null),E=!0,D||(L=_e(window,"resize",n[25]),D=!0)},p(k,x){const S={};x[0]&256&&(S.visible=k[8]),e.$set(S),x[0]&24832&&_(s,"transition-delay",k[8]?k[14]+"ms":k[13]+"ms"),k[2].headerPictureUrl?R?R.p(k,x):(R=ig(k),R.c(),R.m(r,a)):R&&(R.d(1),R=null),(!E||x[0]&4)&&d!==(d=k[2].title+"")&&Ne(p,d),k[11]?z?z.p(k,x):(z=ng(k),z.c(),z.m(l,g)):z&&(z.d(1),z=null),k[15]&&k[16]&&k[16].length>0?O?(O.p(k,x),x[0]&98304&&H(O,1)):(O=rg(k),O.c(),H(O,1),O.m(l,v)):O&&(xe(),Y(O,1,1,()=>{O=null}),Se()),k[2].description?A?A.p(k,x):(A=ag(k),A.c(),A.m(l,y)):A&&(A.d(1),A=null),k[3]||k[2].highlightText?M?M.p(k,x):(M=lg(k),M.c(),M.m(l,w)):M&&(M.d(1),M=null),k[10]?I?I.p(k,x):(I=dg(k),I.c(),I.m(l,null)):I&&(I.d(1),I=null),x[0]&4&&_(l,"padding-top",k[2].headerPictureUrl?"10px":"20px"),x[0]&64&&_(r,"max-width",gi(k[6])),x[0]&4352&&_(r,"transition-delay",k[8]?k[12]+"ms":"0ms"),x[0]&4&&_(r,"border-top-left-radius",k[2].headerPictureUrl?"0px":"6px"),x[0]&4&&_(r,"border-top-right-radius",k[2].headerPictureUrl?"0px":"6px"),(!E||x[0]&128&&C!==(C=Mt(`marketing ${k[7]}`)+" svelte-biv7k0"))&&P(t,"class",C),(!E||x[0]&384)&&Pe(t,"unfolded",k[8]),(!E||x[0]&262272)&&Pe(t,"folded",k[18])},i(k){E||(H(e.$$.fragment,k),H(O),E=!0)},o(k){Y(e.$$.fragment,k),Y(O),E=!1},d(k){k&&X(t),me(e),R&&R.d(),z&&z.d(),O&&O.d(),A&&A.d(),M&&M.d(),I&&I.d(),D=!1,L()}}}const AS=499,wS=238,PS=280,nd=40;function CS(n,t,e){let i,s,o,r,a,l,c,h,u,d,p,m,g,v,y,w,C,E,D,{tag:L}=t,R=0,z,O=0,A=!1;function M(x){Math.abs(z-x)>5&&(e(20,z=x),setTimeout(()=>{e(22,A=!1)},100))}function I(){e(1,R=window.innerWidth)}const k=x=>M(x.detail);return n.$$set=x=>{"tag"in x&&e(0,L=x.tag)},n.$$.update=()=>{var x,S,j,F,J;n.$$.dirty[0]&1&&e(8,i=(S=(x=L.state)==null?void 0:x.unfolded)!=null?S:!1),n.$$.dirty[0]&256&&e(18,s=!i),n.$$.dirty[0]&1&&e(2,o=L.data),n.$$.dirty[0]&4&&e(3,r=Ge((j=o.price)==null?void 0:j.value)&&((F=o.price)==null?void 0:F.value)!==""),n.$$.dirty[0]&1&&e(7,a=L.data.theme||"light"),n.$$.dirty[0]&128&&e(17,l=a==="light"),n.$$.dirty[0]&4&&e(16,c=o.mediaData),n.$$.dirty[0]&1&&e(15,h=((J=L.config.popoverConfig)==null?void 0:J.showMedia)===!0),n.$$.dirty[0]&2&&e(24,u=R>0&&R<=AS),n.$$.dirty[0]&16777217&&e(6,d=(()=>{var q;const ne=(q=L.data.limitWidth)!=null?q:!0;if(typeof ne=="number")return ne;if(ne===!0)return u?wS:PS})()),n.$$.dirty[0]&7340096&&(!A||d&&d>0)&&(e(21,O=Math.max(1,Math.floor(((d||172)-20)/nd))),z!==void 0&&z>40&&e(21,O=Math.max(1,O-1)),e(22,A=!0)),n.$$.dirty[0]&2097156&&e(5,p=(o.brandTags||[]).filter(Boolean).slice(0,O)),n.$$.dirty[0]&2097184&&e(23,m=Math.max(0,O-p.length)),n.$$.dirty[0]&8388612&&e(4,g=(o.tags||[]).filter(Boolean).slice(0,m)),n.$$.dirty[0]&48&&e(11,C=p.length>0||g.length>0),n.$$.dirty[0]&12&&(r||o.highlightText),n.$$.dirty[0]&1&&e(10,E=L.config.popoverConfig.toolbar.showMore),n.$$.dirty[0]&1&&e(9,D=(()=>Ge(L.config.popoverConfig.viewMoreText)&&L.config.popoverConfig.viewMoreText.trim()!==""?L.config.popoverConfig.viewMoreText:"查看更多")())},e(14,v=400),e(13,y=180+500-500-40),e(12,w=400+180),[L,R,o,r,g,p,d,a,i,D,E,C,w,y,v,h,c,l,s,M,z,O,A,m,u,I,k]}class MS extends Ee{constructor(t){super(),Ie(this,t,CS,bS,Me,{tag:0},gS,[-1,-1])}}class fg{static checkBrowserSupport(){var l,c,h,u;const t=navigator.userAgent,e=document.createElement("audio");let i="Unknown",s="Unknown";t.includes("Edge/")?(i="Microsoft Edge",s=((l=t.match(/Edge\/(\d+)/))==null?void 0:l[1])||"Unknown"):t.includes("Chrome/")?(i="Chrome",s=((c=t.match(/Chrome\/(\d+)/))==null?void 0:c[1])||"Unknown"):t.includes("Firefox/")?(i="Firefox",s=((h=t.match(/Firefox\/(\d+)/))==null?void 0:h[1])||"Unknown"):t.includes("Safari/")&&!t.includes("Chrome")&&(i="Safari",s=((u=t.match(/Version\/(\d+)/))==null?void 0:u[1])||"Unknown");const o=[{name:"MP3",mime:"audio/mpeg"},{name:"OGG",mime:"audio/ogg"},{name:"WAV",mime:"audio/wav"},{name:"M4A",mime:"audio/mp4"},{name:"AAC",mime:"audio/aac"},{name:"WEBM",mime:"audio/webm"}],r=[],a=[];return o.forEach(d=>{const p=e.canPlayType(d.mime);p==="probably"?r.push(`${d.name} (完全支持)`):p==="maybe"?(r.push(`${d.name} (可能支持)`),a.push(`${d.name} 格式支持不确定,建议使用其他格式`)):a.push(`${d.name} 格式不被支持`)}),{browser:`${i} ${s}`,version:s,supportedFormats:r,warnings:a}}static testAudioUrl(t){return $(this,null,function*(){try{const e=yield fetch(t,{method:"HEAD"});return{accessible:e.ok,status:e.status,contentType:e.headers.get("content-type")||void 0,contentLength:parseInt(e.headers.get("content-length")||"0")||void 0}}catch(e){return{accessible:!1,error:e instanceof Error?e.message:String(e)}}})}static testAudioElement(t){return $(this,null,function*(){return new Promise(e=>{const i=new Audio;let s=!1;const o=()=>{s||(s=!0,i.removeEventListener("loadedmetadata",r),i.removeEventListener("error",l),i.removeEventListener("canplay",a))},r=()=>{o(),e({success:!0,duration:i.duration,networkState:i.networkState,readyState:i.readyState})},a=()=>{o(),e({success:!0,canPlay:"canplay",duration:i.duration,networkState:i.networkState,readyState:i.readyState})},l=()=>{o(),e({success:!1,error:i.error?`${i.error.code}: ${i.error.message}`:"Unknown audio error",networkState:i.networkState,readyState:i.readyState})};i.addEventListener("loadedmetadata",r),i.addEventListener("canplay",a),i.addEventListener("error",l),setTimeout(()=>{s||(o(),e({success:!1,error:"音频加载超时",networkState:i.networkState,readyState:i.readyState}))},1e4),i.src=t,i.load()})})}static diagnoseAudio(t){return $(this,null,function*(){var r;console.group("🎵 音频诊断报告"),console.group("1. 浏览器支持检查");const e=this.checkBrowserSupport();console.log("浏览器:",e.browser),console.log("支持的格式:",e.supportedFormats),e.warnings.length>0&&console.warn("警告:",e.warnings),console.groupEnd(),console.group("2. 音频文件URL检查"),console.log("音频URL:",t);try{new URL(t,window.location.href),console.log("✅ URL格式正确")}catch(a){console.error("❌ URL格式错误"),console.groupEnd(),console.groupEnd();return}const i=(r=t.split(".").pop())==null?void 0:r.toLowerCase();i&&(console.log("文件扩展名:",i.toUpperCase()),["mp3","ogg","wav","m4a","aac","webm"].includes(i)?console.log("✅ 文件格式常见"):console.warn("⚠️ 不常见的文件格式,可能存在兼容性问题")),console.groupEnd(),console.group("3. 网络可访问性测试");const s=yield this.testAudioUrl(t);s.accessible?(console.log("✅ 文件可访问"),console.log("HTTP状态:",s.status),s.contentType&&console.log("内容类型:",s.contentType),s.contentLength&&console.log("文件大小:",(s.contentLength/1024).toFixed(2),"KB")):(console.error("❌ 文件无法访问"),s.status&&console.error("HTTP状态:",s.status),s.error&&console.error("错误:",s.error)),console.groupEnd(),console.group("4. 音频元素测试");const o=yield this.testAudioElement(t);o.success?(console.log("✅ 音频元素创建成功"),o.duration&&console.log("音频时长:",o.duration.toFixed(2),"秒"),console.log("网络状态:",this.getNetworkStateDescription(o.networkState)),console.log("就绪状态:",this.getReadyStateDescription(o.readyState))):(console.error("❌ 音频元素创建失败"),console.error("错误:",o.error),console.log("网络状态:",this.getNetworkStateDescription(o.networkState)),console.log("就绪状态:",this.getReadyStateDescription(o.readyState))),console.groupEnd(),console.groupEnd()})}static getNetworkStateDescription(t){switch(t){case 0:return"NETWORK_EMPTY - 音频元素尚未初始化";case 1:return"NETWORK_IDLE - 音频元素处于活动状态但未使用网络";case 2:return"NETWORK_LOADING - 浏览器正在下载数据";case 3:return"NETWORK_NO_SOURCE - 未找到合适的音频源";default:return`未知状态 (${t})`}}static getReadyStateDescription(t){switch(t){case 0:return"HAVE_NOTHING - 没有音频数据";case 1:return"HAVE_METADATA - 已获取元数据";case 2:return"HAVE_CURRENT_DATA - 有当前播放位置的数据";case 3:return"HAVE_FUTURE_DATA - 有足够的数据开始播放";case 4:return"HAVE_ENOUGH_DATA - 有足够的数据流畅播放";default:return`未知状态 (${t})`}}}class IS extends Audio{constructor(e){super();f(this,"sharedAudioSrc");f(this,"sharedAudioPaused",!0);f(this,"sharedAudioCurrentTime",0);f(this,"tryplaying",!1);f(this,"audioInstance");f(this,"eventListenerDisposer");this.sharedAudioSrc=e,e&&this.validateAudioSource(e)}get paused(){var e;return(e=this.sharedAudioPaused)!=null?e:!0}get currentTime(){return this.sharedAudioCurrentTime}get duration(){var e;return((e=this.audioInstance)==null?void 0:e.duration)||0}play(){return $(this,null,function*(){var i,s,o;if(this.tryplaying)return;this.tryplaying=!0,(!this.audioInstance||((i=this.audioInstance)==null?void 0:i.realSrc)!==this.sharedAudioSrc)&&(this.audioInstance=T4(this.sharedAudioSrc,{namespace:Xu.PlayAudio})),(s=this.eventListenerDisposer)==null||s.call(this),this.eventListenerDisposer=this.addEventListeners(),this.audioInstance.currentTime=(o=this.currentTime)!=null?o:0;const e=this.audioInstance.currentTime!==this.currentTime;this.audioInstance.play().then(()=>{var r;this.audioInstance.muted=!1,e&&(this.audioInstance.currentTime=(r=this.currentTime)!=null?r:0),this.sharedAudioPaused=!1}).catch(r=>{var a;this.handlePlayError(r),this.endedHandler(),(a=this.onerror)==null||a.call(this,r)}).finally(()=>{this.tryplaying=!1})})}pause(e){var i;if(this.audioInstance&&!this.paused){if(this.sharedAudioPaused=!0,(i=this.eventListenerDisposer)==null||i.call(this),this.audioInstance.ended){this.endedHandler();return}this.audioInstance.paused||this.audioInstance.pause(),this.onpause(e!=null?e:new Event("pause")),this.clear()}}dispose(){var e;(e=this.eventListenerDisposer)==null||e.call(this),this.clear(),this.audioInstance=void 0}clear(){var e;(e=this.audioInstance)==null||e.clear()}handlePlayError(e){var o,r,a,l;const i=navigator.userAgent,s=this.sharedAudioSrc;if(console.group("🎵 音频播放错误详情"),console.error("错误对象:",e),console.error("错误名称:",e.name),console.error("错误信息:",e.message),console.error("音频文件路径:",s),console.error("浏览器信息:",i),console.error("音频实例状态:",{exists:!!this.audioInstance,readyState:(o=this.audioInstance)==null?void 0:o.readyState,networkState:(r=this.audioInstance)==null?void 0:r.networkState,error:(a=this.audioInstance)==null?void 0:a.error}),e.name==="NotSupportedError"){if(e.message.includes("no supported source was found")&&(console.error("❌ 错误原因: 无法找到支持的音频源"),console.error("💡 可能的解决方案:"),console.error(" 1. 检查音频文件路径是否正确"),console.error(" 2. 检查音频文件是否存在"),console.error(" 3. 检查音频文件格式是否被浏览器支持 (推荐: MP3, OGG, WAV)"),console.error(" 4. 检查CORS设置,确保可以跨域访问音频文件"),s)){const c=(l=s.split(".").pop())==null?void 0:l.toLowerCase(),h=["mp3","ogg","wav","m4a","aac"];c&&!h.includes(c)&&(console.error(` ⚠️ 检测到不常见的音频格式: .${c}`),console.error(` 📝 建议使用: ${h.join(", ")}`))}}else e.name==="AbortError"?console.error("❌ 错误原因: 音频播放被中断"):e.name==="NotAllowedError"?console.error("❌ 错误原因: 浏览器阻止了音频播放 (通常需要用户交互)"):e.message==="The operation is not supported."?console.error("❌ 错误原因: 音频文件可能损坏或格式有问题"):console.error("❌ 未知的音频播放错误");console.groupEnd(),e.name==="NotSupportedError"&&s&&(console.error("💡 建议运行完整音频诊断来查找问题根源:"),console.error(`AudioDiagnostics.diagnoseAudio("${s}")`),process.env.NODE_ENV==="development"&&(console.warn("🔍 自动运行音频诊断..."),fg.diagnoseAudio(s)))}validateAudioSource(e){var o;try{new URL(e,window.location.href)}catch(r){console.warn("🎵 音频URL格式可能有问题:",e),fg.diagnoseAudio(e);return}const i=(o=e.split(".").pop())==null?void 0:o.toLowerCase(),s=["mp3","ogg","wav","m4a","aac","webm"];i&&!s.includes(i)&&(console.warn("🎵 音频格式可能不被广泛支持:",i),console.warn("💡 建议使用常见格式:",s.join(", ")),console.warn('💡 运行音频诊断:AudioDiagnostics.diagnoseAudio("'+e+'")')),this.checkBrowserSupport(i)}checkBrowserSupport(e){if(!e)return;const i=document.createElement("audio"),o={mp3:"audio/mpeg",ogg:"audio/ogg",wav:"audio/wav",m4a:"audio/mp4",aac:"audio/aac",webm:"audio/webm"}[e];if(o){const r=i.canPlayType(o);r===""?(console.warn(`🎵 当前浏览器可能不支持 ${e.toUpperCase()} 格式`),console.warn("💡 建议提供多种格式的音频文件作为备选")):console.info(r==="maybe"?`🎵 当前浏览器可能支持 ${e.toUpperCase()} 格式 (不确定)`:`🎵 当前浏览器支持 ${e.toUpperCase()} 格式`)}}endedHandler(e){var i,s;(i=this.onended)==null||i.call(this,e!=null?e:new Event("ended")),(s=this.eventListenerDisposer)==null||s.call(this),this.sharedAudioPaused=!0,this.sharedAudioCurrentTime=0,this.clear()}addEventListeners(){const e=this.audioInstance;if(!e)return;const i=d=>{var p;this.sharedAudioCurrentTime=e.currentTime,(p=this.ontimeupdate)==null||p.call(this,d)},s=d=>{var p;e.isBlankAudio||(this.sharedAudioPaused=!1,(p=this.onplay)==null||p.call(this,d))},o=d=>{this.pause(d)},r=d=>{this.endedHandler(d)},a=d=>{var p;this.sharedAudioPaused=!0,(p=this.onerror)==null||p.call(this,d)},l=d=>{var p;return(p=this.oncanplay)==null?void 0:p.call(this,d)},c=d=>{var p;return(p=this.oncanplaythrough)==null?void 0:p.call(this,d)},h=d=>{var p;return(p=this.onloadeddata)==null?void 0:p.call(this,d)},u=d=>{var p;return(p=this.onloadedmetadata)==null?void 0:p.call(this,d)};return e.addEventListener("timeupdate",i),e.addEventListener("play",s),e.addEventListener("pause",o),e.addEventListener("ended",r),e.addEventListener("error",a),e.addEventListener("canplay",l),e.addEventListener("canplaythrough",c),e.addEventListener("loadeddata",h),e.addEventListener("loadedmetadata",u),()=>{e.removeEventListener("timeupdate",i),e.removeEventListener("play",s),e.removeEventListener("pause",o),e.removeEventListener("ended",r),e.removeEventListener("error",a),e.removeEventListener("canplay",l),e.removeEventListener("canplaythrough",c),e.removeEventListener("loadeddata",h),e.removeEventListener("loadedmetadata",u)}}}function ES(n){Le(n,"svelte-13e7hxv",".audio.svelte-13e7hxv{pointer-events:auto;cursor:pointer;width:100%;height:100%}")}function kS(n){let t,e,i,s;const o=n[8].default,r=hs(o,n,n[7],null);return{c(){t=U("div"),r&&r.c(),P(t,"class","audio svelte-13e7hxv"),P(t,"style",n[0])},m(a,l){Z(a,t,l),r&&r.m(t,null),e=!0,i||(s=_e(t,"click",Uv(n[1])),i=!0)},p(a,[l]){r&&r.p&&(!e||l&128)&&ds(r,o,a,a[7],e?us(o,a[7],l,null):fs(a[7]),null),(!e||l&1)&&P(t,"style",a[0])},i(a){e||(H(r,a),e=!0)},o(a){Y(r,a),e=!1},d(a){a&&X(t),r&&r.d(a),i=!1,s()}}}function xS(n,t,e){let{$$slots:i={},$$scope:s}=t,{url:o}=t,{enable:r=!0}=t,{style:a=""}=t,{hooksInfo:l}=t;const c=Vn(),h=cn("hooks"),u=cn("mediaStore");let d,p=!0;function m(){e(5,d.onplay=v=>{h.emit("playStateChange",V({event:v,state:"playing",mediaInstance:d},l)),c("play"),e(6,p=!1)},d),e(5,d.onpause=v=>{h.emit("playStateChange",V({event:v,state:"paused",mediaInstance:d},l)),c("pause"),e(6,p=!0)},d),e(5,d.onended=v=>{h.emit("playStateChange",V({event:v,state:"paused",mediaInstance:d},l)),c("pause"),e(6,p=!0)},d),e(5,d.onloadedmetadata=v=>{typeof d.duration=="number"&&!Number.isNaN(d.duration)&&c("duration",d.duration)},d),e(5,d.onerror=v=>{c("pause"),e(6,p=!0)},d),e(5,d.ontimeupdate=v=>{c("timeupdate",d.currentTime)},d)}u.subscribe(({currentMediaElement:v})=>{v!==d&&(p||d==null||d.pause())});function g(v){d&&(h.emit("click",V({event:v,target:"AudioTagPlayIcon",audioInstance:d},l)),u.set({currentMediaElement:d}),h.emit("playStateChange",V({event:v,state:d.paused?"playing":"paused",mediaInstance:d},l)),d.paused?d.play():d.pause())}return n.$$set=v=>{"url"in v&&e(2,o=v.url),"enable"in v&&e(3,r=v.enable),"style"in v&&e(0,a=v.style),"hooksInfo"in v&&e(4,l=v.hooksInfo),"$$scope"in v&&e(7,s=v.$$scope)},n.$$.update=()=>{n.$$.dirty&4&&(o||c("duration",0)),n.$$.dirty&36&&(d==null||d.dispose(),e(5,d=new IS(o)),c("audioRef",d),setTimeout(()=>c("audioRef",d),200),m()),n.$$.dirty&40&&(r||d==null||d.pause()),n.$$.dirty&72&&c(r&&!p?"play":"pause")},[a,g,o,r,l,d,p,s,i]}let sd=class extends Ee{constructor(t){super(),Ie(this,t,xS,kS,Me,{url:2,enable:3,style:0,hooksInfo:4},ES)}};function SS(n){Le(n,"svelte-6pnkgc",".audio-icon__wrapper.svelte-6pnkgc.svelte-6pnkgc{display:inline-block}.audio-icon.svelte-6pnkgc.svelte-6pnkgc{display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:100%;border-radius:50%}.audio-icon.svelte-6pnkgc .sound-wave__container.svelte-6pnkgc{position:absolute;pointer-events:none;top:0;left:0;width:100%;height:100%}@keyframes svelte-6pnkgc-sound_wave_1_animation{0%,10%{opacity:0}25%,100%{opacity:1}}@keyframes svelte-6pnkgc-sound_wave_2_animation{0%,35%{opacity:0}50%,100%{opacity:1}}@keyframes svelte-6pnkgc-sound_wave_3_animation{0%,60%{opacity:0}75%,100%{opacity:1}}")}function pg(n){let t,e;return t=new Xi({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function TS(n){let t,e,i,s,o,r,a,l,c,h,u,d,p,m,g=n[0]&&pg();return{c(){t=U("div"),g&&g.c(),e=ue(),i=U("div"),s=U("div"),o=Te("svg"),r=Te("defs"),a=Te("linearGradient"),l=Te("stop"),c=Te("stop"),h=Te("linearGradient"),u=Te("stop"),d=Te("stop"),p=Te("path"),P(l,"stop-color","rgba(255, 255, 255, 1)"),P(l,"stop-opacity",".5"),P(l,"offset","0%"),P(c,"stop-color","rgba(255, 255, 255, 1)"),P(c,"offset","100%"),P(a,"x1","8.653%"),P(a,"y1","15.676%"),P(a,"x2","85.159%"),P(a,"y2","79.274%"),P(a,"id","dnalogel-audio-icon-linear-gradient-1"),P(u,"stop-color","rgba(255, 255, 255, 1)"),P(u,"offset","0%"),P(d,"stop-color","rgba(255, 255, 255, 1)"),P(d,"stop-opacity","0"),P(d,"offset","100%"),P(h,"x1","0%"),P(h,"y1","0%"),P(h,"x2","64.422%"),P(h,"y2","62.326%"),P(h,"id","dnalogel-audio-icon-linear-gradient-2"),P(p,"d",n[3]),P(p,"fill","url(#dnalogel-audio-icon-linear-gradient-1)"),P(p,"fill-rule","nonzero"),P(p,"stroke","url(#dnalogel-audio-icon-linear-gradient-2)"),P(p,"stroke-width",".5"),P(o,"viewBox","0 0 24 24"),P(o,"version","1.1"),P(o,"aria-label","audio-icon"),P(s,"class","sound-wave__container svelte-6pnkgc"),P(i,"class","audio-icon svelte-6pnkgc"),P(t,"class","audio-icon__wrapper svelte-6pnkgc"),P(t,"style",n[1]),_(t,"width",n[4]),_(t,"height",n[4])},m(v,y){Z(v,t,y),g&&g.m(t,null),B(t,e),B(t,i),B(i,s),B(s,o),B(o,r),B(r,a),B(a,l),B(a,c),B(r,h),B(h,u),B(h,d),B(o,p),n[10](s),m=!0},p(v,[y]){v[0]?g?y&1&&H(g,1):(g=pg(),g.c(),H(g,1),g.m(t,e)):g&&(xe(),Y(g,1,1,()=>{g=null}),Se()),(!m||y&8)&&P(p,"d",v[3]),(!m||y&2)&&P(t,"style",v[1]);const w=y&2;(w||y&18)&&_(t,"width",v[4]),(w||y&18)&&_(t,"height",v[4])},i(v){m||(H(g),m=!0)},o(v){Y(g),m=!1},d(v){v&&X(t),g&&g.d(),n[10](null)}}}function DS(n,t,e){let i,s,{playing:o}=t,{shadow:r=!1}=t,{style:a=null}=t,{width:l="100%"}=t,{animated:c=!0}=t,h,u=0,d=null;const p=["M12 3.25c2.416 0 4.604.98 6.187 2.563A8.723 8.723 0 0 1 20.75 12c0 2.416-.98 4.604-2.563 6.187A8.723 8.723 0 0 1 12 20.75a8.723 8.723 0 0 1-6.187-2.563A8.723 8.723 0 0 1 3.25 12c0-2.416.98-4.604 2.563-6.187A8.723 8.723 0 0 1 12 3.25Zm1.534 3.282-1.29 1.289.186.183a5.86 5.86 0 0 1 1.663 4.095c0 1.555-.605 2.965-1.786 4.236l1.118 1.12.2-.19a7.46 7.46 0 0 0 2.225-5.322 7.46 7.46 0 0 0-2.316-5.411Zm-2.046 2.047-1.245 1.243.14.133a3.04 3.04 0 0 1 .882 2.144c0 .795-.308 1.516-.955 2.24l1.23 1.231.168-.168a4.793 4.793 0 0 0 1.314-3.303c0-1.39-.59-2.643-1.534-3.52Zm-1.752 1.78-1.69 1.689 1.745 1.743.132-.13a2.29 2.29 0 0 0-.187-3.302Z","M12 3.25c2.416 0 4.604.98 6.187 2.563A8.723 8.723 0 0 1 20.75 12c0 2.416-.98 4.604-2.563 6.187A8.723 8.723 0 0 1 12 20.75a8.723 8.723 0 0 1-6.187-2.563A8.723 8.723 0 0 1 3.25 12c0-2.416.98-4.604 2.563-6.187A8.723 8.723 0 0 1 12 3.25Zm-2.264 7.109-1.69 1.689 1.745 1.743.132-.13a2.29 2.29 0 0 0-.187-3.302Z","M12 3.25c2.416 0 4.604.98 6.187 2.563A8.723 8.723 0 0 1 20.75 12c0 2.416-.98 4.604-2.563 6.187A8.723 8.723 0 0 1 12 20.75a8.723 8.723 0 0 1-6.187-2.563A8.723 8.723 0 0 1 3.25 12c0-2.416.98-4.604 2.563-6.187A8.723 8.723 0 0 1 12 3.25Zm-.512 5.329-1.245 1.243.14.133a3.04 3.04 0 0 1 .882 2.144c0 .795-.308 1.516-.955 2.24l1.23 1.231.168-.168a4.793 4.793 0 0 0 1.314-3.303c0-1.39-.59-2.643-1.534-3.52Zm-1.752 1.78-1.69 1.689 1.745 1.743.132-.13a2.29 2.29 0 0 0-.187-3.302Z"];Kt(()=>{d&&(clearInterval(d),e(9,d=null))});function m(g){qe[g?"unshift":"push"](()=>{h=g,e(2,h)})}return n.$$set=g=>{"playing"in g&&e(5,o=g.playing),"shadow"in g&&e(0,r=g.shadow),"style"in g&&e(1,a=g.style),"width"in g&&e(6,l=g.width),"animated"in g&&e(7,c=g.animated)},n.$$.update=()=>{var g;n.$$.dirty&64&&e(4,i=typeof l=="number"?gi(l):l),n.$$.dirty&800&&(o?d||e(9,d=setInterval(()=>{e(8,u=(u+1)%p.length)},500)):(d&&(clearInterval(d),e(9,d=null)),e(8,u=0))),n.$$.dirty&384&&e(3,s=(g=p[c?u:0])!=null?g:p[0])},[r,a,h,s,i,o,l,c,u,d,m]}class Kl extends Ee{constructor(t){super(),Ie(this,t,DS,TS,Me,{playing:5,shadow:0,style:1,width:6,animated:7},SS)}}function LS(n){Le(n,"svelte-1s6gk4a",".audio-tag.svelte-1s6gk4a{position:absolute;left:0;top:0;width:0;height:0;overflow:visible}.audio-icon__wrapper.svelte-1s6gk4a{position:relative;vertical-align:top;width:100%;height:100%}.content.svelte-1s6gk4a{width:-moz-max-content;width:max-content;height:3.375rem;padding:2.25rem 0.25rem 0 1rem;position:absolute;left:0;bottom:0.125rem;overflow:hidden;box-sizing:border-box;font-size:0;white-space:nowrap;font-weight:600}.wrapper.svelte-1s6gk4a{position:relative;width:100%;height:100%}.audio-icon.svelte-1s6gk4a{pointer-events:none;vertical-align:top;display:inline-block;width:1rem;height:1rem;margin-right:0.25rem;margin-top:0.0625rem}.audio.svelte-1s6gk4a{position:relative;width:100%;height:100%}")}function mg(n){var v,y;let t,e,i,s,o,r,a,l,c,h,u,d,p,m;e=new Xi({props:{visible:n[6],left:n[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}});let g=n[6]&&gg(n);return c=new ry({props:{visible:n[6],textUnfolded:n[1],content:n[5]}}),u=new Zu({props:{unfolded:n[6],length:n[3],outDelay:n[4]+20*Math.min((y=(v=n[5])==null?void 0:v.length)!=null?y:10,15),useLinearColor:!0}}),{c(){t=U("div"),ge(e.$$.fragment),i=ue(),s=U("div"),o=U("div"),r=U("div"),g&&g.c(),a=ue(),l=U("div"),ge(c.$$.fragment),h=ue(),ge(u.$$.fragment),P(r,"class","audio-icon svelte-1s6gk4a"),_(l,"display","inline-block"),P(o,"class","wrapper svelte-1s6gk4a"),P(s,"class","content svelte-1s6gk4a"),P(t,"class","audio-tag svelte-1s6gk4a"),Pe(t,"unfolded",n[6])},m(w,C){Z(w,t,C),pe(e,t,null),B(t,i),B(t,s),B(s,o),B(o,r),g&&g.m(r,null),B(o,a),B(o,l),pe(c,l,null),B(t,h),pe(u,t,null),d=!0,p||(m=[_e(l,"click",n[7]),oi(_i.call(null,l)),_e(l,"clientWidth",n[12])],p=!0)},p(w,C){var R,z;const E={};C&64&&(E.visible=w[6]),C&8&&(E.left=w[3]/2+"px"),e.$set(E),w[6]?g?(g.p(w,C),C&64&&H(g,1)):(g=gg(w),g.c(),H(g,1),g.m(r,null)):g&&(xe(),Y(g,1,1,()=>{g=null}),Se());const D={};C&64&&(D.visible=w[6]),C&2&&(D.textUnfolded=w[1]),C&32&&(D.content=w[5]),c.$set(D);const L={};C&64&&(L.unfolded=w[6]),C&8&&(L.length=w[3]),C&48&&(L.outDelay=w[4]+20*Math.min((z=(R=w[5])==null?void 0:R.length)!=null?z:10,15)),u.$set(L),(!d||C&64)&&Pe(t,"unfolded",w[6])},i(w){d||(H(e.$$.fragment,w),H(g),H(c.$$.fragment,w),H(u.$$.fragment,w),d=!0)},o(w){Y(e.$$.fragment,w),Y(g),Y(c.$$.fragment,w),Y(u.$$.fragment,w),d=!1},d(w){w&&X(t),me(e),g&&g.d(),me(c),me(u),p=!1,dt(m)}}}function gg(n){let t,e,i,s,o,r,a;return e=new Xi({props:{center:!0,blurRadius:15,spreadRadius:6}}),s=new sd({props:{enable:n[6],url:n[0].data.audioUrl,hooksInfo:{tag:n[0]},$$slots:{default:[zS]},$$scope:{ctx:n}}}),s.$on("play",n[8]),s.$on("pause",n[9]),s.$on("error",n[10]),s.$on("audioRef",n[11]),{c(){t=U("div"),ge(e.$$.fragment),i=ue(),ge(s.$$.fragment),P(t,"class","audio svelte-1s6gk4a")},m(l,c){Z(l,t,c),pe(e,t,null),B(t,i),pe(s,t,null),a=!0},p(l,c){n=l;const h={};c&64&&(h.enable=n[6]),c&1&&(h.url=n[0].data.audioUrl),c&1&&(h.hooksInfo={tag:n[0]}),c&8196&&(h.$$scope={dirty:c,ctx:n}),s.$set(h)},i(l){a||(H(e.$$.fragment,l),H(s.$$.fragment,l),l&&At(()=>{a&&(r&&r.end(1),o=vs(t,Ht,{duration:1e3,delay:0,easing:Go}),o.start())}),a=!0)},o(l){var c,h;Y(e.$$.fragment,l),Y(s.$$.fragment,l),o&&o.invalidate(),l&&(r=qo(t,Ht,{duration:1e3,delay:20*Math.min((h=(c=n[5])==null?void 0:c.length)!=null?h:10,15),easing:Go})),a=!1},d(l){l&&X(t),me(e),me(s),l&&r&&r.end()}}}function zS(n){let t,e,i;return e=new Kl({props:{playing:n[2]}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","audio-icon__wrapper svelte-1s6gk4a")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,o){const r={};o&4&&(r.playing=s[2]),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function OS(n){let t,e,i=n[0].state&&mg(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[0].state?i?(i.p(s,o),o&1&&H(i,1)):(i=mg(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function jS(n,t,e){let i,s,o,{tag:r}=t,a=!1,l=!1,c;function h(){e(1,a=!a)}const u=()=>{e(2,l=!0)},d=()=>{e(2,l=!1)},p=()=>{e(2,l=!1)};function m(v){_n.call(this,n,v)}const g=v=>{e(3,c=v.detail)};return n.$$set=v=>{"tag"in v&&e(0,r=v.tag)},n.$$.update=()=>{var v,y,w;n.$$.dirty&1&&e(6,i=!!((v=r.state)!=null&&v.unfolded)),n.$$.dirty&1&&e(5,s=(w=(y=r.data.title)!=null?y:r.data.text)!=null?w:""),n.$$.dirty&2&&e(4,o=a?450:0)},[r,a,l,c,o,s,i,h,u,d,p,m,g]}class RS extends Ee{constructor(t){super(),Ie(this,t,jS,OS,Me,{tag:0},LS)}}function _S(n){Le(n,"svelte-nclraj",".audio-tag__wrapper.svelte-nclraj{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.audio-tag.svelte-nclraj{position:relative;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;padding:0.25rem;padding-right:0.625rem;border-radius:624999.9375rem;border:0.0625rem solid rgba(255, 255, 255, 0.6);background:linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2));box-shadow:inset 0 0 0.25rem 0 rgba(255, 255, 255, 0.3)}.audio__inner.svelte-nclraj{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.text.svelte-nclraj{font-weight:bold;font-size:0.75rem;margin-left:0.25rem}.audio-icon__wrapper.svelte-nclraj{position:relative;vertical-align:top;pointer-events:none;width:1.5rem;height:1.5rem}")}function vg(n){let t,e,i,s;return i=new sd({props:{style:"width: max-content; height: max-content;",enable:n[0].state.visible,url:n[0].data.audioUrl,hooksInfo:{tag:n[0]},$$slots:{default:[FS]},$$scope:{ctx:n}}}),i.$on("play",n[5]),i.$on("pause",n[6]),i.$on("error",n[7]),i.$on("timeupdate",n[8]),i.$on("duration",n[9]),i.$on("audioRef",n[10]),{c(){t=U("div"),e=U("div"),ge(i.$$.fragment),P(e,"class","audio-tag svelte-nclraj"),P(t,"class","audio-tag__wrapper svelte-nclraj")},m(o,r){Z(o,t,r),B(t,e),pe(i,e,null),s=!0},p(o,r){const a={};r&1&&(a.enable=o[0].state.visible),r&1&&(a.url=o[0].data.audioUrl),r&1&&(a.hooksInfo={tag:o[0]}),r&2072&&(a.$$scope={dirty:r,ctx:o}),i.$set(a)},i(o){s||(H(i.$$.fragment,o),s=!0)},o(o){Y(i.$$.fragment,o),s=!1},d(o){o&&X(t),me(i)}}}function VS(n){let t;return{c(){t=Fe(n[4])},m(e,i){Z(e,t,i)},p(e,i){i&16&&Ne(t,e[4])},d(e){e&&X(t)}}}function FS(n){let t,e,i,s,o,r,a;return i=new Kl({props:{playing:n[3]}}),r=new qu({props:{maxWidth:72,maxLine:1,$$slots:{default:[VS]},$$scope:{ctx:n}}}),{c(){t=U("div"),e=U("div"),ge(i.$$.fragment),s=ue(),o=U("div"),ge(r.$$.fragment),P(e,"class","audio-icon__wrapper svelte-nclraj"),P(o,"class","text svelte-nclraj"),P(t,"class","audio__inner svelte-nclraj")},m(l,c){Z(l,t,c),B(t,e),pe(i,e,null),B(t,s),B(t,o),pe(r,o,null),a=!0},p(l,c){const h={};c&8&&(h.playing=l[3]),i.$set(h);const u={};c&2064&&(u.$$scope={dirty:c,ctx:l}),r.$set(u)},i(l){a||(H(i.$$.fragment,l),H(r.$$.fragment,l),a=!0)},o(l){Y(i.$$.fragment,l),Y(r.$$.fragment,l),a=!1},d(l){l&&X(t),me(i),me(r)}}}function BS(n){let t,e,i=n[0].state&&vg(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[0].state?i?(i.p(s,o),o&1&&H(i,1)):(i=vg(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function HS(n,t,e){let i,{tag:s}=t,o=0,r=0,a=!1;const l=()=>{e(3,a=!0)},c=()=>{e(3,a=!1)},h=()=>{e(3,a=!1)},u=m=>{e(1,o=m.detail)},d=m=>{e(2,r=m.detail)};function p(m){_n.call(this,n,m)}return n.$$set=m=>{"tag"in m&&e(0,s=m.tag)},n.$$.update=()=>{var m,g;n.$$.dirty&1&&e(4,i=(g=(m=s.data.title)!=null?m:s.data.text)!=null?g:"")},[s,o,r,a,i,l,c,h,u,d,p]}class NS extends Ee{constructor(t){super(),Ie(this,t,HS,BS,Me,{tag:0},_S)}}function GS(n){let t,e;return t=new NS({props:{tag:n[0]}}),t.$on("audioRef",n[2]),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=i[0]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function WS(n){let t,e;return t=new RS({props:{tag:n[0]}}),t.$on("audioRef",n[2]),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=i[0]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function US(n){let t,e,i,s;const o=[WS,GS],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(n))&&(e=r[t]=o[t](n)),{c(){e&&e.c(),i=Be()},m(l,c){~t&&r[t].m(l,c),Z(l,i,c),s=!0},p(l,[c]){let h=t;t=a(l),t===h?~t&&r[t].p(l,c):(e&&(xe(),Y(r[h],1,1,()=>{r[h]=null}),Se()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=o[t](l),e.c()),H(e,1),e.m(i.parentNode,i)):e=null)},i(l){s||(H(e),s=!0)},o(l){Y(e),s=!1},d(l){~t&&r[t].d(l),l&&X(i)}}}function QS(n,t,e){let i,{tag:s}=t,o;function r(a){o=a.detail}return s.play=()=>o.play(),s.pause=()=>o.pause(),n.$$set=a=>{"tag"in a&&e(0,s=a.tag)},n.$$.update=()=>{var a;n.$$.dirty&1&&e(1,i=(a=s.data.appearance)!=null?a:"line")},[s,i,r]}class XS extends Ee{constructor(t){super(),Ie(this,t,QS,US,Me,{tag:0})}}function YS(n){Le(n,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function yg(n){var s;let t,e,i;return e=new yy({props:{mediaItemConfig:{canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(s=n[4])!=null?s:"withText",disableVideoIfHavePoster:!1,objectFit:n[2]},unfolded:n[6],mediaData:n[5],enableCarousel:n[1],autoplayConfig:n[3],tag:n[0],inDelay:500,duration:500}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","media-wrapper svelte-10cw0el")},m(o,r){Z(o,t,r),pe(e,t,null),i=!0},p(o,r){var l;const a={};r&20&&(a.mediaItemConfig={canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(l=o[4])!=null?l:"withText",disableVideoIfHavePoster:!1,objectFit:o[2]}),r&64&&(a.unfolded=o[6]),r&32&&(a.mediaData=o[5]),r&2&&(a.enableCarousel=o[1]),r&8&&(a.autoplayConfig=o[3]),r&1&&(a.tag=o[0]),e.$set(a)},i(o){i||(H(e.$$.fragment,o),i=!0)},o(o){Y(e.$$.fragment,o),i=!1},d(o){o&&X(t),me(e)}}}function ZS(n){let t,e,i=n[0].state&&n[5]&&yg(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[0].state&&s[5]?i?(i.p(s,o),o&33&&H(i,1)):(i=yg(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function qS(n,t,e){let i,s,o,r,a,l,{tag:c}=t;return n.$$set=h=>{"tag"in h&&e(0,c=h.tag)},n.$$.update=()=>{var h,u;n.$$.dirty&1&&e(6,i=c.state?c.state.unfolded:!1),n.$$.dirty&1&&e(5,s=c.data.mediaData),n.$$.dirty&1&&e(1,o=c.data.enableCarousel),n.$$.dirty&1&&e(4,r=c.data.playIcon),n.$$.dirty&3&&e(3,a=(h=c.data.autoplayConfig)!=null?h:{autoplay:o!=null?o:!0,autoplayVideo:!0}),n.$$.dirty&1&&e(2,l=(u=c.data.objectFit)!=null?u:(()=>c.data.adaptationMode==="stretch"?"fill":c.data.adaptationMode==="proportional"?"contain":void 0)())},[c,o,l,a,r,s,i]}class JS extends Ee{constructor(t){super(),Ie(this,t,qS,ZS,Me,{tag:0},YS)}}const jc=new Map;function by(n){return $(this,null,function*(){return new Promise((t,e)=>{if(!n){e(Error("url is empty"));return}const i=new Image;i.src=n,i.onload=()=>t({width:i.width,height:i.height}),i.onerror=e})})}function KS(n){return $(this,null,function*(){const{url:t,ratio:e=3}=n,i=(()=>{if(jc.has(t))return jc.get(t);const r=by(t);return jc.set(t,r),r})(),{width:s,height:o}=yield i;return de(V({},n),{width:s/e,height:o/e})})}function $S(n){return $(this,null,function*(){const{steps:t,url:e,ratio:i=3,fps:s=24}=n;if(!t)throw new Error("KeyframeIcon requires steps");const{width:o,height:r}=yield by(e),a=o/i,l=r/i,c=a/t,h=l,u=1/s*t+"s";return de(V({},n),{width:c,height:h,duration:u})})}const Eo=class{constructor(){f(this,"styleRefs",new Map)}generateStyleKey(t,e){const{duration:i,timing:s,loop:o,loopInterval:r=0}=t,a=t.elements[e],{properties:l}=a;return`svg-anim-${[i,s,o,r,JSON.stringify(l)].join("-").replace(/[^a-zA-Z0-9-]/g,"").toLowerCase()}`}interpolateMulti(t,e){var a;if(t.length===2)return this.interpolate(t[0],t[1],e);if(t.length<2)return(a=t[0])!=null?a:0;const i=t.length-1,s=e*i,o=Math.floor(s),r=s-o;return o>=i?t[i]:this.interpolate(t[o],t[o+1],r)}generateTransformMulti(t,e){const i=[];if(t.scale){const s=this.interpolateMulti(t.scale,e);i.push(`scale(${s})`)}if(t.translateX){const s=this.interpolateMulti(t.translateX,e);i.push(`translateX(${s}px)`)}if(t.translateY){const s=this.interpolateMulti(t.translateY,e);i.push(`translateY(${s}px)`)}if(t.rotate){const s=this.interpolateMulti(t.rotate,e);i.push(`rotate(${s}deg)`)}return i.join(" ")}interpolate(t,e,i){return t+(e-t)*i}static getInstance(){return Eo.instance||(Eo.instance=new Eo),Eo.instance}getOrCreateStyle(t,e){const i=this.generateStyleKey(t,e);if(this.styleRefs.has(i)){const E=this.styleRefs.get(i);return E.count++,i}const{duration:s,timing:o="linear",loop:r,loopInterval:a=0}=t,l=t.elements[e],{properties:c}=l,h=`${i}-keyframe`;let u=2;const d=[c.translateX,c.translateY,c.scale,c.rotate,c.opacity].filter(E=>Array.isArray(E)&&E.length>0);d.length>0&&(u=Math.max(...d.map(E=>E.length)));const p=r&&a>0?s+a:s,m=Math.max(0,Math.min(100,s/p*100));let g=`@keyframes ${h} {
|
|
965
965
|
`;for(let E=0;E<u;E++){const D=E/(u-1),L=D*m,R=this.generateTransformMulti(c,D);let z="";c.opacity&&(z=` opacity: ${this.interpolateMulti(c.opacity,D)};`),g+=` ${L}% {
|
|
966
966
|
${R?` transform: ${R};
|
|
967
967
|
`:""}${z}
|
|
@@ -979,7 +979,7 @@ ${w?` transform-origin: 50% 50%;
|
|
|
979
979
|
transparent 65%,
|
|
980
980
|
black 0%);-webkit-mask:radial-gradient(circle at center,
|
|
981
981
|
transparent 65%,
|
|
982
|
-
black 0%)}`)}function kg(n){let t,e;return t=new Xi({props:{center:!0,blurRadius:24,spreadRadius:16}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function xg(n){let t,e,i,s,o;return{c(){t=U("div"),e=U("div"),i=U("div"),s=ue(),o=U("div"),P(i,"class","icon-bg-circle-inner svelte-ezi5lu"),_(i,"background",n[4]),_(i,"opacity",n[3]),P(o,"class","icon-bg-circle-inner-shadow svelte-ezi5lu"),P(e,"class","icon-bg-circle svelte-ezi5lu"),P(t,"class","icon-bg svelte-ezi5lu")},m(r,a){Z(r,t,a),B(t,e),B(e,i),B(e,s),B(e,o)},p(r,a){a&16&&_(i,"background",r[4]),a&8&&_(i,"opacity",r[3])},d(r){r&&X(t)}}}function M9(n){let t,e,i,s,o,r,a,l,c,h,u,d,p,m,g,v=n[1]&&kg(),y=n[4]&&xg(n);return{c(){t=U("div"),v&&v.c(),e=ue(),y&&y.c(),i=ue(),s=Te("svg"),o=Te("linearGradient"),r=Te("stop"),a=Te("stop"),l=Te("linearGradient"),c=Te("stop"),h=Te("stop"),u=Te("g"),d=Te("path"),p=Te("path"),m=Te("path"),P(r,"offset","0"),P(r,"stop-color","#fff"),P(a,"offset","1"),P(a,"stop-color","#fff"),P(a,"stop-opacity",".7"),P(o,"id","a"),P(o,"x1","78.74567%"),P(o,"x2","5.663764%"),P(o,"y1","94.075617%"),P(o,"y2","5.924383%"),P(c,"offset","0"),P(c,"stop-color","#fff"),P(h,"offset","1"),P(h,"stop-color","#fff"),P(h,"stop-opacity","0"),P(l,"id","b"),P(l,"x1","16.588502%"),P(l,"x2","68.285986%"),P(l,"y1","5.924383%"),P(l,"y2","63.800896%"),P(d,"d","m18 5.4v8c0 1.9329966-4.0294373 3.5-9 3.5-4.97056275 0-9-1.5670034-9-3.5v-8c0 1.93299662 4.02943725 3.5 9 3.5 4.8670094 0 8.8316983-1.50239169 8.9947813-3.37967512zm-13.0396582-.5c.259 0 .504-.063.728-.196.441-.259.721-.728.721-1.26 0-.441-.189-.833-.504-1.085.259-.259.434-.63.434-1.022 0-.245-.063-.476-.182-.679-.252-.413-.693-.658-1.197-.658-.238 0-.462.056-.665.175-.42.238-.679.665-.679 1.162v.035h.721v-.035c0-.315.294-.616.623-.616.357 0 .651.287.651.616 0 .371-.287.658-.651.658h-.14v.728h.14c.399 0 .728.322.728.721s-.329.735-.728.735-.728-.336-.728-.735v-.105h-.728v.105c0 .266.063.511.196.728.259.448.728.728 1.26.728zm3.647 0c.273 0 .518-.07.749-.203.448-.273.742-.763.742-1.302 0-.273-.07-.518-.203-.749-.273-.448-.749-.742-1.288-.742-.077 0-.133 0-.168.007l.875-1.911h-.805l-1.274 2.793c-.091.189-.133.392-.133.602 0 .273.07.525.203.756.273.455.749.749 1.302.749zm0-.742c-.427 0-.763-.336-.763-.763 0-.42.343-.77.763-.77s.77.35.77.77-.35.763-.77.763zm3.654.749c.504 0 .952-.273 1.204-.7.126-.21.189-.441.189-.693v-2.086c0-.511-.273-.98-.693-1.239-.217-.126-.448-.189-.7-.189-.511 0-.98.273-1.232.714-.133.217-.196.455-.196.714v2.086c0 .504.273.952.714 1.204.217.126.455.189.714.189zm0-.721c-.371 0-.693-.301-.693-.672v-2.086c0-.399.308-.693.693-.693.371 0 .651.294.651.693v2.086c0 .385-.28.672-.651.672zm3.2140391-2.11266016c.2734375 0 .5132649-.09855143.7194824-.29565429.2062174-.19710287.3093262-.44376628.3093262-.73999024 0-.28710937-.0991211-.53035481-.2973633-.72973633-.1982422-.19938151-.4420573-.29907226-.7314453-.29907226-.2825521 0-.5257976.10026042-.7297364.30078125s-.3059082.44661458-.3059082.73828125c0 .2734375.0968425.51269531.2905274.71777344.1936849.20507812.4420573.30761718.7451172.30761718zm0-.37255859c-.1822917 0-.3383789-.06494141-.4682618-.19482422-.1298828-.12988281-.1948242-.28369141-.1948242-.46142578 0-.18457031.0655111-.34122721.1965332-.4699707.1310222-.12874349.2865397-.19311524.4665528-.19311524.180013 0 .3343912.06494141.4631347.19482422s.1931153.28369141.1931153.46142578c0 .18457031-.0655111.34122722-.1965332.46997071-.1310222.12874349-.2842611.19311523-.4597168.19311523z"),P(d,"fill","url(#a)"),P(d,"fill-rule","nonzero"),P(p,"d","m18 5.4v8c0 1.9329966-4.0294373 3.5-9 3.5-4.97056275 0-9-1.5670034-9-3.5v-8c0 1.93299662 4.02943725 3.5 9 3.5 4.8670094 0 8.8316983-1.50239169 8.9947813-3.37967512zm-.537 1.917-.0556083.04651904c-1.6129673 1.27557869-4.7855335 2.07278608-8.4073917 2.07278608-3.5667171 0-6.69228643-.77164105-8.32741897-2.0099189l-.13658103-.10838622.00030512 6.082c0 1.4658868 3.60570734 2.8999734 8.15878222 2.9616322l.30491266.0020627c4.6959533 0 8.4636949-1.4652329 8.4636949-2.9636949zm-5.2016582-7.317c.252 0 .483.063.7.189.42.259.693.728.693 1.239v2.086l-.00756.14868c-.02016.19488-.08064.37632-.18144.54432-.252.427-.7.7-1.204.7-.259 0-.497-.063-.714-.189-.441-.252-.714-.7-.714-1.204v-2.086l.007616-.15288c.020384-.20048.081984-.38752.188384-.56112.252-.441.721-.714 1.232-.714zm-7.301 0c.504 0 .945.245 1.197.658.119.203.182.434.182.679 0 .392-.175.763-.434 1.022.315.252.504.644.504 1.085 0 .532-.28 1.001-.721 1.26-.224.133-.469.196-.728.196-.532 0-1.001-.28-1.26-.728-.133-.217-.196-.462-.196-.728v-.105h.728v.105c0 .399.329.735.728.735s.728-.336.728-.735-.329-.721-.728-.721h-.14v-.728h.14c.364 0 .651-.287.651-.658 0-.329-.294-.616-.651-.616-.329 0-.623.301-.623.616v.035h-.721v-.035c0-.497.259-.924.679-1.162.203-.119.427-.175.665-.175zm4.354 0-.875 1.911c.035-.007.091-.007.168-.007.539 0 1.015.294 1.288.742.133.231.203.476.203.749 0 .539-.294 1.029-.742 1.302-.231.133-.476.203-.749.203-.553 0-1.029-.294-1.302-.749-.133-.231-.203-.483-.203-.756 0-.21.042-.413.133-.602l1.274-2.793zm2.947.735c-.385 0-.693.294-.693.693v2.086l.0077784.09927273c.051172.32396694.3479489.57272727.6852216.57272727.371 0 .651-.287.651-.672v-2.086l-.0068002-.10607288c-.044861-.34395191-.3069271-.58692712-.6441998-.58692712zm-3.654 1.89c-.42 0-.763.35-.763.77 0 .427.336.763.763.763.42 0 .77-.343.77-.763s-.35-.77-.77-.77zm6.8680391-2.61611328c.289388 0 .5332031.09969075.7314453.29907226.1982422.19938152.2973633.44262696.2973633.72973633 0 .29622396-.1031088.54288737-.3093262.73999024-.2062175.19710286-.4460449.29565429-.7194824.29565429-.3030599 0-.5514323-.10253906-.7451172-.30761718-.1936849-.20507813-.2905274-.44433594-.2905274-.71777344 0-.29166667.1019694-.53776042.3059082-.73828125s.4471843-.30078125.7297364-.30078125zm0 .37255859c-.1800131 0-.3355306.06437175-.4665528.19311524-.1310221.12874349-.1965332.28540039-.1965332.4699707 0 .17773437.0649414.33154297.1948242.46142578.1298829.12988281.2859701.19482422.4682618.19482422.1754557 0 .3286946-.06437174.4597168-.19311523.1310221-.12874349.1965332-.2854004.1965332-.46997071 0-.17773437-.0643718-.33154297-.1931153-.46142578s-.2831217-.19482422-.4631347-.19482422z"),P(p,"fill","url(#b)"),P(p,"fill-rule","nonzero"),P(m,"d","m3.00030998 2.79110119v5.21779762c-1.84142801-.64087734-3.00030998-1.57225753-3.00030998-2.60889881s1.15888197-1.96802147 3.00030998-2.60889881zm12.00038752.00035068c1.8408432.64086639 2.9993025 1.57209591 2.9993025 2.60854813s-1.1584593 1.96768174-2.9993025 2.60854813z"),P(m,"fill","#d8d8d8"),P(m,"opacity",".6"),P(u,"fill","none"),P(u,"fill-rule","evenodd"),P(u,"transform","translate(3 3.1)"),P(s,"height",n[2]),P(s,"width",n[2]),P(s,"viewBox","0 0 24 24"),P(s,"xmlns","http://www.w3.org/2000/svg"),P(s,"xmlns:xlink","http://www.w3.org/1999/xlink"),P(t,"class","icon svelte-ezi5lu"),_(t,"width",n[0])},m(w,C){Z(w,t,C),v&&v.m(t,null),B(t,e),y&&y.m(t,null),B(t,i),B(t,s),B(s,o),B(o,r),B(o,a),B(s,l),B(l,c),B(l,h),B(s,u),B(u,d),B(u,p),B(u,m),g=!0},p(w,[C]){w[1]?v?C&2&&H(v,1):(v=kg(),v.c(),H(v,1),v.m(t,e)):v&&(xe(),Y(v,1,1,()=>{v=null}),Se()),w[4]?y?y.p(w,C):(y=xg(w),y.c(),y.m(t,i)):y&&(y.d(1),y=null),(!g||C&4)&&P(s,"height",w[2]),(!g||C&4)&&P(s,"width",w[2]),C&1&&_(t,"width",w[0])},i(w){g||(H(v),g=!0)},o(w){Y(v),g=!1},d(w){w&&X(t),v&&v.d(),y&&y.d()}}}function I9(n){const{originWidth:t,originHeight:e,scale:i=1,wantedWidth:s}=n,o=(s!=null?s:t)*i,r=typeof e=="number"?o*(e/t):void 0;return de(V({},n),{width:o,height:r})}function E9(n,t,e){let i,s,o,r,a,{width:l=null}=t,{icon:c=null}=t,{shadow:h=!1}=t;return n.$$set=u=>{"width"in u&&e(0,l=u.width),"icon"in u&&e(5,c=u.icon),"shadow"in u&&e(1,h=u.shadow)},n.$$.update=()=>{var u,d;n.$$.dirty&32&&e(4,i=c==null?void 0:c.bgcolor),n.$$.dirty&32&&e(3,s=(u=c==null?void 0:c.bgopacity)!=null?u:.6),n.$$.dirty&32&&e(7,o=(d=c==null?void 0:c.scale)!=null?d:1),n.$$.dirty&32&&e(6,r=c==null?void 0:c.width),n.$$.dirty&192&&e(2,a=I9({originWidth:24,originHeight:24,scale:o,wantedWidth:r}).width)},[l,h,a,s,i,c,r,o]}let k9=class extends Ee{constructor(t){super(),Ie(this,t,E9,M9,Me,{width:0,icon:5,shadow:1},C9)}};function x9(n){Le(n,"svelte-yq4ru9",".wrapper.svelte-yq4ru9{font-weight:600;cursor:pointer;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);display:flex;align-items:center;justify-content:center;flex-direction:column;pointer-events:auto}")}function S9(n){let t,e,i;return e=new k9({props:{icon:n[0],shadow:!0}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","wrapper svelte-yq4ru9")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,[o]){const r={};o&1&&(r.icon=s[0]),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function T9(n,t,e){let i,{tag:s}=t;return n.$$set=o=>{"tag"in o&&e(1,s=o.tag)},n.$$.update=()=>{var o,r;n.$$.dirty&2&&e(0,i=(r=s.data.icon)!=null?r:(o=s.style)==null?void 0:o.point)},[i,s]}class D9 extends Ee{constructor(t){super(),Ie(this,t,T9,S9,Me,{tag:1},x9)}}function L9(n){Le(n,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function z9(n){let t,e;return{c(){t=new Bo(!1),e=Be(),t.a=e},m(i,s){t.m(n[2],i,s),Z(i,e,s)},p:ce,d(i){i&&X(e),i&&t.d()}}}function O9(n){let t,e=typeof n[2]=="string"&&z9(n);return{c(){t=U("div"),e&&e.c(),P(t,"class","customElement__container svelte-kzl2aj"),Pe(t,"unfolded",n[1])},m(i,s){Z(i,t,s),e&&e.m(t,null),n[5](t)},p(i,[s]){typeof i[2]=="string"&&e.p(i,s),s&2&&Pe(t,"unfolded",i[1])},i:ce,o:ce,d(i){i&&X(t),e&&e.d(),n[5](null)}}}function j9(n,t,e){var h,u;let i,{tag:s}=t,{rendererMap:o=new Map}=t,r,a=(u=s.element)!=null?u:(h=o.get(s.contentType))==null?void 0:h.renderer,l;zt(()=>{r&&(a instanceof Element?(r.appendChild(a),l=()=>{a instanceof Element&&a.remove()}):typeof a=="function"&&(l=a(r,s)))}),Kt(()=>{l==null||l()});function c(d){qe[d?"unshift":"push"](()=>{r=d,e(0,r)})}return n.$$set=d=>{"tag"in d&&e(3,s=d.tag),"rendererMap"in d&&e(4,o=d.rendererMap)},n.$$.update=()=>{n.$$.dirty&8&&e(1,i=s.state.unfolded)},[r,i,a,s,o,c]}class R9 extends Ee{constructor(t){super(),Ie(this,t,j9,O9,Me,{tag:3,rendererMap:4},L9)}}function _9(n){Le(n,"svelte-1fy4duy",'@font-face{font-family:"TG-TYPE";font-style:normal;font-weight:400;src:local("TG-TYPE-Bold"), url(data:application/font-woff2;charset=utf-8;base64,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) format("woff2")}*{-webkit-tap-highlight-color:transparent}.content__container.svelte-1fy4duy{position:relative;left:50%;top:50%;transform:translate(-50%, -50%);font-family:PingFangSC, Segoe UI, Rototo, sans-serif;transition:opacity 0.2s linear}.content__container.unClickable.svelte-1fy4duy{pointer-events:none !important}.content__container.unClickable.svelte-1fy4duy *{pointer-events:none !important}.content__wrapper.svelte-1fy4duy{pointer-events:none;width:100%;height:100%}.content__container.hide.svelte-1fy4duy{opacity:0;pointer-events:none}.content__container.hide.svelte-1fy4duy *{pointer-events:none !important}.content__container.disable.svelte-1fy4duy{display:none}.content.svelte-1fy4duy{position:relative;width:100%;height:100%;font-size:0.75rem;color:#fff}.content.svelte-1fy4duy:not(.unfolded){pointer-events:none}.content.svelte-1fy4duy:not(.unfolded) *{pointer-events:none !important}.content.unfolded.svelte-1fy4duy{pointer-events:auto;cursor:pointer}')}function V9(n){let t,e;return{c(){t=U("div"),P(t,"data-info","tag content is keep folded"),P(t,"data-id",e=n[0].id)},m(i,s){Z(i,t,s)},p(i,s){s&1&&e!==(e=i[0].id)&&P(t,"data-id",e)},i:ce,o:ce,d(i){i&&X(t)}}}function F9(n){let t,e,i,s,o,r,a,l,c,h,u,d,p,m,g,v,y;const w=[X9,Q9,U9,W9,G9,N9,H9],C=[];function E(D,L){return L&9&&(s=null),L&9&&(o=null),L&9&&(r=null),L&9&&(a=null),L&9&&(l=null),L&9&&(c=null),L&9&&(h=null),s==null&&(s=!!(["Text"].includes(D[0].contentType)||["Text"].includes(D[3].get(D[0].contentType)))),s?0:(o==null&&(o=!!(["ImageText","Image","Video"].includes(D[0].contentType)||["ImageText","Image","Video"].includes(D[3].get(D[0].contentType)))),o?1:(r==null&&(r=!!(["Audio"].includes(D[0].contentType)||["Audio"].includes(D[3].get(D[0].contentType)))),r?2:(a==null&&(a=!!(["Marketing"].includes(D[0].contentType)||["Marketing"].includes(D[3].get(D[0].contentType)))),a?3:(l==null&&(l=!!(["Link","VRLink","PanoLink","Sticker"].includes(D[0].contentType)||["Link","VRLink","PanoLink","Sticker"].includes(D[3].get(D[0].contentType)))),l?4:(c==null&&(c=!!(["MediaPlane","MediaModel"].includes(D[0].contentType)||["MediaPlane","MediaModel"].includes(D[3].get(D[0].contentType)))),c?5:(h==null&&(h=!!(["Panorama"].includes(D[0].contentType)||["Panorama"].includes(D[3].get(D[0].contentType)))),h?6:-1))))))}return~(u=E(n,-1))&&(d=C[u]=w[u](n)),{c(){var D;t=U("div"),e=U("div"),i=U("div"),d&&d.c(),P(i,"class","content svelte-1fy4duy"),Pe(i,"unfolded",(D=n[0].state)==null?void 0:D.unfolded),P(e,"class","content__wrapper svelte-1fy4duy"),P(t,"class",p=Mt(pi("content__container",n[0].className))+" svelte-1fy4duy"),P(t,"data-id",m=n[0].id),Pe(t,"disable",n[0].enabled===!1),Pe(t,"hide",n[5]),Pe(t,"unClickable",n[0].config.clickable===!1),_(t,"width",n[0].stickType==="Plane"||n[0].contentType==="MediaModel"?"100%":0),_(t,"height",n[0].stickType==="Plane"||n[0].contentType==="MediaModel"?"100%":0)},m(D,L){Z(D,t,L),B(t,e),B(e,i),~u&&C[u].m(i,null),n[16](t),g=!0,v||(y=_e(t,"click",n[17],!0),v=!0)},p(D,L){var z;let R=u;u=E(D,L),u===R?~u&&C[u].p(D,L):(d&&(xe(),Y(C[R],1,1,()=>{C[R]=null}),Se()),~u?(d=C[u],d?d.p(D,L):(d=C[u]=w[u](D),d.c()),H(d,1),d.m(i,null)):d=null),(!g||L&1)&&Pe(i,"unfolded",(z=D[0].state)==null?void 0:z.unfolded),(!g||L&1&&p!==(p=Mt(pi("content__container",D[0].className))+" svelte-1fy4duy"))&&P(t,"class",p),(!g||L&1&&m!==(m=D[0].id))&&P(t,"data-id",m),(!g||L&1)&&Pe(t,"disable",D[0].enabled===!1),(!g||L&33)&&Pe(t,"hide",D[5]),(!g||L&1)&&Pe(t,"unClickable",D[0].config.clickable===!1),L&1&&_(t,"width",D[0].stickType==="Plane"||D[0].contentType==="MediaModel"?"100%":0),L&1&&_(t,"height",D[0].stickType==="Plane"||D[0].contentType==="MediaModel"?"100%":0)},i(D){g||(H(d),g=!0)},o(D){Y(d),g=!1},d(D){D&&X(t),~u&&C[u].d(),n[16](null),v=!1,y()}}}function B9(n){let t,e,i,s,o,r,a;return e=new R9({props:{tag:mt(n[0]),rendererMap:n[2]}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class",i=Mt(pi("content__container",n[0].className))+" svelte-1fy4duy"),P(t,"data-id",s=n[0].id),Pe(t,"custom-tag-disable",n[0].enabled===!1),Pe(t,"custom-tag-hide",n[5])},m(l,c){Z(l,t,c),pe(e,t,null),n[14](t),o=!0,r||(a=_e(t,"click",n[15]),r=!0)},p(l,c){const h={};c&1&&(h.tag=mt(l[0])),c&4&&(h.rendererMap=l[2]),e.$set(h),(!o||c&1&&i!==(i=Mt(pi("content__container",l[0].className))+" svelte-1fy4duy"))&&P(t,"class",i),(!o||c&1&&s!==(s=l[0].id))&&P(t,"data-id",s),(!o||c&1)&&Pe(t,"custom-tag-disable",l[0].enabled===!1),(!o||c&33)&&Pe(t,"custom-tag-hide",l[5])},i(l){o||(H(e.$$.fragment,l),o=!0)},o(l){Y(e.$$.fragment,l),o=!1},d(l){l&&X(t),me(e),n[14](null),r=!1,a()}}}function H9(n){let t,e;return t=new D9({props:{tag:mt(n[0])}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=mt(i[0])),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function N9(n){let t,e;return t=new JS({props:{tag:mt(n[0])}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=mt(i[0])),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function G9(n){let t,e;return t=new P9({props:{tag:mt(n[0])}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=mt(i[0])),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function W9(n){let t,e;return t=new MS({props:{tag:mt(n[0])}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=mt(i[0])),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function U9(n){let t,e;return t=new XS({props:{tag:mt(n[0])}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=mt(i[0])),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function Q9(n){let t,e;return t=new fS({props:{tag:mt(n[0])}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=mt(i[0])),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function X9(n){let t,e;return t=new Lk({props:{tag:mt(n[0])}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=mt(i[0])),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function Y9(n){let t,e,i,s,o;const r=[B9,F9,V9],a=[];function l(c,h){return h&5&&(t=null),t==null&&(t=!!(c[0].element||c[2].has(c[0].contentType))),t?0:c[4]?1:2}return e=l(n,-1),i=a[e]=r[e](n),{c(){i.c(),s=Be()},m(c,h){a[e].m(c,h),Z(c,s,h),o=!0},p(c,[h]){let u=e;e=l(c,h),e===u?a[e].p(c,h):(xe(),Y(a[u],1,1,()=>{a[u]=null}),Se(),i=a[e],i?i.p(c,h):(i=a[e]=r[e](c),i.c()),H(i,1),i.m(s.parentNode,s))},i(c){o||(H(i),o=!0)},o(c){Y(i),o=!1},d(c){a[e].d(c),c&&X(s)}}}function Z9(n,t,e){let i,s,o,r,a,l,{tag:c}=t,{hooks:h}=t,{rendererMap:u=new Map}=t,{contentTypeMap:d=new Map}=t,{state:p}=t,{mediaStore:m}=t,{temporaryState:g}=t;ul("hooks",h),ul("mediaStore",m);let v,y;function w(z){z?h.emit("exposure",{id:r,type:"start"}):h.emit("exposure",{id:r,type:"end"})}function C(z,O,A){var M,I;return!(!z.enabled||!O.visible||!O.enabled||!A.visible||!((M=z.state)!=null&&M.visible)||((I=z.temporaryState)==null?void 0:I.visible)===!1||z instanceof wy&&z.loading)}function E(z){qe[z?"unshift":"push"](()=>{c.contentDom=z,e(0,c)})}const D=z=>h.emit("click",{event:z,target:"TagContent",tag:c});function L(z){qe[z?"unshift":"push"](()=>{c.contentDom=z,e(0,c)})}const R=z=>{c.entryFromModel&&Ii(c.five.state.mode)?(z.stopPropagation(),c.find({targetMode:"Panorama"})):h.emit("click",{event:z,target:"TagContent",tag:c})};return n.$$set=z=>{"tag"in z&&e(0,c=z.tag),"hooks"in z&&e(1,h=z.hooks),"rendererMap"in z&&e(2,u=z.rendererMap),"contentTypeMap"in z&&e(3,d=z.contentTypeMap),"state"in z&&e(6,p=z.state),"mediaStore"in z&&e(7,m=z.mediaStore),"temporaryState"in z&&e(8,g=z.temporaryState)},n.$$.update=()=>{var z,O,A,M,I,k,x,S,j,F,J;n.$$.dirty&1&&e(12,i=(z=c.state)==null?void 0:z.unfolded),n.$$.dirty&1&&e(11,s=(O=c.state)==null?void 0:O.visible),n.$$.dirty&321&&e(13,o=p.visible&&g.visible&&((A=c.state)==null?void 0:A.visible)),n.$$.dirty&1&&(r=c.id),n.$$.dirty&321&&e(5,a=!C(c,p,g)),n.$$.dirty&8192&&w(o),n.$$.dirty&7681&&c.hooks&&(i!==void 0&&i!==y&&(e(10,y=i),i?(I=(M=c.hooks).emit)==null||I.call(M,"unfolded"):(x=c==null?void 0:(k=c.hooks).emit)==null||x.call(k,"folded")),s!==void 0&&s!==v&&(e(9,v=s),s?(j=(S=c.hooks).emit)==null||j.call(S,"show"):(J=(F=c.hooks).emit)==null||J.call(F,"hide"))),n.$$.dirty&1&&e(4,l=(()=>!(typeof c.config.unfoldedConfig=="object"&&c.config.unfoldedConfig.keep==="folded"))())},[c,h,u,d,l,a,p,m,g,v,y,s,i,o,E,D,L,R]}let od=class extends Ee{constructor(t){super(),Ie(this,t,Z9,Y9,Me,{tag:0,hooks:1,rendererMap:2,contentTypeMap:3,state:6,mediaStore:7,temporaryState:8},_9)}};class wy extends er{constructor(e,i){super(e,i);f(this,"loading",!1);f(this,"loadModel",()=>$(this,null,function*(){var r,a;const e=this.data.modelUrl;if(!e||(this.loading=!0,yield xi(this.five),!this.plugin.tags.includes(this)))return;const i=Q4(e).then(l=>$(this,null,function*(){var u;const c=Object.assign(l.scene,{customID:this.id,isTagModel:!0,removeEventListener:this.getConfig().clickable===!1?()=>{}:this.addObjectClickHandler(this,l.scene,d=>{this.plugin.hooks.emit("click",{target:"TagModel",tag:this,event:d})})});return new b.Matrix4().fromArray(this.matrix).decompose(c.position,c.quaternion,c.scale),c.updateWorldMatrix(!0,!0),c.visible=this.visible,(u=this.getConfig().modelConfig)!=null&&u.autoLookAtEnabled&&c.lookAt(this.five.camera.position.clone().setY(c.position.y)),c}));this.model={promise:i};const s=yield i;if(this.loading=!1,((r=this.model)==null?void 0:r.promise)!==i||!this.plugin.tags.includes(this))return;this.model.object=s;const o=this.plugin.gltfObjectGroup.children.find(l=>l.customID===this.id);if(o&&(this.plugin.gltfObjectGroup.remove(o),o.removeEventListener()),Bs(this)){const l=this.data.mediaPosition.map(Lt);if(this.computeRenderType()==="Mesh"&&!this.mediaPlane){this.mediaPlane=new Mh(this.data.mediaData[0].url,l,{objectFit:this.data.objectFit});const c=new b.Vector3().addVectors(l[0],l[2]).divideScalar(2);this.mediaPlane.position.copy(c),s.add(this.mediaPlane)}if(this.computeRenderType()!=="Mesh"){(a=this.tag3DContentSvelte)==null||a.dispose();const c=document.createElement("div");c.classList.add("tag-media-container");const h="black";c.style.backgroundColor=h,c.style.border=`3px solid ${h}`;const u=V({mode:"behind",cornerPoints:l,container:c},this.config.tag3DConfig),d=this.computeRenderType()==="BehindDom"||u.mode==="behind"?"behind":"front",p=new sy(de(V({},u),{mode:d})),m=this.computeNormal();p.position.add(m.clone().setLength(sn.Z_FIGHTING_OFFSET)),s.add(p);let g;p.mode==="behind"&&this.config.clickable!==!1&&(g=this.addObjectClickHandler(this,p,y=>{this.plugin.hooks.emit("click",{event:y,target:"TagContent",tag:this})}));const v=new od({target:c,props:{tag:this,hooks:this.plugin.hooks,state:this.plugin.state,mediaStore:this.plugin.mediaStore,temporaryState:this.plugin.temporaryState}});this.tag3DContentSvelte={svelteApp:v,domContainer:{css3DObject:p},css3DInstance:p,initialNormal:m,currentNormal:m,dispose:()=>{v.$destroy(),p.dispose(),g==null||g()}}}}return this.plugin.gltfObjectGroup.add(s),s}));this.state.unfolded=!0,na(this.five),this.loadModel().then(()=>this.updateVisible())}applyVisible(){var e,i;(e=this.tag3DContentSvelte)==null||e.svelteApp.$set({tag:this,state:this.plugin.state,temporaryState:this.plugin.temporaryState}),(i=this.model)!=null&&i.object&&(this.model.object.visible=this.visible)}set(...e){super.set(...e),this.loadModel()}setData(...e){var s;super.setData(...e);const i=this.data.mediaPosition.map(Lt);this.computeRenderType()==="Mesh"?this.mediaPlane&&this.mediaPlane.src!==this.data.mediaData[0].url&&(this.mediaPlane.removeFromParent(),this.mediaPlane=new Mh(this.data.mediaData[0].url,i,{objectFit:this.data.objectFit})):(s=this.tag3DContentSvelte)==null||s.svelteApp.$set({tag:this})}computeNormal(){return X1(this.data.mediaPosition)}}function rd(n,t,e){if(e){const s=new b.Vector3().subVectors(n.position,e).applyQuaternion(n.quaternion.clone().inverse()).applyQuaternion(t).add(e);n.position.copy(s)}n.quaternion.copy(t)}class ha extends bi{constructor(e,i){var s,o;super();f(this,"originObject3D");f(this,"onRender");f(this,"positionFrom");this.originObject3D=e,this.onRender=(s=i==null?void 0:i.onRender)!=null?s:()=>{},this.positionFrom=(o=i==null?void 0:i.positionFrom)!=null?o:"objectPosition"}get helperObject(){return this}render(){this.onRender()}enable(){this.parent.children.includes(this)||this.parent.add(this)}disable(){this.removeFromParent()}show(){this.visible=!0,this.render()}hide(){this.visible=!1,this.render()}raycasterIntersectObject(e,i=[]){return e.intersectObject(this,!0,i)}initialPosition(e){var i,s;this.positionFrom==="objectPosition"?this.position.copy(this.originObject3D.position):this.positionFrom==="boundingBox"?this.position.copy((i=$s(this.originObject3D))==null?void 0:i.getCenter(new b.Vector3).applyMatrix4(this.originObject3D.matrixWorld)):this.positionFrom==="boundingSphere"?this.position.copy((s=ov(this.originObject3D))==null?void 0:s.center.clone().applyMatrix4(this.originObject3D.matrixWorld)):this.positionFrom instanceof G.Vector3?this.position.copy(this.positionFrom):this.positionFrom instanceof Function&&this.position.copy(this.positionFrom(this.originObject3D)),e&&this.position.add(e)}setScaleByCamera(e){}initQuaternion(e){if(this.quaternion.copy(this.originObject3D.quaternion),e&&(e.xAxis||e.yAxis||e.zAxis)){const i=e.xAxis instanceof Function?e.xAxis():e.xAxis,s=e.yAxis instanceof Function?e.yAxis():e.yAxis,o=e.zAxis instanceof Function?e.zAxis():e.zAxis;let r=i==null?void 0:i.clone(),a=s==null?void 0:s.clone(),l=o==null?void 0:o.clone();if(r&&!a&&!a){const c=new b.Quaternion().setFromUnitVectors(new b.Vector3(1,0,0),r.normalize());this.applyQuaternion(c)}if(a&&!r&&!l){const c=new b.Quaternion().setFromUnitVectors(new b.Vector3(0,1,0),a.normalize());this.applyQuaternion(c)}if(l&&!r&&!a){const c=new b.Quaternion().setFromUnitVectors(new b.Vector3(0,0,1),l.normalize());this.applyQuaternion(c)}if([r,a,l].filter(Ge).length>=2){r||(r=new b.Vector3().crossVectors(a,l).normalize()),a||(a=new b.Vector3().crossVectors(r,l).normalize()),l||(l=new b.Vector3().crossVectors(r,a).normalize()),r.applyQuaternion(this.quaternion),a.applyQuaternion(this.quaternion),l.applyQuaternion(this.quaternion);const c=new b.Matrix4().makeBasis(r,a,l),h=new b.Quaternion().setFromRotationMatrix(c);this.quaternion.copy(h)}}}applyHelperScaleMatrix4(e,i){this.scale.applyMatrix4(e)}setHelperQuaternion(e,i){this.initQuaternion(),rd(this,this.quaternion.clone().premultiply(e),i)}applyHelperQuaternion(e,i){if(i){const s=new G.Vector3().subVectors(this.position,i).applyQuaternion(e).add(i);this.position.copy(s)}this.applyQuaternion(e)}dispose(){this.removeFromParent()}}class q9 extends ha{}class J9 extends ha{}class K9 extends ha{}class $9 extends ha{}class eT extends ha{}class Py extends b.Group{constructor(e){super();f(this,"direction");this.direction=e||"x"}}class Sg extends b.Mesh{constructor(e,i,s){super(e,i);f(this,"direction");this.direction=s||"x"}}function tT(n,t){const{offsetWidth:e,offsetHeight:i}=t,{top:s,left:o}=t.getBoundingClientRect();return Object.assign(new b.Vector2,{x:(n.x-o)/e*2-1,y:-(n.y-s)/i*2+1})}function $l(n,t,e){if(!t||!e||!n)return;const i=tT(t,e);if(Math.abs(i.x)===1||Math.abs(i.y)===1)return;const s=new b.Raycaster;return s.setFromCamera(i,n),s.params.Points.threshold=.1,s}const Qi={ROTATE_HELPER:9992,MOVE_HELPER:9993,SCALE_HELPER_LINE:9994,SCALE_HELPER_SPHERE:9995,MOVE_HELPER_ARROW:10001,MOVE_HELPER_CENTER:10002,DRAG_GUIDE_LINE:10003,DRAG_FACE_PATCH:10004};class _c extends Py{constructor(e){var h;super(e.direction);f(this,"line");f(this,"arrow");f(this,"lineHeight",.4);f(this,"arrowHeight",.1);f(this,"name","ArrowGroup");const i=new b.Color((h=e.color)!=null?h:16214315),s=new b.MeshBasicMaterial({color:i,transparent:!0,opacity:1,depthTest:!1,depthWrite:!1}),o=new b.ConeGeometry(.04,.1,32),r=new Sg(o,s.clone(),e.direction);r.name=`arrow-${e.direction}`,r.renderOrder=Qi.MOVE_HELPER_ARROW,this.arrow=r;const a=.004,l=new b.CylinderGeometry(a,a,.4,32),c=new Sg(l,s.clone(),e.direction);c.name=`line-${e.direction}`,c.renderOrder=Qi.MOVE_HELPER_ARROW,this.line=c,this.formatArrow(),this.formatLine(),this.add(this.arrow,this.line)}formatArrow(){this.arrow.geometry.translate(0,this.lineHeight+this.arrowHeight/2,0),this.direction==="x"?(this.arrow.geometry.rotateX(Math.PI/2),this.arrow.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.arrow.geometry.rotateX(Math.PI/2)}formatLine(){this.line.geometry.translate(0,this.lineHeight/2,0),this.direction==="x"?(this.line.geometry.rotateX(Math.PI/2),this.line.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.line.geometry.rotateX(Math.PI/2)}}class Cy extends Py{constructor(e){var a,l;super("plane");f(this,"cube");f(this,"name","CenterHandle");f(this,"faceMaterials");f(this,"baseColor");f(this,"faceNormals",[new b.Vector3(1,0,0),new b.Vector3(-1,0,0),new b.Vector3(0,1,0),new b.Vector3(0,-1,0),new b.Vector3(0,0,1),new b.Vector3(0,0,-1)]);this.baseColor=new b.Color((a=e==null?void 0:e.color)!=null?a:16419862);const i=(l=e==null?void 0:e.size)!=null?l:.05,s=new b.Color(16755008).convertSRGBToLinear();this.faceMaterials=Array.from({length:6},()=>new b.MeshBasicMaterial({color:s,transparent:!0,opacity:1,depthTest:!1,depthWrite:!1,side:b.FrontSide}));const o=new b.BoxGeometry(i,i,i),r=new b.Mesh(o,this.faceMaterials);r.direction="plane",r.renderOrder=Qi.MOVE_HELPER_CENTER,r.name="center-plane-handle",this.cube=r,this.add(this.cube)}update(e){const i=new b.Vector3().subVectors(e.position,this.cube.getWorldPosition(new b.Vector3)).normalize(),s=this.cube.getWorldQuaternion(new b.Quaternion),o=this.faceNormals.map((a,l)=>{const h=a.clone().applyQuaternion(s).dot(i);return{index:l,angle:Math.acos(Math.abs(h))}});o.sort((a,l)=>a.angle-l.angle);const r=[new b.Color(16755008).convertSRGBToLinear(),new b.Color(16419862).convertSRGBToLinear(),new b.Color(13921032).convertSRGBToLinear()];o.forEach((a,l)=>{const c=Math.floor(l/2);this.faceMaterials[a.index].color.copy(r[c])})}}const Vc={X:16730698,Y:54927,Z:3368703};class zo{static get X(){return new b.Color(Vc.X).convertSRGBToLinear().clone()}static get Y(){return new b.Color(Vc.Y).convertSRGBToLinear().clone()}static get Z(){return new b.Color(Vc.Z).convertSRGBToLinear().clone()}}function ad(n,t,e){const r=n.position.distanceTo(t),a=n.fov,l=n.distance||3,c=r/3,h=a/90,u=l/3,d=c*h*u,p=(e==null?void 0:e.min)||.6,m=e==null?void 0:e.max;return p&&d<p?p:m&&d>m?m:d}function iT(n,t,e){return n<t?t:n>e?e:n}function nT(n){let t=n.pose.latitude,e=n.pose.longitude;if(yi(t)||yi(e)){const i=n.matrix.elements;t=Math.asin(iT(i[9],-1,1)),Math.abs(i[9])<.9999999?e=rh(Math.atan2(i[8],i[10])):e=rh(Math.atan2(-i[2],i[0]))}return{latitude:t,longitude:e}}function sT(n){const{latitude:t,longitude:e}=n,i=new b.Vector3;return Tg-t<.03?i.set(0,1,0):Fc(0,e)?i.set(0,0,1):Fc(Math.PI,e)?i.set(0,0,-1):Fc(Tg,e)?i.set(1,0,0):i.set(-1,0,0),i}const Tg=Number((Math.PI/2).toFixed(5));function Fc(n,t){return typeof n!="number"||typeof t!="number"?!1:Math.abs(n-t)<.001}class oT extends q9{constructor(e,i){super(e,i);f(this,"name","MoveHelper");f(this,"xArrow");f(this,"yArrow");f(this,"zArrow");f(this,"centerHandle");i.xArrowEnable!==!1&&(this.xArrow=new _c({direction:"x",color:zo.X})),i.yArrowEnable!==!1&&(this.yArrow=new _c({direction:"y",color:zo.Y})),i.zArrowEnable!==!1&&(this.zArrow=new _c({direction:"z",color:zo.Z})),i.centerHandleEnable!==!1&&(this.centerHandle=new Cy),this.add(...[this.xArrow,this.yArrow,this.zArrow,this.centerHandle].filter(Boolean))}update(e){this.xArrow&&(this.xArrow.visible=!0),this.yArrow&&(this.yArrow.visible=!0),this.zArrow&&(this.zArrow.visible=!0),this.centerHandle&&this.centerHandle.update(e);const i=this.helperObject.position.clone().sub(e.position).normalize(),s=new b.Vector3(1,0,0).applyQuaternion(this.quaternion),o=new b.Vector3(0,1,0).applyQuaternion(this.quaternion),r=new b.Vector3(0,0,1).applyQuaternion(this.quaternion);if(e.type==="OrthographicCamera"){const a=nT(e),l=sT(a),c=.0872665;Math.abs(s.angleTo(l)-0)<c||Math.abs(s.angleTo(l)-Math.PI)<c?this.xArrow&&(this.xArrow.visible=!1):Math.abs(o.angleTo(l)-0)<c||Math.abs(o.angleTo(l)-Math.PI)<c?this.yArrow&&(this.yArrow.visible=!1):(Math.abs(r.angleTo(l)-0)<c||Math.abs(r.angleTo(l)-Math.PI)<c)&&this.zArrow&&(this.zArrow.visible=!1)}if(e.type!=="OrthographicCamera"){const a=i.angleTo(s),l=i.angleTo(o),c=i.angleTo(r),h=Math.PI/2,u=l<h,d=c<h,p=a<h;this.xArrow&&(p?(this.xArrow.scale.x=-1,this.xArrow.scale.y=1,this.xArrow.scale.z=1):(this.xArrow.scale.x=1,this.xArrow.scale.y=1,this.xArrow.scale.z=1)),this.yArrow&&(u?(this.yArrow.scale.x=1,this.yArrow.scale.y=-1,this.yArrow.scale.z=1):(this.yArrow.scale.x=1,this.yArrow.scale.y=1,this.yArrow.scale.z=1)),this.zArrow&&(d?(this.zArrow.scale.x=1,this.zArrow.scale.y=1,this.zArrow.scale.z=-1):(this.zArrow.scale.x=1,this.zArrow.scale.y=1,this.zArrow.scale.z=1))}}show(){super.show(),this.xArrow&&this.add(this.xArrow),this.yArrow&&this.add(this.yArrow),this.zArrow&&this.add(this.zArrow),this.centerHandle&&this.add(this.centerHandle)}setScaleByCamera(e){this.scale.setScalar(ad(e,this.position))}showDraggingHelper(e){this.xArrow&&(e.includes("x")?this.add(this.xArrow):this.remove(this.xArrow)),this.yArrow&&(e.includes("y")?this.add(this.yArrow):this.remove(this.yArrow)),this.zArrow&&(e.includes("z")?this.add(this.zArrow):this.remove(this.zArrow)),this.centerHandle&&(e.includes("plane")?this.add(this.centerHandle):this.remove(this.centerHandle))}dispose(){this.remove(...[this.xArrow,this.yArrow,this.zArrow,this.centerHandle].filter(Boolean)),super.dispose()}}function Hs(n,t){return rT(document.createElement(t!=null?t:"div"),n)}function rT(n,t){if(!t)return n;for(const e in t)e&&t[e]&&(n.style[e]=t[e]);return n}function aT(n){const t=Hs(V({position:"absolute",display:"block",borderRadius:"4px",paddingTop:"1px",paddingBottom:"1px",paddingLeft:"4px",paddingRight:"4px",pointerEvents:"none",userSelect:"none",zIndex:"99999",backgroundColor:"rgba(0,0,0,0.7)",fontSize:"12px",color:"#fff",letterSpacing:"0",lineHeight:"18px"},n)),e=()=>{t.style.display!=="block"&&t.style.top&&t.style.left&&(t.style.display="block")};return{element:t,show:e,hide:()=>{t.style.display="none",t.style.top="",t.style.left=""},setLeftTop:(o,r)=>{t.style.left=o,t.style.top=r,e()}}}class lT extends K9{constructor(e,i){super(e,i);f(this,"name","RotateHelper");f(this,"xCircle");f(this,"yCircle");f(this,"zCircle");f(this,"children",[]);f(this,"angleTips");f(this,"container");(i==null?void 0:i.yzCircleEnable)!==!1&&(this.xCircle=new Bc({direction:"x",color:zo.X})),(i==null?void 0:i.xzCircleEnable)!==!1&&(this.yCircle=new Bc({direction:"y",color:zo.Y})),(i==null?void 0:i.xyCircleEnable)!==!1&&(this.zCircle=new Bc({direction:"z",color:zo.Z})),i!=null&&i.container&&(i==null?void 0:i.angleTipsEnable)!==!1&&(this.container=i==null?void 0:i.container,this.angleTips=aT({display:"none"}),this.container.appendChild(this.angleTips.element)),this.add(...[this.xCircle,this.yCircle,this.zCircle].filter(Boolean)),this.show()}hide(){this.children.forEach(e=>e.hide())}show(){var e;this.children.forEach(i=>i.showCircle()),(e=this.angleTips)==null||e.hide()}setScaleByCamera(e){this.scale.setScalar(ad(e,this.position))}update(e){if(e.type==="OrthographicCamera")return;const i=this.helperObject.position.clone().sub(e.position).normalize(),s=new b.Vector3(1,0,0).applyQuaternion(this.quaternion),o=new b.Vector3(0,1,0).applyQuaternion(this.quaternion),r=new b.Vector3(0,0,1).applyQuaternion(this.quaternion),a=i.angleTo(s),l=i.angleTo(o),c=i.angleTo(r),h=Math.PI/2,u=l>=h,d=c>=h,p=a>=h;if(this.xCircle){const m=this.xCircle.circle.gapAngle;u&&d?this.xCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,m,Math.PI/2-m*2):u&&!d?this.xCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,Math.PI/2+m,Math.PI/2-m*2):!u&&d?this.xCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,Math.PI/2*3+m,Math.PI/2-m*2):!u&&!d&&(this.xCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,Math.PI+m,Math.PI/2-m*2)),this.xCircle.angleSector&&(this.xCircle.angleSector.offsetAngle=g=>g,u&&d?this.xCircle.angleSector.baseAxes=new b.Vector3(0,0,1):u&&!d?this.xCircle.angleSector.baseAxes=new b.Vector3(0,0,1):!u&&d?(this.xCircle.angleSector.baseAxes=new b.Vector3(0,-1,0),this.xCircle.angleSector.offsetAngle=g=>g-Math.PI/2):!u&&!d&&(this.xCircle.angleSector.baseAxes=new b.Vector3(0,0,-1),this.xCircle.angleSector.offsetAngle=g=>g-Math.PI))}if(this.yCircle){this.yCircle.angleSector.offsetAngle=g=>g;const m=this.yCircle.circle.gapAngle;p&&d?this.yCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,m,Math.PI/2-m*2):p&&!d?this.yCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,Math.PI/2*3+m,Math.PI/2-m*2):!p&&d?this.yCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,Math.PI/2+m,Math.PI/2-m*2):!p&&!d&&(this.yCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,Math.PI+m,Math.PI/2-m*2)),p&&d?this.yCircle.angleSector.baseAxes=new b.Vector3(1,0,0):p&&!d?(this.yCircle.angleSector.baseAxes=new b.Vector3(0,0,-1),this.yCircle.angleSector.offsetAngle=g=>g-Math.PI/2):!p&&d?(this.yCircle.angleSector.baseAxes=new b.Vector3(0,0,1),this.yCircle.angleSector.offsetAngle=g=>g+Math.PI/2):!p&&!d&&(this.yCircle.angleSector.baseAxes=new b.Vector3(-1,0,0),this.yCircle.angleSector.offsetAngle=g=>g+Math.PI)}if(this.zCircle){this.zCircle.angleSector.offsetAngle=g=>g;const m=this.zCircle.circle.gapAngle;p&&u?this.zCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,m,Math.PI/2-m*2):p&&!u?this.zCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,Math.PI/2*3+m,Math.PI/2-m*2):!p&&u?this.zCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,Math.PI/2+m,Math.PI/2-m*2):!p&&!u&&(this.zCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,Math.PI+m,Math.PI/2-m*2)),this.zCircle.angleSector&&(p&&u?this.zCircle.angleSector.baseAxes=new b.Vector3(1,0,0):p&&!u?(this.zCircle.angleSector.baseAxes=new b.Vector3(0,-1,0),this.zCircle.angleSector.offsetAngle=g=>g-Math.PI/2):!p&&u?(this.zCircle.angleSector.baseAxes=new b.Vector3(0,1,0),this.zCircle.angleSector.offsetAngle=g=>g+Math.PI/2):!p&&!u&&(this.zCircle.angleSector.baseAxes=new b.Vector3(-1,0,0),this.zCircle.angleSector.offsetAngle=g=>g+Math.PI))}}showDraggingHelper(e){var i;this.hide(),this.children.filter(s=>e.includes(s.direction)).forEach(s=>s.showRing()),(i=this.angleTips)==null||i.show()}dispose(){var e,i;this.removeFromParent(),(i=(e=this.angleTips)==null?void 0:e.element)==null||i.remove()}}class Bc extends b.Group{constructor(e){super();f(this,"direction");f(this,"circle");f(this,"ring");f(this,"angleSector");this.direction=e.direction,this.circle=new cT(e),this.ring=new hT(e),this.angleSector=new uT(e),this.add(this.circle,this.ring,this.angleSector),this.direction==="y"?this.rotation.x=Math.PI/2:this.direction==="x"&&(this.rotation.y=-Math.PI/2)}showCircle(){this.add(this.circle),this.remove(this.ring,this.angleSector)}showRing(){this.add(this.ring,this.angleSector),this.remove(this.circle)}hide(){this.remove(this.ring,this.angleSector,this.circle)}}let cT=class extends b.Mesh{constructor(e){var i;super();f(this,"direction");f(this,"gapAngle",.02);f(this,"geometry",new b.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new b.MeshBasicMaterial({opacity:.6,transparent:!0,color:(i=e.color)!=null?i:16777215,side:b.DoubleSide,depthTest:!1}),this.direction=e.direction,this.renderOrder=Qi.ROTATE_HELPER,this.geometry.name=`RotateHelperCircleGeometry-${this.direction}`}};class hT extends b.Group{constructor(e){super();f(this,"direction");this.direction=e.direction;const i=.015,s=new Array(8).fill(null).map((o,r)=>{const a=new b.RingGeometry(.25,.3,20,8,Math.PI/4*r+i,Math.PI/4-i*2),l=new b.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,depthWrite:!1,transparent:!0,side:b.DoubleSide}),c=new b.Mesh(a,l);return c.name=`AxesDashedRing-${this.direction}-${r}`,c});this.add(...s)}}class uT extends b.Mesh{constructor(e){var s;super();f(this,"direction");f(this,"baseAxes");f(this,"offsetAngle",e=>e);f(this,"angleDirection");switch(e.direction){case"x":this.baseAxes=new b.Vector3(0,0,1);break;case"y":this.baseAxes=new b.Vector3(1,0,0);break;case"z":this.baseAxes=new b.Vector3(1,0,0);break}const i=.3+5e-4;this.geometry=new b.CircleGeometry(i,48,0,1e-4),this.material=new b.MeshBasicMaterial({opacity:.4,color:(s=e.color)!=null?s:16777215,depthTest:!1,depthWrite:!1,transparent:!0,side:b.DoubleSide}),this.direction=e.direction,this.angleDirection=this.direction==="z"?1:-1}setClockwiseDirection(){this.angleDirection=-1}setCounterClockwiseDirection(){this.angleDirection=1}toggleDirection(){this.angleDirection=this.angleDirection===1?-1:1}setBaseAxes(e){this.baseAxes=e.clone().normalize()}getDirection(){return this.angleDirection===-1?"clockwise":"counterclockwise"}}function dT(){const n=Hs({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=Hs({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=Hs({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"absolute",border:"1px solid rgba(255,255,255,0.4)"});n.appendChild(t),t.appendChild(e);const i="-4px",s={direction:"nesw",element:es({cursor:"nesw-resize",left:i,bottom:i})},o={direction:"ns",element:es({cursor:"ns-resize",bottom:i})},r={direction:"nwse",element:es({cursor:"nwse-resize",right:i,bottom:i})},a={direction:"ew",element:es({cursor:"ew-resize",right:i})},l={direction:"nesw",element:es({cursor:"nesw-resize",right:i,top:i})},c={direction:"ns",element:es({cursor:"ns-resize",top:i})},h={direction:"nwse",element:es({cursor:"nwse-resize",left:i,top:i})},u={direction:"ew",element:es({cursor:"ew-resize",left:i})};return new Array(o,a,c,u,s,r,l,h).forEach(p=>t.appendChild(p.element)),{container:n,spheres:[s,o,r,a,l,c,h,u]}}function es(n){const t=Hs(V({background:"#FFFF00",width:"9px",height:"9px",position:"absolute",pointerEvents:"none",borderRadius:"50%"},n)),e=Hs({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),i=Hs({width:"15px",height:"15px",cursor:n==null?void 0:n.cursor,pointerEvents:"auto",background:"transparent"});return i.draggable=!0,e.appendChild(i),t.appendChild(e),t}const Ha=new Map;function My(n){if(Ha.has(n))return Ha.get(n).hooks;const t=new St;let e=null,i;const s=()=>{e=requestAnimationFrame(s);const r=n.projectionMatrix.toArray().join(",")+n.matrixWorld.toArray().join(",");r!==i&&(i=r,t.emit("cameraUpdate"))};s();const o=()=>{Ha.delete(n),cancelAnimationFrame(e)};return Ha.set(n,{hooks:t,dispose:o}),t}class fT extends eT{constructor(e,i,s,o){super(e);f(this,"name","CSS3DScaleHelper");f(this,"points",[]);f(this,"cornerPositions",[]);f(this,"css3DInstance");f(this,"plane");f(this,"css3DRenderer",new _o);f(this,"camera");f(this,"scene");f(this,"container");f(this,"enabled",!1);f(this,"initialScale");this.camera=s,this.scene=o,this.container=i,this.initRectangleScaleHelper()}get helperObject(){var e;if(!((e=this.css3DInstance)!=null&&e.css3DObject))throw new Error("css3DInstance is not initialized");return this.css3DInstance.css3DObject}initQuaternion(){this.quaternion.copy(this.originObject3D.quaternion)}applyMatrix4(e){var i;super.applyMatrix4(e),this.helperObject.applyMatrix4(e),(i=this.plane)==null||i.applyMatrix4(e),this.cornerPositions.forEach(s=>s.applyMatrix4(e))}showDraggingHelper(){}applyHelperScaleMatrix4(e,i){var s;(s=this.plane)==null||s.scale.applyMatrix4(e),this.helperObject.applyScaleMatrix4(e),setTimeout(()=>{this.updateSphereCorrection()},0)}updatePoints(){const e=this.calculatePointPosition(this.cornerPositions);this.points.forEach((i,s)=>{i.position.copy(e[s])})}update(e){var i;(i=this.css3DInstance)!=null&&i.css3DObject&&this.helperObject.position.copy(this.originObject3D.position),this.plane&&this.plane.position.copy(this.originObject3D.position),this.updatePoints(),this.css3DInstance&&this.css3DInstance.show(),this.plane&&(this.plane.visible=!0)}applyHelperQuaternion(e,i){var o;const s=(o=this.css3DInstance)==null?void 0:o.css3DObject;if(s){const r=new b.Vector3().subVectors(s.position,i).applyQuaternion(e).add(i);s.position.copy(r),s.applyQuaternion(e)}if(this.plane){const r=new b.Vector3().subVectors(this.plane.position,i).applyQuaternion(e).add(i);this.plane.position.copy(r),this.plane.applyQuaternion(e)}this.cornerPositions.forEach(r=>{const a=new b.Vector3().subVectors(r,i).applyQuaternion(e).add(i);r.copy(a)})}enable(){var e;this.enabled||(this.enabled=!0,(e=this.css3DInstance)==null||e.enable(),this.plane&&this.scene.add(this.plane))}disable(){var e;this.enabled&&(this.enabled=!1,(e=this.css3DInstance)==null||e.disable(),this.plane&&this.scene.remove(this.plane))}show(){var e;(e=this.css3DInstance)==null||e.show(),this.plane&&(this.plane.visible=!0)}hide(){var e;(e=this.css3DInstance)==null||e.hide(),this.plane&&(this.plane.visible=!1)}dispose(){this.disable(),this.css3DRenderer.dispose()}onScaleEnd(){My(this.camera).emit("cameraUpdate")}updateSphereCorrection(){if(!this.css3DInstance)return;this.initialScale||(this.initialScale={x:this.originObject3D.scale.x,y:this.originObject3D.scale.y});const e=this.originObject3D.scale,i=e.x/this.initialScale.x,s=e.y/this.initialScale.y,o=this.css3DInstance.css3DObject.container;o.style.setProperty("--parent-scaleX",i.toString()),o.style.setProperty("--parent-scaleY",s.toString())}initRectangleScaleHelper(){var a,l;const e=this.getCornerPositions();if(!e)return;this.cornerPositions=e;const i=this.css3DRenderer.create3DElement(this.camera,e,{ratio:.003});if(!i)return;this.css3DInstance=i,i.appendToElement(this.container);const s=i.css3DObject.container,{container:o,spheres:r}=dT();this.points=r.map((c,h)=>({direction:c.direction,point:c.element,position:this.calculatePointPosition(e)[h]})),s.insertBefore(o,(a=s.children[0])!=null?a:null),this.helperObject.position.copy(this.originObject3D.position),(l=this.plane)==null||l.position.copy(this.originObject3D.position)}getCornerPositions(){const{originObject3D:e}=this;if(e.isCSS3DObject&&e.cornerPoints)return e.cornerPoints;console.error("当前物体暂时不支持 ScaleHelper")}calculatePointPosition(e){return[e[0].clone(),e[0].clone().add(e[1]).divideScalar(2),e[1].clone(),e[1].clone().add(e[2]).divideScalar(2),e[2].clone(),e[2].clone().add(e[3]).divideScalar(2),e[3].clone(),e[3].clone().add(e[0]).divideScalar(2)]}}class pT extends J9{constructor(e){super(e);f(this,"name","BoundingBoxHelper");f(this,"box");f(this,"outline");f(this,"positionAttribute");this.positionAttribute=new b.BufferAttribute(new Float32Array(8*3),3),this.box=this.createBox(),this.outline=this.createOutline(),this.add(this.box,this.outline),this.update()}initQuaternion(){this.quaternion.copy(this.originObject3D.quaternion)}setHelperQuaternion(e,i){rd(this,e,i)}raycasterIntersectObject(e,i){return e.intersectObject(this,!1,i)}raycast(e,i){this.box.raycast(e,i)}update(){const e=$s(this.originObject3D);if(!e)return;const{min:i,max:s}=e;this.positionAttribute.setXYZ(0,s.x,s.y,s.z),this.positionAttribute.setXYZ(1,i.x,s.y,s.z),this.positionAttribute.setXYZ(2,i.x,i.y,s.z),this.positionAttribute.setXYZ(3,s.x,i.y,s.z),this.positionAttribute.setXYZ(4,s.x,s.y,i.z),this.positionAttribute.setXYZ(5,i.x,s.y,i.z),this.positionAttribute.setXYZ(6,i.x,i.y,i.z),this.positionAttribute.setXYZ(7,s.x,i.y,i.z),this.positionAttribute.needsUpdate=!0}createOutline(){const e=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new b.BufferGeometry;i.setIndex(new b.BufferAttribute(e,1)),i.setAttribute("position",this.positionAttribute);const s=new b.LineBasicMaterial({color:64767,linewidth:1,opacity:1,toneMapped:!1}),o=new b.LineSegments(i,s);return o.matrixAutoUpdate=!1,o}createBox(){const e=new Uint16Array([0,1,2,0,2,3,0,3,7,0,7,4,0,4,5,0,5,1,6,1,5,6,2,1,6,5,4,6,4,7,6,3,2,6,7,3]),i=new b.BufferGeometry;i.setIndex(new b.BufferAttribute(e,1)),i.setAttribute("position",this.positionAttribute);const s=new b.MeshBasicMaterial({color:64767,opacity:.1,depthTest:!1,transparent:!0});return new b.Mesh(i,s)}}class ua{constructor(t,e){f(this,"originObject3D");f(this,"hooks");f(this,"preventTapDefaultEvent",!1);f(this,"internalHooks");f(this,"disposers",[]);f(this,"helperObject3D");f(this,"camera");f(this,"model");f(this,"scene");f(this,"container");f(this,"domEvents");f(this,"isDragging",!1);f(this,"enabled",!1);f(this,"name","BaseController");f(this,"boundingBox");f(this,"config");f(this,"onRender");f(this,"cameraHooks");f(this,"otherControllers");f(this,"onWantsTapGesture",t=>{if(this.getIntersectObject(t))return!1});f(this,"updateHelperScale",()=>{"update"in this.helperObject3D&&typeof this.helperObject3D.update=="function"&&this.helperObject3D.update(this.camera),this.helperObject3D.setScaleByCamera(this.camera)});f(this,"getBox",()=>this.boundingBox?this.boundingBox:(this.boundingBox=$s(this.originObject3D),this.boundingBox));var h,u,d;this.hooks=(h=t.sharedHooks)!=null?h:new St,this.internalHooks=(u=t.sharedInternalHooks)!=null?u:new St,this.camera=t.camera,this.model=t.model,this.originObject3D=t.originObject3D,this.helperObject3D=t.helperObject3D,this.container=t.container,this.scene=t.scene,this.domEvents=t.domEvents,this.onRender=(d=t.onRender)!=null?d:()=>{},this.config=e!=null?e:{},this.otherControllers=t.otherControllers,this.initialHelperPosition(),this.initialHelperQuaternion(),this.updateHelperScale(),this.cameraHooks=My(this.camera),this.enable();const i=this.onSetOriginObjectScale.bind(this),s=this.onSetOriginObjectRotate.bind(this),o=this.onSetOriginObjectPosition.bind(this),r=this.onApplyOriginObjectScale.bind(this),a=this.onApplyOriginObjectRotate.bind(this),l=this.onApplyOriginObjectPosition.bind(this),c=this.initialHelperPosition.bind(this);this.cameraHooks.on("cameraUpdate",this.updateHelperScale),this.internalHooks.on("initialHelperPosition",c),this.internalHooks.on("setObjectScale",i),this.internalHooks.on("setObjectRotate",s),this.internalHooks.on("setObjectPosition",o),this.internalHooks.on("applyObjectPosition",l),this.internalHooks.on("applyObjectRotate",a),this.internalHooks.on("applyObjectScale",r),this.hooks.on("moveEnd",this.updateHelperScale),this.internalHooks.on("setObjectPosition",this.updateHelperScale),this.internalHooks.on("initialHelperPosition",this.updateHelperScale),this.disposers.push(()=>{this.cameraHooks.off("cameraUpdate",this.updateHelperScale),this.internalHooks.off("initialHelperPosition",c),this.internalHooks.off("setObjectScale",i),this.internalHooks.off("setObjectRotate",s),this.internalHooks.off("setObjectPosition",o),this.internalHooks.off("applyObjectPosition",l),this.internalHooks.off("applyObjectRotate",a),this.internalHooks.off("applyObjectScale",r),this.hooks.off("moveEnd",this.updateHelperScale),this.internalHooks.off("setObjectPosition",this.updateHelperScale),this.internalHooks.off("initialHelperPosition",this.updateHelperScale)})}updateOtherControllers(t){this.otherControllers=t}getIsDragging(){return this.isDragging}initialHelperPosition(){this.helperObject3D.initialPosition(this.calculateOffset(this.config.offset))}initialHelperQuaternion(){this.helperObject3D.initQuaternion(this.config)}enable(){this.enabled||(this.enabled=!0,this.scene.add(this.helperObject3D),this.helperObject3D.enable(),this.render())}disable(){this.enabled&&(this.enabled=!1,this.helperObject3D.disable(),this.render())}show(){this.helperObject3D.show(),this.render()}hide(){this.helperObject3D.hide(),this.render()}dispose(){var t;(t=this.disposers)==null||t.forEach(e=>e==null?void 0:e()),this.helperObject3D.dispose(),this.render()}applyHelperMatrix4(t){this.helperObject3D.applyMatrix4(t)}applyHelperQuaternion(t,e){this.helperObject3D.applyHelperQuaternion(t,e)}applyHelperScaleMatrix4(t,e){this.helperObject3D.applyHelperScaleMatrix4(t,e)}onWantsGesture(t,e,i){if(this.isDragging)return!1}onIntersectionOnModelUpdate(t){}onApplyOriginObjectScale(t){this.applyHelperScaleMatrix4(t.matrix,t.origin)}onApplyOriginObjectRotate(t){this.applyHelperQuaternion(t.quaternion,t.origin)}onApplyOriginObjectPosition(t){this.applyHelperMatrix4(t.matrix)}onSetOriginObjectScale(t){this.helperObject3D.scale.copy(t),this.updateOffsetByScale(t)}onSetOriginObjectRotate(t,e){this.helperObject3D.setHelperQuaternion(t,e)}onSetOriginObjectPosition(t){this.helperObject3D.position.copy(t.clone().add(this.calculateOffset(this.config.offset)))}render(){this.onRender()}updateOffsetByScale(t){if(this.boundingBox&&this.config.offset){const e=this.originObject3D.position,i=new b.Vector3().subVectors(this.boundingBox.max,e).multiply(t).add(e),s=new b.Vector3().subVectors(this.boundingBox.min,e).multiply(t).add(e),o=this.calculateOffset(this.config.offset,{min:s,max:i});this.helperObject3D.initialPosition(o)}}hoverListener(t,e=16777215,i=1){const s=ms(t).filter(Ge),o=[];for(const r of s)if(r.material||r instanceof b.Group){const a=r instanceof b.Group?r.children.filter(d=>d instanceof b.Mesh):[r];a.forEach(d=>{var p,m,g,v;Array.isArray(d.material)?(d.__originalColor__=(p=d.__originalColor__)!=null?p:d.material.map(y=>y.color.clone()),d.__originalOpacity__=(m=d.__originalOpacity__)!=null?m:d.material.map(y=>y.opacity)):(d.__originalColor__=(g=d.__originalColor__)!=null?g:d.material.color.clone(),d.__originalOpacity__=(v=d.__originalOpacity__)!=null?v:d.material.opacity)});const l=()=>{a.forEach(d=>{d.name==="ScaleHelperTransparentGroup"?d.children[0]&&(d.children[0].material.color.set(e),d.children[0].material.opacity=i):Array.isArray(d.material)?d.material.forEach(p=>{p.color.set(e),p.opacity=i}):(d.material.color.set(e),d.material.opacity=i)}),this.render()},c=()=>{a.forEach(d=>{if(d.name==="ScaleHelperTransparentGroup")d.children[0]&&(d.children[0].material.color.set(16776960),d.children[0].material.opacity=1);else if(Array.isArray(d.material)){const p=d.__originalColor__,m=d.__originalOpacity__;d.material.forEach((g,v)=>{p&&p[v]&&g.color.copy(p[v]),m&&m[v]!==void 0&&(g.opacity=m[v])})}else d.material.color.copy(d.__originalColor__),d.material.opacity=d.__originalOpacity__}),this.render()},h=d=>{this.isDragging||l()},u=d=>{this.isDragging||c()};for(const d of a)this.domEvents.addEventListener(d,"mouseover",h),this.domEvents.addEventListener(d,"mouseout",u),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",c),this.hooks.on("rotateEnd",c),this.hooks.on("scaleEnd",c),o.push(()=>{this.domEvents.removeEventListener(d,"mouseover",h),this.domEvents.removeEventListener(d,"mouseout",u),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",c),this.hooks.off("rotateEnd",c),this.hooks.off("scaleEnd",c)})}return()=>o.forEach(r=>r==null?void 0:r())}getIntersectObject(t){const e=this.camera.position,i=this.helperObject3D;if(!i)return;const s=this.helperObject3D.raycasterIntersectObject(t)[0];if(!s)return;const o=s;if(o.object=i,this.model.intersectRaycaster){const r=this.model.intersectRaycaster(t)[0];if(r&&r.point.distanceTo(e)<o.point.distanceTo(e))return}return o.object}calculateOffset(t,e){const i=new b.Vector3(0,0,0);if(!t)return i;const s=()=>e||this.getBox();if(typeof t.x=="number")i.setX(t.x);else if(typeof t.x=="object"){const o=s();i.setX((o.max.x-o.min.x)*t.x.percents)}if(typeof t.y=="number")i.setY(t.y);else if(typeof t.y=="object"){const o=s();i.setY((o.max.y-o.min.y)*t.y.percents)}if(typeof t.z=="number")i.setZ(t.z);else if(typeof t.z=="object"){const o=s();i.setZ((o.max.z-o.min.z)*t.z.percents)}return i}}function mT(n,t){let e=10,i=10;const s=n.isPerspectiveCamera,o=n.isOrthographicCamera;if(s){const u=n,d=u.position.distanceTo(t),p=u.fov*Math.PI/180;i=2*Math.tan(p/2)*d,e=i*u.aspect}else if(o){const u=n;e=Math.abs(u.right-u.left),i=Math.abs(u.top-u.bottom)}const r=Math.sqrt(e*e+i*i),a=r*.8,l=Math.min(e,i)*.25,c=r*1.2;return Math.max(l,Math.min(a,c))}class Iy{constructor(t,e,i){f(this,"camera");f(this,"container");f(this,"defaults");this.camera=t,this.container=e,this.defaults=V({},i||{})}createSolidLine(t,e,i){const s=V(V({color:16777215,renderOrder:Qi.DRAG_GUIDE_LINE},this.defaults),i||{}),o=e.clone().normalize(),r=this.computeInfiniteLineLength(t),a=t.clone().add(o.clone().multiplyScalar(-r)),l=t.clone().add(o.clone().multiplyScalar(r)),c=new Float32Array([a.x,a.y,a.z,l.x,l.y,l.z]),h=new b.BufferGeometry;h.setAttribute("position",new b.BufferAttribute(c,3));const u=new b.LineBasicMaterial({color:s.color,depthTest:!1,depthWrite:!1,transparent:!0,opacity:.65}),d=new b.Line(h,u);return d.renderOrder=s.renderOrder,d}updateSolidLine(t,e,i,s){const o=i.clone().normalize(),r=this.computeInfiniteLineLength(e),a=e.clone().add(o.clone().multiplyScalar(-r)),l=e.clone().add(o.clone().multiplyScalar(r)),c=new Float32Array([a.x,a.y,a.z,l.x,l.y,l.z]),h=t.geometry,u=h.getAttribute("position");u&&u.itemSize===3&&u.array.length===c.length?(u.array.set(c),u.needsUpdate=!0):h.setAttribute("position",new b.BufferAttribute(c,3)),(s==null?void 0:s.color)!==void 0&&t.material.color.setHex(s.color)}computeInfiniteLineLength(t){return mT(this.camera,t)*10}dispose(t){if(!t)return;t.geometry.dispose();const e=t.material;Array.isArray(e)?e.forEach(i=>i.dispose()):e.dispose()}updateDefaults(t){this.defaults=V(V({},this.defaults),t)}}var O0,j0;let gT=class extends ua{constructor(...e){super(...e);f(this,"name","MoveController");f(this,"startInfo");f(this,"dragGuideLine");f(this,"solidGuide",new Iy(this.camera,this.container,(j0=(O0=this.config)==null?void 0:O0.solidGuide)!=null?j0:{}));f(this,"_moveByMouse",{enabled:!1});f(this,"mouseInfo");f(this,"mousedownEventListenerDisposer");f(this,"dragStart",e=>{if(this.moveByMouseEnable||this.isDragging)return;const i=e==null?void 0:e.intersect;if(!i)return this.dragEnd();const s=(i==null?void 0:i.object).direction;if(!s)return this.dragEnd();const o=new b.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new b.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new b.Vector3(0,0,1).applyQuaternion(this.helperObject3D.quaternion),l=(()=>{switch(s){case"x":return o;case"y":return r;case"z":return a;case"plane":return}})(),c=i.point.clone();if(s==="plane"){const u=this.camera.position.clone(),d=c.clone(),p=d.clone().sub(u).normalize(),m=new b.Plane().setFromNormalAndCoplanarPoint(p,d),g=d.clone();this.startInfo={draggingDirection:s,startVectorProject:g,line:new b.Line3(g.clone(),g.clone()),plane:m}}else{const u=new b.Line3(c.clone().sub(l.normalize()),c.clone().add(l.normalize()));this.startInfo={draggingDirection:s,startVectorProject:c,line:u};try{const d=l.clone().normalize(),p=this.helperObject3D.getWorldPosition(new b.Vector3),m=this.solidGuide.createSolidLine(p,d,{color:16777215,renderOrder:Qi.DRAG_GUIDE_LINE});this.scene.add(m),this.dragGuideLine=m}catch(d){}}const h=s==="plane"?[]:[s];this.helperObject3D.showDraggingHelper(h),this.hooks.emit("moveStart",s),this.isDragging=!0});f(this,"dragging",e=>{if(!this.isDragging||!this.startInfo)return;const i="touches"in e?e.touches[0].clientX:e.x,s="touches"in e?e.touches[0].clientY:e.y,o=$l(this.camera,{x:i,y:s},this.container);return o?(this.move(o),!1):this.dragEnd()});f(this,"dragEnd",()=>{if(this.isDragging){if(this.startInfo=void 0,this.isDragging=!1,this.dragGuideLine){this.scene.remove(this.dragGuideLine),this.dragGuideLine.geometry.dispose();const e=this.dragGuideLine.material;Array.isArray(e)?e.forEach(i=>i.dispose()):e.dispose(),this.dragGuideLine=void 0}this.helperObject3D.show(),this.hooks.emit("moveEnd")}});const i=this.helperObject3D;if(this.hoverListener([i.xArrow,i.yArrow,i.zArrow]),i.centerHandle&&i.centerHandle instanceof Cy){const a=i.centerHandle,l=a.cube,c=16777215,h=()=>{this.isDragging||(Array.isArray(l.material)&&l.material.forEach(d=>{d.color.set(c)}),this.render())},u=()=>{this.isDragging||(a.update(this.camera),this.render())};this.domEvents.addEventListener(l,"mouseover",h),this.domEvents.addEventListener(l,"mouseout",u)}const s=this.show.bind(this),o=this.hide.bind(this),r=()=>{this.helperObject3D.update(this.camera),this.isDragging&&this.updateDragGuideLineScale(),this.render()};r(),this.domEvents.addEventListener(this.helperObject3D,"mousedown",this.dragStart),document.addEventListener("mousemove",this.dragging),document.addEventListener("mouseup",this.dragEnd),this.domEvents.addEventListener(this.helperObject3D,"touchstart",this.dragStart),document.addEventListener("touchmove",this.dragging),document.addEventListener("touchend",this.dragEnd),this.hooks.on("rotateStart",o),this.hooks.on("rotateEnd",s),this.hooks.on("scaleStart",o),this.hooks.on("scaleEnd",s),this.hooks.on("moveByMouseEnable",o),this.hooks.on("moveByMouseDisable",s),this.hooks.on("updateOtherHelpers",a=>{this.helperObject3D.update(a.camera),this.render()}),this.cameraHooks.on("cameraUpdate",r),this.disposers.push(()=>{this.domEvents.removeEventListener(this.helperObject3D,"mousedown",this.dragStart),document.removeEventListener("mousemove",this.dragging),document.removeEventListener("mouseup",this.dragEnd),this.domEvents.removeEventListener(this.helperObject3D,"touchstart",this.dragStart),document.removeEventListener("touchmove",this.dragging),document.removeEventListener("touchend",this.dragEnd),this.hooks.off("rotateStart",o),this.hooks.off("rotateEnd",s),this.hooks.off("scaleStart",o),this.hooks.off("scaleEnd",s),this.hooks.off("moveByMouseEnable",o),this.hooks.off("moveByMouseDisable",s),this.hooks.off("updateOtherHelpers"),this.cameraHooks.off("cameraUpdate",r)}),this.moveByMouseEnable&&this.moveByMouse()}get moveByMouseEnable(){return this._moveByMouse.enabled}dispose(){var e;super.dispose(),(e=this.disposers)==null||e.forEach(i=>i==null?void 0:i())}moveByMouse(e){this._moveByMouse={enabled:!0,useFaceNormal:e==null?void 0:e.useFaceNormal},this.preventTapDefaultEvent=!0;const i=this.handleMouseDown.bind(this),s=this.handleMouseUp.bind(this);this.hooks.emit("moveByMouseEnable"),setTimeout(()=>{this.container.addEventListener("mousedown",i),this.container.addEventListener("mouseup",s)}),this.mousedownEventListenerDisposer=()=>{this.container.removeEventListener("mousedown",i),this.container.removeEventListener("mouseup",s)}}disableMoveByMouse(){var e;this._moveByMouse={enabled:!1},this.preventTapDefaultEvent=!1,this.hooks.emit("moveByMouseDisable"),(e=this.mousedownEventListenerDisposer)==null||e.call(this)}onIntersectionOnModelUpdate(e){var r,a,l;if(!this.moveByMouseEnable)return;const{point:i,face:s}=e;if(!this.hooks.emit("wantToMove",i)){if(this.originObject3D.position.copy(i),(this._moveByMouse.useFaceNormal===!0||typeof this._moveByMouse.useFaceNormal=="object"&&this._moveByMouse.useFaceNormal.enable!==!1)&&s!=null&&s.normal){const c=(()=>typeof this._moveByMouse.useFaceNormal=="object"&&this._moveByMouse.useFaceNormal.alignmentVector?this._moveByMouse.useFaceNormal.alignmentVector:{x:0,y:1,z:0})(),h=new b.Vector3((r=c.x)!=null?r:0,(a=c.y)!=null?a:0,(l=c.z)!=null?l:0),u=(()=>typeof this._moveByMouse.useFaceNormal=="object"&&this._moveByMouse.useFaceNormal.fixedFaceNormal?this._moveByMouse.useFaceNormal.fixedFaceNormal(s.normal):s.normal)();this.originObject3D.quaternion.setFromUnitVectors(h,u),this.internalHooks.emit("setObjectRotate",this.originObject3D.quaternion.clone())}this.internalHooks.emit("setObjectPosition",i),this.hooks.emit("move",i)}}handleMouseDown(e){const{x:i,y:s}=e;this.mouseInfo={x:i,y:s,mouseDownTimestamp:Date.now()}}handleMouseUp(e){if(!this.mouseInfo)return;const{x:i,y:s}=e;this.mouseInfo.x===i&&this.mouseInfo.y===s&&Date.now()-this.mouseInfo.mouseDownTimestamp<500&&(this.disableMoveByMouse(),this.mouseInfo=void 0)}updateDragGuideLineScale(){if(!this.dragGuideLine||!this.startInfo)return;const{line:e}=this.startInfo,i=e.end.clone().sub(e.start).normalize();if(i.lengthSq()<1e-6)return;const s=this.helperObject3D.getWorldPosition(new b.Vector3);this.solidGuide.updateSolidLine(this.dragGuideLine,s,i)}move(e){var g;if(!this.startInfo)return this.dragEnd();const{line:i,startVectorProject:s}=this.startInfo,o=this.originObject3D,r=this.startInfo.draggingDirection==="plane";let a;if(r){const v=this.startInfo.plane;if(!v)return;const y=new b.Vector3,w=v.normal.dot(e.ray.direction);if(Math.abs(w)<1e-6)return;const C=-(v.normal.dot(e.ray.origin)+v.constant)/w;if(C<0)return;y.copy(e.ray.origin.clone().add(e.ray.direction.clone().multiplyScalar(C))),a=y}else a=Ln({raycaster:e,line:i,clampToLine:!1});const l=o.position.clone(),c=a.clone().sub(s),h=new b.Matrix4;h.setPosition(c);const u=o.position.clone().applyMatrix4(h);if(this.hooks.emit("wantToMove",u))return;const p=(g=this.hooks.emitWithResult("moveBefore",u))!=null?g:u,m=new b.Matrix4;m.setPosition(p.clone().sub(l)),o.position.copy(p),s.copy(a),this.internalHooks.emit("applyObjectPosition",{matrix:m}),this.hooks.emit("move",p)}};class Pr{constructor(t,e,i,s,o,r,a,l,c){f(this,"helperController");f(this,"five");f(this,"onFiveWantsTapGesture",t=>{if(!this.helperController)return;if(this.helperController.preventTapDefaultEvent)return!1;const e=this.helperController.onWantsTapGesture(t);return this.five.needsRender=!0,e});f(this,"onFiveWantsGesture",(...t)=>{if(!this.helperController)return;const e=this.helperController.onWantsGesture(...t);return this.five.needsRender=!0,e});f(this,"onFiveIntersectionOnModelUpdate",(...t)=>{this.helperController&&this.helperController.onIntersectionOnModelUpdate(...t)});const{camera:h,model:u,scene:d}=t,p=t.getElement();if(this.five=t,!h||!u||!p||!d)return;const m=()=>{t.needsRender=!0};this.helperController=new i({camera:h,model:u,domEvents:e,originObject3D:s,helperObject3D:o,container:p,scene:d,onRender:m,sharedHooks:a,sharedInternalHooks:l,otherControllers:c},r),t.on("wantsTapGesture",this.onFiveWantsTapGesture),t.on("wantsGesture",this.onFiveWantsGesture),t.on("intersectionOnModelUpdate",this.onFiveIntersectionOnModelUpdate)}dispose(){var t;this.five.off("wantsTapGesture",this.onFiveWantsTapGesture),this.five.off("wantsGesture",this.onFiveWantsGesture),this.five.off("intersectionOnModelUpdate",this.onFiveIntersectionOnModelUpdate),(t=this.helperController)==null||t.dispose()}}const vT="v1.0.1",yT="Object3DHelper",ld=`${yT}@${vT}`,bT=()=>{console.error(`${ld} is disposed`)},AT=()=>{console.warn(`${ld} is disabled`)},wT=()=>{console.error(`${ld} is disabled`)};class PT{constructor(t){f(this,"controllers",{});f(this,"state",{visible:!0,enabled:!0,disposed:!1});f(this,"hooks",new St);f(this,"eventListener",{});t&&this.addControllers(t),this.setState(this.state)}show(t){return $(this,null,function*(){this.setState({visible:!0},t)})}hide(t){return $(this,null,function*(){this.setState({visible:!1},t)})}enable(t){this.setState({enabled:!0},t)}disable(t){this.setState({enabled:!1},t)}dispose(){this.setState({disposed:!0})}setState(t,e){if(this.state.disposed)return bT();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return wT();const i=V({},this.state);this.state=V(V({},this.state),t),t.disposed!==void 0&&t.disposed!==i.disposed&&t.disposed&&this.handleDispose(),t.visible!==void 0&&this.handleVisible(t.visible),t.enabled!==void 0&&this.handleEnable(t.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:i})}addControllers(t){this.controllers=V(V({},this.controllers),t),this.setState(this.state)}initialHelperMatrix(){this.everyControllerDo(t=>{t.initialHelperPosition(),t.initialHelperQuaternion()})}getCurrentState(){return this.state}handleEnable(t,e=!0){t?(this.everyControllerDo(i=>{i.enable()}),this.hooks.emit("enable",{userAction:e})):(this.everyControllerDo(i=>{i.disable()}),this.hooks.emit("disable",{userAction:e})),this.state.enabled=t}handleVisible(t,e=!0){t?(this.everyControllerDo(i=>{i.show()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:e}))):(this.everyControllerDo(i=>{i.hide()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:e}))),this.state.visible=t}everyControllerDo(t){Object.values(this.controllers).forEach(e=>{e&&t(e)})}handleDispose(){var t,e;Object.values(this.controllers).forEach(i=>{i==null||i.dispose()});for(const i in this.controllers){if(!i)continue;const s=i;(e=(t=this.eventListener)[s])==null||e.call(t)}}actionIfStateIsEnabled(t,e){if(this.state.enabled)return t();e!=null&&e.warnLog&&AT()}}function Ao(n){return n*Math.PI/180}let Hc=new b.Quaternion;class CT extends ua{constructor(...e){var h,u,d;super(...e);f(this,"name","RotateController");f(this,"startInfo");f(this,"removeListener");const i=this.helperObject3D;this.hoverListener([(h=i.xCircle)==null?void 0:h.circle,(u=i.yCircle)==null?void 0:u.circle,(d=i.zCircle)==null?void 0:d.circle].filter(Boolean));const s=this.dragStart.bind(this),o=this.dragging.bind(this),r=this.dragEnd.bind(this),a=this.show.bind(this),l=this.hide.bind(this),c=()=>{this.helperObject3D.update(this.camera),this.render()};c(),this.domEvents.addEventListener(this.helperObject3D,"mousedown",s),document.addEventListener("mousemove",o),document.addEventListener("mouseup",r),this.domEvents.addEventListener(this.helperObject3D,"touchstart",s),document.addEventListener("touchmove",o),document.addEventListener("touchend",r),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",a),this.hooks.on("scaleStart",l),this.hooks.on("scaleEnd",a),this.hooks.on("moveByMouseEnable",l),this.hooks.on("moveByMouseDisable",a),this.hooks.on("updateOtherHelpers",p=>{this.helperObject3D.update(p.camera),this.render()}),this.cameraHooks.on("cameraUpdate",c),this.disposers.push(()=>{this.domEvents.removeEventListener(this.helperObject3D,"mousedown",s),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r),this.domEvents.removeEventListener(this.helperObject3D,"touchstart",s),document.removeEventListener("touchmove",o),document.removeEventListener("touchend",r),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",a),this.hooks.off("scaleStart",l),this.hooks.off("scaleEnd",a),this.hooks.off("moveByMouseEnable",l),this.hooks.off("moveByMouseDisable",a),this.hooks.off("updateOtherHelpers"),this.cameraHooks.off("cameraUpdate",c)})}get rotateCenter(){return this.helperObject3D.position.clone()}setRotateAngle(e){const{x:i=0,y:s=0,z:o=0}=e,r=new b.Euler(Ao(i),Ao(s),Ao(o)),a=new b.Quaternion().setFromEuler(r);if(this.hooks.emit("wantToRotate",a))return;const{originObject3D:c,rotateCenter:h}=this;rd(c,a,h),this.internalHooks.emit("setObjectRotate",a,h),this.hooks.emit("rotate",a),this.render()}getEulerAngle(e,i){const{originObject3D:s}=this,o=new b.Euler().setFromQuaternion(s.quaternion),r={x:di(o.x),y:di(o.y),z:di(o.z)},a={x:e==="x"?i:r.x,y:e==="y"?i:r.y,z:e==="z"?i:r.z},l=new b.Euler(Ao(a.x),Ao(a.y),Ao(a.z));return new b.Quaternion().setFromEuler(l)}onApplyOriginObjectRotate(e){this.isDragging||super.onApplyOriginObjectRotate(e)}onApplyOriginObjectScale(e){}dragStart(e){if(this.isDragging)return;this.helperObject3D.update(this.camera);const i=e==null?void 0:e.intersect;if(!i)return this.dragEnd();const s=(i==null?void 0:i.object).direction;if(!s)return this.dragEnd();const o=i.point,r=this.getAngleHelper(s);this.setTipsAngle(0);const a=o.clone();a.y+=.2,this.setTipsPosition(a);const l=this.helperObject3D.quaternion.clone(),c=(()=>{if(s==="x")return new b.Vector3(1,0,0).applyQuaternion(l);if(s==="y")return new b.Vector3(0,1,0).applyQuaternion(l);if(s==="z")return new b.Vector3(0,0,1).applyQuaternion(l)})(),h=new b.Plane().setFromNormalAndCoplanarPoint(c,o),d=h.projectPoint(o.clone(),new b.Vector3).clone().sub(this.rotateCenter),p=d.angleTo(r.baseAxes.clone().applyQuaternion(l)),m=r.offsetAngle(p);this.setAngleHelperStart(s,m),this.setAngleHelperLength(s,0),this.startInfo={direction:s,startVector:d,directionVector:c,plane:h,angleHelper:r,angle:0,helperQuaternion:l.clone()},Hc=new b.Quaternion,this.helperObject3D.showDraggingHelper([s]),this.hooks.emit("rotateStart",s),this.isDragging=!0}getMatrix(){var i,s;return(s=(i=this.originObject3D)==null?void 0:i.ext)==null?void 0:s.matrix}getMatrixAngle(e,i){let s;if(e&&e.isMatrix4){s=new b.Quaternion,e.decompose(new b.Vector3,s,new b.Vector3);const o=new b.Euler().setFromQuaternion(s);if(i==="x")return Math.round(di(o.z));if(i==="y")return Math.round(di(o.y));if(i==="z")return Math.round(di(o.x))}}parseAngleByDirection(e){var o,r;const i=(r=(o=this.originObject3D)==null?void 0:o.ext)==null?void 0:r.matrix;let s;if(i&&i.isMatrix4){s=new b.Quaternion,i.decompose(new b.Vector3,s,new b.Vector3);const a=new b.Euler().setFromQuaternion(s);if(e==="x")return Math.round(di(a.z));if(e==="y")return Math.round(di(a.y));if(e==="z")return Math.round(di(a.x))}}dragging(e){if(!this.isDragging)return;const i="touches"in e?e.touches[0].clientX:e.x,s="touches"in e?e.touches[0].clientY:e.y,o=$l(this.camera,{x:i,y:s},this.container);return o?(this.rotate(o),!1):this.dragEnd()}rotate(e){if(!this.startInfo)return this.dragEnd();const{startVector:i,plane:s,angleHelper:o,direction:r,helperQuaternion:a}=this.startInfo,{originObject3D:l}=this,c=e.ray.intersectPlane(s,new b.Vector3);if(!c)return;const h=this.rotateCenter.clone();let d=s.projectPoint(c.clone(),new b.Vector3).clone().sub(h);const p=this.startInfo.directionVector.clone().normalize();d=d.clone().projectOnPlane(p).normalize().multiplyScalar(d.length());const g=new b.Quaternion().setFromUnitVectors(i.clone().normalize(),d.clone().normalize()),v=l.quaternion.clone().premultiply(g);if(i.angleTo(d)===0||this.hooks.emit("wantToRotate",v))return;const C=new b.Euler().setFromQuaternion(new b.Quaternion().setFromUnitVectors(i.clone().normalize().applyQuaternion(a.clone().inverse()),d.clone().normalize().applyQuaternion(a.clone().inverse())),`${r.toUpperCase()}${"XZY".replace(r.toUpperCase(),"")}`)[r]*o.angleDirection;if(this.startInfo.angle+=C,this.setAngleHelperLength(r,this.startInfo.angle),this.setTipsAngle(di(this.startInfo.angle)),h){const E=new b.Vector3().subVectors(l.position,h).applyQuaternion(g).add(h);l.position.copy(E)}l.applyQuaternion(g),Hc.premultiply(g),this.internalHooks.emit("applyObjectRotate",{quaternion:g,origin:h}),this.hooks.emit("rotate",l.quaternion),this.startInfo.startVector=d}dragEnd(){var e;this.isDragging&&(this.applyHelperQuaternion(Hc,this.rotateCenter),(e=this.startInfo)!=null&&e.lineMeshes&&this.startInfo.lineMeshes.forEach(i=>{this.scene.remove(i),i.geometry.dispose(),i.material instanceof b.Material&&i.material.dispose()}),this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.updateOtherHelpers(),this.hooks.emit("rotateEnd"))}updateOtherHelpers(){this.hooks.emit("updateOtherHelpers",{camera:this.camera})}getAngleHelper(e){var i,s,o;switch(e){case"x":return(i=this.helperObject3D.xCircle)==null?void 0:i.angleSector;case"y":return(s=this.helperObject3D.yCircle)==null?void 0:s.angleSector;case"z":return(o=this.helperObject3D.zCircle)==null?void 0:o.angleSector}}setAngleHelperStart(e,i){const s=this.getAngleHelper(e);if(!s){console.warn("angleHelper is undefined");return}if(s instanceof b.Mesh&&s.geometry instanceof b.CircleGeometry){const{radius:o,segments:r,thetaLength:a}=s.geometry.parameters;s.geometry=new b.CircleGeometry(o,r,i,a)}else console.warn("only support THREE.CircleGeometry")}setAngleHelperLength(e,i){const o=i>=0?Math.max(i,.001):Math.min(i,-.001),r=this.getAngleHelper(e);if(r instanceof b.Mesh&&r.geometry instanceof b.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(o)*(40/(2*Math.PI)));r.geometry=new b.CircleGeometry(a,c,l,o)}else console.warn("only support THREE.CircleGeometry")}setTipsAngle(e){var s;const i=(s=this.helperObject3D.angleTips)==null?void 0:s.element;i&&(i.innerText=`${e.toFixed(0)}°`)}setTipsPosition(e){const i=this.helperObject3D.angleTips;if(!i)return;const s=e.project(this.camera),{x:o,y:r,z:a}=s;if(a>1)return;const l=(o+1)/2*100+"%",c=(-r+1)/2*100+"%";i.setLeftTop(l,c)}}class MT extends ua{constructor(...e){super(...e);f(this,"startInfo");f(this,"name","RectangleScaleController")}enable(){this.helperObject3D.enable(),super.enable()}disable(){this.helperObject3D.disable(),super.disable()}show(){this.helperObject3D.show(),super.show()}hide(){this.helperObject3D.hide(),super.hide()}onApplyOriginObjectPosition(e){this.isDragging||super.onApplyOriginObjectPosition(e)}onApplyOriginObjectScale(e){this.helperObject3D.applyHelperScaleMatrix4(e.matrix,e.origin)}getDragPlane(){const e=new b.Plane,i=this.helperObject3D.cornerPositions;if(i.length!==0)return i.length<3?e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new G.Vector3),i[0]):e.setFromCoplanarPoints(i[0],i[1],i[2]),e}dragStart(e,i){var o,r;(r=(o=this.helperObject3D).updatePoints)==null||r.call(o);const s=this.getDragPlane();if(!s)return this.dragEnd();this.startInfo={startPoint:{position:i.position.clone(),direction:i.direction},plane:s},this.hooks.emit("scaleStart",i.direction),this.render(),this.isDragging=!0}dragging(e){if(!this.isDragging)return;const i=$l(this.camera,e,this.container);if(!i)return this.dragEnd();this.scale(i)}scale(e){var O,A;if(!this.startInfo)return;const i=this.originObject3D,{startPoint:s,plane:o}=this.startInfo,r=this.helperObject3D.cornerPositions;if(r.length<4)return this.dragEnd();const a=e.ray.intersectPlane(o,new G.Vector3);if(!a||Za(a,this.camera.position))return;const l=new G.Vector3().addVectors(r[0],r[2]).divideScalar(2),{position:c,direction:h}=s,u=new G.Vector3().subVectors(r[1],r[0]),d=new G.Vector3().subVectors(r[3],r[0]),p=M=>{const I=new G.Vector3(0,0,0);if(!this.startInfo)return I;const k=(M==="ew"?u:d).clone(),x=c.clone().projectOnVector(k),S=a.clone().projectOnVector(k),j=l.clone().projectOnVector(k);if(S.equals(x))return I;if(M==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const ne=new G.Vector3().subVectors(S,j),q=ne.x<0&&k.x>=0,oe=ne.y<0&&k.y>=0,se=ne.z<0&&k.z>=0;this.startInfo.dragPointInCenterBottom=q||oe||se}if(M==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const ne=new G.Vector3().subVectors(S,j),q=ne.x<0&&k.x>=0,oe=ne.y<0&&k.y>=0,se=ne.z<0&&k.z>=0;this.startInfo.dragPointInCenterLeft=q||oe||se}const F=new G.Vector3().subVectors(S,x),J=F.length();return J>.3?(console.warn("offset.length() > 0.3, skipped",J),I):F},m=p("ew"),g=p("ns"),v=()=>{const M=m;this.helperObject3D.cornerPositions.forEach((I,k)=>{var x;(x=this.startInfo)!=null&&x.dragPointInCenterLeft?(k===0||k===3)&&I.add(M):(k===1||k===2)&&I.add(M)})},y=()=>{const M=g;this.helperObject3D.cornerPositions.forEach((I,k)=>{var x;(x=this.startInfo)!=null&&x.dragPointInCenterBottom?(k===0||k===1)&&I.add(M):(k===2||k===3)&&I.add(M)})};switch(h){case"ew":v();break;case"ns":y();break;case"nesw":case"nwse":v(),y()}const w=new G.Vector3().subVectors(r[1],r[0]).length()/u.length(),C=new G.Vector3().subVectors(r[3],r[0]).length()/d.length(),E=new G.Vector3(w,C,1),D=new b.Matrix4().scale(E);i.isCSS3DObjectPlus&&i.applyScaleMatrix4?i.applyScaleMatrix4(D):i.scale.applyMatrix4(D),s.position.copy(a);const L=new G.Vector3().addVectors(r[0],r[2]).divideScalar(2),R=new G.Vector3().subVectors(L,l),z=new b.Matrix4().setPosition(R);i.applyMatrix4(z),(O=this.helperObject3D.css3DInstance)==null||O.css3DObject.applyMatrix4(z),(A=this.helperObject3D.plane)==null||A.applyMatrix4(z),this.internalHooks.emit("applyObjectScale",{matrix:D}),this.internalHooks.emit("applyObjectPosition",{matrix:z}),this.render()}dragEnd(){this.isDragging&&(this.startInfo=void 0,this.isDragging=!1,"onScaleEnd"in this.helperObject3D&&typeof this.helperObject3D.onScaleEnd=="function"&&this.helperObject3D.onScaleEnd(),this.hooks.emit("scaleEnd"),this.render())}}class IT extends MT{constructor(...e){super(...e);f(this,"name","CSS3DScaleController");this.addHTMLEventListener()}addHTMLEventListener(){this.helperObject3D.points.forEach(e=>{if(!e)return;const i=e.point,s=a=>this.dragStart(a,e),o=this.dragging.bind(this),r=this.dragEnd.bind(this);i.addEventListener("dragstart",s),i.addEventListener("drag",o),i.addEventListener("dragend",r)})}}class ET extends ua{constructor(...e){super(...e);f(this,"name","BoundingBoxController")}}class kT extends $9{constructor(e,i){super(e,i);f(this,"name","ScaleHelper");f(this,"scaleMeshes",[]);f(this,"lineConnections",[]);f(this,"positions",[]);f(this,"container");f(this,"needsInitialScaling",!1);f(this,"lastCamera",null);f(this,"isInitializing",!1);i&&(this.positions=i.positions,this.container=i.container),this.raycast=()=>{}}initQuaternion(){this.quaternion.copy(this.originObject3D.quaternion)}initialPosition(e){if(this.isInitializing){console.warn("ScaleHelper: initialPosition called while already initializing, skipping");return}this.isInitializing=!0;try{this.position.copy(this.originObject3D.position);const i=typeof this.positions=="function"?this.positions():this.positions;if(!i){this.isInitializing=!1;return}this.clearAllSpheres(),this.scaleMeshes=i.map((s,o)=>{const r=xT();return r.position.copy(s.handlePosition),r.scalePosition=s,r.children.forEach(a=>{a.scalePosition=s}),this.add(r),r}),this.createLineConnections(),this.needsInitialScaling=!0,this.lastCamera&&(this.applySphereScaling(this.lastCamera),this.applyLineScaling(this.lastCamera),this.needsInitialScaling=!1)}finally{this.isInitializing=!1}}clearAllSpheres(){this.scaleMeshes.forEach(i=>{this.remove(i)}),this.scaleMeshes=[];const e=this.children.filter(i=>i.name==="ScaleHelperSphere");e.length>0&&e.forEach(i=>{this.remove(i)})}createLineConnections(){this.lineConnections.forEach(s=>{this.remove(s.line)}),this.lineConnections=[];const e={top:"bottom",bottom:"top",left:"right",right:"left",front:"back",back:"front"},i=new Set;for(const s of this.scaleMeshes){const o=s.scalePosition.id;if(!o||i.has(o))continue;const r=e[o];if(!r)continue;const a=this.scaleMeshes.find(c=>c.scalePosition.id===r);if(!a)continue;const l=ST(s.position.clone(),a.position.clone());this.add(l),this.lineConnections.push({line:l,mesh1:s,mesh2:a}),i.add(o),i.add(r)}}update(e){const i=e.type==="OrthographicCamera",s=e.position.clone(),o=this.originObject3D.getWorldPosition(new b.Vector3),r=s.sub(o).normalize(),a={front:new b.Vector3(0,0,1).applyQuaternion(this.originObject3D.getWorldQuaternion(new b.Quaternion)),back:new b.Vector3(0,0,-1).applyQuaternion(this.originObject3D.getWorldQuaternion(new b.Quaternion)),left:new b.Vector3(-1,0,0).applyQuaternion(this.originObject3D.getWorldQuaternion(new b.Quaternion)),right:new b.Vector3(1,0,0).applyQuaternion(this.originObject3D.getWorldQuaternion(new b.Quaternion)),top:new b.Vector3(0,1,0).applyQuaternion(this.originObject3D.getWorldQuaternion(new b.Quaternion)),bottom:new b.Vector3(0,-1,0).applyQuaternion(this.originObject3D.getWorldQuaternion(new b.Quaternion))};let l=-1,c="";Object.entries(a).forEach(([u,d])=>{const p=r.dot(d);p>l&&(l=p,c=u)});const h={top:"bottom",bottom:"top",left:"right",right:"left",front:"back",back:"front"};this.scaleMeshes.forEach(u=>{if(!i){u.visible=!0;return}const d=u.scalePosition.id,p=h[c];d===c||d===p?u.visible=!1:u.visible=!0}),this.updateLineConnections(),this.lastCamera&&(this.applySphereScaling(this.lastCamera),this.applyLineScaling(this.lastCamera))}applySphereScaling(e){this.updateMatrixWorld(!0),this.scaleMeshes.forEach(i=>{i.scale.setScalar(ad(e,i.scalePosition.handlePosition.clone().applyMatrix4(this.matrixWorld)))})}applyLineScaling(e){}showLineConnections(){this.lineConnections.forEach(e=>{const i=e.mesh1.visible&&e.mesh2.visible;e.line.visible=i})}hideLineConnections(){this.lineConnections.forEach(e=>{e.line.visible=!1})}updateLineConnections(){this.lineConnections.forEach(e=>{e.line.scale.set(1,1,1),e.line.position.set(0,0,0),e.line.rotation.set(0,0,0);const s=e.line.geometry.attributes.position;s.setXYZ(0,e.mesh1.position.x,e.mesh1.position.y,e.mesh1.position.z),s.setXYZ(1,e.mesh2.position.x,e.mesh2.position.y,e.mesh2.position.z),s.needsUpdate=!0;const o=e.mesh1.visible&&e.mesh2.visible;e.line.visible=o})}setScaleByCamera(e){this.lastCamera=e,this.applySphereScaling(e),this.applyLineScaling(e),this.needsInitialScaling&&requestAnimationFrame(()=>{this.applySphereScaling(e),this.applyLineScaling(e)}),this.needsInitialScaling=!1}}function xT(){const t=new b.SphereGeometry(.03,16,16),e=new b.MeshBasicMaterial({color:16776960,side:b.DoubleSide,transparent:!0,opacity:1,depthTest:!1,depthWrite:!1}),i=new b.Mesh(t,e);i.name="ScaleHelperSphere",i.renderOrder=Qi.SCALE_HELPER_SPHERE;const s=.03*4,o=new b.SphereGeometry(s,16,16),r=new b.MeshBasicMaterial({transparent:!0,opacity:0,side:b.DoubleSide,depthTest:!1,depthWrite:!1}),a=new b.Mesh(o,r);return a.name="ScaleHelperTransparentGroup",a.renderOrder=Qi.SCALE_HELPER_SPHERE,a.add(i),a}function ST(n,t){const e=new b.BufferGeometry,i=[n,t];e.setFromPoints(i);const s=new b.LineBasicMaterial({color:16776960,opacity:.75,transparent:!0,depthTest:!1,depthWrite:!1}),o=new b.Line(e,s);return o.name="ScaleHelperSolidLine",o.renderOrder=Qi.SCALE_HELPER_LINE,o.raycast=()=>{},o}var R0,_0;class TT extends ua{constructor(...e){super(...e);f(this,"name","ScaleController");f(this,"dragGuideLine");f(this,"currentFacePatch");f(this,"solidGuide",new Iy(this.camera,this.container,(_0=(R0=this.config)==null?void 0:R0.solidGuide)!=null?_0:{}));f(this,"startInfo");f(this,"dragStart",e=>{if(this.isDragging)return;this.isDragging=!0;const{intersect:i}=e,s=this.camera.position,o=new Set(this.helperObject3D.scaleMeshes.map(m=>m.uuid));let r=i.object;for(;r.parent&&!o.has(r.uuid);)r=r.parent;const a=r,l=a.scalePosition.basePosition.clone(),c=a.scalePosition.handlePosition.clone(),h=c.clone().sub(l).clone(),u=new b.Line3(l,l.clone().add(h.normalize().multiplyScalar(5)));u.applyMatrix4(this.helperObject3D.matrixWorld);const d=new b.Raycaster(s,i.point.clone().sub(s)),p=Ln({raycaster:d,line:u});this.startInfo={line:u,scaleStartPoint:p,draggingObject:a},this.helperObject3D.scaleMeshes.forEach(m=>{m.uuid!==a.uuid&&(m.visible=!1)}),"hideLineConnections"in this.helperObject3D&&typeof this.helperObject3D.hideLineConnections=="function"&&this.helperObject3D.hideLineConnections();try{this.originObject3D.updateMatrixWorld(!0),this.helperObject3D.updateMatrixWorld(!0);const m=this.getObjectWorldCenter(),v=c.clone().applyMatrix4(this.helperObject3D.matrixWorld).clone().sub(m).normalize(),y=m,w=this.solidGuide.createSolidLine(y,v,{color:16777215,renderOrder:Qi.DRAG_GUIDE_LINE});this.isRectangleWithEdgeMesh()||this.scene.add(w),this.dragGuideLine=w,this.addFaceMesh()}catch(m){}a.visible=!0,this.hooks.emit("scaleStart")});f(this,"dragging",e=>{const i="touches"in e?e.touches[0].clientX:e.x,s="touches"in e?e.touches[0].clientY:e.y,o=$l(this.camera,{x:i,y:s},this.container),r=this.isMoveControllerDragging();if(!this.isDragging&&!r&&o){this.addHoverFaceMesh(o);return}if(this.startInfo)return o?(this.scale(o),this.updateDragGuideLineDirection(),this.removeFaceMesh(),this.addFaceMesh(),!1):this.dragEnd()});f(this,"isRectangleWithEdgeMesh",()=>this.originObject3D.name==="RectangleWithEdgeMesh"&&["topleft","topright","bottomleft","bottomright"].includes(this.startInfo.draggingObject.scalePosition.id));f(this,"scale",e=>{var l,c,h,u;if(!this.startInfo)return;const{line:i,scaleStartPoint:s,draggingObject:o}=this.startInfo,{scalePosition:r}=o;if(this.isRectangleWithEdgeMesh()){const d=this.originObject3D,m=d.geometry.attributes.position;if(!m)return[];const g=[],v=m.count;for(let z=0;z<v;z++){const O=new b.Vector3().fromBufferAttribute(m,z);d.updateMatrixWorld(!0),O.applyMatrix4(d.matrixWorld),g.push(O)}const y=g.slice(0,4);if(!y||y.length<4)return;const w=mi(y).normalize(),C=new b.Plane().setFromNormalAndCoplanarPoint(w,y[0]),D=Math.abs(e.ray.direction.dot(w))<.1;let L;if(D)L=Ln({raycaster:e,line:i,clampToLine:!1}).applyMatrix4(new b.Matrix4().getInverse(this.helperObject3D.matrixWorld.clone()));else{const z=new b.Vector3;if(e.ray.intersectPlane(C,z),!z)return;const O=new b.Matrix4().getInverse(this.helperObject3D.matrixWorld);L=z.clone().applyMatrix4(O)}const R=s.clone().applyMatrix4(new b.Matrix4().getInverse(this.helperObject3D.matrixWorld));(c=(l=this.config)==null?void 0:l.scaleCallback)==null||c.call(l,{intersectPoint:L,scalePosition:r,offset:L.clone().sub(R)}),o.position.copy(L),this.hooks.emit("scale",new b.Vector3(1,1,1));return}const a=Ln({raycaster:e,line:i,clampToLine:!1});a.applyMatrix4(new b.Matrix4().getInverse(this.helperObject3D.matrixWorld.clone())),(u=(h=this.config)==null?void 0:h.scaleCallback)==null||u.call(h,{intersectPoint:a,scalePosition:r,offset:a.clone().sub(s)}),o.position.copy(a.clone()),this.hooks.emit("scale",new b.Vector3(1,1,1))});f(this,"dragEnd",()=>{if(this.isDragging){if(this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.scaleMeshes.forEach(e=>{e.visible=!0}),"showLineConnections"in this.helperObject3D&&typeof this.helperObject3D.showLineConnections=="function"&&this.helperObject3D.showLineConnections(),this.dragGuideLine){this.scene.remove(this.dragGuideLine),this.dragGuideLine.geometry.dispose();const e=this.dragGuideLine.material;Array.isArray(e)?e.forEach(i=>i.dispose()):e.dispose(),this.dragGuideLine=void 0}this.removeFaceMesh(),this.internalHooks.emit("initialHelperPosition"),this.hooks.emit("scaleEnd")}});const i=this.show.bind(this),s=this.hide.bind(this),o=()=>{"update"in this.helperObject3D&&typeof this.helperObject3D.update=="function"&&this.helperObject3D.update(this.camera),this.isDragging&&this.updateDragGuideLineScale(),this.render()};o(),this.domEvents.addEventListener(this.helperObject3D,"mousedown",this.dragStart),document.addEventListener("mousemove",this.dragging),document.addEventListener("mouseup",this.dragEnd),this.domEvents.addEventListener(this.helperObject3D,"touchstart",this.dragStart),document.addEventListener("touchmove",this.dragging),document.addEventListener("touchend",this.dragEnd),this.hooks.on("rotateStart",s),this.hooks.on("rotateEnd",i),this.hooks.on("moveStart",()=>{s(),this.removeFaceMesh()}),this.hooks.on("moveEnd",i),this.hooks.on("moveByMouseEnable",s),this.hooks.on("moveByMouseDisable",i),this.hooks.on("updateOtherHelpers",r=>{"update"in this.helperObject3D&&typeof this.helperObject3D.update=="function"&&this.helperObject3D.update(r.camera),this.isDragging&&this.updateDragGuideLineScale(),this.render()}),this.cameraHooks.on("cameraUpdate",o),this.disposers.push(()=>{if(this.domEvents.removeEventListener(this.helperObject3D,"mousedown",this.dragStart),document.removeEventListener("mousemove",this.dragging),document.removeEventListener("mouseup",this.dragEnd),this.domEvents.removeEventListener(this.helperObject3D,"touchstart",this.dragStart),document.removeEventListener("touchmove",this.dragging),document.removeEventListener("touchend",this.dragEnd),this.hooks.off("rotateStart",s),this.hooks.off("rotateEnd",i),this.hooks.off("moveStart",s),this.hooks.off("moveEnd",i),this.hooks.off("moveByMouseEnable",s),this.hooks.off("moveByMouseDisable",i),this.hooks.off("updateOtherHelpers"),this.cameraHooks.off("cameraUpdate",o),this.currentFacePatch){this.scene.remove(this.currentFacePatch),this.currentFacePatch.geometry.dispose();const r=this.currentFacePatch.material;Array.isArray(r)?r.forEach(a=>a.dispose()):r.dispose(),this.currentFacePatch=void 0}})}initialHelperPosition(){this.helperObject3D.initialPosition();const e=this;e.offHoverListener&&e.offHoverListener(),e.offHoverListener=this.hoverListener(this.helperObject3D.scaleMeshes)}getObjectWorldCenter(){if("worldCenter"in this.originObject3D&&typeof this.originObject3D.worldCenter=="object")return this.originObject3D.worldCenter.clone();const e=rv(this.originObject3D);return e?e.getCenter(new b.Vector3):this.originObject3D.getWorldPosition(new b.Vector3)}getMoveMeshes(){var s,o,r,a;const e=[],i=(a=(r=(o=(s=this.helperObject3D.parent)==null?void 0:s.children)==null?void 0:o.find(l=>l.name==="MoveHelper"))==null?void 0:r.children)!=null?a:[];for(const l of i)l.name==="ArrowGroup"?e.push(...l.children):l.name==="center-plane-handle"&&e.push(l);return e}addHoverFaceMesh(e){var l,c;if(this.isMoveControllerDragging()||(this.removeFaceMesh(),!((l=this.originObject3D.parent)!=null&&l.getWorldFacesGeometry)))return;const i=(c=this.originObject3D.parent)==null?void 0:c.getWorldFacesGeometry(),s=this.helperObject3D.scaleMeshes,o=this.getMoveMeshes();if(e.intersectObjects(o,!1),e.intersectObjects(o,!1).length>0)return;let r=null,a=null;for(const h of s){if(!h.visible)continue;const u=e.intersectObject(h,!1);if(u&&u.length>0){r=h,a=u[0].point.clone();break}}if(r&&a&&Array.isArray(i)&&i.length>0){let h=null,u=1/0;for(const d of i){if(!d.vertices||d.vertices.length<3)continue;const p=new b.Vector3;for(const g of d.vertices)p.add(g);p.divideScalar(d.vertices.length);const m=a.distanceTo(p);m<u&&(u=m,h=d)}h&&this.addFacePatch(h)}}addFaceMesh(){var s,o,r;if(this.isMoveControllerDragging())return;const e=(s=this.startInfo)==null?void 0:s.draggingObject;if(!e||!((o=this.originObject3D.parent)!=null&&o.getWorldFacesGeometry))return;const i=(r=this.originObject3D.parent)==null?void 0:r.getWorldFacesGeometry();if(i&&i.length>0){const a=e.getWorldPosition(new b.Vector3);let l=1/0,c=i[0];for(const h of i){const u=h.center;let d;if(u instanceof b.Vector3)d=u;else if(Array.isArray(u)&&u.length===3)d=new b.Vector3(u[0],u[1],u[2]);else continue;const p=d.distanceTo(a);p<l&&(l=p,c=h)}this.addFacePatch(c)}}removeFaceMesh(){if(this.currentFacePatch){this.scene.remove(this.currentFacePatch),this.currentFacePatch.geometry.dispose();const e=this.currentFacePatch.material;Array.isArray(e)?e.forEach(i=>i.dispose()):e.dispose(),this.currentFacePatch=void 0}}setScale(e){var l,c,h;let i=1,s=1,o=1;typeof e=="number"?(i=e,s=e,o=e):typeof e=="object"&&(i=(l=e.x)!=null?l:1,s=(c=e.y)!=null?c:1,o=(h=e.z)!=null?h:1);const r=new b.Vector3(i,s,o);this.hooks.emit("wantToScale",r)||(this.originObject3D.scale.copy(r),this.internalHooks.emit("setObjectScale",r),this.hooks.emit("scale",r),this.render())}updateDragGuideLineDirection(){if(!this.dragGuideLine||!this.startInfo)return;const{draggingObject:e}=this.startInfo;this.originObject3D.updateMatrixWorld(!0),this.helperObject3D.updateMatrixWorld(!0);const i=this.getObjectWorldCenter(),o=e.position.clone().applyMatrix4(this.helperObject3D.matrixWorld).clone().sub(i).normalize(),r=i;this.solidGuide.updateSolidLine(this.dragGuideLine,r,o)}updateDragGuideLineScale(){if(!this.dragGuideLine||!this.startInfo)return;const{scalePosition:e}=this.startInfo.draggingObject,i=e.handlePosition.clone().applyMatrix4(this.helperObject3D.matrixWorld),s=e.basePosition.clone().applyMatrix4(this.helperObject3D.matrixWorld),o=i,r=i.clone().sub(s).normalize();this.solidGuide.updateSolidLine(this.dragGuideLine,o,r)}isMoveControllerDragging(){var e,i,s;return(s=(i=(e=this.otherControllers)==null?void 0:e.moveController)==null?void 0:i.getIsDragging())!=null?s:!1}addFacePatch(e){if(this.currentFacePatch){this.scene.remove(this.currentFacePatch),this.currentFacePatch.geometry.dispose();const r=this.currentFacePatch.material;Array.isArray(r)?r.forEach(a=>a.dispose()):r.dispose(),this.currentFacePatch=void 0}if(!e.vertices||e.vertices.length<3){console.warn("Face has no vertices, cannot create patch");return}const i=new b.BufferGeometry;if(e.vertices.length===4){const r=new Float32Array([e.vertices[0].x,e.vertices[0].y,e.vertices[0].z,e.vertices[1].x,e.vertices[1].y,e.vertices[1].z,e.vertices[2].x,e.vertices[2].y,e.vertices[2].z,e.vertices[0].x,e.vertices[0].y,e.vertices[0].z,e.vertices[2].x,e.vertices[2].y,e.vertices[2].z,e.vertices[3].x,e.vertices[3].y,e.vertices[3].z]);i.setAttribute("position",new b.BufferAttribute(r,3)),i.setIndex([0,1,2,3,4,5])}else{const r=new Float32Array(e.vertices.length*3),a=new Uint16Array(e.vertices.length);e.vertices.forEach((l,c)=>{r[c*3]=l.x,r[c*3+1]=l.y,r[c*3+2]=l.z,a[c]=c}),i.setAttribute("position",new b.BufferAttribute(r,3)),i.setIndex(new b.BufferAttribute(a,1))}i.computeVertexNormals();const s=new b.MeshBasicMaterial({color:16777215,side:b.DoubleSide,depthTest:!1,depthWrite:!1,transparent:!0,opacity:.45}),o=new b.Mesh(i,s);return o.renderOrder=Qi.DRAG_FACE_PATCH,this.scene.add(o),this.currentFacePatch=o,this.render(),o}}function $e(n,t){this._camera=n||null,this._domElement=t||document,this._raycaster=new b.Raycaster,this._selected=null,this._boundObjs={};var e=this;this._$onClick=function(){e._onClick.apply(e,arguments)},this._$onDblClick=function(){e._onDblClick.apply(e,arguments)},this._$onMouseMove=function(){e._onMouseMove.apply(e,arguments)},this._$onMouseDown=function(){e._onMouseDown.apply(e,arguments)},this._$onMouseUp=function(){e._onMouseUp.apply(e,arguments)},this._$onTouchMove=function(){e._onTouchMove.apply(e,arguments)},this._$onTouchStart=function(){e._onTouchStart.apply(e,arguments)},this._$onTouchEnd=function(){e._onTouchEnd.apply(e,arguments)},this._$onContextmenu=function(){e._onContextmenu.apply(e,arguments)},this._domElement.addEventListener("click",this._$onClick,!1),this._domElement.addEventListener("dblclick",this._$onDblClick,!1),this._domElement.addEventListener("mousemove",this._$onMouseMove,!1),this._domElement.addEventListener("mousedown",this._$onMouseDown,!1),this._domElement.addEventListener("mouseup",this._$onMouseUp,!1),this._domElement.addEventListener("touchmove",this._$onTouchMove,!1),this._domElement.addEventListener("touchstart",this._$onTouchStart,!1),this._domElement.addEventListener("touchend",this._$onTouchEnd,!1),this._domElement.addEventListener("contextmenu",this._$onContextmenu,!1)}$e.prototype.destroy=function(){this._domElement.removeEventListener("click",this._$onClick,!1),this._domElement.removeEventListener("dblclick",this._$onDblClick,!1),this._domElement.removeEventListener("mousemove",this._$onMouseMove,!1),this._domElement.removeEventListener("mousedown",this._$onMouseDown,!1),this._domElement.removeEventListener("mouseup",this._$onMouseUp,!1),this._domElement.removeEventListener("touchmove",this._$onTouchMove,!1),this._domElement.removeEventListener("touchstart",this._$onTouchStart,!1),this._domElement.removeEventListener("touchend",this._$onTouchEnd,!1),this._domElement.removeEventListener("contextmenu",this._$onContextmenu,!1)};$e.eventNames=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu","touchstart","touchend"];$e.prototype._getRelativeMouseXY=function(n){var t=n.target||n.srcElement;t.nodeType===3&&(t=t.parentNode);var e={x:0,y:0},i=t,s=getComputedStyle(i,null);e.y+=parseInt(s.getPropertyValue("padding-top"),10),e.x+=parseInt(s.getPropertyValue("padding-left"),10);do e.x+=i.offsetLeft,e.y+=i.offsetTop,s=getComputedStyle(i,null),e.x+=parseInt(s.getPropertyValue("border-left-width"),10),e.y+=parseInt(s.getPropertyValue("border-top-width"),10);while(i=i.offsetParent);var o={width:t===window?window.innerWidth:t.offsetWidth,height:t===window?window.innerHeight:t.offsetHeight};return{x:Number((n.pageX-e.x)/o.width)*2-1,y:-((n.pageY-e.y)/o.height)*2+1}};$e.prototype._objectCtxInit=function(n){n._3xDomEvent={}};$e.prototype._objectCtxDeinit=function(n){delete n._3xDomEvent};$e.prototype._objectCtxIsInit=function(n){return!!n._3xDomEvent};$e.prototype._objectCtxGet=function(n){return n._3xDomEvent};$e.prototype.camera=function(n){return n&&(this._camera=n),this._camera};$e.prototype.bind=function(n,t,e,i){console.assert($e.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(n)||this._objectCtxInit(n);var s=this._objectCtxGet(n);s[t+"Handlers"]||(s[t+"Handlers"]=[]),s[t+"Handlers"].push({callback:e,useCapture:i}),this._boundObjs[t]===void 0&&(this._boundObjs[t]=[]),this._boundObjs[t].push(n)};$e.prototype.addEventListener=$e.prototype.bind;$e.prototype.unbind=function(n,t,e,i){console.assert($e.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(n)||this._objectCtxInit(n);var s=this._objectCtxGet(n);s[t+"Handlers"]||(s[t+"Handlers"]=[]);for(var o=s[t+"Handlers"],r=0;r<o.length;r++){var a=o[r];if(e==a.callback&&i==a.useCapture){o.splice(r,1);break}}var l=this._boundObjs[t].indexOf(n);this._boundObjs[t].splice(l,1)};$e.prototype.removeEventListener=$e.prototype.unbind;$e.prototype._bound=function(n,t){var e=this._objectCtxGet(t);return e?!!e[n+"Handlers"]:!1};$e.prototype._isObjectVisible=function(n){for(var t=n;t;){if(t.visible===!1)return!1;t=t.parent}return!0};$e.prototype._filterVisibleObjects=function(n){var t=this;return n.filter(function(e){return t._isObjectVisible(e)})};$e.prototype._onMove=function(n,t,e,i){var s=this._boundObjs[n];if(!(s===void 0||s.length===0)){var o=this._filterVisibleObjects(s);if(o.length!==0){var r=new b.Vector2;r.set(t,e),this._raycaster.setFromCamera(r,this._camera);var a=this._raycaster.intersectObjects(o),l=this;a=a.filter(function(g){return l._isObjectVisible(g.object)}),a.sort(function(g,v){var y=g.object.renderOrder||0,w=v.object.renderOrder||0;return y!==w?w-y:g.distance-v.distance});var c=this._selected;if(a.length>0){var h,u,d,p=a[0],m=p.object;this._selected=m,d=this._bound("mousemove",m),c!=m&&(h=this._bound("mouseover",m),u=c&&this._bound("mouseout",c))}else u=c&&this._bound("mouseout",c),this._selected=null;d&&this._notify("mousemove",m,i,p),h&&this._notify("mouseover",m,i,p),u&&this._notify("mouseout",c,i,p)}}};$e.prototype._onEvent=function(n,t,e,i){var s=this._boundObjs[n];if(!(s===void 0||s.length===0)){var o=this._filterVisibleObjects(s);if(o.length!==0){var r=new b.Vector2;r.set(t,e),this._raycaster.setFromCamera(r,this._camera);var a=this._raycaster.intersectObjects(o,!0),l=this;if(a=a.filter(function(p){return l._isObjectVisible(p.object)}),a.sort(function(p,m){var g=p.object.renderOrder||0,v=m.object.renderOrder||0;return g!==v?v-g:p.distance-m.distance}),a.length!==0){for(var c=a[0],h=c.object,u=this._objectCtxGet(h),d=h.parent;typeof u=="undefined"&&d;)u=this._objectCtxGet(d),d=d.parent;u&&this._notify(n,h,i,c)}}}};$e.prototype._notify=function(n,t,e,i){var s=this._objectCtxGet(t),o=s?s[n+"Handlers"]:null;if(!s||!o||o.length===0){t.parent&&this._notify(n,t.parent,e,i);return}for(var o=s[n+"Handlers"],r=0;r<o.length;r++){var a=o[r],l=!0;a.callback({type:n,target:t,origDomEvent:e,intersect:i,stopPropagation:function(){l=!1}}),l&&a.useCapture===!1&&t.parent&&this._notify(n,t.parent,e,i)}};$e.prototype._onMouseDown=function(n){return this._onMouseEvent("mousedown",n)};$e.prototype._onMouseUp=function(n){return this._onMouseEvent("mouseup",n)};$e.prototype._onMouseEvent=function(n,t){var e=this._getRelativeMouseXY(t);this._onEvent(n,e.x,e.y,t)};$e.prototype._onMouseMove=function(n){var t=this._getRelativeMouseXY(n);this._onMove("mousemove",t.x,t.y,n),this._onMove("mouseover",t.x,t.y,n),this._onMove("mouseout",t.x,t.y,n)};$e.prototype._onClick=function(n){this._onMouseEvent("click",n)};$e.prototype._onDblClick=function(n){this._onMouseEvent("dblclick",n)};$e.prototype._onContextmenu=function(n){this._onMouseEvent("contextmenu",n)};$e.prototype._onTouchStart=function(n){return this._onTouchEvent("touchstart",n)};$e.prototype._onTouchEnd=function(n){return this._onTouchEvent("touchend",n)};$e.prototype._onTouchMove=function(n){if(n.touches.length==1){var t=Number(n.touches[0].pageX/window.innerWidth)*2-1,e=-(n.touches[0].pageY/window.innerHeight)*2+1;this._onMove("mousemove",t,e,n),this._onMove("mouseover",t,e,n),this._onMove("mouseout",t,e,n)}};$e.prototype._onTouchEvent=function(n,t){var e=t.touches;if(e.length==0&&(e=t.changedTouches),e.length==1){var i=Number(e[0].pageX/window.innerWidth)*2-1,s=-(e[0].pageY/window.innerHeight)*2+1;this._onEvent(n,i,s,t)}};const Eh="Object3DHelperPlugin",ec=Eh,DT=()=>{console.error(`${ec} is disposed`)},LT=()=>{console.warn(`${ec} is disabled`)},zT=()=>{console.error(`${ec} is disabled`)};class cd extends ys{constructor(e){super(e);f(this,"name",Eh);f(this,"state",{visible:!0,enabled:!0,disposed:!1});f(this,"objectHelperMap",new Map);f(this,"css3DObjectParentMap",new Map);f(this,"css3DObjectModeMap",new Map);f(this,"css3DRender");this.five=e,this.css3DRender=new _o(this.five.scene),console.warn("Object3DHelper: 使用此插件,需要在初始化five时,设置five参数: { backgroundAlpha: 0, backgroundColor: 0x000000 }"),Object.assign(window,{[`__${Eh.toUpperCase()}_DEBUG__`]:this})}show(e){return $(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return $(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,i){if(this.state.disposed)return DT();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return zT();const s=V({},this.state);this.state=V(V({},this.state),e),e.disposed!==void 0&&e.disposed!==s.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==s.visible&&this.handleVisible(e.visible),e.enabled!==void 0&&e.enabled!==s.enabled&&this.handleEnable(e.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:s})}getObject3DHelper(e){return this.objectHelperMap.get(e)}addObject3DHelper(e,i={}){var C;if(!e){console.error("Object3D is undefined");return}if(this.objectHelperMap.has(e)){console.warn(`Object3DHelperPlugin: object3D ${e.name} is already has helper`);return}const s=new PT,o=[],r=(C=this.five.getElement())==null?void 0:C.parentElement,a=this.five.camera,c=V(V({},{moveHelper:!0,rotateHelper:!0,scaleHelper:!0,boundingBoxHelper:!1,positionFrom:"objectPosition"}),i),{moveHelper:h,rotateHelper:u,scaleHelper:d,boundingBoxHelper:p}=c,m=s.hooks,g=new St,v=new $e(this.five.camera,this.five.getElement()),y=E=>{if(E)return typeof E=="boolean"?E:E.enable},w={};if(y(h)){const E=V(V({},this.getConfig(c.moveHelper)),c),D=new oT(e,V({},E)),L=new Pr(this.five,v,gT,e,D,E,m,g);w.moveController=L.helperController,o.push(()=>L.dispose())}if(y(u)){const E=V(V({},this.getConfig(c.rotateHelper)),c),D=new lT(e,V({container:r},E)),L=new Pr(this.five,v,CT,e,D,E,m,g);w.rotateController=L.helperController,o.push(()=>L.dispose())}if(y(p)){const E=new pT(e),D=new Pr(this.five,v,ET,e,E,void 0,m,g);w.boundingBoxController=D.helperController,o.push(()=>D.dispose())}if(y(d))if(e.isCSS3DObject&&r){const E=new fT(e,r,a,this.five.scene),D=new Pr(this.five,v,IT,e,E,void 0,m,g);w.scaleController=D.helperController,o.push(()=>D.dispose()),xi(this.five).then(()=>{var L,R;if(e.isCSS3DObjectPlus){const z=e;if(!z||z.mode!=="front")return;const O=(L=this.css3DRender.behindModeCSS3DRenderer.wrapper)!=null?L:Wh(this.five);O&&(this.css3DObjectParentMap.set(z,z.parent),z.removeFromParent(),this.css3DRender.behindModeCSS3DRenderer.setWrapper(O),(R=this.css3DRender.getBehindCSS3DObjectGroup())==null||R.add(z),this.css3DRender.render(this.five.camera))}else e.isCSS3DObject&&(this.css3DObjectModeMap.set(e,e.mode),e.mode="behind")})}else{const E=V(V({},this.getConfig(c.scaleHelper)),c),D=new kT(e,E),L=new Pr(this.five,v,TT,e,D,E,m,g);w.scaleController=L.helperController,o.push(()=>L.dispose())}return Object.values(w).forEach(E=>{E&&typeof E.updateOtherControllers=="function"&&E.updateOtherControllers(w)}),s.addControllers(w),this.objectHelperMap.set(e,{helper:s,disposers:o}),s.controllers}removeObject3DHelper(e){if(!this.objectHelperMap.has(e))return;const{helper:i,disposers:s}=this.objectHelperMap.get(e);if(i){if(e.isCSS3DObjectPlus){const o=e,r=this.css3DObjectParentMap.get(o);r&&r.add(o),this.css3DRender.render(this.five.camera)}else if(e.isCSS3DObject){const o=this.css3DObjectModeMap.get(e);e.mode=o}this.objectHelperMap.delete(e),i.dispose(),s==null||s.forEach(o=>o==null?void 0:o())}}handleEnable(e,i=!0){e?(this.everyHelperDo(s=>s.enable()),this.hooks.emit("enable",{userAction:i})):(this.everyHelperDo(s=>s.disable()),this.hooks.emit("disable",{userAction:i})),this.state.enabled=e}handleVisible(e,i=!0){e?(this.everyHelperDo(s=>s.show()),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:i}))):(this.everyHelperDo(s=>s.hide()),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:i}))),this.state.visible=e}handleDispose(){this.everyHelperDo((e,i)=>{e.dispose(),i==null||i.forEach(s=>s==null?void 0:s())})}everyHelperDo(e){this.objectHelperMap.forEach(({helper:i,disposers:s})=>{i&&e(i,s)})}actionIfStateIsEnabled(e,i){if(this.state.enabled)return e();i!=null&&i.warnLog&<()}getConfig(e){if(e&&typeof e!="boolean"&&e.enable)return e}}const OT=n=>new cd(n);class jT{constructor(){f(this,"five");f(this,"config");f(this,"_cursor");f(this,"_pointSelector");f(this,"_fiveDomEvents");f(this,"_object3DHelper");f(this,"inited",!1);f(this,"init",(t,e)=>{this.inited=!0,this.five=t,this.config=e,this._cursor=void 0,this._pointSelector=void 0,this._fiveDomEvents=void 0,this._object3DHelper=void 0})}get cursor(){if(!this.inited)throw new Error("Global not inited");return this._cursor?this._cursor:(this._cursor=new H1(this.five.getElement()),this._cursor)}get pointSelector(){var i,s,o;if(!this.inited)throw new Error("Global not inited");if(this._pointSelector)return this._pointSelector;const t=(i=this.config)==null?void 0:i.magnifier;let e=t===null||t===!1?{magnifier:null}:{magnifierParams:t};return(s=this.config)!=null&&s.hideCursorCircle&&(e=de(V({},e),{pointHelper:null})),this._pointSelector=new Ll(this.five,{mode:"cursor",helper:e,hitFilter:(o=this.config)==null?void 0:o.hitFilter}),this._pointSelector}get fiveDomEvents(){if(!this.inited)throw new Error("Global not inited");return this._fiveDomEvents?this._fiveDomEvents:(this._fiveDomEvents=new Vo(this.five,{noEmitWhenNotInScene:!0}),this._fiveDomEvents)}get object3DHelper(){if(!this.inited)throw new Error("Global not inited");return this._object3DHelper?this._object3DHelper:(this._object3DHelper=new cd(this.five),this._object3DHelper)}}const kn=new jT;window.globalModules=kn;function Ey(n,t){return n?t(n)?n:n.parent?Ey(n.parent,t):null:null}function RT(n){const t=[...n];if(n.length<3)return n;const e=n[n.length-1],i=n[0];return e.equals(i)||t.push(i),t}class ky extends bi{constructor(e){super();f(this,"name","PolylineBaseMesh");f(this,"lines",[]);f(this,"withDots");f(this,"paramsStyle");const r=e,{withDots:i,points:s}=r,o=Kn(r,["withDots","points"]);this.withDots=i!=null?i:!0,s&&this.setPoints(s),o&&this.setStyle(o)}get style(){var e;return{lineColor:this.lineColor,lineWidth:this.lineWidth,opacity:this.opacity,dashed:this.dashed,occlusionVisibility:this.occlusionVisibility,occlusionMode:this.occlusionMode,lengthEnable:(e=this.paramsStyle)==null?void 0:e.lengthEnable}}get opacity(){var e,i,s;return(s=(e=this.lines[0])==null?void 0:e.lineOpacity)!=null?s:(i=this.paramsStyle)==null?void 0:i.lineOpacity}get lineColor(){var e,i,s;return(s=(e=this.lines[0])==null?void 0:e.color)!=null?s:(i=this.paramsStyle)!=null&&i.lineColor?new b.Color(this.paramsStyle.lineColor):void 0}get lineWidth(){var e,i,s;return(s=(e=this.lines[0])==null?void 0:e.lineWidth)!=null?s:(i=this.paramsStyle)==null?void 0:i.lineWidth}get dashed(){var e,i,s;return(s=(e=this.lines[0])==null?void 0:e.dashed)!=null?s:(i=this.paramsStyle)==null?void 0:i.dashed}get occlusionVisibility(){var e,i,s;return(s=(e=this.lines[0])==null?void 0:e.occlusionVisibility)!=null?s:(i=this.paramsStyle)==null?void 0:i.occlusionVisibility}get occlusionMode(){var e,i,s;return(s=(e=this.lines[0])==null?void 0:e.occlusionMode)!=null?s:(i=this.paramsStyle)==null?void 0:i.occlusionMode}get points(){var e,i,s;return this.lines.map(o=>o.points[0]).concat((s=(i=this.lines)==null?void 0:i[((e=this.lines)==null?void 0:e.length)-1])==null?void 0:s.points[1]).filter(Boolean)}setPoints(e,i={closed:!1}){let s=e.map(Ve);i.closed&&(s=RT(s)),s.forEach((o,r)=>{var c;const a=s[r+1];if(r!==0&&a===void 0)return;const l=(c=this.lines[r])!=null?c:(()=>{const h=new Yr(de(V({},this.style),{pointVisibility:this.withDots?{startPoint:r===0,endPoint:!0}:!1}));return this.lines[r]=h,this.add(h),h})();l.setStyle(this.style),l.setPoints([o,a])}),s.length===0?(this.lines.forEach(o=>o.removeFromParent()),this.lines=[]):s.length===1||this.lines.length>s.length-1&&this.lines.splice(s.length-1).forEach(o=>o.removeFromParent())}setStyle(e){this.paramsStyle=V(V({},this.paramsStyle),e),this.lines.forEach(i=>i.setStyle(this.paramsStyle))}highlight(){this.lines.forEach(e=>e.highlight())}unhighlight(){this.lines.forEach(e=>e.unhighlight())}}class Ks extends ky{constructor(...e){super(de(V({},e[0]),{withDots:!1}));f(this,"name","PolylineMesh")}}class ls extends ky{constructor(...e){super(de(V({},e[0]),{withDots:!0}));f(this,"name","PolylineWithDotsMesh")}}const Nc=new Map;class Yi extends bi{constructor(e,i){var s,o;super();f(this,"name","Sculpt");f(this,"isSculptObject",!0);f(this,"draggable");f(this,"selected");f(this,"config");f(this,"on",(e,i,s)=>kn.fiveDomEvents.addEventListener(this,e,i,s));f(this,"off",(...e)=>kn.fiveDomEvents.removeEventListener(this,...e));f(this,"applyObjectMatrixWorld",(e,i)=>{const s=i!=null?i:this;return s.updateMatrixWorld(),Vr(s,e)});f(this,"applyObjectReversalMatrixWorld",(e,i)=>{const s=i!=null?i:this;return s.updateMatrixWorld(),Gb(s,e)});e!=null&&e.id&&(this.uuid=e.id),this.config=V({defaultAction:!0,occlusionVisibility:!0,occlusionMode:"translucence"},i),e&&(Ge((s=this.config)==null?void 0:s.occlusionMode)&&(e.style=de(V({},e.style),{occlusionMode:this.config.occlusionMode})),Ge((o=this.config)==null?void 0:o.occlusionVisibility)&&(e.style=de(V({},e.style),{occlusionVisibility:this.config.occlusionVisibility}))),gt("esc",()=>{this.stopCreating()}),this.config.defaultAction&&(gt("backspace, delete",()=>{this.selected&&this.delete()}),this.on("click",()=>{var r;this.editing||(this.select({only:!0}),this.editor.enable(),(r=this.parent)==null||r.children.forEach(a=>{var l;a instanceof Yi&&a!==this&&((l=a._editor)==null||l.disable())}))}),gt("esc",()=>{this.selected&&this.unselect()}))}get editing(){return this.pointSelector.enabled}get baseData(){return{id:this.uuid,type:this.type}}get pointSelector(){return kn.pointSelector}undo(){throw new Error("Method not implemented.")}redo(){throw new Error("Method not implemented.")}canUndo(){throw new Error("Method not implemented.")}canRedo(){throw new Error("Method not implemented.")}stopCreating(){kn.pointSelector.disable()}delete(){var e;this.stopCreating(),this.removeFromParent(),this.off(),(e=this.editor)==null||e.disable()}select(e={only:!1}){if(this.selected)return;this.selected=!0,this.highlight(),Nc.has(this.parent.uuid)||Nc.set(this.parent.uuid,[]);const i=Nc.get(this.parent.uuid);i.push(this),e.only&&(i==null||i.forEach(s=>{s!==this&&s.unselect()}))}unselect(){var e;this.selected&&(this.selected=!1,this.unhighlight(),(e=this._editor)==null||e.disable())}highlight(){}unhighlight(){}showDeleteButton(e,i){kn.cursor.showDeleteButton({clientX:e,clientY:i,container:document.body,onClick:()=>this.delete()}),kn.five.once("cameraUpdate",()=>{kn.cursor.removeDeleteButton()})}}class tc extends bi{constructor(e){super();f(this,"hooks",new St);f(this,"originObject");this.originObject=e}enable(){this.originObject.add(this)}disable(){this.originObject.remove(this)}}class da extends tc{constructor(e,i){super(e);f(this,"objectHelperConfig");f(this,"currentOperation",null);f(this,"onMoveStart",e=>{this.currentOperation={type:"move",start_timestamp:Date.now(),axis:e}});f(this,"onRotateStart",e=>{this.currentOperation={type:"rotate",start_timestamp:Date.now(),axis:e}});f(this,"onScaleStart",e=>{this.currentOperation={type:"scale",start_timestamp:Date.now(),axis:e}});f(this,"onMove",()=>{this.currentOperation&&(this.currentOperation=de(V({},this.currentOperation),{status:"moving"}),this.onObjectUpdate(!1))});f(this,"onRotate",()=>{this.currentOperation&&(this.currentOperation=de(V({},this.currentOperation),{status:"rotating"}),this.onObjectUpdate(!1))});f(this,"onScale",()=>{this.currentOperation&&(this.currentOperation=de(V({},this.currentOperation),{status:"scaling"}),this.onObjectUpdate(!1))});f(this,"onMoveEnd",()=>{this.onObjectUpdate(!0)});f(this,"onRotateEnd",()=>{this.onObjectUpdate(!0)});f(this,"onScaleEnd",()=>{this.onObjectUpdate(!0)});f(this,"onObjectUpdate",(e=!0)=>{if(!this.currentOperation){this.hooks.emit("objectUpdate");return}const i=de(V({},this.currentOperation),{end_timestamp:e?Date.now():void 0,is_handle_end:e});this.hooks.emit("objectUpdate",i),e&&(this.currentOperation=null)});this.objectHelperConfig=i}get helper(){var e;return(e=st.modules.object3DHelper.getObject3DHelper(this.originObject))==null?void 0:e.helper}enable(){super.enable();const e=typeof this.objectHelperConfig=="function"?this.objectHelperConfig():this.objectHelperConfig;st.modules.object3DHelper.addObject3DHelper(this.originObject,V({positionFrom:"boundingBox"},e));const i=st.modules.object3DHelper.getObject3DHelper(this.originObject).helper;i.hooks.on("moveStart",this.onMoveStart),i.hooks.on("rotateStart",this.onRotateStart),i.hooks.on("scaleStart",this.onScaleStart),i.hooks.on("move",this.onMove),i.hooks.on("rotate",this.onRotate),i.hooks.on("scale",this.onScale),i.hooks.on("moveEnd",this.onMoveEnd),i.hooks.on("rotateEnd",this.onRotateEnd),i.hooks.on("scaleEnd",this.onScaleEnd)}disable(){var e,i,s,o,r,a,l,c,h;super.disable(),(e=this.helper)==null||e.hooks.off("moveStart",this.onMoveStart),(i=this.helper)==null||i.hooks.off("rotateStart",this.onRotateStart),(s=this.helper)==null||s.hooks.off("scaleStart",this.onScaleStart),(o=this.helper)==null||o.hooks.off("move",this.onMove),(r=this.helper)==null||r.hooks.off("rotate",this.onRotate),(a=this.helper)==null||a.hooks.off("scale",this.onScale),(l=this.helper)==null||l.hooks.off("moveEnd",this.onMoveEnd),(c=this.helper)==null||c.hooks.off("rotateEnd",this.onRotateEnd),(h=this.helper)==null||h.hooks.off("scaleEnd",this.onScaleEnd),st.modules.object3DHelper.removeObject3DHelper(this.originObject)}initialHelperMatrix(){var e;(e=this.helper)==null||e.initialHelperMatrix()}}class hd extends tc{constructor(e){super(e);f(this,"draggingPoints",[]);f(this,"onDragstart",e=>{const i=e.target;this.draggingPoints=this.pointMeshes.filter(s=>s.position.equals(i.position))});f(this,"onDragend",e=>{this.draggingPoints=[]})}get pointMeshes(){return this.children.filter(e=>e instanceof dn)}get pointHandles(){return this.children}enable(){super.enable(),this.points.filter(Ge).forEach(e=>{const i=new dn;i.visible=!1,i.position.copy(e),i.draggable=!0,st.modules.fiveDomEvents.addEventListener(i,"drag",this.onDrag),st.modules.fiveDomEvents.addEventListener(i,"dragstart",this.onDragstart),st.modules.fiveDomEvents.addEventListener(i,"dragend",this.onDragend),this.add(i)})}disable(){super.disable(),this.removeChildren()}}class _T extends hd{constructor(e){super(e);f(this,"onDrag",e=>{if(!this.draggingPoints||this.draggingPoints.length===0)return;const i=sa(st.modules.five,e.raycaster);this.draggingPoints.forEach(s=>s.position.copy(i.point)),this.originObject.lineMesh.setPoints(this.pointMeshes.map(s=>s.position))})}get points(){return this.originObject.lineMesh.points}}class VT extends hd{constructor(e){super(e);f(this,"onDrag",e=>{if(!this.draggingPoints||this.draggingPoints.length===0)return;const i=sa(st.modules.five,e.raycaster);this.draggingPoints.forEach(s=>s.position.copy(i.point)),this.originObject.polyLineMesh.setPoints(this.pointMeshes.map(s=>s.position))})}get points(){return this.originObject.polyLineMesh.points}}function ri(n){return Array.isArray(n)?n.map(t=>[t.x,t.y,t.z]):[n.x,n.y,n.z]}class Dg extends Yi{constructor(e,i){super(e,i);f(this,"type","Polyline");f(this,"polyLineMesh");f(this,"_editor");f(this,"creatingObject");e&&(this.polyLineMesh=new ls(V(V({},e.style),e)),this.add(this.polyLineMesh))}get editor(){return this._editor||(this._editor=new VT(this)),this._editor}get data(){return de(V({},this.baseData),{points:ri(this.applyObjectMatrixWorld(this.polyLineMesh.points)),style:{lineColor:new b.Color(this.polyLineMesh.lineColor).getHex(),lineWidth:this.polyLineMesh.lineWidth,dashed:this.polyLineMesh.dashed}})}setData(e){e.points&&this.polyLineMesh.setPoints(this.applyObjectReversalMatrixWorld(e.points.map(Ve))),this.polyLineMesh.setStyle(e.style)}highlight(){var e;(e=this.polyLineMesh)==null||e.highlight()}unhighlight(){var e;(e=this.polyLineMesh)==null||e.unhighlight()}canUndo(){var e;(e=this.creatingObject)==null||e.canUndo()}canRedo(){var e;(e=this.creatingObject)==null||e.canRedo()}undo(){var e;(e=this.creatingObject)==null||e.undo()}redo(){var e;(e=this.creatingObject)==null||e.redo()}create(e){return $(this,null,function*(){this.removeChildren();const i=new ls(e);this.polyLineMesh=i,this.add(this.polyLineMesh),this.creatingObject=xy(i,this.pointSelector,e),yield this.creatingObject.finished,this.config.defaultAction&&this.editor.enable()})}}function xy(n,t,e){var D;const i=n.parent;if(!i)return;const{promise:s,resolve:o,reject:r}=eo(),a=(D=e==null?void 0:e.limit)!=null?D:"none",l=new Ks(n.style);i.add(l);const c=new Ks(de(V({},n.style),{dashed:!0,lengthEnable:!1}));i.add(c),t.enable();const h=[];let u,d,p;const m=[],g=()=>h.length>0,v=()=>m.length>0,y=()=>{g()&&(m.push(h.pop()),n.setPoints(h),E(p),t.pointSelectorHelper.magnifier.render())},w=()=>{v()&&(h.push(m.pop()),n.setPoints(h),E(p),t.pointSelectorHelper.magnifier.render())},C=L=>{m.length=0;const R=h.length===0?L.point:u.clone();h.push(R),n.setPoints(h)},E=L=>{const R=()=>{l.setPoints([]),c.setPoints([]),u=null};if(!L||(p=L,!(h!=null&&h.length)))return R();const z=h.at(-1).clone();a==="none"?(u=L.point,l.setPoints([z,u])):a==="xoz"?(d=d!=null?d:new b.Plane().setFromNormalAndCoplanarPoint(new b.Vector3(0,1,0),h[0]),t.plane=d,u=d.projectPoint(L.point,new b.Vector3),l.setPoints([z,u]),c.setPoints([u,L.point])):a==="y"&&(h.length===1?(u=L.point,l.setPoints([z,u])):(d=d!=null?d:new b.Plane().setFromCoplanarPoints(h[0],h[1],new b.Vector3(0,1,0).add(h[0])),t.plane=d,u=d.projectPoint(L.point,new b.Vector3),l.setPoints([z,u]),c.setPoints([u,L.point])))};return t.on("select",C),t.on("intersectionUpdate",E),t.on("disable",()=>{if(t.off("select",C),t.off("intersectionUpdate",E),t.plane=null,i.remove(l),i.remove(c),h.length<2)return i.remove(n),r(new Error("Cancelled"));o()}),{finished:s,canUndo:g,canRedo:v,undo:y,redo:w}}class FT extends tc{constructor(e){super(e);f(this,"onDrag",e=>{var s;const i=sa(st.modules.five,e.raycaster);(s=this.originObject.pointMesh)==null||s.position.copy(i.point)})}enable(){super.enable(),this.originObject.draggable=!0,this.originObject.on("drag",this.onDrag)}disable(){super.disable(),this.originObject.draggable=!1,this.originObject.off("drag",this.onDrag)}}class Lg extends Yi{constructor(e,i){super(e,i);f(this,"type","Point");f(this,"pointMesh");f(this,"_editor");e&&(this.pointMesh=new dn(V(V({},e.style),e)),this.add(this.pointMesh))}get editor(){return this._editor||(this._editor=new FT(this)),this._editor}get data(){return de(V({},this.baseData),{point:ri(this.applyObjectMatrixWorld(this.pointMesh.position)),style:{color:this.pointMesh.color.getHex(),size:this.pointMesh.size}})}setData(e){e.point&&this.pointMesh.position.copy(Ve(e.point)),this.pointMesh.setStyle(e.style)}highlight(){var e;(e=this.pointMesh)==null||e.highlight()}unhighlight(){var e;(e=this.pointMesh)==null||e.unhighlight()}setStyle(e){this.pointMesh.setStyle(e)}create(e){return $(this,null,function*(){this.pointMesh&&this.remove(this.pointMesh),this.add(this.pointMesh=new dn(e)),yield ud(this.pointMesh,this.pointSelector),this.config.defaultAction&&this.editor.enable()})}}function ud(n,t){return new Promise((e,i)=>{t.enable(),n.visible=!1;const s=l=>{l&&(n.visible=!0,n.position.copy(l.point))},o=l=>{l&&(n.visible=!0,n.position.copy(l.point),r())},r=()=>{t.off("select",o),t.off("disable",a),t.off("intersectionUpdate",s),t.disable(),e()},a=()=>{t.off("select",o),t.off("disable",a),t.off("intersectionUpdate",s),n.removeFromParent(),i(new Error("Cancelled"))};t.on("intersectionUpdate",s),t.on("disable",a),t.once("select",o)})}class kh extends Ko{constructor(e){const o=e!=null?e:{},{points:i}=o,s=Kn(o,["points"]);super();f(this,"name","PolygonWithEdgeMesh");f(this,"line",new Ks);i&&this.setPoints(i),s&&this.setStyle(s)}get style(){return de(V({},super.style),{lineWidth:this.lineWidth,lineColor:this.lineColor})}get lineWidth(){return this.line.lineWidth}get lineColor(){return this.line.lineColor}raycast(e,i){return this.children.forEach(s=>{Nh(s,e,i,!0)}),!1}setPoints(e,i){super.setPoints(e,V({closed:!0},i)),this.points&&(this.line.setPoints(this.points,V({closed:!0},i)),this.addIfNotExists(this.line))}setStyle(e){super.setStyle(e),e.lineOpacity!==void 0?this.line.setStyle(de(V({},e),{lineOpacity:e.lineOpacity})):this.line.setStyle(e),this.needsRender=!0}highlight(){super.highlight(),this.line.highlight()}unhighlight(){super.unhighlight(),this.line.unhighlight()}}class xh extends kh{constructor(){super(...arguments);f(this,"name","AreaMesh")}}class BT extends hd{constructor(e){super(e);f(this,"onDragstart",e=>{const i=e.target;this.draggingPoints=this.pointMeshes.filter(s=>s.position.equals(i.position))});f(this,"onDrag",e=>{var r,a;if(!this.draggingPoints||this.draggingPoints.length===0)return;const i=sa(st.modules.five,e.raycaster);if(!i)return;const s=this.originObject.areaMesh.projectPoint(i.point);this.draggingPoints.forEach(l=>l.position.copy(s)),this.originObject.areaMesh.setPoints(this.pointMeshes.map(l=>l.position)),this.hooks.emit("objectUpdate"),st.modules.five&&(st.modules.five.needsRender=!0);const o=(a=(r=this.originObject.areaMesh)==null?void 0:r.userData)==null?void 0:a.syncCreationPointMeshes;typeof o=="function"&&o()});f(this,"onDragend",e=>{this.draggingPoints=[],this.originObject.recordHistory(),this.hooks.emit("objectUpdate")})}get points(){return this.originObject.areaMesh.points}enable(){super.enable(),this.updatePointMeshes()}disable(){this.pointMeshes.forEach(e=>this.disposePointMesh(e)),super.disable()}updatePointMeshes(){var c,h,u,d,p,m,g,v,y,w,C,E;const e=this.originObject.areaMesh.points,i=(u=(h=(c=this.originObject.areaMesh)==null?void 0:c.userData)==null?void 0:h.dragSelectPixelDistance)!=null?u:10,s=this.originObject.areaMesh,o=(p=(d=s.lineColor)==null?void 0:d.getHex)==null?void 0:p.call(d),r=(g=(m=s.color)==null?void 0:m.getHex)==null?void 0:g.call(m),a=(v=o!=null?o:r)!=null?v:16777215,l=(E=(C=(w=(y=s.line)==null?void 0:y.style)==null?void 0:w.opacity)!=null?C:s.opacity)!=null?E:1;this.syncPointMeshCount(e,{dragSelectPixelDistance:i,pointColor:a,pointOpacity:l}),this.pointMeshes.forEach((D,L)=>{const R=e[L];R&&(D.position.copy(R),D.visible=!0)})}syncPointMeshCount(e,i){const s=[...this.pointMeshes],{dragSelectPixelDistance:o,pointColor:r,pointOpacity:a}=i;for(s.length>e.length&&s.slice(e.length).forEach(l=>this.disposePointMesh(l));this.pointMeshes.length<e.length;){const l=this.createPointMesh({dragSelectPixelDistance:o,pointColor:r,pointOpacity:a});this.add(l)}this.pointMeshes.forEach(l=>{var c;l.userData=(c=l.userData)!=null?c:{},l.userData.dragSelectPixelDistance=o,l.setStyle({color:r,opacity:a})})}createPointMesh(e){var a;const{dragSelectPixelDistance:i,pointColor:s,pointOpacity:o}=e,r=new dn;return r.visible=!0,r.userData=(a=r.userData)!=null?a:{},r.userData.dragSelectPixelDistance=i,r.draggable=!0,r.setStyle({color:s,opacity:o}),st.modules.fiveDomEvents.addEventListener(r,"drag",this.onDrag),st.modules.fiveDomEvents.addEventListener(r,"dragstart",this.onDragstart),st.modules.fiveDomEvents.addEventListener(r,"dragend",this.onDragend),r}disposePointMesh(e){st.modules.fiveDomEvents.removeEventListener(e),this.remove(e)}}function HT(n,t){const e=Array.isArray(t)?t:[t];for(let i=0;i<e.length;i++){const s=n.start,o=n.end,r=e[i].start,a=e[i].end;if(!(Cr(s,r)||Cr(s,a)||Cr(o,r)||Cr(o,a)||Cr(s,o))&>([s.x,s.y,s.z],[o.x,o.y,o.z],[r.x,r.y,r.z],[a.x,a.y,a.z]))return!0}return!1}function NT(n){if(n.length<2)return!1;for(let t=0;t<n.length;t++)if(HT(n[t],n.slice(t+1)))return!0;return!1}function zg(n){const t=[];for(let e=1;e<n.length;e++){const i={start:n[e-1],end:n[e]};t.push(i)}return NT(t)}function GT(n,t,e,i){const s=[t[0]-n[0],t[1]-n[1],t[2]-n[2]],o=[i[0]-e[0],i[1]-e[1],i[2]-e[2]],r=[{a:[s[0],-o[0]],b:e[0]-n[0]},{a:[s[1],-o[1]],b:e[1]-n[1]},{a:[s[2],-o[2]],b:e[2]-n[2]}],a=[[0,1],[0,2],[1,2]];for(const[l,c]of a){const h=[r[l].a,r[c].a],u=[r[l].b,r[c].b],d=WT(h);if(Math.abs(d)<1e-10)continue;const p=UT(h,d),[m,g]=QT(p,u);return!!(Og(m)&&Og(g))}return!1}function WT(n){return n[0][0]*n[1][1]-n[0][1]*n[1][0]}function UT(n,t){return[[n[1][1]/t,-n[0][1]/t],[-n[1][0]/t,n[0][0]/t]]}function QT(n,t){return[n[0][0]*t[0]+n[0][1]*t[1],n[1][0]*t[0]+n[1][1]*t[1]]}function Og(n){return n>=0&&n<=1}function Cr(n,t){return n.x===t.x&&n.y===t.y&&n.z===t.z}class Sh extends Yi{constructor(e,i){var s;super(e,i);f(this,"type","Polygon");f(this,"areaMesh");f(this,"historyStack",[]);f(this,"currentHistoryIndex",-1);f(this,"maxHistorySize",50);f(this,"_editor");f(this,"creatingObject");e&&(this.areaMesh=new xh(V(V({},e.style),e)),this.areaMesh.userData=(s=this.areaMesh.userData)!=null?s:{},typeof this.areaMesh.userData.dragSelectPixelDistance!="number"&&(this.areaMesh.userData.dragSelectPixelDistance=10),this.add(this.areaMesh))}get editor(){return this._editor||(this._editor=new BT(this)),this._editor}updateCreationPointMeshes(){var i,s;const e=(s=(i=this.areaMesh)==null?void 0:i.userData)==null?void 0:s.syncCreationPointMeshes;typeof e=="function"&&e(),this._editor&&this._editor.updatePointMeshes()}get data(){return this.updateMatrixWorld(),de(V({},this.baseData),{points:ri(this.applyObjectMatrixWorld(this.areaMesh.points)),style:{color:this.areaMesh.color.getHex(),lineColor:this.areaMesh.lineColor.getHex(),lineWidth:this.areaMesh.lineWidth}})}setData(e){e.points&&this.areaMesh.setPoints(this.applyObjectReversalMatrixWorld(e.points.map(Ve))),this.areaMesh.setStyle(e.style),this.updateCreationPointMeshes()}highlight(){var e;(e=this.areaMesh)==null||e.highlight()}unhighlight(){var e;(e=this.areaMesh)==null||e.unhighlight()}canUndo(){var i,s,o;return this.creatingObject?(o=(s=(i=this.creatingObject)==null?void 0:i.canUndo)==null?void 0:s.call(i))!=null?o:!1:this.currentHistoryIndex>0}canRedo(){var e,i,s;return this.creatingObject?(s=(i=(e=this.creatingObject)==null?void 0:e.canRedo)==null?void 0:i.call(e))!=null?s:!1:this.currentHistoryIndex<this.historyStack.length-1}undo(){var e,i;if(this.creatingObject)return(i=(e=this.creatingObject)==null?void 0:e.undo)==null?void 0:i.call(e);if(this.canUndo()){this.currentHistoryIndex--;const s=this.historyStack[this.currentHistoryIndex];this.restoreSnapshot(s)}else console.log("[Polygon] undo: 无法撤销",{uuid:this.uuid})}redo(){var e,i;if(this.creatingObject)return(i=(e=this.creatingObject)==null?void 0:e.redo)==null?void 0:i.call(e);if(this.canRedo()){this.currentHistoryIndex++;const s=this.historyStack[this.currentHistoryIndex];this.restoreSnapshot(s)}}recordHistory(){if(this.creatingObject)return;this.historyStack=this.historyStack.slice(0,this.currentHistoryIndex+1);const e={points:this.areaMesh.points.map(i=>i.clone())};this.historyStack.push(e),this.historyStack.length>this.maxHistorySize?this.historyStack.shift():this.currentHistoryIndex++}restoreSnapshot(e){this.areaMesh.setPoints(e.points.map(i=>i.clone())),this.updateCreationPointMeshes(),this._editor&&this._editor.updatePointMeshes()}create(e){return $(this,null,function*(){var s;this.children.forEach(o=>{o.parent===this&&this.remove(o)}),this.children.length=0;const i=new xh(e);this.areaMesh=i,this.add(this.areaMesh),this.creatingObject=ic(this.areaMesh,this.pointSelector,e),yield(s=this.creatingObject)==null?void 0:s.finished,this.creatingObject=null,this.recordHistory(),this.updateCreationPointMeshes(),this.config.defaultAction&&this.editor.enable()})}}function ic(n,t,e){var j,F,J,ne,q,oe,se,ae,ze;const{promise:i,resolve:s,reject:o}=eo(),r=n.parent;if(!r){o(new Error("No container"));return}const a=(j=e==null?void 0:e.limit)!=null?j:"none",l=e==null?void 0:e.simpleMode,c=(oe=(q=(J=n.five)!=null?J:(F=n.get)==null?void 0:F.call(n,"five"))!=null?q:(ne=window.globalModules)==null?void 0:ne.five)!=null?oe:window.$five,h=(se=e==null?void 0:e.autoClosePixelDistance)!=null?se:10;n.userData=(ae=n.userData)!=null?ae:{},n.userData.dragSelectPixelDistance=h;let u=0;l&&c&&c.model&&c.model.bounding&&typeof((ze=c.model.bounding.max)==null?void 0:ze.y)=="number"&&(u=c.model.bounding.max.y+1);const d=new Ks(n.style);r==null||r.add(d);const p=new Ks(de(V({},n.style),{dashed:!0,lengthEnable:!1}));r==null||r.add(p);let m=[];const g=(ee=w)=>{m.forEach((we,le)=>{const he=ee[le];he&&we.position.copy(he)})};function v(){var we,le;m.forEach(he=>{var be;return(be=he.parent)==null?void 0:be.remove(he)});const ee=(le=(we=n.line)==null?void 0:we.style)!=null?le:n.style;m=w.map((he,be)=>{var ke,Re;const te=new dn(de(V({},ee),{color:(ke=ee.pointColor)!=null?ke:ee.lineColor,tip:void 0,point:he}));return te.name=`PolygonPointMesh_${be}`,te.userData=(Re=te.userData)!=null?Re:{},te.userData.dragSelectPixelDistance=h,r==null||r.add(te),te}),g()}function y(){m.forEach(ee=>{var we;return(we=ee.parent)==null?void 0:we.remove(ee)}),m=[],n.userData&&(delete n.userData.creationPointMeshes,delete n.userData.syncCreationPointMeshes,delete n.userData.disposeCreationPointMeshes)}t.enable(),l&&t.setAdherePoints([]);const w=[];let C,E,D=!1,L;const R=[],z=()=>w.length>0,O=()=>R.length>0,A=()=>{var ee;z()&&(R.push(w.pop()),k(L),v(),(ee=e==null?void 0:e.onUndo)==null||ee.call(e),t.pointSelectorHelper&&t.pointSelectorHelper.magnifier&&t.pointSelectorHelper.magnifier.render())},M=()=>{var ee;O()&&(w.push(R.pop()),k(L),v(),(ee=e==null?void 0:e.onRedo)==null||ee.call(e),t.pointSelectorHelper&&t.pointSelectorHelper.magnifier&&t.pointSelectorHelper.magnifier.render())},I=ee=>{var le,he;R.length=0;let we=w.length===0?ee.point:C.clone();if(l&&(we=we.clone().setY(u)),e.__onWillAddPoint(we,w),!((e==null?void 0:e.experimental_max_point_count)!=null&&w.length===e.experimental_max_point_count)){if(w.push(we),n.setPoints(w,{closed:!1}),e!=null&&e.experimental_self_intersect_check&&zg(w)){const be=w.pop();n.setPoints(w,{closed:!1}),v(),console.warn("[Polygon] 检测到自相交,无法添加该点"),(le=e==null?void 0:e.__onSelfIntersect)==null||le.call(e,be);return}v(),(he=e==null?void 0:e.onPointPlaced)==null||he.call(e,w),D&&(x(),s())}},k=ee=>{const we=()=>{d.setPoints([]),p.setPoints([]),n.setPoints(w),t.pointSelectorHelper&&t.pointSelectorHelper.magnifier&&t.pointSelectorHelper.magnifier.render()};if(!ee){we(),v();return}if(L=ee,!(w!=null&&w.length))return we();const le=w.at(-1).clone();if(w.length<3&&(l?(C=ee.point.clone().setY(u),d.setPoints([le,C]),p.setPoints([])):a==="none"?(C=ee.point,d.setPoints([le,C]),p.setPoints([])):a==="xoz"?(E=E!=null?E:new b.Plane().setFromNormalAndCoplanarPoint(new b.Vector3(0,1,0),w[0]),t.plane=E,C=E.projectPoint(ee.point,new b.Vector3),d.setPoints([le,C]),p.setPoints([C,ee.point])):a==="y"&&(w.length===1?(C=ee.point,d.setPoints([le,C]),p.setPoints([])):(E=E!=null?E:new b.Plane().setFromCoplanarPoints(w[0],w[1],new b.Vector3(0,1,0).add(w[0])),t.plane=E,C=E.projectPoint(ee.point,new b.Vector3),d.setPoints([le,C]),p.setPoints([C,ee.point])))),w.length>=3){l?C=ee.point.clone().setY(u):C=n.projectPoint(ee.point);const he=w[0];let be=!1;if(typeof(e==null?void 0:e.autoClosePixelDistance)=="number"){if(c&&c.camera&&c.getElement){const te=c.getElement(),ke=te.clientWidth,Re=te.clientHeight,ye=Ze=>{const ot=Ze.clone().project(c.camera);return{x:(ot.x*.5+.5)*ke,y:(1-(ot.y*.5+.5))*Re}},De=ye(he),ve=ye(C),Ae=ye(ee.point),Oe=Math.sqrt(ui(De.x-ve.x,2)+ui(De.y-ve.y,2)),Xe=Math.sqrt(ui(De.x-Ae.x,2)+ui(De.y-Ae.y,2));(Oe<e.autoClosePixelDistance||Xe<e.autoClosePixelDistance)&&(be=!0)}}else(he.distanceTo(C)<.2||he.distanceTo(ee.point)<.2)&&(be=!0);be?(C=he,ee.point.copy(he),t.pointSelectorHelper.updateWithIntersect(ee,{emitEvent:!1}),D=!0):D=!1,d.setPoints([le,C]),p.setPoints([C,ee.point])}w.length>=2?(n.setPoints([...w,C],{closed:!1}),n.line.setPoints(n.points.slice(0,-1)),e!=null&&e.experimental_self_intersect_check&&zg([...w,C])?(t.cursorError=!0,d.setStyle({lineColor:16734553}),p.setStyle({lineColor:16734553})):(t.cursorError=!1,d.setStyle({lineColor:n.lineColor}),p.setStyle({lineColor:n.lineColor}))):n.setPoints([]),v()},x=()=>{t.off("select",I),t.off("intersectionUpdate",k),t.off("disable",S),t.plane=null,t.disable(),r==null||r.remove(d,p),y()},S=()=>{x(),r==null||r.remove(n,p,d),y(),o(new Error("Cancelled"))};return t.on("select",I),t.on("intersectionUpdate",k),t.on("disable",S),{finished:i,canUndo:z,canRedo:O,undo:A,redo:M}}function Th(n){const t=[...n],e=[];for(let i=0;i<t.length-2;i++)e.push(0,i+1,i+2);return e}function Dh(n){const t=n.map(i=>new b.Vector3(i[0],i[1],i[2]));return Rv(t)}class XT extends b.BufferGeometry{constructor(e){super();f(this,"bottomPositions",[]);f(this,"topPosition",[]);f(this,"_type","Concave");e&&this.setPosition(e)}setPosition(e){var l,c,h;const i=(l=e.bottomPositions)!=null?l:this.bottomPositions,s=(c=e.topPosition)!=null?c:this.topPosition;if(this._type=(h=e.type)!=null?h:this._type,this.bottomPositions=i,this.topPosition=s,!i||i.length<3){console.error("PrismGeometry: Invalid parameters",i,s,e),this.bottomPositions=[],this.setAttribute("position",new b.BufferAttribute(new Float32Array([]),3));return}const o=[],r=[];r.push(...i),r[0][0]===r.at(-1)[0]&&r[0][1]===r.at(-1)[1]&&r[0][2]===r.at(-1)[2]&&(r.length-=1);const a=this._type==="Concave"?Dh(r):Th(r);if(o.push(...a),s&&s.length===3){const u=[s[0]-i[0][0],s[1]-i[0][1],s[2]-i[0][2]],d=r.map(m=>[m[0]+u[0],m[1]+u[1],m[2]+u[2]]);r.push(...d);const p=o.map(m=>m+r.length/2);o.push(...p);for(let m=0;m<r.length/2-1;m++)o.push(m,m+1,m+r.length/2),o.push(m+1,m+r.length/2+1,m+r.length/2);o.push(0,r.length/2,r.length/2-1),o.push(r.length/2,r.length-1,r.length/2-1)}this.setAttribute("position",new b.Float32BufferAttribute(r.flat(),3)),this.setIndex(o),this.computeBoundingSphere()}}class YT extends b.BufferGeometry{constructor(e){super();f(this,"bottomPositions",[]);f(this,"topPosition",[]);f(this,"faceCount",0);f(this,"_type","Concave");e&&this.setPosition(e)}setPosition(e){var p,m,g;const i=(p=e.bottomPositions)!=null?p:this.bottomPositions,s=(m=e.topPosition)!=null?m:this.topPosition;if(this._type=(g=e.type)!=null?g:this._type,this.bottomPositions=i,this.topPosition=s,!i||i.length<3||!s||s.length!==3){console.error("PrismAnimationGeometry: Invalid parameters",i,s,e);return}const o=[...i];o[0][0]===o.at(-1)[0]&&o[0][1]===o.at(-1)[1]&&o[0][2]===o.at(-1)[2]&&(o.length-=1);const r=[s[0]-i[0][0],s[1]-i[0][1],s[2]-i[0][2]],a=o.map(v=>[v[0]+r[0],v[1]+r[1],v[2]+r[2]]);this.faceCount=2+o.length;const l=[],c=[],h=[],u=[];let d=0;this.addBottomFace(o,l,c,h,d,u,0),d+=this.getBottomFaceVertexCount(o),this.addTopFace(a,l,c,h,d,u,1),d+=this.getTopFaceVertexCount(a);for(let v=0;v<o.length;v++){const y=(v+1)%o.length;this.addSideFace(o[v],o[y],a[v],a[y],l,c,h,d,u,2+v),d+=4}this.setAttribute("position",new b.Float32BufferAttribute(l,3)),this.setAttribute("uv",new b.Float32BufferAttribute(c,2)),this.setIndex(h),this.clearGroups(),u.forEach(v=>{this.addGroup(v.start,v.count,v.materialIndex)}),this.computeBoundingSphere(),console.log("PrismAnimationGeometry UV debug:",{totalUVs:c.length/2,totalPositions:l.length/3,faceCount:this.faceCount,uvSample:c.slice(0,20)})}addBottomFace(e,i,s,o,r,a,l){const c=Math.min(...e.map(y=>y[0])),h=Math.max(...e.map(y=>y[0])),u=Math.min(...e.map(y=>y[2])),d=Math.max(...e.map(y=>y[2])),p=h-c||1,m=d-u||1;for(const y of e){i.push(y[0],y[1],y[2]);const w=(y[0]-c)/p,C=(y[2]-u)/m;s.push(w,C)}const g=o.length,v=this._type==="Concave"?Dh(e):Th(e);for(const y of v)o.push(y+r);a.push({start:g,count:o.length-g,materialIndex:l})}addTopFace(e,i,s,o,r,a,l){const c=Math.min(...e.map(y=>y[0])),h=Math.max(...e.map(y=>y[0])),u=Math.min(...e.map(y=>y[2])),d=Math.max(...e.map(y=>y[2])),p=h-c||1,m=d-u||1;for(const y of e){i.push(y[0],y[1],y[2]);const w=(y[0]-c)/p,C=(y[2]-u)/m;s.push(w,C)}const g=o.length,v=this._type==="Concave"?Dh(e):Th(e);for(let y=v.length-1;y>=0;y--)o.push(v[y]+r);a.push({start:g,count:o.length-g,materialIndex:l})}addSideFace(e,i,s,o,r,a,l,c,h,u){r.push(e[0],e[1],e[2],i[0],i[1],i[2],o[0],o[1],o[2],s[0],s[1],s[2]),a.push(0,0,1,0,1,1,0,1);const d=l.length;l.push(c+0,c+1,c+2,c+0,c+2,c+3),h.push({start:d,count:6,materialIndex:u})}getBottomFaceVertexCount(e){return e.length}getTopFaceVertexCount(e){return e.length}}class Ns extends bi{constructor(e){super();f(this,"name","PrismMesh");f(this,"five");f(this,"animatedBoxMesh");f(this,"activeAnimations",new Map);f(this,"activeEaseInAnimations",new Map);f(this,"_geometryInfoCache");f(this,"geometryInfoNeedUpdate",!0);f(this,"edgeMesh",new Si);f(this,"prismMesh",new Yl);f(this,"paramStyle");this.five=e==null?void 0:e.five,this.prismMesh.name="PrismMesh",this.prismMesh.geometry=new XT,this.edgeMesh.name="EdgeMesh",this.addIfNotExists(this.prismMesh,this.edgeMesh),e&&Object.keys(e).some(i=>i!=="five")&&this.setPoints(e),this.setStyle(e)}get topPosition(){return new b.Vector3().fromArray(this.prismMesh.geometry.topPosition)}get bottomPositions(){return this.prismMesh.geometry.bottomPositions.map(e=>new b.Vector3().fromArray(e))}get topPositions(){const e=this.bottomPositions[0].clone().sub(this.topPosition);return this.bottomPositions.map(i=>i.clone().sub(e))}get style(){return{color:this.color,lineColor:this.lineColor,lineWidth:this.lineWidth,opacity:this.opacity,occlusionVisibility:this.occlusionVisibility,occlusionMode:this.occlusionMode}}get opacity(){return this.prismMesh.opacity}get occlusionVisibility(){return this.prismMesh.occlusionVisibility}get occlusionMode(){return this.prismMesh.occlusionMode}get center(){return this.localCenter.clone()}get localCenter(){var e;return(e=this.geometryInfo.center.clone())!=null?e:new b.Vector3(9999,9999,9999)}get geometryInfo(){if(this.geometryInfoNeedUpdate){this.geometryInfoNeedUpdate=!1;const e=this.prismMesh.geometry.bottomPositions,i=this.prismMesh.geometry.topPosition;if(!e||e.length<3||!i){this._geometryInfoCache=void 0;return}const s=e.map((c,h)=>h>=e.length-2?null:[new b.Vector3().fromArray(e[0]),new b.Vector3().fromArray(e[h+1]),new b.Vector3().fromArray(e[h+2])]).filter(Boolean);if(s.length===0){this._geometryInfoCache=void 0;return}let o=0,r=new b.Vector3;for(const[c,h,u]of s){const d=ra(c,h,u),p=au(c,h,u,d);o+=d,r.add(p)}r=r.divideScalar(o);const a=new b.Vector3().fromArray(i).sub(new b.Vector3().fromArray(e[0])),l=r.clone().add(a.divideScalar(2));this._geometryInfoCache={center:l}}return this._geometryInfoCache}get worldCenter(){return this.updateMatrixWorld(),this.localToWorld(this.localCenter)}get color(){return this.prismMesh.color}get lineWidth(){return this.edgeMesh.style.lineWidth}get lineColor(){return this.edgeMesh.color}setStyle(e={}){this.paramStyle=V(V({},this.paramStyle),e),this.prismMesh.setStyle(this.paramStyle),this.edgeMesh.setStyle(this.paramStyle)}isBox(){const e=this.prismMesh.geometry.bottomPositions;return e&&e.length===4}setPoints(e){var i;this.prismMesh.geometry.setPosition({bottomPositions:(i=e.points)==null?void 0:i.map(Ve).map(s=>s.toArray()),topPosition:e.heightPoint?Ve(e.heightPoint).toArray():void 0}),this.edgeMesh.geometry=new Wa().fromEdgesGeometry(new b.EdgesGeometry(this.prismMesh.geometry)),this.geometryInfoNeedUpdate=!0}highlight(){this.prismMesh.highlight()}unhighlight(){this.prismMesh.unhighlight()}raycast(e,i){return this.children.forEach(s=>Nh(s,e,i,!0)),!1}setFive(e){this.five=e}playBoxAnimation(e,i="#4DF0FF"){return this.five?(this.activeAnimations.has(e)&&this.forceFinishBoxAnimation(e),new Promise(s=>{this.prismMesh.visible=!1,this.edgeMesh.visible=!1;const o=this.createOrUpdateAnimatedBoxMesh(i),r=o.material,a=3e3;let l=0;const c=rt.AnimationFrameLoop.shared.add((h,u)=>{l+=u;let d=l/a;d>1&&(d=1);let p=d;d<=.5?p=d*2:p=2-d*2,r.forEach(m=>{m.uniforms.progress.value=p}),d===1&&(c(),o.visible=!1,this.playEaseInAnimation(e,()=>{this.activeAnimations.delete(e),s()})),this.five.needsRender=!0});this.activeAnimations.set(e,{animatedBoxMesh:o,remove:c}),o.visible=!0})):(console.warn("Five instance not available for box animation"),Promise.resolve())}forceFinishBoxAnimation(e){if(!this.five){console.warn("Five instance not available for finishing box animation");return}(e?[e]:Array.from(this.activeAnimations.keys())).forEach(s=>{const o=this.activeAnimations.get(s);o&&(o.remove(),this.animatedBoxMesh&&(this.animatedBoxMesh.visible=!1),this.activeAnimations.delete(s));const r=this.activeEaseInAnimations.get(s);r&&(clearInterval(r.interval),this.activeEaseInAnimations.delete(s))}),this.showBoxFinalState(),this.five.needsRender=!0}playEaseInAnimation(e,i){if(!this.five)return;this.prismMesh.visible=!0,this.edgeMesh.visible=!0;let s=0;const o=this.prismMesh.style.opacity;this.prismMesh.setStyle({opacity:0}),this.edgeMesh.setStyle({lineOpacity:0});const r=setInterval(()=>{s===61&&(clearInterval(r),this.activeEaseInAnimations.delete(e),this.showBoxFinalState(),i()),this.edgeMesh.setStyle({lineOpacity:s/60}),this.prismMesh.setStyle({opacity:s/60*o}),this.five.needsRender=!0,s++},16);this.activeEaseInAnimations.set(e,{interval:r,model:this})}createOrUpdateAnimatedBoxMesh(e){if(!this.five)throw new Error("Five instance not available");const i=new b.Vector3(1/0,1/0,1/0),s=new b.Vector3(-1/0,-1/0,-1/0),o=this.bottomPositions;for(const v of o)i.min(v),s.max(v);const r=this.topPositions;for(const v of r)i.min(v),s.max(v);const a=s.clone().sub(i),l=this.prismMesh.geometry,c=l.bottomPositions,h=l.topPosition;if(this.animatedBoxMesh)return this.matrixWorld.decompose(this.animatedBoxMesh.position,this.animatedBoxMesh.quaternion,this.animatedBoxMesh.scale),this.animatedBoxMesh.updateMatrixWorld(),this.animatedBoxMesh.matrixAutoUpdate=!1,this.animatedBoxMesh;const u=new YT({bottomPositions:c,topPosition:h,type:"Concave"}),d=`
|
|
982
|
+
black 0%)}`)}function kg(n){let t,e;return t=new Xi({props:{center:!0,blurRadius:24,spreadRadius:16}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function xg(n){let t,e,i,s,o;return{c(){t=U("div"),e=U("div"),i=U("div"),s=ue(),o=U("div"),P(i,"class","icon-bg-circle-inner svelte-ezi5lu"),_(i,"background",n[4]),_(i,"opacity",n[3]),P(o,"class","icon-bg-circle-inner-shadow svelte-ezi5lu"),P(e,"class","icon-bg-circle svelte-ezi5lu"),P(t,"class","icon-bg svelte-ezi5lu")},m(r,a){Z(r,t,a),B(t,e),B(e,i),B(e,s),B(e,o)},p(r,a){a&16&&_(i,"background",r[4]),a&8&&_(i,"opacity",r[3])},d(r){r&&X(t)}}}function M9(n){let t,e,i,s,o,r,a,l,c,h,u,d,p,m,g,v=n[1]&&kg(),y=n[4]&&xg(n);return{c(){t=U("div"),v&&v.c(),e=ue(),y&&y.c(),i=ue(),s=Te("svg"),o=Te("linearGradient"),r=Te("stop"),a=Te("stop"),l=Te("linearGradient"),c=Te("stop"),h=Te("stop"),u=Te("g"),d=Te("path"),p=Te("path"),m=Te("path"),P(r,"offset","0"),P(r,"stop-color","#fff"),P(a,"offset","1"),P(a,"stop-color","#fff"),P(a,"stop-opacity",".7"),P(o,"id","a"),P(o,"x1","78.74567%"),P(o,"x2","5.663764%"),P(o,"y1","94.075617%"),P(o,"y2","5.924383%"),P(c,"offset","0"),P(c,"stop-color","#fff"),P(h,"offset","1"),P(h,"stop-color","#fff"),P(h,"stop-opacity","0"),P(l,"id","b"),P(l,"x1","16.588502%"),P(l,"x2","68.285986%"),P(l,"y1","5.924383%"),P(l,"y2","63.800896%"),P(d,"d","m18 5.4v8c0 1.9329966-4.0294373 3.5-9 3.5-4.97056275 0-9-1.5670034-9-3.5v-8c0 1.93299662 4.02943725 3.5 9 3.5 4.8670094 0 8.8316983-1.50239169 8.9947813-3.37967512zm-13.0396582-.5c.259 0 .504-.063.728-.196.441-.259.721-.728.721-1.26 0-.441-.189-.833-.504-1.085.259-.259.434-.63.434-1.022 0-.245-.063-.476-.182-.679-.252-.413-.693-.658-1.197-.658-.238 0-.462.056-.665.175-.42.238-.679.665-.679 1.162v.035h.721v-.035c0-.315.294-.616.623-.616.357 0 .651.287.651.616 0 .371-.287.658-.651.658h-.14v.728h.14c.399 0 .728.322.728.721s-.329.735-.728.735-.728-.336-.728-.735v-.105h-.728v.105c0 .266.063.511.196.728.259.448.728.728 1.26.728zm3.647 0c.273 0 .518-.07.749-.203.448-.273.742-.763.742-1.302 0-.273-.07-.518-.203-.749-.273-.448-.749-.742-1.288-.742-.077 0-.133 0-.168.007l.875-1.911h-.805l-1.274 2.793c-.091.189-.133.392-.133.602 0 .273.07.525.203.756.273.455.749.749 1.302.749zm0-.742c-.427 0-.763-.336-.763-.763 0-.42.343-.77.763-.77s.77.35.77.77-.35.763-.77.763zm3.654.749c.504 0 .952-.273 1.204-.7.126-.21.189-.441.189-.693v-2.086c0-.511-.273-.98-.693-1.239-.217-.126-.448-.189-.7-.189-.511 0-.98.273-1.232.714-.133.217-.196.455-.196.714v2.086c0 .504.273.952.714 1.204.217.126.455.189.714.189zm0-.721c-.371 0-.693-.301-.693-.672v-2.086c0-.399.308-.693.693-.693.371 0 .651.294.651.693v2.086c0 .385-.28.672-.651.672zm3.2140391-2.11266016c.2734375 0 .5132649-.09855143.7194824-.29565429.2062174-.19710287.3093262-.44376628.3093262-.73999024 0-.28710937-.0991211-.53035481-.2973633-.72973633-.1982422-.19938151-.4420573-.29907226-.7314453-.29907226-.2825521 0-.5257976.10026042-.7297364.30078125s-.3059082.44661458-.3059082.73828125c0 .2734375.0968425.51269531.2905274.71777344.1936849.20507812.4420573.30761718.7451172.30761718zm0-.37255859c-.1822917 0-.3383789-.06494141-.4682618-.19482422-.1298828-.12988281-.1948242-.28369141-.1948242-.46142578 0-.18457031.0655111-.34122721.1965332-.4699707.1310222-.12874349.2865397-.19311524.4665528-.19311524.180013 0 .3343912.06494141.4631347.19482422s.1931153.28369141.1931153.46142578c0 .18457031-.0655111.34122722-.1965332.46997071-.1310222.12874349-.2842611.19311523-.4597168.19311523z"),P(d,"fill","url(#a)"),P(d,"fill-rule","nonzero"),P(p,"d","m18 5.4v8c0 1.9329966-4.0294373 3.5-9 3.5-4.97056275 0-9-1.5670034-9-3.5v-8c0 1.93299662 4.02943725 3.5 9 3.5 4.8670094 0 8.8316983-1.50239169 8.9947813-3.37967512zm-.537 1.917-.0556083.04651904c-1.6129673 1.27557869-4.7855335 2.07278608-8.4073917 2.07278608-3.5667171 0-6.69228643-.77164105-8.32741897-2.0099189l-.13658103-.10838622.00030512 6.082c0 1.4658868 3.60570734 2.8999734 8.15878222 2.9616322l.30491266.0020627c4.6959533 0 8.4636949-1.4652329 8.4636949-2.9636949zm-5.2016582-7.317c.252 0 .483.063.7.189.42.259.693.728.693 1.239v2.086l-.00756.14868c-.02016.19488-.08064.37632-.18144.54432-.252.427-.7.7-1.204.7-.259 0-.497-.063-.714-.189-.441-.252-.714-.7-.714-1.204v-2.086l.007616-.15288c.020384-.20048.081984-.38752.188384-.56112.252-.441.721-.714 1.232-.714zm-7.301 0c.504 0 .945.245 1.197.658.119.203.182.434.182.679 0 .392-.175.763-.434 1.022.315.252.504.644.504 1.085 0 .532-.28 1.001-.721 1.26-.224.133-.469.196-.728.196-.532 0-1.001-.28-1.26-.728-.133-.217-.196-.462-.196-.728v-.105h.728v.105c0 .399.329.735.728.735s.728-.336.728-.735-.329-.721-.728-.721h-.14v-.728h.14c.364 0 .651-.287.651-.658 0-.329-.294-.616-.651-.616-.329 0-.623.301-.623.616v.035h-.721v-.035c0-.497.259-.924.679-1.162.203-.119.427-.175.665-.175zm4.354 0-.875 1.911c.035-.007.091-.007.168-.007.539 0 1.015.294 1.288.742.133.231.203.476.203.749 0 .539-.294 1.029-.742 1.302-.231.133-.476.203-.749.203-.553 0-1.029-.294-1.302-.749-.133-.231-.203-.483-.203-.756 0-.21.042-.413.133-.602l1.274-2.793zm2.947.735c-.385 0-.693.294-.693.693v2.086l.0077784.09927273c.051172.32396694.3479489.57272727.6852216.57272727.371 0 .651-.287.651-.672v-2.086l-.0068002-.10607288c-.044861-.34395191-.3069271-.58692712-.6441998-.58692712zm-3.654 1.89c-.42 0-.763.35-.763.77 0 .427.336.763.763.763.42 0 .77-.343.77-.763s-.35-.77-.77-.77zm6.8680391-2.61611328c.289388 0 .5332031.09969075.7314453.29907226.1982422.19938152.2973633.44262696.2973633.72973633 0 .29622396-.1031088.54288737-.3093262.73999024-.2062175.19710286-.4460449.29565429-.7194824.29565429-.3030599 0-.5514323-.10253906-.7451172-.30761718-.1936849-.20507813-.2905274-.44433594-.2905274-.71777344 0-.29166667.1019694-.53776042.3059082-.73828125s.4471843-.30078125.7297364-.30078125zm0 .37255859c-.1800131 0-.3355306.06437175-.4665528.19311524-.1310221.12874349-.1965332.28540039-.1965332.4699707 0 .17773437.0649414.33154297.1948242.46142578.1298829.12988281.2859701.19482422.4682618.19482422.1754557 0 .3286946-.06437174.4597168-.19311523.1310221-.12874349.1965332-.2854004.1965332-.46997071 0-.17773437-.0643718-.33154297-.1931153-.46142578s-.2831217-.19482422-.4631347-.19482422z"),P(p,"fill","url(#b)"),P(p,"fill-rule","nonzero"),P(m,"d","m3.00030998 2.79110119v5.21779762c-1.84142801-.64087734-3.00030998-1.57225753-3.00030998-2.60889881s1.15888197-1.96802147 3.00030998-2.60889881zm12.00038752.00035068c1.8408432.64086639 2.9993025 1.57209591 2.9993025 2.60854813s-1.1584593 1.96768174-2.9993025 2.60854813z"),P(m,"fill","#d8d8d8"),P(m,"opacity",".6"),P(u,"fill","none"),P(u,"fill-rule","evenodd"),P(u,"transform","translate(3 3.1)"),P(s,"height",n[2]),P(s,"width",n[2]),P(s,"viewBox","0 0 24 24"),P(s,"xmlns","http://www.w3.org/2000/svg"),P(s,"xmlns:xlink","http://www.w3.org/1999/xlink"),P(t,"class","icon svelte-ezi5lu"),_(t,"width",n[0])},m(w,C){Z(w,t,C),v&&v.m(t,null),B(t,e),y&&y.m(t,null),B(t,i),B(t,s),B(s,o),B(o,r),B(o,a),B(s,l),B(l,c),B(l,h),B(s,u),B(u,d),B(u,p),B(u,m),g=!0},p(w,[C]){w[1]?v?C&2&&H(v,1):(v=kg(),v.c(),H(v,1),v.m(t,e)):v&&(xe(),Y(v,1,1,()=>{v=null}),Se()),w[4]?y?y.p(w,C):(y=xg(w),y.c(),y.m(t,i)):y&&(y.d(1),y=null),(!g||C&4)&&P(s,"height",w[2]),(!g||C&4)&&P(s,"width",w[2]),C&1&&_(t,"width",w[0])},i(w){g||(H(v),g=!0)},o(w){Y(v),g=!1},d(w){w&&X(t),v&&v.d(),y&&y.d()}}}function I9(n){const{originWidth:t,originHeight:e,scale:i=1,wantedWidth:s}=n,o=(s!=null?s:t)*i,r=typeof e=="number"?o*(e/t):void 0;return de(V({},n),{width:o,height:r})}function E9(n,t,e){let i,s,o,r,a,{width:l=null}=t,{icon:c=null}=t,{shadow:h=!1}=t;return n.$$set=u=>{"width"in u&&e(0,l=u.width),"icon"in u&&e(5,c=u.icon),"shadow"in u&&e(1,h=u.shadow)},n.$$.update=()=>{var u,d;n.$$.dirty&32&&e(4,i=c==null?void 0:c.bgcolor),n.$$.dirty&32&&e(3,s=(u=c==null?void 0:c.bgopacity)!=null?u:.6),n.$$.dirty&32&&e(7,o=(d=c==null?void 0:c.scale)!=null?d:1),n.$$.dirty&32&&e(6,r=c==null?void 0:c.width),n.$$.dirty&192&&e(2,a=I9({originWidth:24,originHeight:24,scale:o,wantedWidth:r}).width)},[l,h,a,s,i,c,r,o]}let k9=class extends Ee{constructor(t){super(),Ie(this,t,E9,M9,Me,{width:0,icon:5,shadow:1},C9)}};function x9(n){Le(n,"svelte-yq4ru9",".wrapper.svelte-yq4ru9{font-weight:600;cursor:pointer;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);display:flex;align-items:center;justify-content:center;flex-direction:column;pointer-events:auto}")}function S9(n){let t,e,i;return e=new k9({props:{icon:n[0],shadow:!0}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","wrapper svelte-yq4ru9")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,[o]){const r={};o&1&&(r.icon=s[0]),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function T9(n,t,e){let i,{tag:s}=t;return n.$$set=o=>{"tag"in o&&e(1,s=o.tag)},n.$$.update=()=>{var o,r;n.$$.dirty&2&&e(0,i=(r=s.data.icon)!=null?r:(o=s.style)==null?void 0:o.point)},[i,s]}class D9 extends Ee{constructor(t){super(),Ie(this,t,T9,S9,Me,{tag:1},x9)}}function L9(n){Le(n,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function z9(n){let t,e;return{c(){t=new Bo(!1),e=Be(),t.a=e},m(i,s){t.m(n[2],i,s),Z(i,e,s)},p:ce,d(i){i&&X(e),i&&t.d()}}}function O9(n){let t,e=typeof n[2]=="string"&&z9(n);return{c(){t=U("div"),e&&e.c(),P(t,"class","customElement__container svelte-kzl2aj"),Pe(t,"unfolded",n[1])},m(i,s){Z(i,t,s),e&&e.m(t,null),n[5](t)},p(i,[s]){typeof i[2]=="string"&&e.p(i,s),s&2&&Pe(t,"unfolded",i[1])},i:ce,o:ce,d(i){i&&X(t),e&&e.d(),n[5](null)}}}function j9(n,t,e){var h,u;let i,{tag:s}=t,{rendererMap:o=new Map}=t,r,a=(u=s.element)!=null?u:(h=o.get(s.contentType))==null?void 0:h.renderer,l;zt(()=>{r&&(a instanceof Element?(r.appendChild(a),l=()=>{a instanceof Element&&a.remove()}):typeof a=="function"&&(l=a(r,s)))}),Kt(()=>{l==null||l()});function c(d){qe[d?"unshift":"push"](()=>{r=d,e(0,r)})}return n.$$set=d=>{"tag"in d&&e(3,s=d.tag),"rendererMap"in d&&e(4,o=d.rendererMap)},n.$$.update=()=>{n.$$.dirty&8&&e(1,i=s.state.unfolded)},[r,i,a,s,o,c]}class R9 extends Ee{constructor(t){super(),Ie(this,t,j9,O9,Me,{tag:3,rendererMap:4},L9)}}function _9(n){Le(n,"svelte-1fy4duy",'@font-face{font-family:"TG-TYPE";font-style:normal;font-weight:400;src:local("TG-TYPE-Bold"), url(data:application/font-woff2;charset=utf-8;base64,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) format("woff2")}*{-webkit-tap-highlight-color:transparent}.content__container.svelte-1fy4duy{position:relative;left:50%;top:50%;transform:translate(-50%, -50%);font-family:PingFangSC, Segoe UI, Rototo, sans-serif;transition:opacity 0.2s linear}.content__container.unClickable.svelte-1fy4duy{pointer-events:none !important}.content__container.unClickable.svelte-1fy4duy *{pointer-events:none !important}.content__wrapper.svelte-1fy4duy{pointer-events:none;width:100%;height:100%}.content__container.hide.svelte-1fy4duy{opacity:0;pointer-events:none}.content__container.hide.svelte-1fy4duy *{pointer-events:none !important}.content__container.disable.svelte-1fy4duy{display:none}.content.svelte-1fy4duy{position:relative;width:100%;height:100%;font-size:0.75rem;color:#fff}.content.svelte-1fy4duy:not(.unfolded){pointer-events:none}.content.svelte-1fy4duy:not(.unfolded) *{pointer-events:none !important}.content.unfolded.svelte-1fy4duy{pointer-events:auto;cursor:pointer}')}function V9(n){let t,e;return{c(){t=U("div"),P(t,"data-info","tag content is keep folded"),P(t,"data-id",e=n[0].id)},m(i,s){Z(i,t,s)},p(i,s){s&1&&e!==(e=i[0].id)&&P(t,"data-id",e)},i:ce,o:ce,d(i){i&&X(t)}}}function F9(n){let t,e,i,s,o,r,a,l,c,h,u,d,p,m,g,v,y;const w=[X9,Q9,U9,W9,G9,N9,H9],C=[];function E(D,L){return L&9&&(s=null),L&9&&(o=null),L&9&&(r=null),L&9&&(a=null),L&9&&(l=null),L&9&&(c=null),L&9&&(h=null),s==null&&(s=!!(["Text"].includes(D[0].contentType)||["Text"].includes(D[3].get(D[0].contentType)))),s?0:(o==null&&(o=!!(["ImageText","Image","Video"].includes(D[0].contentType)||["ImageText","Image","Video"].includes(D[3].get(D[0].contentType)))),o?1:(r==null&&(r=!!(["Audio"].includes(D[0].contentType)||["Audio"].includes(D[3].get(D[0].contentType)))),r?2:(a==null&&(a=!!(["Marketing"].includes(D[0].contentType)||["Marketing"].includes(D[3].get(D[0].contentType)))),a?3:(l==null&&(l=!!(["Link","VRLink","PanoLink","Sticker"].includes(D[0].contentType)||["Link","VRLink","PanoLink","Sticker"].includes(D[3].get(D[0].contentType)))),l?4:(c==null&&(c=!!(["MediaPlane","MediaModel"].includes(D[0].contentType)||["MediaPlane","MediaModel"].includes(D[3].get(D[0].contentType)))),c?5:(h==null&&(h=!!(["Panorama"].includes(D[0].contentType)||["Panorama"].includes(D[3].get(D[0].contentType)))),h?6:-1))))))}return~(u=E(n,-1))&&(d=C[u]=w[u](n)),{c(){var D;t=U("div"),e=U("div"),i=U("div"),d&&d.c(),P(i,"class","content svelte-1fy4duy"),Pe(i,"unfolded",(D=n[0].state)==null?void 0:D.unfolded),P(e,"class","content__wrapper svelte-1fy4duy"),P(t,"class",p=Mt(pi("content__container",n[0].className))+" svelte-1fy4duy"),P(t,"data-id",m=n[0].id),Pe(t,"disable",n[0].enabled===!1),Pe(t,"hide",n[5]),Pe(t,"unClickable",n[0].config.clickable===!1),_(t,"width",n[0].stickType==="Plane"||n[0].contentType==="MediaModel"?"100%":0),_(t,"height",n[0].stickType==="Plane"||n[0].contentType==="MediaModel"?"100%":0)},m(D,L){Z(D,t,L),B(t,e),B(e,i),~u&&C[u].m(i,null),n[16](t),g=!0,v||(y=_e(t,"click",n[17],!0),v=!0)},p(D,L){var z;let R=u;u=E(D,L),u===R?~u&&C[u].p(D,L):(d&&(xe(),Y(C[R],1,1,()=>{C[R]=null}),Se()),~u?(d=C[u],d?d.p(D,L):(d=C[u]=w[u](D),d.c()),H(d,1),d.m(i,null)):d=null),(!g||L&1)&&Pe(i,"unfolded",(z=D[0].state)==null?void 0:z.unfolded),(!g||L&1&&p!==(p=Mt(pi("content__container",D[0].className))+" svelte-1fy4duy"))&&P(t,"class",p),(!g||L&1&&m!==(m=D[0].id))&&P(t,"data-id",m),(!g||L&1)&&Pe(t,"disable",D[0].enabled===!1),(!g||L&33)&&Pe(t,"hide",D[5]),(!g||L&1)&&Pe(t,"unClickable",D[0].config.clickable===!1),L&1&&_(t,"width",D[0].stickType==="Plane"||D[0].contentType==="MediaModel"?"100%":0),L&1&&_(t,"height",D[0].stickType==="Plane"||D[0].contentType==="MediaModel"?"100%":0)},i(D){g||(H(d),g=!0)},o(D){Y(d),g=!1},d(D){D&&X(t),~u&&C[u].d(),n[16](null),v=!1,y()}}}function B9(n){let t,e,i,s,o,r,a;return e=new R9({props:{tag:mt(n[0]),rendererMap:n[2]}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class",i=Mt(pi("content__container",n[0].className))+" svelte-1fy4duy"),P(t,"data-id",s=n[0].id),Pe(t,"custom-tag-disable",n[0].enabled===!1),Pe(t,"custom-tag-hide",n[5])},m(l,c){Z(l,t,c),pe(e,t,null),n[14](t),o=!0,r||(a=_e(t,"click",n[15]),r=!0)},p(l,c){const h={};c&1&&(h.tag=mt(l[0])),c&4&&(h.rendererMap=l[2]),e.$set(h),(!o||c&1&&i!==(i=Mt(pi("content__container",l[0].className))+" svelte-1fy4duy"))&&P(t,"class",i),(!o||c&1&&s!==(s=l[0].id))&&P(t,"data-id",s),(!o||c&1)&&Pe(t,"custom-tag-disable",l[0].enabled===!1),(!o||c&33)&&Pe(t,"custom-tag-hide",l[5])},i(l){o||(H(e.$$.fragment,l),o=!0)},o(l){Y(e.$$.fragment,l),o=!1},d(l){l&&X(t),me(e),n[14](null),r=!1,a()}}}function H9(n){let t,e;return t=new D9({props:{tag:mt(n[0])}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=mt(i[0])),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function N9(n){let t,e;return t=new JS({props:{tag:mt(n[0])}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=mt(i[0])),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function G9(n){let t,e;return t=new P9({props:{tag:mt(n[0])}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=mt(i[0])),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function W9(n){let t,e;return t=new MS({props:{tag:mt(n[0])}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=mt(i[0])),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function U9(n){let t,e;return t=new XS({props:{tag:mt(n[0])}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=mt(i[0])),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function Q9(n){let t,e;return t=new fS({props:{tag:mt(n[0])}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=mt(i[0])),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function X9(n){let t,e;return t=new Lk({props:{tag:mt(n[0])}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=mt(i[0])),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function Y9(n){let t,e,i,s,o;const r=[B9,F9,V9],a=[];function l(c,h){return h&5&&(t=null),t==null&&(t=!!(c[0].element||c[2].has(c[0].contentType))),t?0:c[4]?1:2}return e=l(n,-1),i=a[e]=r[e](n),{c(){i.c(),s=Be()},m(c,h){a[e].m(c,h),Z(c,s,h),o=!0},p(c,[h]){let u=e;e=l(c,h),e===u?a[e].p(c,h):(xe(),Y(a[u],1,1,()=>{a[u]=null}),Se(),i=a[e],i?i.p(c,h):(i=a[e]=r[e](c),i.c()),H(i,1),i.m(s.parentNode,s))},i(c){o||(H(i),o=!0)},o(c){Y(i),o=!1},d(c){a[e].d(c),c&&X(s)}}}function Z9(n,t,e){let i,s,o,r,a,l,{tag:c}=t,{hooks:h}=t,{rendererMap:u=new Map}=t,{contentTypeMap:d=new Map}=t,{state:p}=t,{mediaStore:m}=t,{temporaryState:g}=t;ul("hooks",h),ul("mediaStore",m);let v,y;function w(z){z?h.emit("exposure",{id:r,type:"start"}):h.emit("exposure",{id:r,type:"end"})}function C(z,O,A){var M,I;return!(!z.enabled||!O.visible||!O.enabled||!A.visible||!((M=z.state)!=null&&M.visible)||((I=z.temporaryState)==null?void 0:I.visible)===!1||z instanceof wy&&z.loading)}function E(z){qe[z?"unshift":"push"](()=>{c.contentDom=z,e(0,c)})}const D=z=>h.emit("click",{event:z,target:"TagContent",tag:c});function L(z){qe[z?"unshift":"push"](()=>{c.contentDom=z,e(0,c)})}const R=z=>{c.entryFromModel&&Ii(c.five.state.mode)?(z.stopPropagation(),c.find({targetMode:"Panorama"})):h.emit("click",{event:z,target:"TagContent",tag:c})};return n.$$set=z=>{"tag"in z&&e(0,c=z.tag),"hooks"in z&&e(1,h=z.hooks),"rendererMap"in z&&e(2,u=z.rendererMap),"contentTypeMap"in z&&e(3,d=z.contentTypeMap),"state"in z&&e(6,p=z.state),"mediaStore"in z&&e(7,m=z.mediaStore),"temporaryState"in z&&e(8,g=z.temporaryState)},n.$$.update=()=>{var z,O,A,M,I,k,x,S,j,F,J;n.$$.dirty&1&&e(12,i=(z=c.state)==null?void 0:z.unfolded),n.$$.dirty&1&&e(11,s=(O=c.state)==null?void 0:O.visible),n.$$.dirty&321&&e(13,o=p.visible&&g.visible&&((A=c.state)==null?void 0:A.visible)),n.$$.dirty&1&&(r=c.id),n.$$.dirty&321&&e(5,a=!C(c,p,g)),n.$$.dirty&8192&&w(o),n.$$.dirty&7681&&c.hooks&&(i!==void 0&&i!==y&&(e(10,y=i),i?(I=(M=c.hooks).emit)==null||I.call(M,"unfolded"):(x=c==null?void 0:(k=c.hooks).emit)==null||x.call(k,"folded")),s!==void 0&&s!==v&&(e(9,v=s),s?(j=(S=c.hooks).emit)==null||j.call(S,"show"):(J=(F=c.hooks).emit)==null||J.call(F,"hide"))),n.$$.dirty&1&&e(4,l=(()=>!(typeof c.config.unfoldedConfig=="object"&&c.config.unfoldedConfig.keep==="folded"))())},[c,h,u,d,l,a,p,m,g,v,y,s,i,o,E,D,L,R]}let od=class extends Ee{constructor(t){super(),Ie(this,t,Z9,Y9,Me,{tag:0,hooks:1,rendererMap:2,contentTypeMap:3,state:6,mediaStore:7,temporaryState:8},_9)}};class wy extends er{constructor(e,i){super(e,i);f(this,"loading",!1);f(this,"loadModel",()=>$(this,null,function*(){var r,a;const e=this.data.modelUrl;if(!e||(this.loading=!0,yield xi(this.five),!this.plugin.tags.includes(this)))return;const i=Q4(e).then(l=>$(this,null,function*(){var u;const c=Object.assign(l.scene,{customID:this.id,isTagModel:!0,removeEventListener:this.getConfig().clickable===!1?()=>{}:this.addObjectClickHandler(this,l.scene,d=>{this.plugin.hooks.emit("click",{target:"TagModel",tag:this,event:d})})});return new b.Matrix4().fromArray(this.matrix).decompose(c.position,c.quaternion,c.scale),c.updateWorldMatrix(!0,!0),c.visible=this.visible,(u=this.getConfig().modelConfig)!=null&&u.autoLookAtEnabled&&c.lookAt(this.five.camera.position.clone().setY(c.position.y)),c}));this.model={promise:i};const s=yield i;if(this.loading=!1,((r=this.model)==null?void 0:r.promise)!==i||!this.plugin.tags.includes(this))return;this.model.object=s;const o=this.plugin.gltfObjectGroup.children.find(l=>l.customID===this.id);if(o&&(this.plugin.gltfObjectGroup.remove(o),o.removeEventListener()),Bs(this)){const l=this.data.mediaPosition.map(Lt);if(this.computeRenderType()==="Mesh"&&!this.mediaPlane){this.mediaPlane=new Mh(this.data.mediaData[0].url,l,{objectFit:this.data.objectFit});const c=new b.Vector3().addVectors(l[0],l[2]).divideScalar(2);this.mediaPlane.position.copy(c),s.add(this.mediaPlane)}if(this.computeRenderType()!=="Mesh"){(a=this.tag3DContentSvelte)==null||a.dispose();const c=document.createElement("div");c.classList.add("tag-media-container");const h="black";c.style.backgroundColor=h,c.style.border=`3px solid ${h}`;const u=V({mode:"behind",cornerPoints:l,container:c},this.config.tag3DConfig),d=this.computeRenderType()==="BehindDom"||u.mode==="behind"?"behind":"front",p=new sy(de(V({},u),{mode:d})),m=this.computeNormal();p.position.add(m.clone().setLength(sn.Z_FIGHTING_OFFSET)),s.add(p);let g;p.mode==="behind"&&this.config.clickable!==!1&&(g=this.addObjectClickHandler(this,p,y=>{this.plugin.hooks.emit("click",{event:y,target:"TagContent",tag:this})}));const v=new od({target:c,props:{tag:this,hooks:this.plugin.hooks,state:this.plugin.state,mediaStore:this.plugin.mediaStore,temporaryState:this.plugin.temporaryState}});this.tag3DContentSvelte={svelteApp:v,domContainer:{css3DObject:p},css3DInstance:p,initialNormal:m,currentNormal:m,dispose:()=>{v.$destroy(),p.dispose(),g==null||g()}}}}return this.plugin.gltfObjectGroup.add(s),s}));this.state.unfolded=!0,na(this.five),this.loadModel().then(()=>this.updateVisible())}applyVisible(){var e,i;(e=this.tag3DContentSvelte)==null||e.svelteApp.$set({tag:this,state:this.plugin.state,temporaryState:this.plugin.temporaryState}),(i=this.model)!=null&&i.object&&(this.model.object.visible=this.visible)}set(...e){super.set(...e),this.loadModel()}setData(...e){var s;super.setData(...e);const i=this.data.mediaPosition.map(Lt);this.computeRenderType()==="Mesh"?this.mediaPlane&&this.mediaPlane.src!==this.data.mediaData[0].url&&(this.mediaPlane.removeFromParent(),this.mediaPlane=new Mh(this.data.mediaData[0].url,i,{objectFit:this.data.objectFit})):(s=this.tag3DContentSvelte)==null||s.svelteApp.$set({tag:this})}computeNormal(){return X1(this.data.mediaPosition)}}function rd(n,t,e){if(e){const s=new b.Vector3().subVectors(n.position,e).applyQuaternion(n.quaternion.clone().inverse()).applyQuaternion(t).add(e);n.position.copy(s)}n.quaternion.copy(t)}class ha extends bi{constructor(e,i){var s,o;super();f(this,"originObject3D");f(this,"onRender");f(this,"positionFrom");this.originObject3D=e,this.onRender=(s=i==null?void 0:i.onRender)!=null?s:()=>{},this.positionFrom=(o=i==null?void 0:i.positionFrom)!=null?o:"objectPosition"}get helperObject(){return this}render(){this.onRender()}enable(){this.parent.children.includes(this)||this.parent.add(this)}disable(){this.removeFromParent()}show(){this.visible=!0,this.render()}hide(){this.visible=!1,this.render()}raycasterIntersectObject(e,i=[]){return e.intersectObject(this,!0,i)}initialPosition(e){var i,s;this.positionFrom==="objectPosition"?this.position.copy(this.originObject3D.position):this.positionFrom==="boundingBox"?this.position.copy((i=$s(this.originObject3D))==null?void 0:i.getCenter(new b.Vector3).applyMatrix4(this.originObject3D.matrixWorld)):this.positionFrom==="boundingSphere"?this.position.copy((s=ov(this.originObject3D))==null?void 0:s.center.clone().applyMatrix4(this.originObject3D.matrixWorld)):this.positionFrom instanceof G.Vector3?this.position.copy(this.positionFrom):this.positionFrom instanceof Function&&this.position.copy(this.positionFrom(this.originObject3D)),e&&this.position.add(e)}setScaleByCamera(e){}initQuaternion(e){if(this.quaternion.copy(this.originObject3D.quaternion),e&&(e.xAxis||e.yAxis||e.zAxis)){const i=e.xAxis instanceof Function?e.xAxis():e.xAxis,s=e.yAxis instanceof Function?e.yAxis():e.yAxis,o=e.zAxis instanceof Function?e.zAxis():e.zAxis;let r=i==null?void 0:i.clone(),a=s==null?void 0:s.clone(),l=o==null?void 0:o.clone();if(r&&!a&&!a){const c=new b.Quaternion().setFromUnitVectors(new b.Vector3(1,0,0),r.normalize());this.applyQuaternion(c)}if(a&&!r&&!l){const c=new b.Quaternion().setFromUnitVectors(new b.Vector3(0,1,0),a.normalize());this.applyQuaternion(c)}if(l&&!r&&!a){const c=new b.Quaternion().setFromUnitVectors(new b.Vector3(0,0,1),l.normalize());this.applyQuaternion(c)}if([r,a,l].filter(Ge).length>=2){r||(r=new b.Vector3().crossVectors(a,l).normalize()),a||(a=new b.Vector3().crossVectors(r,l).normalize()),l||(l=new b.Vector3().crossVectors(r,a).normalize()),r.applyQuaternion(this.quaternion),a.applyQuaternion(this.quaternion),l.applyQuaternion(this.quaternion);const c=new b.Matrix4().makeBasis(r,a,l),h=new b.Quaternion().setFromRotationMatrix(c);this.quaternion.copy(h)}}}applyHelperScaleMatrix4(e,i){this.scale.applyMatrix4(e)}setHelperQuaternion(e,i){this.initQuaternion(),rd(this,this.quaternion.clone().premultiply(e),i)}applyHelperQuaternion(e,i){if(i){const s=new G.Vector3().subVectors(this.position,i).applyQuaternion(e).add(i);this.position.copy(s)}this.applyQuaternion(e)}dispose(){this.removeFromParent()}}class q9 extends ha{}class J9 extends ha{}class K9 extends ha{}class $9 extends ha{}class eT extends ha{}class Py extends b.Group{constructor(e){super();f(this,"direction");this.direction=e||"x"}}class Sg extends b.Mesh{constructor(e,i,s){super(e,i);f(this,"direction");this.direction=s||"x"}}function tT(n,t){const{offsetWidth:e,offsetHeight:i}=t,{top:s,left:o}=t.getBoundingClientRect();return Object.assign(new b.Vector2,{x:(n.x-o)/e*2-1,y:-(n.y-s)/i*2+1})}function $l(n,t,e){if(!t||!e||!n)return;const i=tT(t,e);if(Math.abs(i.x)===1||Math.abs(i.y)===1)return;const s=new b.Raycaster;return s.setFromCamera(i,n),s.params.Points.threshold=.1,s}const Qi={ROTATE_HELPER:9992,MOVE_HELPER:9993,SCALE_HELPER_LINE:9994,SCALE_HELPER_SPHERE:9995,MOVE_HELPER_ARROW:10001,MOVE_HELPER_CENTER:10002,DRAG_GUIDE_LINE:10003,DRAG_FACE_PATCH:10004};class _c extends Py{constructor(e){var h;super(e.direction);f(this,"line");f(this,"arrow");f(this,"lineHeight",.4);f(this,"arrowHeight",.1);f(this,"name","ArrowGroup");const i=new b.Color((h=e.color)!=null?h:16214315),s=new b.MeshBasicMaterial({color:i,transparent:!0,opacity:1,depthTest:!1,depthWrite:!1}),o=new b.ConeGeometry(.04,.1,32),r=new Sg(o,s.clone(),e.direction);r.name=`arrow-${e.direction}`,r.renderOrder=Qi.MOVE_HELPER_ARROW,this.arrow=r;const a=.004,l=new b.CylinderGeometry(a,a,.4,32),c=new Sg(l,s.clone(),e.direction);c.name=`line-${e.direction}`,c.renderOrder=Qi.MOVE_HELPER_ARROW,this.line=c,this.formatArrow(),this.formatLine(),this.add(this.arrow,this.line)}formatArrow(){this.arrow.geometry.translate(0,this.lineHeight+this.arrowHeight/2,0),this.direction==="x"?(this.arrow.geometry.rotateX(Math.PI/2),this.arrow.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.arrow.geometry.rotateX(Math.PI/2)}formatLine(){this.line.geometry.translate(0,this.lineHeight/2,0),this.direction==="x"?(this.line.geometry.rotateX(Math.PI/2),this.line.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.line.geometry.rotateX(Math.PI/2)}}class Cy extends Py{constructor(e){var a,l;super("plane");f(this,"cube");f(this,"name","CenterHandle");f(this,"faceMaterials");f(this,"baseColor");f(this,"faceNormals",[new b.Vector3(1,0,0),new b.Vector3(-1,0,0),new b.Vector3(0,1,0),new b.Vector3(0,-1,0),new b.Vector3(0,0,1),new b.Vector3(0,0,-1)]);this.baseColor=new b.Color((a=e==null?void 0:e.color)!=null?a:16419862);const i=(l=e==null?void 0:e.size)!=null?l:.05,s=new b.Color(16755008).convertSRGBToLinear();this.faceMaterials=Array.from({length:6},()=>new b.MeshBasicMaterial({color:s,transparent:!0,opacity:1,depthTest:!1,depthWrite:!1,side:b.FrontSide}));const o=new b.BoxGeometry(i,i,i),r=new b.Mesh(o,this.faceMaterials);r.direction="plane",r.renderOrder=Qi.MOVE_HELPER_CENTER,r.name="center-plane-handle",this.cube=r,this.add(this.cube)}update(e){const i=new b.Vector3().subVectors(e.position,this.cube.getWorldPosition(new b.Vector3)).normalize(),s=this.cube.getWorldQuaternion(new b.Quaternion),o=this.faceNormals.map((a,l)=>{const h=a.clone().applyQuaternion(s).dot(i);return{index:l,angle:Math.acos(Math.abs(h))}});o.sort((a,l)=>a.angle-l.angle);const r=[new b.Color(16755008).convertSRGBToLinear(),new b.Color(16419862).convertSRGBToLinear(),new b.Color(13921032).convertSRGBToLinear()];o.forEach((a,l)=>{const c=Math.floor(l/2);this.faceMaterials[a.index].color.copy(r[c])})}}const Vc={X:16730698,Y:54927,Z:3368703};class zo{static get X(){return new b.Color(Vc.X).convertSRGBToLinear().clone()}static get Y(){return new b.Color(Vc.Y).convertSRGBToLinear().clone()}static get Z(){return new b.Color(Vc.Z).convertSRGBToLinear().clone()}}function ad(n,t,e){const r=n.position.distanceTo(t),a=n.fov,l=n.distance||3,c=r/3,h=a/90,u=l/3,d=c*h*u,p=(e==null?void 0:e.min)||.6,m=e==null?void 0:e.max;return p&&d<p?p:m&&d>m?m:d}function iT(n,t,e){return n<t?t:n>e?e:n}function nT(n){let t=n.pose.latitude,e=n.pose.longitude;if(yi(t)||yi(e)){const i=n.matrix.elements;t=Math.asin(iT(i[9],-1,1)),Math.abs(i[9])<.9999999?e=rh(Math.atan2(i[8],i[10])):e=rh(Math.atan2(-i[2],i[0]))}return{latitude:t,longitude:e}}function sT(n){const{latitude:t,longitude:e}=n,i=new b.Vector3;return Tg-t<.03?i.set(0,1,0):Fc(0,e)?i.set(0,0,1):Fc(Math.PI,e)?i.set(0,0,-1):Fc(Tg,e)?i.set(1,0,0):i.set(-1,0,0),i}const Tg=Number((Math.PI/2).toFixed(5));function Fc(n,t){return typeof n!="number"||typeof t!="number"?!1:Math.abs(n-t)<.001}class oT extends q9{constructor(e,i){super(e,i);f(this,"name","MoveHelper");f(this,"xArrow");f(this,"yArrow");f(this,"zArrow");f(this,"centerHandle");i.xArrowEnable!==!1&&(this.xArrow=new _c({direction:"x",color:zo.X})),i.yArrowEnable!==!1&&(this.yArrow=new _c({direction:"y",color:zo.Y})),i.zArrowEnable!==!1&&(this.zArrow=new _c({direction:"z",color:zo.Z})),i.centerHandleEnable!==!1&&(this.centerHandle=new Cy),this.add(...[this.xArrow,this.yArrow,this.zArrow,this.centerHandle].filter(Boolean))}update(e){this.xArrow&&(this.xArrow.visible=!0),this.yArrow&&(this.yArrow.visible=!0),this.zArrow&&(this.zArrow.visible=!0),this.centerHandle&&this.centerHandle.update(e);const i=this.helperObject.position.clone().sub(e.position).normalize(),s=new b.Vector3(1,0,0).applyQuaternion(this.quaternion),o=new b.Vector3(0,1,0).applyQuaternion(this.quaternion),r=new b.Vector3(0,0,1).applyQuaternion(this.quaternion);if(e.type==="OrthographicCamera"){const a=nT(e),l=sT(a),c=.0872665;Math.abs(s.angleTo(l)-0)<c||Math.abs(s.angleTo(l)-Math.PI)<c?this.xArrow&&(this.xArrow.visible=!1):Math.abs(o.angleTo(l)-0)<c||Math.abs(o.angleTo(l)-Math.PI)<c?this.yArrow&&(this.yArrow.visible=!1):(Math.abs(r.angleTo(l)-0)<c||Math.abs(r.angleTo(l)-Math.PI)<c)&&this.zArrow&&(this.zArrow.visible=!1)}if(e.type!=="OrthographicCamera"){const a=i.angleTo(s),l=i.angleTo(o),c=i.angleTo(r),h=Math.PI/2,u=l<h,d=c<h,p=a<h;this.xArrow&&(p?(this.xArrow.scale.x=-1,this.xArrow.scale.y=1,this.xArrow.scale.z=1):(this.xArrow.scale.x=1,this.xArrow.scale.y=1,this.xArrow.scale.z=1)),this.yArrow&&(u?(this.yArrow.scale.x=1,this.yArrow.scale.y=-1,this.yArrow.scale.z=1):(this.yArrow.scale.x=1,this.yArrow.scale.y=1,this.yArrow.scale.z=1)),this.zArrow&&(d?(this.zArrow.scale.x=1,this.zArrow.scale.y=1,this.zArrow.scale.z=-1):(this.zArrow.scale.x=1,this.zArrow.scale.y=1,this.zArrow.scale.z=1))}}show(){super.show(),this.xArrow&&this.add(this.xArrow),this.yArrow&&this.add(this.yArrow),this.zArrow&&this.add(this.zArrow),this.centerHandle&&this.add(this.centerHandle)}setScaleByCamera(e){this.scale.setScalar(ad(e,this.position))}showDraggingHelper(e){this.xArrow&&(e.includes("x")?this.add(this.xArrow):this.remove(this.xArrow)),this.yArrow&&(e.includes("y")?this.add(this.yArrow):this.remove(this.yArrow)),this.zArrow&&(e.includes("z")?this.add(this.zArrow):this.remove(this.zArrow)),this.centerHandle&&(e.includes("plane")?this.add(this.centerHandle):this.remove(this.centerHandle))}dispose(){this.remove(...[this.xArrow,this.yArrow,this.zArrow,this.centerHandle].filter(Boolean)),super.dispose()}}function Hs(n,t){return rT(document.createElement(t!=null?t:"div"),n)}function rT(n,t){if(!t)return n;for(const e in t)e&&t[e]&&(n.style[e]=t[e]);return n}function aT(n){const t=Hs(V({position:"absolute",display:"block",borderRadius:"4px",paddingTop:"1px",paddingBottom:"1px",paddingLeft:"4px",paddingRight:"4px",pointerEvents:"none",userSelect:"none",zIndex:"99999",backgroundColor:"rgba(0,0,0,0.7)",fontSize:"12px",color:"#fff",letterSpacing:"0",lineHeight:"18px"},n)),e=()=>{t.style.display!=="block"&&t.style.top&&t.style.left&&(t.style.display="block")};return{element:t,show:e,hide:()=>{t.style.display="none",t.style.top="",t.style.left=""},setLeftTop:(o,r)=>{t.style.left=o,t.style.top=r,e()}}}class lT extends K9{constructor(e,i){super(e,i);f(this,"name","RotateHelper");f(this,"xCircle");f(this,"yCircle");f(this,"zCircle");f(this,"children",[]);f(this,"angleTips");f(this,"container");(i==null?void 0:i.yzCircleEnable)!==!1&&(this.xCircle=new Bc({direction:"x",color:zo.X})),(i==null?void 0:i.xzCircleEnable)!==!1&&(this.yCircle=new Bc({direction:"y",color:zo.Y})),(i==null?void 0:i.xyCircleEnable)!==!1&&(this.zCircle=new Bc({direction:"z",color:zo.Z})),i!=null&&i.container&&(i==null?void 0:i.angleTipsEnable)!==!1&&(this.container=i==null?void 0:i.container,this.angleTips=aT({display:"none"}),this.container.appendChild(this.angleTips.element)),this.add(...[this.xCircle,this.yCircle,this.zCircle].filter(Boolean)),this.show()}hide(){this.children.forEach(e=>e.hide())}show(){var e;this.children.forEach(i=>i.showCircle()),(e=this.angleTips)==null||e.hide()}setScaleByCamera(e){this.scale.setScalar(ad(e,this.position))}update(e){if(e.type==="OrthographicCamera")return;const i=this.helperObject.position.clone().sub(e.position).normalize(),s=new b.Vector3(1,0,0).applyQuaternion(this.quaternion),o=new b.Vector3(0,1,0).applyQuaternion(this.quaternion),r=new b.Vector3(0,0,1).applyQuaternion(this.quaternion),a=i.angleTo(s),l=i.angleTo(o),c=i.angleTo(r),h=Math.PI/2,u=l>=h,d=c>=h,p=a>=h;if(this.xCircle){const m=this.xCircle.circle.gapAngle;u&&d?this.xCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,m,Math.PI/2-m*2):u&&!d?this.xCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,Math.PI/2+m,Math.PI/2-m*2):!u&&d?this.xCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,Math.PI/2*3+m,Math.PI/2-m*2):!u&&!d&&(this.xCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,Math.PI+m,Math.PI/2-m*2)),this.xCircle.angleSector&&(this.xCircle.angleSector.offsetAngle=g=>g,u&&d?this.xCircle.angleSector.baseAxes=new b.Vector3(0,0,1):u&&!d?this.xCircle.angleSector.baseAxes=new b.Vector3(0,0,1):!u&&d?(this.xCircle.angleSector.baseAxes=new b.Vector3(0,-1,0),this.xCircle.angleSector.offsetAngle=g=>g-Math.PI/2):!u&&!d&&(this.xCircle.angleSector.baseAxes=new b.Vector3(0,0,-1),this.xCircle.angleSector.offsetAngle=g=>g-Math.PI))}if(this.yCircle){this.yCircle.angleSector.offsetAngle=g=>g;const m=this.yCircle.circle.gapAngle;p&&d?this.yCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,m,Math.PI/2-m*2):p&&!d?this.yCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,Math.PI/2*3+m,Math.PI/2-m*2):!p&&d?this.yCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,Math.PI/2+m,Math.PI/2-m*2):!p&&!d&&(this.yCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,Math.PI+m,Math.PI/2-m*2)),p&&d?this.yCircle.angleSector.baseAxes=new b.Vector3(1,0,0):p&&!d?(this.yCircle.angleSector.baseAxes=new b.Vector3(0,0,-1),this.yCircle.angleSector.offsetAngle=g=>g-Math.PI/2):!p&&d?(this.yCircle.angleSector.baseAxes=new b.Vector3(0,0,1),this.yCircle.angleSector.offsetAngle=g=>g+Math.PI/2):!p&&!d&&(this.yCircle.angleSector.baseAxes=new b.Vector3(-1,0,0),this.yCircle.angleSector.offsetAngle=g=>g+Math.PI)}if(this.zCircle){this.zCircle.angleSector.offsetAngle=g=>g;const m=this.zCircle.circle.gapAngle;p&&u?this.zCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,m,Math.PI/2-m*2):p&&!u?this.zCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,Math.PI/2*3+m,Math.PI/2-m*2):!p&&u?this.zCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,Math.PI/2+m,Math.PI/2-m*2):!p&&!u&&(this.zCircle.circle.geometry=new b.RingGeometry(.25,.3,20,8,Math.PI+m,Math.PI/2-m*2)),this.zCircle.angleSector&&(p&&u?this.zCircle.angleSector.baseAxes=new b.Vector3(1,0,0):p&&!u?(this.zCircle.angleSector.baseAxes=new b.Vector3(0,-1,0),this.zCircle.angleSector.offsetAngle=g=>g-Math.PI/2):!p&&u?(this.zCircle.angleSector.baseAxes=new b.Vector3(0,1,0),this.zCircle.angleSector.offsetAngle=g=>g+Math.PI/2):!p&&!u&&(this.zCircle.angleSector.baseAxes=new b.Vector3(-1,0,0),this.zCircle.angleSector.offsetAngle=g=>g+Math.PI))}}showDraggingHelper(e){var i;this.hide(),this.children.filter(s=>e.includes(s.direction)).forEach(s=>s.showRing()),(i=this.angleTips)==null||i.show()}dispose(){var e,i;this.removeFromParent(),(i=(e=this.angleTips)==null?void 0:e.element)==null||i.remove()}}class Bc extends b.Group{constructor(e){super();f(this,"direction");f(this,"circle");f(this,"ring");f(this,"angleSector");this.direction=e.direction,this.circle=new cT(e),this.ring=new hT(e),this.angleSector=new uT(e),this.add(this.circle,this.ring,this.angleSector),this.direction==="y"?this.rotation.x=Math.PI/2:this.direction==="x"&&(this.rotation.y=-Math.PI/2)}showCircle(){this.add(this.circle),this.remove(this.ring,this.angleSector)}showRing(){this.add(this.ring,this.angleSector),this.remove(this.circle)}hide(){this.remove(this.ring,this.angleSector,this.circle)}}let cT=class extends b.Mesh{constructor(e){var i;super();f(this,"direction");f(this,"gapAngle",.02);f(this,"geometry",new b.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new b.MeshBasicMaterial({opacity:.6,transparent:!0,color:(i=e.color)!=null?i:16777215,side:b.DoubleSide,depthTest:!1}),this.direction=e.direction,this.renderOrder=Qi.ROTATE_HELPER,this.geometry.name=`RotateHelperCircleGeometry-${this.direction}`}};class hT extends b.Group{constructor(e){super();f(this,"direction");this.direction=e.direction;const i=.015,s=new Array(8).fill(null).map((o,r)=>{const a=new b.RingGeometry(.25,.3,20,8,Math.PI/4*r+i,Math.PI/4-i*2),l=new b.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,depthWrite:!1,transparent:!0,side:b.DoubleSide}),c=new b.Mesh(a,l);return c.name=`AxesDashedRing-${this.direction}-${r}`,c});this.add(...s)}}class uT extends b.Mesh{constructor(e){var s;super();f(this,"direction");f(this,"baseAxes");f(this,"offsetAngle",e=>e);f(this,"angleDirection");switch(e.direction){case"x":this.baseAxes=new b.Vector3(0,0,1);break;case"y":this.baseAxes=new b.Vector3(1,0,0);break;case"z":this.baseAxes=new b.Vector3(1,0,0);break}const i=.3+5e-4;this.geometry=new b.CircleGeometry(i,48,0,1e-4),this.material=new b.MeshBasicMaterial({opacity:.4,color:(s=e.color)!=null?s:16777215,depthTest:!1,depthWrite:!1,transparent:!0,side:b.DoubleSide}),this.direction=e.direction,this.angleDirection=this.direction==="z"?1:-1}setClockwiseDirection(){this.angleDirection=-1}setCounterClockwiseDirection(){this.angleDirection=1}toggleDirection(){this.angleDirection=this.angleDirection===1?-1:1}setBaseAxes(e){this.baseAxes=e.clone().normalize()}getDirection(){return this.angleDirection===-1?"clockwise":"counterclockwise"}}function dT(){const n=Hs({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=Hs({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=Hs({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"absolute",border:"1px solid rgba(255,255,255,0.4)"});n.appendChild(t),t.appendChild(e);const i="-4px",s={direction:"nesw",element:es({cursor:"nesw-resize",left:i,bottom:i})},o={direction:"ns",element:es({cursor:"ns-resize",bottom:i})},r={direction:"nwse",element:es({cursor:"nwse-resize",right:i,bottom:i})},a={direction:"ew",element:es({cursor:"ew-resize",right:i})},l={direction:"nesw",element:es({cursor:"nesw-resize",right:i,top:i})},c={direction:"ns",element:es({cursor:"ns-resize",top:i})},h={direction:"nwse",element:es({cursor:"nwse-resize",left:i,top:i})},u={direction:"ew",element:es({cursor:"ew-resize",left:i})};return new Array(o,a,c,u,s,r,l,h).forEach(p=>t.appendChild(p.element)),{container:n,spheres:[s,o,r,a,l,c,h,u]}}function es(n){const t=Hs(V({background:"#FFFF00",width:"9px",height:"9px",position:"absolute",pointerEvents:"none",borderRadius:"50%"},n)),e=Hs({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),i=Hs({width:"15px",height:"15px",cursor:n==null?void 0:n.cursor,pointerEvents:"auto",background:"transparent"});return i.draggable=!0,e.appendChild(i),t.appendChild(e),t}const Ha=new Map;function My(n){if(Ha.has(n))return Ha.get(n).hooks;const t=new St;let e=null,i;const s=()=>{e=requestAnimationFrame(s);const r=n.projectionMatrix.toArray().join(",")+n.matrixWorld.toArray().join(",");r!==i&&(i=r,t.emit("cameraUpdate"))};s();const o=()=>{Ha.delete(n),cancelAnimationFrame(e)};return Ha.set(n,{hooks:t,dispose:o}),t}class fT extends eT{constructor(e,i,s,o){super(e);f(this,"name","CSS3DScaleHelper");f(this,"points",[]);f(this,"cornerPositions",[]);f(this,"css3DInstance");f(this,"plane");f(this,"css3DRenderer",new _o);f(this,"camera");f(this,"scene");f(this,"container");f(this,"enabled",!1);f(this,"initialScale");this.camera=s,this.scene=o,this.container=i,this.initRectangleScaleHelper()}get helperObject(){var e;if(!((e=this.css3DInstance)!=null&&e.css3DObject))throw new Error("css3DInstance is not initialized");return this.css3DInstance.css3DObject}initQuaternion(){this.quaternion.copy(this.originObject3D.quaternion)}applyMatrix4(e){var i;super.applyMatrix4(e),this.helperObject.applyMatrix4(e),(i=this.plane)==null||i.applyMatrix4(e),this.cornerPositions.forEach(s=>s.applyMatrix4(e))}showDraggingHelper(){}applyHelperScaleMatrix4(e,i){var s;(s=this.plane)==null||s.scale.applyMatrix4(e),this.helperObject.applyScaleMatrix4(e),setTimeout(()=>{this.updateSphereCorrection()},0)}updatePoints(){const e=this.calculatePointPosition(this.cornerPositions);this.points.forEach((i,s)=>{i.position.copy(e[s])})}update(e){var i;(i=this.css3DInstance)!=null&&i.css3DObject&&this.helperObject.position.copy(this.originObject3D.position),this.plane&&this.plane.position.copy(this.originObject3D.position),this.updatePoints(),this.css3DInstance&&this.css3DInstance.show(),this.plane&&(this.plane.visible=!0)}applyHelperQuaternion(e,i){var o;const s=(o=this.css3DInstance)==null?void 0:o.css3DObject;if(s){const r=new b.Vector3().subVectors(s.position,i).applyQuaternion(e).add(i);s.position.copy(r),s.applyQuaternion(e)}if(this.plane){const r=new b.Vector3().subVectors(this.plane.position,i).applyQuaternion(e).add(i);this.plane.position.copy(r),this.plane.applyQuaternion(e)}this.cornerPositions.forEach(r=>{const a=new b.Vector3().subVectors(r,i).applyQuaternion(e).add(i);r.copy(a)})}enable(){var e;this.enabled||(this.enabled=!0,(e=this.css3DInstance)==null||e.enable(),this.plane&&this.scene.add(this.plane))}disable(){var e;this.enabled&&(this.enabled=!1,(e=this.css3DInstance)==null||e.disable(),this.plane&&this.scene.remove(this.plane))}show(){var e;(e=this.css3DInstance)==null||e.show(),this.plane&&(this.plane.visible=!0)}hide(){var e;(e=this.css3DInstance)==null||e.hide(),this.plane&&(this.plane.visible=!1)}dispose(){this.disable(),this.css3DRenderer.dispose()}onScaleEnd(){My(this.camera).emit("cameraUpdate")}updateSphereCorrection(){if(!this.css3DInstance)return;this.initialScale||(this.initialScale={x:this.originObject3D.scale.x,y:this.originObject3D.scale.y});const e=this.originObject3D.scale,i=e.x/this.initialScale.x,s=e.y/this.initialScale.y,o=this.css3DInstance.css3DObject.container;o.style.setProperty("--parent-scaleX",i.toString()),o.style.setProperty("--parent-scaleY",s.toString())}initRectangleScaleHelper(){var a,l;const e=this.getCornerPositions();if(!e)return;this.cornerPositions=e;const i=this.css3DRenderer.create3DElement(this.camera,e,{ratio:.003});if(!i)return;this.css3DInstance=i,i.appendToElement(this.container);const s=i.css3DObject.container,{container:o,spheres:r}=dT();this.points=r.map((c,h)=>({direction:c.direction,point:c.element,position:this.calculatePointPosition(e)[h]})),s.insertBefore(o,(a=s.children[0])!=null?a:null),this.helperObject.position.copy(this.originObject3D.position),(l=this.plane)==null||l.position.copy(this.originObject3D.position)}getCornerPositions(){const{originObject3D:e}=this;if(e.isCSS3DObject&&e.cornerPoints)return e.cornerPoints;console.error("当前物体暂时不支持 ScaleHelper")}calculatePointPosition(e){return[e[0].clone(),e[0].clone().add(e[1]).divideScalar(2),e[1].clone(),e[1].clone().add(e[2]).divideScalar(2),e[2].clone(),e[2].clone().add(e[3]).divideScalar(2),e[3].clone(),e[3].clone().add(e[0]).divideScalar(2)]}}class pT extends J9{constructor(e){super(e);f(this,"name","BoundingBoxHelper");f(this,"box");f(this,"outline");f(this,"positionAttribute");this.positionAttribute=new b.BufferAttribute(new Float32Array(8*3),3),this.box=this.createBox(),this.outline=this.createOutline(),this.add(this.box,this.outline),this.update()}initQuaternion(){this.quaternion.copy(this.originObject3D.quaternion)}setHelperQuaternion(e,i){rd(this,e,i)}raycasterIntersectObject(e,i){return e.intersectObject(this,!1,i)}raycast(e,i){this.box.raycast(e,i)}update(){const e=$s(this.originObject3D);if(!e)return;const{min:i,max:s}=e;this.positionAttribute.setXYZ(0,s.x,s.y,s.z),this.positionAttribute.setXYZ(1,i.x,s.y,s.z),this.positionAttribute.setXYZ(2,i.x,i.y,s.z),this.positionAttribute.setXYZ(3,s.x,i.y,s.z),this.positionAttribute.setXYZ(4,s.x,s.y,i.z),this.positionAttribute.setXYZ(5,i.x,s.y,i.z),this.positionAttribute.setXYZ(6,i.x,i.y,i.z),this.positionAttribute.setXYZ(7,s.x,i.y,i.z),this.positionAttribute.needsUpdate=!0}createOutline(){const e=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new b.BufferGeometry;i.setIndex(new b.BufferAttribute(e,1)),i.setAttribute("position",this.positionAttribute);const s=new b.LineBasicMaterial({color:64767,linewidth:1,opacity:1,toneMapped:!1}),o=new b.LineSegments(i,s);return o.matrixAutoUpdate=!1,o}createBox(){const e=new Uint16Array([0,1,2,0,2,3,0,3,7,0,7,4,0,4,5,0,5,1,6,1,5,6,2,1,6,5,4,6,4,7,6,3,2,6,7,3]),i=new b.BufferGeometry;i.setIndex(new b.BufferAttribute(e,1)),i.setAttribute("position",this.positionAttribute);const s=new b.MeshBasicMaterial({color:64767,opacity:.1,depthTest:!1,transparent:!0});return new b.Mesh(i,s)}}class ua{constructor(t,e){f(this,"originObject3D");f(this,"hooks");f(this,"preventTapDefaultEvent",!1);f(this,"internalHooks");f(this,"disposers",[]);f(this,"helperObject3D");f(this,"camera");f(this,"model");f(this,"scene");f(this,"container");f(this,"domEvents");f(this,"isDragging",!1);f(this,"enabled",!1);f(this,"name","BaseController");f(this,"boundingBox");f(this,"config");f(this,"onRender");f(this,"cameraHooks");f(this,"otherControllers");f(this,"onWantsTapGesture",t=>{if(this.getIntersectObject(t))return!1});f(this,"updateHelperScale",()=>{"update"in this.helperObject3D&&typeof this.helperObject3D.update=="function"&&this.helperObject3D.update(this.camera),this.helperObject3D.setScaleByCamera(this.camera)});f(this,"getBox",()=>this.boundingBox?this.boundingBox:(this.boundingBox=$s(this.originObject3D),this.boundingBox));var h,u,d;this.hooks=(h=t.sharedHooks)!=null?h:new St,this.internalHooks=(u=t.sharedInternalHooks)!=null?u:new St,this.camera=t.camera,this.model=t.model,this.originObject3D=t.originObject3D,this.helperObject3D=t.helperObject3D,this.container=t.container,this.scene=t.scene,this.domEvents=t.domEvents,this.onRender=(d=t.onRender)!=null?d:()=>{},this.config=e!=null?e:{},this.otherControllers=t.otherControllers,this.initialHelperPosition(),this.initialHelperQuaternion(),this.updateHelperScale(),this.cameraHooks=My(this.camera),this.enable();const i=this.onSetOriginObjectScale.bind(this),s=this.onSetOriginObjectRotate.bind(this),o=this.onSetOriginObjectPosition.bind(this),r=this.onApplyOriginObjectScale.bind(this),a=this.onApplyOriginObjectRotate.bind(this),l=this.onApplyOriginObjectPosition.bind(this),c=this.initialHelperPosition.bind(this);this.cameraHooks.on("cameraUpdate",this.updateHelperScale),this.internalHooks.on("initialHelperPosition",c),this.internalHooks.on("setObjectScale",i),this.internalHooks.on("setObjectRotate",s),this.internalHooks.on("setObjectPosition",o),this.internalHooks.on("applyObjectPosition",l),this.internalHooks.on("applyObjectRotate",a),this.internalHooks.on("applyObjectScale",r),this.hooks.on("moveEnd",this.updateHelperScale),this.internalHooks.on("setObjectPosition",this.updateHelperScale),this.internalHooks.on("initialHelperPosition",this.updateHelperScale),this.disposers.push(()=>{this.cameraHooks.off("cameraUpdate",this.updateHelperScale),this.internalHooks.off("initialHelperPosition",c),this.internalHooks.off("setObjectScale",i),this.internalHooks.off("setObjectRotate",s),this.internalHooks.off("setObjectPosition",o),this.internalHooks.off("applyObjectPosition",l),this.internalHooks.off("applyObjectRotate",a),this.internalHooks.off("applyObjectScale",r),this.hooks.off("moveEnd",this.updateHelperScale),this.internalHooks.off("setObjectPosition",this.updateHelperScale),this.internalHooks.off("initialHelperPosition",this.updateHelperScale)})}updateOtherControllers(t){this.otherControllers=t}getIsDragging(){return this.isDragging}initialHelperPosition(){this.helperObject3D.initialPosition(this.calculateOffset(this.config.offset))}initialHelperQuaternion(){this.helperObject3D.initQuaternion(this.config)}enable(){this.enabled||(this.enabled=!0,this.scene.add(this.helperObject3D),this.helperObject3D.enable(),this.render())}disable(){this.enabled&&(this.enabled=!1,this.helperObject3D.disable(),this.render())}show(){this.helperObject3D.show(),this.render()}hide(){this.helperObject3D.hide(),this.render()}dispose(){var t;(t=this.disposers)==null||t.forEach(e=>e==null?void 0:e()),this.helperObject3D.dispose(),this.render()}applyHelperMatrix4(t){this.helperObject3D.applyMatrix4(t)}applyHelperQuaternion(t,e){this.helperObject3D.applyHelperQuaternion(t,e)}applyHelperScaleMatrix4(t,e){this.helperObject3D.applyHelperScaleMatrix4(t,e)}onWantsGesture(t,e,i){if(this.isDragging)return!1}onIntersectionOnModelUpdate(t){}onApplyOriginObjectScale(t){this.applyHelperScaleMatrix4(t.matrix,t.origin)}onApplyOriginObjectRotate(t){this.applyHelperQuaternion(t.quaternion,t.origin)}onApplyOriginObjectPosition(t){this.applyHelperMatrix4(t.matrix)}onSetOriginObjectScale(t){this.helperObject3D.scale.copy(t),this.updateOffsetByScale(t)}onSetOriginObjectRotate(t,e){this.helperObject3D.setHelperQuaternion(t,e)}onSetOriginObjectPosition(t){this.helperObject3D.position.copy(t.clone().add(this.calculateOffset(this.config.offset)))}render(){this.onRender()}updateOffsetByScale(t){if(this.boundingBox&&this.config.offset){const e=this.originObject3D.position,i=new b.Vector3().subVectors(this.boundingBox.max,e).multiply(t).add(e),s=new b.Vector3().subVectors(this.boundingBox.min,e).multiply(t).add(e),o=this.calculateOffset(this.config.offset,{min:s,max:i});this.helperObject3D.initialPosition(o)}}hoverListener(t,e=16777215,i=1){const s=ms(t).filter(Ge),o=[];for(const r of s)if(r.material||r instanceof b.Group){const a=r instanceof b.Group?r.children.filter(d=>d instanceof b.Mesh):[r];a.forEach(d=>{var p,m,g,v;Array.isArray(d.material)?(d.__originalColor__=(p=d.__originalColor__)!=null?p:d.material.map(y=>y.color.clone()),d.__originalOpacity__=(m=d.__originalOpacity__)!=null?m:d.material.map(y=>y.opacity)):(d.__originalColor__=(g=d.__originalColor__)!=null?g:d.material.color.clone(),d.__originalOpacity__=(v=d.__originalOpacity__)!=null?v:d.material.opacity)});const l=()=>{a.forEach(d=>{d.name==="ScaleHelperTransparentGroup"?d.children[0]&&(d.children[0].material.color.set(e),d.children[0].material.opacity=i):Array.isArray(d.material)?d.material.forEach(p=>{p.color.set(e),p.opacity=i}):(d.material.color.set(e),d.material.opacity=i)}),this.render()},c=()=>{a.forEach(d=>{if(d.name==="ScaleHelperTransparentGroup")d.children[0]&&(d.children[0].material.color.set(16776960),d.children[0].material.opacity=1);else if(Array.isArray(d.material)){const p=d.__originalColor__,m=d.__originalOpacity__;d.material.forEach((g,v)=>{p&&p[v]&&g.color.copy(p[v]),m&&m[v]!==void 0&&(g.opacity=m[v])})}else d.material.color.copy(d.__originalColor__),d.material.opacity=d.__originalOpacity__}),this.render()},h=d=>{this.isDragging||l()},u=d=>{this.isDragging||c()};for(const d of a)this.domEvents.addEventListener(d,"mouseover",h),this.domEvents.addEventListener(d,"mouseout",u),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",c),this.hooks.on("rotateEnd",c),this.hooks.on("scaleEnd",c),o.push(()=>{this.domEvents.removeEventListener(d,"mouseover",h),this.domEvents.removeEventListener(d,"mouseout",u),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",c),this.hooks.off("rotateEnd",c),this.hooks.off("scaleEnd",c)})}return()=>o.forEach(r=>r==null?void 0:r())}getIntersectObject(t){const e=this.camera.position,i=this.helperObject3D;if(!i)return;const s=this.helperObject3D.raycasterIntersectObject(t)[0];if(!s)return;const o=s;if(o.object=i,this.model.intersectRaycaster){const r=this.model.intersectRaycaster(t)[0];if(r&&r.point.distanceTo(e)<o.point.distanceTo(e))return}return o.object}calculateOffset(t,e){const i=new b.Vector3(0,0,0);if(!t)return i;const s=()=>e||this.getBox();if(typeof t.x=="number")i.setX(t.x);else if(typeof t.x=="object"){const o=s();i.setX((o.max.x-o.min.x)*t.x.percents)}if(typeof t.y=="number")i.setY(t.y);else if(typeof t.y=="object"){const o=s();i.setY((o.max.y-o.min.y)*t.y.percents)}if(typeof t.z=="number")i.setZ(t.z);else if(typeof t.z=="object"){const o=s();i.setZ((o.max.z-o.min.z)*t.z.percents)}return i}}function mT(n,t){let e=10,i=10;const s=n.isPerspectiveCamera,o=n.isOrthographicCamera;if(s){const u=n,d=u.position.distanceTo(t),p=u.fov*Math.PI/180;i=2*Math.tan(p/2)*d,e=i*u.aspect}else if(o){const u=n;e=Math.abs(u.right-u.left),i=Math.abs(u.top-u.bottom)}const r=Math.sqrt(e*e+i*i),a=r*.8,l=Math.min(e,i)*.25,c=r*1.2;return Math.max(l,Math.min(a,c))}class Iy{constructor(t,e,i){f(this,"camera");f(this,"container");f(this,"defaults");this.camera=t,this.container=e,this.defaults=V({},i||{})}createSolidLine(t,e,i){const s=V(V({color:16777215,renderOrder:Qi.DRAG_GUIDE_LINE},this.defaults),i||{}),o=e.clone().normalize(),r=this.computeInfiniteLineLength(t),a=t.clone().add(o.clone().multiplyScalar(-r)),l=t.clone().add(o.clone().multiplyScalar(r)),c=new Float32Array([a.x,a.y,a.z,l.x,l.y,l.z]),h=new b.BufferGeometry;h.setAttribute("position",new b.BufferAttribute(c,3));const u=new b.LineBasicMaterial({color:s.color,depthTest:!1,depthWrite:!1,transparent:!0,opacity:.65}),d=new b.Line(h,u);return d.renderOrder=s.renderOrder,d}updateSolidLine(t,e,i,s){const o=i.clone().normalize(),r=this.computeInfiniteLineLength(e),a=e.clone().add(o.clone().multiplyScalar(-r)),l=e.clone().add(o.clone().multiplyScalar(r)),c=new Float32Array([a.x,a.y,a.z,l.x,l.y,l.z]),h=t.geometry,u=h.getAttribute("position");u&&u.itemSize===3&&u.array.length===c.length?(u.array.set(c),u.needsUpdate=!0):h.setAttribute("position",new b.BufferAttribute(c,3)),(s==null?void 0:s.color)!==void 0&&t.material.color.setHex(s.color)}computeInfiniteLineLength(t){return mT(this.camera,t)*10}dispose(t){if(!t)return;t.geometry.dispose();const e=t.material;Array.isArray(e)?e.forEach(i=>i.dispose()):e.dispose()}updateDefaults(t){this.defaults=V(V({},this.defaults),t)}}var O0,j0;let gT=class extends ua{constructor(...e){super(...e);f(this,"name","MoveController");f(this,"startInfo");f(this,"dragGuideLine");f(this,"solidGuide",new Iy(this.camera,this.container,(j0=(O0=this.config)==null?void 0:O0.solidGuide)!=null?j0:{}));f(this,"_moveByMouse",{enabled:!1});f(this,"mouseInfo");f(this,"mousedownEventListenerDisposer");f(this,"dragStart",e=>{if(this.moveByMouseEnable||this.isDragging)return;const i=e==null?void 0:e.intersect;if(!i)return this.dragEnd();const s=(i==null?void 0:i.object).direction;if(!s)return this.dragEnd();const o=new b.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new b.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new b.Vector3(0,0,1).applyQuaternion(this.helperObject3D.quaternion),l=(()=>{switch(s){case"x":return o;case"y":return r;case"z":return a;case"plane":return}})(),c=i.point.clone();if(s==="plane"){const u=this.camera.position.clone(),d=c.clone(),p=d.clone().sub(u).normalize(),m=new b.Plane().setFromNormalAndCoplanarPoint(p,d),g=d.clone();this.startInfo={draggingDirection:s,startVectorProject:g,line:new b.Line3(g.clone(),g.clone()),plane:m}}else{const u=new b.Line3(c.clone().sub(l.normalize()),c.clone().add(l.normalize()));this.startInfo={draggingDirection:s,startVectorProject:c,line:u};try{const d=l.clone().normalize(),p=this.helperObject3D.getWorldPosition(new b.Vector3),m=this.solidGuide.createSolidLine(p,d,{color:16777215,renderOrder:Qi.DRAG_GUIDE_LINE});this.scene.add(m),this.dragGuideLine=m}catch(d){}}const h=s==="plane"?[]:[s];this.helperObject3D.showDraggingHelper(h),this.hooks.emit("moveStart",s),this.isDragging=!0});f(this,"dragging",e=>{if(!this.isDragging||!this.startInfo)return;const i="touches"in e?e.touches[0].clientX:e.x,s="touches"in e?e.touches[0].clientY:e.y,o=$l(this.camera,{x:i,y:s},this.container);return o?(this.move(o),!1):this.dragEnd()});f(this,"dragEnd",()=>{if(this.isDragging){if(this.startInfo=void 0,this.isDragging=!1,this.dragGuideLine){this.scene.remove(this.dragGuideLine),this.dragGuideLine.geometry.dispose();const e=this.dragGuideLine.material;Array.isArray(e)?e.forEach(i=>i.dispose()):e.dispose(),this.dragGuideLine=void 0}this.helperObject3D.show(),this.hooks.emit("moveEnd")}});const i=this.helperObject3D;if(this.hoverListener([i.xArrow,i.yArrow,i.zArrow]),i.centerHandle&&i.centerHandle instanceof Cy){const a=i.centerHandle,l=a.cube,c=16777215,h=()=>{this.isDragging||(Array.isArray(l.material)&&l.material.forEach(d=>{d.color.set(c)}),this.render())},u=()=>{this.isDragging||(a.update(this.camera),this.render())};this.domEvents.addEventListener(l,"mouseover",h),this.domEvents.addEventListener(l,"mouseout",u)}const s=this.show.bind(this),o=this.hide.bind(this),r=()=>{this.helperObject3D.update(this.camera),this.isDragging&&this.updateDragGuideLineScale(),this.render()};r(),this.domEvents.addEventListener(this.helperObject3D,"mousedown",this.dragStart),document.addEventListener("mousemove",this.dragging),document.addEventListener("mouseup",this.dragEnd),this.domEvents.addEventListener(this.helperObject3D,"touchstart",this.dragStart),document.addEventListener("touchmove",this.dragging),document.addEventListener("touchend",this.dragEnd),this.hooks.on("rotateStart",o),this.hooks.on("rotateEnd",s),this.hooks.on("scaleStart",o),this.hooks.on("scaleEnd",s),this.hooks.on("moveByMouseEnable",o),this.hooks.on("moveByMouseDisable",s),this.hooks.on("updateOtherHelpers",a=>{this.helperObject3D.update(a.camera),this.render()}),this.cameraHooks.on("cameraUpdate",r),this.disposers.push(()=>{this.domEvents.removeEventListener(this.helperObject3D,"mousedown",this.dragStart),document.removeEventListener("mousemove",this.dragging),document.removeEventListener("mouseup",this.dragEnd),this.domEvents.removeEventListener(this.helperObject3D,"touchstart",this.dragStart),document.removeEventListener("touchmove",this.dragging),document.removeEventListener("touchend",this.dragEnd),this.hooks.off("rotateStart",o),this.hooks.off("rotateEnd",s),this.hooks.off("scaleStart",o),this.hooks.off("scaleEnd",s),this.hooks.off("moveByMouseEnable",o),this.hooks.off("moveByMouseDisable",s),this.hooks.off("updateOtherHelpers"),this.cameraHooks.off("cameraUpdate",r)}),this.moveByMouseEnable&&this.moveByMouse()}get moveByMouseEnable(){return this._moveByMouse.enabled}dispose(){var e;super.dispose(),(e=this.disposers)==null||e.forEach(i=>i==null?void 0:i())}moveByMouse(e){this._moveByMouse={enabled:!0,useFaceNormal:e==null?void 0:e.useFaceNormal},this.preventTapDefaultEvent=!0;const i=this.handleMouseDown.bind(this),s=this.handleMouseUp.bind(this);this.hooks.emit("moveByMouseEnable"),setTimeout(()=>{this.container.addEventListener("mousedown",i),this.container.addEventListener("mouseup",s)}),this.mousedownEventListenerDisposer=()=>{this.container.removeEventListener("mousedown",i),this.container.removeEventListener("mouseup",s)}}disableMoveByMouse(){var e;this._moveByMouse={enabled:!1},this.preventTapDefaultEvent=!1,this.hooks.emit("moveByMouseDisable"),(e=this.mousedownEventListenerDisposer)==null||e.call(this)}onIntersectionOnModelUpdate(e){var r,a,l;if(!this.moveByMouseEnable)return;const{point:i,face:s}=e;if(!this.hooks.emit("wantToMove",i)){if(this.originObject3D.position.copy(i),(this._moveByMouse.useFaceNormal===!0||typeof this._moveByMouse.useFaceNormal=="object"&&this._moveByMouse.useFaceNormal.enable!==!1)&&s!=null&&s.normal){const c=(()=>typeof this._moveByMouse.useFaceNormal=="object"&&this._moveByMouse.useFaceNormal.alignmentVector?this._moveByMouse.useFaceNormal.alignmentVector:{x:0,y:1,z:0})(),h=new b.Vector3((r=c.x)!=null?r:0,(a=c.y)!=null?a:0,(l=c.z)!=null?l:0),u=(()=>typeof this._moveByMouse.useFaceNormal=="object"&&this._moveByMouse.useFaceNormal.fixedFaceNormal?this._moveByMouse.useFaceNormal.fixedFaceNormal(s.normal):s.normal)();this.originObject3D.quaternion.setFromUnitVectors(h,u),this.internalHooks.emit("setObjectRotate",this.originObject3D.quaternion.clone())}this.internalHooks.emit("setObjectPosition",i),this.hooks.emit("move",i)}}handleMouseDown(e){const{x:i,y:s}=e;this.mouseInfo={x:i,y:s,mouseDownTimestamp:Date.now()}}handleMouseUp(e){if(!this.mouseInfo)return;const{x:i,y:s}=e;this.mouseInfo.x===i&&this.mouseInfo.y===s&&Date.now()-this.mouseInfo.mouseDownTimestamp<500&&(this.disableMoveByMouse(),this.mouseInfo=void 0)}updateDragGuideLineScale(){if(!this.dragGuideLine||!this.startInfo)return;const{line:e}=this.startInfo,i=e.end.clone().sub(e.start).normalize();if(i.lengthSq()<1e-6)return;const s=this.helperObject3D.getWorldPosition(new b.Vector3);this.solidGuide.updateSolidLine(this.dragGuideLine,s,i)}move(e){var g;if(!this.startInfo)return this.dragEnd();const{line:i,startVectorProject:s}=this.startInfo,o=this.originObject3D,r=this.startInfo.draggingDirection==="plane";let a;if(r){const v=this.startInfo.plane;if(!v)return;const y=new b.Vector3,w=v.normal.dot(e.ray.direction);if(Math.abs(w)<1e-6)return;const C=-(v.normal.dot(e.ray.origin)+v.constant)/w;if(C<0)return;y.copy(e.ray.origin.clone().add(e.ray.direction.clone().multiplyScalar(C))),a=y}else a=Ln({raycaster:e,line:i,clampToLine:!1});const l=o.position.clone(),c=a.clone().sub(s),h=new b.Matrix4;h.setPosition(c);const u=o.position.clone().applyMatrix4(h);if(this.hooks.emit("wantToMove",u))return;const p=(g=this.hooks.emitWithResult("moveBefore",u))!=null?g:u,m=new b.Matrix4;m.setPosition(p.clone().sub(l)),o.position.copy(p),s.copy(a),this.internalHooks.emit("applyObjectPosition",{matrix:m}),this.hooks.emit("move",p)}};class Pr{constructor(t,e,i,s,o,r,a,l,c){f(this,"helperController");f(this,"five");f(this,"onFiveWantsTapGesture",t=>{if(!this.helperController)return;if(this.helperController.preventTapDefaultEvent)return!1;const e=this.helperController.onWantsTapGesture(t);return this.five.needsRender=!0,e});f(this,"onFiveWantsGesture",(...t)=>{if(!this.helperController)return;const e=this.helperController.onWantsGesture(...t);return this.five.needsRender=!0,e});f(this,"onFiveIntersectionOnModelUpdate",(...t)=>{this.helperController&&this.helperController.onIntersectionOnModelUpdate(...t)});const{camera:h,model:u,scene:d}=t,p=t.getElement();if(this.five=t,!h||!u||!p||!d)return;const m=()=>{t.needsRender=!0};this.helperController=new i({camera:h,model:u,domEvents:e,originObject3D:s,helperObject3D:o,container:p,scene:d,onRender:m,sharedHooks:a,sharedInternalHooks:l,otherControllers:c},r),t.on("wantsTapGesture",this.onFiveWantsTapGesture),t.on("wantsGesture",this.onFiveWantsGesture),t.on("intersectionOnModelUpdate",this.onFiveIntersectionOnModelUpdate)}dispose(){var t;this.five.off("wantsTapGesture",this.onFiveWantsTapGesture),this.five.off("wantsGesture",this.onFiveWantsGesture),this.five.off("intersectionOnModelUpdate",this.onFiveIntersectionOnModelUpdate),(t=this.helperController)==null||t.dispose()}}const vT="v1.0.1",yT="Object3DHelper",ld=`${yT}@${vT}`,bT=()=>{console.error(`${ld} is disposed`)},AT=()=>{console.warn(`${ld} is disabled`)},wT=()=>{console.error(`${ld} is disabled`)};class PT{constructor(t){f(this,"controllers",{});f(this,"state",{visible:!0,enabled:!0,disposed:!1});f(this,"hooks",new St);f(this,"eventListener",{});t&&this.addControllers(t),this.setState(this.state)}show(t){return $(this,null,function*(){this.setState({visible:!0},t)})}hide(t){return $(this,null,function*(){this.setState({visible:!1},t)})}enable(t){this.setState({enabled:!0},t)}disable(t){this.setState({enabled:!1},t)}dispose(){this.setState({disposed:!0})}setState(t,e){if(this.state.disposed)return bT();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return wT();const i=V({},this.state);this.state=V(V({},this.state),t),t.disposed!==void 0&&t.disposed!==i.disposed&&t.disposed&&this.handleDispose(),t.visible!==void 0&&this.handleVisible(t.visible),t.enabled!==void 0&&this.handleEnable(t.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:i})}addControllers(t){this.controllers=V(V({},this.controllers),t),this.setState(this.state)}initialHelperMatrix(){this.everyControllerDo(t=>{t.initialHelperPosition(),t.initialHelperQuaternion()})}getCurrentState(){return this.state}handleEnable(t,e=!0){t?(this.everyControllerDo(i=>{i.enable()}),this.hooks.emit("enable",{userAction:e})):(this.everyControllerDo(i=>{i.disable()}),this.hooks.emit("disable",{userAction:e})),this.state.enabled=t}handleVisible(t,e=!0){t?(this.everyControllerDo(i=>{i.show()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:e}))):(this.everyControllerDo(i=>{i.hide()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:e}))),this.state.visible=t}everyControllerDo(t){Object.values(this.controllers).forEach(e=>{e&&t(e)})}handleDispose(){var t,e;Object.values(this.controllers).forEach(i=>{i==null||i.dispose()});for(const i in this.controllers){if(!i)continue;const s=i;(e=(t=this.eventListener)[s])==null||e.call(t)}}actionIfStateIsEnabled(t,e){if(this.state.enabled)return t();e!=null&&e.warnLog&&AT()}}function Ao(n){return n*Math.PI/180}let Hc=new b.Quaternion;class CT extends ua{constructor(...e){var h,u,d;super(...e);f(this,"name","RotateController");f(this,"startInfo");f(this,"removeListener");const i=this.helperObject3D;this.hoverListener([(h=i.xCircle)==null?void 0:h.circle,(u=i.yCircle)==null?void 0:u.circle,(d=i.zCircle)==null?void 0:d.circle].filter(Boolean));const s=this.dragStart.bind(this),o=this.dragging.bind(this),r=this.dragEnd.bind(this),a=this.show.bind(this),l=this.hide.bind(this),c=()=>{this.helperObject3D.update(this.camera),this.render()};c(),this.domEvents.addEventListener(this.helperObject3D,"mousedown",s),document.addEventListener("mousemove",o),document.addEventListener("mouseup",r),this.domEvents.addEventListener(this.helperObject3D,"touchstart",s),document.addEventListener("touchmove",o),document.addEventListener("touchend",r),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",a),this.hooks.on("scaleStart",l),this.hooks.on("scaleEnd",a),this.hooks.on("moveByMouseEnable",l),this.hooks.on("moveByMouseDisable",a),this.hooks.on("updateOtherHelpers",p=>{this.helperObject3D.update(p.camera),this.render()}),this.cameraHooks.on("cameraUpdate",c),this.disposers.push(()=>{this.domEvents.removeEventListener(this.helperObject3D,"mousedown",s),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r),this.domEvents.removeEventListener(this.helperObject3D,"touchstart",s),document.removeEventListener("touchmove",o),document.removeEventListener("touchend",r),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",a),this.hooks.off("scaleStart",l),this.hooks.off("scaleEnd",a),this.hooks.off("moveByMouseEnable",l),this.hooks.off("moveByMouseDisable",a),this.hooks.off("updateOtherHelpers"),this.cameraHooks.off("cameraUpdate",c)})}get rotateCenter(){return this.helperObject3D.position.clone()}setRotateAngle(e){const{x:i=0,y:s=0,z:o=0}=e,r=new b.Euler(Ao(i),Ao(s),Ao(o)),a=new b.Quaternion().setFromEuler(r);if(this.hooks.emit("wantToRotate",a))return;const{originObject3D:c,rotateCenter:h}=this;rd(c,a,h),this.internalHooks.emit("setObjectRotate",a,h),this.hooks.emit("rotate",a),this.render()}getEulerAngle(e,i){const{originObject3D:s}=this,o=new b.Euler().setFromQuaternion(s.quaternion),r={x:di(o.x),y:di(o.y),z:di(o.z)},a={x:e==="x"?i:r.x,y:e==="y"?i:r.y,z:e==="z"?i:r.z},l=new b.Euler(Ao(a.x),Ao(a.y),Ao(a.z));return new b.Quaternion().setFromEuler(l)}onApplyOriginObjectRotate(e){this.isDragging||super.onApplyOriginObjectRotate(e)}onApplyOriginObjectScale(e){}dragStart(e){if(this.isDragging)return;this.helperObject3D.update(this.camera);const i=e==null?void 0:e.intersect;if(!i)return this.dragEnd();const s=(i==null?void 0:i.object).direction;if(!s)return this.dragEnd();const o=i.point,r=this.getAngleHelper(s);this.setTipsAngle(0);const a=o.clone();a.y+=.2,this.setTipsPosition(a);const l=this.helperObject3D.quaternion.clone(),c=(()=>{if(s==="x")return new b.Vector3(1,0,0).applyQuaternion(l);if(s==="y")return new b.Vector3(0,1,0).applyQuaternion(l);if(s==="z")return new b.Vector3(0,0,1).applyQuaternion(l)})(),h=new b.Plane().setFromNormalAndCoplanarPoint(c,o),d=h.projectPoint(o.clone(),new b.Vector3).clone().sub(this.rotateCenter),p=d.angleTo(r.baseAxes.clone().applyQuaternion(l)),m=r.offsetAngle(p);this.setAngleHelperStart(s,m),this.setAngleHelperLength(s,0),this.startInfo={direction:s,startVector:d,directionVector:c,plane:h,angleHelper:r,angle:0,helperQuaternion:l.clone()},Hc=new b.Quaternion,this.helperObject3D.showDraggingHelper([s]),this.hooks.emit("rotateStart",s),this.isDragging=!0}getMatrix(){var i,s;return(s=(i=this.originObject3D)==null?void 0:i.ext)==null?void 0:s.matrix}getMatrixAngle(e,i){let s;if(e&&e.isMatrix4){s=new b.Quaternion,e.decompose(new b.Vector3,s,new b.Vector3);const o=new b.Euler().setFromQuaternion(s);if(i==="x")return Math.round(di(o.z));if(i==="y")return Math.round(di(o.y));if(i==="z")return Math.round(di(o.x))}}parseAngleByDirection(e){var o,r;const i=(r=(o=this.originObject3D)==null?void 0:o.ext)==null?void 0:r.matrix;let s;if(i&&i.isMatrix4){s=new b.Quaternion,i.decompose(new b.Vector3,s,new b.Vector3);const a=new b.Euler().setFromQuaternion(s);if(e==="x")return Math.round(di(a.z));if(e==="y")return Math.round(di(a.y));if(e==="z")return Math.round(di(a.x))}}dragging(e){if(!this.isDragging)return;const i="touches"in e?e.touches[0].clientX:e.x,s="touches"in e?e.touches[0].clientY:e.y,o=$l(this.camera,{x:i,y:s},this.container);return o?(this.rotate(o),!1):this.dragEnd()}rotate(e){if(!this.startInfo)return this.dragEnd();const{startVector:i,plane:s,angleHelper:o,direction:r,helperQuaternion:a}=this.startInfo,{originObject3D:l}=this,c=e.ray.intersectPlane(s,new b.Vector3);if(!c)return;const h=this.rotateCenter.clone();let d=s.projectPoint(c.clone(),new b.Vector3).clone().sub(h);const p=this.startInfo.directionVector.clone().normalize();d=d.clone().projectOnPlane(p).normalize().multiplyScalar(d.length());const g=new b.Quaternion().setFromUnitVectors(i.clone().normalize(),d.clone().normalize()),v=l.quaternion.clone().premultiply(g);if(i.angleTo(d)===0||this.hooks.emit("wantToRotate",v))return;const C=new b.Euler().setFromQuaternion(new b.Quaternion().setFromUnitVectors(i.clone().normalize().applyQuaternion(a.clone().inverse()),d.clone().normalize().applyQuaternion(a.clone().inverse())),`${r.toUpperCase()}${"XZY".replace(r.toUpperCase(),"")}`)[r]*o.angleDirection;if(this.startInfo.angle+=C,this.setAngleHelperLength(r,this.startInfo.angle),this.setTipsAngle(di(this.startInfo.angle)),h){const E=new b.Vector3().subVectors(l.position,h).applyQuaternion(g).add(h);l.position.copy(E)}l.applyQuaternion(g),Hc.premultiply(g),this.internalHooks.emit("applyObjectRotate",{quaternion:g,origin:h}),this.hooks.emit("rotate",l.quaternion),this.startInfo.startVector=d}dragEnd(){var e;this.isDragging&&(this.applyHelperQuaternion(Hc,this.rotateCenter),(e=this.startInfo)!=null&&e.lineMeshes&&this.startInfo.lineMeshes.forEach(i=>{this.scene.remove(i),i.geometry.dispose(),i.material instanceof b.Material&&i.material.dispose()}),this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.updateOtherHelpers(),this.hooks.emit("rotateEnd"))}updateOtherHelpers(){this.hooks.emit("updateOtherHelpers",{camera:this.camera})}getAngleHelper(e){var i,s,o;switch(e){case"x":return(i=this.helperObject3D.xCircle)==null?void 0:i.angleSector;case"y":return(s=this.helperObject3D.yCircle)==null?void 0:s.angleSector;case"z":return(o=this.helperObject3D.zCircle)==null?void 0:o.angleSector}}setAngleHelperStart(e,i){const s=this.getAngleHelper(e);if(!s){console.warn("angleHelper is undefined");return}if(s instanceof b.Mesh&&s.geometry instanceof b.CircleGeometry){const{radius:o,segments:r,thetaLength:a}=s.geometry.parameters;s.geometry=new b.CircleGeometry(o,r,i,a)}else console.warn("only support THREE.CircleGeometry")}setAngleHelperLength(e,i){const o=i>=0?Math.max(i,.001):Math.min(i,-.001),r=this.getAngleHelper(e);if(r instanceof b.Mesh&&r.geometry instanceof b.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(o)*(40/(2*Math.PI)));r.geometry=new b.CircleGeometry(a,c,l,o)}else console.warn("only support THREE.CircleGeometry")}setTipsAngle(e){var s;const i=(s=this.helperObject3D.angleTips)==null?void 0:s.element;i&&(i.innerText=`${e.toFixed(0)}°`)}setTipsPosition(e){const i=this.helperObject3D.angleTips;if(!i)return;const s=e.project(this.camera),{x:o,y:r,z:a}=s;if(a>1)return;const l=(o+1)/2*100+"%",c=(-r+1)/2*100+"%";i.setLeftTop(l,c)}}class MT extends ua{constructor(...e){super(...e);f(this,"startInfo");f(this,"name","RectangleScaleController")}enable(){this.helperObject3D.enable(),super.enable()}disable(){this.helperObject3D.disable(),super.disable()}show(){this.helperObject3D.show(),super.show()}hide(){this.helperObject3D.hide(),super.hide()}onApplyOriginObjectPosition(e){this.isDragging||super.onApplyOriginObjectPosition(e)}onApplyOriginObjectScale(e){this.helperObject3D.applyHelperScaleMatrix4(e.matrix,e.origin)}getDragPlane(){const e=new b.Plane,i=this.helperObject3D.cornerPositions;if(i.length!==0)return i.length<3?e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new G.Vector3),i[0]):e.setFromCoplanarPoints(i[0],i[1],i[2]),e}dragStart(e,i){var o,r;(r=(o=this.helperObject3D).updatePoints)==null||r.call(o);const s=this.getDragPlane();if(!s)return this.dragEnd();this.startInfo={startPoint:{position:i.position.clone(),direction:i.direction},plane:s},this.hooks.emit("scaleStart",i.direction),this.render(),this.isDragging=!0}dragging(e){if(!this.isDragging)return;const i=$l(this.camera,e,this.container);if(!i)return this.dragEnd();this.scale(i)}scale(e){var O,A;if(!this.startInfo)return;const i=this.originObject3D,{startPoint:s,plane:o}=this.startInfo,r=this.helperObject3D.cornerPositions;if(r.length<4)return this.dragEnd();const a=e.ray.intersectPlane(o,new G.Vector3);if(!a||Za(a,this.camera.position))return;const l=new G.Vector3().addVectors(r[0],r[2]).divideScalar(2),{position:c,direction:h}=s,u=new G.Vector3().subVectors(r[1],r[0]),d=new G.Vector3().subVectors(r[3],r[0]),p=M=>{const I=new G.Vector3(0,0,0);if(!this.startInfo)return I;const k=(M==="ew"?u:d).clone(),x=c.clone().projectOnVector(k),S=a.clone().projectOnVector(k),j=l.clone().projectOnVector(k);if(S.equals(x))return I;if(M==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const ne=new G.Vector3().subVectors(S,j),q=ne.x<0&&k.x>=0,oe=ne.y<0&&k.y>=0,se=ne.z<0&&k.z>=0;this.startInfo.dragPointInCenterBottom=q||oe||se}if(M==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const ne=new G.Vector3().subVectors(S,j),q=ne.x<0&&k.x>=0,oe=ne.y<0&&k.y>=0,se=ne.z<0&&k.z>=0;this.startInfo.dragPointInCenterLeft=q||oe||se}const F=new G.Vector3().subVectors(S,x),J=F.length();return J>.3?(console.warn("offset.length() > 0.3, skipped",J),I):F},m=p("ew"),g=p("ns"),v=()=>{const M=m;this.helperObject3D.cornerPositions.forEach((I,k)=>{var x;(x=this.startInfo)!=null&&x.dragPointInCenterLeft?(k===0||k===3)&&I.add(M):(k===1||k===2)&&I.add(M)})},y=()=>{const M=g;this.helperObject3D.cornerPositions.forEach((I,k)=>{var x;(x=this.startInfo)!=null&&x.dragPointInCenterBottom?(k===0||k===1)&&I.add(M):(k===2||k===3)&&I.add(M)})};switch(h){case"ew":v();break;case"ns":y();break;case"nesw":case"nwse":v(),y()}const w=new G.Vector3().subVectors(r[1],r[0]).length()/u.length(),C=new G.Vector3().subVectors(r[3],r[0]).length()/d.length(),E=new G.Vector3(w,C,1),D=new b.Matrix4().scale(E);i.isCSS3DObjectPlus&&i.applyScaleMatrix4?i.applyScaleMatrix4(D):i.scale.applyMatrix4(D),s.position.copy(a);const L=new G.Vector3().addVectors(r[0],r[2]).divideScalar(2),R=new G.Vector3().subVectors(L,l),z=new b.Matrix4().setPosition(R);i.applyMatrix4(z),(O=this.helperObject3D.css3DInstance)==null||O.css3DObject.applyMatrix4(z),(A=this.helperObject3D.plane)==null||A.applyMatrix4(z),this.internalHooks.emit("applyObjectScale",{matrix:D}),this.internalHooks.emit("applyObjectPosition",{matrix:z}),this.render()}dragEnd(){this.isDragging&&(this.startInfo=void 0,this.isDragging=!1,"onScaleEnd"in this.helperObject3D&&typeof this.helperObject3D.onScaleEnd=="function"&&this.helperObject3D.onScaleEnd(),this.hooks.emit("scaleEnd"),this.render())}}class IT extends MT{constructor(...e){super(...e);f(this,"name","CSS3DScaleController");this.addHTMLEventListener()}addHTMLEventListener(){this.helperObject3D.points.forEach(e=>{if(!e)return;const i=e.point,s=a=>this.dragStart(a,e),o=this.dragging.bind(this),r=this.dragEnd.bind(this);i.addEventListener("dragstart",s),i.addEventListener("drag",o),i.addEventListener("dragend",r)})}}class ET extends ua{constructor(...e){super(...e);f(this,"name","BoundingBoxController")}}class kT extends $9{constructor(e,i){super(e,i);f(this,"name","ScaleHelper");f(this,"scaleMeshes",[]);f(this,"lineConnections",[]);f(this,"positions",[]);f(this,"container");f(this,"needsInitialScaling",!1);f(this,"lastCamera",null);f(this,"isInitializing",!1);i&&(this.positions=i.positions,this.container=i.container),this.raycast=()=>{}}initQuaternion(){this.quaternion.copy(this.originObject3D.quaternion)}initialPosition(e){if(this.isInitializing){console.warn("ScaleHelper: initialPosition called while already initializing, skipping");return}this.isInitializing=!0;try{this.position.copy(this.originObject3D.position);const i=typeof this.positions=="function"?this.positions():this.positions;if(!i){this.isInitializing=!1;return}this.clearAllSpheres(),this.scaleMeshes=i.map((s,o)=>{const r=xT();return r.position.copy(s.handlePosition),r.scalePosition=s,r.children.forEach(a=>{a.scalePosition=s}),this.add(r),r}),this.createLineConnections(),this.needsInitialScaling=!0,this.lastCamera&&(this.applySphereScaling(this.lastCamera),this.applyLineScaling(this.lastCamera),this.needsInitialScaling=!1)}finally{this.isInitializing=!1}}clearAllSpheres(){this.scaleMeshes.forEach(i=>{this.remove(i)}),this.scaleMeshes=[];const e=this.children.filter(i=>i.name==="ScaleHelperSphere");e.length>0&&e.forEach(i=>{this.remove(i)})}createLineConnections(){this.lineConnections.forEach(s=>{this.remove(s.line)}),this.lineConnections=[];const e={top:"bottom",bottom:"top",left:"right",right:"left",front:"back",back:"front"},i=new Set;for(const s of this.scaleMeshes){const o=s.scalePosition.id;if(!o||i.has(o))continue;const r=e[o];if(!r)continue;const a=this.scaleMeshes.find(c=>c.scalePosition.id===r);if(!a)continue;const l=ST(s.position.clone(),a.position.clone());this.add(l),this.lineConnections.push({line:l,mesh1:s,mesh2:a}),i.add(o),i.add(r)}}update(e){const i=e.type==="OrthographicCamera",s=e.position.clone(),o=this.originObject3D.getWorldPosition(new b.Vector3),r=s.sub(o).normalize(),a={front:new b.Vector3(0,0,1).applyQuaternion(this.originObject3D.getWorldQuaternion(new b.Quaternion)),back:new b.Vector3(0,0,-1).applyQuaternion(this.originObject3D.getWorldQuaternion(new b.Quaternion)),left:new b.Vector3(-1,0,0).applyQuaternion(this.originObject3D.getWorldQuaternion(new b.Quaternion)),right:new b.Vector3(1,0,0).applyQuaternion(this.originObject3D.getWorldQuaternion(new b.Quaternion)),top:new b.Vector3(0,1,0).applyQuaternion(this.originObject3D.getWorldQuaternion(new b.Quaternion)),bottom:new b.Vector3(0,-1,0).applyQuaternion(this.originObject3D.getWorldQuaternion(new b.Quaternion))};let l=-1,c="";Object.entries(a).forEach(([u,d])=>{const p=r.dot(d);p>l&&(l=p,c=u)});const h={top:"bottom",bottom:"top",left:"right",right:"left",front:"back",back:"front"};this.scaleMeshes.forEach(u=>{if(!i){u.visible=!0;return}const d=u.scalePosition.id,p=h[c];d===c||d===p?u.visible=!1:u.visible=!0}),this.updateLineConnections(),this.lastCamera&&(this.applySphereScaling(this.lastCamera),this.applyLineScaling(this.lastCamera))}applySphereScaling(e){this.updateMatrixWorld(!0),this.scaleMeshes.forEach(i=>{i.scale.setScalar(ad(e,i.scalePosition.handlePosition.clone().applyMatrix4(this.matrixWorld)))})}applyLineScaling(e){}showLineConnections(){this.lineConnections.forEach(e=>{const i=e.mesh1.visible&&e.mesh2.visible;e.line.visible=i})}hideLineConnections(){this.lineConnections.forEach(e=>{e.line.visible=!1})}updateLineConnections(){this.lineConnections.forEach(e=>{e.line.scale.set(1,1,1),e.line.position.set(0,0,0),e.line.rotation.set(0,0,0);const s=e.line.geometry.attributes.position;s.setXYZ(0,e.mesh1.position.x,e.mesh1.position.y,e.mesh1.position.z),s.setXYZ(1,e.mesh2.position.x,e.mesh2.position.y,e.mesh2.position.z),s.needsUpdate=!0;const o=e.mesh1.visible&&e.mesh2.visible;e.line.visible=o})}setScaleByCamera(e){this.lastCamera=e,this.applySphereScaling(e),this.applyLineScaling(e),this.needsInitialScaling&&requestAnimationFrame(()=>{this.applySphereScaling(e),this.applyLineScaling(e)}),this.needsInitialScaling=!1}}function xT(){const t=new b.SphereGeometry(.03,16,16),e=new b.MeshBasicMaterial({color:16776960,side:b.DoubleSide,transparent:!0,opacity:1,depthTest:!1,depthWrite:!1}),i=new b.Mesh(t,e);i.name="ScaleHelperSphere",i.renderOrder=Qi.SCALE_HELPER_SPHERE;const s=.03*4,o=new b.SphereGeometry(s,16,16),r=new b.MeshBasicMaterial({transparent:!0,opacity:0,side:b.DoubleSide,depthTest:!1,depthWrite:!1}),a=new b.Mesh(o,r);return a.name="ScaleHelperTransparentGroup",a.renderOrder=Qi.SCALE_HELPER_SPHERE,a.add(i),a}function ST(n,t){const e=new b.BufferGeometry,i=[n,t];e.setFromPoints(i);const s=new b.LineBasicMaterial({color:16776960,opacity:.75,transparent:!0,depthTest:!1,depthWrite:!1}),o=new b.Line(e,s);return o.name="ScaleHelperSolidLine",o.renderOrder=Qi.SCALE_HELPER_LINE,o.raycast=()=>{},o}var R0,_0;class TT extends ua{constructor(...e){super(...e);f(this,"name","ScaleController");f(this,"dragGuideLine");f(this,"currentFacePatch");f(this,"solidGuide",new Iy(this.camera,this.container,(_0=(R0=this.config)==null?void 0:R0.solidGuide)!=null?_0:{}));f(this,"startInfo");f(this,"dragStart",e=>{if(this.isDragging)return;this.isDragging=!0;const{intersect:i}=e,s=this.camera.position,o=new Set(this.helperObject3D.scaleMeshes.map(m=>m.uuid));let r=i.object;for(;r.parent&&!o.has(r.uuid);)r=r.parent;const a=r,l=a.scalePosition.basePosition.clone(),c=a.scalePosition.handlePosition.clone(),h=c.clone().sub(l).clone(),u=new b.Line3(l,l.clone().add(h.normalize().multiplyScalar(5)));u.applyMatrix4(this.helperObject3D.matrixWorld);const d=new b.Raycaster(s,i.point.clone().sub(s)),p=Ln({raycaster:d,line:u});this.startInfo={line:u,scaleStartPoint:p,draggingObject:a},this.helperObject3D.scaleMeshes.forEach(m=>{m.uuid!==a.uuid&&(m.visible=!1)}),"hideLineConnections"in this.helperObject3D&&typeof this.helperObject3D.hideLineConnections=="function"&&this.helperObject3D.hideLineConnections();try{this.originObject3D.updateMatrixWorld(!0),this.helperObject3D.updateMatrixWorld(!0);const m=this.getObjectWorldCenter(),v=c.clone().applyMatrix4(this.helperObject3D.matrixWorld).clone().sub(m).normalize(),y=m,w=this.solidGuide.createSolidLine(y,v,{color:16777215,renderOrder:Qi.DRAG_GUIDE_LINE});this.isRectangleWithEdgeMesh()||this.scene.add(w),this.dragGuideLine=w,this.addFaceMesh()}catch(m){}a.visible=!0,this.hooks.emit("scaleStart")});f(this,"dragging",e=>{const i="touches"in e?e.touches[0].clientX:e.x,s="touches"in e?e.touches[0].clientY:e.y,o=$l(this.camera,{x:i,y:s},this.container),r=this.isMoveControllerDragging();if(!this.isDragging&&!r&&o){this.addHoverFaceMesh(o);return}if(this.startInfo)return o?(this.scale(o),this.updateDragGuideLineDirection(),this.removeFaceMesh(),this.addFaceMesh(),!1):this.dragEnd()});f(this,"isRectangleWithEdgeMesh",()=>this.originObject3D.name==="RectangleWithEdgeMesh"&&["topleft","topright","bottomleft","bottomright"].includes(this.startInfo.draggingObject.scalePosition.id));f(this,"scale",e=>{var l,c,h,u;if(!this.startInfo)return;const{line:i,scaleStartPoint:s,draggingObject:o}=this.startInfo,{scalePosition:r}=o;if(this.isRectangleWithEdgeMesh()){const d=this.originObject3D,m=d.geometry.attributes.position;if(!m)return[];const g=[],v=m.count;for(let z=0;z<v;z++){const O=new b.Vector3().fromBufferAttribute(m,z);d.updateMatrixWorld(!0),O.applyMatrix4(d.matrixWorld),g.push(O)}const y=g.slice(0,4);if(!y||y.length<4)return;const w=mi(y).normalize(),C=new b.Plane().setFromNormalAndCoplanarPoint(w,y[0]),D=Math.abs(e.ray.direction.dot(w))<.1;let L;if(D)L=Ln({raycaster:e,line:i,clampToLine:!1}).applyMatrix4(new b.Matrix4().getInverse(this.helperObject3D.matrixWorld.clone()));else{const z=new b.Vector3;if(e.ray.intersectPlane(C,z),!z)return;const O=new b.Matrix4().getInverse(this.helperObject3D.matrixWorld);L=z.clone().applyMatrix4(O)}const R=s.clone().applyMatrix4(new b.Matrix4().getInverse(this.helperObject3D.matrixWorld));(c=(l=this.config)==null?void 0:l.scaleCallback)==null||c.call(l,{intersectPoint:L,scalePosition:r,offset:L.clone().sub(R)}),o.position.copy(L),this.hooks.emit("scale",new b.Vector3(1,1,1));return}const a=Ln({raycaster:e,line:i,clampToLine:!1});a.applyMatrix4(new b.Matrix4().getInverse(this.helperObject3D.matrixWorld.clone())),(u=(h=this.config)==null?void 0:h.scaleCallback)==null||u.call(h,{intersectPoint:a,scalePosition:r,offset:a.clone().sub(s)}),o.position.copy(a.clone()),this.hooks.emit("scale",new b.Vector3(1,1,1))});f(this,"dragEnd",()=>{if(this.isDragging){if(this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.scaleMeshes.forEach(e=>{e.visible=!0}),"showLineConnections"in this.helperObject3D&&typeof this.helperObject3D.showLineConnections=="function"&&this.helperObject3D.showLineConnections(),this.dragGuideLine){this.scene.remove(this.dragGuideLine),this.dragGuideLine.geometry.dispose();const e=this.dragGuideLine.material;Array.isArray(e)?e.forEach(i=>i.dispose()):e.dispose(),this.dragGuideLine=void 0}this.removeFaceMesh(),this.internalHooks.emit("initialHelperPosition"),this.hooks.emit("scaleEnd")}});const i=this.show.bind(this),s=this.hide.bind(this),o=()=>{"update"in this.helperObject3D&&typeof this.helperObject3D.update=="function"&&this.helperObject3D.update(this.camera),this.isDragging&&this.updateDragGuideLineScale(),this.render()};o(),this.domEvents.addEventListener(this.helperObject3D,"mousedown",this.dragStart),document.addEventListener("mousemove",this.dragging),document.addEventListener("mouseup",this.dragEnd),this.domEvents.addEventListener(this.helperObject3D,"touchstart",this.dragStart),document.addEventListener("touchmove",this.dragging),document.addEventListener("touchend",this.dragEnd),this.hooks.on("rotateStart",s),this.hooks.on("rotateEnd",i),this.hooks.on("moveStart",()=>{s(),this.removeFaceMesh()}),this.hooks.on("moveEnd",i),this.hooks.on("moveByMouseEnable",s),this.hooks.on("moveByMouseDisable",i),this.hooks.on("updateOtherHelpers",r=>{"update"in this.helperObject3D&&typeof this.helperObject3D.update=="function"&&this.helperObject3D.update(r.camera),this.isDragging&&this.updateDragGuideLineScale(),this.render()}),this.cameraHooks.on("cameraUpdate",o),this.disposers.push(()=>{if(this.domEvents.removeEventListener(this.helperObject3D,"mousedown",this.dragStart),document.removeEventListener("mousemove",this.dragging),document.removeEventListener("mouseup",this.dragEnd),this.domEvents.removeEventListener(this.helperObject3D,"touchstart",this.dragStart),document.removeEventListener("touchmove",this.dragging),document.removeEventListener("touchend",this.dragEnd),this.hooks.off("rotateStart",s),this.hooks.off("rotateEnd",i),this.hooks.off("moveStart",s),this.hooks.off("moveEnd",i),this.hooks.off("moveByMouseEnable",s),this.hooks.off("moveByMouseDisable",i),this.hooks.off("updateOtherHelpers"),this.cameraHooks.off("cameraUpdate",o),this.currentFacePatch){this.scene.remove(this.currentFacePatch),this.currentFacePatch.geometry.dispose();const r=this.currentFacePatch.material;Array.isArray(r)?r.forEach(a=>a.dispose()):r.dispose(),this.currentFacePatch=void 0}})}initialHelperPosition(){this.helperObject3D.initialPosition();const e=this;e.offHoverListener&&e.offHoverListener(),e.offHoverListener=this.hoverListener(this.helperObject3D.scaleMeshes)}getObjectWorldCenter(){if("worldCenter"in this.originObject3D&&typeof this.originObject3D.worldCenter=="object")return this.originObject3D.worldCenter.clone();const e=rv(this.originObject3D);return e?e.getCenter(new b.Vector3):this.originObject3D.getWorldPosition(new b.Vector3)}getMoveMeshes(){var s,o,r,a;const e=[],i=(a=(r=(o=(s=this.helperObject3D.parent)==null?void 0:s.children)==null?void 0:o.find(l=>l.name==="MoveHelper"))==null?void 0:r.children)!=null?a:[];for(const l of i)l.name==="ArrowGroup"?e.push(...l.children):l.name==="center-plane-handle"&&e.push(l);return e}addHoverFaceMesh(e){var l,c;if(this.isMoveControllerDragging()||(this.removeFaceMesh(),!((l=this.originObject3D.parent)!=null&&l.getWorldFacesGeometry)))return;const i=(c=this.originObject3D.parent)==null?void 0:c.getWorldFacesGeometry(),s=this.helperObject3D.scaleMeshes,o=this.getMoveMeshes();if(e.intersectObjects(o,!1),e.intersectObjects(o,!1).length>0)return;let r=null,a=null;for(const h of s){if(!h.visible)continue;const u=e.intersectObject(h,!1);if(u&&u.length>0){r=h,a=u[0].point.clone();break}}if(r&&a&&Array.isArray(i)&&i.length>0){let h=null,u=1/0;for(const d of i){if(!d.vertices||d.vertices.length<3)continue;const p=new b.Vector3;for(const g of d.vertices)p.add(g);p.divideScalar(d.vertices.length);const m=a.distanceTo(p);m<u&&(u=m,h=d)}h&&this.addFacePatch(h)}}addFaceMesh(){var s,o,r;if(this.isMoveControllerDragging())return;const e=(s=this.startInfo)==null?void 0:s.draggingObject;if(!e||!((o=this.originObject3D.parent)!=null&&o.getWorldFacesGeometry))return;const i=(r=this.originObject3D.parent)==null?void 0:r.getWorldFacesGeometry();if(i&&i.length>0){const a=e.getWorldPosition(new b.Vector3);let l=1/0,c=i[0];for(const h of i){const u=h.center;let d;if(u instanceof b.Vector3)d=u;else if(Array.isArray(u)&&u.length===3)d=new b.Vector3(u[0],u[1],u[2]);else continue;const p=d.distanceTo(a);p<l&&(l=p,c=h)}this.addFacePatch(c)}}removeFaceMesh(){if(this.currentFacePatch){this.scene.remove(this.currentFacePatch),this.currentFacePatch.geometry.dispose();const e=this.currentFacePatch.material;Array.isArray(e)?e.forEach(i=>i.dispose()):e.dispose(),this.currentFacePatch=void 0}}setScale(e){var l,c,h;let i=1,s=1,o=1;typeof e=="number"?(i=e,s=e,o=e):typeof e=="object"&&(i=(l=e.x)!=null?l:1,s=(c=e.y)!=null?c:1,o=(h=e.z)!=null?h:1);const r=new b.Vector3(i,s,o);this.hooks.emit("wantToScale",r)||(this.originObject3D.scale.copy(r),this.internalHooks.emit("setObjectScale",r),this.hooks.emit("scale",r),this.render())}updateDragGuideLineDirection(){if(!this.dragGuideLine||!this.startInfo)return;const{draggingObject:e}=this.startInfo;this.originObject3D.updateMatrixWorld(!0),this.helperObject3D.updateMatrixWorld(!0);const i=this.getObjectWorldCenter(),o=e.position.clone().applyMatrix4(this.helperObject3D.matrixWorld).clone().sub(i).normalize(),r=i;this.solidGuide.updateSolidLine(this.dragGuideLine,r,o)}updateDragGuideLineScale(){if(!this.dragGuideLine||!this.startInfo)return;const{scalePosition:e}=this.startInfo.draggingObject,i=e.handlePosition.clone().applyMatrix4(this.helperObject3D.matrixWorld),s=e.basePosition.clone().applyMatrix4(this.helperObject3D.matrixWorld),o=i,r=i.clone().sub(s).normalize();this.solidGuide.updateSolidLine(this.dragGuideLine,o,r)}isMoveControllerDragging(){var e,i,s;return(s=(i=(e=this.otherControllers)==null?void 0:e.moveController)==null?void 0:i.getIsDragging())!=null?s:!1}addFacePatch(e){if(this.currentFacePatch){this.scene.remove(this.currentFacePatch),this.currentFacePatch.geometry.dispose();const r=this.currentFacePatch.material;Array.isArray(r)?r.forEach(a=>a.dispose()):r.dispose(),this.currentFacePatch=void 0}if(!e.vertices||e.vertices.length<3){console.warn("Face has no vertices, cannot create patch");return}const i=new b.BufferGeometry;if(e.vertices.length===4){const r=new Float32Array([e.vertices[0].x,e.vertices[0].y,e.vertices[0].z,e.vertices[1].x,e.vertices[1].y,e.vertices[1].z,e.vertices[2].x,e.vertices[2].y,e.vertices[2].z,e.vertices[0].x,e.vertices[0].y,e.vertices[0].z,e.vertices[2].x,e.vertices[2].y,e.vertices[2].z,e.vertices[3].x,e.vertices[3].y,e.vertices[3].z]);i.setAttribute("position",new b.BufferAttribute(r,3)),i.setIndex([0,1,2,3,4,5])}else{const r=new Float32Array(e.vertices.length*3),a=new Uint16Array(e.vertices.length);e.vertices.forEach((l,c)=>{r[c*3]=l.x,r[c*3+1]=l.y,r[c*3+2]=l.z,a[c]=c}),i.setAttribute("position",new b.BufferAttribute(r,3)),i.setIndex(new b.BufferAttribute(a,1))}i.computeVertexNormals();const s=new b.MeshBasicMaterial({color:16777215,side:b.DoubleSide,depthTest:!1,depthWrite:!1,transparent:!0,opacity:.45}),o=new b.Mesh(i,s);return o.renderOrder=Qi.DRAG_FACE_PATCH,this.scene.add(o),this.currentFacePatch=o,this.render(),o}}function $e(n,t){this._camera=n||null,this._domElement=t||document,this._raycaster=new b.Raycaster,this._selected=null,this._boundObjs={};var e=this;this._$onClick=function(){e._onClick.apply(e,arguments)},this._$onDblClick=function(){e._onDblClick.apply(e,arguments)},this._$onMouseMove=function(){e._onMouseMove.apply(e,arguments)},this._$onMouseDown=function(){e._onMouseDown.apply(e,arguments)},this._$onMouseUp=function(){e._onMouseUp.apply(e,arguments)},this._$onTouchMove=function(){e._onTouchMove.apply(e,arguments)},this._$onTouchStart=function(){e._onTouchStart.apply(e,arguments)},this._$onTouchEnd=function(){e._onTouchEnd.apply(e,arguments)},this._$onContextmenu=function(){e._onContextmenu.apply(e,arguments)},this._domElement.addEventListener("click",this._$onClick,!1),this._domElement.addEventListener("dblclick",this._$onDblClick,!1),this._domElement.addEventListener("mousemove",this._$onMouseMove,!1),this._domElement.addEventListener("mousedown",this._$onMouseDown,!1),this._domElement.addEventListener("mouseup",this._$onMouseUp,!1),this._domElement.addEventListener("touchmove",this._$onTouchMove,!1),this._domElement.addEventListener("touchstart",this._$onTouchStart,!1),this._domElement.addEventListener("touchend",this._$onTouchEnd,!1),this._domElement.addEventListener("contextmenu",this._$onContextmenu,!1)}$e.prototype.destroy=function(){this._domElement.removeEventListener("click",this._$onClick,!1),this._domElement.removeEventListener("dblclick",this._$onDblClick,!1),this._domElement.removeEventListener("mousemove",this._$onMouseMove,!1),this._domElement.removeEventListener("mousedown",this._$onMouseDown,!1),this._domElement.removeEventListener("mouseup",this._$onMouseUp,!1),this._domElement.removeEventListener("touchmove",this._$onTouchMove,!1),this._domElement.removeEventListener("touchstart",this._$onTouchStart,!1),this._domElement.removeEventListener("touchend",this._$onTouchEnd,!1),this._domElement.removeEventListener("contextmenu",this._$onContextmenu,!1)};$e.eventNames=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu","touchstart","touchend"];$e.prototype._getRelativeMouseXY=function(n){var t=n.target||n.srcElement;t.nodeType===3&&(t=t.parentNode);var e={x:0,y:0},i=t,s=getComputedStyle(i,null);e.y+=parseInt(s.getPropertyValue("padding-top"),10),e.x+=parseInt(s.getPropertyValue("padding-left"),10);do e.x+=i.offsetLeft,e.y+=i.offsetTop,s=getComputedStyle(i,null),e.x+=parseInt(s.getPropertyValue("border-left-width"),10),e.y+=parseInt(s.getPropertyValue("border-top-width"),10);while(i=i.offsetParent);var o={width:t===window?window.innerWidth:t.offsetWidth,height:t===window?window.innerHeight:t.offsetHeight};return{x:Number((n.pageX-e.x)/o.width)*2-1,y:-((n.pageY-e.y)/o.height)*2+1}};$e.prototype._objectCtxInit=function(n){n._3xDomEvent={}};$e.prototype._objectCtxDeinit=function(n){delete n._3xDomEvent};$e.prototype._objectCtxIsInit=function(n){return!!n._3xDomEvent};$e.prototype._objectCtxGet=function(n){return n._3xDomEvent};$e.prototype.camera=function(n){return n&&(this._camera=n),this._camera};$e.prototype.bind=function(n,t,e,i){console.assert($e.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(n)||this._objectCtxInit(n);var s=this._objectCtxGet(n);s[t+"Handlers"]||(s[t+"Handlers"]=[]),s[t+"Handlers"].push({callback:e,useCapture:i}),this._boundObjs[t]===void 0&&(this._boundObjs[t]=[]),this._boundObjs[t].push(n)};$e.prototype.addEventListener=$e.prototype.bind;$e.prototype.unbind=function(n,t,e,i){console.assert($e.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(n)||this._objectCtxInit(n);var s=this._objectCtxGet(n);s[t+"Handlers"]||(s[t+"Handlers"]=[]);for(var o=s[t+"Handlers"],r=0;r<o.length;r++){var a=o[r];if(e==a.callback&&i==a.useCapture){o.splice(r,1);break}}var l=this._boundObjs[t].indexOf(n);this._boundObjs[t].splice(l,1)};$e.prototype.removeEventListener=$e.prototype.unbind;$e.prototype._bound=function(n,t){var e=this._objectCtxGet(t);return e?!!e[n+"Handlers"]:!1};$e.prototype._isObjectVisible=function(n){for(var t=n;t;){if(t.visible===!1)return!1;t=t.parent}return!0};$e.prototype._filterVisibleObjects=function(n){var t=this;return n.filter(function(e){return t._isObjectVisible(e)})};$e.prototype._onMove=function(n,t,e,i){var s=this._boundObjs[n];if(!(s===void 0||s.length===0)){var o=this._filterVisibleObjects(s);if(o.length!==0){var r=new b.Vector2;r.set(t,e),this._raycaster.setFromCamera(r,this._camera);var a=this._raycaster.intersectObjects(o),l=this;a=a.filter(function(g){return l._isObjectVisible(g.object)}),a.sort(function(g,v){var y=g.object.renderOrder||0,w=v.object.renderOrder||0;return y!==w?w-y:g.distance-v.distance});var c=this._selected;if(a.length>0){var h,u,d,p=a[0],m=p.object;this._selected=m,d=this._bound("mousemove",m),c!=m&&(h=this._bound("mouseover",m),u=c&&this._bound("mouseout",c))}else u=c&&this._bound("mouseout",c),this._selected=null;d&&this._notify("mousemove",m,i,p),h&&this._notify("mouseover",m,i,p),u&&this._notify("mouseout",c,i,p)}}};$e.prototype._onEvent=function(n,t,e,i){var s=this._boundObjs[n];if(!(s===void 0||s.length===0)){var o=this._filterVisibleObjects(s);if(o.length!==0){var r=new b.Vector2;r.set(t,e),this._raycaster.setFromCamera(r,this._camera);var a=this._raycaster.intersectObjects(o,!0),l=this;if(a=a.filter(function(p){return l._isObjectVisible(p.object)}),a.sort(function(p,m){var g=p.object.renderOrder||0,v=m.object.renderOrder||0;return g!==v?v-g:p.distance-m.distance}),a.length!==0){for(var c=a[0],h=c.object,u=this._objectCtxGet(h),d=h.parent;typeof u=="undefined"&&d;)u=this._objectCtxGet(d),d=d.parent;u&&this._notify(n,h,i,c)}}}};$e.prototype._notify=function(n,t,e,i){var s=this._objectCtxGet(t),o=s?s[n+"Handlers"]:null;if(!s||!o||o.length===0){t.parent&&this._notify(n,t.parent,e,i);return}for(var o=s[n+"Handlers"],r=0;r<o.length;r++){var a=o[r],l=!0;a.callback({type:n,target:t,origDomEvent:e,intersect:i,stopPropagation:function(){l=!1}}),l&&a.useCapture===!1&&t.parent&&this._notify(n,t.parent,e,i)}};$e.prototype._onMouseDown=function(n){return this._onMouseEvent("mousedown",n)};$e.prototype._onMouseUp=function(n){return this._onMouseEvent("mouseup",n)};$e.prototype._onMouseEvent=function(n,t){var e=this._getRelativeMouseXY(t);this._onEvent(n,e.x,e.y,t)};$e.prototype._onMouseMove=function(n){var t=this._getRelativeMouseXY(n);this._onMove("mousemove",t.x,t.y,n),this._onMove("mouseover",t.x,t.y,n),this._onMove("mouseout",t.x,t.y,n)};$e.prototype._onClick=function(n){this._onMouseEvent("click",n)};$e.prototype._onDblClick=function(n){this._onMouseEvent("dblclick",n)};$e.prototype._onContextmenu=function(n){this._onMouseEvent("contextmenu",n)};$e.prototype._onTouchStart=function(n){return this._onTouchEvent("touchstart",n)};$e.prototype._onTouchEnd=function(n){return this._onTouchEvent("touchend",n)};$e.prototype._onTouchMove=function(n){if(n.touches.length==1){var t=Number(n.touches[0].pageX/window.innerWidth)*2-1,e=-(n.touches[0].pageY/window.innerHeight)*2+1;this._onMove("mousemove",t,e,n),this._onMove("mouseover",t,e,n),this._onMove("mouseout",t,e,n)}};$e.prototype._onTouchEvent=function(n,t){var e=t.touches;if(e.length==0&&(e=t.changedTouches),e.length==1){var i=Number(e[0].pageX/window.innerWidth)*2-1,s=-(e[0].pageY/window.innerHeight)*2+1;this._onEvent(n,i,s,t)}};const Eh="Object3DHelperPlugin",ec=Eh,DT=()=>{console.error(`${ec} is disposed`)},LT=()=>{console.warn(`${ec} is disabled`)},zT=()=>{console.error(`${ec} is disabled`)};class cd extends ys{constructor(e){super(e);f(this,"name",Eh);f(this,"state",{visible:!0,enabled:!0,disposed:!1});f(this,"objectHelperMap",new Map);f(this,"css3DObjectParentMap",new Map);f(this,"css3DObjectModeMap",new Map);f(this,"css3DRender");this.five=e,this.css3DRender=new _o(this.five.scene),console.warn("Object3DHelper: 使用此插件,需要在初始化five时,设置five参数: { backgroundAlpha: 0, backgroundColor: 0x000000 }"),Object.assign(window,{[`__${Eh.toUpperCase()}_DEBUG__`]:this})}show(e){return $(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return $(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,i){if(this.state.disposed)return DT();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return zT();const s=V({},this.state);this.state=V(V({},this.state),e),e.disposed!==void 0&&e.disposed!==s.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==s.visible&&this.handleVisible(e.visible),e.enabled!==void 0&&e.enabled!==s.enabled&&this.handleEnable(e.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:s})}getObject3DHelper(e){return this.objectHelperMap.get(e)}addObject3DHelper(e,i={}){var C;if(!e){console.error("Object3D is undefined");return}if(this.objectHelperMap.has(e)){console.warn(`Object3DHelperPlugin: object3D ${e.name} is already has helper`);return}const s=new PT,o=[],r=(C=this.five.getElement())==null?void 0:C.parentElement,a=this.five.camera,c=V(V({},{moveHelper:!0,rotateHelper:!0,scaleHelper:!0,boundingBoxHelper:!1,positionFrom:"objectPosition"}),i),{moveHelper:h,rotateHelper:u,scaleHelper:d,boundingBoxHelper:p}=c,m=s.hooks,g=new St,v=new $e(this.five.camera,this.five.getElement()),y=E=>{if(E)return typeof E=="boolean"?E:E.enable},w={};if(y(h)){const E=V(V({},this.getConfig(c.moveHelper)),c),D=new oT(e,V({},E)),L=new Pr(this.five,v,gT,e,D,E,m,g);w.moveController=L.helperController,o.push(()=>L.dispose())}if(y(u)){const E=V(V({},this.getConfig(c.rotateHelper)),c),D=new lT(e,V({container:r},E)),L=new Pr(this.five,v,CT,e,D,E,m,g);w.rotateController=L.helperController,o.push(()=>L.dispose())}if(y(p)){const E=new pT(e),D=new Pr(this.five,v,ET,e,E,void 0,m,g);w.boundingBoxController=D.helperController,o.push(()=>D.dispose())}if(y(d))if(e.isCSS3DObject&&r){const E=new fT(e,r,a,this.five.scene),D=new Pr(this.five,v,IT,e,E,void 0,m,g);w.scaleController=D.helperController,o.push(()=>D.dispose()),xi(this.five).then(()=>{var L,R;if(e.isCSS3DObjectPlus){const z=e;if(!z||z.mode!=="front")return;const O=(L=this.css3DRender.behindModeCSS3DRenderer.wrapper)!=null?L:Wh(this.five);O&&(this.css3DObjectParentMap.set(z,z.parent),z.removeFromParent(),this.css3DRender.behindModeCSS3DRenderer.setWrapper(O),(R=this.css3DRender.getBehindCSS3DObjectGroup())==null||R.add(z),this.css3DRender.render(this.five.camera))}else e.isCSS3DObject&&(this.css3DObjectModeMap.set(e,e.mode),e.mode="behind")})}else{const E=V(V({},this.getConfig(c.scaleHelper)),c),D=new kT(e,E),L=new Pr(this.five,v,TT,e,D,E,m,g);w.scaleController=L.helperController,o.push(()=>L.dispose())}return Object.values(w).forEach(E=>{E&&typeof E.updateOtherControllers=="function"&&E.updateOtherControllers(w)}),s.addControllers(w),this.objectHelperMap.set(e,{helper:s,disposers:o}),s.controllers}removeObject3DHelper(e){if(!this.objectHelperMap.has(e))return;const{helper:i,disposers:s}=this.objectHelperMap.get(e);if(i){if(e.isCSS3DObjectPlus){const o=e,r=this.css3DObjectParentMap.get(o);r&&r.add(o),this.css3DRender.render(this.five.camera)}else if(e.isCSS3DObject){const o=this.css3DObjectModeMap.get(e);e.mode=o}this.objectHelperMap.delete(e),i.dispose(),s==null||s.forEach(o=>o==null?void 0:o())}}handleEnable(e,i=!0){e?(this.everyHelperDo(s=>s.enable()),this.hooks.emit("enable",{userAction:i})):(this.everyHelperDo(s=>s.disable()),this.hooks.emit("disable",{userAction:i})),this.state.enabled=e}handleVisible(e,i=!0){e?(this.everyHelperDo(s=>s.show()),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:i}))):(this.everyHelperDo(s=>s.hide()),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:i}))),this.state.visible=e}handleDispose(){this.everyHelperDo((e,i)=>{e.dispose(),i==null||i.forEach(s=>s==null?void 0:s())})}everyHelperDo(e){this.objectHelperMap.forEach(({helper:i,disposers:s})=>{i&&e(i,s)})}actionIfStateIsEnabled(e,i){if(this.state.enabled)return e();i!=null&&i.warnLog&<()}getConfig(e){if(e&&typeof e!="boolean"&&e.enable)return e}}const OT=n=>new cd(n);class jT{constructor(){f(this,"five");f(this,"config");f(this,"_cursor");f(this,"_pointSelector");f(this,"_fiveDomEvents");f(this,"_object3DHelper");f(this,"inited",!1);f(this,"init",(t,e)=>{this.inited=!0,this.five=t,this.config=e,this._cursor=void 0,this._pointSelector=void 0,this._fiveDomEvents=void 0,this._object3DHelper=void 0})}get cursor(){if(!this.inited)throw new Error("Global not inited");return this._cursor?this._cursor:(this._cursor=new H1(this.five.getElement()),this._cursor)}get pointSelector(){var i,s,o;if(!this.inited)throw new Error("Global not inited");if(this._pointSelector)return this._pointSelector;const t=(i=this.config)==null?void 0:i.magnifier;let e=t===null||t===!1?{magnifier:null}:{magnifierParams:t};return(s=this.config)!=null&&s.hideCursorCircle&&(e=de(V({},e),{pointHelper:null})),this._pointSelector=new Ll(this.five,{mode:"cursor",helper:e,hitFilter:(o=this.config)==null?void 0:o.hitFilter}),this._pointSelector}get fiveDomEvents(){if(!this.inited)throw new Error("Global not inited");return this._fiveDomEvents?this._fiveDomEvents:(this._fiveDomEvents=new Vo(this.five,{noEmitWhenNotInScene:!0}),this._fiveDomEvents)}get object3DHelper(){if(!this.inited)throw new Error("Global not inited");return this._object3DHelper?this._object3DHelper:(this._object3DHelper=new cd(this.five),this._object3DHelper)}}const kn=new jT;window.globalModules=kn;function Ey(n,t){return n?t(n)?n:n.parent?Ey(n.parent,t):null:null}function RT(n){const t=[...n];if(n.length<3)return n;const e=n[n.length-1],i=n[0];return e.equals(i)||t.push(i),t}class ky extends bi{constructor(e){super();f(this,"name","PolylineBaseMesh");f(this,"lines",[]);f(this,"withDots");f(this,"paramsStyle");const r=e,{withDots:i,points:s}=r,o=Kn(r,["withDots","points"]);this.withDots=i!=null?i:!0,s&&this.setPoints(s),o&&this.setStyle(o)}get style(){var e;return{lineColor:this.lineColor,lineWidth:this.lineWidth,opacity:this.opacity,dashed:this.dashed,occlusionVisibility:this.occlusionVisibility,occlusionMode:this.occlusionMode,lengthEnable:(e=this.paramsStyle)==null?void 0:e.lengthEnable}}get opacity(){var e,i,s;return(s=(e=this.lines[0])==null?void 0:e.lineOpacity)!=null?s:(i=this.paramsStyle)==null?void 0:i.lineOpacity}get lineColor(){var e,i,s;return(s=(e=this.lines[0])==null?void 0:e.color)!=null?s:(i=this.paramsStyle)!=null&&i.lineColor?new b.Color(this.paramsStyle.lineColor):void 0}get lineWidth(){var e,i,s;return(s=(e=this.lines[0])==null?void 0:e.lineWidth)!=null?s:(i=this.paramsStyle)==null?void 0:i.lineWidth}get dashed(){var e,i,s;return(s=(e=this.lines[0])==null?void 0:e.dashed)!=null?s:(i=this.paramsStyle)==null?void 0:i.dashed}get occlusionVisibility(){var e,i,s;return(s=(e=this.lines[0])==null?void 0:e.occlusionVisibility)!=null?s:(i=this.paramsStyle)==null?void 0:i.occlusionVisibility}get occlusionMode(){var e,i,s;return(s=(e=this.lines[0])==null?void 0:e.occlusionMode)!=null?s:(i=this.paramsStyle)==null?void 0:i.occlusionMode}get points(){var e,i,s;return this.lines.map(o=>o.points[0]).concat((s=(i=this.lines)==null?void 0:i[((e=this.lines)==null?void 0:e.length)-1])==null?void 0:s.points[1]).filter(Boolean)}setPoints(e,i={closed:!1}){let s=e.map(Ve);i.closed&&(s=RT(s)),s.forEach((o,r)=>{var c;const a=s[r+1];if(r!==0&&a===void 0)return;const l=(c=this.lines[r])!=null?c:(()=>{const h=new Yr(de(V({},this.style),{pointVisibility:this.withDots?{startPoint:r===0,endPoint:!0}:!1}));return this.lines[r]=h,this.add(h),h})();l.setStyle(this.style),l.setPoints([o,a])}),s.length===0?(this.lines.forEach(o=>o.removeFromParent()),this.lines=[]):s.length===1||this.lines.length>s.length-1&&this.lines.splice(s.length-1).forEach(o=>o.removeFromParent())}setStyle(e){this.paramsStyle=V(V({},this.paramsStyle),e),this.lines.forEach(i=>i.setStyle(this.paramsStyle))}highlight(){this.lines.forEach(e=>e.highlight())}unhighlight(){this.lines.forEach(e=>e.unhighlight())}}class Ks extends ky{constructor(...e){super(de(V({},e[0]),{withDots:!1}));f(this,"name","PolylineMesh")}}class ls extends ky{constructor(...e){super(de(V({},e[0]),{withDots:!0}));f(this,"name","PolylineWithDotsMesh")}}const Nc=new Map;class Yi extends bi{constructor(e,i){var s,o;super();f(this,"name","Sculpt");f(this,"isSculptObject",!0);f(this,"draggable");f(this,"selected");f(this,"config");f(this,"on",(e,i,s)=>kn.fiveDomEvents.addEventListener(this,e,i,s));f(this,"off",(...e)=>kn.fiveDomEvents.removeEventListener(this,...e));f(this,"applyObjectMatrixWorld",(e,i)=>{const s=i!=null?i:this;return s.updateMatrixWorld(),Vr(s,e)});f(this,"applyObjectReversalMatrixWorld",(e,i)=>{const s=i!=null?i:this;return s.updateMatrixWorld(),Gb(s,e)});e!=null&&e.id&&(this.uuid=e.id),this.config=V({defaultAction:!0,occlusionVisibility:!0,occlusionMode:"translucence"},i),e&&(Ge((s=this.config)==null?void 0:s.occlusionMode)&&(e.style=de(V({},e.style),{occlusionMode:this.config.occlusionMode})),Ge((o=this.config)==null?void 0:o.occlusionVisibility)&&(e.style=de(V({},e.style),{occlusionVisibility:this.config.occlusionVisibility}))),gt("esc",()=>{this.stopCreating()}),this.config.defaultAction&&(gt("backspace, delete",()=>{this.selected&&this.delete()}),this.on("click",()=>{var r;this.editing||(this.select({only:!0}),this.editor.enable(),(r=this.parent)==null||r.children.forEach(a=>{var l;a instanceof Yi&&a!==this&&((l=a._editor)==null||l.disable())}))}),gt("esc",()=>{this.selected&&this.unselect()}))}get editing(){return this.pointSelector.enabled}get baseData(){return{id:this.uuid,type:this.type}}get pointSelector(){return kn.pointSelector}undo(){throw new Error("Method not implemented.")}redo(){throw new Error("Method not implemented.")}canUndo(){throw new Error("Method not implemented.")}canRedo(){throw new Error("Method not implemented.")}stopCreating(){kn.pointSelector.disable()}delete(){var e;this.stopCreating(),this.removeFromParent(),this.off(),(e=this.editor)==null||e.disable()}select(e={only:!1}){if(this.selected)return;this.selected=!0,this.highlight(),Nc.has(this.parent.uuid)||Nc.set(this.parent.uuid,[]);const i=Nc.get(this.parent.uuid);i.push(this),e.only&&(i==null||i.forEach(s=>{s!==this&&s.unselect()}))}unselect(){var e;this.selected&&(this.selected=!1,this.unhighlight(),(e=this._editor)==null||e.disable())}highlight(){}unhighlight(){}showDeleteButton(e,i){kn.cursor.showDeleteButton({clientX:e,clientY:i,container:document.body,onClick:()=>this.delete()}),kn.five.once("cameraUpdate",()=>{kn.cursor.removeDeleteButton()})}}class tc extends bi{constructor(e){super();f(this,"hooks",new St);f(this,"originObject");this.originObject=e}enable(){this.originObject.add(this)}disable(){this.originObject.remove(this)}}class da extends tc{constructor(e,i){super(e);f(this,"objectHelperConfig");f(this,"currentOperation",null);f(this,"onMoveStart",e=>{this.currentOperation={type:"move",start_timestamp:Date.now(),axis:e}});f(this,"onRotateStart",e=>{this.currentOperation={type:"rotate",start_timestamp:Date.now(),axis:e}});f(this,"onScaleStart",e=>{this.currentOperation={type:"scale",start_timestamp:Date.now(),axis:e}});f(this,"onMove",()=>{this.currentOperation&&(this.currentOperation=de(V({},this.currentOperation),{status:"moving"}),this.onObjectUpdate(!1))});f(this,"onRotate",()=>{this.currentOperation&&(this.currentOperation=de(V({},this.currentOperation),{status:"rotating"}),this.onObjectUpdate(!1))});f(this,"onScale",()=>{this.currentOperation&&(this.currentOperation=de(V({},this.currentOperation),{status:"scaling"}),this.onObjectUpdate(!1))});f(this,"onMoveEnd",()=>{this.onObjectUpdate(!0)});f(this,"onRotateEnd",()=>{this.onObjectUpdate(!0)});f(this,"onScaleEnd",()=>{this.onObjectUpdate(!0)});f(this,"onObjectUpdate",(e=!0)=>{if(!this.currentOperation){this.hooks.emit("objectUpdate");return}const i=de(V({},this.currentOperation),{end_timestamp:e?Date.now():void 0,is_handle_end:e});this.hooks.emit("objectUpdate",i),e&&(this.currentOperation=null)});this.objectHelperConfig=i}get helper(){var e;return(e=st.modules.object3DHelper.getObject3DHelper(this.originObject))==null?void 0:e.helper}enable(){super.enable();const e=typeof this.objectHelperConfig=="function"?this.objectHelperConfig():this.objectHelperConfig;st.modules.object3DHelper.addObject3DHelper(this.originObject,V({positionFrom:"boundingBox"},e));const i=st.modules.object3DHelper.getObject3DHelper(this.originObject).helper;i.hooks.on("moveStart",this.onMoveStart),i.hooks.on("rotateStart",this.onRotateStart),i.hooks.on("scaleStart",this.onScaleStart),i.hooks.on("move",this.onMove),i.hooks.on("rotate",this.onRotate),i.hooks.on("scale",this.onScale),i.hooks.on("moveEnd",this.onMoveEnd),i.hooks.on("rotateEnd",this.onRotateEnd),i.hooks.on("scaleEnd",this.onScaleEnd)}disable(){var e,i,s,o,r,a,l,c,h;super.disable(),(e=this.helper)==null||e.hooks.off("moveStart",this.onMoveStart),(i=this.helper)==null||i.hooks.off("rotateStart",this.onRotateStart),(s=this.helper)==null||s.hooks.off("scaleStart",this.onScaleStart),(o=this.helper)==null||o.hooks.off("move",this.onMove),(r=this.helper)==null||r.hooks.off("rotate",this.onRotate),(a=this.helper)==null||a.hooks.off("scale",this.onScale),(l=this.helper)==null||l.hooks.off("moveEnd",this.onMoveEnd),(c=this.helper)==null||c.hooks.off("rotateEnd",this.onRotateEnd),(h=this.helper)==null||h.hooks.off("scaleEnd",this.onScaleEnd),st.modules.object3DHelper.removeObject3DHelper(this.originObject)}initialHelperMatrix(){var e;(e=this.helper)==null||e.initialHelperMatrix()}}class hd extends tc{constructor(e){super(e);f(this,"draggingPoints",[]);f(this,"onDragstart",e=>{const i=e.target;this.draggingPoints=this.pointMeshes.filter(s=>s.position.equals(i.position))});f(this,"onDragend",e=>{this.draggingPoints=[]})}get pointMeshes(){return this.children.filter(e=>e instanceof dn)}get pointHandles(){return this.children}enable(){super.enable(),this.points.filter(Ge).forEach(e=>{const i=new dn;i.visible=!1,i.position.copy(e),i.draggable=!0,st.modules.fiveDomEvents.addEventListener(i,"drag",this.onDrag),st.modules.fiveDomEvents.addEventListener(i,"dragstart",this.onDragstart),st.modules.fiveDomEvents.addEventListener(i,"dragend",this.onDragend),this.add(i)})}disable(){super.disable(),this.removeChildren()}}class _T extends hd{constructor(e){super(e);f(this,"onDrag",e=>{if(!this.draggingPoints||this.draggingPoints.length===0)return;const i=sa(st.modules.five,e.raycaster);this.draggingPoints.forEach(s=>s.position.copy(i.point)),this.originObject.lineMesh.setPoints(this.pointMeshes.map(s=>s.position))})}get points(){return this.originObject.lineMesh.points}}class VT extends hd{constructor(e){super(e);f(this,"onDrag",e=>{if(!this.draggingPoints||this.draggingPoints.length===0)return;const i=sa(st.modules.five,e.raycaster);this.draggingPoints.forEach(s=>s.position.copy(i.point)),this.originObject.polyLineMesh.setPoints(this.pointMeshes.map(s=>s.position))})}get points(){return this.originObject.polyLineMesh.points}}function ri(n){return Array.isArray(n)?n.map(t=>[t.x,t.y,t.z]):[n.x,n.y,n.z]}class Dg extends Yi{constructor(e,i){super(e,i);f(this,"type","Polyline");f(this,"polyLineMesh");f(this,"_editor");f(this,"creatingObject");e&&(this.polyLineMesh=new ls(V(V({},e.style),e)),this.add(this.polyLineMesh))}get editor(){return this._editor||(this._editor=new VT(this)),this._editor}get data(){return de(V({},this.baseData),{points:ri(this.applyObjectMatrixWorld(this.polyLineMesh.points)),style:{lineColor:new b.Color(this.polyLineMesh.lineColor).getHex(),lineWidth:this.polyLineMesh.lineWidth,dashed:this.polyLineMesh.dashed}})}setData(e){e.points&&this.polyLineMesh.setPoints(this.applyObjectReversalMatrixWorld(e.points.map(Ve))),this.polyLineMesh.setStyle(e.style)}highlight(){var e;(e=this.polyLineMesh)==null||e.highlight()}unhighlight(){var e;(e=this.polyLineMesh)==null||e.unhighlight()}canUndo(){var e;(e=this.creatingObject)==null||e.canUndo()}canRedo(){var e;(e=this.creatingObject)==null||e.canRedo()}undo(){var e;(e=this.creatingObject)==null||e.undo()}redo(){var e;(e=this.creatingObject)==null||e.redo()}create(e){return $(this,null,function*(){this.removeChildren();const i=new ls(e);this.polyLineMesh=i,this.add(this.polyLineMesh),this.creatingObject=xy(i,this.pointSelector,e),yield this.creatingObject.finished,this.config.defaultAction&&this.editor.enable()})}}function xy(n,t,e){var D;const i=n.parent;if(!i)return;const{promise:s,resolve:o,reject:r}=eo(),a=(D=e==null?void 0:e.limit)!=null?D:"none",l=new Ks(n.style);i.add(l);const c=new Ks(de(V({},n.style),{dashed:!0,lengthEnable:!1}));i.add(c),t.enable();const h=[];let u,d,p;const m=[],g=()=>h.length>0,v=()=>m.length>0,y=()=>{g()&&(m.push(h.pop()),n.setPoints(h),E(p),t.pointSelectorHelper.magnifier.render())},w=()=>{v()&&(h.push(m.pop()),n.setPoints(h),E(p),t.pointSelectorHelper.magnifier.render())},C=L=>{m.length=0;const R=h.length===0?L.point:u.clone();h.push(R),n.setPoints(h)},E=L=>{const R=()=>{l.setPoints([]),c.setPoints([]),u=null};if(!L||(p=L,!(h!=null&&h.length)))return R();const z=h.at(-1).clone();a==="none"?(u=L.point,l.setPoints([z,u])):a==="xoz"?(d=d!=null?d:new b.Plane().setFromNormalAndCoplanarPoint(new b.Vector3(0,1,0),h[0]),t.plane=d,u=d.projectPoint(L.point,new b.Vector3),l.setPoints([z,u]),c.setPoints([u,L.point])):a==="y"&&(h.length===1?(u=L.point,l.setPoints([z,u])):(d=d!=null?d:new b.Plane().setFromCoplanarPoints(h[0],h[1],new b.Vector3(0,1,0).add(h[0])),t.plane=d,u=d.projectPoint(L.point,new b.Vector3),l.setPoints([z,u]),c.setPoints([u,L.point])))};return t.on("select",C),t.on("intersectionUpdate",E),t.on("disable",()=>{if(t.off("select",C),t.off("intersectionUpdate",E),t.plane=null,i.remove(l),i.remove(c),h.length<2)return i.remove(n),r(new Error("Cancelled"));o()}),{finished:s,canUndo:g,canRedo:v,undo:y,redo:w}}class FT extends tc{constructor(e){super(e);f(this,"onDrag",e=>{var s;const i=sa(st.modules.five,e.raycaster);(s=this.originObject.pointMesh)==null||s.position.copy(i.point)})}enable(){super.enable(),this.originObject.draggable=!0,this.originObject.on("drag",this.onDrag)}disable(){super.disable(),this.originObject.draggable=!1,this.originObject.off("drag",this.onDrag)}}class Lg extends Yi{constructor(e,i){super(e,i);f(this,"type","Point");f(this,"pointMesh");f(this,"_editor");e&&(this.pointMesh=new dn(V(V({},e.style),e)),this.add(this.pointMesh))}get editor(){return this._editor||(this._editor=new FT(this)),this._editor}get data(){return de(V({},this.baseData),{point:ri(this.applyObjectMatrixWorld(this.pointMesh.position)),style:{color:this.pointMesh.color.getHex(),size:this.pointMesh.size}})}setData(e){e.point&&this.pointMesh.position.copy(Ve(e.point)),this.pointMesh.setStyle(e.style)}highlight(){var e;(e=this.pointMesh)==null||e.highlight()}unhighlight(){var e;(e=this.pointMesh)==null||e.unhighlight()}setStyle(e){this.pointMesh.setStyle(e)}create(e){return $(this,null,function*(){this.pointMesh&&this.remove(this.pointMesh),this.add(this.pointMesh=new dn(e)),yield ud(this.pointMesh,this.pointSelector),this.config.defaultAction&&this.editor.enable()})}}function ud(n,t){return new Promise((e,i)=>{t.enable(),n.visible=!1;const s=l=>{l&&(n.visible=!0,n.position.copy(l.point))},o=l=>{l&&(n.visible=!0,n.position.copy(l.point),r())},r=()=>{t.off("select",o),t.off("disable",a),t.off("intersectionUpdate",s),t.disable(),e()},a=()=>{t.off("select",o),t.off("disable",a),t.off("intersectionUpdate",s),n.removeFromParent(),i(new Error("Cancelled"))};t.on("intersectionUpdate",s),t.on("disable",a),t.once("select",o)})}class kh extends Ko{constructor(e){const o=e!=null?e:{},{points:i}=o,s=Kn(o,["points"]);super();f(this,"name","PolygonWithEdgeMesh");f(this,"line",new Ks);i&&this.setPoints(i),s&&this.setStyle(s)}get style(){return de(V({},super.style),{lineWidth:this.lineWidth,lineColor:this.lineColor})}get lineWidth(){return this.line.lineWidth}get lineColor(){return this.line.lineColor}raycast(e,i){return this.children.forEach(s=>{Nh(s,e,i,!0)}),!1}setPoints(e,i){super.setPoints(e,V({closed:!0},i)),this.points&&(this.line.setPoints(this.points,V({closed:!0},i)),this.addIfNotExists(this.line))}setStyle(e){super.setStyle(e),e.lineOpacity!==void 0?this.line.setStyle(de(V({},e),{lineOpacity:e.lineOpacity})):this.line.setStyle(e),this.needsRender=!0}highlight(){super.highlight(),this.line.highlight()}unhighlight(){super.unhighlight(),this.line.unhighlight()}}class xh extends kh{constructor(){super(...arguments);f(this,"name","AreaMesh")}}class BT extends hd{constructor(e){super(e);f(this,"onDragstart",e=>{const i=e.target;this.draggingPoints=this.pointMeshes.filter(s=>s.position.equals(i.position))});f(this,"onDrag",e=>{var r,a;if(!this.draggingPoints||this.draggingPoints.length===0)return;const i=sa(st.modules.five,e.raycaster);if(!i)return;const s=this.originObject.areaMesh.projectPoint(i.point);this.draggingPoints.forEach(l=>l.position.copy(s)),this.originObject.areaMesh.setPoints(this.pointMeshes.map(l=>l.position)),this.hooks.emit("objectUpdate"),st.modules.five&&(st.modules.five.needsRender=!0);const o=(a=(r=this.originObject.areaMesh)==null?void 0:r.userData)==null?void 0:a.syncCreationPointMeshes;typeof o=="function"&&o()});f(this,"onDragend",e=>{this.draggingPoints=[],this.originObject.recordHistory(),this.hooks.emit("objectUpdate")})}get points(){return this.originObject.areaMesh.points}enable(){super.enable(),this.updatePointMeshes()}disable(){this.pointMeshes.forEach(e=>this.disposePointMesh(e)),super.disable()}updatePointMeshes(){var c,h,u,d,p,m,g,v,y,w,C,E;const e=this.originObject.areaMesh.points,i=(u=(h=(c=this.originObject.areaMesh)==null?void 0:c.userData)==null?void 0:h.dragSelectPixelDistance)!=null?u:10,s=this.originObject.areaMesh,o=(p=(d=s.lineColor)==null?void 0:d.getHex)==null?void 0:p.call(d),r=(g=(m=s.color)==null?void 0:m.getHex)==null?void 0:g.call(m),a=(v=o!=null?o:r)!=null?v:16777215,l=(E=(C=(w=(y=s.line)==null?void 0:y.style)==null?void 0:w.opacity)!=null?C:s.opacity)!=null?E:1;this.syncPointMeshCount(e,{dragSelectPixelDistance:i,pointColor:a,pointOpacity:l}),this.pointMeshes.forEach((D,L)=>{const R=e[L];R&&(D.position.copy(R),D.visible=!0)})}syncPointMeshCount(e,i){const s=[...this.pointMeshes],{dragSelectPixelDistance:o,pointColor:r,pointOpacity:a}=i;for(s.length>e.length&&s.slice(e.length).forEach(l=>this.disposePointMesh(l));this.pointMeshes.length<e.length;){const l=this.createPointMesh({dragSelectPixelDistance:o,pointColor:r,pointOpacity:a});this.add(l)}this.pointMeshes.forEach(l=>{var c;l.userData=(c=l.userData)!=null?c:{},l.userData.dragSelectPixelDistance=o,l.setStyle({color:r,opacity:a})})}createPointMesh(e){var a;const{dragSelectPixelDistance:i,pointColor:s,pointOpacity:o}=e,r=new dn;return r.visible=!0,r.userData=(a=r.userData)!=null?a:{},r.userData.dragSelectPixelDistance=i,r.draggable=!0,r.setStyle({color:s,opacity:o}),st.modules.fiveDomEvents.addEventListener(r,"drag",this.onDrag),st.modules.fiveDomEvents.addEventListener(r,"dragstart",this.onDragstart),st.modules.fiveDomEvents.addEventListener(r,"dragend",this.onDragend),r}disposePointMesh(e){st.modules.fiveDomEvents.removeEventListener(e),this.remove(e)}}function HT(n,t){const e=Array.isArray(t)?t:[t];for(let i=0;i<e.length;i++){const s=n.start,o=n.end,r=e[i].start,a=e[i].end;if(!(Cr(s,r)||Cr(s,a)||Cr(o,r)||Cr(o,a)||Cr(s,o))&>([s.x,s.y,s.z],[o.x,o.y,o.z],[r.x,r.y,r.z],[a.x,a.y,a.z]))return!0}return!1}function NT(n){if(n.length<2)return!1;for(let t=0;t<n.length;t++)if(HT(n[t],n.slice(t+1)))return!0;return!1}function zg(n){const t=[];for(let e=1;e<n.length;e++){const i={start:n[e-1],end:n[e]};t.push(i)}return NT(t)}function GT(n,t,e,i){const s=[t[0]-n[0],t[1]-n[1],t[2]-n[2]],o=[i[0]-e[0],i[1]-e[1],i[2]-e[2]],r=[{a:[s[0],-o[0]],b:e[0]-n[0]},{a:[s[1],-o[1]],b:e[1]-n[1]},{a:[s[2],-o[2]],b:e[2]-n[2]}],a=[[0,1],[0,2],[1,2]];for(const[l,c]of a){const h=[r[l].a,r[c].a],u=[r[l].b,r[c].b],d=WT(h);if(Math.abs(d)<1e-10)continue;const p=UT(h,d),[m,g]=QT(p,u);return!!(Og(m)&&Og(g))}return!1}function WT(n){return n[0][0]*n[1][1]-n[0][1]*n[1][0]}function UT(n,t){return[[n[1][1]/t,-n[0][1]/t],[-n[1][0]/t,n[0][0]/t]]}function QT(n,t){return[n[0][0]*t[0]+n[0][1]*t[1],n[1][0]*t[0]+n[1][1]*t[1]]}function Og(n){return n>=0&&n<=1}function Cr(n,t){return n.x===t.x&&n.y===t.y&&n.z===t.z}class Sh extends Yi{constructor(e,i){var s;super(e,i);f(this,"type","Polygon");f(this,"areaMesh");f(this,"historyStack",[]);f(this,"currentHistoryIndex",-1);f(this,"maxHistorySize",50);f(this,"_editor");f(this,"creatingObject");e&&(this.areaMesh=new xh(V(V({},e.style),e)),this.areaMesh.userData=(s=this.areaMesh.userData)!=null?s:{},typeof this.areaMesh.userData.dragSelectPixelDistance!="number"&&(this.areaMesh.userData.dragSelectPixelDistance=10),this.add(this.areaMesh))}get editor(){return this._editor||(this._editor=new BT(this)),this._editor}updateCreationPointMeshes(){var i,s;const e=(s=(i=this.areaMesh)==null?void 0:i.userData)==null?void 0:s.syncCreationPointMeshes;typeof e=="function"&&e(),this._editor&&this._editor.updatePointMeshes()}get data(){return this.updateMatrixWorld(),de(V({},this.baseData),{points:ri(this.applyObjectMatrixWorld(this.areaMesh.points)),style:{color:this.areaMesh.color.getHex(),lineColor:this.areaMesh.lineColor.getHex(),lineWidth:this.areaMesh.lineWidth}})}setData(e){e.points&&this.areaMesh.setPoints(this.applyObjectReversalMatrixWorld(e.points.map(Ve))),this.areaMesh.setStyle(e.style),this.updateCreationPointMeshes()}highlight(){var e;(e=this.areaMesh)==null||e.highlight()}unhighlight(){var e;(e=this.areaMesh)==null||e.unhighlight()}canUndo(){var i,s,o;return this.creatingObject?(o=(s=(i=this.creatingObject)==null?void 0:i.canUndo)==null?void 0:s.call(i))!=null?o:!1:this.currentHistoryIndex>0}canRedo(){var e,i,s;return this.creatingObject?(s=(i=(e=this.creatingObject)==null?void 0:e.canRedo)==null?void 0:i.call(e))!=null?s:!1:this.currentHistoryIndex<this.historyStack.length-1}undo(){var e,i;if(this.creatingObject)return(i=(e=this.creatingObject)==null?void 0:e.undo)==null?void 0:i.call(e);if(this.canUndo()){this.currentHistoryIndex--;const s=this.historyStack[this.currentHistoryIndex];this.restoreSnapshot(s)}else console.log("[Polygon] undo: 无法撤销",{uuid:this.uuid})}redo(){var e,i;if(this.creatingObject)return(i=(e=this.creatingObject)==null?void 0:e.redo)==null?void 0:i.call(e);if(this.canRedo()){this.currentHistoryIndex++;const s=this.historyStack[this.currentHistoryIndex];this.restoreSnapshot(s)}}recordHistory(){if(this.creatingObject)return;this.historyStack=this.historyStack.slice(0,this.currentHistoryIndex+1);const e={points:this.areaMesh.points.map(i=>i.clone())};this.historyStack.push(e),this.historyStack.length>this.maxHistorySize?this.historyStack.shift():this.currentHistoryIndex++}restoreSnapshot(e){this.areaMesh.setPoints(e.points.map(i=>i.clone())),this.updateCreationPointMeshes(),this._editor&&this._editor.updatePointMeshes()}create(e){return $(this,null,function*(){var s;this.children.forEach(o=>{o.parent===this&&this.remove(o)}),this.children.length=0;const i=new xh(e);this.areaMesh=i,this.add(this.areaMesh),this.creatingObject=ic(this.areaMesh,this.pointSelector,e),yield(s=this.creatingObject)==null?void 0:s.finished,this.creatingObject=null,this.recordHistory(),this.updateCreationPointMeshes(),this.config.defaultAction&&this.editor.enable()})}}function ic(n,t,e){var j,F,J,ne,q,oe,se,ae,ze;const{promise:i,resolve:s,reject:o}=eo(),r=n.parent;if(!r){o(new Error("No container"));return}const a=(j=e==null?void 0:e.limit)!=null?j:"none",l=e==null?void 0:e.simpleMode,c=(oe=(q=(J=n.five)!=null?J:(F=n.get)==null?void 0:F.call(n,"five"))!=null?q:(ne=window.globalModules)==null?void 0:ne.five)!=null?oe:window.$five,h=(se=e==null?void 0:e.autoClosePixelDistance)!=null?se:10;n.userData=(ae=n.userData)!=null?ae:{},n.userData.dragSelectPixelDistance=h;let u=0;l&&c&&c.model&&c.model.bounding&&typeof((ze=c.model.bounding.max)==null?void 0:ze.y)=="number"&&(u=c.model.bounding.max.y+1);const d=new Ks(n.style);r==null||r.add(d);const p=new Ks(de(V({},n.style),{dashed:!0,lengthEnable:!1}));r==null||r.add(p);let m=[];const g=(ee=w)=>{m.forEach((we,le)=>{const he=ee[le];he&&we.position.copy(he)})};function v(){var we,le;m.forEach(he=>{var be;return(be=he.parent)==null?void 0:be.remove(he)});const ee=(le=(we=n.line)==null?void 0:we.style)!=null?le:n.style;m=w.map((he,be)=>{var ke,Re;const te=new dn(de(V({},ee),{color:(ke=ee.pointColor)!=null?ke:ee.lineColor,tip:void 0,point:he}));return te.name=`PolygonPointMesh_${be}`,te.userData=(Re=te.userData)!=null?Re:{},te.userData.dragSelectPixelDistance=h,r==null||r.add(te),te}),g()}function y(){m.forEach(ee=>{var we;return(we=ee.parent)==null?void 0:we.remove(ee)}),m=[],n.userData&&(delete n.userData.creationPointMeshes,delete n.userData.syncCreationPointMeshes,delete n.userData.disposeCreationPointMeshes)}t.enable(),l&&t.setAdherePoints([]);const w=[];let C,E,D=!1,L;const R=[],z=()=>w.length>0,O=()=>R.length>0,A=()=>{var ee;z()&&(R.push(w.pop()),k(L),v(),(ee=e==null?void 0:e.onUndo)==null||ee.call(e),t.pointSelectorHelper&&t.pointSelectorHelper.magnifier&&t.pointSelectorHelper.magnifier.render())},M=()=>{var ee;O()&&(w.push(R.pop()),k(L),v(),(ee=e==null?void 0:e.onRedo)==null||ee.call(e),t.pointSelectorHelper&&t.pointSelectorHelper.magnifier&&t.pointSelectorHelper.magnifier.render())},I=ee=>{var le,he;R.length=0;let we=w.length===0?ee.point:C.clone();if(l&&(we=we.clone().setY(u)),e.__onWillAddPoint(we,w),!((e==null?void 0:e.experimental_max_point_count)!=null&&w.length===e.experimental_max_point_count)){if(w.push(we),n.setPoints(w,{closed:!1}),e!=null&&e.experimental_self_intersect_check&&zg(w)){const be=w.pop();n.setPoints(w,{closed:!1}),v(),console.warn("[Polygon] 检测到自相交,无法添加该点"),(le=e==null?void 0:e.__onSelfIntersect)==null||le.call(e,be);return}v(),(he=e==null?void 0:e.onPointPlaced)==null||he.call(e,w),D&&(x(),s())}},k=ee=>{const we=()=>{d.setPoints([]),p.setPoints([]),n.setPoints(w),t.pointSelectorHelper&&t.pointSelectorHelper.magnifier&&t.pointSelectorHelper.magnifier.render()};if(!ee){we(),v();return}if(L=ee,!(w!=null&&w.length))return we();const le=w.at(-1).clone();if(w.length<3&&(l?(C=ee.point.clone().setY(u),d.setPoints([le,C]),p.setPoints([])):a==="none"?(C=ee.point,d.setPoints([le,C]),p.setPoints([])):a==="xoz"?(E=E!=null?E:new b.Plane().setFromNormalAndCoplanarPoint(new b.Vector3(0,1,0),w[0]),t.plane=E,C=E.projectPoint(ee.point,new b.Vector3),d.setPoints([le,C]),p.setPoints([C,ee.point])):a==="y"&&(w.length===1?(C=ee.point,d.setPoints([le,C]),p.setPoints([])):(E=E!=null?E:new b.Plane().setFromCoplanarPoints(w[0],w[1],new b.Vector3(0,1,0).add(w[0])),t.plane=E,C=E.projectPoint(ee.point,new b.Vector3),d.setPoints([le,C]),p.setPoints([C,ee.point])))),w.length>=3){l?C=ee.point.clone().setY(u):C=n.projectPoint(ee.point);const he=w[0];let be=!1;if(typeof(e==null?void 0:e.autoClosePixelDistance)=="number"){if(c&&c.camera&&c.getElement){const te=c.getElement(),ke=te.clientWidth,Re=te.clientHeight,ye=Ze=>{const ot=Ze.clone().project(c.camera);return{x:(ot.x*.5+.5)*ke,y:(1-(ot.y*.5+.5))*Re}},De=ye(he),ve=ye(C),Ae=ye(ee.point),Oe=Math.sqrt(ui(De.x-ve.x,2)+ui(De.y-ve.y,2)),Ye=Math.sqrt(ui(De.x-Ae.x,2)+ui(De.y-Ae.y,2));(Oe<e.autoClosePixelDistance||Ye<e.autoClosePixelDistance)&&(be=!0)}}else(he.distanceTo(C)<.2||he.distanceTo(ee.point)<.2)&&(be=!0);be?(C=he,ee.point.copy(he),t.pointSelectorHelper.updateWithIntersect(ee,{emitEvent:!1}),D=!0):D=!1,d.setPoints([le,C]),p.setPoints([C,ee.point])}w.length>=2?(n.setPoints([...w,C],{closed:!1}),n.line.setPoints(n.points.slice(0,-1)),e!=null&&e.experimental_self_intersect_check&&zg([...w,C])?(t.cursorError=!0,d.setStyle({lineColor:16734553}),p.setStyle({lineColor:16734553})):(t.cursorError=!1,d.setStyle({lineColor:n.lineColor}),p.setStyle({lineColor:n.lineColor}))):n.setPoints([]),v()},x=()=>{t.off("select",I),t.off("intersectionUpdate",k),t.off("disable",S),t.plane=null,t.disable(),r==null||r.remove(d,p),y()},S=()=>{x(),r==null||r.remove(n,p,d),y(),o(new Error("Cancelled"))};return t.on("select",I),t.on("intersectionUpdate",k),t.on("disable",S),{finished:i,canUndo:z,canRedo:O,undo:A,redo:M}}function Th(n){const t=[...n],e=[];for(let i=0;i<t.length-2;i++)e.push(0,i+1,i+2);return e}function Dh(n){const t=n.map(i=>new b.Vector3(i[0],i[1],i[2]));return Rv(t)}class XT extends b.BufferGeometry{constructor(e){super();f(this,"bottomPositions",[]);f(this,"topPosition",[]);f(this,"_type","Concave");e&&this.setPosition(e)}setPosition(e){var l,c,h;const i=(l=e.bottomPositions)!=null?l:this.bottomPositions,s=(c=e.topPosition)!=null?c:this.topPosition;if(this._type=(h=e.type)!=null?h:this._type,this.bottomPositions=i,this.topPosition=s,!i||i.length<3){console.error("PrismGeometry: Invalid parameters",i,s,e),this.bottomPositions=[],this.setAttribute("position",new b.BufferAttribute(new Float32Array([]),3));return}const o=[],r=[];r.push(...i),r[0][0]===r.at(-1)[0]&&r[0][1]===r.at(-1)[1]&&r[0][2]===r.at(-1)[2]&&(r.length-=1);const a=this._type==="Concave"?Dh(r):Th(r);if(o.push(...a),s&&s.length===3){const u=[s[0]-i[0][0],s[1]-i[0][1],s[2]-i[0][2]],d=r.map(m=>[m[0]+u[0],m[1]+u[1],m[2]+u[2]]);r.push(...d);const p=o.map(m=>m+r.length/2);o.push(...p);for(let m=0;m<r.length/2-1;m++)o.push(m,m+1,m+r.length/2),o.push(m+1,m+r.length/2+1,m+r.length/2);o.push(0,r.length/2,r.length/2-1),o.push(r.length/2,r.length-1,r.length/2-1)}this.setAttribute("position",new b.Float32BufferAttribute(r.flat(),3)),this.setIndex(o),this.computeBoundingSphere()}}class YT extends b.BufferGeometry{constructor(e){super();f(this,"bottomPositions",[]);f(this,"topPosition",[]);f(this,"faceCount",0);f(this,"_type","Concave");e&&this.setPosition(e)}setPosition(e){var p,m,g;const i=(p=e.bottomPositions)!=null?p:this.bottomPositions,s=(m=e.topPosition)!=null?m:this.topPosition;if(this._type=(g=e.type)!=null?g:this._type,this.bottomPositions=i,this.topPosition=s,!i||i.length<3||!s||s.length!==3){console.error("PrismAnimationGeometry: Invalid parameters",i,s,e);return}const o=[...i];o[0][0]===o.at(-1)[0]&&o[0][1]===o.at(-1)[1]&&o[0][2]===o.at(-1)[2]&&(o.length-=1);const r=[s[0]-i[0][0],s[1]-i[0][1],s[2]-i[0][2]],a=o.map(v=>[v[0]+r[0],v[1]+r[1],v[2]+r[2]]);this.faceCount=2+o.length;const l=[],c=[],h=[],u=[];let d=0;this.addBottomFace(o,l,c,h,d,u,0),d+=this.getBottomFaceVertexCount(o),this.addTopFace(a,l,c,h,d,u,1),d+=this.getTopFaceVertexCount(a);for(let v=0;v<o.length;v++){const y=(v+1)%o.length;this.addSideFace(o[v],o[y],a[v],a[y],l,c,h,d,u,2+v),d+=4}this.setAttribute("position",new b.Float32BufferAttribute(l,3)),this.setAttribute("uv",new b.Float32BufferAttribute(c,2)),this.setIndex(h),this.clearGroups(),u.forEach(v=>{this.addGroup(v.start,v.count,v.materialIndex)}),this.computeBoundingSphere(),console.log("PrismAnimationGeometry UV debug:",{totalUVs:c.length/2,totalPositions:l.length/3,faceCount:this.faceCount,uvSample:c.slice(0,20)})}addBottomFace(e,i,s,o,r,a,l){const c=Math.min(...e.map(y=>y[0])),h=Math.max(...e.map(y=>y[0])),u=Math.min(...e.map(y=>y[2])),d=Math.max(...e.map(y=>y[2])),p=h-c||1,m=d-u||1;for(const y of e){i.push(y[0],y[1],y[2]);const w=(y[0]-c)/p,C=(y[2]-u)/m;s.push(w,C)}const g=o.length,v=this._type==="Concave"?Dh(e):Th(e);for(const y of v)o.push(y+r);a.push({start:g,count:o.length-g,materialIndex:l})}addTopFace(e,i,s,o,r,a,l){const c=Math.min(...e.map(y=>y[0])),h=Math.max(...e.map(y=>y[0])),u=Math.min(...e.map(y=>y[2])),d=Math.max(...e.map(y=>y[2])),p=h-c||1,m=d-u||1;for(const y of e){i.push(y[0],y[1],y[2]);const w=(y[0]-c)/p,C=(y[2]-u)/m;s.push(w,C)}const g=o.length,v=this._type==="Concave"?Dh(e):Th(e);for(let y=v.length-1;y>=0;y--)o.push(v[y]+r);a.push({start:g,count:o.length-g,materialIndex:l})}addSideFace(e,i,s,o,r,a,l,c,h,u){r.push(e[0],e[1],e[2],i[0],i[1],i[2],o[0],o[1],o[2],s[0],s[1],s[2]),a.push(0,0,1,0,1,1,0,1);const d=l.length;l.push(c+0,c+1,c+2,c+0,c+2,c+3),h.push({start:d,count:6,materialIndex:u})}getBottomFaceVertexCount(e){return e.length}getTopFaceVertexCount(e){return e.length}}class Ns extends bi{constructor(e){super();f(this,"name","PrismMesh");f(this,"five");f(this,"animatedBoxMesh");f(this,"activeAnimations",new Map);f(this,"activeEaseInAnimations",new Map);f(this,"_geometryInfoCache");f(this,"geometryInfoNeedUpdate",!0);f(this,"edgeMesh",new Si);f(this,"prismMesh",new Yl);f(this,"paramStyle");this.five=e==null?void 0:e.five,this.prismMesh.name="PrismMesh",this.prismMesh.geometry=new XT,this.edgeMesh.name="EdgeMesh",this.addIfNotExists(this.prismMesh,this.edgeMesh),e&&Object.keys(e).some(i=>i!=="five")&&this.setPoints(e),this.setStyle(e)}get topPosition(){return new b.Vector3().fromArray(this.prismMesh.geometry.topPosition)}get bottomPositions(){return this.prismMesh.geometry.bottomPositions.map(e=>new b.Vector3().fromArray(e))}get topPositions(){const e=this.bottomPositions[0].clone().sub(this.topPosition);return this.bottomPositions.map(i=>i.clone().sub(e))}get style(){return{color:this.color,lineColor:this.lineColor,lineWidth:this.lineWidth,opacity:this.opacity,occlusionVisibility:this.occlusionVisibility,occlusionMode:this.occlusionMode}}get opacity(){return this.prismMesh.opacity}get occlusionVisibility(){return this.prismMesh.occlusionVisibility}get occlusionMode(){return this.prismMesh.occlusionMode}get center(){return this.localCenter.clone()}get localCenter(){var e;return(e=this.geometryInfo.center.clone())!=null?e:new b.Vector3(9999,9999,9999)}get geometryInfo(){if(this.geometryInfoNeedUpdate){this.geometryInfoNeedUpdate=!1;const e=this.prismMesh.geometry.bottomPositions,i=this.prismMesh.geometry.topPosition;if(!e||e.length<3||!i){this._geometryInfoCache=void 0;return}const s=e.map((c,h)=>h>=e.length-2?null:[new b.Vector3().fromArray(e[0]),new b.Vector3().fromArray(e[h+1]),new b.Vector3().fromArray(e[h+2])]).filter(Boolean);if(s.length===0){this._geometryInfoCache=void 0;return}let o=0,r=new b.Vector3;for(const[c,h,u]of s){const d=ra(c,h,u),p=au(c,h,u,d);o+=d,r.add(p)}r=r.divideScalar(o);const a=new b.Vector3().fromArray(i).sub(new b.Vector3().fromArray(e[0])),l=r.clone().add(a.divideScalar(2));this._geometryInfoCache={center:l}}return this._geometryInfoCache}get worldCenter(){return this.updateMatrixWorld(),this.localToWorld(this.localCenter)}get color(){return this.prismMesh.color}get lineWidth(){return this.edgeMesh.style.lineWidth}get lineColor(){return this.edgeMesh.color}setStyle(e={}){this.paramStyle=V(V({},this.paramStyle),e),this.prismMesh.setStyle(this.paramStyle),this.edgeMesh.setStyle(this.paramStyle)}isBox(){const e=this.prismMesh.geometry.bottomPositions;return e&&e.length===4}setPoints(e){var i;this.prismMesh.geometry.setPosition({bottomPositions:(i=e.points)==null?void 0:i.map(Ve).map(s=>s.toArray()),topPosition:e.heightPoint?Ve(e.heightPoint).toArray():void 0}),this.edgeMesh.geometry=new Wa().fromEdgesGeometry(new b.EdgesGeometry(this.prismMesh.geometry)),this.geometryInfoNeedUpdate=!0}highlight(){this.prismMesh.highlight()}unhighlight(){this.prismMesh.unhighlight()}raycast(e,i){return this.children.forEach(s=>Nh(s,e,i,!0)),!1}setFive(e){this.five=e}playBoxAnimation(e,i="#4DF0FF"){return this.five?(this.activeAnimations.has(e)&&this.forceFinishBoxAnimation(e),new Promise(s=>{this.prismMesh.visible=!1,this.edgeMesh.visible=!1;const o=this.createOrUpdateAnimatedBoxMesh(i),r=o.material,a=3e3;let l=0;const c=rt.AnimationFrameLoop.shared.add((h,u)=>{l+=u;let d=l/a;d>1&&(d=1);let p=d;d<=.5?p=d*2:p=2-d*2,r.forEach(m=>{m.uniforms.progress.value=p}),d===1&&(c(),o.visible=!1,this.playEaseInAnimation(e,()=>{this.activeAnimations.delete(e),s()})),this.five.needsRender=!0});this.activeAnimations.set(e,{animatedBoxMesh:o,remove:c}),o.visible=!0})):(console.warn("Five instance not available for box animation"),Promise.resolve())}forceFinishBoxAnimation(e){if(!this.five){console.warn("Five instance not available for finishing box animation");return}(e?[e]:Array.from(this.activeAnimations.keys())).forEach(s=>{const o=this.activeAnimations.get(s);o&&(o.remove(),this.animatedBoxMesh&&(this.animatedBoxMesh.visible=!1),this.activeAnimations.delete(s));const r=this.activeEaseInAnimations.get(s);r&&(clearInterval(r.interval),this.activeEaseInAnimations.delete(s))}),this.showBoxFinalState(),this.five.needsRender=!0}playEaseInAnimation(e,i){if(!this.five)return;this.prismMesh.visible=!0,this.edgeMesh.visible=!0;let s=0;const o=this.prismMesh.style.opacity;this.prismMesh.setStyle({opacity:0}),this.edgeMesh.setStyle({lineOpacity:0});const r=setInterval(()=>{s===61&&(clearInterval(r),this.activeEaseInAnimations.delete(e),this.showBoxFinalState(),i()),this.edgeMesh.setStyle({lineOpacity:s/60}),this.prismMesh.setStyle({opacity:s/60*o}),this.five.needsRender=!0,s++},16);this.activeEaseInAnimations.set(e,{interval:r,model:this})}createOrUpdateAnimatedBoxMesh(e){if(!this.five)throw new Error("Five instance not available");const i=new b.Vector3(1/0,1/0,1/0),s=new b.Vector3(-1/0,-1/0,-1/0),o=this.bottomPositions;for(const v of o)i.min(v),s.max(v);const r=this.topPositions;for(const v of r)i.min(v),s.max(v);const a=s.clone().sub(i),l=this.prismMesh.geometry,c=l.bottomPositions,h=l.topPosition;if(this.animatedBoxMesh)return this.matrixWorld.decompose(this.animatedBoxMesh.position,this.animatedBoxMesh.quaternion,this.animatedBoxMesh.scale),this.animatedBoxMesh.updateMatrixWorld(),this.animatedBoxMesh.matrixAutoUpdate=!1,this.animatedBoxMesh;const u=new YT({bottomPositions:c,topPosition:h,type:"Concave"}),d=`
|
|
983
983
|
varying vec2 vUV;
|
|
984
984
|
varying vec3 vWorldPosition;
|
|
985
985
|
#include <common>
|
|
@@ -1029,7 +1029,6 @@ void main() {
|
|
|
1029
1029
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
1030
1030
|
}
|
|
1031
1031
|
`,h7=`
|
|
1032
|
-
#define RESOLUTION 2048.0
|
|
1033
1032
|
#define MAX_GROUPS 64
|
|
1034
1033
|
#define STRICT_MATCH 0.5/255.0
|
|
1035
1034
|
|
|
@@ -1039,11 +1038,16 @@ uniform sampler2D mergedTexture;
|
|
|
1039
1038
|
uniform float groupCount;
|
|
1040
1039
|
uniform float textureWidth;
|
|
1041
1040
|
uniform float pixelsPerGroup;
|
|
1041
|
+
uniform vec2 maskTexelSize;
|
|
1042
1042
|
|
|
1043
1043
|
float colorGap(vec3 a, vec3 b) {
|
|
1044
1044
|
return abs(a.r - b.r) + abs(a.g - b.g) + abs(a.b - b.b);
|
|
1045
1045
|
}
|
|
1046
1046
|
|
|
1047
|
+
float exactMatch(vec3 sampleColor, vec3 targetColor) {
|
|
1048
|
+
return colorGap(sampleColor, targetColor) <= STRICT_MATCH ? 1.0 : 0.0;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1047
1051
|
vec4 readStyleColor(float groupIndex) {
|
|
1048
1052
|
float px = groupIndex * pixelsPerGroup;
|
|
1049
1053
|
float texX = (px + 0.5) / textureWidth;
|
|
@@ -1062,53 +1066,55 @@ float readStyleOpacity(float groupIndex) {
|
|
|
1062
1066
|
return texture2D(mergedTexture, vec2(texX, 0.5)).r;
|
|
1063
1067
|
}
|
|
1064
1068
|
|
|
1065
|
-
float detectEdge(sampler2D map, vec2 uv, vec3 matchColor, float tolerance) {
|
|
1066
|
-
vec4 centerColor = texture2D(map, uv);
|
|
1067
|
-
if (colorGap(centerColor.rgb, matchColor) >= tolerance) return 0.0;
|
|
1068
|
-
float step = 1.0 / RESOLUTION;
|
|
1069
|
-
vec4 u = texture2D(map, uv + vec2(0.0, -step));
|
|
1070
|
-
vec4 l = texture2D(map, uv + vec2(-step, 0.0));
|
|
1071
|
-
vec4 r = texture2D(map, uv + vec2(step, 0.0));
|
|
1072
|
-
vec4 d = texture2D(map, uv + vec2(0.0, step));
|
|
1073
|
-
bool edge = colorGap(u.rgb, matchColor) >= tolerance || colorGap(l.rgb, matchColor) >= tolerance
|
|
1074
|
-
|| colorGap(r.rgb, matchColor) >= tolerance || colorGap(d.rgb, matchColor) >= tolerance;
|
|
1075
|
-
return edge ? 1.0 : 0.0;
|
|
1076
|
-
}
|
|
1077
|
-
|
|
1078
1069
|
void main() {
|
|
1079
|
-
vec4
|
|
1080
|
-
|
|
1070
|
+
vec4 center = texture2D(map, vUv);
|
|
1071
|
+
vec2 quarterTexel = maskTexelSize * 0.25;
|
|
1072
|
+
vec3 sample0 = texture2D(map, vUv + quarterTexel * vec2(-1.0, -1.0)).rgb;
|
|
1073
|
+
vec3 sample1 = texture2D(map, vUv + quarterTexel * vec2(1.0, -1.0)).rgb;
|
|
1074
|
+
vec3 sample2 = texture2D(map, vUv + quarterTexel * vec2(-1.0, 1.0)).rgb;
|
|
1075
|
+
vec3 sample3 = texture2D(map, vUv + quarterTexel * vec2(1.0, 1.0)).rgb;
|
|
1076
|
+
|
|
1077
|
+
float bestCoverage = 0.0;
|
|
1078
|
+
float bestScore = -1.0;
|
|
1079
|
+
float bestOpacity = 0.0;
|
|
1080
|
+
vec3 bestHighlight = vec3(0.0);
|
|
1081
1081
|
|
|
1082
1082
|
// WebGL 1.0 要求循环终止条件必须是编译时常量,所以用 MAX_GROUPS,循环内检查 groupCount
|
|
1083
1083
|
for (float i = 0.0; i < float(MAX_GROUPS); i += 1.0) {
|
|
1084
1084
|
if (i < groupCount) {
|
|
1085
|
-
|
|
1086
|
-
vec3 colorRgb = styleColor.rgb;
|
|
1087
|
-
float tol = readStyleToleranceHighlight(i).r * 3.0;
|
|
1085
|
+
vec3 colorRgb = readStyleColor(i).rgb;
|
|
1088
1086
|
vec3 highlight = readStyleToleranceHighlight(i).gba;
|
|
1089
1087
|
float opacity = readStyleOpacity(i);
|
|
1090
|
-
|
|
1088
|
+
|
|
1091
1089
|
if (opacity > 0.0) {
|
|
1092
|
-
float
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1090
|
+
float coverage = 0.25 * (
|
|
1091
|
+
exactMatch(sample0, colorRgb) +
|
|
1092
|
+
exactMatch(sample1, colorRgb) +
|
|
1093
|
+
exactMatch(sample2, colorRgb) +
|
|
1094
|
+
exactMatch(sample3, colorRgb)
|
|
1095
|
+
);
|
|
1096
|
+
// coverage 相同时优先选择中心像素所属标签,避免相邻标签边界随注册顺序闪烁。
|
|
1097
|
+
float score = coverage + exactMatch(center.rgb, colorRgb) * 0.001;
|
|
1098
|
+
if (coverage > 0.0 && score > bestScore) {
|
|
1099
|
+
bestCoverage = coverage;
|
|
1100
|
+
bestScore = score;
|
|
1101
|
+
bestOpacity = opacity;
|
|
1102
|
+
bestHighlight = highlight;
|
|
1102
1103
|
}
|
|
1103
1104
|
}
|
|
1104
1105
|
}
|
|
1105
1106
|
}
|
|
1107
|
+
|
|
1108
|
+
if (bestCoverage > 0.0) {
|
|
1109
|
+
gl_FragColor = vec4(bestHighlight, bestOpacity * bestCoverage);
|
|
1110
|
+
return;
|
|
1111
|
+
}
|
|
1106
1112
|
discard;
|
|
1107
1113
|
}
|
|
1108
|
-
`;function Na(n){if(Array.isArray(n))return n;if(typeof n=="number")return[n>>16&255,n>>8&255,n&255];if(typeof n=="string"){let t=n.trim().replace(/^#/,"");if(t.length===3&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),t.length===6){const e=parseInt(t.substring(0,2),16),i=parseInt(t.substring(2,4),16),s=parseInt(t.substring(4,6),16);if(!isNaN(e)&&!isNaN(i)&&!isNaN(s))return[e,i,s]}console.warn("[MaskTag] Invalid hex color string:",n)}return[0,0,0]}const Ye=class extends er{constructor(e,i){var r;super(e,i);f(this,"maskUrl");f(this,"targetColor");f(this,"maskMesh");f(this,"maskTexture");f(this,"loadingMask",!1);f(this,"_disposed",!1);f(this,"tagStyle");f(this,"clickEventDispose");f(this,"sharedStyleIndex",-1);f(this,"_sharedMeshKey",null);const s=(r=i.mask)!=null?r:i.maskUrl;this.maskUrl=s instanceof HTMLCanvasElement||typeof s=="string"&&s?s:"";const o=i.color;this.targetColor=Na(o),o||console.warn(`[MaskTag] No color provided for tag ${i.id}, using default [0, 0, 0]`),this.tagStyle=i.style,this.updateVisible(),this.currentVisible&&this.initializeMaskMesh()}getColorKey(){return`${this.targetColor[0]},${this.targetColor[1]},${this.targetColor[2]}`}static getMeshKey(e){return String(e)}initializeMaskMesh(){return $(this,null,function*(){var i;if(this._disposed||!this.maskUrl)return;const e=(i=this.fiveState)==null?void 0:i.panoIndex;if(typeof e=="number"){this.loadingMask=!0;try{const s=yield Ye.loadMaskTexture(this.maskUrl);this.maskTexture=s;const o=Ye.getMeshKey(e);this._sharedMeshKey=o;let r=Ye.sharedMeshRegistry.get(o);const a=this.getColorKey(),l=this.buildStyleForMaterial();r?r.maskSource!==this.maskUrl&&(Ye.releaseMaskTexture(r.maskSource),r.maskTexture=s,r.maskSource=this.maskUrl,r.material.uniforms.map.value=s):(r=Ye.createSharedMesh(s,this.maskUrl,this.plugin),Ye.sharedMeshRegistry.set(o,r),this.plugin.imagePlaneGroup.add(r.mesh));const c=r.styleIndexByColorKey.get(a);c!==void 0?(this.sharedStyleIndex=c,this.maskMesh=r.mesh,this.updateStyleSlotInMaterial(r.material,c,l)):(r.tagsByColorKey.set(a,this),this.appendStyleToMaterial(r.material,l),this.sharedStyleIndex=r.tagsByColorKey.size-1,r.styleIndexByColorKey.set(a,this.sharedStyleIndex),this.maskMesh=r.mesh),this.setupSharedMeshRaycast(r),this.updateMeshTransform(),this.setupClickEvents(),this.updateScreenPosition(),r.mesh.visible=!0}finally{this.loadingMask=!1}}})}buildStyleForMaterial(){const e=this.getMaskStyle(),i=e.tolerance,s=i<=1?i*255:i;return{color:[this.targetColor[0],this.targetColor[1],this.targetColor[2],1],tolerance:s,highlightColor:e.highlightColor,opacity:this.enabled&&this.visible?e.opacity:0}}static createSharedMesh(e,i,s){const a=Math.max(1,Math.ceil(Math.sqrt(0))),l=1,c=new Float32Array(a*l*4),h=new b.DataTexture(c,a,l,b.RGBAFormat,b.FloatType);h.needsUpdate=!0;const u=new b.ShaderMaterial({vertexShader:c7,fragmentShader:h7,uniforms:{map:{value:e},mergedTexture:{value:h},groupCount:{value:0},textureWidth:{value:a},pixelsPerGroup:{value:3}},depthWrite:!1,depthTest:!1,transparent:!0}),d=new b.SphereGeometry(1,60,40);d.rotateY(-Math.PI/2),d.scale(-1,1,1);const p=new b.Mesh(d,u);return p.renderOrder=-1e3,p.__maskMesh=!0,{mesh:p,material:u,maskTexture:e,maskSource:i,tagsByColorKey:new Map,styleIndexByColorKey:new Map}}updateStyleSlotInMaterial(e,i,s){const r=e.uniforms.mergedTexture.value,a=r.image.data,c=i*3,h=c*4;a[h]=s.color[0]/255,a[h+1]=s.color[1]/255,a[h+2]=s.color[2]/255,a[h+3]=s.color[3];const u=(c+1)*4;a[u]=s.tolerance/255,a[u+1]=s.highlightColor[0]/255,a[u+2]=s.highlightColor[1]/255,a[u+3]=s.highlightColor[2]/255;const d=(c+2)*4;a[d]=s.opacity,r.needsUpdate=!0,this.five.needsRender=!0}setupSharedMeshRaycast(e){const i=e.mesh;if(i.__maskRaycastSet)return;i.__maskRaycastSet=!0;let s=null,o=null;const r=()=>{const l=e.maskTexture;if(!(l!=null&&l.image))return null;if(o===l&&s)return s;o=l;try{const c=document.createElement("canvas"),h=c.getContext("2d");if(!h)return null;const u=l.image;return c.width=u.width,c.height=u.height,h.drawImage(u,0,0),s=h.getImageData(0,0,u.width,u.height),s}catch(c){return null}},a=i.raycast.bind(i);i.raycast=(l,c)=>{var w,C;const h=[];if(a(l,h),h.length===0)return;const u=h[0];if(!u.uv||!((w=e.maskTexture)!=null&&w.image))return;const d=r();if(!d)return;const p=Math.floor(u.uv.x*d.width),g=(Math.floor((1-u.uv.y)*d.height)*d.width+p)*4,v=[d.data[g],d.data[g+1],d.data[g+2]],y=.5/255;for(const[,E]of e.tagsByColorKey){if(!E.enabled||((C=E.config)==null?void 0:C.clickable)===!1)continue;const[D,L,R]=E.targetColor;if(Math.abs(v[0]/255-D/255)+Math.abs(v[1]/255-L/255)+Math.abs(v[2]/255-R/255)<=y){i.userData.__lastHitTag=E,c.push(u);return}}}}computeNormal(){return new b.Vector3(0,1,0)}getAdditionalBlinkTargets(){return null}blink(e){return $(this,null,function*(){var h,u,d;if(!this.maskMesh||this._sharedMeshKey===null||this.sharedStyleIndex<0)return;const i=Ye.sharedMeshRegistry.get(this._sharedMeshKey);if(!i)return;const r={opacity:this.buildStyleForMaterial().opacity},a=(h=e==null?void 0:e.duration)!=null?h:300,l=(u=e==null?void 0:e.loop)!=null?u:4,c=ct({targets:r,opacity:[0,1],duration:a,easing:(d=e==null?void 0:e.easing)!=null?d:"easeInOutQuad",direction:"alternate",loop:l,update:()=>{const p=this.buildStyleForMaterial();p.opacity=r.opacity,this.updateStyleSlotInMaterial(i.material,this.sharedStyleIndex,p)}});try{yield c.finished}catch(p){}finally{this.updateMaskStyle()}})}set(e,i=!0){var o,r;super.set(e,i),e.style&&(this.tagStyle=V(V({},this.tagStyle),e.style),(o=e.style)!=null&&o.mask&&this.updateMaskStyle());const s=(r=e.mask)!=null?r:e.maskUrl;s&&s!==this.maskUrl&&(this.maskUrl=s,this.updateSharedMeshTexture()),e.color!==void 0&&(this.targetColor=Na(e.color),this.updateMaskStyle()),this.maskMesh&&this.updateMaskStyle()}getStyleForMaterial(){return this.buildStyleForMaterial()}getVisible(e){var i;try{if(!this.enabled||!this.plugin.state.enabled||!this.fiveUtil.model||!this.maskUrl)return!1;const s=V(V({},this.five.getCurrentState()),e),{panoIndex:o}=s;return o!==((i=this.fiveState)==null?void 0:i.panoIndex)?!1:super.getVisible(s)}catch(s){return!1}}computeVisible(e){var o,r,a;const i=V(V({},this.five.getCurrentState()),e),{panoIndex:s}=i;return s!==((o=this.fiveState)==null?void 0:o.panoIndex)?{value:!1,reason:{type:"panoIndex mismatch",detail:`Mask 标签仅在当前点位可见。当前点位: ${s}, 标签点位: ${(r=this.fiveState)==null?void 0:r.panoIndex}`,currentPanoIndex:s,tagPanoIndex:(a=this.fiveState)==null?void 0:a.panoIndex}}:super.computeVisible(e)}onClick(e){e.target==="TagMaskModel"&&this.unfoldAndFoldOthers()}unfoldAndFoldOthers(){if(this.isPopoverConfigEnabled())return;const e=this.can("fold"),i=this.can("unfold");e&&i&&(this.state.unfolded=!this.state.unfolded,this.manuallyOperated=!0,this.plugin.addRenderQueue({type:"TagContainerSvelte",keys:["tags"]}),this.state.unfolded&&this.plugin.tags.forEach(s=>{s.id!==this.id&&s.fold()}))}unfold(){this.isPopoverConfigEnabled()||this.setUnfold(!0)}fold(){this.isPopoverConfigEnabled()||this.setUnfold(!1)}setUnfold(e){if(this.isPopoverConfigEnabled())return;const i=this.can("fold"),s=this.can("unfold");i&&s&&(this.state.unfolded=e,this.hooks.emit(e?"unfolded":"folded"),this.plugin.addRenderQueue({type:"TagContainerSvelte",keys:["tags"]}))}updateScreenPosition(){if(!this.currentVisible||!this.position||!Array.isArray(this.position)){this.screenPosition=null,this.plugin.addRenderQueue({type:"TagContainerSvelte",keys:["tags"]});return}const i=new b.Vector3(...this.position).clone().project(this.five.camera);if(this.five.renderer){const s=this.five.renderer.getSize(new b.Vector2);this.screenPosition={leftPx:(i.x+1)/2*s.x,topPx:(-i.y+1)/2*s.y,scale:1}}this.plugin.addRenderQueue({type:"TagContainerSvelte",keys:["tags"]})}applyVisible(){try{if(!this.maskUrl)return;this.visible&&!this.loadingMask&&this.initializeMaskMesh(),this.maskMesh&&(this.updateMaskStyle(),this.updateMeshTransform()),this.updateScreenPosition()}catch(e){console.error(`[MaskTag] Error in applyVisible for tag ${this.id}:`,e)}}updateMeshTransform(){var a;if(!this.maskMesh)return;const e=(a=this.fiveState)==null?void 0:a.panoIndex;if(e===void 0)return;const i=this.workUtil.getObserver(e);if(!i)return;this.maskMesh.position.copy(Vt(i.position,this.workUtil.transform)),this.maskMesh.quaternion.copy(i.quaternion);const s=new b.Vector3,o=new b.Quaternion,r=new b.Vector3;this.workUtil.transform.decompose(s,o,r),this.maskMesh.quaternion.multiply(o),this.five.needsRender=!0}parseStyleListFromMaterial(e){const i=e.uniforms,s=i.groupCount.value,o=i.pixelsPerGroup.value,a=i.mergedTexture.value.image.data,l=[];for(let c=0;c<s;c++){const h=c*o,u=h*4,d=a[u]*255,p=a[u+1]*255,m=a[u+2]*255,g=a[u+3],v=(h+1)*4,y=a[v]*255,w=a[v+1]*255,C=a[v+2]*255,E=a[v+3]*255,D=(h+2)*4,L=a[D];l.push({color:[Math.round(d),Math.round(p),Math.round(m),g],tolerance:Math.round(y),highlightColor:[Math.round(w),Math.round(C),Math.round(E)],opacity:L})}return l}appendStyleToMaterial(e,i){const s=this.parseStyleListFromMaterial(e);Array.isArray(i)?s.push(...i):s.push(i);const o=s.length,r=3,l=o*r,c=1,h=new Float32Array(l*c*4);s.forEach((p,m)=>{const g=m*r,v=g*4;h[v]=p.color[0]/255,h[v+1]=p.color[1]/255,h[v+2]=p.color[2]/255,h[v+3]=p.color[3];const y=(g+1)*4;h[y]=p.tolerance/255,h[y+1]=p.highlightColor[0]/255,h[y+2]=p.highlightColor[1]/255,h[y+3]=p.highlightColor[2]/255;const w=(g+2)*4;h[w]=p.opacity,h[w+1]=0,h[w+2]=0,h[w+3]=0});const u=e.uniforms.mergedTexture.value,d=u.image;d.data=h,d.width=l,d.height=c,u.needsUpdate=!0,e.uniforms.groupCount.value=o,e.uniforms.textureWidth.value=l,console.log(`成功追加样式,当前总组数:${o}`)}getMaskStyle(){var s,o,r;const e=((s=this.tagStyle)==null?void 0:s.mask)||{};let i=[255,255,255];return e.color!==void 0?i=Na(e.color):e.highlightColor!==void 0&&(i=Na(e.highlightColor)),{tolerance:(o=e.tolerance)!=null?o:.001,highlightColor:i,opacity:(r=e.opacity)!=null?r:.6}}setupClickEvents(){var i;if(!this.maskMesh||((i=this.config)==null?void 0:i.clickable)===!1)return;this.cleanupClickEvents();const e=s=>{var r,a;((a=(r=this.maskMesh)==null?void 0:r.userData)==null?void 0:a.__lastHitTag)===this&&this.plugin.hooks.emit("click",{event:s,target:"TagMaskModel",tag:this})};requestAnimationFrame(()=>{!this.maskMesh||!this.plugin.domEvents||(this.clickEventDispose=this.addObjectClickHandler(this,this.maskMesh,e))})}cleanupClickEvents(){this.clickEventDispose&&(this.clickEventDispose(),this.clickEventDispose=void 0)}reloadMask(e){var r;const i=(r=this.fiveState)==null?void 0:r.panoIndex,s=this.getColorKey(),o=typeof i=="number"?Ye.getMeshKey(i):this._sharedMeshKey;if(o){const a=Ye.sharedMeshRegistry.get(o);a&&(a.tagsByColorKey.delete(s),a.styleIndexByColorKey.delete(s),a.tagsByColorKey.size===0&&(a.mesh.parent&&a.mesh.parent.remove(a.mesh),a.mesh.geometry.dispose(),a.mesh.material.dispose(),a.material.uniforms.mergedTexture.value.dispose(),Ye.releaseMaskTexture(a.maskSource),Ye.sharedMeshRegistry.delete(o)))}this.maskMesh=void 0,this._sharedMeshKey=null,this.sharedStyleIndex=-1,this.maskTexture=void 0,this.visible&&!this.loadingMask&&this.initializeMaskMesh()}updateSharedMeshTexture(){return $(this,null,function*(){var r;if(this._disposed||!this.maskUrl)return;const e=(r=this.fiveState)==null?void 0:r.panoIndex;if(typeof e!="number")return;const i=Ye.getMeshKey(e),s=Ye.sharedMeshRegistry.get(i);if(!s){yield this.initializeMaskMesh();return}if(s.maskSource===this.maskUrl)return;const o=yield Ye.loadMaskTexture(this.maskUrl);this.maskTexture=o,Ye.releaseMaskTexture(s.maskSource),s.maskTexture=o,s.maskSource=this.maskUrl,s.material.uniforms.map.value=o,this.five.needsRender=!0})}updateMaskStyle(){if(!this.maskMesh||this._sharedMeshKey===null||this.sharedStyleIndex<0)return;const e=Ye.sharedMeshRegistry.get(this._sharedMeshKey);e&&this.updateStyleSlotInMaterial(e.material,this.sharedStyleIndex,this.buildStyleForMaterial())}updateCanvasTexture(){if(!this.maskTexture||typeof this.maskUrl=="string"){console.warn("[MaskTag] updateCanvasTexture only works for Canvas-based masks");return}this.maskTexture instanceof b.CanvasTexture&&(this.maskTexture.needsUpdate=!0,this.five.needsRender=!0,console.log("[MaskTag] Canvas texture updated"))}disposeMaskResources(){if(this._disposed)return;this._disposed=!0,this.cleanupClickEvents();const e=this._sharedMeshKey,i=this.getColorKey();if(e){const s=Ye.sharedMeshRegistry.get(e);s&&(s.tagsByColorKey.delete(i),s.styleIndexByColorKey.delete(i),s.tagsByColorKey.size===0?(s.mesh.parent&&s.mesh.parent.remove(s.mesh),s.mesh.geometry.dispose(),s.mesh.material.dispose(),s.material.uniforms.mergedTexture.value.dispose(),Ye.releaseMaskTexture(s.maskSource),Ye.sharedMeshRegistry.delete(e)):Ye.rebuildEntryMaterial(s))}this.maskMesh=void 0,this._sharedMeshKey=null,this.sharedStyleIndex=-1,this.maskTexture=void 0,this.five.needsRender=!0}dispose(){this.disposeMaskResources()}disable(){super.disable(),this.updateMaskStyle()}enable(){super.enable(),this.updateMaskStyle()}destroy(){this.disposeMaskResources(),super.destroy()}static clearSharedMeshRegistry(){Ye.sharedMeshRegistry.forEach(e=>{e.tagsByColorKey.forEach(i=>{i.maskMesh=void 0,i._sharedMeshKey=null,i.sharedStyleIndex=-1}),e.mesh.parent&&e.mesh.parent.remove(e.mesh),e.mesh.geometry.dispose(),e.mesh.material.dispose(),e.material.uniforms.mergedTexture.value.dispose(),Ye.releaseMaskTexture(e.maskSource)}),Ye.sharedMeshRegistry.clear()}static writeStyleListToMaterial(e,i){const s=i.length,o=3,a=s*o,l=1,c=new Float32Array(a*l*4);i.forEach((d,p)=>{const m=p*o,g=m*4;c[g]=d.color[0]/255,c[g+1]=d.color[1]/255,c[g+2]=d.color[2]/255,c[g+3]=d.color[3];const v=(m+1)*4;c[v]=d.tolerance/255,c[v+1]=d.highlightColor[0]/255,c[v+2]=d.highlightColor[1]/255,c[v+3]=d.highlightColor[2]/255;const y=(m+2)*4;c[y]=d.opacity});const h=e.uniforms.mergedTexture.value,u=h.image;u.data=c,u.width=a,u.height=l,h.needsUpdate=!0,e.uniforms.groupCount.value=s,e.uniforms.textureWidth.value=a}static rebuildEntryMaterial(e){const i=Array.from(e.tagsByColorKey.values()).sort((o,r)=>o.sharedStyleIndex-r.sharedStyleIndex);if(i.length===0)return;const s=i.map(o=>o.getStyleForMaterial());Ye.writeStyleListToMaterial(e.material,s),i.forEach((o,r)=>{o.sharedStyleIndex=r,e.styleIndexByColorKey.set(`${o.targetColor[0]},${o.targetColor[1]},${o.targetColor[2]}`,r)})}static getMaskCacheKey(e){if(typeof e=="string")return e;{let i=Ye.canvasSymbolMap.get(e);return i||(i=Symbol("canvas-mask"),Ye.canvasSymbolMap.set(e,i)),i}}static loadMaskTexture(e){return $(this,null,function*(){const i=Ye.getMaskCacheKey(e),s=Ye.maskTextureCache.get(i);if(s)return s.refCount++,s.texture;const o=performance.now(),r=new AbortController;try{let a;if(typeof e=="string"){const h=new b.TextureLoader;a=yield new Promise((u,d)=>{if(r.signal.aborted){d(new Error("Load aborted"));return}h.load(e,p=>{r.signal.aborted?(p.dispose(),d(new Error("Load aborted"))):u(p)},void 0,p=>{d(p)}),r.signal.addEventListener("abort",()=>{d(new Error("Load aborted"))})})}else a=new b.CanvasTexture(e),a.needsUpdate=!0,console.log("[MaskTag] Created texture from canvas, size:",e.width,"x",e.height);a.wrapS=b.ClampToEdgeWrapping,a.wrapT=b.ClampToEdgeWrapping,a.minFilter=b.LinearFilter,a.magFilter=b.LinearFilter,a.anisotropy=4,a instanceof b.CanvasTexture&&(a.needsUpdate=!0),Ye.maskTextureCache.set(i,{texture:a,refCount:1,abortController:r});const l=performance.now()-o,c=typeof e=="string"?e.substring(0,50):"Canvas";if(console.log(`[MaskTag Performance] Texture loaded in ${l.toFixed(2)}ms, source: ${c}`),a.image){const h=(a.image.width*a.image.height*4/1048576).toFixed(2);console.log(`[MaskTag Memory] Texture size: ${a.image.width}x${a.image.height}, estimated memory: ${h}MB`)}return a}catch(a){throw console.error("[MaskTag] Failed to load mask texture:",typeof e=="string"?e:"Canvas",a),a}})}static releaseMaskTexture(e){var o;const i=Ye.getMaskCacheKey(e),s=Ye.maskTextureCache.get(i);if(s&&(s.refCount--,s.refCount<=0)){const r=typeof e=="string"?e.substring(0,50):"Canvas";console.log(`[MaskTag Memory] Releasing texture (refCount=0): ${r}`),(o=s.abortController)==null||o.abort(),s.texture.dispose(),Ye.maskTextureCache.delete(i)}}static getCacheStats(){let e=0,i=0;const s=[];return Ye.maskTextureCache.forEach((o,r)=>{e+=o.refCount;let a=0;if(o.texture.image){const c=o.texture.image.width||0,h=o.texture.image.height||0;a=c*h*4/(1024*1024),i+=a}const l=typeof r=="string"?r.substring(0,80):"[Canvas]";s.push({source:l,refCount:o.refCount,sizeMB:parseFloat(a.toFixed(2))})}),{totalCached:Ye.maskTextureCache.size,totalRefCount:e,estimatedMemoryMB:parseFloat(i.toFixed(2)),cacheEntries:s}}static clearAllCache(){console.warn("[MaskTag] Clearing all texture cache"),Ye.maskTextureCache.forEach(e=>{var i;(i=e.abortController)==null||i.abort(),e.texture.dispose()}),Ye.maskTextureCache.clear()}};let Mi=Ye;f(Mi,"maskTextureCache",new Map),f(Mi,"canvasSymbolMap",new WeakMap),f(Mi,"sharedMeshRegistry",new Map);function u7(n){Le(n,"svelte-cksy1a",".audio-tag-point.svelte-cksy1a{position:relative;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;padding:0.25rem;border-radius:100%;border:0.0625rem solid rgba(255, 255, 255, 0.6);background:linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2));box-shadow:inset 0 0 0.25rem 0 rgba(255, 255, 255, 0.3);display:flex;align-items:center;justify-content:center}")}function d7(n){let t,e,i,s,o;return e=new Kl({props:{playing:n[0],width:24}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","audio-tag-point svelte-cksy1a")},m(r,a){Z(r,t,a),pe(e,t,null),i=!0,s||(o=[_e(t,"click",function(){vi(n[2])&&n[2].apply(this,arguments)}),_e(t,"pointerenter",function(){vi(n[3])&&n[3].apply(this,arguments)}),_e(t,"pointerleave",function(){vi(n[4])&&n[4].apply(this,arguments)})],s=!0)},p(r,a){n=r;const l={};a&1&&(l.playing=n[0]),e.$set(l)},i(r){i||(H(e.$$.fragment,r),i=!0)},o(r){Y(e.$$.fragment,r),i=!1},d(r){r&&X(t),me(e),s=!1,dt(o)}}}function f7(n){let t,e;return t=new sd({props:{url:n[1].data.audioUrl,enable:n[1].state.visible,style:"width: max-content; height: max-content;",hooksInfo:{tag:n[1]},$$slots:{default:[d7]},$$scope:{ctx:n}}}),t.$on("play",n[5].play),t.$on("pause",n[5].pause),t.$on("error",n[5].error),t.$on("timeupdate",n[5].timeupdate),t.$on("duration",n[5].duration),t.$on("audioRef",n[5].audioRef),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,[s]){const o={};s&2&&(o.url=i[1].data.audioUrl),s&2&&(o.enable=i[1].state.visible),s&2&&(o.hooksInfo={tag:i[1]}),s&157&&(o.$$scope={dirty:s,ctx:i}),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function p7(n,t,e){let{playing:i=!1}=t,{tag:s}=t,{handlePointClick:o=()=>{}}=t,{handleMouseEnter:r=()=>{}}=t,{handleMouseLeave:a=()=>{}}=t;const l=Vn(),c={audioRef:h=>l("audioRef",h.detail),play:()=>{e(0,i=!0),l("play")},pause:()=>{e(0,i=!1),l("pause")},error:()=>{e(0,i=!1),l("pause")},timeupdate:h=>l("timeupdate",h.detail),duration:h=>l("duration",h.detail)};return n.$$set=h=>{"playing"in h&&e(0,i=h.playing),"tag"in h&&e(1,s=h.tag),"handlePointClick"in h&&e(2,o=h.handlePointClick),"handleMouseEnter"in h&&e(3,r=h.handleMouseEnter),"handleMouseLeave"in h&&e(4,a=h.handleMouseLeave)},[i,s,o,r,a,c]}class m7 extends Ee{constructor(t){super(),Ie(this,t,p7,f7,Me,{playing:0,tag:1,handlePointClick:2,handleMouseEnter:3,handleMouseLeave:4},u7)}}function g7(n){Le(n,"svelte-dorxu0",'@charset "UTF-8";.tag-point-click-helper.svelte-dorxu0.svelte-dorxu0{position:absolute;pointer-events:auto;cursor:pointer;width:141%;height:141%;left:50%;top:50%;transform:translate(-50%, -50%);z-index:1000000}.audio-tag-point-click-helper.svelte-dorxu0.svelte-dorxu0{position:absolute;width:100%;height:100%;pointer-events:none;z-index:1}.tag-point-wrapper.svelte-dorxu0.svelte-dorxu0{pointer-events:none;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);cursor:pointer;z-index:1040}.tag-folded-point.svelte-dorxu0.svelte-dorxu0,.tag-unfolded-point.svelte-dorxu0.svelte-dorxu0{transition:all 0.5s}.tag-point-wrapper.svelte-dorxu0 .tag-unfolded-point.svelte-dorxu0{display:flex;justify-content:center;align-items:center;position:absolute;width:100%;height:100%;border-radius:50%}.tag-point-wrapper.svelte-dorxu0 .tag-unfolded-point.svelte-dorxu0:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.3125rem;height:0.3125rem;border-radius:50%;background-color:white}.tag-point-wrapper.svelte-dorxu0 .tag-unfolded-point.svelte-dorxu0:before{content:"";position:absolute;width:0.875rem;height:0.875rem;border-radius:50%;background-color:rgba(0, 0, 0, 0.2)}.tag-point-wrapper.folded.svelte-dorxu0 .tag-folded-point.svelte-dorxu0{opacity:1;scale:1}.tag-point-wrapper.folded.svelte-dorxu0 .tag-unfolded-point.svelte-dorxu0{opacity:0;scale:1}.tag-point-wrapper.unfolded.svelte-dorxu0 .tag-folded-point.svelte-dorxu0{opacity:0;scale:0.2}.tag-point-wrapper.unfolded.svelte-dorxu0 .tag-unfolded-point.svelte-dorxu0{opacity:1;scale:1}.tag-point-wrapper.disable-unfold.svelte-dorxu0 .tag-folded-point.svelte-dorxu0{opacity:1 !important;scale:1 !important}.tag-point-wrapper.disable-unfold.svelte-dorxu0 .tag-unfolded-point.svelte-dorxu0{opacity:0 !important;scale:1 !important}')}function v7(n){let t;return{c(){t=U("div"),P(t,"class","audio-tag-point-click-helper svelte-dorxu0")},m(e,i){Z(e,t,i),n[20](t)},p:ce,d(e){e&&X(t),n[20](null)}}}function y7(n){let t,e,i;return{c(){t=U("div"),P(t,"class","tag-point-click-helper svelte-dorxu0")},m(s,o){Z(s,t,o),n[19](t),e||(i=[_e(t,"click",n[16]),_e(t,"pointerenter",n[17]),_e(t,"pointerleave",n[18])],e=!0)},p:ce,d(s){s&&X(t),n[19](null),e=!1,dt(i)}}}function b7(n){let t,e;return t=new Ay({props:{icon:n[8],width:n[7]}}),t.$on("iconLoaded",n[23]),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&256&&(o.icon=i[8]),s&128&&(o.width=i[7]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function A7(n){let t,e;return t=new m7({props:{tag:mt(n[1]),handlePointClick:n[21],handleMouseEnter:n[22],handleMouseLeave:n[3]}}),t.$on("audioRef",n[14].audioRef),t.$on("play",n[14].play),t.$on("pause",n[14].pause),t.$on("timeupdate",n[14].timeupdate),t.$on("duration",n[14].duration),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.tag=mt(i[1])),s&16&&(o.handlePointClick=i[21]),s&6&&(o.handleMouseEnter=i[22]),s&8&&(o.handleMouseLeave=i[3]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function w7(n){let t,e,i,s,o,r,a,l,c,h;function u(y,w){return y[6]?v7:y7}let d=u(n),p=d(n);i=new Xi({props:{center:!0,blurRadius:15,spreadRadius:5,opacity:.3}});const m=[A7,b7],g=[];function v(y,w){return y[6]?0:1}return l=v(n),c=g[l]=m[l](n),{c(){t=U("div"),p.c(),e=ue(),ge(i.$$.fragment),s=ue(),o=U("div"),r=ue(),a=U("div"),c.c(),P(o,"class","tag-unfolded-point svelte-dorxu0"),_(o,"transition-delay",(n[9]?n[11]:0)+"ms"),P(a,"class","tag-folded-point svelte-dorxu0"),_(a,"transition-delay",(n[9]?n[11]:0)+"ms"),P(t,"class","tag-point-wrapper svelte-dorxu0"),Pe(t,"unfolded",n[5]),Pe(t,"folded",n[9]),Pe(t,"disable-unfold",n[1].isPopoverConfigEnabled())},m(y,w){Z(y,t,w),p.m(t,null),B(t,e),pe(i,t,null),B(t,s),B(t,o),B(t,r),B(t,a),g[l].m(a,null),h=!0},p(y,[w]){d===(d=u(y))&&p?p.p(y,w):(p.d(1),p=d(y),p&&(p.c(),p.m(t,e))),w&512&&_(o,"transition-delay",(y[9]?y[11]:0)+"ms");let C=l;l=v(y),l===C?g[l].p(y,w):(xe(),Y(g[C],1,1,()=>{g[C]=null}),Se(),c=g[l],c?c.p(y,w):(c=g[l]=m[l](y),c.c()),H(c,1),c.m(a,null)),w&512&&_(a,"transition-delay",(y[9]?y[11]:0)+"ms"),(!h||w&32)&&Pe(t,"unfolded",y[5]),(!h||w&512)&&Pe(t,"folded",y[9]),(!h||w&2)&&Pe(t,"disable-unfold",y[1].isPopoverConfigEnabled())},i(y){h||(H(i.$$.fragment,y),H(c),h=!0)},o(y){Y(i.$$.fragment,y),Y(c),h=!1},d(y){y&&X(t),p.d(),me(i),g[l].d()}}}function P7(n,t,e){var F,J,ne;let i,s,o,r,a;const l=cn("hooks"),c=Vn();let{tag:h}=t,u,d=!1;const p=()=>{u!==void 0&&clearTimeout(u),d=!0,u=setTimeout(()=>{d=!1},800)},m=q=>{d||(h.entryFromModel&&Ii(h.five.state.mode)?h.find({targetMode:"Panorama"}).then(()=>h.unfoldAndFoldOthers()):l.emit("click",{event:q,target:"TagPoint",tag:h}))},g=(()=>h.contentType==="Text"&&h.data.appearance==="plane"?500:800)();let{tagPointClickHelper:v=null}=t,{handleMouseEnter:y=()=>{}}=t,{handleMouseLeave:w=()=>{}}=t,{handleTagPointClick:C=()=>{}}=t;const E=()=>!0,D=(J=(F=h.config.popoverConfig)==null?void 0:F.beforeOpen)!=null?J:E,L=(ne=h.config.popoverConfig)==null?void 0:ne.onHoverEnd;let{audioInstance:R=null}=t;const z={audioRef:q=>{e(15,R=q.detail),c("audioInstanceReady",R)},play:()=>c("audioPlay"),pause:()=>c("audioPause"),timeupdate:q=>c("audioTimeUpdate",q.detail),duration:q=>c("audioDuration",q.detail)},O=q=>{C(q),m(q)},A=q=>{D(h)&&y(q)},M=q=>{w(q),L==null||L(h,q)};function I(q){qe[q?"unshift":"push"](()=>{v=q,e(0,v)})}function k(q){qe[q?"unshift":"push"](()=>{v=q,e(0,v)})}const x=q=>{C(q),m(q)},S=q=>{D(h)&&y(q)};function j(q){_n.call(this,n,q)}return n.$$set=q=>{"tag"in q&&e(1,h=q.tag),"tagPointClickHelper"in q&&e(0,v=q.tagPointClickHelper),"handleMouseEnter"in q&&e(2,y=q.handleMouseEnter),"handleMouseLeave"in q&&e(3,w=q.handleMouseLeave),"handleTagPointClick"in q&&e(4,C=q.handleTagPointClick),"audioInstance"in q&&e(15,R=q.audioInstance)},n.$$.update=()=>{var q,oe,se,ae;n.$$.dirty&2&&e(5,i=(q=h.state)==null?void 0:q.unfolded),n.$$.dirty&32&&e(9,s=!i),n.$$.dirty&2&&e(8,o=(se=(oe=h.style)==null?void 0:oe.point)!=null&&se.url?(ae=h.style)==null?void 0:ae.point:{url:vE}),n.$$.dirty&2&&e(7,r=(()=>{var we,le,he,be;const ze=(le=(we=h.style)==null?void 0:we.point)==null?void 0:le.width;if(typeof ze=="number")return ze;const ee=(be=(he=h.style)==null?void 0:he.point)==null?void 0:be.size;if(typeof ee=="number")return ee;if(ee==="S")return 18;if(ee==="M")return 20;if(ee==="L")return 24;if(ee==="XL")return 28})()),n.$$.dirty&2&&e(6,a=h.contentType==="Audio"&&h.data.appearance==="plane")},p(),[v,h,y,w,C,i,a,r,o,s,m,g,D,L,z,R,O,A,M,I,k,x,S,j]}class C7 extends Ee{constructor(t){super(),Ie(this,t,P7,w7,Me,{tag:1,tagPointClickHelper:0,handleMouseEnter:2,handleMouseLeave:3,handleTagPointClick:4,audioInstance:15},g7)}get tag(){return this.$$.ctx[1]}set tag(t){this.$$set({tag:t}),xn()}get tagPointClickHelper(){return this.$$.ctx[0]}set tagPointClickHelper(t){this.$$set({tagPointClickHelper:t}),xn()}get handleMouseEnter(){return this.$$.ctx[2]}set handleMouseEnter(t){this.$$set({handleMouseEnter:t}),xn()}get handleMouseLeave(){return this.$$.ctx[3]}set handleMouseLeave(t){this.$$set({handleMouseLeave:t}),xn()}get handleTagPointClick(){return this.$$.ctx[4]}set handleTagPointClick(t){this.$$set({handleTagPointClick:t}),xn()}get audioInstance(){return this.$$.ctx[15]}set audioInstance(t){this.$$set({audioInstance:t}),xn()}}const M7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAeCAYAAABqpJ3BAAAAAXNSR0IArs4c6QAAAFBlWElmTU0AKgAAAAgAAgESAAMAAAABAAEAAIdpAAQAAAABAAAAJgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAMKADAAQAAAABAAAAHgAAAAC3G9N3AAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgoZXuEHAAACfklEQVRYCe2Yu2tVQRCHb1QQFQRBKzEkooJoISL+ATYW/kXBSrBKLxZaidaKhSCxs1Asg4qgRhHBB6IkKr4f3yd3vCfHezfnsTGnuD/4ZWf3zO7M7M4+biZ6vd5muBsehydg1/EdB6/3uTBR8vYg9dPQoLqILzg1A++Gc+tD6JevKR/AY/BXB3kSn+bhX5QD8MNLuAnugz87xMv4cg0uw7AAVDDKo3Ar7MJKPMWPWeiELsOoAFS8D00l98laBvEN+6fgO/gPRgWg4iL8Ct3Ya5lKl7B/Bw7FhqGtg8ariAZwYND0X6V7WNOHkVg38svgw1nED/2qyykDIRfLsmy93Falvza1nUQqhaLjZ4Q38HA0UOqQ+0LExoqy2PaDipNkGfp+r9L/PHqPVE6hSgD2fw63w51QR7wN3dw6EqVOhhylQSmL0K3S/zb6ydT5MyJ/qgagvhfcEbjRCogZjzLVFjqWRbnYJ+S3CGegAa+IOgE44DPo/RCOrEZp3r+ClVAnAAd0djy5puBqOD/HuLdgZdQNwIEfQ4/WLdB8zsUXjHUBRoohrowmAWhgAbofRI6VMD3PwSUHrIMmATi+Z7S39B6YYwV8pHlp1UbTADTkhp6GPvjarMIT+l+BjdAmAA1q/FDfsmOZCuVgUu3v0b8IvSwboW0AGvaVuDdh3YCGwXYvK1eyMdoGoGF/xW2D3tTl2U/V59G/CVvBMz0HbjDILujRWgUfUbJPa+RYAZ0w970998Mqp5I/D30gtkauAHTEH0BuyimYSp05vj+EWZAzAB1yP/jc2AFNz2Ign6ibNj4KsyGeutkGLAw0iewdIfx/jkeuz/AxxjMwnoGMM/AbzDbNM/bhiRQAAAAASUVORK5CYII=",I7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAeCAMAAABdem3zAAAAb1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABt6r1GAAAAJXRSTlMApb6gupm3s7CprZWRfoeOg4qdenZzLG9ka04KJR4EET04MBlfDzTkzgAAAMpJREFUOMvd0dsSgiAQBuA1o7KMTJRUEE+9/zOGjhmjIHvdtyizM1zAv/C3lOS8BjxZlNpbAhJ/zTig1PkCdS1RZotSgF/FDBXiAXcT8z6jyZLp5PfPGthXJCsF7GrpRgs7BvrcoAM4qexhkSl3orGVM1t5c5COEVPiQIU9UZISvXRNi6S/3pptF87S8dNl9p1lxCQIw2CsadfMnmwHzoJdbJNo5LHKto6uHlENBhVfvGJlJnpGMLLtTyg9zPj5iHLhoAmeHw9YORcf/XMbuOSlzkgAAAAASUVORK5CYII=",E7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAwCAYAAAAGlsrkAAAAAXNSR0IArs4c6QAAAFBlWElmTU0AKgAAAAgAAgESAAMAAAABAAEAAIdpAAQAAAABAAAAJgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAHqADAAQAAAABAAAAMAAAAACmbYh+AAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgoZXuEHAAACtUlEQVRYCcWXzUtWQRSHb1ZWL1FYIH2AkSaEBbkMsTYFQVCbdkVQ7Vr3L/RXRQURIrVopxAuBEmIwCBqkfZBz2/0yLV35oz39X4c+HnHuXPOM2c+ztWi6MZ6Q91wi/GuwLe6SPgy0NdtZzwN9LmyPaAfLZg4j9A9tB+1Ah6D8wyNC2jWdMZ3AT1Ahwxoz6bAIwCeoisoyoh22qwGfF7F7zE66vnXCe4Buo9m0UEPqnd1gSeJ9QSNKij2C7nwvYLlfxupElWKVWkwwct2ml8eorOlzt9b7cOlvmhzUPA1oinT/6+J4oUCEaWVOquCdU1UfSZQDKCM1V/rHqu4qyAcQSmzRNyDJWcbmAqkfl2Tm0jg3PjaMladvYOOb0GzmTBOlh3nZaAMdU3Ke5nbO4uXG1ekvseTAG+gqmbXKeuXAs9kPeMDLOPsUsfA2le3wMeZodcy1lK7FgMfcz3yL//khxTJPU755pZQS10+jKk4UfB6cvRmRXJeh1cDZ7yMuwf3wFZAcisTzVjOb7zozjs71QMdLsVdQq8cwJ5feQfhC9FX0Xmk76vdAPmoHdNf+vch+1zGxoQ+D4x/8Q0tIN3rU8j2LhXQTrXFTY0bsgHETJr26yNaQ+eQskkFVMaC6+mtzK7AxAimpV9EZ9AJFIMLqv7cylQCE6/4iT6gDXQBGcgm0UjGcLZthZayn0AqsQamGSZTe8YKbPaDxjukrJW94LYCte4xcftMAB083fuLSAdPcFlth2szXPznV7rn0Uk0hhpdauLvMF07HbzP6BIaRrb3fc/d3GP8K9knRs8h3XkVnT6o+poAEzdcu7c8de3sz+IdE2gKLLhMB+89mkL6L2Qb3jQYVqj3L3nqPxBNIMDbAMMKtVsHTx+c60gHr3XTnr9oK+NydvrYjHYB1iS+l2fSZrv3D/+KTyvCdHWgAAAAAElFTkSuQmCC",k7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAwCAYAAAAGlsrkAAAAAXNSR0IArs4c6QAAAFBlWElmTU0AKgAAAAgAAgESAAMAAAABAAEAAIdpAAQAAAABAAAAJgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAHqADAAQAAAABAAAAMAAAAACmbYh+AAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgoZXuEHAAACpklEQVRYCcWYPYwOURSGP38Rv4lEsZoVkq0oNEQjEopNFCQSlUIkJCqFUiLR0ah1SIROgWQLQSNBKUIhGwUNUZD4K/w/b3wnmZ1v7tx3xsw4ybsz994z57nn3J9lR6PRaCUa3BZD3Dw4FaDAs/8DLOYdtHVouDJeis6hbUPClwA7gjSBPWgFeop+oV5NwKIdoHEBTRc7+3iPjJXhb6TnWqTsv6EXqBcrZxwQrfthdBqti84unylwMLbwch7tjI6unjmwOKvRCXQMdXbLOeDvAGXb0Rk0o8a/WtXm0iaLjabNJskWoeVoB9IeeIlijNdm5mS8bBzyRyH0Xt5PoQ2FvkavDjhKXQ48RcdJtKs84LQdcGSs8pZNS7UPaeM1OnYOODIulro8gY10HEf2LxsHXJdxcQJraBxE+1H22DlgBf+J6jKWT1RGWR9F0+pMmQNWQK1l1Rqn4q5i4BBKlt4Bp4I7/Tp2M1WODjjWOFfqqvjq240mquWAVWqt8cTH9Dmm225T2dEB6xutcc6iMlV+gi8wF9xkVy8ApBou2Mk4xVD/x/KgA44Stl3jz0BftwHHxdB2Vz8sQ9V2Mo7v2mR8j4/nI0Dx6QRTqZV1LuPwU/wv6DaaKLEGZQ44Sv33i/TPmNwzXO6ir2lXDxyZaJJ1WWvsFhI4a00yroO+gnQDfcgSxw4OuC5jXSxz6IELDD8HLN+qm+st/VfRGzk0NQesTRM3V5Rbx0SZRrsp19rVxaDvaVxC88XONu9OxrHGjwBcR7XHxJ2EA9Zdexk9doM6fjnwc4JcRPYxcaDySYG1aa4hXQi9WBVYl4H+HJG8Z7uYSRl8k6BXUOtj4k4qwNqpZ9ET98Mu/O4TJPkP7y4AVTF0I61HKvGgJvAn9G5Q6hiW/Z9dH5P6A8K2bfEUA9VoAAAAAElFTkSuQmCC",x7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAeCAYAAABqpJ3BAAAAAXNSR0IArs4c6QAAAFBlWElmTU0AKgAAAAgAAgESAAMAAAABAAEAAIdpAAQAAAABAAAAJgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAMKADAAQAAAABAAAAHgAAAAC3G9N3AAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgoZXuEHAAACfElEQVRYCe2XP2sVQRTFd0VsIgmpTAqx1EAStLAIpowgFmohFkEQ0+UbBEEJCpJvkE4REguVoBY2EaysLJSkSCzFQq1EMQg2z9+Jc2EyziSzb/eZJ7wLlzv37v1zzuy82aRstVr9RVGModfQGfR/kHuAfICulz5ayJzBf4oe9uNdtP4BlktlWb42TDsIKAiJs5gnltBl9jLgV31MfxHQQ0jcxsz6iV2wXgT8rRBHisAhEl+gI2HBPvkbzD0PgV/h/CgBJfEWjmOeoyKznyLQFwD/PgYiSUDJkLiOmYsV/sPYAuDvp+btSkBFkFDx6VSDDsffAF6bmJQcAkNUP0J1tbZcJ6uTr7VZPba1nxuLhblhT12ZVyDwWYkpsaLU8+04b0FX651dk5p/eBPwO67M2IiDsWAYUyNITBCfCp91yH+ZA16zs96AEiGgPzkW0SPyOyhf6D0Lge85M7IJqBkkxjELOY1r5MwBfi23PusIWTM1hsRj/IsWa9g+qwJesysRcGCXsaPoUec3ZT7SSL0rSaUjZJ15C8dYz6NNfaX1tZ1n9z9gK0lbBDQBErpapytNSyc/BPyeV2asvJ0jtN1HAyGho3QC9T9Util+TDVhXDHJZrvgVWxNta4sENDVegPtq1z8p2ALcxcCWVdmbEYtAmoIiVOYq7HmGbElwL/NyEumtH2ErKMAQEJ/ep+0WKZ9Vxe85tQm4MCuYIfRQefvZb6SoJracqB2Bxqwk7oGBUg2R1dcDen1pPZvwB/PURrHP+fHIuvVJo6O9W2UgJq638Mky34b4uxP7CvAR/81DHKz3cYJ2GSI6Gs94Pxv2E9NHRub0bO9HejtQFH8BvWooa9jGY/wAAAAAElFTkSuQmCC",S7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAeCAMAAABdem3zAAAAgVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9d3yJTAAAAK3RSTlMA/Pfx6+XZ39TIwry2sJ+qpY3Ok4jNgpl8dnEGmEUfDi5hOycxmn5YGGhjcHcwqwAAAMZJREFUOMvd0e0OgiAUgGEqs9IiLdNCRQS/6v4vMGrNofJxfvfIzuZ2fugL+ls5ZYwiOPEk0ktA95vHD4Pt0/uIgr6fpCOSI7c+UfSAH4gnGtd+lVwnkgrZkSzLCnmK75QPse+XeKG0FsXRAqaWovFZIza3rU9atWmfHQ2YoWgUGkT6tl1g1GmLHiw0bYfgcrvI8xlyyqG+BwOaw3srvCjqO8zaCn/n4IvJFYdbp1C98NQDSJWiG5CxLffWIB5HUsXbFVjLqzcmgh9KFWWqZgAAAABJRU5ErkJggg==",T7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAwCAYAAAAGlsrkAAAAAXNSR0IArs4c6QAAAFBlWElmTU0AKgAAAAgAAgESAAMAAAABAAEAAIdpAAQAAAABAAAAJgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAHqADAAQAAAABAAAAMAAAAACmbYh+AAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgoZXuEHAAACiElEQVRYCcWYsUscQRSH74LaBE60MU2wsBALBQsbTSuEFCkCKmghYmUjdmohiIUpU6WxSZEQQrqkjZA/IEXESksREbEQBRFEOL+nOzK3O7NvvNudG/g5s29m3je/mbnz2EqlDaVer9detIEryOF2geejG2abJ9BdVDDASXQeDQyoC22hS3SDyncMZBDtInH6BC71cgFa4Cx/o6H0mXakA0U8A3xFno9oHHW5chbuGOgkoJ9ozAU0scIcA6yRdAW9Q06XBip1IWCgI+RaRa8lKaX+WPn/tgQGKM7m0BRSXdrLaBoMtJ9Ey2jATpi0q45YQ6gpMFC5QLPoZUO2Zzw8CwxQLtAikjPN29rizhjoKLAZ1IO00vpWAxRnH5B8LqWtugkZk7vVQOUCCbQPmaK6YaA6xgsGKuf4HqXPMsSxWaS3dn5lAh1kxlvPLNUN89TFOcFMfOOBhobVxWXAybnKx8ZXVDdMVMdkwEzq9hGTuOpGmf/Q7QJr81Q3JFAX5wJfauSAfnVxLvApiW9ykqtumKuOyYCr1eotE//mgEO6mnJcAX5I9j8egprUM68hnHFseoH/p/0VXZhYUqvbyDh1jBcsEOBHVJ/RnjwXWXLBApIzRz9ofkPXEgso6nGoYANJtn6b5wMTy6lb2+p0YuBX6BPx70huv68U59gmAJcbv4mO7bjVLtaxldhcvHViv+x4aDv4jF0JcS4X7wt9a+jMGlPOVluAhybwfRpLaDfpU7daHZAkCq74fy6/uTdQL+pE8tMprc6WtpqEmZJcvGk6/mU6YwVwv4AO0QlqeCNQ+hoAOl9FlA4WAPD4L19sZywg7uumFDz+CzazAJzvmHbUGvBEVKCBAa7dA6h+CDnUpjBPAAAAAElFTkSuQmCC",D7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAwCAYAAAAGlsrkAAAAAXNSR0IArs4c6QAAAFBlWElmTU0AKgAAAAgAAgESAAMAAAABAAEAAIdpAAQAAAABAAAAJgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAHqADAAQAAAABAAAAMAAAAACmbYh+AAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgoZXuEHAAACXElEQVRYCcWYQSgFQRjHdyUlRU5ykCMOxMHJSXlnV4nk7OTISRw8N7koJSeKg+Ig5R3l4kBOHF8u5KD3IoVa/692XtPXzOz3Ztfu1jQz35v5ft//2++1uxNEUdQZFHC1gDlcADcg8EIR4ACp/kWbyB0eg9/Ql3KFx+Av9DW0dbS2XAJgYFJeQRv4bzgVF7+GYDgHfJH/kOU8JMVw+IP2bWg3sK2EYfiCPtPLpFgHjGNyguAyL7wkxXomLhDENtTX9ch8x0mKyW8UO59Cvwv1I/E8VScBhxqhB+MyFR5aqr+dBKxxG8NpjDYB729YmhxIwCrV3HUfDGuAexWeBKynmsMp3bOAL6M19XiVgG2K9SAGMVkFfEw3usYSsEux7rsDkznAZ9ASC08C1p1LxqNYtAS4s/AkYEmq+ZpuwOddqZeAJSptt6MEuPFJJwHbnEoCojWTpnsuAfM0moCuNe3Y0Ms3ScBpFROzywfsUqP8NR2cRLFy7uqTgqvxzRKwRI1rTR3P8KoPOEkN98nn19xA86wU24K7hNonE7jVZPSw8VS/w8epKcXKtwRsU6N8UK+vucecoPTWar0kYK7G5IzWfKIdA3hnWsBtErCuhu9X80cM9gEVv4FKwC7FlM4jAK9UBNJeArb5esYPO4BWbQtcdgnYlOozOD0E1FlAacH6/ldMtgB80I0+Y4lidY8rAGT2CSMBfwC44VNArkwkgW+x+V8+U21gKpoyVB64ok71G96H6NRHnYHkdhShjpsUOPfDl8KOmwo5YNtLVSS+m1FY+aulYAFu6rvWVyDf9wc6+wpavsNbLQAAAABJRU5ErkJggg==";function L7(n){Le(n,"svelte-16evpcg",".tag-popover-arrow-wrapper.svelte-16evpcg{position:absolute;transform-origin:center;background-position:center;background-repeat:no-repeat;background-size:100% 100%}.tag-popover-arrow-top.svelte-16evpcg{width:1rem;height:0.625rem;top:0.5rem;left:50%;transform:translateX(-50%)}.tag-popover-arrow-bottom.svelte-16evpcg{width:1rem;height:0.625rem;bottom:0.5rem;left:50%;transform:translateX(-50%)}.tag-popover-arrow-left.svelte-16evpcg{width:0.625rem;height:1rem;top:50%;left:0.5rem;transform:translateY(-50%)}.tag-popover-arrow-right.svelte-16evpcg{width:0.625rem;height:1rem;top:50%;right:0.5rem;transform:translateY(-50%)}")}function Fg(n){let t,e,i;return{c(){t=U("div"),P(t,"class",e="tag-popover-arrow-wrapper tag-popover-arrow-"+n[0]+" theme-"+n[2]+" svelte-16evpcg"),P(t,"style",i=`background-image: url(${n[3]})`)},m(s,o){Z(s,t,o)},p(s,o){o&5&&e!==(e="tag-popover-arrow-wrapper tag-popover-arrow-"+s[0]+" theme-"+s[2]+" svelte-16evpcg")&&P(t,"class",e),o&8&&i!==(i=`background-image: url(${s[3]})`)&&P(t,"style",i)},d(s){s&&X(t)}}}function z7(n){let t,e=n[1]&&Fg(n);return{c(){e&&e.c(),t=Be()},m(i,s){e&&e.m(i,s),Z(i,t,s)},p(i,[s]){i[1]?e?e.p(i,s):(e=Fg(i),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:ce,o:ce,d(i){e&&e.d(i),i&&X(t)}}}function O7(n,t,e){let i,{direction:s="bottom"}=t,{show:o=!0}=t,{theme:r="dark"}=t;return n.$$set=a=>{"direction"in a&&e(0,s=a.direction),"show"in a&&e(1,o=a.show),"theme"in a&&e(2,r=a.theme)},n.$$.update=()=>{n.$$.dirty&5&&e(3,i=(()=>{switch(r){case"dark":switch(s){case"top":return I7;case"bottom":return M7;case"left":return E7;case"right":return k7}case"light":switch(s){case"top":return S7;case"bottom":return x7;case"left":return T7;case"right":return D7}}})())},[s,o,r,i]}class j7 extends Ee{constructor(t){super(),Ie(this,t,O7,z7,Me,{direction:0,show:1,theme:2},L7)}}function R7(n){Le(n,"svelte-1d6rvbz",".icon-container.svelte-1d6rvbz{width:3.25rem;height:3.25rem;background-color:var(--bg-color);border-radius:100%;display:flex;align-items:center;justify-content:center;z-index:2}")}function _7(n){let t,e,i,s,o,r,a,l,c,h;return{c(){t=U("div"),e=Te("svg"),i=Te("defs"),s=Te("linearGradient"),o=Te("stop"),r=Te("stop"),a=Te("linearGradient"),l=Te("stop"),c=Te("stop"),h=Te("path"),P(o,"stop-color",n[1]),P(o,"offset","0%"),P(r,"stop-color",n[1]),P(r,"stop-opacity",".5"),P(r,"offset","100%"),P(s,"x1","53.2804066%"),P(s,"y1","100%"),P(s,"x2","64.4764442%"),P(s,"y2","2.52981206%"),P(s,"id","video-icon-gradient-a"),P(l,"stop-color",n[1]),P(l,"offset","0%"),P(c,"stop-color",n[1]),P(c,"stop-opacity","0"),P(c,"offset","100%"),P(a,"x1","50%"),P(a,"y1","-5.89066117%"),P(a,"x2","60.3018289%"),P(a,"y2","32.0415872%"),P(a,"id","video-icon-gradient-b"),P(h,"d","M8.0883645,5.35 C8.27319183,5.35 8.45426937,5.40368245 8.61098984,5.50477659 L20.4341152,13.1314044 C20.6662958,13.2811749 20.8173539,13.5140616 20.8743923,13.7691613 C20.9300733,14.0181899 20.8962437,14.2885953 20.7601668,14.5243865 L8.61098984,22.4950731 C8.38014238,22.6439836 8.11267156,22.6823641 7.86680489,22.6238045 C7.62023287,22.5650769 7.39563144,22.408984 7.25097187,22.1700998 C7.15226844,22.0071054 7.1,21.8187509 7.1,21.6265526 L7.1,6.37329702 C7.1,6.09035119 7.2108925,5.83405961 7.39059316,5.64859123 C7.56916841,5.46428435 7.81578724,5.35 8.0883645,5.35 Z"),P(h,"fill","url(#video-icon-gradient-a)"),P(h,"fill-rule","nonzero"),P(h,"stroke","url(#video-icon-gradient-b)"),P(h,"stroke-width",".2"),P(e,"xmlns","http://www.w3.org/2000/svg"),P(e,"viewBox","0 0 28 28"),P(e,"width",n[0]),P(e,"height",n[0]),P(t,"class","icon-container svelte-1d6rvbz"),_(t,"--bg-color",n[2])},m(u,d){Z(u,t,d),B(t,e),B(e,i),B(i,s),B(s,o),B(s,r),B(i,a),B(a,l),B(a,c),B(e,h)},p(u,[d]){d&2&&P(o,"stop-color",u[1]),d&2&&P(r,"stop-color",u[1]),d&2&&P(l,"stop-color",u[1]),d&2&&P(c,"stop-color",u[1]),d&1&&P(e,"width",u[0]),d&1&&P(e,"height",u[0]),d&4&&_(t,"--bg-color",u[2])},i:ce,o:ce,d(u){u&&X(t)}}}function V7(n,t,e){let{size:i="28"}=t,{color:s="#ffffff"}=t,{bgColor:o="#0000004d"}=t;return n.$$set=r=>{"size"in r&&e(0,i=r.size),"color"in r&&e(1,s=r.color),"bgColor"in r&&e(2,o=r.bgColor)},[i,s,o]}class _y extends Ee{constructor(t){super(),Ie(this,t,V7,_7,Me,{size:0,color:1,bgColor:2},R7)}}function F7(n){Le(n,"svelte-1d6rvbz",".icon-container.svelte-1d6rvbz{width:3.25rem;height:3.25rem;background-color:var(--bg-color);border-radius:100%;display:flex;align-items:center;justify-content:center;z-index:2}")}function B7(n){let t,e,i,s,o,r,a,l,c,h,u,d,p,m,g,v;return{c(){t=U("div"),e=Te("svg"),i=Te("defs"),s=Te("linearGradient"),o=Te("stop"),r=Te("stop"),a=Te("linearGradient"),l=Te("stop"),c=Te("stop"),h=Te("linearGradient"),u=Te("stop"),d=Te("stop"),p=Te("g"),m=Te("path"),g=Te("path"),v=Te("path"),P(o,"stop-color","#FFF"),P(o,"offset","0%"),P(r,"stop-color","#FFF"),P(r,"stop-opacity",".5"),P(r,"offset","100%"),P(s,"x1","54.417371%"),P(s,"y1","106.742364%"),P(s,"x2","72.619444%"),P(s,"y2","8.15444328%"),P(s,"id","xmfpi7cnc__sgsykm5x9a"),P(l,"stop-color","#FFF"),P(l,"offset","0%"),P(c,"stop-color","#FFF"),P(c,"stop-opacity","0"),P(c,"offset","100%"),P(a,"x1","50%"),P(a,"y1",".73169217%"),P(a,"x2","66.0966077%"),P(a,"y2","34.1694374%"),P(a,"id","xmfpi7cnc__tjqs3iy6kb"),P(u,"stop-color","#FFF"),P(u,"offset","0%"),P(d,"stop-color","#FFF"),P(d,"stop-opacity",".5"),P(d,"offset","100%"),P(h,"x1","55.1256353%"),P(h,"y1","273.650936%"),P(h,"x2","55.1256353%"),P(h,"y2","81.7206937%"),P(h,"id","xmfpi7cnc__rs5hxavsyc"),P(m,"d","M18,5.4 L18,13.4 C18,15.3329966 13.9705627,16.9 9,16.9 C4.02943725,16.9 0,15.3329966 0,13.4 L0,5.4 C0,7.33299662 4.02943725,8.9 9,8.9 C13.8670094,8.9 17.8316983,7.39760831 17.9947813,5.52032488 L18,5.4 Z M4.9603418,4.9 C5.2193418,4.9 5.4643418,4.837 5.6883418,4.704 C6.1293418,4.445 6.4093418,3.976 6.4093418,3.444 C6.4093418,3.003 6.2203418,2.611 5.9053418,2.359 C6.1643418,2.1 6.3393418,1.729 6.3393418,1.337 C6.3393418,1.092 6.2763418,0.861 6.1573418,0.658 C5.9053418,0.245 5.4643418,0 4.9603418,0 C4.7223418,0 4.4983418,0.056 4.2953418,0.175 C3.8753418,0.413 3.6163418,0.84 3.6163418,1.337 L3.6163418,1.372 L4.3373418,1.372 L4.3373418,1.337 C4.3373418,1.022 4.6313418,0.721 4.9603418,0.721 C5.3173418,0.721 5.6113418,1.008 5.6113418,1.337 C5.6113418,1.708 5.3243418,1.995 4.9603418,1.995 L4.8203418,1.995 L4.8203418,2.723 L4.9603418,2.723 C5.3593418,2.723 5.6883418,3.045 5.6883418,3.444 C5.6883418,3.843 5.3593418,4.179 4.9603418,4.179 C4.5613418,4.179 4.2323418,3.843 4.2323418,3.444 L4.2323418,3.339 L3.5043418,3.339 L3.5043418,3.444 C3.5043418,3.71 3.5673418,3.955 3.7003418,4.172 C3.9593418,4.62 4.4283418,4.9 4.9603418,4.9 Z M8.6073418,4.9 C8.8803418,4.9 9.1253418,4.83 9.3563418,4.697 C9.8043418,4.424 10.0983418,3.934 10.0983418,3.395 C10.0983418,3.122 10.0283418,2.877 9.8953418,2.646 C9.6223418,2.198 9.1463418,1.904 8.6073418,1.904 C8.5303418,1.904 8.4743418,1.904 8.4393418,1.911 L9.3143418,0 L8.5093418,0 L7.2353418,2.793 C7.1443418,2.982 7.1023418,3.185 7.1023418,3.395 C7.1023418,3.668 7.1723418,3.92 7.3053418,4.151 C7.5783418,4.606 8.0543418,4.9 8.6073418,4.9 Z M8.6073418,4.158 C8.1803418,4.158 7.8443418,3.822 7.8443418,3.395 C7.8443418,2.975 8.1873418,2.625 8.6073418,2.625 C9.0273418,2.625 9.3773418,2.975 9.3773418,3.395 C9.3773418,3.815 9.0273418,4.158 8.6073418,4.158 Z M12.2613418,4.907 C12.7653418,4.907 13.2133418,4.634 13.4653418,4.207 C13.5913418,3.997 13.6543418,3.766 13.6543418,3.514 L13.6543418,3.514 L13.6543418,1.428 C13.6543418,0.917 13.3813418,0.448 12.9613418,0.189 C12.7443418,0.063 12.5133418,0 12.2613418,0 C11.7503418,0 11.2813418,0.273 11.0293418,0.714 C10.8963418,0.931 10.8333418,1.169 10.8333418,1.428 L10.8333418,1.428 L10.8333418,3.514 C10.8333418,4.018 11.1063418,4.466 11.5473418,4.718 C11.7643418,4.844 12.0023418,4.907 12.2613418,4.907 Z M12.2613418,4.186 C11.8903418,4.186 11.5683418,3.885 11.5683418,3.514 L11.5683418,3.514 L11.5683418,1.428 C11.5683418,1.029 11.8763418,0.735 12.2613418,0.735 C12.6323418,0.735 12.9123418,1.029 12.9123418,1.428 L12.9123418,1.428 L12.9123418,3.514 C12.9123418,3.899 12.6323418,4.186 12.2613418,4.186 Z M15.4753809,2.07333984 C15.7488184,2.07333984 15.9886458,1.97478841 16.1948633,1.77768555 C16.4010807,1.58058268 16.5041895,1.33391927 16.5041895,1.03769531 C16.5041895,0.750585938 16.4050684,0.507340495 16.2068262,0.307958984 C16.008584,0.108577474 15.7647689,0.00888671875 15.4753809,0.00888671875 C15.1928288,0.00888671875 14.9495833,0.109147135 14.7456445,0.309667969 C14.5417057,0.510188802 14.4397363,0.756282552 14.4397363,1.04794922 C14.4397363,1.32138672 14.5365788,1.56064453 14.7302637,1.76572266 C14.9239486,1.97080078 15.172321,2.07333984 15.4753809,2.07333984 Z M15.4753809,1.70078125 C15.2930892,1.70078125 15.137002,1.63583984 15.0071191,1.50595703 C14.8772363,1.37607422 14.8122949,1.22226563 14.8122949,1.04453125 C14.8122949,0.859960938 14.877806,0.703304036 15.0088281,0.574560547 C15.1398503,0.445817057 15.2953678,0.381445313 15.4753809,0.381445313 C15.6553939,0.381445313 15.8097721,0.446386719 15.9385156,0.576269531 C16.0672591,0.706152344 16.1316309,0.859960938 16.1316309,1.03769531 C16.1316309,1.22226563 16.0661198,1.37892253 15.9350977,1.50766602 C15.8040755,1.63640951 15.6508366,1.70078125 15.4753809,1.70078125 Z"),P(m,"fill","url(#xmfpi7cnc__sgsykm5x9a)"),P(m,"transform","translate(3 3.1)"),P(g,"d","M18,5.4 L18,13.4 C18,15.3329966 13.9705627,16.9 9,16.9 C4.02943725,16.9 0,15.3329966 0,13.4 L0,5.4 C0,7.33299662 4.02943725,8.9 9,8.9 C13.8670094,8.9 17.8316983,7.39760831 17.9947813,5.52032488 L18,5.4 Z M17.8,6.499 L17.7806846,6.52607583 C16.6077599,8.0452893 13.108676,9.1 9,9.1 C4.87821133,9.1 1.38089175,8.04047836 0.214303539,6.51942435 L0.2,6.5 L0.2,13.4 C0.2,15.1332693 3.96631253,16.6348245 8.69056715,16.6979358 L9,16.7 C13.8681548,16.7 17.8,15.1709491 17.8,13.4 L17.8,6.499 Z M12.2613418,0 C12.5133418,0 12.7443418,0.063 12.9613418,0.189 C13.3813418,0.448 13.6543418,0.917 13.6543418,1.428 L13.6543418,3.514 L13.6467818,3.66268 C13.6266218,3.85756 13.5661418,4.039 13.4653418,4.207 C13.2133418,4.634 12.7653418,4.907 12.2613418,4.907 C12.0023418,4.907 11.7643418,4.844 11.5473418,4.718 C11.1063418,4.466 10.8333418,4.018 10.8333418,3.514 L10.8333418,1.428 L10.8409578,1.27512 C10.8613418,1.07464 10.9229418,0.8876 11.0293418,0.714 C11.2813418,0.273 11.7503418,0 12.2613418,0 Z M9.3143418,0 L8.4393418,1.911 C8.4743418,1.904 8.5303418,1.904 8.6073418,1.904 C9.1463418,1.904 9.6223418,2.198 9.8953418,2.646 C10.0283418,2.877 10.0983418,3.122 10.0983418,3.395 C10.0983418,3.934 9.8043418,4.424 9.3563418,4.697 C9.1253418,4.83 8.8803418,4.9 8.6073418,4.9 C8.0543418,4.9 7.5783418,4.606 7.3053418,4.151 C7.1723418,3.92 7.1023418,3.668 7.1023418,3.395 C7.1023418,3.185 7.1443418,2.982 7.2353418,2.793 L8.5093418,0 L9.3143418,0 Z M4.9603418,0 C5.4643418,0 5.9053418,0.245 6.1573418,0.658 C6.2763418,0.861 6.3393418,1.092 6.3393418,1.337 C6.3393418,1.729 6.1643418,2.1 5.9053418,2.359 C6.2203418,2.611 6.4093418,3.003 6.4093418,3.444 C6.4093418,3.976 6.1293418,4.445 5.6883418,4.704 C5.4643418,4.837 5.2193418,4.9 4.9603418,4.9 C4.4283418,4.9 3.9593418,4.62 3.7003418,4.172 C3.5673418,3.955 3.5043418,3.71 3.5043418,3.444 L3.5043418,3.339 L4.2323418,3.339 L4.2323418,3.444 C4.2323418,3.843 4.5613418,4.179 4.9603418,4.179 C5.3593418,4.179 5.6883418,3.843 5.6883418,3.444 C5.6883418,3.045 5.3593418,2.723 4.9603418,2.723 L4.8203418,2.723 L4.8203418,1.995 L4.9603418,1.995 C5.3243418,1.995 5.6113418,1.708 5.6113418,1.337 C5.6113418,1.008 5.3173418,0.721 4.9603418,0.721 C4.6313418,0.721 4.3373418,1.022 4.3373418,1.337 L4.3373418,1.372 L3.6163418,1.372 L3.6163418,1.337 C3.6163418,0.84 3.8753418,0.413 4.2953418,0.175 C4.4983418,0.056 4.7223418,0 4.9603418,0 Z M12.2613418,0.2 C11.8228535,0.2 11.4197491,0.433900098 11.199862,0.818512412 C11.0880596,1.00092699 11.0333418,1.20205175 11.0333418,1.428 L11.0333418,3.514 C11.0333418,3.94076817 11.2630074,4.32517296 11.6477689,4.54504221 C11.8340054,4.65317955 12.0373271,4.707 12.2613418,4.707 C12.685768,4.707 13.0724302,4.4792625 13.2938432,4.10410085 C13.4010506,3.92542185 13.4543418,3.73002084 13.4543418,3.514 L13.4543418,1.428 C13.4543418,0.993663172 13.2236099,0.585702454 12.8609147,0.361957789 C12.673578,0.253181671 12.4771013,0.2 12.2613418,0.2 Z M4.9603418,0.2 C4.75293536,0.2 4.56476024,0.248895899 4.39394431,0.349004437 C4.11167513,0.508956972 3.91907748,0.764507622 3.84741774,1.06716925 L3.829,1.171 L4.157,1.171 L4.1635929,1.14325273 C4.24904453,0.829489942 4.53273472,0.571946496 4.86075855,0.527713496 L4.9603418,0.521 C5.42264158,0.521 5.8113418,0.89242465 5.8113418,1.337 C5.8113418,1.78012728 5.4916909,2.13625035 5.06824166,2.18841646 L5.02,2.191 L5.02,2.526 L5.06813812,2.52919506 C5.49271718,2.57829524 5.83232975,2.91371045 5.88206553,3.33657664 L5.8883418,3.444 C5.8883418,3.95419336 5.46908818,4.379 4.9603418,4.379 C4.48793444,4.379 4.09269177,4.01271264 4.03863877,3.55189651 L4.037,3.539 L3.709,3.539 L3.71100539,3.58140766 C3.72435814,3.71571552 3.75785509,3.84083114 3.8121867,3.95771875 L3.87348876,4.07189941 C4.09978468,4.46333019 4.50573915,4.7 4.9603418,4.7 C5.18808795,4.7 5.39698916,4.6443932 5.58705743,4.53154283 C5.97364119,4.30450157 6.2093418,3.89738234 6.2093418,3.444 C6.2093418,3.06849319 6.05147644,2.73203269 5.78040279,2.51517376 L5.60591531,2.37558378 L5.76392044,2.21757864 C5.99772857,1.98377051 6.1393418,1.65985061 6.1393418,1.337 C6.1393418,1.12891147 6.08649325,0.932616859 5.98661394,0.762172929 C5.77036899,0.407771483 5.39348118,0.2 4.9603418,0.2 Z M9.002,0.2 L8.638,0.2 L7.41554213,2.87976312 C7.3587619,2.9976913 7.32347683,3.1241874 7.30938306,3.25833536 L7.3023418,3.395 C7.3023418,3.62951354 7.36137928,3.8474981 7.47684038,4.04810085 C7.72111603,4.45522692 8.1383802,4.7 8.6073418,4.7 C8.83989632,4.7 9.05100342,4.64201988 9.25226776,4.52621184 C9.649754,4.28399367 9.8983418,3.85400396 9.8983418,3.395 C9.8983418,3.16244548 9.84036168,2.95133838 9.72455364,2.75007403 C9.48026964,2.34919774 9.06277079,2.104 8.6073418,2.104 L8.51445661,2.10475811 C8.49442789,2.10527049 8.48389809,2.10604952 8.47856502,2.10711614 L8.0943966,2.18394982 L8.25749731,1.82773787 L9.002,0.2 Z M12.2613418,0.535 C12.7468356,0.535 13.1123418,0.922491584 13.1123418,1.428 L13.1123418,3.514 C13.1123418,4.00744192 12.7448365,4.386 12.2613418,4.386 C11.7777279,4.386 11.3683418,3.99355405 11.3683418,3.514 L11.3683418,1.428 C11.3683418,0.922753743 11.7615956,0.535 12.2613418,0.535 Z M8.6073418,2.425 C9.13779875,2.425 9.5773418,2.86454305 9.5773418,3.395 C9.5773418,3.92471151 9.13856864,4.358 8.6073418,4.358 C8.06988485,4.358 7.6443418,3.93245695 7.6443418,3.395 C7.6443418,2.86377316 8.07763029,2.425 8.6073418,2.425 Z M12.2613418,0.735 C11.8763418,0.735 11.5683418,1.029 11.5683418,1.428 L11.5683418,3.514 L11.5761202,3.61327273 C11.6272922,3.93723967 11.9240691,4.186 12.2613418,4.186 C12.6323418,4.186 12.9123418,3.899 12.9123418,3.514 L12.9123418,1.428 L12.9055416,1.32192712 C12.8606806,0.977975207 12.5986145,0.735 12.2613418,0.735 Z M8.6073418,2.625 C8.1873418,2.625 7.8443418,2.975 7.8443418,3.395 C7.8443418,3.822 8.1803418,4.158 8.6073418,4.158 C9.0273418,4.158 9.3773418,3.815 9.3773418,3.395 C9.3773418,2.975 9.0273418,2.625 8.6073418,2.625 Z M15.4753809,0.00888671875 C15.7647689,0.00888671875 16.008584,0.108577474 16.2068262,0.307958984 C16.4050684,0.507340495 16.5041895,0.750585938 16.5041895,1.03769531 C16.5041895,1.33391927 16.4010807,1.58058268 16.1948633,1.77768555 C15.9886458,1.97478841 15.7488184,2.07333984 15.4753809,2.07333984 C15.172321,2.07333984 14.9239486,1.97080078 14.7302637,1.76572266 C14.5365788,1.56064453 14.4397363,1.32138672 14.4397363,1.04794922 C14.4397363,0.756282552 14.5417057,0.510188802 14.7456445,0.309667969 C14.9495833,0.109147135 15.1928288,0.00888671875 15.4753809,0.00888671875 Z M15.4753809,0.381445313 C15.2953678,0.381445313 15.1398503,0.445817057 15.0088281,0.574560547 C14.877806,0.703304036 14.8122949,0.859960938 14.8122949,1.04453125 C14.8122949,1.22226563 14.8772363,1.37607422 15.0071191,1.50595703 C15.137002,1.63583984 15.2930892,1.70078125 15.4753809,1.70078125 C15.6508366,1.70078125 15.8040755,1.63640951 15.9350977,1.50766602 C16.0661198,1.37892253 16.1316309,1.22226563 16.1316309,1.03769531 C16.1316309,0.859960938 16.0672591,0.706152344 15.9385156,0.576269531 C15.8097721,0.446386719 15.6553939,0.381445313 15.4753809,0.381445313 Z"),P(g,"fill","url(#xmfpi7cnc__tjqs3iy6kb)"),P(g,"transform","translate(3 3.1)"),P(v,"d","M3.00030998,2.79110119 L3.00030998,8.00889881 C1.15888197,7.36802147 0,6.43664128 0,5.4 C0,4.36335872 1.15888197,3.43197853 3.00030998,2.79110119 Z M15.0006975,2.79145187 C16.8415407,3.43231826 18,4.36354778 18,5.4 C18,6.43645222 16.8415407,7.36768174 15.0006975,8.00854813 Z"),P(v,"fill","url(#xmfpi7cnc__rs5hxavsyc)"),P(v,"transform","translate(3 3.1)"),P(p,"fill-rule","nonzero"),P(p,"fill","none"),P(e,"xmlns","http://www.w3.org/2000/svg"),P(e,"viewBox","0 0 24 24"),P(e,"width",n[0]),P(e,"height",n[0]),P(t,"class","icon-container svelte-1d6rvbz"),_(t,"--bg-color",n[1])},m(y,w){Z(y,t,w),B(t,e),B(e,i),B(i,s),B(s,o),B(s,r),B(i,a),B(a,l),B(a,c),B(i,h),B(h,u),B(h,d),B(e,p),B(p,m),B(p,g),B(p,v)},p(y,[w]){w&1&&P(e,"width",y[0]),w&1&&P(e,"height",y[0]),w&2&&_(t,"--bg-color",y[1])},i:ce,o:ce,d(y){y&&X(t)}}}function H7(n,t,e){let{size:i="28"}=t,{color:s="#ffffff"}=t,{bgColor:o="#0000004d"}=t;return n.$$set=r=>{"size"in r&&e(0,i=r.size),"color"in r&&e(2,s=r.color),"bgColor"in r&&e(1,o=r.bgColor)},[i,o,s]}class N7 extends Ee{constructor(t){super(),Ie(this,t,H7,B7,Me,{size:0,color:2,bgColor:1},F7)}}function G7(n){Le(n,"svelte-16y5k2u",".pano-tag-audio-popup-inline-player-wrapper.svelte-16y5k2u{width:100%;height:1.75rem;background-color:rgba(255, 255, 255, 0.06);border-radius:0.125rem;display:flex;align-items:center;cursor:pointer}.pano-tag-audio-popup-inline-player-icon.svelte-16y5k2u{width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;flex-shrink:0}.pano-tag-audio-popup-inline-player-progress.svelte-16y5k2u{flex-grow:1;display:flex;position:relative;height:100%;align-items:center}.pano-tag-audio-popup-inline-player-progress-bar.svelte-16y5k2u{width:0;height:100%;background:linear-gradient(to right, rgba(238, 238, 238, 0) 0, rgba(216, 216, 216, 0.3) 100%);position:absolute;top:0;left:0;z-index:0}.pano-tag-audio-popup-inline-player-elapsed-time.svelte-16y5k2u{position:absolute;z-index:1;font-weight:500;font-size:0.875rem;color:#ffffff;line-height:1.25rem;padding-left:0.25rem}")}function W7(n){let t,e,i,s,o,r,a,l,c,h,u,d;return i=new Kl({props:{playing:n[0],width:24}}),{c(){t=U("div"),e=U("div"),ge(i.$$.fragment),s=ue(),o=U("div"),r=U("div"),a=ue(),l=U("div"),c=Fe(n[1]),P(e,"class","pano-tag-audio-popup-inline-player-icon svelte-16y5k2u"),P(r,"class","pano-tag-audio-popup-inline-player-progress-bar svelte-16y5k2u"),_(r,"width",n[2]+"%"),P(l,"class","pano-tag-audio-popup-inline-player-elapsed-time svelte-16y5k2u"),P(o,"class","pano-tag-audio-popup-inline-player-progress svelte-16y5k2u"),P(t,"class","pano-tag-audio-popup-inline-player-wrapper svelte-16y5k2u")},m(p,m){Z(p,t,m),B(t,e),pe(i,e,null),B(t,s),B(t,o),B(o,r),B(o,a),B(o,l),B(l,c),h=!0,u||(d=_e(t,"click",Uv(function(){vi(n[3])&&n[3].apply(this,arguments)})),u=!0)},p(p,[m]){n=p;const g={};m&1&&(g.playing=n[0]),i.$set(g),(!h||m&4)&&_(r,"width",n[2]+"%"),(!h||m&2)&&Ne(c,n[1])},i(p){h||(H(i.$$.fragment,p),h=!0)},o(p){Y(i.$$.fragment,p),h=!1},d(p){p&&X(t),me(i),u=!1,d()}}}function U7(n,t,e){let{playing:i=!1}=t,{elapsedTime:s="00:00"}=t,{progress:o=0}=t,{onClick:r=()=>{}}=t;return n.$$set=a=>{"playing"in a&&e(0,i=a.playing),"elapsedTime"in a&&e(1,s=a.elapsedTime),"progress"in a&&e(2,o=a.progress),"onClick"in a&&e(3,r=a.onClick)},[i,s,o,r]}class Q7 extends Ee{constructor(t){super(),Ie(this,t,U7,W7,Me,{playing:0,elapsedTime:1,progress:2,onClick:3},G7)}}function X7(n){Le(n,"svelte-817q8q",'@charset "UTF-8";.tag-popup.svelte-817q8q.svelte-817q8q.svelte-817q8q{position:absolute;pointer-events:auto;padding:0.625rem 0.625rem 0.625rem 1.125rem;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content;transform-origin:center}.tag-popup-top.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(-50%, -100%);left:50%}.tag-popup-bottom.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(-50%, 0);left:50%}.tag-popup-left.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(-100%, -50%);top:50%}.tag-popup-right.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(0, -50%);top:50%}.tag-popup-top-left.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(calc(2.625rem - 100%), -100%)}.tag-popup-top-right.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(-2.625rem, -100%)}.tag-popup-bottom-left.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(calc(2.625rem - 100%), 0)}.tag-popup-bottom-right.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(-2.625rem, 0)}.tag-popup-left-top.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(-100%, -2.625rem)}.tag-popup-left-bottom.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(-100%, calc(2.625rem - 100%))}.tag-popup-right-top.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(0, -2.625rem)}.tag-popup-right-bottom.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(0, calc(2.625rem - 100%))}.tag-popup-content.svelte-817q8q.svelte-817q8q.svelte-817q8q{position:relative;pointer-events:auto;cursor:pointer;padding:1.25rem;border-radius:0.375rem;max-width:17.5rem;width:17.5rem;background:rgba(0, 0, 0, 0.7490196078)}.tag-popup-top.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q,.tag-popup-top-left.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q,.tag-popup-top-right.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q{box-shadow:0.03125rem 0 0 0 rgba(255, 255, 255, 0.3), -0.03125rem 0 0 0 rgba(255, 255, 255, 0.3)}.tag-popup-bottom.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q,.tag-popup-bottom-left.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q,.tag-popup-bottom-right.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q{box-shadow:0.03125rem 0 0 0 rgba(255, 255, 255, 0.3), -0.03125rem 0 0 0 rgba(255, 255, 255, 0.3)}.tag-popup-left.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q,.tag-popup-left-top.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q,.tag-popup-left-bottom.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q{box-shadow:0 0.03125rem 0 0 rgba(255, 255, 255, 0.3), 0 -0.03125rem 0 0 rgba(255, 255, 255, 0.3)}.tag-popup-right.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q,.tag-popup-right-top.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q,.tag-popup-right-bottom.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q{box-shadow:0 0.03125rem 0 0 rgba(255, 255, 255, 0.3), 0 -0.03125rem 0 0 rgba(255, 255, 255, 0.3)}.light.svelte-817q8q.svelte-817q8q.svelte-817q8q{background:#ffffff}.tag-popup-title.svelte-817q8q.svelte-817q8q.svelte-817q8q{margin:0;font-size:1rem;font-weight:600;line-height:1.375rem;letter-spacing:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;color:#ffffff}.light.svelte-817q8q .tag-popup-title.svelte-817q8q.svelte-817q8q{color:rgba(0, 0, 0, 0.8509803922)}.tag-popup-description.svelte-817q8q.svelte-817q8q.svelte-817q8q{margin:0;font-size:0.875rem;font-weight:400;color:#ffffff;line-height:1.25rem;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;max-height:5rem;overflow:hidden;word-wrap:break-word;word-break:break-word;text-overflow:ellipsis;white-space:pre-wrap}.light.svelte-817q8q .tag-popup-description.svelte-817q8q.svelte-817q8q{color:rgba(0, 0, 0, 0.8509803922)}.tag-popup-tags.svelte-817q8q.svelte-817q8q.svelte-817q8q{display:flex;align-items:center;margin:0;margin-bottom:0}.tag-popup-tags.svelte-817q8q .tag-popup-tag.svelte-817q8q+.tag-popup-tag.svelte-817q8q{margin-left:0.25rem}.tag-popup-tag.svelte-817q8q.svelte-817q8q.svelte-817q8q{padding:0.125rem 0.25rem;display:flex;align-items:center;justify-content:center;border-radius:0.25rem;font-size:0.75rem;line-height:1.125rem;letter-spacing:0;border-radius:0.125rem;max-width:7.5rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tag-popup-tag-primary.svelte-817q8q.svelte-817q8q.svelte-817q8q{color:#ffffff;background-image:linear-gradient(90deg, #ead09a 0%, #e0cca3 100%)}.light.svelte-817q8q .tag-popup-tag-primary.svelte-817q8q.svelte-817q8q{color:#946700;background-image:linear-gradient(90deg, #ead09a 0%, #e0cca3 100%)}.tag-popup-tag-secondary.svelte-817q8q.svelte-817q8q.svelte-817q8q{color:#ffffff;background:rgba(255, 255, 255, 0.1490196078)}.light.svelte-817q8q .tag-popup-tag-secondary.svelte-817q8q.svelte-817q8q{color:rgba(0, 0, 0, 0.5019607843);background:rgba(0, 0, 0, 0.0588235294)}.tag-popup-price.svelte-817q8q.svelte-817q8q.svelte-817q8q{font-family:DINAlternate-Bold;font-weight:700;font-size:1.25rem;color:#ae7900;letter-spacing:0;text-align:center;display:flex;justify-content:flex-start;align-items:center;width:100%;margin:0}.tag-popup-media.svelte-817q8q.svelte-817q8q.svelte-817q8q{width:15rem;height:10rem;margin:0 auto;overflow:hidden;border-radius:0.25rem;display:flex;align-items:center;justify-content:center;position:relative}.tag-popup-media.svelte-817q8q img.svelte-817q8q.svelte-817q8q{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;display:block}.tag-popup-media-type.svelte-817q8q.svelte-817q8q.svelte-817q8q{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);z-index:2}.tag-popup-media-index.svelte-817q8q.svelte-817q8q.svelte-817q8q{position:absolute;right:0.375rem;bottom:0.375rem;padding:0.0625rem 0.25rem;background:rgba(0, 0, 0, 0.5);border-radius:0.125rem;font-weight:bold;font-size:0.75rem;color:#ffffff;letter-spacing:0;line-height:1.125rem}.iframe-overlay.svelte-817q8q.svelte-817q8q.svelte-817q8q{position:absolute;top:0;left:0;width:100%;height:100%;background:transparent;z-index:10}.tag-popup-content.svelte-817q8q>.svelte-817q8q+.svelte-817q8q{margin-top:0.5rem}.tag-popup-content.svelte-817q8q>.svelte-817q8q.svelte-817q8q:first-child{margin-top:0 !important}')}const Y7=n=>({}),Bg=n=>({}),Z7=n=>({}),Hg=n=>({});function Ng(n,t,e){const i=n.slice();return i[2]=t[e],i}function Gg(n,t,e){const i=n.slice();return i[2]=t[e],i}function Wg(n){let t,e;return{c(){t=U("h3"),e=Fe(n[5]),P(t,"class","tag-popup-title svelte-817q8q")},m(i,s){Z(i,t,s),B(t,e)},p(i,s){s[0]&32&&Ne(e,i[5])},d(i){i&&X(t)}}}function Ug(n){let t,e,i=n[4],s=[];for(let a=0;a<i.length;a+=1)s[a]=Qg(Gg(n,i,a));let o=n[13],r=[];for(let a=0;a<o.length;a+=1)r[a]=Xg(Ng(n,o,a));return{c(){t=U("div");for(let a=0;a<s.length;a+=1)s[a].c();e=ue();for(let a=0;a<r.length;a+=1)r[a].c();P(t,"class","tag-popup-tags svelte-817q8q")},m(a,l){Z(a,t,l);for(let c=0;c<s.length;c+=1)s[c]&&s[c].m(t,null);B(t,e);for(let c=0;c<r.length;c+=1)r[c]&&r[c].m(t,null)},p(a,l){if(l[0]&16){i=a[4];let c;for(c=0;c<i.length;c+=1){const h=Gg(a,i,c);s[c]?s[c].p(h,l):(s[c]=Qg(h),s[c].c(),s[c].m(t,e))}for(;c<s.length;c+=1)s[c].d(1);s.length=i.length}if(l[0]&8192){o=a[13];let c;for(c=0;c<o.length;c+=1){const h=Ng(a,o,c);r[c]?r[c].p(h,l):(r[c]=Xg(h),r[c].c(),r[c].m(t,null))}for(;c<r.length;c+=1)r[c].d(1);r.length=o.length}},d(a){a&&X(t),Ti(s,a),Ti(r,a)}}}function Qg(n){let t,e=n[2]+"",i;return{c(){t=U("div"),i=Fe(e),P(t,"class","tag-popup-tag tag-popup-tag-primary svelte-817q8q")},m(s,o){Z(s,t,o),B(t,i)},p(s,o){o[0]&16&&e!==(e=s[2]+"")&&Ne(i,e)},d(s){s&&X(t)}}}function Xg(n){let t,e=n[2]+"",i;return{c(){t=U("div"),i=Fe(e),P(t,"class","tag-popup-tag tag-popup-tag-secondary svelte-817q8q")},m(s,o){Z(s,t,o),B(t,i)},p(s,o){o[0]&8192&&e!==(e=s[2]+"")&&Ne(i,e)},d(s){s&&X(t)}}}function q7(n){let t,e,i,s,o,r,a,l;r=new _y({});let c=n[15]>1&&Yg(n);return{c(){t=U("div"),e=U("video"),s=ue(),o=U("div"),ge(r.$$.fragment),a=ue(),c&&c.c(),at(e.src,i=n[2].data.mediaData[0].url)||P(e,"src",i),P(e,"class","tag-popup-video-fallback"),e.controls=!1,e.autoplay=!1,e.muted=!0,e.loop=!0,P(e,"preload","metadata"),P(e,"disablepictureinpicture",""),e.playsInline=!0,_(e,"width","100%"),_(e,"height","100%"),_(e,"object-fit","cover"),P(o,"class","tag-popup-media-type svelte-817q8q"),P(t,"class","tag-popup-media svelte-817q8q")},m(h,u){Z(h,t,u),B(t,e),B(t,s),B(t,o),pe(r,o,null),B(t,a),c&&c.m(t,null),l=!0},p(h,u){(!l||u[0]&4&&!at(e.src,i=h[2].data.mediaData[0].url))&&P(e,"src",i),h[15]>1?c?c.p(h,u):(c=Yg(h),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},i(h){l||(H(r.$$.fragment,h),l=!0)},o(h){Y(r.$$.fragment,h),l=!1},d(h){h&&X(t),me(r),c&&c.d()}}}function J7(n){let t,e,i,s,o,r,a,l,c;const h=[e6,$7],u=[];function d(m,g){return m[7]?0:m[18]?1:-1}~(r=d(n))&&(a=u[r]=h[r](n));let p=n[15]>1&&Zg(n);return{c(){t=U("div"),e=U("img"),o=ue(),a&&a.c(),l=ue(),p&&p.c(),at(e.src,i=n[19])||P(e,"src",i),P(e,"alt",s=n[5]||""),P(e,"draggable","false"),P(e,"class","svelte-817q8q"),P(t,"class","tag-popup-media svelte-817q8q")},m(m,g){Z(m,t,g),B(t,e),B(t,o),~r&&u[r].m(t,null),B(t,l),p&&p.m(t,null),c=!0},p(m,g){(!c||g[0]&524288&&!at(e.src,i=m[19]))&&P(e,"src",i),(!c||g[0]&32&&s!==(s=m[5]||""))&&P(e,"alt",s);let v=r;r=d(m),r!==v&&(a&&(xe(),Y(u[v],1,1,()=>{u[v]=null}),Se()),~r?(a=u[r],a||(a=u[r]=h[r](m),a.c()),H(a,1),a.m(t,l)):a=null),m[15]>1?p?p.p(m,g):(p=Zg(m),p.c(),p.m(t,null)):p&&(p.d(1),p=null)},i(m){c||(H(a),c=!0)},o(m){Y(a),c=!1},d(m){m&&X(t),~r&&u[r].d(),p&&p.d()}}}function K7(n){let t,e,i,s,o,r,a=n[15]>1&&qg(n);return{c(){t=U("div"),e=U("iframe"),s=ue(),o=U("div"),r=ue(),a&&a.c(),P(e,"title",n[16]),at(e.src,i=n[17])||P(e,"src",i),P(e,"class","tag-popup-video-iframe"),P(e,"frameborder","0"),P(e,"allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"),P(e,"referrerpolicy","strict-origin-when-cross-origin"),e.allowFullscreen=!0,_(e,"width","100%"),_(e,"height","100%"),_(e,"position","absolute"),_(e,"top","0"),_(e,"left","0"),P(o,"class","iframe-overlay svelte-817q8q"),P(t,"class","tag-popup-media svelte-817q8q")},m(l,c){Z(l,t,c),B(t,e),B(t,s),B(t,o),B(t,r),a&&a.m(t,null)},p(l,c){c[0]&65536&&P(e,"title",l[16]),c[0]&131072&&!at(e.src,i=l[17])&&P(e,"src",i),l[15]>1?a?a.p(l,c):(a=qg(l),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},i:ce,o:ce,d(l){l&&X(t),a&&a.d()}}}function Yg(n){let t,e,i,s;return{c(){t=U("div"),e=Fe(n[14]),i=Fe("/"),s=Fe(n[15]),P(t,"class","tag-popup-media-index svelte-817q8q")},m(o,r){Z(o,t,r),B(t,e),B(t,i),B(t,s)},p(o,r){r[0]&16384&&Ne(e,o[14]),r[0]&32768&&Ne(s,o[15])},d(o){o&&X(t)}}}function $7(n){let t,e,i;return e=new N7({}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","tag-popup-media-type svelte-817q8q")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function e6(n){let t,e,i;return e=new _y({}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","tag-popup-media-type svelte-817q8q")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function Zg(n){let t,e,i,s;return{c(){t=U("div"),e=Fe(n[14]),i=Fe("/"),s=Fe(n[15]),P(t,"class","tag-popup-media-index svelte-817q8q")},m(o,r){Z(o,t,r),B(t,e),B(t,i),B(t,s)},p(o,r){r[0]&16384&&Ne(e,o[14]),r[0]&32768&&Ne(s,o[15])},d(o){o&&X(t)}}}function qg(n){let t,e,i,s;return{c(){t=U("div"),e=Fe(n[14]),i=Fe("/"),s=Fe(n[15]),P(t,"class","tag-popup-media-index svelte-817q8q")},m(o,r){Z(o,t,r),B(t,e),B(t,i),B(t,s)},p(o,r){r[0]&16384&&Ne(e,o[14]),r[0]&32768&&Ne(s,o[15])},d(o){o&&X(t)}}}function Jg(n){let t,e;return{c(){t=U("div"),e=Fe(n[20]),P(t,"class","tag-popup-description svelte-817q8q")},m(i,s){Z(i,t,s),B(t,e)},p(i,s){s[0]&1048576&&Ne(e,i[20])},d(i){i&&X(t)}}}function Kg(n){let t,e,i;return e=new Q7({props:{playing:n[1],progress:n[9],elapsedTime:n[10],onClick:n[22]}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","tag-popup-audio-player-wrapper svelte-817q8q")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,o){const r={};o[0]&2&&(r.playing=s[1]),o[0]&512&&(r.progress=s[9]),o[0]&1024&&(r.elapsedTime=s[10]),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function $g(n){let t,e,i,s,o=n[11]&&e0(n);return{c(){t=U("div"),o&&o.c(),e=ue(),i=U("span"),s=Fe(n[12]),P(i,"class","tag-popup-price-value"),P(t,"class","tag-popup-price svelte-817q8q")},m(r,a){Z(r,t,a),o&&o.m(t,null),B(t,e),B(t,i),B(i,s)},p(r,a){r[11]?o?o.p(r,a):(o=e0(r),o.c(),o.m(t,e)):o&&(o.d(1),o=null),a[0]&4096&&Ne(s,r[12])},d(r){r&&X(t),o&&o.d()}}}function e0(n){let t,e;return{c(){t=U("span"),e=Fe(n[11]),P(t,"class","tag-popup-price-unit")},m(i,s){Z(i,t,s),B(t,e)},p(i,s){s[0]&2048&&Ne(e,i[11])},d(i){i&&X(t)}}}function t6(n){let t,e,i,s,o,r,a,l,c,h,u,d,p,m,g=n[5]&&Wg(n),v=n[3]&&(n[4].length>0||n[13].length>0)&&Ug(n);const y=[K7,J7,q7],w=[];function C(M,I){var k;return M[6]&&M[17]?0:M[19]?1:M[7]&&M[2].data.mediaData&&((k=M[2].data.mediaData[0])!=null&&k.url)?2:-1}~(o=C(n))&&(r=w[o]=y[o](n));let E=n[20]&&Jg(n),D=n[8]&&Kg(n),L=n[12]&&$g(n);const R=n[38].toolbar,z=hs(R,n,n[37],Hg),O=n[38].arrow,A=hs(O,n,n[37],Bg);return{c(){t=U("div"),e=U("div"),g&&g.c(),i=ue(),v&&v.c(),s=ue(),r&&r.c(),a=ue(),E&&E.c(),l=ue(),D&&D.c(),c=ue(),L&&L.c(),h=ue(),z&&z.c(),u=ue(),A&&A.c(),P(e,"class",d="tag-popup-content "+n[21]+" svelte-817q8q"),P(t,"class",p="tag-popup tag-popup-"+n[0]+" svelte-817q8q")},m(M,I){Z(M,t,I),B(t,e),g&&g.m(e,null),B(e,i),v&&v.m(e,null),B(e,s),~o&&w[o].m(e,null),B(e,a),E&&E.m(e,null),B(e,l),D&&D.m(e,null),B(e,c),L&&L.m(e,null),B(e,h),z&&z.m(e,null),B(e,u),A&&A.m(e,null),m=!0},p(M,I){M[5]?g?g.p(M,I):(g=Wg(M),g.c(),g.m(e,i)):g&&(g.d(1),g=null),M[3]&&(M[4].length>0||M[13].length>0)?v?v.p(M,I):(v=Ug(M),v.c(),v.m(e,s)):v&&(v.d(1),v=null);let k=o;o=C(M),o===k?~o&&w[o].p(M,I):(r&&(xe(),Y(w[k],1,1,()=>{w[k]=null}),Se()),~o?(r=w[o],r?r.p(M,I):(r=w[o]=y[o](M),r.c()),H(r,1),r.m(e,a)):r=null),M[20]?E?E.p(M,I):(E=Jg(M),E.c(),E.m(e,l)):E&&(E.d(1),E=null),M[8]?D?(D.p(M,I),I[0]&256&&H(D,1)):(D=Kg(M),D.c(),H(D,1),D.m(e,c)):D&&(xe(),Y(D,1,1,()=>{D=null}),Se()),M[12]?L?L.p(M,I):(L=$g(M),L.c(),L.m(e,h)):L&&(L.d(1),L=null),z&&z.p&&(!m||I[1]&64)&&ds(z,R,M,M[37],m?us(R,M[37],I,Z7):fs(M[37]),Hg),A&&A.p&&(!m||I[1]&64)&&ds(A,O,M,M[37],m?us(O,M[37],I,Y7):fs(M[37]),Bg),(!m||I[0]&2097152&&d!==(d="tag-popup-content "+M[21]+" svelte-817q8q"))&&P(e,"class",d),(!m||I[0]&1&&p!==(p="tag-popup tag-popup-"+M[0]+" svelte-817q8q"))&&P(t,"class",p)},i(M){m||(H(r),H(D),H(z,M),H(A,M),m=!0)},o(M){Y(r),Y(D),Y(z,M),Y(A,M),m=!1},d(M){M&&X(t),g&&g.d(),v&&v.d(),~o&&w[o].d(),E&&E.d(),D&&D.d(),L&&L.d(),z&&z.d(M),A&&A.d(M)}}}function i6(n){const t=Math.floor(n/60),e=Math.floor(n%60);return`${t.toString().padStart(2,"0")}:${e.toString().padStart(2,"0")}`}function n6(n,t,e){let i,s,o,r,a,l,c,h,u,d,p,m,g,v,y,w,C,E,D,L,R,z,O,A,M,I,{$$slots:k={},$$scope:x}=t,{tag:S}=t,{config:j={}}=t,{theme:F=void 0}=t,{placement:J="right-top"}=t,{audioInstance:ne=null}=t,{audioPlaying:q=!1}=t,{audioCurrentTime:oe=0}=t,{audioDuration:se=0}=t,ae=0,ze="00:00",ee=null,we=0,le=0;function he(){return se>0?oe/se*100:0}function be(){if(!q||se<=0){ee=null;return}const De=(Date.now()-we)/1e3,ve=oe+De,Oe=Math.min(ve/se*100,100)-le;Math.abs(Oe)>.05&&(le+=Oe*.2),ee=requestAnimationFrame(be)}function te(){if(!s)return;const ye=he();se>0?(q||(le=ye),e(9,ae=le),e(10,ze=i6(le/100*se)),we=Date.now()):(le=0,e(9,ae=0),e(10,ze="00:00"))}function ke(){q&&se>0?ee||be():ee&&(cancelAnimationFrame(ee),ee=null)}function Re(){ne&&(ne.paused?ne.play():ne.pause())}return Kt(()=>{ee&&(cancelAnimationFrame(ee),ee=null)}),n.$$set=ye=>{"tag"in ye&&e(2,S=ye.tag),"config"in ye&&e(23,j=ye.config),"theme"in ye&&e(24,F=ye.theme),"placement"in ye&&e(0,J=ye.placement),"audioInstance"in ye&&e(25,ne=ye.audioInstance),"audioPlaying"in ye&&e(1,q=ye.audioPlaying),"audioCurrentTime"in ye&&e(26,oe=ye.audioCurrentTime),"audioDuration"in ye&&e(27,se=ye.audioDuration),"$$scope"in ye&&e(37,x=ye.$$scope)},n.$$.update=()=>{var ye,De,ve,Ae,Oe,Xe;n.$$.dirty[0]&4&&e(3,i=S.contentType==="Marketing"),n.$$.dirty[0]&4&&e(8,s=S.contentType==="Audio"),n.$$.dirty[0]&8&&e(36,o=i?"light":"dark"),n.$$.dirty[0]&16777220|n.$$.dirty[1]&32&&e(21,r=S.data.theme!==void 0&&S.data.theme!==null?S.data.theme:F!=null?F:o),n.$$.dirty[0]&4&&e(35,a=S.data.title||S.data.name||""),n.$$.dirty[0]&4&&e(34,l=S.data.description||S.data.tooltip||""),n.$$.dirty[1]&16&&e(5,c=a||""),n.$$.dirty[1]&8&&e(20,h=l||""),n.$$.dirty[0]&201326594&&te(),n.$$.dirty[0]&134217730&&ke(),n.$$.dirty[0]&268&&e(33,u=(()=>{var Ze,ot,Ke,et,lt,ht,Ft,Zi,Ut,li,Ai;if(s||i)return null;if(S.data.mediaData&&S.data.mediaData.length>0){const ut=S.data.mediaData[0];if(ut.type==="Video"){if(ut.videoCoverUrl)return ut.videoCoverUrl;if(ut.url){const Qt=ut.url.toLowerCase();if(Ph(Qt)){const Xt=Z1(Qt);if(Xt)return`https://img.youtube.com/vi/${Xt}/hqdefault.jpg`}if(Ch(Qt)){const Xt=q1(Qt);if(Xt)return`https://vumbnail.com/${Xt}.jpg`}return}}if(S.contentType==="Panorama")return(Ai=(Ft=(Ke=(ot=(Ze=S.data.mediaData)==null?void 0:Ze[0])==null?void 0:ot.cube)==null?void 0:Ke.front)!=null?Ft:(ht=(lt=(et=S.data.mediaData)==null?void 0:et[0])==null?void 0:lt.thumbnail)==null?void 0:ht.split("?")[0])!=null?Ai:(li=(Ut=(Zi=S.data.mediaData)==null?void 0:Zi[0])==null?void 0:Ut.url)==null?void 0:li.split("?")[0];if(ut.url||ut.thumbnail)return ut.url||ut.thumbnail}return S.data.imageUrl})()),n.$$.dirty[0]&8388612|n.$$.dirty[1]&4&&e(19,d=j!=null&&j.imageURLTransform&&(u!=null&&u.includes("realsee-cdn")||u!=null&&u.includes("ljcdn.com"))?j.imageURLTransform(u,{width:280,height:280}):u||S.data.mediaUrl||""),n.$$.dirty[0]&4&&e(7,p=S.contentType==="Video"||S.data.mediaType==="video"),n.$$.dirty[0]&4&&e(18,m=S.contentType==="Panorama"||S.data.mediaType==="panorama"),n.$$.dirty[0]&132&&e(32,g=p&&S.data.mediaData&&((ye=S.data.mediaData[0])==null?void 0:ye.url)&&Ph(S.data.mediaData[0].url)),n.$$.dirty[0]&132&&e(31,v=p&&S.data.mediaData&&((De=S.data.mediaData[0])==null?void 0:De.url)&&Ch(S.data.mediaData[0].url)),n.$$.dirty[1]&3&&e(6,y=g||v),n.$$.dirty[0]&68&&e(17,w=y&&S.data.mediaData&&((ve=S.data.mediaData[0])!=null&&ve.url)?x4(S.data.mediaData[0].url,{autoplay:0}):""),n.$$.dirty[0]&32|n.$$.dirty[1]&3&&e(16,C=g?"YouTube video player":v?"Vimeo video player":c),n.$$.dirty[0]&4&&e(15,E=((Ae=S.data.mediaData)==null?void 0:Ae.length)||0),n.$$.dirty[0]&12&&e(30,L=i?S.data.brandTags||[]:[]),n.$$.dirty[0]&12&&e(29,R=i?S.data.tags||[]:[]),n.$$.dirty[0]&1073741824&&e(4,z=L.filter(Boolean).slice(0,2)),n.$$.dirty[0]&16&&e(28,O=Math.max(0,2-z.length)),n.$$.dirty[0]&805306368&&e(13,A=O>0?R.filter(Boolean).slice(0,O):[]),n.$$.dirty[0]&12&&e(12,M=i&&((Oe=S.data.price)==null?void 0:Oe.value)||""),n.$$.dirty[0]&12&&e(11,I=i&&((Xe=S.data.price)==null?void 0:Xe.unit)||"")},e(14,D=1),[J,q,S,i,z,c,y,p,s,ae,ze,I,M,A,D,E,C,w,m,d,h,r,Re,j,F,ne,oe,se,O,R,L,v,g,u,l,a,o,x,k]}class s6 extends Ee{constructor(t){super(),Ie(this,t,n6,t6,Me,{tag:2,config:23,theme:24,placement:0,audioInstance:25,audioPlaying:1,audioCurrentTime:26,audioDuration:27},X7,[-1,-1])}}function o6(n){let t,e,i,s,o,r,a,l,c,h,u,d,p;return{c(){t=Te("svg"),e=Te("defs"),i=Te("linearGradient"),s=Te("stop"),o=Te("stop"),a=Te("linearGradient"),l=Te("stop"),c=Te("stop"),u=Te("path"),P(s,"stop-color",n[1]),P(s,"offset","0%"),P(o,"stop-color",n[1]),P(o,"stop-opacity",".5"),P(o,"offset","100%"),P(i,"id",r="arrow-right-icon-gradient-"+n[1]),P(i,"x1","96.2%"),P(i,"y1","50%"),P(i,"x2","0%"),P(i,"y2","50%"),P(l,"stop-color",n[1]),P(l,"offset","0%"),P(c,"stop-color",n[1]),P(c,"stop-opacity","0"),P(c,"offset","100%"),P(a,"id",h="arrow-right-icon-stroke-"+n[1]),P(a,"x1","50%"),P(a,"y1","9.83%"),P(a,"x2","41.99%"),P(a,"y2","24.46%"),P(u,"d","M4.84572153,2.14166669 C4.94036186,2.14170036 5.03490004,2.17870347 5.10676798,2.25203341 L9.39516942,6.66308361 C9.48635681,6.75687897 9.53195051,6.87843949 9.53195051,7 C9.53195051,7.12156051 9.48635681,7.24312103 9.39516942,7.33691639 L5.11673708,11.7390017 C5.02118573,11.813978 4.92122439,11.8514005 4.82705048,11.851434 C4.73517505,11.8514667 4.65029153,11.8150862 4.59276829,11.7576692 C4.51856427,11.6593496 4.48179951,11.5564146 4.48176638,11.4595899 C4.48173399,11.3649536 4.51747117,11.2773335 4.58937836,11.2035272 L7.74273899,7.43877755 C7.84906128,7.31184097 7.90222243,7.15592048 7.90222243,7 C7.90222243,6.84407952 7.84906128,6.68815903 7.74273449,6.56121708 L4.54804918,2.74803934 C4.65338339,2.20863952 4.74441906,2.14163065 4.84572153,2.14166669 Z"),P(u,"fill",d=`url(#arrow-right-icon-gradient-${n[1]})`),P(u,"fill-rule","nonzero"),P(u,"stroke",p=`url(#arrow-right-icon-stroke-${n[1]})`),P(u,"stroke-width",".2"),P(t,"xmlns","http://www.w3.org/2000/svg"),P(t,"viewBox","0 0 14 14"),P(t,"width",n[0]),P(t,"height",n[0]),_(t,"opacity",n[2])},m(m,g){Z(m,t,g),B(t,e),B(e,i),B(i,s),B(i,o),B(e,a),B(a,l),B(a,c),B(t,u)},p(m,[g]){g&2&&P(s,"stop-color",m[1]),g&2&&P(o,"stop-color",m[1]),g&2&&r!==(r="arrow-right-icon-gradient-"+m[1])&&P(i,"id",r),g&2&&P(l,"stop-color",m[1]),g&2&&P(c,"stop-color",m[1]),g&2&&h!==(h="arrow-right-icon-stroke-"+m[1])&&P(a,"id",h),g&2&&d!==(d=`url(#arrow-right-icon-gradient-${m[1]})`)&&P(u,"fill",d),g&2&&p!==(p=`url(#arrow-right-icon-stroke-${m[1]})`)&&P(u,"stroke",p),g&1&&P(t,"width",m[0]),g&1&&P(t,"height",m[0]),g&4&&_(t,"opacity",m[2])},i:ce,o:ce,d(m){m&&X(t)}}}function r6(n,t,e){let{size:i="14"}=t,{color:s="#ffffff"}=t,{opacity:o=1}=t;return n.$$set=r=>{"size"in r&&e(0,i=r.size),"color"in r&&e(1,s=r.color),"opacity"in r&&e(2,o=r.opacity)},[i,s,o]}class a6 extends Ee{constructor(t){super(),Ie(this,t,r6,o6,Me,{size:0,color:1,opacity:2})}}function l6(n){let t,e,i,s,o,r,a,l,c,h,u,d,p;return{c(){t=Te("svg"),e=Te("defs"),i=Te("linearGradient"),s=Te("stop"),o=Te("stop"),a=Te("linearGradient"),l=Te("stop"),c=Te("stop"),u=Te("path"),P(s,"stop-color",n[1]),P(s,"offset","0%"),P(o,"stop-color",n[1]),P(o,"stop-opacity",".5"),P(o,"offset","100%"),P(i,"id",r="share-icon-gradient-"+n[1]),P(i,"x1","41.65%"),P(i,"y1","59.05%"),P(i,"x2","66.13%"),P(i,"y2","9.07%"),P(l,"stop-color",n[1]),P(l,"offset","0%"),P(c,"stop-color",n[1]),P(c,"stop-opacity","0"),P(c,"offset","100%"),P(a,"id",h="share-icon-stroke-"+n[1]),P(a,"x1","55.68%"),P(a,"y1","2.48%"),P(a,"x2","60.83%"),P(a,"y2","14.28%"),P(u,"d","M12.4937515,2.60140991 L12.6834904,2.60248871 C13.307774,2.63121157 13.9222065,2.90874077 14.3642696,3.436433 C14.7794904,3.93278385 14.923342,4.60854408 14.8265514,5.24548738 C14.7279361,5.89144103 14.4428997,6.3527969 14.063774,6.65956953 C13.6079793,7.02837949 13.0189069,7.17403325 12.4632035,7.15562178 C11.7380729,7.13162078 11.0390809,7.42803145 10.5261758,7.9357119 C9.96083448,8.49643643 9.67596892,9.19792997 9.69443632,9.91942004 C9.66449732,10.8859455 9.96309104,11.5807243 10.4796578,12.092029 C11.0239965,12.6296813 11.7402488,12.9101676 12.4817091,12.8884813 C13.0940469,12.8705618 13.7481304,13.0495781 14.2150699,13.5117611 C14.6987029,13.9904677 14.9268415,14.6256711 14.8974895,15.2508921 C14.8684928,15.868544 14.5880857,16.4761837 14.055365,16.9134138 C13.5533941,17.3248246 12.8689122,17.4672624 12.2258037,17.3713572 C11.5727886,17.2736846 11.1063284,16.991503 10.7961882,16.6159844 C10.4239402,16.1652655 10.2768519,15.5827583 10.2954352,15.0332376 C10.3197006,14.3149783 10.0202124,13.6224897 9.50703789,13.1145427 C8.94671715,12.5587885 8.2455275,12.2800717 7.51547371,12.2927077 C7.23521908,12.3053648 6.95603622,12.2673623 6.69423123,12.1827116 C6.1605306,11.9588888 5.9529663,11.8380114 5.77703284,11.66387 C5.40155143,11.2922134 5.1829777,10.8272392 5.11950899,10.3459077 C5.05433663,9.85165608 5.15259721,9.34024891 5.41443015,8.89062791 C5.61688125,8.49864777 5.91421421,8.21950306 6.25529625,8.03627882 C6.64911257,7.8247265 7.1008248,7.74055154 7.53306889,7.75691992 L7.73219905,7.75624362 C8.39290266,7.7280909 9.01896921,7.44343917 9.49037385,6.97683639 C10.0339806,6.43762468 10.3173723,5.72806794 10.2954528,4.99382841 C10.2784266,4.38712951 10.4592448,3.74020534 10.9258673,3.27833603 C11.4093877,2.79921041 12.051472,2.57340998 12.6834904,2.60248871 Z"),P(u,"fill",d=`url(#share-icon-gradient-${n[1]})`),P(u,"fill-rule","nonzero"),P(u,"stroke",p=`url(#share-icon-stroke-${n[1]})`),P(u,"stroke-width",".2"),P(t,"xmlns","http://www.w3.org/2000/svg"),P(t,"viewBox","0 0 20 20"),P(t,"width",n[0]),P(t,"height",n[0]),_(t,"opacity",n[2])},m(m,g){Z(m,t,g),B(t,e),B(e,i),B(i,s),B(i,o),B(e,a),B(a,l),B(a,c),B(t,u)},p(m,[g]){g&2&&P(s,"stop-color",m[1]),g&2&&P(o,"stop-color",m[1]),g&2&&r!==(r="share-icon-gradient-"+m[1])&&P(i,"id",r),g&2&&P(l,"stop-color",m[1]),g&2&&P(c,"stop-color",m[1]),g&2&&h!==(h="share-icon-stroke-"+m[1])&&P(a,"id",h),g&2&&d!==(d=`url(#share-icon-gradient-${m[1]})`)&&P(u,"fill",d),g&2&&p!==(p=`url(#share-icon-stroke-${m[1]})`)&&P(u,"stroke",p),g&1&&P(t,"width",m[0]),g&1&&P(t,"height",m[0]),g&4&&_(t,"opacity",m[2])},i:ce,o:ce,d(m){m&&X(t)}}}function c6(n,t,e){let{size:i="20"}=t,{color:s="#ffffff"}=t,{opacity:o=1}=t;return n.$$set=r=>{"size"in r&&e(0,i=r.size),"color"in r&&e(1,s=r.color),"opacity"in r&&e(2,o=r.opacity)},[i,s,o]}class h6 extends Ee{constructor(t){super(),Ie(this,t,c6,l6,Me,{size:0,color:1,opacity:2})}}function u6(n){Le(n,"svelte-18owx9v",".tag-popover-toolbar.svelte-18owx9v.svelte-18owx9v{display:flex;align-items:center;margin-top:0.75rem;padding-top:0;border-top:none}.tag-popover-toolbar.both-buttons.svelte-18owx9v.svelte-18owx9v{justify-content:space-between}.tag-popover-toolbar.single-button.svelte-18owx9v.svelte-18owx9v{justify-content:flex-end}.tag-popover-toolbar-dark.svelte-18owx9v .tag-popover-btn.svelte-18owx9v{color:#ffffff}.tag-popover-toolbar-light.svelte-18owx9v .tag-popover-btn.svelte-18owx9v{color:rgba(0, 0, 0, 0.85)}.tag-popover-btn.view-more.svelte-18owx9v.svelte-18owx9v{display:flex;align-items:center;justify-content:center;font-weight:500;font-size:0.875rem;letter-spacing:0;line-height:1.25rem}.tag-popover-btn.share.svelte-18owx9v.svelte-18owx9v{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem}")}function t0(n){let t,e,i,s,o=n[0].showMore&&i0(n),r=n[0].showShare&&n0(n);return{c(){t=U("div"),o&&o.c(),e=ue(),r&&r.c(),P(t,"class",i="tag-popover-toolbar tag-popover-toolbar-"+n[1]+" "+(n[0].showMore&&n[0].showShare?"both-buttons":"single-button")+" svelte-18owx9v")},m(a,l){Z(a,t,l),o&&o.m(t,null),B(t,e),r&&r.m(t,null),s=!0},p(a,l){a[0].showMore?o?(o.p(a,l),l&1&&H(o,1)):(o=i0(a),o.c(),H(o,1),o.m(t,e)):o&&(xe(),Y(o,1,1,()=>{o=null}),Se()),a[0].showShare?r?(r.p(a,l),l&1&&H(r,1)):(r=n0(a),r.c(),H(r,1),r.m(t,null)):r&&(xe(),Y(r,1,1,()=>{r=null}),Se()),(!s||l&3&&i!==(i="tag-popover-toolbar tag-popover-toolbar-"+a[1]+" "+(a[0].showMore&&a[0].showShare?"both-buttons":"single-button")+" svelte-18owx9v"))&&P(t,"class",i)},i(a){s||(H(o),H(r),s=!0)},o(a){Y(o),Y(r),s=!1},d(a){a&&X(t),o&&o.d(),r&&r.d()}}}function i0(n){let t,e,i,s,o,r,a;return s=new a6({props:{size:"14",color:n[1]==="light"?"#000000":"#ffffff",opacity:n[1]==="light"?.8:1}}),{c(){t=U("div"),e=Fe(n[2]),i=ue(),ge(s.$$.fragment),P(t,"class","tag-popover-btn view-more svelte-18owx9v")},m(l,c){Z(l,t,c),B(t,e),B(t,i),pe(s,t,null),o=!0,r||(a=_e(t,"click",n[3]),r=!0)},p(l,c){(!o||c&4)&&Ne(e,l[2]);const h={};c&2&&(h.color=l[1]==="light"?"#000000":"#ffffff"),c&2&&(h.opacity=l[1]==="light"?.8:1),s.$set(h)},i(l){o||(H(s.$$.fragment,l),o=!0)},o(l){Y(s.$$.fragment,l),o=!1},d(l){l&&X(t),me(s),r=!1,a()}}}function n0(n){let t,e,i,s,o;return e=new h6({props:{size:"20",color:n[1]==="light"?"#000000":"#ffffff",opacity:n[1]==="light"?.8:1}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","tag-popover-btn share svelte-18owx9v")},m(r,a){Z(r,t,a),pe(e,t,null),i=!0,s||(o=_e(t,"click",n[4]),s=!0)},p(r,a){const l={};a&2&&(l.color=r[1]==="light"?"#000000":"#ffffff"),a&2&&(l.opacity=r[1]==="light"?.8:1),e.$set(l)},i(r){i||(H(e.$$.fragment,r),i=!0)},o(r){Y(e.$$.fragment,r),i=!1},d(r){r&&X(t),me(e),s=!1,o()}}}function d6(n){let t,e,i=(n[0].showMore||n[0].showShare)&&t0(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[0].showMore||s[0].showShare?i?(i.p(s,o),o&1&&H(i,1)):(i=t0(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function f6(n,t,e){let i;const s=cn("hooks");Vn();let{tag:o}=t,{toolbar:r={showMore:!0,showShare:!0}}=t,{theme:a="dark"}=t,{closePopover:l=void 0}=t;zt(()=>{s.emit("popoverToolbarShow",{tag:o})});function c(u){u.stopPropagation(),typeof l=="function"&&l(),s.emit("click",{event:u,target:"TagPopoverViewMore",tag:o})}function h(u){u.stopPropagation(),typeof l=="function"&&l(),s.emit("click",{event:u,target:"TagPopoverShare",tag:o})}return n.$$set=u=>{"tag"in u&&e(5,o=u.tag),"toolbar"in u&&e(0,r=u.toolbar),"theme"in u&&e(1,a=u.theme),"closePopover"in u&&e(6,l=u.closePopover)},n.$$.update=()=>{n.$$.dirty&32&&e(2,i=(()=>Ge(o.data.highlightText)&&o.data.highlightText.trim()!==""?o.data.highlightText:Ge(o.config.popoverConfig.viewMoreText)&&o.config.popoverConfig.viewMoreText.trim()!==""?o.config.popoverConfig.viewMoreText:"查看更多")())},[r,a,i,c,h,o,l]}class p6 extends Ee{constructor(t){super(),Ie(this,t,f6,d6,Me,{tag:5,toolbar:0,theme:1,closePopover:6},u6)}}function m6(n){let t,e;return t=new p6({props:{toolbar:{showMore:n[7].showMore===void 0?!0:n[7].showMore,showShare:n[7].showShare===void 0?!0:n[7].showShare},theme:n[2],tag:n[4],closePopover:n[8]}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&128&&(o.toolbar={showMore:i[7].showMore===void 0?!0:i[7].showMore,showShare:i[7].showShare===void 0?!0:i[7].showShare}),s&4&&(o.theme=i[2]),s&16&&(o.tag=i[4]),s&256&&(o.closePopover=i[8]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function g6(n){let t,e,i,s;return t=new j7({props:{show:n[0],direction:n[1],theme:n[2]}}),i=new s6({props:{placement:n[3],tag:n[4],config:n[5],theme:n[6],audioInstance:n[9],audioPlaying:n[10],audioCurrentTime:n[11],audioDuration:n[12],$$slots:{toolbar:[m6]},$$scope:{ctx:n}}}),i.$on("resize",n[13]),{c(){ge(t.$$.fragment),e=ue(),ge(i.$$.fragment)},m(o,r){pe(t,o,r),Z(o,e,r),pe(i,o,r),s=!0},p(o,[r]){const a={};r&1&&(a.show=o[0]),r&2&&(a.direction=o[1]),r&4&&(a.theme=o[2]),t.$set(a);const l={};r&8&&(l.placement=o[3]),r&16&&(l.tag=o[4]),r&32&&(l.config=o[5]),r&64&&(l.theme=o[6]),r&512&&(l.audioInstance=o[9]),r&1024&&(l.audioPlaying=o[10]),r&2048&&(l.audioCurrentTime=o[11]),r&4096&&(l.audioDuration=o[12]),r&16788&&(l.$$scope={dirty:r,ctx:o}),i.$set(l)},i(o){s||(H(t.$$.fragment,o),H(i.$$.fragment,o),s=!0)},o(o){Y(t.$$.fragment,o),Y(i.$$.fragment,o),s=!1},d(o){me(t,o),o&&X(e),me(i,o)}}}function v6(n,t,e){let{showArrow:i}=t,{arrowDirection:s}=t,{effectiveTheme:o}=t,{adjustedPlacement:r}=t,{tag:a}=t,{config:l}=t,{theme:c}=t,{toolbar:h}=t,{closePopover:u}=t,{audioInstance:d=null}=t,{audioPlaying:p=!1}=t,{audioCurrentTime:m=0}=t,{audioDuration:g=0}=t;function v(y){_n.call(this,n,y)}return n.$$set=y=>{"showArrow"in y&&e(0,i=y.showArrow),"arrowDirection"in y&&e(1,s=y.arrowDirection),"effectiveTheme"in y&&e(2,o=y.effectiveTheme),"adjustedPlacement"in y&&e(3,r=y.adjustedPlacement),"tag"in y&&e(4,a=y.tag),"config"in y&&e(5,l=y.config),"theme"in y&&e(6,c=y.theme),"toolbar"in y&&e(7,h=y.toolbar),"closePopover"in y&&e(8,u=y.closePopover),"audioInstance"in y&&e(9,d=y.audioInstance),"audioPlaying"in y&&e(10,p=y.audioPlaying),"audioCurrentTime"in y&&e(11,m=y.audioCurrentTime),"audioDuration"in y&&e(12,g=y.audioDuration)},[i,s,o,r,a,l,c,h,u,d,p,m,g,v]}class y6 extends Ee{constructor(t){super(),Ie(this,t,v6,g6,Me,{showArrow:0,arrowDirection:1,effectiveTheme:2,adjustedPlacement:3,tag:4,config:5,theme:6,toolbar:7,closePopover:8,audioInstance:9,audioPlaying:10,audioCurrentTime:11,audioDuration:12})}}function b6(n){Le(n,"svelte-11cjg3j",'@charset "UTF-8";.tag-popover.svelte-11cjg3j{position:absolute;z-index:1000010;pointer-events:auto;width:auto;height:auto;padding:0;margin:0;visibility:visible;opacity:1}.tag-popover-content.svelte-11cjg3j{cursor:pointer;pointer-events:auto}.tag-popover-content.audio-tag-popover.svelte-11cjg3j{cursor:default}')}function s0(n){let t,e,i,s,o,r,a,l,c;return i=new y6({props:{showArrow:n[13],arrowDirection:n[12],effectiveTheme:n[18],adjustedPlacement:n[8],tag:n[0],config:n[1],theme:n[2],toolbar:n[16],audioInstance:n[4],audioPlaying:n[5],audioCurrentTime:n[6],audioDuration:n[7],closePopover:n[24]}}),i.$on("viewMore",n[20]),i.$on("share",n[21]),i.$on("resize",n[22]),{c(){t=U("div"),e=U("div"),ge(i.$$.fragment),P(e,"class","tag-popover-content svelte-11cjg3j"),Pe(e,"audio-tag-popover",n[11]),P(t,"class",o="tag-popover tag-popover-"+n[18]+" tag-popover-"+n[8]+" svelte-11cjg3j"),P(t,"data-tag-id",r=n[0].id),_(t,"z-index",n[17]),_(t,"left",n[14].x+"px"),_(t,"top",n[14].y+"px")},m(h,u){Z(h,t,u),B(t,e),pe(i,e,null),n[35](e),n[36](t),a=!0,l||(c=[_e(e,"mouseenter",n[33]),_e(e,"mouseleave",n[34]),_e(e,"click",n[23])],l=!0)},p(h,u){n=h;const d={};u[0]&8192&&(d.showArrow=n[13]),u[0]&4096&&(d.arrowDirection=n[12]),u[0]&262144&&(d.effectiveTheme=n[18]),u[0]&256&&(d.adjustedPlacement=n[8]),u[0]&1&&(d.tag=n[0]),u[0]&2&&(d.config=n[1]),u[0]&4&&(d.theme=n[2]),u[0]&65536&&(d.toolbar=n[16]),u[0]&16&&(d.audioInstance=n[4]),u[0]&32&&(d.audioPlaying=n[5]),u[0]&64&&(d.audioCurrentTime=n[6]),u[0]&128&&(d.audioDuration=n[7]),i.$set(d),(!a||u[0]&2048)&&Pe(e,"audio-tag-popover",n[11]),(!a||u[0]&262400&&o!==(o="tag-popover tag-popover-"+n[18]+" tag-popover-"+n[8]+" svelte-11cjg3j"))&&P(t,"class",o),(!a||u[0]&1&&r!==(r=n[0].id))&&P(t,"data-tag-id",r),(!a||u[0]&131072)&&_(t,"z-index",n[17]),(!a||u[0]&16384)&&_(t,"left",n[14].x+"px"),(!a||u[0]&16384)&&_(t,"top",n[14].y+"px")},i(h){a||(H(i.$$.fragment,h),At(()=>{a&&(s||(s=Ri(e,n[19],{duration:n[15],easing:Ur,y:n[12]==="top"?-8:n[12]==="bottom"?8:0,x:n[12]==="left"?-8:n[12]==="right"?8:0},!0)),s.run(1))}),a=!0)},o(h){Y(i.$$.fragment,h),s||(s=Ri(e,n[19],{duration:n[15],easing:Ur,y:n[12]==="top"?-8:n[12]==="bottom"?8:0,x:n[12]==="left"?-8:n[12]==="right"?8:0},!1)),s.run(0),a=!1},d(h){h&&X(t),me(i),n[35](null),h&&s&&s.end(),n[36](null),l=!1,dt(c)}}}function A6(n){let t,e,i=n[3]&&n[14]&&s0(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,o){s[3]&&s[14]?i?(i.p(s,o),o[0]&16392&&H(i,1)):(i=s0(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function w6(n,t,e){let i,s,o,r,a,l,c,h,u,d;const p=cn("hooks");let{tag:m}=t,{config:g={}}=t,{triggerElement:v}=t,{wrapperElement:y=document.body}=t,{popoverContainer:w=null}=t,{theme:C=void 0}=t,{visible:E=!0}=t,{closePopover:D=void 0}=t,{audioInstance:L=null}=t,{audioPlaying:R=!1}=t,{audioCurrentTime:z=0}=t,{audioDuration:O=0}=t;const A=Vn();let M,I={width:0,height:0},k=null,x=s;function S(te,{duration:ke=400,easing:Re=Ur,x:ye=0,y:De=0}){return{duration:ke,css:(ve,Ae)=>`
|
|
1114
|
+
`;function Na(n){if(Array.isArray(n))return n;if(typeof n=="number")return[n>>16&255,n>>8&255,n&255];if(typeof n=="string"){let t=n.trim().replace(/^#/,"");if(t.length===3&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),t.length===6){const e=parseInt(t.substring(0,2),16),i=parseInt(t.substring(2,4),16),s=parseInt(t.substring(4,6),16);if(!isNaN(e)&&!isNaN(i)&&!isNaN(s))return[e,i,s]}console.warn("[MaskTag] Invalid hex color string:",n)}return[0,0,0]}const Xe=class extends er{constructor(e,i){var r;super(e,i);f(this,"maskUrl");f(this,"targetColor");f(this,"maskMesh");f(this,"maskTexture");f(this,"loadingMask",!1);f(this,"_disposed",!1);f(this,"tagStyle");f(this,"clickEventDispose");f(this,"sharedStyleIndex",-1);f(this,"_sharedMeshKey",null);const s=(r=i.mask)!=null?r:i.maskUrl;this.maskUrl=s instanceof HTMLCanvasElement||typeof s=="string"&&s?s:"";const o=i.color;this.targetColor=Na(o),o||console.warn(`[MaskTag] No color provided for tag ${i.id}, using default [0, 0, 0]`),this.tagStyle=i.style,this.updateVisible(),this.currentVisible&&this.initializeMaskMesh()}getColorKey(){return`${this.targetColor[0]},${this.targetColor[1]},${this.targetColor[2]}`}static getMeshKey(e){return String(e)}initializeMaskMesh(){return $(this,null,function*(){var i;if(this._disposed||!this.maskUrl)return;const e=(i=this.fiveState)==null?void 0:i.panoIndex;if(typeof e=="number"){this.loadingMask=!0;try{const s=yield Xe.loadMaskTexture(this.maskUrl);this.maskTexture=s;const o=Xe.getMeshKey(e);this._sharedMeshKey=o;let r=Xe.sharedMeshRegistry.get(o);const a=this.getColorKey(),l=this.buildStyleForMaterial();r?r.maskSource!==this.maskUrl&&(Xe.releaseMaskTexture(r.maskSource),r.maskTexture=s,r.maskSource=this.maskUrl,r.material.uniforms.map.value=s,r.material.uniforms.maskTexelSize.value=Xe.getMaskTexelSize(s)):(r=Xe.createSharedMesh(s,this.maskUrl,this.plugin),Xe.sharedMeshRegistry.set(o,r),this.plugin.imagePlaneGroup.add(r.mesh));const c=r.styleIndexByColorKey.get(a);c!==void 0?(this.sharedStyleIndex=c,this.maskMesh=r.mesh,this.updateStyleSlotInMaterial(r.material,c,l)):(r.tagsByColorKey.set(a,this),this.appendStyleToMaterial(r.material,l),this.sharedStyleIndex=r.tagsByColorKey.size-1,r.styleIndexByColorKey.set(a,this.sharedStyleIndex),this.maskMesh=r.mesh),this.setupSharedMeshRaycast(r),this.updateMeshTransform(),this.setupClickEvents(),this.updateScreenPosition(),r.mesh.visible=!0}finally{this.loadingMask=!1}}})}buildStyleForMaterial(){const e=this.getMaskStyle(),i=e.tolerance,s=i<=1?i*255:i;return{color:[this.targetColor[0],this.targetColor[1],this.targetColor[2],1],tolerance:s,highlightColor:e.highlightColor,opacity:this.enabled&&this.visible?e.opacity:0}}static getMaskTexelSize(e){var r,a;const i=e.image,s=Math.max((r=i==null?void 0:i.width)!=null?r:1,1),o=Math.max((a=i==null?void 0:i.height)!=null?a:1,1);return new b.Vector2(1/s,1/o)}static createSharedMesh(e,i,s){const a=Math.max(1,Math.ceil(Math.sqrt(0))),l=1,c=new Float32Array(a*l*4),h=new b.DataTexture(c,a,l,b.RGBAFormat,b.FloatType);h.needsUpdate=!0;const u=new b.ShaderMaterial({vertexShader:c7,fragmentShader:h7,uniforms:{map:{value:e},mergedTexture:{value:h},groupCount:{value:0},textureWidth:{value:a},pixelsPerGroup:{value:3},maskTexelSize:{value:Xe.getMaskTexelSize(e)}},depthWrite:!1,depthTest:!1,transparent:!0}),d=new b.SphereGeometry(1,60,40);d.rotateY(-Math.PI/2),d.scale(-1,1,1);const p=new b.Mesh(d,u);return p.renderOrder=-1e3,p.__maskMesh=!0,{mesh:p,material:u,maskTexture:e,maskSource:i,tagsByColorKey:new Map,styleIndexByColorKey:new Map}}updateStyleSlotInMaterial(e,i,s){const r=e.uniforms.mergedTexture.value,a=r.image.data,c=i*3,h=c*4;a[h]=s.color[0]/255,a[h+1]=s.color[1]/255,a[h+2]=s.color[2]/255,a[h+3]=s.color[3];const u=(c+1)*4;a[u]=s.tolerance/255,a[u+1]=s.highlightColor[0]/255,a[u+2]=s.highlightColor[1]/255,a[u+3]=s.highlightColor[2]/255;const d=(c+2)*4;a[d]=s.opacity,r.needsUpdate=!0,this.five.needsRender=!0}setupSharedMeshRaycast(e){const i=e.mesh;if(i.__maskRaycastSet)return;i.__maskRaycastSet=!0;let s=null,o=null;const r=()=>{const l=e.maskTexture;if(!(l!=null&&l.image))return null;if(o===l&&s)return s;o=l;try{const c=document.createElement("canvas"),h=c.getContext("2d");if(!h)return null;const u=l.image;return c.width=u.width,c.height=u.height,h.drawImage(u,0,0),s=h.getImageData(0,0,u.width,u.height),s}catch(c){return null}},a=i.raycast.bind(i);i.raycast=(l,c)=>{var w,C;const h=[];if(a(l,h),h.length===0)return;const u=h[0];if(!u.uv||!((w=e.maskTexture)!=null&&w.image))return;const d=r();if(!d)return;const p=Math.floor(u.uv.x*d.width),g=(Math.floor((1-u.uv.y)*d.height)*d.width+p)*4,v=[d.data[g],d.data[g+1],d.data[g+2]],y=.5/255;for(const[,E]of e.tagsByColorKey){if(!E.enabled||((C=E.config)==null?void 0:C.clickable)===!1)continue;const[D,L,R]=E.targetColor;if(Math.abs(v[0]/255-D/255)+Math.abs(v[1]/255-L/255)+Math.abs(v[2]/255-R/255)<=y){i.userData.__lastHitTag=E,c.push(u);return}}}}computeNormal(){return new b.Vector3(0,1,0)}getAdditionalBlinkTargets(){return null}blink(e){return $(this,null,function*(){var h,u,d;if(!this.maskMesh||this._sharedMeshKey===null||this.sharedStyleIndex<0)return;const i=Xe.sharedMeshRegistry.get(this._sharedMeshKey);if(!i)return;const r={opacity:this.buildStyleForMaterial().opacity},a=(h=e==null?void 0:e.duration)!=null?h:300,l=(u=e==null?void 0:e.loop)!=null?u:4,c=ct({targets:r,opacity:[0,1],duration:a,easing:(d=e==null?void 0:e.easing)!=null?d:"easeInOutQuad",direction:"alternate",loop:l,update:()=>{const p=this.buildStyleForMaterial();p.opacity=r.opacity,this.updateStyleSlotInMaterial(i.material,this.sharedStyleIndex,p)}});try{yield c.finished}catch(p){}finally{this.updateMaskStyle()}})}set(e,i=!0){var o,r;super.set(e,i),e.style&&(this.tagStyle=V(V({},this.tagStyle),e.style),(o=e.style)!=null&&o.mask&&this.updateMaskStyle());const s=(r=e.mask)!=null?r:e.maskUrl;s&&s!==this.maskUrl&&(this.maskUrl=s,this.updateSharedMeshTexture()),e.color!==void 0&&(this.targetColor=Na(e.color),this.updateMaskStyle()),this.maskMesh&&this.updateMaskStyle()}getStyleForMaterial(){return this.buildStyleForMaterial()}getVisible(e){var i;try{if(!this.enabled||!this.plugin.state.enabled||!this.fiveUtil.model||!this.maskUrl)return!1;const s=V(V({},this.five.getCurrentState()),e),{panoIndex:o}=s;return o!==((i=this.fiveState)==null?void 0:i.panoIndex)?!1:super.getVisible(s)}catch(s){return!1}}computeVisible(e){var o,r,a;const i=V(V({},this.five.getCurrentState()),e),{panoIndex:s}=i;return s!==((o=this.fiveState)==null?void 0:o.panoIndex)?{value:!1,reason:{type:"panoIndex mismatch",detail:`Mask 标签仅在当前点位可见。当前点位: ${s}, 标签点位: ${(r=this.fiveState)==null?void 0:r.panoIndex}`,currentPanoIndex:s,tagPanoIndex:(a=this.fiveState)==null?void 0:a.panoIndex}}:super.computeVisible(e)}onClick(e){e.target==="TagMaskModel"&&this.unfoldAndFoldOthers()}unfoldAndFoldOthers(){if(this.isPopoverConfigEnabled())return;const e=this.can("fold"),i=this.can("unfold");e&&i&&(this.state.unfolded=!this.state.unfolded,this.manuallyOperated=!0,this.plugin.addRenderQueue({type:"TagContainerSvelte",keys:["tags"]}),this.state.unfolded&&this.plugin.tags.forEach(s=>{s.id!==this.id&&s.fold()}))}unfold(){this.isPopoverConfigEnabled()||this.setUnfold(!0)}fold(){this.isPopoverConfigEnabled()||this.setUnfold(!1)}setUnfold(e){if(this.isPopoverConfigEnabled())return;const i=this.can("fold"),s=this.can("unfold");i&&s&&(this.state.unfolded=e,this.hooks.emit(e?"unfolded":"folded"),this.plugin.addRenderQueue({type:"TagContainerSvelte",keys:["tags"]}))}updateScreenPosition(){if(!this.currentVisible||!this.position||!Array.isArray(this.position)){this.screenPosition=null,this.plugin.addRenderQueue({type:"TagContainerSvelte",keys:["tags"]});return}const i=new b.Vector3(...this.position).clone().project(this.five.camera);if(this.five.renderer){const s=this.five.renderer.getSize(new b.Vector2);this.screenPosition={leftPx:(i.x+1)/2*s.x,topPx:(-i.y+1)/2*s.y,scale:1}}this.plugin.addRenderQueue({type:"TagContainerSvelte",keys:["tags"]})}applyVisible(){try{if(!this.maskUrl)return;this.visible&&!this.loadingMask&&this.initializeMaskMesh(),this.maskMesh&&(this.updateMaskStyle(),this.updateMeshTransform()),this.updateScreenPosition()}catch(e){console.error(`[MaskTag] Error in applyVisible for tag ${this.id}:`,e)}}updateMeshTransform(){var a;if(!this.maskMesh)return;const e=(a=this.fiveState)==null?void 0:a.panoIndex;if(e===void 0)return;const i=this.workUtil.getObserver(e);if(!i)return;this.maskMesh.position.copy(Vt(i.position,this.workUtil.transform)),this.maskMesh.quaternion.copy(i.quaternion);const s=new b.Vector3,o=new b.Quaternion,r=new b.Vector3;this.workUtil.transform.decompose(s,o,r),this.maskMesh.quaternion.multiply(o),this.five.needsRender=!0}parseStyleListFromMaterial(e){const i=e.uniforms,s=i.groupCount.value,o=i.pixelsPerGroup.value,a=i.mergedTexture.value.image.data,l=[];for(let c=0;c<s;c++){const h=c*o,u=h*4,d=a[u]*255,p=a[u+1]*255,m=a[u+2]*255,g=a[u+3],v=(h+1)*4,y=a[v]*255,w=a[v+1]*255,C=a[v+2]*255,E=a[v+3]*255,D=(h+2)*4,L=a[D];l.push({color:[Math.round(d),Math.round(p),Math.round(m),g],tolerance:Math.round(y),highlightColor:[Math.round(w),Math.round(C),Math.round(E)],opacity:L})}return l}appendStyleToMaterial(e,i){const s=this.parseStyleListFromMaterial(e);Array.isArray(i)?s.push(...i):s.push(i);const o=s.length,r=3,l=o*r,c=1,h=new Float32Array(l*c*4);s.forEach((p,m)=>{const g=m*r,v=g*4;h[v]=p.color[0]/255,h[v+1]=p.color[1]/255,h[v+2]=p.color[2]/255,h[v+3]=p.color[3];const y=(g+1)*4;h[y]=p.tolerance/255,h[y+1]=p.highlightColor[0]/255,h[y+2]=p.highlightColor[1]/255,h[y+3]=p.highlightColor[2]/255;const w=(g+2)*4;h[w]=p.opacity,h[w+1]=0,h[w+2]=0,h[w+3]=0});const u=e.uniforms.mergedTexture.value,d=u.image;d.data=h,d.width=l,d.height=c,u.needsUpdate=!0,e.uniforms.groupCount.value=o,e.uniforms.textureWidth.value=l,console.log(`成功追加样式,当前总组数:${o}`)}getMaskStyle(){var s,o,r;const e=((s=this.tagStyle)==null?void 0:s.mask)||{};let i=[255,255,255];return e.color!==void 0?i=Na(e.color):e.highlightColor!==void 0&&(i=Na(e.highlightColor)),{tolerance:(o=e.tolerance)!=null?o:.001,highlightColor:i,opacity:(r=e.opacity)!=null?r:.6}}setupClickEvents(){var i;if(!this.maskMesh||((i=this.config)==null?void 0:i.clickable)===!1)return;this.cleanupClickEvents();const e=s=>{var r,a;((a=(r=this.maskMesh)==null?void 0:r.userData)==null?void 0:a.__lastHitTag)===this&&this.plugin.hooks.emit("click",{event:s,target:"TagMaskModel",tag:this})};requestAnimationFrame(()=>{!this.maskMesh||!this.plugin.domEvents||(this.clickEventDispose=this.addObjectClickHandler(this,this.maskMesh,e))})}cleanupClickEvents(){this.clickEventDispose&&(this.clickEventDispose(),this.clickEventDispose=void 0)}reloadMask(e){var r;const i=(r=this.fiveState)==null?void 0:r.panoIndex,s=this.getColorKey(),o=typeof i=="number"?Xe.getMeshKey(i):this._sharedMeshKey;if(o){const a=Xe.sharedMeshRegistry.get(o);a&&(a.tagsByColorKey.delete(s),a.styleIndexByColorKey.delete(s),a.tagsByColorKey.size===0&&(a.mesh.parent&&a.mesh.parent.remove(a.mesh),a.mesh.geometry.dispose(),a.mesh.material.dispose(),a.material.uniforms.mergedTexture.value.dispose(),Xe.releaseMaskTexture(a.maskSource),Xe.sharedMeshRegistry.delete(o)))}this.maskMesh=void 0,this._sharedMeshKey=null,this.sharedStyleIndex=-1,this.maskTexture=void 0,this.visible&&!this.loadingMask&&this.initializeMaskMesh()}updateSharedMeshTexture(){return $(this,null,function*(){var r;if(this._disposed||!this.maskUrl)return;const e=(r=this.fiveState)==null?void 0:r.panoIndex;if(typeof e!="number")return;const i=Xe.getMeshKey(e),s=Xe.sharedMeshRegistry.get(i);if(!s){yield this.initializeMaskMesh();return}if(s.maskSource===this.maskUrl)return;const o=yield Xe.loadMaskTexture(this.maskUrl);this.maskTexture=o,Xe.releaseMaskTexture(s.maskSource),s.maskTexture=o,s.maskSource=this.maskUrl,s.material.uniforms.map.value=o,s.material.uniforms.maskTexelSize.value=Xe.getMaskTexelSize(o),this.five.needsRender=!0})}updateMaskStyle(){if(!this.maskMesh||this._sharedMeshKey===null||this.sharedStyleIndex<0)return;const e=Xe.sharedMeshRegistry.get(this._sharedMeshKey);e&&this.updateStyleSlotInMaterial(e.material,this.sharedStyleIndex,this.buildStyleForMaterial())}updateCanvasTexture(){if(!this.maskTexture||typeof this.maskUrl=="string"){console.warn("[MaskTag] updateCanvasTexture only works for Canvas-based masks");return}this.maskTexture instanceof b.CanvasTexture&&(this.maskTexture.needsUpdate=!0,this.five.needsRender=!0,console.log("[MaskTag] Canvas texture updated"))}disposeMaskResources(){if(this._disposed)return;this._disposed=!0,this.cleanupClickEvents();const e=this._sharedMeshKey,i=this.getColorKey();if(e){const s=Xe.sharedMeshRegistry.get(e);s&&(s.tagsByColorKey.delete(i),s.styleIndexByColorKey.delete(i),s.tagsByColorKey.size===0?(s.mesh.parent&&s.mesh.parent.remove(s.mesh),s.mesh.geometry.dispose(),s.mesh.material.dispose(),s.material.uniforms.mergedTexture.value.dispose(),Xe.releaseMaskTexture(s.maskSource),Xe.sharedMeshRegistry.delete(e)):Xe.rebuildEntryMaterial(s))}this.maskMesh=void 0,this._sharedMeshKey=null,this.sharedStyleIndex=-1,this.maskTexture=void 0,this.five.needsRender=!0}dispose(){this.disposeMaskResources()}disable(){super.disable(),this.updateMaskStyle()}enable(){super.enable(),this.updateMaskStyle()}destroy(){this.disposeMaskResources(),super.destroy()}static clearSharedMeshRegistry(){Xe.sharedMeshRegistry.forEach(e=>{e.tagsByColorKey.forEach(i=>{i.maskMesh=void 0,i._sharedMeshKey=null,i.sharedStyleIndex=-1}),e.mesh.parent&&e.mesh.parent.remove(e.mesh),e.mesh.geometry.dispose(),e.mesh.material.dispose(),e.material.uniforms.mergedTexture.value.dispose(),Xe.releaseMaskTexture(e.maskSource)}),Xe.sharedMeshRegistry.clear()}static writeStyleListToMaterial(e,i){const s=i.length,o=3,a=s*o,l=1,c=new Float32Array(a*l*4);i.forEach((d,p)=>{const m=p*o,g=m*4;c[g]=d.color[0]/255,c[g+1]=d.color[1]/255,c[g+2]=d.color[2]/255,c[g+3]=d.color[3];const v=(m+1)*4;c[v]=d.tolerance/255,c[v+1]=d.highlightColor[0]/255,c[v+2]=d.highlightColor[1]/255,c[v+3]=d.highlightColor[2]/255;const y=(m+2)*4;c[y]=d.opacity});const h=e.uniforms.mergedTexture.value,u=h.image;u.data=c,u.width=a,u.height=l,h.needsUpdate=!0,e.uniforms.groupCount.value=s,e.uniforms.textureWidth.value=a}static rebuildEntryMaterial(e){const i=Array.from(e.tagsByColorKey.values()).sort((o,r)=>o.sharedStyleIndex-r.sharedStyleIndex);if(i.length===0)return;const s=i.map(o=>o.getStyleForMaterial());Xe.writeStyleListToMaterial(e.material,s),i.forEach((o,r)=>{o.sharedStyleIndex=r,e.styleIndexByColorKey.set(`${o.targetColor[0]},${o.targetColor[1]},${o.targetColor[2]}`,r)})}static getMaskCacheKey(e){if(typeof e=="string")return e;{let i=Xe.canvasSymbolMap.get(e);return i||(i=Symbol("canvas-mask"),Xe.canvasSymbolMap.set(e,i)),i}}static loadMaskTexture(e){return $(this,null,function*(){const i=Xe.getMaskCacheKey(e),s=Xe.maskTextureCache.get(i);if(s)return s.refCount++,s.texture;const o=performance.now(),r=new AbortController;try{let a;if(typeof e=="string"){const h=new b.TextureLoader;a=yield new Promise((u,d)=>{if(r.signal.aborted){d(new Error("Load aborted"));return}h.load(e,p=>{r.signal.aborted?(p.dispose(),d(new Error("Load aborted"))):u(p)},void 0,p=>{d(p)}),r.signal.addEventListener("abort",()=>{d(new Error("Load aborted"))})})}else a=new b.CanvasTexture(e),a.needsUpdate=!0,console.log("[MaskTag] Created texture from canvas, size:",e.width,"x",e.height);a.wrapS=b.ClampToEdgeWrapping,a.wrapT=b.ClampToEdgeWrapping,a.minFilter=b.NearestFilter,a.magFilter=b.NearestFilter,a.anisotropy=4,a instanceof b.CanvasTexture&&(a.needsUpdate=!0),Xe.maskTextureCache.set(i,{texture:a,refCount:1,abortController:r});const l=performance.now()-o,c=typeof e=="string"?e.substring(0,50):"Canvas";if(console.log(`[MaskTag Performance] Texture loaded in ${l.toFixed(2)}ms, source: ${c}`),a.image){const h=(a.image.width*a.image.height*4/1048576).toFixed(2);console.log(`[MaskTag Memory] Texture size: ${a.image.width}x${a.image.height}, estimated memory: ${h}MB`)}return a}catch(a){throw console.error("[MaskTag] Failed to load mask texture:",typeof e=="string"?e:"Canvas",a),a}})}static releaseMaskTexture(e){var o;const i=Xe.getMaskCacheKey(e),s=Xe.maskTextureCache.get(i);if(s&&(s.refCount--,s.refCount<=0)){const r=typeof e=="string"?e.substring(0,50):"Canvas";console.log(`[MaskTag Memory] Releasing texture (refCount=0): ${r}`),(o=s.abortController)==null||o.abort(),s.texture.dispose(),Xe.maskTextureCache.delete(i)}}static getCacheStats(){let e=0,i=0;const s=[];return Xe.maskTextureCache.forEach((o,r)=>{e+=o.refCount;let a=0;if(o.texture.image){const c=o.texture.image.width||0,h=o.texture.image.height||0;a=c*h*4/(1024*1024),i+=a}const l=typeof r=="string"?r.substring(0,80):"[Canvas]";s.push({source:l,refCount:o.refCount,sizeMB:parseFloat(a.toFixed(2))})}),{totalCached:Xe.maskTextureCache.size,totalRefCount:e,estimatedMemoryMB:parseFloat(i.toFixed(2)),cacheEntries:s}}static clearAllCache(){console.warn("[MaskTag] Clearing all texture cache"),Xe.maskTextureCache.forEach(e=>{var i;(i=e.abortController)==null||i.abort(),e.texture.dispose()}),Xe.maskTextureCache.clear()}};let Mi=Xe;f(Mi,"maskTextureCache",new Map),f(Mi,"canvasSymbolMap",new WeakMap),f(Mi,"sharedMeshRegistry",new Map);function u7(n){Le(n,"svelte-cksy1a",".audio-tag-point.svelte-cksy1a{position:relative;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;padding:0.25rem;border-radius:100%;border:0.0625rem solid rgba(255, 255, 255, 0.6);background:linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2));box-shadow:inset 0 0 0.25rem 0 rgba(255, 255, 255, 0.3);display:flex;align-items:center;justify-content:center}")}function d7(n){let t,e,i,s,o;return e=new Kl({props:{playing:n[0],width:24}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","audio-tag-point svelte-cksy1a")},m(r,a){Z(r,t,a),pe(e,t,null),i=!0,s||(o=[_e(t,"click",function(){vi(n[2])&&n[2].apply(this,arguments)}),_e(t,"pointerenter",function(){vi(n[3])&&n[3].apply(this,arguments)}),_e(t,"pointerleave",function(){vi(n[4])&&n[4].apply(this,arguments)})],s=!0)},p(r,a){n=r;const l={};a&1&&(l.playing=n[0]),e.$set(l)},i(r){i||(H(e.$$.fragment,r),i=!0)},o(r){Y(e.$$.fragment,r),i=!1},d(r){r&&X(t),me(e),s=!1,dt(o)}}}function f7(n){let t,e;return t=new sd({props:{url:n[1].data.audioUrl,enable:n[1].state.visible,style:"width: max-content; height: max-content;",hooksInfo:{tag:n[1]},$$slots:{default:[d7]},$$scope:{ctx:n}}}),t.$on("play",n[5].play),t.$on("pause",n[5].pause),t.$on("error",n[5].error),t.$on("timeupdate",n[5].timeupdate),t.$on("duration",n[5].duration),t.$on("audioRef",n[5].audioRef),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,[s]){const o={};s&2&&(o.url=i[1].data.audioUrl),s&2&&(o.enable=i[1].state.visible),s&2&&(o.hooksInfo={tag:i[1]}),s&157&&(o.$$scope={dirty:s,ctx:i}),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function p7(n,t,e){let{playing:i=!1}=t,{tag:s}=t,{handlePointClick:o=()=>{}}=t,{handleMouseEnter:r=()=>{}}=t,{handleMouseLeave:a=()=>{}}=t;const l=Vn(),c={audioRef:h=>l("audioRef",h.detail),play:()=>{e(0,i=!0),l("play")},pause:()=>{e(0,i=!1),l("pause")},error:()=>{e(0,i=!1),l("pause")},timeupdate:h=>l("timeupdate",h.detail),duration:h=>l("duration",h.detail)};return n.$$set=h=>{"playing"in h&&e(0,i=h.playing),"tag"in h&&e(1,s=h.tag),"handlePointClick"in h&&e(2,o=h.handlePointClick),"handleMouseEnter"in h&&e(3,r=h.handleMouseEnter),"handleMouseLeave"in h&&e(4,a=h.handleMouseLeave)},[i,s,o,r,a,c]}class m7 extends Ee{constructor(t){super(),Ie(this,t,p7,f7,Me,{playing:0,tag:1,handlePointClick:2,handleMouseEnter:3,handleMouseLeave:4},u7)}}function g7(n){Le(n,"svelte-dorxu0",'@charset "UTF-8";.tag-point-click-helper.svelte-dorxu0.svelte-dorxu0{position:absolute;pointer-events:auto;cursor:pointer;width:141%;height:141%;left:50%;top:50%;transform:translate(-50%, -50%);z-index:1000000}.audio-tag-point-click-helper.svelte-dorxu0.svelte-dorxu0{position:absolute;width:100%;height:100%;pointer-events:none;z-index:1}.tag-point-wrapper.svelte-dorxu0.svelte-dorxu0{pointer-events:none;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);cursor:pointer;z-index:1040}.tag-folded-point.svelte-dorxu0.svelte-dorxu0,.tag-unfolded-point.svelte-dorxu0.svelte-dorxu0{transition:all 0.5s}.tag-point-wrapper.svelte-dorxu0 .tag-unfolded-point.svelte-dorxu0{display:flex;justify-content:center;align-items:center;position:absolute;width:100%;height:100%;border-radius:50%}.tag-point-wrapper.svelte-dorxu0 .tag-unfolded-point.svelte-dorxu0:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.3125rem;height:0.3125rem;border-radius:50%;background-color:white}.tag-point-wrapper.svelte-dorxu0 .tag-unfolded-point.svelte-dorxu0:before{content:"";position:absolute;width:0.875rem;height:0.875rem;border-radius:50%;background-color:rgba(0, 0, 0, 0.2)}.tag-point-wrapper.folded.svelte-dorxu0 .tag-folded-point.svelte-dorxu0{opacity:1;scale:1}.tag-point-wrapper.folded.svelte-dorxu0 .tag-unfolded-point.svelte-dorxu0{opacity:0;scale:1}.tag-point-wrapper.unfolded.svelte-dorxu0 .tag-folded-point.svelte-dorxu0{opacity:0;scale:0.2}.tag-point-wrapper.unfolded.svelte-dorxu0 .tag-unfolded-point.svelte-dorxu0{opacity:1;scale:1}.tag-point-wrapper.disable-unfold.svelte-dorxu0 .tag-folded-point.svelte-dorxu0{opacity:1 !important;scale:1 !important}.tag-point-wrapper.disable-unfold.svelte-dorxu0 .tag-unfolded-point.svelte-dorxu0{opacity:0 !important;scale:1 !important}')}function v7(n){let t;return{c(){t=U("div"),P(t,"class","audio-tag-point-click-helper svelte-dorxu0")},m(e,i){Z(e,t,i),n[20](t)},p:ce,d(e){e&&X(t),n[20](null)}}}function y7(n){let t,e,i;return{c(){t=U("div"),P(t,"class","tag-point-click-helper svelte-dorxu0")},m(s,o){Z(s,t,o),n[19](t),e||(i=[_e(t,"click",n[16]),_e(t,"pointerenter",n[17]),_e(t,"pointerleave",n[18])],e=!0)},p:ce,d(s){s&&X(t),n[19](null),e=!1,dt(i)}}}function b7(n){let t,e;return t=new Ay({props:{icon:n[8],width:n[7]}}),t.$on("iconLoaded",n[23]),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&256&&(o.icon=i[8]),s&128&&(o.width=i[7]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function A7(n){let t,e;return t=new m7({props:{tag:mt(n[1]),handlePointClick:n[21],handleMouseEnter:n[22],handleMouseLeave:n[3]}}),t.$on("audioRef",n[14].audioRef),t.$on("play",n[14].play),t.$on("pause",n[14].pause),t.$on("timeupdate",n[14].timeupdate),t.$on("duration",n[14].duration),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.tag=mt(i[1])),s&16&&(o.handlePointClick=i[21]),s&6&&(o.handleMouseEnter=i[22]),s&8&&(o.handleMouseLeave=i[3]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function w7(n){let t,e,i,s,o,r,a,l,c,h;function u(y,w){return y[6]?v7:y7}let d=u(n),p=d(n);i=new Xi({props:{center:!0,blurRadius:15,spreadRadius:5,opacity:.3}});const m=[A7,b7],g=[];function v(y,w){return y[6]?0:1}return l=v(n),c=g[l]=m[l](n),{c(){t=U("div"),p.c(),e=ue(),ge(i.$$.fragment),s=ue(),o=U("div"),r=ue(),a=U("div"),c.c(),P(o,"class","tag-unfolded-point svelte-dorxu0"),_(o,"transition-delay",(n[9]?n[11]:0)+"ms"),P(a,"class","tag-folded-point svelte-dorxu0"),_(a,"transition-delay",(n[9]?n[11]:0)+"ms"),P(t,"class","tag-point-wrapper svelte-dorxu0"),Pe(t,"unfolded",n[5]),Pe(t,"folded",n[9]),Pe(t,"disable-unfold",n[1].isPopoverConfigEnabled())},m(y,w){Z(y,t,w),p.m(t,null),B(t,e),pe(i,t,null),B(t,s),B(t,o),B(t,r),B(t,a),g[l].m(a,null),h=!0},p(y,[w]){d===(d=u(y))&&p?p.p(y,w):(p.d(1),p=d(y),p&&(p.c(),p.m(t,e))),w&512&&_(o,"transition-delay",(y[9]?y[11]:0)+"ms");let C=l;l=v(y),l===C?g[l].p(y,w):(xe(),Y(g[C],1,1,()=>{g[C]=null}),Se(),c=g[l],c?c.p(y,w):(c=g[l]=m[l](y),c.c()),H(c,1),c.m(a,null)),w&512&&_(a,"transition-delay",(y[9]?y[11]:0)+"ms"),(!h||w&32)&&Pe(t,"unfolded",y[5]),(!h||w&512)&&Pe(t,"folded",y[9]),(!h||w&2)&&Pe(t,"disable-unfold",y[1].isPopoverConfigEnabled())},i(y){h||(H(i.$$.fragment,y),H(c),h=!0)},o(y){Y(i.$$.fragment,y),Y(c),h=!1},d(y){y&&X(t),p.d(),me(i),g[l].d()}}}function P7(n,t,e){var F,J,ne;let i,s,o,r,a;const l=cn("hooks"),c=Vn();let{tag:h}=t,u,d=!1;const p=()=>{u!==void 0&&clearTimeout(u),d=!0,u=setTimeout(()=>{d=!1},800)},m=q=>{d||(h.entryFromModel&&Ii(h.five.state.mode)?h.find({targetMode:"Panorama"}).then(()=>h.unfoldAndFoldOthers()):l.emit("click",{event:q,target:"TagPoint",tag:h}))},g=(()=>h.contentType==="Text"&&h.data.appearance==="plane"?500:800)();let{tagPointClickHelper:v=null}=t,{handleMouseEnter:y=()=>{}}=t,{handleMouseLeave:w=()=>{}}=t,{handleTagPointClick:C=()=>{}}=t;const E=()=>!0,D=(J=(F=h.config.popoverConfig)==null?void 0:F.beforeOpen)!=null?J:E,L=(ne=h.config.popoverConfig)==null?void 0:ne.onHoverEnd;let{audioInstance:R=null}=t;const z={audioRef:q=>{e(15,R=q.detail),c("audioInstanceReady",R)},play:()=>c("audioPlay"),pause:()=>c("audioPause"),timeupdate:q=>c("audioTimeUpdate",q.detail),duration:q=>c("audioDuration",q.detail)},O=q=>{C(q),m(q)},A=q=>{D(h)&&y(q)},M=q=>{w(q),L==null||L(h,q)};function I(q){qe[q?"unshift":"push"](()=>{v=q,e(0,v)})}function k(q){qe[q?"unshift":"push"](()=>{v=q,e(0,v)})}const x=q=>{C(q),m(q)},S=q=>{D(h)&&y(q)};function j(q){_n.call(this,n,q)}return n.$$set=q=>{"tag"in q&&e(1,h=q.tag),"tagPointClickHelper"in q&&e(0,v=q.tagPointClickHelper),"handleMouseEnter"in q&&e(2,y=q.handleMouseEnter),"handleMouseLeave"in q&&e(3,w=q.handleMouseLeave),"handleTagPointClick"in q&&e(4,C=q.handleTagPointClick),"audioInstance"in q&&e(15,R=q.audioInstance)},n.$$.update=()=>{var q,oe,se,ae;n.$$.dirty&2&&e(5,i=(q=h.state)==null?void 0:q.unfolded),n.$$.dirty&32&&e(9,s=!i),n.$$.dirty&2&&e(8,o=(se=(oe=h.style)==null?void 0:oe.point)!=null&&se.url?(ae=h.style)==null?void 0:ae.point:{url:vE}),n.$$.dirty&2&&e(7,r=(()=>{var we,le,he,be;const ze=(le=(we=h.style)==null?void 0:we.point)==null?void 0:le.width;if(typeof ze=="number")return ze;const ee=(be=(he=h.style)==null?void 0:he.point)==null?void 0:be.size;if(typeof ee=="number")return ee;if(ee==="S")return 18;if(ee==="M")return 20;if(ee==="L")return 24;if(ee==="XL")return 28})()),n.$$.dirty&2&&e(6,a=h.contentType==="Audio"&&h.data.appearance==="plane")},p(),[v,h,y,w,C,i,a,r,o,s,m,g,D,L,z,R,O,A,M,I,k,x,S,j]}class C7 extends Ee{constructor(t){super(),Ie(this,t,P7,w7,Me,{tag:1,tagPointClickHelper:0,handleMouseEnter:2,handleMouseLeave:3,handleTagPointClick:4,audioInstance:15},g7)}get tag(){return this.$$.ctx[1]}set tag(t){this.$$set({tag:t}),xn()}get tagPointClickHelper(){return this.$$.ctx[0]}set tagPointClickHelper(t){this.$$set({tagPointClickHelper:t}),xn()}get handleMouseEnter(){return this.$$.ctx[2]}set handleMouseEnter(t){this.$$set({handleMouseEnter:t}),xn()}get handleMouseLeave(){return this.$$.ctx[3]}set handleMouseLeave(t){this.$$set({handleMouseLeave:t}),xn()}get handleTagPointClick(){return this.$$.ctx[4]}set handleTagPointClick(t){this.$$set({handleTagPointClick:t}),xn()}get audioInstance(){return this.$$.ctx[15]}set audioInstance(t){this.$$set({audioInstance:t}),xn()}}const M7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAeCAYAAABqpJ3BAAAAAXNSR0IArs4c6QAAAFBlWElmTU0AKgAAAAgAAgESAAMAAAABAAEAAIdpAAQAAAABAAAAJgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAMKADAAQAAAABAAAAHgAAAAC3G9N3AAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgoZXuEHAAACfklEQVRYCe2Yu2tVQRCHb1QQFQRBKzEkooJoISL+ATYW/kXBSrBKLxZaidaKhSCxs1Asg4qgRhHBB6IkKr4f3yd3vCfHezfnsTGnuD/4ZWf3zO7M7M4+biZ6vd5muBsehydg1/EdB6/3uTBR8vYg9dPQoLqILzg1A++Gc+tD6JevKR/AY/BXB3kSn+bhX5QD8MNLuAnugz87xMv4cg0uw7AAVDDKo3Ar7MJKPMWPWeiELsOoAFS8D00l98laBvEN+6fgO/gPRgWg4iL8Ct3Ya5lKl7B/Bw7FhqGtg8ariAZwYND0X6V7WNOHkVg38svgw1nED/2qyykDIRfLsmy93Falvza1nUQqhaLjZ4Q38HA0UOqQ+0LExoqy2PaDipNkGfp+r9L/PHqPVE6hSgD2fw63w51QR7wN3dw6EqVOhhylQSmL0K3S/zb6ydT5MyJ/qgagvhfcEbjRCogZjzLVFjqWRbnYJ+S3CGegAa+IOgE44DPo/RCOrEZp3r+ClVAnAAd0djy5puBqOD/HuLdgZdQNwIEfQ4/WLdB8zsUXjHUBRoohrowmAWhgAbofRI6VMD3PwSUHrIMmATi+Z7S39B6YYwV8pHlp1UbTADTkhp6GPvjarMIT+l+BjdAmAA1q/FDfsmOZCuVgUu3v0b8IvSwboW0AGvaVuDdh3YCGwXYvK1eyMdoGoGF/xW2D3tTl2U/V59G/CVvBMz0HbjDILujRWgUfUbJPa+RYAZ0w970998Mqp5I/D30gtkauAHTEH0BuyimYSp05vj+EWZAzAB1yP/jc2AFNz2Ign6ibNj4KsyGeutkGLAw0iewdIfx/jkeuz/AxxjMwnoGMM/AbzDbNM/bhiRQAAAAASUVORK5CYII=",I7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAeCAMAAABdem3zAAAAb1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABt6r1GAAAAJXRSTlMApb6gupm3s7CprZWRfoeOg4qdenZzLG9ka04KJR4EET04MBlfDzTkzgAAAMpJREFUOMvd0dsSgiAQBuA1o7KMTJRUEE+9/zOGjhmjIHvdtyizM1zAv/C3lOS8BjxZlNpbAhJ/zTig1PkCdS1RZotSgF/FDBXiAXcT8z6jyZLp5PfPGthXJCsF7GrpRgs7BvrcoAM4qexhkSl3orGVM1t5c5COEVPiQIU9UZISvXRNi6S/3pptF87S8dNl9p1lxCQIw2CsadfMnmwHzoJdbJNo5LHKto6uHlENBhVfvGJlJnpGMLLtTyg9zPj5iHLhoAmeHw9YORcf/XMbuOSlzkgAAAAASUVORK5CYII=",E7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAwCAYAAAAGlsrkAAAAAXNSR0IArs4c6QAAAFBlWElmTU0AKgAAAAgAAgESAAMAAAABAAEAAIdpAAQAAAABAAAAJgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAHqADAAQAAAABAAAAMAAAAACmbYh+AAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgoZXuEHAAACtUlEQVRYCcWXzUtWQRSHb1ZWL1FYIH2AkSaEBbkMsTYFQVCbdkVQ7Vr3L/RXRQURIrVopxAuBEmIwCBqkfZBz2/0yLV35oz39X4c+HnHuXPOM2c+ztWi6MZ6Q91wi/GuwLe6SPgy0NdtZzwN9LmyPaAfLZg4j9A9tB+1Ah6D8wyNC2jWdMZ3AT1Ahwxoz6bAIwCeoisoyoh22qwGfF7F7zE66vnXCe4Buo9m0UEPqnd1gSeJ9QSNKij2C7nwvYLlfxupElWKVWkwwct2ml8eorOlzt9b7cOlvmhzUPA1oinT/6+J4oUCEaWVOquCdU1UfSZQDKCM1V/rHqu4qyAcQSmzRNyDJWcbmAqkfl2Tm0jg3PjaMladvYOOb0GzmTBOlh3nZaAMdU3Ke5nbO4uXG1ekvseTAG+gqmbXKeuXAs9kPeMDLOPsUsfA2le3wMeZodcy1lK7FgMfcz3yL//khxTJPU755pZQS10+jKk4UfB6cvRmRXJeh1cDZ7yMuwf3wFZAcisTzVjOb7zozjs71QMdLsVdQq8cwJ5feQfhC9FX0Xmk76vdAPmoHdNf+vch+1zGxoQ+D4x/8Q0tIN3rU8j2LhXQTrXFTY0bsgHETJr26yNaQ+eQskkFVMaC6+mtzK7AxAimpV9EZ9AJFIMLqv7cylQCE6/4iT6gDXQBGcgm0UjGcLZthZayn0AqsQamGSZTe8YKbPaDxjukrJW94LYCte4xcftMAB083fuLSAdPcFlth2szXPznV7rn0Uk0hhpdauLvMF07HbzP6BIaRrb3fc/d3GP8K9knRs8h3XkVnT6o+poAEzdcu7c8de3sz+IdE2gKLLhMB+89mkL6L2Qb3jQYVqj3L3nqPxBNIMDbAMMKtVsHTx+c60gHr3XTnr9oK+NydvrYjHYB1iS+l2fSZrv3D/+KTyvCdHWgAAAAAElFTkSuQmCC",k7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAwCAYAAAAGlsrkAAAAAXNSR0IArs4c6QAAAFBlWElmTU0AKgAAAAgAAgESAAMAAAABAAEAAIdpAAQAAAABAAAAJgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAHqADAAQAAAABAAAAMAAAAACmbYh+AAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgoZXuEHAAACpklEQVRYCcWYPYwOURSGP38Rv4lEsZoVkq0oNEQjEopNFCQSlUIkJCqFUiLR0ah1SIROgWQLQSNBKUIhGwUNUZD4K/w/b3wnmZ1v7tx3xsw4ybsz994z57nn3J9lR6PRaCUa3BZD3Dw4FaDAs/8DLOYdtHVouDJeis6hbUPClwA7gjSBPWgFeop+oV5NwKIdoHEBTRc7+3iPjJXhb6TnWqTsv6EXqBcrZxwQrfthdBqti84unylwMLbwch7tjI6unjmwOKvRCXQMdXbLOeDvAGXb0Rk0o8a/WtXm0iaLjabNJskWoeVoB9IeeIlijNdm5mS8bBzyRyH0Xt5PoQ2FvkavDjhKXQ48RcdJtKs84LQdcGSs8pZNS7UPaeM1OnYOODIulro8gY10HEf2LxsHXJdxcQJraBxE+1H22DlgBf+J6jKWT1RGWR9F0+pMmQNWQK1l1Rqn4q5i4BBKlt4Bp4I7/Tp2M1WODjjWOFfqqvjq240mquWAVWqt8cTH9Dmm225T2dEB6xutcc6iMlV+gi8wF9xkVy8ApBou2Mk4xVD/x/KgA44Stl3jz0BftwHHxdB2Vz8sQ9V2Mo7v2mR8j4/nI0Dx6QRTqZV1LuPwU/wv6DaaKLEGZQ44Sv33i/TPmNwzXO6ir2lXDxyZaJJ1WWvsFhI4a00yroO+gnQDfcgSxw4OuC5jXSxz6IELDD8HLN+qm+st/VfRGzk0NQesTRM3V5Rbx0SZRrsp19rVxaDvaVxC88XONu9OxrHGjwBcR7XHxJ2EA9Zdexk9doM6fjnwc4JcRPYxcaDySYG1aa4hXQi9WBVYl4H+HJG8Z7uYSRl8k6BXUOtj4k4qwNqpZ9ET98Mu/O4TJPkP7y4AVTF0I61HKvGgJvAn9G5Q6hiW/Z9dH5P6A8K2bfEUA9VoAAAAAElFTkSuQmCC",x7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAeCAYAAABqpJ3BAAAAAXNSR0IArs4c6QAAAFBlWElmTU0AKgAAAAgAAgESAAMAAAABAAEAAIdpAAQAAAABAAAAJgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAMKADAAQAAAABAAAAHgAAAAC3G9N3AAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgoZXuEHAAACfElEQVRYCe2XP2sVQRTFd0VsIgmpTAqx1EAStLAIpowgFmohFkEQ0+UbBEEJCpJvkE4REguVoBY2EaysLJSkSCzFQq1EMQg2z9+Jc2EyziSzb/eZJ7wLlzv37v1zzuy82aRstVr9RVGModfQGfR/kHuAfICulz5ayJzBf4oe9uNdtP4BlktlWb42TDsIKAiJs5gnltBl9jLgV31MfxHQQ0jcxsz6iV2wXgT8rRBHisAhEl+gI2HBPvkbzD0PgV/h/CgBJfEWjmOeoyKznyLQFwD/PgYiSUDJkLiOmYsV/sPYAuDvp+btSkBFkFDx6VSDDsffAF6bmJQcAkNUP0J1tbZcJ6uTr7VZPba1nxuLhblhT12ZVyDwWYkpsaLU8+04b0FX651dk5p/eBPwO67M2IiDsWAYUyNITBCfCp91yH+ZA16zs96AEiGgPzkW0SPyOyhf6D0Lge85M7IJqBkkxjELOY1r5MwBfi23PusIWTM1hsRj/IsWa9g+qwJesysRcGCXsaPoUec3ZT7SSL0rSaUjZJ15C8dYz6NNfaX1tZ1n9z9gK0lbBDQBErpapytNSyc/BPyeV2asvJ0jtN1HAyGho3QC9T9Util+TDVhXDHJZrvgVWxNta4sENDVegPtq1z8p2ALcxcCWVdmbEYtAmoIiVOYq7HmGbElwL/NyEumtH2ErKMAQEJ/ep+0WKZ9Vxe85tQm4MCuYIfRQefvZb6SoJracqB2Bxqwk7oGBUg2R1dcDen1pPZvwB/PURrHP+fHIuvVJo6O9W2UgJq638Mky34b4uxP7CvAR/81DHKz3cYJ2GSI6Gs94Pxv2E9NHRub0bO9HejtQFH8BvWooa9jGY/wAAAAAElFTkSuQmCC",S7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAeCAMAAABdem3zAAAAgVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9d3yJTAAAAK3RSTlMA/Pfx6+XZ39TIwry2sJ+qpY3Ok4jNgpl8dnEGmEUfDi5hOycxmn5YGGhjcHcwqwAAAMZJREFUOMvd0e0OgiAUgGEqs9IiLdNCRQS/6v4vMGrNofJxfvfIzuZ2fugL+ls5ZYwiOPEk0ktA95vHD4Pt0/uIgr6fpCOSI7c+UfSAH4gnGtd+lVwnkgrZkSzLCnmK75QPse+XeKG0FsXRAqaWovFZIza3rU9atWmfHQ2YoWgUGkT6tl1g1GmLHiw0bYfgcrvI8xlyyqG+BwOaw3srvCjqO8zaCn/n4IvJFYdbp1C98NQDSJWiG5CxLffWIB5HUsXbFVjLqzcmgh9KFWWqZgAAAABJRU5ErkJggg==",T7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAwCAYAAAAGlsrkAAAAAXNSR0IArs4c6QAAAFBlWElmTU0AKgAAAAgAAgESAAMAAAABAAEAAIdpAAQAAAABAAAAJgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAHqADAAQAAAABAAAAMAAAAACmbYh+AAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgoZXuEHAAACiElEQVRYCcWYsUscQRSH74LaBE60MU2wsBALBQsbTSuEFCkCKmghYmUjdmohiIUpU6WxSZEQQrqkjZA/IEXESksREbEQBRFEOL+nOzK3O7NvvNudG/g5s29m3je/mbnz2EqlDaVer9detIEryOF2geejG2abJ9BdVDDASXQeDQyoC22hS3SDyncMZBDtInH6BC71cgFa4Cx/o6H0mXakA0U8A3xFno9oHHW5chbuGOgkoJ9ozAU0scIcA6yRdAW9Q06XBip1IWCgI+RaRa8lKaX+WPn/tgQGKM7m0BRSXdrLaBoMtJ9Ey2jATpi0q45YQ6gpMFC5QLPoZUO2Zzw8CwxQLtAikjPN29rizhjoKLAZ1IO00vpWAxRnH5B8LqWtugkZk7vVQOUCCbQPmaK6YaA6xgsGKuf4HqXPMsSxWaS3dn5lAh1kxlvPLNUN89TFOcFMfOOBhobVxWXAybnKx8ZXVDdMVMdkwEzq9hGTuOpGmf/Q7QJr81Q3JFAX5wJfauSAfnVxLvApiW9ykqtumKuOyYCr1eotE//mgEO6mnJcAX5I9j8egprUM68hnHFseoH/p/0VXZhYUqvbyDh1jBcsEOBHVJ/RnjwXWXLBApIzRz9ofkPXEgso6nGoYANJtn6b5wMTy6lb2+p0YuBX6BPx70huv68U59gmAJcbv4mO7bjVLtaxldhcvHViv+x4aDv4jF0JcS4X7wt9a+jMGlPOVluAhybwfRpLaDfpU7daHZAkCq74fy6/uTdQL+pE8tMprc6WtpqEmZJcvGk6/mU6YwVwv4AO0QlqeCNQ+hoAOl9FlA4WAPD4L19sZywg7uumFDz+CzazAJzvmHbUGvBEVKCBAa7dA6h+CDnUpjBPAAAAAElFTkSuQmCC",D7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAwCAYAAAAGlsrkAAAAAXNSR0IArs4c6QAAAFBlWElmTU0AKgAAAAgAAgESAAMAAAABAAEAAIdpAAQAAAABAAAAJgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAHqADAAQAAAABAAAAMAAAAACmbYh+AAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgoZXuEHAAACXElEQVRYCcWYQSgFQRjHdyUlRU5ykCMOxMHJSXlnV4nk7OTISRw8N7koJSeKg+Ig5R3l4kBOHF8u5KD3IoVa/692XtPXzOz3Ztfu1jQz35v5ft//2++1uxNEUdQZFHC1gDlcADcg8EIR4ACp/kWbyB0eg9/Ql3KFx+Av9DW0dbS2XAJgYFJeQRv4bzgVF7+GYDgHfJH/kOU8JMVw+IP2bWg3sK2EYfiCPtPLpFgHjGNyguAyL7wkxXomLhDENtTX9ch8x0mKyW8UO59Cvwv1I/E8VScBhxqhB+MyFR5aqr+dBKxxG8NpjDYB729YmhxIwCrV3HUfDGuAexWeBKynmsMp3bOAL6M19XiVgG2K9SAGMVkFfEw3usYSsEux7rsDkznAZ9ASC08C1p1LxqNYtAS4s/AkYEmq+ZpuwOddqZeAJSptt6MEuPFJJwHbnEoCojWTpnsuAfM0moCuNe3Y0Ms3ScBpFROzywfsUqP8NR2cRLFy7uqTgqvxzRKwRI1rTR3P8KoPOEkN98nn19xA86wU24K7hNonE7jVZPSw8VS/w8epKcXKtwRsU6N8UK+vucecoPTWar0kYK7G5IzWfKIdA3hnWsBtErCuhu9X80cM9gEVv4FKwC7FlM4jAK9UBNJeArb5esYPO4BWbQtcdgnYlOozOD0E1FlAacH6/ldMtgB80I0+Y4lidY8rAGT2CSMBfwC44VNArkwkgW+x+V8+U21gKpoyVB64ok71G96H6NRHnYHkdhShjpsUOPfDl8KOmwo5YNtLVSS+m1FY+aulYAFu6rvWVyDf9wc6+wpavsNbLQAAAABJRU5ErkJggg==";function L7(n){Le(n,"svelte-16evpcg",".tag-popover-arrow-wrapper.svelte-16evpcg{position:absolute;transform-origin:center;background-position:center;background-repeat:no-repeat;background-size:100% 100%}.tag-popover-arrow-top.svelte-16evpcg{width:1rem;height:0.625rem;top:0.5rem;left:50%;transform:translateX(-50%)}.tag-popover-arrow-bottom.svelte-16evpcg{width:1rem;height:0.625rem;bottom:0.5rem;left:50%;transform:translateX(-50%)}.tag-popover-arrow-left.svelte-16evpcg{width:0.625rem;height:1rem;top:50%;left:0.5rem;transform:translateY(-50%)}.tag-popover-arrow-right.svelte-16evpcg{width:0.625rem;height:1rem;top:50%;right:0.5rem;transform:translateY(-50%)}")}function Fg(n){let t,e,i;return{c(){t=U("div"),P(t,"class",e="tag-popover-arrow-wrapper tag-popover-arrow-"+n[0]+" theme-"+n[2]+" svelte-16evpcg"),P(t,"style",i=`background-image: url(${n[3]})`)},m(s,o){Z(s,t,o)},p(s,o){o&5&&e!==(e="tag-popover-arrow-wrapper tag-popover-arrow-"+s[0]+" theme-"+s[2]+" svelte-16evpcg")&&P(t,"class",e),o&8&&i!==(i=`background-image: url(${s[3]})`)&&P(t,"style",i)},d(s){s&&X(t)}}}function z7(n){let t,e=n[1]&&Fg(n);return{c(){e&&e.c(),t=Be()},m(i,s){e&&e.m(i,s),Z(i,t,s)},p(i,[s]){i[1]?e?e.p(i,s):(e=Fg(i),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:ce,o:ce,d(i){e&&e.d(i),i&&X(t)}}}function O7(n,t,e){let i,{direction:s="bottom"}=t,{show:o=!0}=t,{theme:r="dark"}=t;return n.$$set=a=>{"direction"in a&&e(0,s=a.direction),"show"in a&&e(1,o=a.show),"theme"in a&&e(2,r=a.theme)},n.$$.update=()=>{n.$$.dirty&5&&e(3,i=(()=>{switch(r){case"dark":switch(s){case"top":return I7;case"bottom":return M7;case"left":return E7;case"right":return k7}case"light":switch(s){case"top":return S7;case"bottom":return x7;case"left":return T7;case"right":return D7}}})())},[s,o,r,i]}class j7 extends Ee{constructor(t){super(),Ie(this,t,O7,z7,Me,{direction:0,show:1,theme:2},L7)}}function R7(n){Le(n,"svelte-1d6rvbz",".icon-container.svelte-1d6rvbz{width:3.25rem;height:3.25rem;background-color:var(--bg-color);border-radius:100%;display:flex;align-items:center;justify-content:center;z-index:2}")}function _7(n){let t,e,i,s,o,r,a,l,c,h;return{c(){t=U("div"),e=Te("svg"),i=Te("defs"),s=Te("linearGradient"),o=Te("stop"),r=Te("stop"),a=Te("linearGradient"),l=Te("stop"),c=Te("stop"),h=Te("path"),P(o,"stop-color",n[1]),P(o,"offset","0%"),P(r,"stop-color",n[1]),P(r,"stop-opacity",".5"),P(r,"offset","100%"),P(s,"x1","53.2804066%"),P(s,"y1","100%"),P(s,"x2","64.4764442%"),P(s,"y2","2.52981206%"),P(s,"id","video-icon-gradient-a"),P(l,"stop-color",n[1]),P(l,"offset","0%"),P(c,"stop-color",n[1]),P(c,"stop-opacity","0"),P(c,"offset","100%"),P(a,"x1","50%"),P(a,"y1","-5.89066117%"),P(a,"x2","60.3018289%"),P(a,"y2","32.0415872%"),P(a,"id","video-icon-gradient-b"),P(h,"d","M8.0883645,5.35 C8.27319183,5.35 8.45426937,5.40368245 8.61098984,5.50477659 L20.4341152,13.1314044 C20.6662958,13.2811749 20.8173539,13.5140616 20.8743923,13.7691613 C20.9300733,14.0181899 20.8962437,14.2885953 20.7601668,14.5243865 L8.61098984,22.4950731 C8.38014238,22.6439836 8.11267156,22.6823641 7.86680489,22.6238045 C7.62023287,22.5650769 7.39563144,22.408984 7.25097187,22.1700998 C7.15226844,22.0071054 7.1,21.8187509 7.1,21.6265526 L7.1,6.37329702 C7.1,6.09035119 7.2108925,5.83405961 7.39059316,5.64859123 C7.56916841,5.46428435 7.81578724,5.35 8.0883645,5.35 Z"),P(h,"fill","url(#video-icon-gradient-a)"),P(h,"fill-rule","nonzero"),P(h,"stroke","url(#video-icon-gradient-b)"),P(h,"stroke-width",".2"),P(e,"xmlns","http://www.w3.org/2000/svg"),P(e,"viewBox","0 0 28 28"),P(e,"width",n[0]),P(e,"height",n[0]),P(t,"class","icon-container svelte-1d6rvbz"),_(t,"--bg-color",n[2])},m(u,d){Z(u,t,d),B(t,e),B(e,i),B(i,s),B(s,o),B(s,r),B(i,a),B(a,l),B(a,c),B(e,h)},p(u,[d]){d&2&&P(o,"stop-color",u[1]),d&2&&P(r,"stop-color",u[1]),d&2&&P(l,"stop-color",u[1]),d&2&&P(c,"stop-color",u[1]),d&1&&P(e,"width",u[0]),d&1&&P(e,"height",u[0]),d&4&&_(t,"--bg-color",u[2])},i:ce,o:ce,d(u){u&&X(t)}}}function V7(n,t,e){let{size:i="28"}=t,{color:s="#ffffff"}=t,{bgColor:o="#0000004d"}=t;return n.$$set=r=>{"size"in r&&e(0,i=r.size),"color"in r&&e(1,s=r.color),"bgColor"in r&&e(2,o=r.bgColor)},[i,s,o]}class _y extends Ee{constructor(t){super(),Ie(this,t,V7,_7,Me,{size:0,color:1,bgColor:2},R7)}}function F7(n){Le(n,"svelte-1d6rvbz",".icon-container.svelte-1d6rvbz{width:3.25rem;height:3.25rem;background-color:var(--bg-color);border-radius:100%;display:flex;align-items:center;justify-content:center;z-index:2}")}function B7(n){let t,e,i,s,o,r,a,l,c,h,u,d,p,m,g,v;return{c(){t=U("div"),e=Te("svg"),i=Te("defs"),s=Te("linearGradient"),o=Te("stop"),r=Te("stop"),a=Te("linearGradient"),l=Te("stop"),c=Te("stop"),h=Te("linearGradient"),u=Te("stop"),d=Te("stop"),p=Te("g"),m=Te("path"),g=Te("path"),v=Te("path"),P(o,"stop-color","#FFF"),P(o,"offset","0%"),P(r,"stop-color","#FFF"),P(r,"stop-opacity",".5"),P(r,"offset","100%"),P(s,"x1","54.417371%"),P(s,"y1","106.742364%"),P(s,"x2","72.619444%"),P(s,"y2","8.15444328%"),P(s,"id","xmfpi7cnc__sgsykm5x9a"),P(l,"stop-color","#FFF"),P(l,"offset","0%"),P(c,"stop-color","#FFF"),P(c,"stop-opacity","0"),P(c,"offset","100%"),P(a,"x1","50%"),P(a,"y1",".73169217%"),P(a,"x2","66.0966077%"),P(a,"y2","34.1694374%"),P(a,"id","xmfpi7cnc__tjqs3iy6kb"),P(u,"stop-color","#FFF"),P(u,"offset","0%"),P(d,"stop-color","#FFF"),P(d,"stop-opacity",".5"),P(d,"offset","100%"),P(h,"x1","55.1256353%"),P(h,"y1","273.650936%"),P(h,"x2","55.1256353%"),P(h,"y2","81.7206937%"),P(h,"id","xmfpi7cnc__rs5hxavsyc"),P(m,"d","M18,5.4 L18,13.4 C18,15.3329966 13.9705627,16.9 9,16.9 C4.02943725,16.9 0,15.3329966 0,13.4 L0,5.4 C0,7.33299662 4.02943725,8.9 9,8.9 C13.8670094,8.9 17.8316983,7.39760831 17.9947813,5.52032488 L18,5.4 Z M4.9603418,4.9 C5.2193418,4.9 5.4643418,4.837 5.6883418,4.704 C6.1293418,4.445 6.4093418,3.976 6.4093418,3.444 C6.4093418,3.003 6.2203418,2.611 5.9053418,2.359 C6.1643418,2.1 6.3393418,1.729 6.3393418,1.337 C6.3393418,1.092 6.2763418,0.861 6.1573418,0.658 C5.9053418,0.245 5.4643418,0 4.9603418,0 C4.7223418,0 4.4983418,0.056 4.2953418,0.175 C3.8753418,0.413 3.6163418,0.84 3.6163418,1.337 L3.6163418,1.372 L4.3373418,1.372 L4.3373418,1.337 C4.3373418,1.022 4.6313418,0.721 4.9603418,0.721 C5.3173418,0.721 5.6113418,1.008 5.6113418,1.337 C5.6113418,1.708 5.3243418,1.995 4.9603418,1.995 L4.8203418,1.995 L4.8203418,2.723 L4.9603418,2.723 C5.3593418,2.723 5.6883418,3.045 5.6883418,3.444 C5.6883418,3.843 5.3593418,4.179 4.9603418,4.179 C4.5613418,4.179 4.2323418,3.843 4.2323418,3.444 L4.2323418,3.339 L3.5043418,3.339 L3.5043418,3.444 C3.5043418,3.71 3.5673418,3.955 3.7003418,4.172 C3.9593418,4.62 4.4283418,4.9 4.9603418,4.9 Z M8.6073418,4.9 C8.8803418,4.9 9.1253418,4.83 9.3563418,4.697 C9.8043418,4.424 10.0983418,3.934 10.0983418,3.395 C10.0983418,3.122 10.0283418,2.877 9.8953418,2.646 C9.6223418,2.198 9.1463418,1.904 8.6073418,1.904 C8.5303418,1.904 8.4743418,1.904 8.4393418,1.911 L9.3143418,0 L8.5093418,0 L7.2353418,2.793 C7.1443418,2.982 7.1023418,3.185 7.1023418,3.395 C7.1023418,3.668 7.1723418,3.92 7.3053418,4.151 C7.5783418,4.606 8.0543418,4.9 8.6073418,4.9 Z M8.6073418,4.158 C8.1803418,4.158 7.8443418,3.822 7.8443418,3.395 C7.8443418,2.975 8.1873418,2.625 8.6073418,2.625 C9.0273418,2.625 9.3773418,2.975 9.3773418,3.395 C9.3773418,3.815 9.0273418,4.158 8.6073418,4.158 Z M12.2613418,4.907 C12.7653418,4.907 13.2133418,4.634 13.4653418,4.207 C13.5913418,3.997 13.6543418,3.766 13.6543418,3.514 L13.6543418,3.514 L13.6543418,1.428 C13.6543418,0.917 13.3813418,0.448 12.9613418,0.189 C12.7443418,0.063 12.5133418,0 12.2613418,0 C11.7503418,0 11.2813418,0.273 11.0293418,0.714 C10.8963418,0.931 10.8333418,1.169 10.8333418,1.428 L10.8333418,1.428 L10.8333418,3.514 C10.8333418,4.018 11.1063418,4.466 11.5473418,4.718 C11.7643418,4.844 12.0023418,4.907 12.2613418,4.907 Z M12.2613418,4.186 C11.8903418,4.186 11.5683418,3.885 11.5683418,3.514 L11.5683418,3.514 L11.5683418,1.428 C11.5683418,1.029 11.8763418,0.735 12.2613418,0.735 C12.6323418,0.735 12.9123418,1.029 12.9123418,1.428 L12.9123418,1.428 L12.9123418,3.514 C12.9123418,3.899 12.6323418,4.186 12.2613418,4.186 Z M15.4753809,2.07333984 C15.7488184,2.07333984 15.9886458,1.97478841 16.1948633,1.77768555 C16.4010807,1.58058268 16.5041895,1.33391927 16.5041895,1.03769531 C16.5041895,0.750585938 16.4050684,0.507340495 16.2068262,0.307958984 C16.008584,0.108577474 15.7647689,0.00888671875 15.4753809,0.00888671875 C15.1928288,0.00888671875 14.9495833,0.109147135 14.7456445,0.309667969 C14.5417057,0.510188802 14.4397363,0.756282552 14.4397363,1.04794922 C14.4397363,1.32138672 14.5365788,1.56064453 14.7302637,1.76572266 C14.9239486,1.97080078 15.172321,2.07333984 15.4753809,2.07333984 Z M15.4753809,1.70078125 C15.2930892,1.70078125 15.137002,1.63583984 15.0071191,1.50595703 C14.8772363,1.37607422 14.8122949,1.22226563 14.8122949,1.04453125 C14.8122949,0.859960938 14.877806,0.703304036 15.0088281,0.574560547 C15.1398503,0.445817057 15.2953678,0.381445313 15.4753809,0.381445313 C15.6553939,0.381445313 15.8097721,0.446386719 15.9385156,0.576269531 C16.0672591,0.706152344 16.1316309,0.859960938 16.1316309,1.03769531 C16.1316309,1.22226563 16.0661198,1.37892253 15.9350977,1.50766602 C15.8040755,1.63640951 15.6508366,1.70078125 15.4753809,1.70078125 Z"),P(m,"fill","url(#xmfpi7cnc__sgsykm5x9a)"),P(m,"transform","translate(3 3.1)"),P(g,"d","M18,5.4 L18,13.4 C18,15.3329966 13.9705627,16.9 9,16.9 C4.02943725,16.9 0,15.3329966 0,13.4 L0,5.4 C0,7.33299662 4.02943725,8.9 9,8.9 C13.8670094,8.9 17.8316983,7.39760831 17.9947813,5.52032488 L18,5.4 Z M17.8,6.499 L17.7806846,6.52607583 C16.6077599,8.0452893 13.108676,9.1 9,9.1 C4.87821133,9.1 1.38089175,8.04047836 0.214303539,6.51942435 L0.2,6.5 L0.2,13.4 C0.2,15.1332693 3.96631253,16.6348245 8.69056715,16.6979358 L9,16.7 C13.8681548,16.7 17.8,15.1709491 17.8,13.4 L17.8,6.499 Z M12.2613418,0 C12.5133418,0 12.7443418,0.063 12.9613418,0.189 C13.3813418,0.448 13.6543418,0.917 13.6543418,1.428 L13.6543418,3.514 L13.6467818,3.66268 C13.6266218,3.85756 13.5661418,4.039 13.4653418,4.207 C13.2133418,4.634 12.7653418,4.907 12.2613418,4.907 C12.0023418,4.907 11.7643418,4.844 11.5473418,4.718 C11.1063418,4.466 10.8333418,4.018 10.8333418,3.514 L10.8333418,1.428 L10.8409578,1.27512 C10.8613418,1.07464 10.9229418,0.8876 11.0293418,0.714 C11.2813418,0.273 11.7503418,0 12.2613418,0 Z M9.3143418,0 L8.4393418,1.911 C8.4743418,1.904 8.5303418,1.904 8.6073418,1.904 C9.1463418,1.904 9.6223418,2.198 9.8953418,2.646 C10.0283418,2.877 10.0983418,3.122 10.0983418,3.395 C10.0983418,3.934 9.8043418,4.424 9.3563418,4.697 C9.1253418,4.83 8.8803418,4.9 8.6073418,4.9 C8.0543418,4.9 7.5783418,4.606 7.3053418,4.151 C7.1723418,3.92 7.1023418,3.668 7.1023418,3.395 C7.1023418,3.185 7.1443418,2.982 7.2353418,2.793 L8.5093418,0 L9.3143418,0 Z M4.9603418,0 C5.4643418,0 5.9053418,0.245 6.1573418,0.658 C6.2763418,0.861 6.3393418,1.092 6.3393418,1.337 C6.3393418,1.729 6.1643418,2.1 5.9053418,2.359 C6.2203418,2.611 6.4093418,3.003 6.4093418,3.444 C6.4093418,3.976 6.1293418,4.445 5.6883418,4.704 C5.4643418,4.837 5.2193418,4.9 4.9603418,4.9 C4.4283418,4.9 3.9593418,4.62 3.7003418,4.172 C3.5673418,3.955 3.5043418,3.71 3.5043418,3.444 L3.5043418,3.339 L4.2323418,3.339 L4.2323418,3.444 C4.2323418,3.843 4.5613418,4.179 4.9603418,4.179 C5.3593418,4.179 5.6883418,3.843 5.6883418,3.444 C5.6883418,3.045 5.3593418,2.723 4.9603418,2.723 L4.8203418,2.723 L4.8203418,1.995 L4.9603418,1.995 C5.3243418,1.995 5.6113418,1.708 5.6113418,1.337 C5.6113418,1.008 5.3173418,0.721 4.9603418,0.721 C4.6313418,0.721 4.3373418,1.022 4.3373418,1.337 L4.3373418,1.372 L3.6163418,1.372 L3.6163418,1.337 C3.6163418,0.84 3.8753418,0.413 4.2953418,0.175 C4.4983418,0.056 4.7223418,0 4.9603418,0 Z M12.2613418,0.2 C11.8228535,0.2 11.4197491,0.433900098 11.199862,0.818512412 C11.0880596,1.00092699 11.0333418,1.20205175 11.0333418,1.428 L11.0333418,3.514 C11.0333418,3.94076817 11.2630074,4.32517296 11.6477689,4.54504221 C11.8340054,4.65317955 12.0373271,4.707 12.2613418,4.707 C12.685768,4.707 13.0724302,4.4792625 13.2938432,4.10410085 C13.4010506,3.92542185 13.4543418,3.73002084 13.4543418,3.514 L13.4543418,1.428 C13.4543418,0.993663172 13.2236099,0.585702454 12.8609147,0.361957789 C12.673578,0.253181671 12.4771013,0.2 12.2613418,0.2 Z M4.9603418,0.2 C4.75293536,0.2 4.56476024,0.248895899 4.39394431,0.349004437 C4.11167513,0.508956972 3.91907748,0.764507622 3.84741774,1.06716925 L3.829,1.171 L4.157,1.171 L4.1635929,1.14325273 C4.24904453,0.829489942 4.53273472,0.571946496 4.86075855,0.527713496 L4.9603418,0.521 C5.42264158,0.521 5.8113418,0.89242465 5.8113418,1.337 C5.8113418,1.78012728 5.4916909,2.13625035 5.06824166,2.18841646 L5.02,2.191 L5.02,2.526 L5.06813812,2.52919506 C5.49271718,2.57829524 5.83232975,2.91371045 5.88206553,3.33657664 L5.8883418,3.444 C5.8883418,3.95419336 5.46908818,4.379 4.9603418,4.379 C4.48793444,4.379 4.09269177,4.01271264 4.03863877,3.55189651 L4.037,3.539 L3.709,3.539 L3.71100539,3.58140766 C3.72435814,3.71571552 3.75785509,3.84083114 3.8121867,3.95771875 L3.87348876,4.07189941 C4.09978468,4.46333019 4.50573915,4.7 4.9603418,4.7 C5.18808795,4.7 5.39698916,4.6443932 5.58705743,4.53154283 C5.97364119,4.30450157 6.2093418,3.89738234 6.2093418,3.444 C6.2093418,3.06849319 6.05147644,2.73203269 5.78040279,2.51517376 L5.60591531,2.37558378 L5.76392044,2.21757864 C5.99772857,1.98377051 6.1393418,1.65985061 6.1393418,1.337 C6.1393418,1.12891147 6.08649325,0.932616859 5.98661394,0.762172929 C5.77036899,0.407771483 5.39348118,0.2 4.9603418,0.2 Z M9.002,0.2 L8.638,0.2 L7.41554213,2.87976312 C7.3587619,2.9976913 7.32347683,3.1241874 7.30938306,3.25833536 L7.3023418,3.395 C7.3023418,3.62951354 7.36137928,3.8474981 7.47684038,4.04810085 C7.72111603,4.45522692 8.1383802,4.7 8.6073418,4.7 C8.83989632,4.7 9.05100342,4.64201988 9.25226776,4.52621184 C9.649754,4.28399367 9.8983418,3.85400396 9.8983418,3.395 C9.8983418,3.16244548 9.84036168,2.95133838 9.72455364,2.75007403 C9.48026964,2.34919774 9.06277079,2.104 8.6073418,2.104 L8.51445661,2.10475811 C8.49442789,2.10527049 8.48389809,2.10604952 8.47856502,2.10711614 L8.0943966,2.18394982 L8.25749731,1.82773787 L9.002,0.2 Z M12.2613418,0.535 C12.7468356,0.535 13.1123418,0.922491584 13.1123418,1.428 L13.1123418,3.514 C13.1123418,4.00744192 12.7448365,4.386 12.2613418,4.386 C11.7777279,4.386 11.3683418,3.99355405 11.3683418,3.514 L11.3683418,1.428 C11.3683418,0.922753743 11.7615956,0.535 12.2613418,0.535 Z M8.6073418,2.425 C9.13779875,2.425 9.5773418,2.86454305 9.5773418,3.395 C9.5773418,3.92471151 9.13856864,4.358 8.6073418,4.358 C8.06988485,4.358 7.6443418,3.93245695 7.6443418,3.395 C7.6443418,2.86377316 8.07763029,2.425 8.6073418,2.425 Z M12.2613418,0.735 C11.8763418,0.735 11.5683418,1.029 11.5683418,1.428 L11.5683418,3.514 L11.5761202,3.61327273 C11.6272922,3.93723967 11.9240691,4.186 12.2613418,4.186 C12.6323418,4.186 12.9123418,3.899 12.9123418,3.514 L12.9123418,1.428 L12.9055416,1.32192712 C12.8606806,0.977975207 12.5986145,0.735 12.2613418,0.735 Z M8.6073418,2.625 C8.1873418,2.625 7.8443418,2.975 7.8443418,3.395 C7.8443418,3.822 8.1803418,4.158 8.6073418,4.158 C9.0273418,4.158 9.3773418,3.815 9.3773418,3.395 C9.3773418,2.975 9.0273418,2.625 8.6073418,2.625 Z M15.4753809,0.00888671875 C15.7647689,0.00888671875 16.008584,0.108577474 16.2068262,0.307958984 C16.4050684,0.507340495 16.5041895,0.750585938 16.5041895,1.03769531 C16.5041895,1.33391927 16.4010807,1.58058268 16.1948633,1.77768555 C15.9886458,1.97478841 15.7488184,2.07333984 15.4753809,2.07333984 C15.172321,2.07333984 14.9239486,1.97080078 14.7302637,1.76572266 C14.5365788,1.56064453 14.4397363,1.32138672 14.4397363,1.04794922 C14.4397363,0.756282552 14.5417057,0.510188802 14.7456445,0.309667969 C14.9495833,0.109147135 15.1928288,0.00888671875 15.4753809,0.00888671875 Z M15.4753809,0.381445313 C15.2953678,0.381445313 15.1398503,0.445817057 15.0088281,0.574560547 C14.877806,0.703304036 14.8122949,0.859960938 14.8122949,1.04453125 C14.8122949,1.22226563 14.8772363,1.37607422 15.0071191,1.50595703 C15.137002,1.63583984 15.2930892,1.70078125 15.4753809,1.70078125 C15.6508366,1.70078125 15.8040755,1.63640951 15.9350977,1.50766602 C16.0661198,1.37892253 16.1316309,1.22226563 16.1316309,1.03769531 C16.1316309,0.859960938 16.0672591,0.706152344 15.9385156,0.576269531 C15.8097721,0.446386719 15.6553939,0.381445313 15.4753809,0.381445313 Z"),P(g,"fill","url(#xmfpi7cnc__tjqs3iy6kb)"),P(g,"transform","translate(3 3.1)"),P(v,"d","M3.00030998,2.79110119 L3.00030998,8.00889881 C1.15888197,7.36802147 0,6.43664128 0,5.4 C0,4.36335872 1.15888197,3.43197853 3.00030998,2.79110119 Z M15.0006975,2.79145187 C16.8415407,3.43231826 18,4.36354778 18,5.4 C18,6.43645222 16.8415407,7.36768174 15.0006975,8.00854813 Z"),P(v,"fill","url(#xmfpi7cnc__rs5hxavsyc)"),P(v,"transform","translate(3 3.1)"),P(p,"fill-rule","nonzero"),P(p,"fill","none"),P(e,"xmlns","http://www.w3.org/2000/svg"),P(e,"viewBox","0 0 24 24"),P(e,"width",n[0]),P(e,"height",n[0]),P(t,"class","icon-container svelte-1d6rvbz"),_(t,"--bg-color",n[1])},m(y,w){Z(y,t,w),B(t,e),B(e,i),B(i,s),B(s,o),B(s,r),B(i,a),B(a,l),B(a,c),B(i,h),B(h,u),B(h,d),B(e,p),B(p,m),B(p,g),B(p,v)},p(y,[w]){w&1&&P(e,"width",y[0]),w&1&&P(e,"height",y[0]),w&2&&_(t,"--bg-color",y[1])},i:ce,o:ce,d(y){y&&X(t)}}}function H7(n,t,e){let{size:i="28"}=t,{color:s="#ffffff"}=t,{bgColor:o="#0000004d"}=t;return n.$$set=r=>{"size"in r&&e(0,i=r.size),"color"in r&&e(2,s=r.color),"bgColor"in r&&e(1,o=r.bgColor)},[i,o,s]}class N7 extends Ee{constructor(t){super(),Ie(this,t,H7,B7,Me,{size:0,color:2,bgColor:1},F7)}}function G7(n){Le(n,"svelte-16y5k2u",".pano-tag-audio-popup-inline-player-wrapper.svelte-16y5k2u{width:100%;height:1.75rem;background-color:rgba(255, 255, 255, 0.06);border-radius:0.125rem;display:flex;align-items:center;cursor:pointer}.pano-tag-audio-popup-inline-player-icon.svelte-16y5k2u{width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;flex-shrink:0}.pano-tag-audio-popup-inline-player-progress.svelte-16y5k2u{flex-grow:1;display:flex;position:relative;height:100%;align-items:center}.pano-tag-audio-popup-inline-player-progress-bar.svelte-16y5k2u{width:0;height:100%;background:linear-gradient(to right, rgba(238, 238, 238, 0) 0, rgba(216, 216, 216, 0.3) 100%);position:absolute;top:0;left:0;z-index:0}.pano-tag-audio-popup-inline-player-elapsed-time.svelte-16y5k2u{position:absolute;z-index:1;font-weight:500;font-size:0.875rem;color:#ffffff;line-height:1.25rem;padding-left:0.25rem}")}function W7(n){let t,e,i,s,o,r,a,l,c,h,u,d;return i=new Kl({props:{playing:n[0],width:24}}),{c(){t=U("div"),e=U("div"),ge(i.$$.fragment),s=ue(),o=U("div"),r=U("div"),a=ue(),l=U("div"),c=Fe(n[1]),P(e,"class","pano-tag-audio-popup-inline-player-icon svelte-16y5k2u"),P(r,"class","pano-tag-audio-popup-inline-player-progress-bar svelte-16y5k2u"),_(r,"width",n[2]+"%"),P(l,"class","pano-tag-audio-popup-inline-player-elapsed-time svelte-16y5k2u"),P(o,"class","pano-tag-audio-popup-inline-player-progress svelte-16y5k2u"),P(t,"class","pano-tag-audio-popup-inline-player-wrapper svelte-16y5k2u")},m(p,m){Z(p,t,m),B(t,e),pe(i,e,null),B(t,s),B(t,o),B(o,r),B(o,a),B(o,l),B(l,c),h=!0,u||(d=_e(t,"click",Uv(function(){vi(n[3])&&n[3].apply(this,arguments)})),u=!0)},p(p,[m]){n=p;const g={};m&1&&(g.playing=n[0]),i.$set(g),(!h||m&4)&&_(r,"width",n[2]+"%"),(!h||m&2)&&Ne(c,n[1])},i(p){h||(H(i.$$.fragment,p),h=!0)},o(p){Y(i.$$.fragment,p),h=!1},d(p){p&&X(t),me(i),u=!1,d()}}}function U7(n,t,e){let{playing:i=!1}=t,{elapsedTime:s="00:00"}=t,{progress:o=0}=t,{onClick:r=()=>{}}=t;return n.$$set=a=>{"playing"in a&&e(0,i=a.playing),"elapsedTime"in a&&e(1,s=a.elapsedTime),"progress"in a&&e(2,o=a.progress),"onClick"in a&&e(3,r=a.onClick)},[i,s,o,r]}class Q7 extends Ee{constructor(t){super(),Ie(this,t,U7,W7,Me,{playing:0,elapsedTime:1,progress:2,onClick:3},G7)}}function X7(n){Le(n,"svelte-817q8q",'@charset "UTF-8";.tag-popup.svelte-817q8q.svelte-817q8q.svelte-817q8q{position:absolute;pointer-events:auto;padding:0.625rem 0.625rem 0.625rem 1.125rem;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content;transform-origin:center}.tag-popup-top.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(-50%, -100%);left:50%}.tag-popup-bottom.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(-50%, 0);left:50%}.tag-popup-left.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(-100%, -50%);top:50%}.tag-popup-right.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(0, -50%);top:50%}.tag-popup-top-left.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(calc(2.625rem - 100%), -100%)}.tag-popup-top-right.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(-2.625rem, -100%)}.tag-popup-bottom-left.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(calc(2.625rem - 100%), 0)}.tag-popup-bottom-right.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(-2.625rem, 0)}.tag-popup-left-top.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(-100%, -2.625rem)}.tag-popup-left-bottom.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(-100%, calc(2.625rem - 100%))}.tag-popup-right-top.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(0, -2.625rem)}.tag-popup-right-bottom.svelte-817q8q.svelte-817q8q.svelte-817q8q{transform:translate(0, calc(2.625rem - 100%))}.tag-popup-content.svelte-817q8q.svelte-817q8q.svelte-817q8q{position:relative;pointer-events:auto;cursor:pointer;padding:1.25rem;border-radius:0.375rem;max-width:17.5rem;width:17.5rem;background:rgba(0, 0, 0, 0.7490196078)}.tag-popup-top.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q,.tag-popup-top-left.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q,.tag-popup-top-right.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q{box-shadow:0.03125rem 0 0 0 rgba(255, 255, 255, 0.3), -0.03125rem 0 0 0 rgba(255, 255, 255, 0.3)}.tag-popup-bottom.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q,.tag-popup-bottom-left.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q,.tag-popup-bottom-right.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q{box-shadow:0.03125rem 0 0 0 rgba(255, 255, 255, 0.3), -0.03125rem 0 0 0 rgba(255, 255, 255, 0.3)}.tag-popup-left.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q,.tag-popup-left-top.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q,.tag-popup-left-bottom.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q{box-shadow:0 0.03125rem 0 0 rgba(255, 255, 255, 0.3), 0 -0.03125rem 0 0 rgba(255, 255, 255, 0.3)}.tag-popup-right.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q,.tag-popup-right-top.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q,.tag-popup-right-bottom.svelte-817q8q .tag-popup-content.svelte-817q8q.svelte-817q8q{box-shadow:0 0.03125rem 0 0 rgba(255, 255, 255, 0.3), 0 -0.03125rem 0 0 rgba(255, 255, 255, 0.3)}.light.svelte-817q8q.svelte-817q8q.svelte-817q8q{background:#ffffff}.tag-popup-title.svelte-817q8q.svelte-817q8q.svelte-817q8q{margin:0;font-size:1rem;font-weight:600;line-height:1.375rem;letter-spacing:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;color:#ffffff}.light.svelte-817q8q .tag-popup-title.svelte-817q8q.svelte-817q8q{color:rgba(0, 0, 0, 0.8509803922)}.tag-popup-description.svelte-817q8q.svelte-817q8q.svelte-817q8q{margin:0;font-size:0.875rem;font-weight:400;color:#ffffff;line-height:1.25rem;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;max-height:5rem;overflow:hidden;word-wrap:break-word;word-break:break-word;text-overflow:ellipsis;white-space:pre-wrap}.light.svelte-817q8q .tag-popup-description.svelte-817q8q.svelte-817q8q{color:rgba(0, 0, 0, 0.8509803922)}.tag-popup-tags.svelte-817q8q.svelte-817q8q.svelte-817q8q{display:flex;align-items:center;margin:0;margin-bottom:0}.tag-popup-tags.svelte-817q8q .tag-popup-tag.svelte-817q8q+.tag-popup-tag.svelte-817q8q{margin-left:0.25rem}.tag-popup-tag.svelte-817q8q.svelte-817q8q.svelte-817q8q{padding:0.125rem 0.25rem;display:flex;align-items:center;justify-content:center;border-radius:0.25rem;font-size:0.75rem;line-height:1.125rem;letter-spacing:0;border-radius:0.125rem;max-width:7.5rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tag-popup-tag-primary.svelte-817q8q.svelte-817q8q.svelte-817q8q{color:#ffffff;background-image:linear-gradient(90deg, #ead09a 0%, #e0cca3 100%)}.light.svelte-817q8q .tag-popup-tag-primary.svelte-817q8q.svelte-817q8q{color:#946700;background-image:linear-gradient(90deg, #ead09a 0%, #e0cca3 100%)}.tag-popup-tag-secondary.svelte-817q8q.svelte-817q8q.svelte-817q8q{color:#ffffff;background:rgba(255, 255, 255, 0.1490196078)}.light.svelte-817q8q .tag-popup-tag-secondary.svelte-817q8q.svelte-817q8q{color:rgba(0, 0, 0, 0.5019607843);background:rgba(0, 0, 0, 0.0588235294)}.tag-popup-price.svelte-817q8q.svelte-817q8q.svelte-817q8q{font-family:DINAlternate-Bold;font-weight:700;font-size:1.25rem;color:#ae7900;letter-spacing:0;text-align:center;display:flex;justify-content:flex-start;align-items:center;width:100%;margin:0}.tag-popup-media.svelte-817q8q.svelte-817q8q.svelte-817q8q{width:15rem;height:10rem;margin:0 auto;overflow:hidden;border-radius:0.25rem;display:flex;align-items:center;justify-content:center;position:relative}.tag-popup-media.svelte-817q8q img.svelte-817q8q.svelte-817q8q{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;display:block}.tag-popup-media-type.svelte-817q8q.svelte-817q8q.svelte-817q8q{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);z-index:2}.tag-popup-media-index.svelte-817q8q.svelte-817q8q.svelte-817q8q{position:absolute;right:0.375rem;bottom:0.375rem;padding:0.0625rem 0.25rem;background:rgba(0, 0, 0, 0.5);border-radius:0.125rem;font-weight:bold;font-size:0.75rem;color:#ffffff;letter-spacing:0;line-height:1.125rem}.iframe-overlay.svelte-817q8q.svelte-817q8q.svelte-817q8q{position:absolute;top:0;left:0;width:100%;height:100%;background:transparent;z-index:10}.tag-popup-content.svelte-817q8q>.svelte-817q8q+.svelte-817q8q{margin-top:0.5rem}.tag-popup-content.svelte-817q8q>.svelte-817q8q.svelte-817q8q:first-child{margin-top:0 !important}')}const Y7=n=>({}),Bg=n=>({}),Z7=n=>({}),Hg=n=>({});function Ng(n,t,e){const i=n.slice();return i[2]=t[e],i}function Gg(n,t,e){const i=n.slice();return i[2]=t[e],i}function Wg(n){let t,e;return{c(){t=U("h3"),e=Fe(n[5]),P(t,"class","tag-popup-title svelte-817q8q")},m(i,s){Z(i,t,s),B(t,e)},p(i,s){s[0]&32&&Ne(e,i[5])},d(i){i&&X(t)}}}function Ug(n){let t,e,i=n[4],s=[];for(let a=0;a<i.length;a+=1)s[a]=Qg(Gg(n,i,a));let o=n[13],r=[];for(let a=0;a<o.length;a+=1)r[a]=Xg(Ng(n,o,a));return{c(){t=U("div");for(let a=0;a<s.length;a+=1)s[a].c();e=ue();for(let a=0;a<r.length;a+=1)r[a].c();P(t,"class","tag-popup-tags svelte-817q8q")},m(a,l){Z(a,t,l);for(let c=0;c<s.length;c+=1)s[c]&&s[c].m(t,null);B(t,e);for(let c=0;c<r.length;c+=1)r[c]&&r[c].m(t,null)},p(a,l){if(l[0]&16){i=a[4];let c;for(c=0;c<i.length;c+=1){const h=Gg(a,i,c);s[c]?s[c].p(h,l):(s[c]=Qg(h),s[c].c(),s[c].m(t,e))}for(;c<s.length;c+=1)s[c].d(1);s.length=i.length}if(l[0]&8192){o=a[13];let c;for(c=0;c<o.length;c+=1){const h=Ng(a,o,c);r[c]?r[c].p(h,l):(r[c]=Xg(h),r[c].c(),r[c].m(t,null))}for(;c<r.length;c+=1)r[c].d(1);r.length=o.length}},d(a){a&&X(t),Ti(s,a),Ti(r,a)}}}function Qg(n){let t,e=n[2]+"",i;return{c(){t=U("div"),i=Fe(e),P(t,"class","tag-popup-tag tag-popup-tag-primary svelte-817q8q")},m(s,o){Z(s,t,o),B(t,i)},p(s,o){o[0]&16&&e!==(e=s[2]+"")&&Ne(i,e)},d(s){s&&X(t)}}}function Xg(n){let t,e=n[2]+"",i;return{c(){t=U("div"),i=Fe(e),P(t,"class","tag-popup-tag tag-popup-tag-secondary svelte-817q8q")},m(s,o){Z(s,t,o),B(t,i)},p(s,o){o[0]&8192&&e!==(e=s[2]+"")&&Ne(i,e)},d(s){s&&X(t)}}}function q7(n){let t,e,i,s,o,r,a,l;r=new _y({});let c=n[15]>1&&Yg(n);return{c(){t=U("div"),e=U("video"),s=ue(),o=U("div"),ge(r.$$.fragment),a=ue(),c&&c.c(),at(e.src,i=n[2].data.mediaData[0].url)||P(e,"src",i),P(e,"class","tag-popup-video-fallback"),e.controls=!1,e.autoplay=!1,e.muted=!0,e.loop=!0,P(e,"preload","metadata"),P(e,"disablepictureinpicture",""),e.playsInline=!0,_(e,"width","100%"),_(e,"height","100%"),_(e,"object-fit","cover"),P(o,"class","tag-popup-media-type svelte-817q8q"),P(t,"class","tag-popup-media svelte-817q8q")},m(h,u){Z(h,t,u),B(t,e),B(t,s),B(t,o),pe(r,o,null),B(t,a),c&&c.m(t,null),l=!0},p(h,u){(!l||u[0]&4&&!at(e.src,i=h[2].data.mediaData[0].url))&&P(e,"src",i),h[15]>1?c?c.p(h,u):(c=Yg(h),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},i(h){l||(H(r.$$.fragment,h),l=!0)},o(h){Y(r.$$.fragment,h),l=!1},d(h){h&&X(t),me(r),c&&c.d()}}}function J7(n){let t,e,i,s,o,r,a,l,c;const h=[e6,$7],u=[];function d(m,g){return m[7]?0:m[18]?1:-1}~(r=d(n))&&(a=u[r]=h[r](n));let p=n[15]>1&&Zg(n);return{c(){t=U("div"),e=U("img"),o=ue(),a&&a.c(),l=ue(),p&&p.c(),at(e.src,i=n[19])||P(e,"src",i),P(e,"alt",s=n[5]||""),P(e,"draggable","false"),P(e,"class","svelte-817q8q"),P(t,"class","tag-popup-media svelte-817q8q")},m(m,g){Z(m,t,g),B(t,e),B(t,o),~r&&u[r].m(t,null),B(t,l),p&&p.m(t,null),c=!0},p(m,g){(!c||g[0]&524288&&!at(e.src,i=m[19]))&&P(e,"src",i),(!c||g[0]&32&&s!==(s=m[5]||""))&&P(e,"alt",s);let v=r;r=d(m),r!==v&&(a&&(xe(),Y(u[v],1,1,()=>{u[v]=null}),Se()),~r?(a=u[r],a||(a=u[r]=h[r](m),a.c()),H(a,1),a.m(t,l)):a=null),m[15]>1?p?p.p(m,g):(p=Zg(m),p.c(),p.m(t,null)):p&&(p.d(1),p=null)},i(m){c||(H(a),c=!0)},o(m){Y(a),c=!1},d(m){m&&X(t),~r&&u[r].d(),p&&p.d()}}}function K7(n){let t,e,i,s,o,r,a=n[15]>1&&qg(n);return{c(){t=U("div"),e=U("iframe"),s=ue(),o=U("div"),r=ue(),a&&a.c(),P(e,"title",n[16]),at(e.src,i=n[17])||P(e,"src",i),P(e,"class","tag-popup-video-iframe"),P(e,"frameborder","0"),P(e,"allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"),P(e,"referrerpolicy","strict-origin-when-cross-origin"),e.allowFullscreen=!0,_(e,"width","100%"),_(e,"height","100%"),_(e,"position","absolute"),_(e,"top","0"),_(e,"left","0"),P(o,"class","iframe-overlay svelte-817q8q"),P(t,"class","tag-popup-media svelte-817q8q")},m(l,c){Z(l,t,c),B(t,e),B(t,s),B(t,o),B(t,r),a&&a.m(t,null)},p(l,c){c[0]&65536&&P(e,"title",l[16]),c[0]&131072&&!at(e.src,i=l[17])&&P(e,"src",i),l[15]>1?a?a.p(l,c):(a=qg(l),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},i:ce,o:ce,d(l){l&&X(t),a&&a.d()}}}function Yg(n){let t,e,i,s;return{c(){t=U("div"),e=Fe(n[14]),i=Fe("/"),s=Fe(n[15]),P(t,"class","tag-popup-media-index svelte-817q8q")},m(o,r){Z(o,t,r),B(t,e),B(t,i),B(t,s)},p(o,r){r[0]&16384&&Ne(e,o[14]),r[0]&32768&&Ne(s,o[15])},d(o){o&&X(t)}}}function $7(n){let t,e,i;return e=new N7({}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","tag-popup-media-type svelte-817q8q")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function e6(n){let t,e,i;return e=new _y({}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","tag-popup-media-type svelte-817q8q")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function Zg(n){let t,e,i,s;return{c(){t=U("div"),e=Fe(n[14]),i=Fe("/"),s=Fe(n[15]),P(t,"class","tag-popup-media-index svelte-817q8q")},m(o,r){Z(o,t,r),B(t,e),B(t,i),B(t,s)},p(o,r){r[0]&16384&&Ne(e,o[14]),r[0]&32768&&Ne(s,o[15])},d(o){o&&X(t)}}}function qg(n){let t,e,i,s;return{c(){t=U("div"),e=Fe(n[14]),i=Fe("/"),s=Fe(n[15]),P(t,"class","tag-popup-media-index svelte-817q8q")},m(o,r){Z(o,t,r),B(t,e),B(t,i),B(t,s)},p(o,r){r[0]&16384&&Ne(e,o[14]),r[0]&32768&&Ne(s,o[15])},d(o){o&&X(t)}}}function Jg(n){let t,e;return{c(){t=U("div"),e=Fe(n[20]),P(t,"class","tag-popup-description svelte-817q8q")},m(i,s){Z(i,t,s),B(t,e)},p(i,s){s[0]&1048576&&Ne(e,i[20])},d(i){i&&X(t)}}}function Kg(n){let t,e,i;return e=new Q7({props:{playing:n[1],progress:n[9],elapsedTime:n[10],onClick:n[22]}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","tag-popup-audio-player-wrapper svelte-817q8q")},m(s,o){Z(s,t,o),pe(e,t,null),i=!0},p(s,o){const r={};o[0]&2&&(r.playing=s[1]),o[0]&512&&(r.progress=s[9]),o[0]&1024&&(r.elapsedTime=s[10]),e.$set(r)},i(s){i||(H(e.$$.fragment,s),i=!0)},o(s){Y(e.$$.fragment,s),i=!1},d(s){s&&X(t),me(e)}}}function $g(n){let t,e,i,s,o=n[11]&&e0(n);return{c(){t=U("div"),o&&o.c(),e=ue(),i=U("span"),s=Fe(n[12]),P(i,"class","tag-popup-price-value"),P(t,"class","tag-popup-price svelte-817q8q")},m(r,a){Z(r,t,a),o&&o.m(t,null),B(t,e),B(t,i),B(i,s)},p(r,a){r[11]?o?o.p(r,a):(o=e0(r),o.c(),o.m(t,e)):o&&(o.d(1),o=null),a[0]&4096&&Ne(s,r[12])},d(r){r&&X(t),o&&o.d()}}}function e0(n){let t,e;return{c(){t=U("span"),e=Fe(n[11]),P(t,"class","tag-popup-price-unit")},m(i,s){Z(i,t,s),B(t,e)},p(i,s){s[0]&2048&&Ne(e,i[11])},d(i){i&&X(t)}}}function t6(n){let t,e,i,s,o,r,a,l,c,h,u,d,p,m,g=n[5]&&Wg(n),v=n[3]&&(n[4].length>0||n[13].length>0)&&Ug(n);const y=[K7,J7,q7],w=[];function C(M,I){var k;return M[6]&&M[17]?0:M[19]?1:M[7]&&M[2].data.mediaData&&((k=M[2].data.mediaData[0])!=null&&k.url)?2:-1}~(o=C(n))&&(r=w[o]=y[o](n));let E=n[20]&&Jg(n),D=n[8]&&Kg(n),L=n[12]&&$g(n);const R=n[38].toolbar,z=hs(R,n,n[37],Hg),O=n[38].arrow,A=hs(O,n,n[37],Bg);return{c(){t=U("div"),e=U("div"),g&&g.c(),i=ue(),v&&v.c(),s=ue(),r&&r.c(),a=ue(),E&&E.c(),l=ue(),D&&D.c(),c=ue(),L&&L.c(),h=ue(),z&&z.c(),u=ue(),A&&A.c(),P(e,"class",d="tag-popup-content "+n[21]+" svelte-817q8q"),P(t,"class",p="tag-popup tag-popup-"+n[0]+" svelte-817q8q")},m(M,I){Z(M,t,I),B(t,e),g&&g.m(e,null),B(e,i),v&&v.m(e,null),B(e,s),~o&&w[o].m(e,null),B(e,a),E&&E.m(e,null),B(e,l),D&&D.m(e,null),B(e,c),L&&L.m(e,null),B(e,h),z&&z.m(e,null),B(e,u),A&&A.m(e,null),m=!0},p(M,I){M[5]?g?g.p(M,I):(g=Wg(M),g.c(),g.m(e,i)):g&&(g.d(1),g=null),M[3]&&(M[4].length>0||M[13].length>0)?v?v.p(M,I):(v=Ug(M),v.c(),v.m(e,s)):v&&(v.d(1),v=null);let k=o;o=C(M),o===k?~o&&w[o].p(M,I):(r&&(xe(),Y(w[k],1,1,()=>{w[k]=null}),Se()),~o?(r=w[o],r?r.p(M,I):(r=w[o]=y[o](M),r.c()),H(r,1),r.m(e,a)):r=null),M[20]?E?E.p(M,I):(E=Jg(M),E.c(),E.m(e,l)):E&&(E.d(1),E=null),M[8]?D?(D.p(M,I),I[0]&256&&H(D,1)):(D=Kg(M),D.c(),H(D,1),D.m(e,c)):D&&(xe(),Y(D,1,1,()=>{D=null}),Se()),M[12]?L?L.p(M,I):(L=$g(M),L.c(),L.m(e,h)):L&&(L.d(1),L=null),z&&z.p&&(!m||I[1]&64)&&ds(z,R,M,M[37],m?us(R,M[37],I,Z7):fs(M[37]),Hg),A&&A.p&&(!m||I[1]&64)&&ds(A,O,M,M[37],m?us(O,M[37],I,Y7):fs(M[37]),Bg),(!m||I[0]&2097152&&d!==(d="tag-popup-content "+M[21]+" svelte-817q8q"))&&P(e,"class",d),(!m||I[0]&1&&p!==(p="tag-popup tag-popup-"+M[0]+" svelte-817q8q"))&&P(t,"class",p)},i(M){m||(H(r),H(D),H(z,M),H(A,M),m=!0)},o(M){Y(r),Y(D),Y(z,M),Y(A,M),m=!1},d(M){M&&X(t),g&&g.d(),v&&v.d(),~o&&w[o].d(),E&&E.d(),D&&D.d(),L&&L.d(),z&&z.d(M),A&&A.d(M)}}}function i6(n){const t=Math.floor(n/60),e=Math.floor(n%60);return`${t.toString().padStart(2,"0")}:${e.toString().padStart(2,"0")}`}function n6(n,t,e){let i,s,o,r,a,l,c,h,u,d,p,m,g,v,y,w,C,E,D,L,R,z,O,A,M,I,{$$slots:k={},$$scope:x}=t,{tag:S}=t,{config:j={}}=t,{theme:F=void 0}=t,{placement:J="right-top"}=t,{audioInstance:ne=null}=t,{audioPlaying:q=!1}=t,{audioCurrentTime:oe=0}=t,{audioDuration:se=0}=t,ae=0,ze="00:00",ee=null,we=0,le=0;function he(){return se>0?oe/se*100:0}function be(){if(!q||se<=0){ee=null;return}const De=(Date.now()-we)/1e3,ve=oe+De,Oe=Math.min(ve/se*100,100)-le;Math.abs(Oe)>.05&&(le+=Oe*.2),ee=requestAnimationFrame(be)}function te(){if(!s)return;const ye=he();se>0?(q||(le=ye),e(9,ae=le),e(10,ze=i6(le/100*se)),we=Date.now()):(le=0,e(9,ae=0),e(10,ze="00:00"))}function ke(){q&&se>0?ee||be():ee&&(cancelAnimationFrame(ee),ee=null)}function Re(){ne&&(ne.paused?ne.play():ne.pause())}return Kt(()=>{ee&&(cancelAnimationFrame(ee),ee=null)}),n.$$set=ye=>{"tag"in ye&&e(2,S=ye.tag),"config"in ye&&e(23,j=ye.config),"theme"in ye&&e(24,F=ye.theme),"placement"in ye&&e(0,J=ye.placement),"audioInstance"in ye&&e(25,ne=ye.audioInstance),"audioPlaying"in ye&&e(1,q=ye.audioPlaying),"audioCurrentTime"in ye&&e(26,oe=ye.audioCurrentTime),"audioDuration"in ye&&e(27,se=ye.audioDuration),"$$scope"in ye&&e(37,x=ye.$$scope)},n.$$.update=()=>{var ye,De,ve,Ae,Oe,Ye;n.$$.dirty[0]&4&&e(3,i=S.contentType==="Marketing"),n.$$.dirty[0]&4&&e(8,s=S.contentType==="Audio"),n.$$.dirty[0]&8&&e(36,o=i?"light":"dark"),n.$$.dirty[0]&16777220|n.$$.dirty[1]&32&&e(21,r=S.data.theme!==void 0&&S.data.theme!==null?S.data.theme:F!=null?F:o),n.$$.dirty[0]&4&&e(35,a=S.data.title||S.data.name||""),n.$$.dirty[0]&4&&e(34,l=S.data.description||S.data.tooltip||""),n.$$.dirty[1]&16&&e(5,c=a||""),n.$$.dirty[1]&8&&e(20,h=l||""),n.$$.dirty[0]&201326594&&te(),n.$$.dirty[0]&134217730&&ke(),n.$$.dirty[0]&268&&e(33,u=(()=>{var Ze,ot,Ke,et,lt,ht,Ft,Zi,Ut,li,Ai;if(s||i)return null;if(S.data.mediaData&&S.data.mediaData.length>0){const ut=S.data.mediaData[0];if(ut.type==="Video"){if(ut.videoCoverUrl)return ut.videoCoverUrl;if(ut.url){const Qt=ut.url.toLowerCase();if(Ph(Qt)){const Xt=Z1(Qt);if(Xt)return`https://img.youtube.com/vi/${Xt}/hqdefault.jpg`}if(Ch(Qt)){const Xt=q1(Qt);if(Xt)return`https://vumbnail.com/${Xt}.jpg`}return}}if(S.contentType==="Panorama")return(Ai=(Ft=(Ke=(ot=(Ze=S.data.mediaData)==null?void 0:Ze[0])==null?void 0:ot.cube)==null?void 0:Ke.front)!=null?Ft:(ht=(lt=(et=S.data.mediaData)==null?void 0:et[0])==null?void 0:lt.thumbnail)==null?void 0:ht.split("?")[0])!=null?Ai:(li=(Ut=(Zi=S.data.mediaData)==null?void 0:Zi[0])==null?void 0:Ut.url)==null?void 0:li.split("?")[0];if(ut.url||ut.thumbnail)return ut.url||ut.thumbnail}return S.data.imageUrl})()),n.$$.dirty[0]&8388612|n.$$.dirty[1]&4&&e(19,d=j!=null&&j.imageURLTransform&&(u!=null&&u.includes("realsee-cdn")||u!=null&&u.includes("ljcdn.com"))?j.imageURLTransform(u,{width:280,height:280}):u||S.data.mediaUrl||""),n.$$.dirty[0]&4&&e(7,p=S.contentType==="Video"||S.data.mediaType==="video"),n.$$.dirty[0]&4&&e(18,m=S.contentType==="Panorama"||S.data.mediaType==="panorama"),n.$$.dirty[0]&132&&e(32,g=p&&S.data.mediaData&&((ye=S.data.mediaData[0])==null?void 0:ye.url)&&Ph(S.data.mediaData[0].url)),n.$$.dirty[0]&132&&e(31,v=p&&S.data.mediaData&&((De=S.data.mediaData[0])==null?void 0:De.url)&&Ch(S.data.mediaData[0].url)),n.$$.dirty[1]&3&&e(6,y=g||v),n.$$.dirty[0]&68&&e(17,w=y&&S.data.mediaData&&((ve=S.data.mediaData[0])!=null&&ve.url)?x4(S.data.mediaData[0].url,{autoplay:0}):""),n.$$.dirty[0]&32|n.$$.dirty[1]&3&&e(16,C=g?"YouTube video player":v?"Vimeo video player":c),n.$$.dirty[0]&4&&e(15,E=((Ae=S.data.mediaData)==null?void 0:Ae.length)||0),n.$$.dirty[0]&12&&e(30,L=i?S.data.brandTags||[]:[]),n.$$.dirty[0]&12&&e(29,R=i?S.data.tags||[]:[]),n.$$.dirty[0]&1073741824&&e(4,z=L.filter(Boolean).slice(0,2)),n.$$.dirty[0]&16&&e(28,O=Math.max(0,2-z.length)),n.$$.dirty[0]&805306368&&e(13,A=O>0?R.filter(Boolean).slice(0,O):[]),n.$$.dirty[0]&12&&e(12,M=i&&((Oe=S.data.price)==null?void 0:Oe.value)||""),n.$$.dirty[0]&12&&e(11,I=i&&((Ye=S.data.price)==null?void 0:Ye.unit)||"")},e(14,D=1),[J,q,S,i,z,c,y,p,s,ae,ze,I,M,A,D,E,C,w,m,d,h,r,Re,j,F,ne,oe,se,O,R,L,v,g,u,l,a,o,x,k]}class s6 extends Ee{constructor(t){super(),Ie(this,t,n6,t6,Me,{tag:2,config:23,theme:24,placement:0,audioInstance:25,audioPlaying:1,audioCurrentTime:26,audioDuration:27},X7,[-1,-1])}}function o6(n){let t,e,i,s,o,r,a,l,c,h,u,d,p;return{c(){t=Te("svg"),e=Te("defs"),i=Te("linearGradient"),s=Te("stop"),o=Te("stop"),a=Te("linearGradient"),l=Te("stop"),c=Te("stop"),u=Te("path"),P(s,"stop-color",n[1]),P(s,"offset","0%"),P(o,"stop-color",n[1]),P(o,"stop-opacity",".5"),P(o,"offset","100%"),P(i,"id",r="arrow-right-icon-gradient-"+n[1]),P(i,"x1","96.2%"),P(i,"y1","50%"),P(i,"x2","0%"),P(i,"y2","50%"),P(l,"stop-color",n[1]),P(l,"offset","0%"),P(c,"stop-color",n[1]),P(c,"stop-opacity","0"),P(c,"offset","100%"),P(a,"id",h="arrow-right-icon-stroke-"+n[1]),P(a,"x1","50%"),P(a,"y1","9.83%"),P(a,"x2","41.99%"),P(a,"y2","24.46%"),P(u,"d","M4.84572153,2.14166669 C4.94036186,2.14170036 5.03490004,2.17870347 5.10676798,2.25203341 L9.39516942,6.66308361 C9.48635681,6.75687897 9.53195051,6.87843949 9.53195051,7 C9.53195051,7.12156051 9.48635681,7.24312103 9.39516942,7.33691639 L5.11673708,11.7390017 C5.02118573,11.813978 4.92122439,11.8514005 4.82705048,11.851434 C4.73517505,11.8514667 4.65029153,11.8150862 4.59276829,11.7576692 C4.51856427,11.6593496 4.48179951,11.5564146 4.48176638,11.4595899 C4.48173399,11.3649536 4.51747117,11.2773335 4.58937836,11.2035272 L7.74273899,7.43877755 C7.84906128,7.31184097 7.90222243,7.15592048 7.90222243,7 C7.90222243,6.84407952 7.84906128,6.68815903 7.74273449,6.56121708 L4.54804918,2.74803934 C4.65338339,2.20863952 4.74441906,2.14163065 4.84572153,2.14166669 Z"),P(u,"fill",d=`url(#arrow-right-icon-gradient-${n[1]})`),P(u,"fill-rule","nonzero"),P(u,"stroke",p=`url(#arrow-right-icon-stroke-${n[1]})`),P(u,"stroke-width",".2"),P(t,"xmlns","http://www.w3.org/2000/svg"),P(t,"viewBox","0 0 14 14"),P(t,"width",n[0]),P(t,"height",n[0]),_(t,"opacity",n[2])},m(m,g){Z(m,t,g),B(t,e),B(e,i),B(i,s),B(i,o),B(e,a),B(a,l),B(a,c),B(t,u)},p(m,[g]){g&2&&P(s,"stop-color",m[1]),g&2&&P(o,"stop-color",m[1]),g&2&&r!==(r="arrow-right-icon-gradient-"+m[1])&&P(i,"id",r),g&2&&P(l,"stop-color",m[1]),g&2&&P(c,"stop-color",m[1]),g&2&&h!==(h="arrow-right-icon-stroke-"+m[1])&&P(a,"id",h),g&2&&d!==(d=`url(#arrow-right-icon-gradient-${m[1]})`)&&P(u,"fill",d),g&2&&p!==(p=`url(#arrow-right-icon-stroke-${m[1]})`)&&P(u,"stroke",p),g&1&&P(t,"width",m[0]),g&1&&P(t,"height",m[0]),g&4&&_(t,"opacity",m[2])},i:ce,o:ce,d(m){m&&X(t)}}}function r6(n,t,e){let{size:i="14"}=t,{color:s="#ffffff"}=t,{opacity:o=1}=t;return n.$$set=r=>{"size"in r&&e(0,i=r.size),"color"in r&&e(1,s=r.color),"opacity"in r&&e(2,o=r.opacity)},[i,s,o]}class a6 extends Ee{constructor(t){super(),Ie(this,t,r6,o6,Me,{size:0,color:1,opacity:2})}}function l6(n){let t,e,i,s,o,r,a,l,c,h,u,d,p;return{c(){t=Te("svg"),e=Te("defs"),i=Te("linearGradient"),s=Te("stop"),o=Te("stop"),a=Te("linearGradient"),l=Te("stop"),c=Te("stop"),u=Te("path"),P(s,"stop-color",n[1]),P(s,"offset","0%"),P(o,"stop-color",n[1]),P(o,"stop-opacity",".5"),P(o,"offset","100%"),P(i,"id",r="share-icon-gradient-"+n[1]),P(i,"x1","41.65%"),P(i,"y1","59.05%"),P(i,"x2","66.13%"),P(i,"y2","9.07%"),P(l,"stop-color",n[1]),P(l,"offset","0%"),P(c,"stop-color",n[1]),P(c,"stop-opacity","0"),P(c,"offset","100%"),P(a,"id",h="share-icon-stroke-"+n[1]),P(a,"x1","55.68%"),P(a,"y1","2.48%"),P(a,"x2","60.83%"),P(a,"y2","14.28%"),P(u,"d","M12.4937515,2.60140991 L12.6834904,2.60248871 C13.307774,2.63121157 13.9222065,2.90874077 14.3642696,3.436433 C14.7794904,3.93278385 14.923342,4.60854408 14.8265514,5.24548738 C14.7279361,5.89144103 14.4428997,6.3527969 14.063774,6.65956953 C13.6079793,7.02837949 13.0189069,7.17403325 12.4632035,7.15562178 C11.7380729,7.13162078 11.0390809,7.42803145 10.5261758,7.9357119 C9.96083448,8.49643643 9.67596892,9.19792997 9.69443632,9.91942004 C9.66449732,10.8859455 9.96309104,11.5807243 10.4796578,12.092029 C11.0239965,12.6296813 11.7402488,12.9101676 12.4817091,12.8884813 C13.0940469,12.8705618 13.7481304,13.0495781 14.2150699,13.5117611 C14.6987029,13.9904677 14.9268415,14.6256711 14.8974895,15.2508921 C14.8684928,15.868544 14.5880857,16.4761837 14.055365,16.9134138 C13.5533941,17.3248246 12.8689122,17.4672624 12.2258037,17.3713572 C11.5727886,17.2736846 11.1063284,16.991503 10.7961882,16.6159844 C10.4239402,16.1652655 10.2768519,15.5827583 10.2954352,15.0332376 C10.3197006,14.3149783 10.0202124,13.6224897 9.50703789,13.1145427 C8.94671715,12.5587885 8.2455275,12.2800717 7.51547371,12.2927077 C7.23521908,12.3053648 6.95603622,12.2673623 6.69423123,12.1827116 C6.1605306,11.9588888 5.9529663,11.8380114 5.77703284,11.66387 C5.40155143,11.2922134 5.1829777,10.8272392 5.11950899,10.3459077 C5.05433663,9.85165608 5.15259721,9.34024891 5.41443015,8.89062791 C5.61688125,8.49864777 5.91421421,8.21950306 6.25529625,8.03627882 C6.64911257,7.8247265 7.1008248,7.74055154 7.53306889,7.75691992 L7.73219905,7.75624362 C8.39290266,7.7280909 9.01896921,7.44343917 9.49037385,6.97683639 C10.0339806,6.43762468 10.3173723,5.72806794 10.2954528,4.99382841 C10.2784266,4.38712951 10.4592448,3.74020534 10.9258673,3.27833603 C11.4093877,2.79921041 12.051472,2.57340998 12.6834904,2.60248871 Z"),P(u,"fill",d=`url(#share-icon-gradient-${n[1]})`),P(u,"fill-rule","nonzero"),P(u,"stroke",p=`url(#share-icon-stroke-${n[1]})`),P(u,"stroke-width",".2"),P(t,"xmlns","http://www.w3.org/2000/svg"),P(t,"viewBox","0 0 20 20"),P(t,"width",n[0]),P(t,"height",n[0]),_(t,"opacity",n[2])},m(m,g){Z(m,t,g),B(t,e),B(e,i),B(i,s),B(i,o),B(e,a),B(a,l),B(a,c),B(t,u)},p(m,[g]){g&2&&P(s,"stop-color",m[1]),g&2&&P(o,"stop-color",m[1]),g&2&&r!==(r="share-icon-gradient-"+m[1])&&P(i,"id",r),g&2&&P(l,"stop-color",m[1]),g&2&&P(c,"stop-color",m[1]),g&2&&h!==(h="share-icon-stroke-"+m[1])&&P(a,"id",h),g&2&&d!==(d=`url(#share-icon-gradient-${m[1]})`)&&P(u,"fill",d),g&2&&p!==(p=`url(#share-icon-stroke-${m[1]})`)&&P(u,"stroke",p),g&1&&P(t,"width",m[0]),g&1&&P(t,"height",m[0]),g&4&&_(t,"opacity",m[2])},i:ce,o:ce,d(m){m&&X(t)}}}function c6(n,t,e){let{size:i="20"}=t,{color:s="#ffffff"}=t,{opacity:o=1}=t;return n.$$set=r=>{"size"in r&&e(0,i=r.size),"color"in r&&e(1,s=r.color),"opacity"in r&&e(2,o=r.opacity)},[i,s,o]}class h6 extends Ee{constructor(t){super(),Ie(this,t,c6,l6,Me,{size:0,color:1,opacity:2})}}function u6(n){Le(n,"svelte-18owx9v",".tag-popover-toolbar.svelte-18owx9v.svelte-18owx9v{display:flex;align-items:center;margin-top:0.75rem;padding-top:0;border-top:none}.tag-popover-toolbar.both-buttons.svelte-18owx9v.svelte-18owx9v{justify-content:space-between}.tag-popover-toolbar.single-button.svelte-18owx9v.svelte-18owx9v{justify-content:flex-end}.tag-popover-toolbar-dark.svelte-18owx9v .tag-popover-btn.svelte-18owx9v{color:#ffffff}.tag-popover-toolbar-light.svelte-18owx9v .tag-popover-btn.svelte-18owx9v{color:rgba(0, 0, 0, 0.85)}.tag-popover-btn.view-more.svelte-18owx9v.svelte-18owx9v{display:flex;align-items:center;justify-content:center;font-weight:500;font-size:0.875rem;letter-spacing:0;line-height:1.25rem}.tag-popover-btn.share.svelte-18owx9v.svelte-18owx9v{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem}")}function t0(n){let t,e,i,s,o=n[0].showMore&&i0(n),r=n[0].showShare&&n0(n);return{c(){t=U("div"),o&&o.c(),e=ue(),r&&r.c(),P(t,"class",i="tag-popover-toolbar tag-popover-toolbar-"+n[1]+" "+(n[0].showMore&&n[0].showShare?"both-buttons":"single-button")+" svelte-18owx9v")},m(a,l){Z(a,t,l),o&&o.m(t,null),B(t,e),r&&r.m(t,null),s=!0},p(a,l){a[0].showMore?o?(o.p(a,l),l&1&&H(o,1)):(o=i0(a),o.c(),H(o,1),o.m(t,e)):o&&(xe(),Y(o,1,1,()=>{o=null}),Se()),a[0].showShare?r?(r.p(a,l),l&1&&H(r,1)):(r=n0(a),r.c(),H(r,1),r.m(t,null)):r&&(xe(),Y(r,1,1,()=>{r=null}),Se()),(!s||l&3&&i!==(i="tag-popover-toolbar tag-popover-toolbar-"+a[1]+" "+(a[0].showMore&&a[0].showShare?"both-buttons":"single-button")+" svelte-18owx9v"))&&P(t,"class",i)},i(a){s||(H(o),H(r),s=!0)},o(a){Y(o),Y(r),s=!1},d(a){a&&X(t),o&&o.d(),r&&r.d()}}}function i0(n){let t,e,i,s,o,r,a;return s=new a6({props:{size:"14",color:n[1]==="light"?"#000000":"#ffffff",opacity:n[1]==="light"?.8:1}}),{c(){t=U("div"),e=Fe(n[2]),i=ue(),ge(s.$$.fragment),P(t,"class","tag-popover-btn view-more svelte-18owx9v")},m(l,c){Z(l,t,c),B(t,e),B(t,i),pe(s,t,null),o=!0,r||(a=_e(t,"click",n[3]),r=!0)},p(l,c){(!o||c&4)&&Ne(e,l[2]);const h={};c&2&&(h.color=l[1]==="light"?"#000000":"#ffffff"),c&2&&(h.opacity=l[1]==="light"?.8:1),s.$set(h)},i(l){o||(H(s.$$.fragment,l),o=!0)},o(l){Y(s.$$.fragment,l),o=!1},d(l){l&&X(t),me(s),r=!1,a()}}}function n0(n){let t,e,i,s,o;return e=new h6({props:{size:"20",color:n[1]==="light"?"#000000":"#ffffff",opacity:n[1]==="light"?.8:1}}),{c(){t=U("div"),ge(e.$$.fragment),P(t,"class","tag-popover-btn share svelte-18owx9v")},m(r,a){Z(r,t,a),pe(e,t,null),i=!0,s||(o=_e(t,"click",n[4]),s=!0)},p(r,a){const l={};a&2&&(l.color=r[1]==="light"?"#000000":"#ffffff"),a&2&&(l.opacity=r[1]==="light"?.8:1),e.$set(l)},i(r){i||(H(e.$$.fragment,r),i=!0)},o(r){Y(e.$$.fragment,r),i=!1},d(r){r&&X(t),me(e),s=!1,o()}}}function d6(n){let t,e,i=(n[0].showMore||n[0].showShare)&&t0(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[0].showMore||s[0].showShare?i?(i.p(s,o),o&1&&H(i,1)):(i=t0(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function f6(n,t,e){let i;const s=cn("hooks");Vn();let{tag:o}=t,{toolbar:r={showMore:!0,showShare:!0}}=t,{theme:a="dark"}=t,{closePopover:l=void 0}=t;zt(()=>{s.emit("popoverToolbarShow",{tag:o})});function c(u){u.stopPropagation(),typeof l=="function"&&l(),s.emit("click",{event:u,target:"TagPopoverViewMore",tag:o})}function h(u){u.stopPropagation(),typeof l=="function"&&l(),s.emit("click",{event:u,target:"TagPopoverShare",tag:o})}return n.$$set=u=>{"tag"in u&&e(5,o=u.tag),"toolbar"in u&&e(0,r=u.toolbar),"theme"in u&&e(1,a=u.theme),"closePopover"in u&&e(6,l=u.closePopover)},n.$$.update=()=>{n.$$.dirty&32&&e(2,i=(()=>Ge(o.data.highlightText)&&o.data.highlightText.trim()!==""?o.data.highlightText:Ge(o.config.popoverConfig.viewMoreText)&&o.config.popoverConfig.viewMoreText.trim()!==""?o.config.popoverConfig.viewMoreText:"查看更多")())},[r,a,i,c,h,o,l]}class p6 extends Ee{constructor(t){super(),Ie(this,t,f6,d6,Me,{tag:5,toolbar:0,theme:1,closePopover:6},u6)}}function m6(n){let t,e;return t=new p6({props:{toolbar:{showMore:n[7].showMore===void 0?!0:n[7].showMore,showShare:n[7].showShare===void 0?!0:n[7].showShare},theme:n[2],tag:n[4],closePopover:n[8]}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s&128&&(o.toolbar={showMore:i[7].showMore===void 0?!0:i[7].showMore,showShare:i[7].showShare===void 0?!0:i[7].showShare}),s&4&&(o.theme=i[2]),s&16&&(o.tag=i[4]),s&256&&(o.closePopover=i[8]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function g6(n){let t,e,i,s;return t=new j7({props:{show:n[0],direction:n[1],theme:n[2]}}),i=new s6({props:{placement:n[3],tag:n[4],config:n[5],theme:n[6],audioInstance:n[9],audioPlaying:n[10],audioCurrentTime:n[11],audioDuration:n[12],$$slots:{toolbar:[m6]},$$scope:{ctx:n}}}),i.$on("resize",n[13]),{c(){ge(t.$$.fragment),e=ue(),ge(i.$$.fragment)},m(o,r){pe(t,o,r),Z(o,e,r),pe(i,o,r),s=!0},p(o,[r]){const a={};r&1&&(a.show=o[0]),r&2&&(a.direction=o[1]),r&4&&(a.theme=o[2]),t.$set(a);const l={};r&8&&(l.placement=o[3]),r&16&&(l.tag=o[4]),r&32&&(l.config=o[5]),r&64&&(l.theme=o[6]),r&512&&(l.audioInstance=o[9]),r&1024&&(l.audioPlaying=o[10]),r&2048&&(l.audioCurrentTime=o[11]),r&4096&&(l.audioDuration=o[12]),r&16788&&(l.$$scope={dirty:r,ctx:o}),i.$set(l)},i(o){s||(H(t.$$.fragment,o),H(i.$$.fragment,o),s=!0)},o(o){Y(t.$$.fragment,o),Y(i.$$.fragment,o),s=!1},d(o){me(t,o),o&&X(e),me(i,o)}}}function v6(n,t,e){let{showArrow:i}=t,{arrowDirection:s}=t,{effectiveTheme:o}=t,{adjustedPlacement:r}=t,{tag:a}=t,{config:l}=t,{theme:c}=t,{toolbar:h}=t,{closePopover:u}=t,{audioInstance:d=null}=t,{audioPlaying:p=!1}=t,{audioCurrentTime:m=0}=t,{audioDuration:g=0}=t;function v(y){_n.call(this,n,y)}return n.$$set=y=>{"showArrow"in y&&e(0,i=y.showArrow),"arrowDirection"in y&&e(1,s=y.arrowDirection),"effectiveTheme"in y&&e(2,o=y.effectiveTheme),"adjustedPlacement"in y&&e(3,r=y.adjustedPlacement),"tag"in y&&e(4,a=y.tag),"config"in y&&e(5,l=y.config),"theme"in y&&e(6,c=y.theme),"toolbar"in y&&e(7,h=y.toolbar),"closePopover"in y&&e(8,u=y.closePopover),"audioInstance"in y&&e(9,d=y.audioInstance),"audioPlaying"in y&&e(10,p=y.audioPlaying),"audioCurrentTime"in y&&e(11,m=y.audioCurrentTime),"audioDuration"in y&&e(12,g=y.audioDuration)},[i,s,o,r,a,l,c,h,u,d,p,m,g,v]}class y6 extends Ee{constructor(t){super(),Ie(this,t,v6,g6,Me,{showArrow:0,arrowDirection:1,effectiveTheme:2,adjustedPlacement:3,tag:4,config:5,theme:6,toolbar:7,closePopover:8,audioInstance:9,audioPlaying:10,audioCurrentTime:11,audioDuration:12})}}function b6(n){Le(n,"svelte-11cjg3j",'@charset "UTF-8";.tag-popover.svelte-11cjg3j{position:absolute;z-index:1000010;pointer-events:auto;width:auto;height:auto;padding:0;margin:0;visibility:visible;opacity:1}.tag-popover-content.svelte-11cjg3j{cursor:pointer;pointer-events:auto}.tag-popover-content.audio-tag-popover.svelte-11cjg3j{cursor:default}')}function s0(n){let t,e,i,s,o,r,a,l,c;return i=new y6({props:{showArrow:n[13],arrowDirection:n[12],effectiveTheme:n[18],adjustedPlacement:n[8],tag:n[0],config:n[1],theme:n[2],toolbar:n[16],audioInstance:n[4],audioPlaying:n[5],audioCurrentTime:n[6],audioDuration:n[7],closePopover:n[24]}}),i.$on("viewMore",n[20]),i.$on("share",n[21]),i.$on("resize",n[22]),{c(){t=U("div"),e=U("div"),ge(i.$$.fragment),P(e,"class","tag-popover-content svelte-11cjg3j"),Pe(e,"audio-tag-popover",n[11]),P(t,"class",o="tag-popover tag-popover-"+n[18]+" tag-popover-"+n[8]+" svelte-11cjg3j"),P(t,"data-tag-id",r=n[0].id),_(t,"z-index",n[17]),_(t,"left",n[14].x+"px"),_(t,"top",n[14].y+"px")},m(h,u){Z(h,t,u),B(t,e),pe(i,e,null),n[35](e),n[36](t),a=!0,l||(c=[_e(e,"mouseenter",n[33]),_e(e,"mouseleave",n[34]),_e(e,"click",n[23])],l=!0)},p(h,u){n=h;const d={};u[0]&8192&&(d.showArrow=n[13]),u[0]&4096&&(d.arrowDirection=n[12]),u[0]&262144&&(d.effectiveTheme=n[18]),u[0]&256&&(d.adjustedPlacement=n[8]),u[0]&1&&(d.tag=n[0]),u[0]&2&&(d.config=n[1]),u[0]&4&&(d.theme=n[2]),u[0]&65536&&(d.toolbar=n[16]),u[0]&16&&(d.audioInstance=n[4]),u[0]&32&&(d.audioPlaying=n[5]),u[0]&64&&(d.audioCurrentTime=n[6]),u[0]&128&&(d.audioDuration=n[7]),i.$set(d),(!a||u[0]&2048)&&Pe(e,"audio-tag-popover",n[11]),(!a||u[0]&262400&&o!==(o="tag-popover tag-popover-"+n[18]+" tag-popover-"+n[8]+" svelte-11cjg3j"))&&P(t,"class",o),(!a||u[0]&1&&r!==(r=n[0].id))&&P(t,"data-tag-id",r),(!a||u[0]&131072)&&_(t,"z-index",n[17]),(!a||u[0]&16384)&&_(t,"left",n[14].x+"px"),(!a||u[0]&16384)&&_(t,"top",n[14].y+"px")},i(h){a||(H(i.$$.fragment,h),At(()=>{a&&(s||(s=Ri(e,n[19],{duration:n[15],easing:Ur,y:n[12]==="top"?-8:n[12]==="bottom"?8:0,x:n[12]==="left"?-8:n[12]==="right"?8:0},!0)),s.run(1))}),a=!0)},o(h){Y(i.$$.fragment,h),s||(s=Ri(e,n[19],{duration:n[15],easing:Ur,y:n[12]==="top"?-8:n[12]==="bottom"?8:0,x:n[12]==="left"?-8:n[12]==="right"?8:0},!1)),s.run(0),a=!1},d(h){h&&X(t),me(i),n[35](null),h&&s&&s.end(),n[36](null),l=!1,dt(c)}}}function A6(n){let t,e,i=n[3]&&n[14]&&s0(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,o){s[3]&&s[14]?i?(i.p(s,o),o[0]&16392&&H(i,1)):(i=s0(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function w6(n,t,e){let i,s,o,r,a,l,c,h,u,d;const p=cn("hooks");let{tag:m}=t,{config:g={}}=t,{triggerElement:v}=t,{wrapperElement:y=document.body}=t,{popoverContainer:w=null}=t,{theme:C=void 0}=t,{visible:E=!0}=t,{closePopover:D=void 0}=t,{audioInstance:L=null}=t,{audioPlaying:R=!1}=t,{audioCurrentTime:z=0}=t,{audioDuration:O=0}=t;const A=Vn();let M,I={width:0,height:0},k=null,x=s;function S(te,{duration:ke=400,easing:Re=Ur,x:ye=0,y:De=0}){return{duration:ke,css:(ve,Ae)=>`
|
|
1109
1115
|
opacity: ${ve};
|
|
1110
1116
|
transform: translate(${Ae*ye}px, ${Ae*De}px);
|
|
1111
|
-
`}}const j=()=>{if(!m.screenPosition||!v||!y)return s;const te=(g==null?void 0:g.autoPlacementBaseSpace)||{top:.2,bottom:.2,right:.15},ke=y.clientWidth,Re=y.clientHeight,ye=Re*te.top,De=Re*(1-te.bottom),ve=ke*(1-te.right),Ae=m.screenPosition.leftPx,Oe=m.screenPosition.topPx,Xe=I.width||280,Ze=I.height||200;return Oe<=ye?Ae<=ve?Ae+Xe<=ke&&Oe+Ze<=Re?"right-top":"bottom-left":Ae-Xe>=0&&Oe+Ze<=Re?"left-top":"bottom-right":Oe>=De?Ae<=ve?Ae+Xe<=ke&&Oe-Ze>=0?"right-bottom":"top-left":Ae-Xe>=0&&Oe-Ze>=0?"left-bottom":"top-right":Ae<=ve?Ae+Xe<=ke?"right-top":"left-top":Ae-Xe>=0?"left-top":"right-top"},F=(te,ke)=>{switch(te){case"top":case"top-left":case"top-right":return{x:ke.left+ke.width/2,y:ke.top};case"bottom":case"bottom-left":case"bottom-right":return{x:ke.left+ke.width/2,y:ke.top+ke.height};case"left":case"left-top":case"left-bottom":return{x:ke.left,y:ke.top+ke.height/2};case"right":case"right-top":case"right-bottom":return{x:ke.left+ke.width,y:ke.top+ke.height/2};default:return{x:ke.left+ke.width/2,y:ke.top}}},J=te=>{ee(),p&&p.emit("click",{event:te.detail.event,target:"TagPopoverViewMore",tag:m})},ne=te=>{ee(),p&&p.emit("click",{event:te.detail.event,target:"TagPopoverShare",tag:m})},q=te=>{e(29,I=te.detail),I.width>0&&I.height>0&&e(8,x=j())},oe=te=>{d||ee(),te.stopPropagation(),p.emit("click",{event:te,target:"TagPopoverContent",tag:m})};let se=null,ae=!1;function ze(){w&&se&&se.parentNode!==w&&w.appendChild(se)}zt(()=>{(!y||y===document.body)&&console.warn("TagPopover 组件警告:禁止使用 document.body 作为 wrapperElement,请传入自定义容器元素。"),ae=!0,ze(),y&&y!==document.body&&e(25,y.style.overflow="hidden",y)}),Cu(()=>{ae&&ze()}),Kt(()=>{se&&se.parentNode&&se.parentNode.removeChild(se),y&&y!==document.body&&e(25,y.style.overflow="",y)});function ee(){typeof D=="function"&&D(),A("close")}function we(te){_n.call(this,n,te)}function le(te){_n.call(this,n,te)}function he(te){qe[te?"unshift":"push"](()=>{M=te,e(9,M)})}function be(te){qe[te?"unshift":"push"](()=>{se=te,e(10,se)})}return n.$$set=te=>{"tag"in te&&e(0,m=te.tag),"config"in te&&e(1,g=te.config),"triggerElement"in te&&e(26,v=te.triggerElement),"wrapperElement"in te&&e(25,y=te.wrapperElement),"popoverContainer"in te&&e(27,w=te.popoverContainer),"theme"in te&&e(2,C=te.theme),"visible"in te&&e(3,E=te.visible),"closePopover"in te&&e(28,D=te.closePopover),"audioInstance"in te&&e(4,L=te.audioInstance),"audioPlaying"in te&&e(5,R=te.audioPlaying),"audioCurrentTime"in te&&e(6,z=te.audioCurrentTime),"audioDuration"in te&&e(7,O=te.audioDuration)},n.$$.update=()=>{if(n.$$.dirty[0]&5&&e(18,i=(()=>Ge(C)?C:Ge(m.data.theme)&&["light","dark"].includes(m.data.theme)?m.data.theme:m.contentType==="Marketing"?"light":"dark")()),n.$$.dirty[0]&2&&e(32,s=(g==null?void 0:g.placement)||"right-top"),n.$$.dirty[0]&2&&e(16,a=(()=>typeof(g==null?void 0:g.toolbar)=="boolean"?g.toolbar?{showMore:!0,showShare:!0}:{showMore:!1,showShare:!1}:(g==null?void 0:g.toolbar)||{showMore:!0,showShare:!0})()),n.$$.dirty[1]&2&&(s==="auto"?e(8,x=j()):e(8,x=s)),n.$$.dirty[0]&2&&e(15,l=(g==null?void 0:g.transitionDuration)||350),n.$$.dirty[0]&67108865&&m.screenPosition&&v&&e(8,x=j()),n.$$.dirty[0]&536870912&&I.width>0&&I.height>0&&e(8,x=j()),n.$$.dirty[0]&67109121&&m.screenPosition&&x&&v){const te=v.getBoundingClientRect();te.width>0&&te.height>0&&e(30,k=F(x,te))}n.$$.dirty[0]&1073741824&&e(14,c=k),n.$$.dirty[1]&1&&e(13,h=typeof o=="boolean"?o:!0),n.$$.dirty[0]&256&&e(12,u=(()=>{switch(x){case"top":case"top-left":case"top-right":return"bottom";case"bottom":case"bottom-left":case"bottom-right":return"top";case"left":case"left-top":case"left-bottom":return"right";case"right":case"right-top":case"right-bottom":return"left";default:return"bottom"}})()),n.$$.dirty[0]&1&&e(11,d=m.contentType==="Audio"&&m.data.appearance==="plane")},e(31,o=!0),e(17,r=1060),[m,g,C,E,L,R,z,O,x,M,se,d,u,h,c,l,a,r,i,S,J,ne,q,oe,ee,y,v,w,D,I,k,o,s,we,le,he,be]}class P6 extends Ee{constructor(t){super(),Ie(this,t,w6,A6,Me,{tag:0,config:1,triggerElement:26,wrapperElement:25,popoverContainer:27,theme:2,visible:3,closePopover:28,audioInstance:4,audioPlaying:5,audioCurrentTime:6,audioDuration:7},b6,[-1,-1])}}function C6(n){Le(n,"svelte-2g2g8a",".tag.svelte-2g2g8a{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto;will-change:opacity;transition:opacity 0.2s linear}.tag.enableZIndex.svelte-2g2g8a{position:absolute}.tag.hide.svelte-2g2g8a{opacity:0;pointer-events:none}.tag.hide.svelte-2g2g8a *{pointer-events:none !important}.tag.unClickable.svelte-2g2g8a{pointer-events:none !important}.tag.unClickable.svelte-2g2g8a *{pointer-events:none !important}")}function o0(n){let t,e,i,s,o,r,a,l,c,h;const u=[I6,M6],d=[];function p(y,w){return y[10]?0:1}e=p(n),i=d[e]=u[e](n);const m=[k6,E6],g=[];function v(y,w){return y[25]?0:1}return o=v(n),r=g[o]=m[o](n),{c(){t=U("div"),i.c(),s=ue(),r.c(),P(t,"class","tag svelte-2g2g8a"),P(t,"data-tag-id",n[23]),P(t,"data-tag-unfolded",n[8]),P(t,"data-content-type",a=n[0].contentType),P(t,"data-popover-enabled",l=n[0].isPopoverConfigEnabled()),P(t,"id",c=`tag-${n[23]}`),Pe(t,"unClickable",n[0].config.clickable===!1),Pe(t,"hide",n[21]),Pe(t,"enableZIndex",n[18]),_(t,"z-index",n[18]),_(t,"transform",`translate3d(${n[20]}, ${n[19]}, 0) scale(${n[9].scale})`)},m(y,w){Z(y,t,w),d[e].m(t,null),B(t,s),g[o].m(t,null),n[36](t),h=!0},p(y,w){let C=e;e=p(y),e===C?d[e].p(y,w):(xe(),Y(d[C],1,1,()=>{d[C]=null}),Se(),i=d[e],i?i.p(y,w):(i=d[e]=u[e](y),i.c()),H(i,1),i.m(t,s));let E=o;o=v(y),o===E?g[o].p(y,w):(xe(),Y(g[E],1,1,()=>{g[E]=null}),Se(),r=g[o],r?r.p(y,w):(r=g[o]=m[o](y),r.c()),H(r,1),r.m(t,null)),(!h||w[0]&8388608)&&P(t,"data-tag-id",y[23]),(!h||w[0]&256)&&P(t,"data-tag-unfolded",y[8]),(!h||w[0]&1&&a!==(a=y[0].contentType))&&P(t,"data-content-type",a),(!h||w[0]&1&&l!==(l=y[0].isPopoverConfigEnabled()))&&P(t,"data-popover-enabled",l),(!h||w[0]&8388608&&c!==(c=`tag-${y[23]}`))&&P(t,"id",c),(!h||w[0]&1)&&Pe(t,"unClickable",y[0].config.clickable===!1),(!h||w[0]&2097152)&&Pe(t,"hide",y[21]),(!h||w[0]&262144)&&Pe(t,"enableZIndex",y[18]),w[0]&262144&&_(t,"z-index",y[18]),w[0]&1573376&&_(t,"transform",`translate3d(${y[20]}, ${y[19]}, 0) scale(${y[9].scale})`)},i(y){h||(H(i),H(r),h=!0)},o(y){Y(i),Y(r),h=!1},d(y){y&&X(t),d[e].d(),g[o].d(),n[36](null)}}}function M6(n){let t;return{c(){t=U("div"),P(t,"data-info","tag point is disable")},m(e,i){Z(e,t,i)},p:ce,i:ce,o:ce,d(e){e&&X(t)}}}function I6(n){let t,e,i;function s(r){n[34](r)}let o={tag:n[0],handleMouseEnter:n[30],handleMouseLeave:n[31],handleTagPointClick:n[32]};return n[12]!==void 0&&(o.tagPointClickHelper=n[12]),t=new C7({props:o}),qe.push(()=>Wl(t,"tagPointClickHelper",s)),n[35](t),t.$on("audioInstanceReady",n[27].audioInstanceReady),t.$on("audioPlay",n[27].audioPlay),t.$on("audioPause",n[27].audioPause),t.$on("audioTimeUpdate",n[27].audioTimeUpdate),t.$on("audioDuration",n[27].audioDuration),{c(){ge(t.$$.fragment)},m(r,a){pe(t,r,a),i=!0},p(r,a){const l={};a[0]&1&&(l.tag=r[0]),!e&&a[0]&4096&&(e=!0,l.tagPointClickHelper=r[12],Gl(()=>e=!1)),t.$set(l)},i(r){i||(H(t.$$.fragment,r),i=!0)},o(r){Y(t.$$.fragment,r),i=!1},d(r){n[35](null),me(t,r)}}}function E6(n){let t;return{c(){t=U("div"),P(t,"data-info","tag content is disable")},m(e,i){Z(e,t,i)},p:ce,i:ce,o:ce,d(e){e&&X(t)}}}function k6(n){let t,e;return t=new od({props:{mediaStore:n[1],tag:mt(n[0]),hooks:n[26],state:n[4],temporaryState:n[5],rendererMap:n[2],contentTypeMap:n[3]}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s[0]&2&&(o.mediaStore=i[1]),s[0]&1&&(o.tag=mt(i[0])),s[0]&16&&(o.state=i[4]),s[0]&32&&(o.temporaryState=i[5]),s[0]&4&&(o.rendererMap=i[2]),s[0]&8&&(o.contentTypeMap=i[3]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function r0(n){var i;let t,e;return t=new P6({props:{tag:n[0],config:n[0].config.popoverConfig,theme:(i=n[0].config.popoverConfig)==null?void 0:i.theme,wrapperElement:n[6],triggerElement:n[12],popoverContainer:n[7],visible:!0,closePopover:n[33],audioInstance:n[14],audioPlaying:n[15],audioCurrentTime:n[16],audioDuration:n[17]}}),t.$on("mouseenter",n[28]),t.$on("mouseleave",n[29]),t.$on("close",n[33]),{c(){ge(t.$$.fragment)},m(s,o){pe(t,s,o),e=!0},p(s,o){var a;const r={};o[0]&1&&(r.tag=s[0]),o[0]&1&&(r.config=s[0].config.popoverConfig),o[0]&1&&(r.theme=(a=s[0].config.popoverConfig)==null?void 0:a.theme),o[0]&64&&(r.wrapperElement=s[6]),o[0]&4096&&(r.triggerElement=s[12]),o[0]&128&&(r.popoverContainer=s[7]),o[0]&16384&&(r.audioInstance=s[14]),o[0]&32768&&(r.audioPlaying=s[15]),o[0]&65536&&(r.audioCurrentTime=s[16]),o[0]&131072&&(r.audioDuration=s[17]),t.$set(r)},i(s){e||(H(t.$$.fragment,s),e=!0)},o(s){Y(t.$$.fragment,s),e=!1},d(s){me(t,s)}}}function x6(n){var a;let t,e=n[0].isPopoverConfigEnabled()&&n[24]&&(n[11]||((a=n[0].config.popoverConfig)==null?void 0:a.debug)),i,s,o=n[9]&&(!n[22]||n[11])&&o0(n),r=e&&r0(n);return{c(){o&&o.c(),t=ue(),r&&r.c(),i=Be()},m(l,c){o&&o.m(l,c),Z(l,t,c),r&&r.m(l,c),Z(l,i,c),s=!0},p(l,c){var h;l[9]&&(!l[22]||l[11])?o?(o.p(l,c),c[0]&4196864&&H(o,1)):(o=o0(l),o.c(),H(o,1),o.m(t.parentNode,t)):o&&(xe(),Y(o,1,1,()=>{o=null}),Se()),c[0]&16779265&&(e=l[0].isPopoverConfigEnabled()&&l[24]&&(l[11]||((h=l[0].config.popoverConfig)==null?void 0:h.debug))),e?r?(r.p(l,c),c[0]&16779265&&H(r,1)):(r=r0(l),r.c(),H(r,1),r.m(i.parentNode,i)):r&&(xe(),Y(r,1,1,()=>{r=null}),Se())},i(l){s||(H(o),H(r),s=!0)},o(l){Y(o),Y(r),s=!1},d(l){o&&o.d(l),l&&X(t),r&&r.d(l),l&&X(i)}}}function S6(n,t,e){let i,s,o,r,a,l,c,h,u,d,p,{tag:m}=t,{mediaStore:g}=t,{rendererMap:v=new Map}=t,{contentTypeMap:y=new Map}=t,{state:w}=t,{temporaryState:C}=t,{wrapperElement:E=null}=t,{popoverContainer:D=null}=t;const L=cn("hooks");let R=!1,z,O,A=null,M=!1,I=!1,k=null,x=null,S=!1,j=0,F=0;const J={audioInstanceReady:te=>{e(14,x=te.detail),e(15,S=!x.paused)},audioPlay:()=>{e(15,S=!0)},audioPause:()=>{e(15,S=!1)},audioTimeUpdate:te=>{e(16,j=te.detail)},audioDuration:te=>{e(17,F=te.detail)}};let ne=!1;const q=te=>{if(O&&clearTimeout(O),te===!0&&!ne){ne=!0,e(11,R=!0);return}O=setTimeout(()=>{var ke;!M&&!I&&!((ke=m.config.popoverConfig)!=null&&ke.debug)&&(ne=!1,e(11,R=!1))},300)},oe=()=>{M=!0,O&&clearTimeout(O)},se=()=>{M=!1,q(!1)},ae=te=>{var Re,ye,De,ve,Ae,Oe;if(te.pointerType!=="mouse")return;I=!0;const ke=(ye=(Re=m.currentConfig)==null?void 0:Re.popoverConfig)==null?void 0:ye.trigger;if(m.isPopoverConfigEnabled()&&m.isHoverEnabled()&&ke==="hover"){if(O&&clearTimeout(O),z!==void 0)return;((ve=(De=m.currentConfig)==null?void 0:De.popoverConfig)==null?void 0:ve.triggerDelay)>0?z=setTimeout(()=>{q(!0),m.hooks.emit("hover",{event:te,tag:m}),z=void 0},(Oe=(Ae=m.currentConfig)==null?void 0:Ae.popoverConfig)==null?void 0:Oe.triggerDelay):(q(!0),m.hooks.emit("hover",{event:te,tag:m}))}},ze=te=>{var Re,ye;if(te.pointerType!=="mouse")return;I=!1;const ke=(ye=(Re=m.currentConfig)==null?void 0:Re.popoverConfig)==null?void 0:ye.trigger;m.isHoverEnabled()&&m.isPopoverConfigEnabled()&&ke==="hover"&&(z!==void 0&&(clearTimeout(z),z=void 0),q(!1))},ee=te=>{var ye,De;const ke=m.contentType==="Audio"&&m.data.appearance==="plane",Re=(De=(ye=m.currentConfig)==null?void 0:ye.popoverConfig)==null?void 0:De.trigger;m.isPopoverConfigEnabled()&&m.isHoverEnabled()&&Re==="click"&&(ke?R||(e(11,R=!0),m.hooks.emit("hover",{event:te,tag:m})):(e(11,R=!R),R&&m.hooks.emit("hover",{event:te,tag:m})))};function we(){ne=!1,e(11,R=!1)}zt(()=>()=>{z&&clearTimeout(z),O&&clearTimeout(O)});function le(te){A=te,e(12,A)}function he(te){qe[te?"unshift":"push"](()=>{k=te,e(13,k)})}function be(te){qe[te?"unshift":"push"](()=>{m.dom=te,e(0,m)})}return n.$$set=te=>{"tag"in te&&e(0,m=te.tag),"mediaStore"in te&&e(1,g=te.mediaStore),"rendererMap"in te&&e(2,v=te.rendererMap),"contentTypeMap"in te&&e(3,y=te.contentTypeMap),"state"in te&&e(4,w=te.state),"temporaryState"in te&&e(5,C=te.temporaryState),"wrapperElement"in te&&e(6,E=te.wrapperElement),"popoverContainer"in te&&e(7,D=te.popoverContainer)},n.$$.update=()=>{var te,ke,Re,ye;n.$$.dirty[0]&5&&e(10,i=(()=>{var De,ve,Ae;return((ve=(De=m.style)==null?void 0:De.point)==null?void 0:ve.enabled)===!1||((Ae=v.get(m.contentType))==null?void 0:Ae.usePoint)===!1||m.contentType==="Sticker"||m.contentType==="Link"||m.contentType==="VRLink"||m.contentType==="PanoLink"?!1:m.contentType==="Panorama"?!0:m.contentType==="Audio"&&m.data.appearance==="plane"?m.isPopoverConfigEnabled():!(m.stickType&&m.stickType!=="2DPoint"&&m.stickType!=="3DPoint")})()),n.$$.dirty[0]&1029&&e(25,s=(()=>m.isPopoverConfigEnabled()&&m.contentType==="Panorama"||m.isPopoverConfigEnabled()&&m.contentType==="ImageText"||m.isPopoverConfigEnabled()&&m.contentType==="Text"||m.isPopoverConfigEnabled()&&m.contentType==="Audio"?!1:m.element||v.has(m.contentType)?!0:!(m.stickType&&m.stickType!=="2DPoint"&&m.stickType!=="3DPoint"||m.entryFromModel&&Ii(m.five.state.mode)&&i))()),n.$$.dirty[0]&1&&e(24,o=(()=>{var De;return m.contentType==="Marketing"?!!(m.data.title||m.data.name||m.data.description||m.data.tooltip||(De=m.data.price)!=null&&De.value||m.data.brandTags&&m.data.brandTags.length>0||m.data.tags&&m.data.tags.length>0||m.data.imageUrl||m.data.mediaUrl||m.data.mediaData&&m.data.mediaData.length>0):!!(m.data.title||m.data.name||m.data.text||m.data.description||m.data.tooltip||m.data.imageUrl||m.data.mediaUrl||m.data.audioUrl||m.data.mediaData&&m.data.mediaData.length>0)})()),n.$$.dirty[0]&1&&e(23,r=m.id),n.$$.dirty[0]&1&&e(9,a=m.screenPosition),n.$$.dirty[0]&1&&e(22,l=m.enabled===!1||!m.state),n.$$.dirty[0]&513&&e(21,c=!((te=m.state)!=null&&te.visible)||((ke=m.temporaryState)==null?void 0:ke.visible)===!1||!a),n.$$.dirty[0]&1&&e(8,h=((Re=m.state)==null?void 0:Re.unfolded)&&!m.isPopoverConfigEnabled()),n.$$.dirty[0]&512&&e(20,u=(a==null?void 0:a.leftPx)+"px"),n.$$.dirty[0]&512&&e(19,d=(a==null?void 0:a.topPx)+"px"),n.$$.dirty[0]&257&&e(18,p=h?((ye=m.zIndex)!=null?ye:0)+(h?1e6:0):void 0)},[m,g,v,y,w,C,E,D,h,a,i,R,A,k,x,S,j,F,p,d,u,c,l,r,o,s,L,J,oe,se,ae,ze,ee,we,le,he,be]}class T6 extends Ee{constructor(t){super(),Ie(this,t,S6,x6,Me,{tag:0,mediaStore:1,rendererMap:2,contentTypeMap:3,state:4,temporaryState:5,wrapperElement:6,popoverContainer:7},C6,[-1,-1])}}let Mn=null;function D6(n=2e6){return Mn&&document.body.contains(Mn)?(Mn.style.zIndex=String(n),Mn):(Mn=document.createElement("div"),Mn.className="tag-popover-container",Object.assign(Mn.style,{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",zIndex:String(n),pointerEvents:"none",overflow:"hidden"}),document.body.appendChild(Mn),Mn)}function L6(n){Le(n,"svelte-9ehqs9",".tag--container.svelte-9ehqs9{box-sizing:border-box;position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;opacity:1;-webkit-user-select:none;-moz-user-select:none;user-select:none;transform:translate3d(0, 0, 0);transition:opacity 0.2s linear;overflow:hidden}.tag--container.hide.svelte-9ehqs9{opacity:0 !important;pointer-events:none}.tag--container.hide.svelte-9ehqs9 *{pointer-events:none !important}")}function a0(n,t,e){const i=n.slice();return i[12]=t[e],i}function l0(n){let t,e=[],i=new Map,s,o,r,a=n[0];const l=c=>c[12].id;for(let c=0;c<a.length;c+=1){let h=a0(n,a,c),u=l(h);i.set(u,e[c]=c0(u,h))}return{c(){var c;t=U("div");for(let h=0;h<e.length;h+=1)e[h].c();P(t,"class","tag--container svelte-9ehqs9"),P(t,"data-infive",s=!n[4].visible||!n[5].visible?"1":"0"),Pe(t,"hide",!n[4].visible||!n[5].visible),_(t,"z-index",(c=n[6])!=null?c:""),_(t,"opacity",!n[4].visible||!n[5].visible?null:1)},m(c,h){Z(c,t,h);for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(t,null);n[10](t),r=!0},p(c,h){var u;h&447&&(a=c[0],xe(),e=ai(e,h,l,1,c,a,i,t,fn,c0,null,a0),Se()),(!r||h&48&&s!==(s=!c[4].visible||!c[5].visible?"1":"0"))&&P(t,"data-infive",s),(!r||h&48)&&Pe(t,"hide",!c[4].visible||!c[5].visible),h&64&&_(t,"z-index",(u=c[6])!=null?u:""),h&48&&_(t,"opacity",!c[4].visible||!c[5].visible?null:1)},i(c){if(!r){for(let h=0;h<a.length;h+=1)H(e[h]);o||At(()=>{o=vs(t,Ht,{}),o.start()}),r=!0}},o(c){for(let h=0;h<e.length;h+=1)Y(e[h]);r=!1},d(c){c&&X(t);for(let h=0;h<e.length;h+=1)e[h].d();n[10](null)}}}function c0(n,t){let e,i,s;return i=new T6({props:{state:t[4],temporaryState:t[5],tag:t[12],mediaStore:t[1],rendererMap:t[2],contentTypeMap:t[3],wrapperElement:t[7],popoverContainer:t[8]}}),{key:n,first:null,c(){e=Be(),ge(i.$$.fragment),this.first=e},m(o,r){Z(o,e,r),pe(i,o,r),s=!0},p(o,r){t=o;const a={};r&16&&(a.state=t[4]),r&32&&(a.temporaryState=t[5]),r&1&&(a.tag=t[12]),r&2&&(a.mediaStore=t[1]),r&4&&(a.rendererMap=t[2]),r&8&&(a.contentTypeMap=t[3]),r&128&&(a.wrapperElement=t[7]),r&256&&(a.popoverContainer=t[8]),i.$set(a)},i(o){s||(H(i.$$.fragment,o),s=!0)},o(o){Y(i.$$.fragment,o),s=!1},d(o){o&&X(e),me(i,o)}}}function z6(n){let t,e,i=n[4].enabled&&l0(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[4].enabled?i?(i.p(s,o),o&16&&H(i,1)):(i=l0(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function O6(n,t,e){let{tags:i=[]}=t,{hooks:s}=t,{mediaStore:o}=t,{rendererMap:r}=t,{contentTypeMap:a}=t,{state:l}=t,{temporaryState:c}=t,{zIndex:h=void 0}=t,u=null,d=null,p=2e3;ul("hooks",s),ul("mediaStore",o),zt(()=>{e(8,d=D6(p))});function m(g){qe[g?"unshift":"push"](()=>{u=g,e(7,u)})}return n.$$set=g=>{"tags"in g&&e(0,i=g.tags),"hooks"in g&&e(9,s=g.hooks),"mediaStore"in g&&e(1,o=g.mediaStore),"rendererMap"in g&&e(2,r=g.rendererMap),"contentTypeMap"in g&&e(3,a=g.contentTypeMap),"state"in g&&e(4,l=g.state),"temporaryState"in g&&e(5,c=g.temporaryState),"zIndex"in g&&e(6,h=g.zIndex)},n.$$.update=()=>{var g,v,y,w;n.$$.dirty&1&&i&&i.length>0&&(p=(w=(y=(v=(g=i[0])==null?void 0:g.config)==null?void 0:v.popoverConfig)==null?void 0:y.zIndex)!=null?w:2e6)},[i,o,r,a,l,c,h,u,d,s,m]}class j6 extends Ee{constructor(t){super(),Ie(this,t,O6,z6,Me,{tags:0,hooks:9,mediaStore:1,rendererMap:2,contentTypeMap:3,state:4,temporaryState:5,zIndex:6},L6)}}const Vy="Dnalogel-PanoTagPlugin",R6=n=>`${Vy}--${n}`;class kl extends B4{constructor(e,i){super(e);f(this,"state",{enabled:!0,visible:!0});f(this,"debug");f(this,"debugUtil",new H4(this));f(this,"globalHoverEnabled",!0);f(this,"changeTagModel",(e,i)=>$(this,null,function*(){var s;e.data=it({},e.data,i),yield(s=e.loadModel)==null?void 0:s.call(e)}));f(this,"handleFiveModeChange",e=>{const i=()=>{this.filter2DPointTag.forEach(s=>{s.state.visible=!1,s.applyVisible()}),this.five.ready().then(()=>{this.tagsDo(this.tags,s=>{s.updateVisible(),Bs(s)&&e!=="Panorama"&&this.changeTagMode(s,"behind")}),e==="Panorama"?this.updateMaskTagsForCurrentPano():this.filterMaskTag.forEach(s=>{s.state.visible=!1,s.applyVisible()})})};this.tags.length<500?i():this.five.ready().then(()=>i())});f(this,"handleFiveWantsMoveToPano",()=>{if(this.tags.length>500){this.temporaryState.visible=!1,this.addRenderQueue({type:"TagContainerSvelte",keys:["temporaryState"]});return}else this.temporaryState.visible=!0,this.tags.forEach(e=>{e.temporaryState.visible=!0}),this.addRenderQueue({type:"TagContainerSvelte",keys:["tags"]}),this.tags.forEach(e=>e.applyVisible())});f(this,"clickhandler",e=>{e.tag.onClick(e)});f(this,"handleFiveCameraUpdate",()=>{this.filterPointTag.forEach(e=>e.updateScreenPosition())});f(this,"handleFiveCameraFovUpdate",()=>{this.handleFiveCameraUpdate(),this.five.off("render.prepare",this.handleFiveCameraUpdate),this.five.on("render.prepare",this.handleFiveCameraUpdate),setTimeout(()=>{this.five.off("render.prepare",this.handleFiveCameraUpdate)},1e3)});f(this,"handleFivePanoArrived",()=>$(this,null,function*(){this.filter2DPointTag.forEach(e=>{e.state.visible=!1,e.applyVisible()}),this.tagsDo(this.tags,e=>{e.updateVisible()}),this.updateMaskTagsForCurrentPano(),this.temporaryState.visible=!0,this.addRenderQueue({type:"TagContainerSvelte",keys:["temporaryState"]}),yield this.setUnfolded(),this.tags.filter(w4).filter(e=>{var i;return(i=e.getConfig().modelConfig)==null?void 0:i.autoLookAtEnabled}).forEach(e=>{var c;const i=new b.Mesh(new b.BoxGeometry,new b.MeshBasicMaterial),s=(c=e.model)==null?void 0:c.object;if(!s)return;i.position.copy(s.position),i.quaternion.copy(s.quaternion);const o=this.five.camera.position;i.lookAt(o.clone().setY(i.position.y));const r=s.quaternion.clone(),a=i.quaternion.clone(),l=Gr();l.onUpdate(({progress:h})=>{s.quaternion.copy(r.clone().slerp(a,h))}),l.play()})}));f(this,"handleFiveModelShownFloorChange",()=>{this.tagsDo(this.tags,e=>e.updateVisible())});f(this,"onFiveRefined",hm(()=>{Ii(this.five.getCurrentState().mode)?this.setUnfoldedByCamera():this.tags.forEach(e=>e.cache.clear()),this.tagsDo(this.tags,e=>e.updateVisible())}));f(this,"onFiveEveryReady",()=>{this.setUnfoldedByCamera(),Ii(this.five.getCurrentState().mode)&&this.tagsDo(this.tags,e=>e.updateVisible())});f(this,"render",()=>{this.renderQueue.forEach((e,i)=>{const{keys:s}=e;if(i==="TagContainerSvelte"){const r=this.filterPointTag.filter(l=>l.screenPosition),a={hooks:this.hooks,tags:r,state:this.state,temporaryState:this.temporaryState,mediaStore:this.mediaStore,rendererMap:this.rendererMap,contentTypeMap:this.contentTypeMap,zIndex:this.params.containerZIndex};if(this.TagContainerSvelte){let l={};if(s.length===0)l=a;else for(const c of s)l[c]=a[c];this.TagContainerSvelte.$set(l)}else{if(!this.container)return console.error("updateRenderPlaneTag: tag2DContainer not found");this.TagContainerSvelte=new j6({target:this.container,props:de(V({},a),{state:de(V({},this.state),{enabled:!1})})}),aa(()=>{var l;(l=this.TagContainerSvelte)==null||l.$set({state:this.state})})}}}),this.renderQueue.clear()});this.params=it({},{debug:!1,config:this.config},V({},i)),this.debug=this.params.debug,this.config=this.params.config,this.debug&&this.debugUtil.bindLog(),D4(1,{namespace:Xu.PlayAudio});try{Array.isArray(window.__PANOTAGPLUGIN_DEBUG_LIST__)||(window.__PANOTAGPLUGIN_DEBUG_LIST__=[]),this.NAME=Vy+"-"+window.__PANOTAGPLUGIN_DEBUG_LIST__.length,window.__PANOTAGPLUGIN_DEBUG_LIST__.push(this),window.__PANOTAGPLUGIN_DEBUG__||Object.defineProperty(window,"__PANOTAGPLUGIN_DEBUG__",{get:function(){return window.__PANOTAGPLUGIN_DEBUG_LIST__.sort((s,o)=>o.tags.length-s.tags.length)[0]}})}catch(s){}}appendTo(e){var s,o,r;this.container=e;const i=(o=(s=this.TagContainerSvelte)==null?void 0:s.$$)==null?void 0:o.root;i&&i!==this.container&&((r=this.TagContainerSvelte)==null||r.$destroy(),this.TagContainerSvelte=void 0)}load(e){return $(this,null,function*(){var o,r;Mi.clearSharedMeshRegistry(),this.clearTags();try{console.debug(this.NAME," load:",{data:JSON.parse(JSON.stringify(e))})}catch(a){}const i=ki(this.five);e.tagList.forEach(a=>{if(a.enu_position&&this.isValidArrayPosition(a.enu_position))try{const l=Lt(a.enu_position),c=i.viewLayers[0].scene.enuToWorld(l);a.position=ri(c)}catch(l){}if(a.enu_normal&&this.isValidArrayPosition(a.enu_normal))try{const l=Lt(a.enu_normal),c=i.viewLayers[0].scene.enuToWorld(l);a.normal=ri(c)}catch(l){}}),this.config=it({},this.config,{globalConfig:(o=e.globalConfig)!=null?o:{},contentTypeConfig:(r=e.contentTypeConfig)!=null?r:{}});const s=yield this.addTag(e.tagList);return this.five.state.mode==="Panorama"&&this.updateMaskTagsForCurrentPano(),this.hooks.emit("loaded"),s})}addTag(e,i){return $(this,null,function*(){var a,l;const o=(Array.isArray(e)?e:[e]).filter(c=>c.stickType==="3DBox"||c.stickType==="Mask"||c.position);if(i!=null&&i.updateMaskUrl&&o.length===1&&o[0].stickType==="Mask"){const c=o[0],h=(a=c.maskUrl)!=null?a:c.mask,u=(l=c.fiveState)==null?void 0:l.panoIndex;h&&typeof u=="number"&&this.tags.filter(p=>{var m;return p instanceof Mi&&((m=p.fiveState)==null?void 0:m.panoIndex)===u}).forEach(p=>p.set({mask:h}))}const r=o.map(c=>{const h=Qu(c);return h==="2DPoint"||h==="3DPoint"?new G4(this,c):h==="Model"?new wy(this,c):h==="Plane"?new o7(this,c):h==="3DBox"?new a7(this,c):h==="Polygon"?new l7(this,c):h==="Mask"?new Mi(this,c):null});return r.forEach(c=>S4(c)),this.tags.push(...r),this.tagsLengthWillUpdate=!0,xi(this.five).then(()=>$(this,null,function*(){var c,h;this.store.eventListenerDisposer&&((h=(c=this.store).eventListenerDisposer)==null||h.call(c)),this.state.enabled&&this.handleEnable(),this.addResizeListener(),this.clearUnusedPanelTag(),this.tagsDo(r,u=>{this.tags.includes(u)&&(u.updateVisible(),u.updateZIndex())}),this.setUnfolded(),this.addRenderQueue({type:"TagContainerSvelte"}),this.hooks.emit("tagsLengthChange")}))})}changeConfig(e,i=!0){i?this.config=it({},this.config,e):this.config=e,this.tags.forEach(s=>{s.updateConfig()}),this.tagsDo(this.tags,s=>s.updateVisible())}changeGlobalConfig(e,i=!0){i?this.config.globalConfig=it({},this.config.globalConfig,e):this.config.globalConfig=e,this.tags.forEach(s=>{s.updateConfig()}),this.tagsDo(this.tags,s=>{s.updateVisible()})}changeContentTypeConfig(e,i,s=!0){this.config.contentTypeConfig||(this.config.contentTypeConfig={}),s?this.config.contentTypeConfig[e]=it({},this.config.contentTypeConfig[e],i):this.config.contentTypeConfig[e]=i,this.tags.forEach(o=>{o.updateConfig()}),this.tagsDo(this.tags,o=>{o.updateVisible()})}show(e){return $(this,null,function*(){if(this.checkDisposed())return;const{userAction:i=!0}=e!=null?e:{};this.setState({visible:!0},{userAction:i}),this.hooks.emit("show",{userAction:i})})}hide(e){return $(this,null,function*(){if(this.checkDisposed())return;const{userAction:i=!0}=e!=null?e:{};this.setState({visible:!1},{userAction:i}),this.hooks.emit("hide",{userAction:i})})}enable(e){if(this.checkDisposed())return;const{userAction:i=!0}=e!=null?e:{};this.setState({enabled:!0},{userAction:i}),this.hooks.emit("enable",{userAction:i})}disable(e){if(this.checkDisposed())return;const{userAction:i=!0}=e!=null?e:{};this.setState({enabled:!1},{userAction:i}),this.hooks.emit("disable",{userAction:i})}setState(e,i){if(this.checkDisposed())return;const{userAction:s=!0}=i!=null?i:{},o=V({},this.state);this.state=Object.assign(this.state,e),o.visible!==this.state.visible&&(e.visible?this.handleShow():this.handleHide()),o.enabled!==this.state.enabled&&(e.enabled?this.handleEnable():this.handleDisable()),this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:s})}dispose(){var e,i,s,o,r,a;this.pauseCurrentMedia(),this.disposeAllCSS3DContainer(),(e=this.TagContainerSvelte)==null||e.$destroy(),this.filterCSS3DTag.forEach(l=>{var c;return(c=l.tag3DContentSvelte)==null?void 0:c.svelteApp.$destroy()}),this.tags.forEach(l=>{var c;(c=l.rectanglePlane)==null||c.editor.disable(),l.cache.clear()}),this.tags=[],this.tagsLengthWillUpdate=!0,this.hooks.emit("tagsLengthChange"),(i=this.store.disposers)==null||i.forEach(l=>l==null?void 0:l()),this.store.disposers=[],(o=(s=this.store).eventListenerDisposer)==null||o.call(s),this.store.eventListenerDisposer=void 0,(a=(r=this.store).resizeObserverDisposer)==null||a.call(r),this.store.resizeObserverDisposer=void 0,this.store.resizeObserverDisposerAdding=!1,this.five.scene.remove(this.group),this.group.remove(...this.group.children),this.gltfObjectGroup.remove(...this.gltfObjectGroup.children),this.imagePlaneGroup.remove(...this.imagePlaneGroup.children),this.five.needsRender=!0,this.store.disposed=!0,this.hooks.emit("dispose")}blinkTagById(e,i){return $(this,null,function*(){var s;return(s=this.getTagById(e))==null?void 0:s.blink(i)})}changeUnfoldedById(e,i){const s=this.getTagById(e);i?s==null||s.unfold():s==null||s.fold()}changeEnabledById(e,i){var o;const s=this.getTagById(e);s&&(s.enabled=i,(o=s.hooks)==null||o.emit(i?"enable":"disable"))}changeTagNormalById(e,i){const s=this.getTagById(e);s&&s.tag3DContentSvelte&&(s.tag3DContentSvelte.currentNormal=Lt(i))}changePositionById(e,i){const s=this.getTagById(e);s&&s.setPosition(i)}changeDataById(e,i,s=!0){const o=this.getTagById(e);o&&(o.setData(i,s),this.clearUnusedPanelTag(),o.hooks.emit("dataChanged",o.data))}changeStickTypeById(e,i,s=!0){this.changeTagById(e,i,s)}changeTagById(e,i,s=!0){const o=this.getTagById(e);if(o){if(i.stickType&&i.stickType!==o.stickType){console.log(`[PanoTagPlugin] stickType changed from ${o.stickType} to ${i.stickType}, recreating tag`);const r=V({},o);this.destroyTagById(e),this.five.ready().then(()=>{this.addTag(V(V({},r),i))});return}o.set(i),o instanceof Mi&&o.updateMaskStyle(),o.updateVisible(),this.clearUnusedPanelTag(),o.hooks.emit("dataChanged",o.data)}}changeMask(e){if(!Array.isArray(e)||e.length===0){console.warn("[PanoTagPlugin] changeMask: invalid or empty maskUpdates");return}e.forEach(({index:i,mask:s})=>{if(typeof i!="number"){console.warn("[PanoTagPlugin] changeMask: invalid index",i);return}if(!s){console.warn("[PanoTagPlugin] changeMask: invalid mask for index",i);return}const o=this.tags.filter(r=>{var a;return r instanceof Mi&&((a=r.fiveState)==null?void 0:a.panoIndex)===i});if(o.length===0){console.debug(`[PanoTagPlugin] changeMask: no MaskTag found at panoIndex ${i}`);return}o.forEach(r=>{r.set({mask:s}),console.log(`[PanoTagPlugin] Updated mask for tag ${r.id} at panoIndex ${i}`)})}),this.five.needsRender=!0}destroyTagById(e){(Array.isArray(e)?e:[e]).forEach(s=>{var o;return(o=this.getTagById(s))==null?void 0:o.destroy()})}updateRenderAllTags(){this.tagsDo(this.tags,e=>e.updateVisible()),this.five.needsRender=!0}clearTags(){var e;this.tags.length&&(this.tags.forEach(i=>{var s,o,r,a,l,c,h,u,d,p,m;(s=i.tag3DContentSvelte)==null||s.dispose(),(r=(o=i.mediaPlane)==null?void 0:o.parent)==null||r.remove(i.mediaPlane),(c=(l=(a=i.model)==null?void 0:a.object)==null?void 0:l.parent)==null||c.remove(i.model.object),(u=(h=i.rectanglePlane)==null?void 0:h.parent)==null||u.remove(i.rectanglePlane),(d=i.boxShape)!=null&&d.parent&&i.boxShape.parent.remove(i.boxShape),(m=(p=i.polygonShape)==null?void 0:p.parent)==null||m.remove(i.polygonShape),i!=null&&i.tagNormalLine&&(i==null||i.removeTagNormalLine()),i instanceof Mi&&i.dispose()}),this.tags=[],this.tagsLengthWillUpdate=!0,this.hooks.emit("tagsLengthChange"),(e=this.TagContainerSvelte)==null||e.$destroy(),this.TagContainerSvelte=void 0,this.disposeAllCSS3DContainer()),this.enabledModelTagSet.clear(),this.cache.clear()}setUnfolded(){return $(this,null,function*(){return new Promise(e=>{setTimeout(()=>{this.setUnfoldedByCamera(),e()},100)})})}handleShow(){this.state.visible=!0,this.group.visible=!0,this.addRenderQueue({type:"TagContainerSvelte",keys:["state"]}),this.updateRenderAllTags(),this.five.needsRender=!0}handleHide(){this.pauseCurrentMedia(),this.state.visible=!1,this.group.visible=!1,this.addRenderQueue({type:"TagContainerSvelte",keys:["state"]}),this.five.needsRender=!0}handleEnable(){this.state.enabled=!0,this.store.eventListenerDisposer=this.addEventListener(),this.five.scene.children.includes(this.group)||this.five.scene.add(this.group),this.five.needsRender=!0}handleDisable(){var e,i,s;this.pauseCurrentMedia(),this.tags.forEach(o=>{var r;return(r=o.rectanglePlane)==null?void 0:r.delete()}),this.state.enabled=!1,(i=(e=this.store).eventListenerDisposer)==null||i.call(e),this.five.scene.remove(this.group),(s=this.TagContainerSvelte)==null||s.$set({tags:[]}),this.five.needsRender=!0}addResizeListener(){if(!this.store.resizeObserverDisposer&&!this.store.resizeObserverDisposerAdding){const e=this.addResizeObserver();this.store.resizeObserverDisposerAdding=!0,setTimeout(()=>{this.store.resizeObserverDisposer=e,this.store.resizeObserverDisposerAdding=!1},200)}}addResizeObserver(){if(this.store.disposed)return;const e=this.five.getElement(),i=()=>{this.state.enabled&&(this.filterPointTag.forEach(c=>c.updateScreenPosition({force:!0})),this.temporaryState.visible=!0,this.addRenderQueue({type:"TagContainerSvelte",keys:["temporaryState"]}))},s=()=>{this.state.enabled&&(this.temporaryState.visible=!1,this.addRenderQueue({type:"TagContainerSvelte",keys:["temporaryState"]}))},{observe:o,unobserve:r}=Ka(E4(()=>{this.store.resizeObserverDisposer&&s()},500),e),{observe:a,unobserve:l}=Ka(hm(()=>i(),400),e);return o(),a(),()=>{r(),l()}}setUnfoldedByCamera(){let e=!1;this.filterPointTag.forEach(i=>{const s=i.getUnfoldedByCamera();if(i.state&&s!==void 0){if(s===!0&&i.screenPosition){const o=i.getConfig().unfoldedConfig;qs(o).keep!=="unfolded"&&(e=!0)}i.state.unfolded=s}}),e&&this.filterPointTag.forEach(i=>{const s=i.getConfig().unfoldedConfig;typeof s=="object"&&(s.autoUnfold||s.autoUnfold===!1||qs(s.autoUnfold).enable===!1||s.keep)||i.state&&(i.state.unfolded=!1)})}changeTagMode(e,i){var s;(s=e.tag3DContentSvelte)!=null&&s.css3DInstance&&(e.tag3DContentSvelte.css3DInstance.mode=i)}addEventListener(){const{five:e,hooks:i}=this,s=Gh(this.five,this.onFiveEveryReady);return this.handleFivePanoArrived(),e.on("wantsMoveToPano",this.handleFiveWantsMoveToPano),e.on("models.refined",this.onFiveRefined),e.on("modeChange",this.handleFiveModeChange),e.on("modelShownFloorChange",this.handleFiveModelShownFloorChange),e.on("cameraUpdate",this.handleFiveCameraUpdate),e.on("cameraFovUpdate",this.handleFiveCameraFovUpdate),e.on("panoArrived",this.handleFivePanoArrived),e.on("panoArrived",this.loadVideoFirstFrame),e.on("render.prepare",this.render),i.on("click",this.clickhandler),()=>{s(),e.off("wantsMoveToPano",this.handleFiveWantsMoveToPano),e.off("models.refined",this.onFiveRefined),e.off("modeChange",this.handleFiveModeChange),e.off("modelShownFloorChange",this.handleFiveModelShownFloorChange),e.off("cameraUpdate",this.handleFiveCameraUpdate),e.off("cameraFovUpdate",this.handleFiveCameraFovUpdate),e.off("panoArrived",this.handleFivePanoArrived),e.off("panoArrived",this.loadVideoFirstFrame),e.off("render.prepare",this.render),i.off("click",this.clickhandler),this.store.eventListenerDisposer=void 0}}setTagHoverEnabled(e,i){const s=this.getTagById(e);s&&(s.hoverEnabled=i)}getTagHoverEnabled(e){const i=this.getTagById(e);return i==null?void 0:i.hoverEnabled}setGlobalHoverEnabled(e){this.globalHoverEnabled=e}getGlobalHoverEnabled(){return this.globalHoverEnabled}isValidArrayPosition(e){return!Array.isArray(e)||e.length!==3?!1:e.every(i=>typeof i=="number"&&!isNaN(i)&&isFinite(i))}updateMaskTagsForCurrentPano(){const e=this.five.getCurrentState().panoIndex;console.log("[PanoTagPlugin] updateMaskTagsForCurrentPano, current panoIndex:",e,"mask tags count:",this.filterMaskTag.length),this.filterMaskTag.forEach(i=>{var o;const s=(o=i.fiveState)==null?void 0:o.panoIndex;console.log("[PanoTagPlugin] Processing mask tag:",i.id,"tagPanoIndex:",s,"matches current:",s===e),s===e?(console.log("[PanoTagPlugin] Tag matches current pano, updating visibility..."),i.updateVisible(),i.applyVisible()):i.visible&&(console.log("[PanoTagPlugin] Tag is from different pano, hiding..."),i.state.visible=!1,i.applyVisible())})}get filterMaskTag(){return this.tags.filter(e=>e.stickType==="Mask")}getMaskTagPerformanceStats(){const e=Mi.getCacheStats(),i=this.filterMaskTag.length,s=this.filterMaskTag.filter(o=>o.visible).length;return{totalMaskTags:i,visibleMaskTags:s,textureCache:e,currentPanoIndex:this.five.state.panoIndex}}clearMaskTagCache(){Mi.clearAllCache()}}const _6=(n,t)=>new kl(n,t);function V6(n){Le(n,"svelte-f09cfl",".guide-line__tag.svelte-f09cfl.svelte-f09cfl{position:relative}.text-with-distance.svelte-f09cfl.svelte-f09cfl{display:flex;flex-direction:column;position:relative;padding:0.125rem 0.25rem;border-radius:0.125rem;background:linear-gradient(to top, rgba(147, 147, 147, 0.3), rgba(74, 74, 74, 0.3));box-shadow:0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.2)}.text-with-distance.svelte-f09cfl .border.svelte-f09cfl{position:absolute;top:-50%;right:-50%;bottom:-50%;left:-50%;padding:0.0625rem;border-radius:0.25rem;background:linear-gradient(to right, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2));-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);mask-composite:exclude;-webkit-mask-composite:xor;transform:scale(0.5)}.distance-and-name.svelte-f09cfl.svelte-f09cfl{display:flex;gap:0.1875rem}.distance.svelte-f09cfl.svelte-f09cfl{white-space:nowrap;font-size:0.625rem;line-height:0.875rem;color:#66afff}.name.svelte-f09cfl.svelte-f09cfl{opacity:0.6;font-size:0.625rem;line-height:0.875rem;white-space:nowrap;color:#ffffff}.line-name.svelte-f09cfl.svelte-f09cfl{color:#fff;white-space:nowrap;font-size:0.625rem;line-height:0.875rem}.guide-line__tag-point.svelte-f09cfl.svelte-f09cfl{position:absolute;left:50%;bottom:0.0625rem;width:0.4375rem;height:0.125rem;transform:translateX(-50%);background:#fff;border-radius:50%;opacity:0.5}.guide-line__tag-line.svelte-f09cfl.svelte-f09cfl{position:absolute;left:50%;bottom:0.0625rem;width:0.0625rem;height:1.875rem;transform:translateX(-50%);background:linear-gradient(to top, #fff, rgba(255, 255, 255, 0))}.guide-line__tag-content.svelte-f09cfl.svelte-f09cfl{position:absolute;left:-0.9375rem;bottom:1.9375rem;display:flex;justify-content:center;align-items:center}.guide-line__tag-icon.svelte-f09cfl.svelte-f09cfl{width:1.875rem;height:1.875rem;background-size:100%}.guide-line__tag-text.svelte-f09cfl.svelte-f09cfl{box-sizing:content-box;width:-moz-max-content;width:max-content;transform:translateX(-0.1875rem);white-space:nowrap;font-size:0.625rem;line-height:0.875rem;border:solid transparent;border-width:0.125rem 0.5rem 0.125rem 0.375rem;border-image-slice:6 25 6 18 fill;color:#fff;display:flex;align-items:center;justify-content:center}")}function h0(n){let t,e;return{c(){t=U("div"),e=Fe(n[0]),P(t,"class","guide-line__tag-text svelte-f09cfl"),_(t,"font-size",n[8]),_(t,"padding",n[7]),_(t,"border-image-source",`url(${n[9]})`)},m(i,s){Z(i,t,s),B(t,e)},p(i,s){s&1&&Ne(e,i[0]),s&256&&_(t,"font-size",i[8]),s&128&&_(t,"padding",i[7])},d(i){i&&X(t)}}}function u0(n){let t,e,i,s,o,r,a,l,c,h,u=n[4]&&d0(n);return{c(){t=U("div"),u&&u.c(),e=ue(),i=U("div"),s=U("span"),o=Fe(n[2]),r=ue(),a=U("span"),l=Fe(n[0]),c=ue(),h=U("div"),P(s,"class","distance svelte-f09cfl"),_(s,"line-height",n[5]),_(s,"font-size",n[8]),P(a,"class","name svelte-f09cfl"),_(a,"line-height",n[5]),_(a,"font-size",n[8]),P(i,"class","distance-and-name svelte-f09cfl"),P(h,"class","border svelte-f09cfl"),P(t,"class","text-with-distance svelte-f09cfl"),_(t,"padding",n[6])},m(d,p){Z(d,t,p),u&&u.m(t,null),B(t,e),B(t,i),B(i,s),B(s,o),B(i,r),B(i,a),B(a,l),B(t,c),B(t,h)},p(d,p){d[4]?u?u.p(d,p):(u=d0(d),u.c(),u.m(t,e)):u&&(u.d(1),u=null),p&4&&Ne(o,d[2]),p&32&&_(s,"line-height",d[5]),p&256&&_(s,"font-size",d[8]),p&1&&Ne(l,d[0]),p&32&&_(a,"line-height",d[5]),p&256&&_(a,"font-size",d[8]),p&64&&_(t,"padding",d[6])},d(d){d&&X(t),u&&u.d()}}}function d0(n){let t,e;return{c(){t=U("span"),e=Fe(n[4]),P(t,"class","line-name svelte-f09cfl"),_(t,"line-height",n[5]),_(t,"font-size",n[8])},m(i,s){Z(i,t,s),B(t,e)},p(i,s){s&16&&Ne(e,i[4]),s&32&&_(t,"line-height",i[5]),s&256&&_(t,"font-size",i[8])},d(i){i&&X(t)}}}function F6(n){let t,e,i,s,o,r,a,l,c,h=n[0]&&!n[2]&&h0(n),u=n[2]&&u0(n);return{c(){t=U("div"),e=U("div"),i=ue(),s=U("div"),o=ue(),r=U("div"),a=U("div"),l=ue(),h&&h.c(),c=ue(),u&&u.c(),P(e,"class","guide-line__tag-point svelte-f09cfl"),P(s,"class","guide-line__tag-line svelte-f09cfl"),P(a,"class","guide-line__tag-icon svelte-f09cfl"),_(a,"background-image",`url(${n[1]})`),P(r,"class","guide-line__tag-content svelte-f09cfl"),P(t,"class","guide-line__tag svelte-f09cfl"),_(t,"opacity",n[3])},m(d,p){Z(d,t,p),B(t,e),B(t,i),B(t,s),B(t,o),B(t,r),B(r,a),B(r,l),h&&h.m(r,null),B(r,c),u&&u.m(r,null)},p(d,[p]){p&2&&_(a,"background-image",`url(${d[1]})`),d[0]&&!d[2]?h?h.p(d,p):(h=h0(d),h.c(),h.m(r,c)):h&&(h.d(1),h=null),d[2]?u?u.p(d,p):(u=u0(d),u.c(),u.m(r,null)):u&&(u.d(1),u=null),p&8&&_(t,"opacity",d[3])},i:ce,o:ce,d(d){d&&X(t),h&&h.d(),u&&u.d()}}}function B6(n,t,e){let i,s,o,r,a,l,c,h,{text:u=""}=t,{icon_url:d=""}=t,{distance:p=""}=t,{opacity:m=1}=t,{name:g=""}=t,{fontSize:v="md"}=t;const y="data:image/png;base64,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";return n.$$set=w=>{"text"in w&&e(0,u=w.text),"icon_url"in w&&e(1,d=w.icon_url),"distance"in w&&e(2,p=w.distance),"opacity"in w&&e(3,m=w.opacity),"name"in w&&e(4,g=w.name),"fontSize"in w&&e(10,v=w.fontSize)},n.$$.update=()=>{var w,C;n.$$.dirty&1024&&e(12,i=ku[v]),n.$$.dirty&4096&&e(8,s=ft((i==null?void 0:i.name)||12)),n.$$.dirty&4096&&e(14,o=((w=i==null?void 0:i.padding)==null?void 0:w.guide)||[8,2]),n.$$.dirty&16384&&e(7,r=`${ft(o[1])} ${ft(o[0])}`),n.$$.dirty&4096&&e(13,a=((C=i==null?void 0:i.padding)==null?void 0:C.distance)||[4,2]),n.$$.dirty&8192&&e(6,l=`${ft(a[1])} ${ft(a[0])}`),n.$$.dirty&4096&&e(11,c=(i==null?void 0:i.lineHeight)||14),n.$$.dirty&2048&&e(5,h=ft(c))},[u,d,p,m,g,h,l,r,s,y,v,c,i,a,o]}class H6 extends Ee{constructor(t){super(),Ie(this,t,B6,F6,Me,{text:0,icon_url:1,distance:2,opacity:3,name:4,fontSize:10},V6)}}function N6(n){return n.length===0?[]:n.filter((t,e)=>t!==n[e-1])}function G6(n,t,e){if(n.length<2)return[];const i=[];n.forEach((r,a)=>{var u,d,p,m,g,v,y,w;let l=(u=e==null?void 0:e.route_standing_positions)==null?void 0:u[r];if(l||(l=(p=(d=t.observers[r])==null?void 0:d.standingPosition)==null?void 0:p.toArray()),!l)return;const c=n[a-1],h=(w=(g=(m=e==null?void 0:e.node_pair_to_route_points)==null?void 0:m[`${c}:${r}`])==null?void 0:g.slice())!=null?w:(y=(v=e==null?void 0:e.node_pair_to_route_points)==null?void 0:v[`${r}:${c}`])==null?void 0:y.slice().reverse();h==null||h.forEach(C=>{i.push(C)}),i.push(l)});const s=t.transform,o=i.map(r=>Vt(new b.Vector3().fromArray(r),s).toArray());return[de(V({},e),{type:"CatmullRomCurve3",points:o})]}const W6=`
|
|
1117
|
+
`}}const j=()=>{if(!m.screenPosition||!v||!y)return s;const te=(g==null?void 0:g.autoPlacementBaseSpace)||{top:.2,bottom:.2,right:.15},ke=y.clientWidth,Re=y.clientHeight,ye=Re*te.top,De=Re*(1-te.bottom),ve=ke*(1-te.right),Ae=m.screenPosition.leftPx,Oe=m.screenPosition.topPx,Ye=I.width||280,Ze=I.height||200;return Oe<=ye?Ae<=ve?Ae+Ye<=ke&&Oe+Ze<=Re?"right-top":"bottom-left":Ae-Ye>=0&&Oe+Ze<=Re?"left-top":"bottom-right":Oe>=De?Ae<=ve?Ae+Ye<=ke&&Oe-Ze>=0?"right-bottom":"top-left":Ae-Ye>=0&&Oe-Ze>=0?"left-bottom":"top-right":Ae<=ve?Ae+Ye<=ke?"right-top":"left-top":Ae-Ye>=0?"left-top":"right-top"},F=(te,ke)=>{switch(te){case"top":case"top-left":case"top-right":return{x:ke.left+ke.width/2,y:ke.top};case"bottom":case"bottom-left":case"bottom-right":return{x:ke.left+ke.width/2,y:ke.top+ke.height};case"left":case"left-top":case"left-bottom":return{x:ke.left,y:ke.top+ke.height/2};case"right":case"right-top":case"right-bottom":return{x:ke.left+ke.width,y:ke.top+ke.height/2};default:return{x:ke.left+ke.width/2,y:ke.top}}},J=te=>{ee(),p&&p.emit("click",{event:te.detail.event,target:"TagPopoverViewMore",tag:m})},ne=te=>{ee(),p&&p.emit("click",{event:te.detail.event,target:"TagPopoverShare",tag:m})},q=te=>{e(29,I=te.detail),I.width>0&&I.height>0&&e(8,x=j())},oe=te=>{d||ee(),te.stopPropagation(),p.emit("click",{event:te,target:"TagPopoverContent",tag:m})};let se=null,ae=!1;function ze(){w&&se&&se.parentNode!==w&&w.appendChild(se)}zt(()=>{(!y||y===document.body)&&console.warn("TagPopover 组件警告:禁止使用 document.body 作为 wrapperElement,请传入自定义容器元素。"),ae=!0,ze(),y&&y!==document.body&&e(25,y.style.overflow="hidden",y)}),Cu(()=>{ae&&ze()}),Kt(()=>{se&&se.parentNode&&se.parentNode.removeChild(se),y&&y!==document.body&&e(25,y.style.overflow="",y)});function ee(){typeof D=="function"&&D(),A("close")}function we(te){_n.call(this,n,te)}function le(te){_n.call(this,n,te)}function he(te){qe[te?"unshift":"push"](()=>{M=te,e(9,M)})}function be(te){qe[te?"unshift":"push"](()=>{se=te,e(10,se)})}return n.$$set=te=>{"tag"in te&&e(0,m=te.tag),"config"in te&&e(1,g=te.config),"triggerElement"in te&&e(26,v=te.triggerElement),"wrapperElement"in te&&e(25,y=te.wrapperElement),"popoverContainer"in te&&e(27,w=te.popoverContainer),"theme"in te&&e(2,C=te.theme),"visible"in te&&e(3,E=te.visible),"closePopover"in te&&e(28,D=te.closePopover),"audioInstance"in te&&e(4,L=te.audioInstance),"audioPlaying"in te&&e(5,R=te.audioPlaying),"audioCurrentTime"in te&&e(6,z=te.audioCurrentTime),"audioDuration"in te&&e(7,O=te.audioDuration)},n.$$.update=()=>{if(n.$$.dirty[0]&5&&e(18,i=(()=>Ge(C)?C:Ge(m.data.theme)&&["light","dark"].includes(m.data.theme)?m.data.theme:m.contentType==="Marketing"?"light":"dark")()),n.$$.dirty[0]&2&&e(32,s=(g==null?void 0:g.placement)||"right-top"),n.$$.dirty[0]&2&&e(16,a=(()=>typeof(g==null?void 0:g.toolbar)=="boolean"?g.toolbar?{showMore:!0,showShare:!0}:{showMore:!1,showShare:!1}:(g==null?void 0:g.toolbar)||{showMore:!0,showShare:!0})()),n.$$.dirty[1]&2&&(s==="auto"?e(8,x=j()):e(8,x=s)),n.$$.dirty[0]&2&&e(15,l=(g==null?void 0:g.transitionDuration)||350),n.$$.dirty[0]&67108865&&m.screenPosition&&v&&e(8,x=j()),n.$$.dirty[0]&536870912&&I.width>0&&I.height>0&&e(8,x=j()),n.$$.dirty[0]&67109121&&m.screenPosition&&x&&v){const te=v.getBoundingClientRect();te.width>0&&te.height>0&&e(30,k=F(x,te))}n.$$.dirty[0]&1073741824&&e(14,c=k),n.$$.dirty[1]&1&&e(13,h=typeof o=="boolean"?o:!0),n.$$.dirty[0]&256&&e(12,u=(()=>{switch(x){case"top":case"top-left":case"top-right":return"bottom";case"bottom":case"bottom-left":case"bottom-right":return"top";case"left":case"left-top":case"left-bottom":return"right";case"right":case"right-top":case"right-bottom":return"left";default:return"bottom"}})()),n.$$.dirty[0]&1&&e(11,d=m.contentType==="Audio"&&m.data.appearance==="plane")},e(31,o=!0),e(17,r=1060),[m,g,C,E,L,R,z,O,x,M,se,d,u,h,c,l,a,r,i,S,J,ne,q,oe,ee,y,v,w,D,I,k,o,s,we,le,he,be]}class P6 extends Ee{constructor(t){super(),Ie(this,t,w6,A6,Me,{tag:0,config:1,triggerElement:26,wrapperElement:25,popoverContainer:27,theme:2,visible:3,closePopover:28,audioInstance:4,audioPlaying:5,audioCurrentTime:6,audioDuration:7},b6,[-1,-1])}}function C6(n){Le(n,"svelte-2g2g8a",".tag.svelte-2g2g8a{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto;will-change:opacity;transition:opacity 0.2s linear}.tag.enableZIndex.svelte-2g2g8a{position:absolute}.tag.hide.svelte-2g2g8a{opacity:0;pointer-events:none}.tag.hide.svelte-2g2g8a *{pointer-events:none !important}.tag.unClickable.svelte-2g2g8a{pointer-events:none !important}.tag.unClickable.svelte-2g2g8a *{pointer-events:none !important}")}function o0(n){let t,e,i,s,o,r,a,l,c,h;const u=[I6,M6],d=[];function p(y,w){return y[10]?0:1}e=p(n),i=d[e]=u[e](n);const m=[k6,E6],g=[];function v(y,w){return y[25]?0:1}return o=v(n),r=g[o]=m[o](n),{c(){t=U("div"),i.c(),s=ue(),r.c(),P(t,"class","tag svelte-2g2g8a"),P(t,"data-tag-id",n[23]),P(t,"data-tag-unfolded",n[8]),P(t,"data-content-type",a=n[0].contentType),P(t,"data-popover-enabled",l=n[0].isPopoverConfigEnabled()),P(t,"id",c=`tag-${n[23]}`),Pe(t,"unClickable",n[0].config.clickable===!1),Pe(t,"hide",n[21]),Pe(t,"enableZIndex",n[18]),_(t,"z-index",n[18]),_(t,"transform",`translate3d(${n[20]}, ${n[19]}, 0) scale(${n[9].scale})`)},m(y,w){Z(y,t,w),d[e].m(t,null),B(t,s),g[o].m(t,null),n[36](t),h=!0},p(y,w){let C=e;e=p(y),e===C?d[e].p(y,w):(xe(),Y(d[C],1,1,()=>{d[C]=null}),Se(),i=d[e],i?i.p(y,w):(i=d[e]=u[e](y),i.c()),H(i,1),i.m(t,s));let E=o;o=v(y),o===E?g[o].p(y,w):(xe(),Y(g[E],1,1,()=>{g[E]=null}),Se(),r=g[o],r?r.p(y,w):(r=g[o]=m[o](y),r.c()),H(r,1),r.m(t,null)),(!h||w[0]&8388608)&&P(t,"data-tag-id",y[23]),(!h||w[0]&256)&&P(t,"data-tag-unfolded",y[8]),(!h||w[0]&1&&a!==(a=y[0].contentType))&&P(t,"data-content-type",a),(!h||w[0]&1&&l!==(l=y[0].isPopoverConfigEnabled()))&&P(t,"data-popover-enabled",l),(!h||w[0]&8388608&&c!==(c=`tag-${y[23]}`))&&P(t,"id",c),(!h||w[0]&1)&&Pe(t,"unClickable",y[0].config.clickable===!1),(!h||w[0]&2097152)&&Pe(t,"hide",y[21]),(!h||w[0]&262144)&&Pe(t,"enableZIndex",y[18]),w[0]&262144&&_(t,"z-index",y[18]),w[0]&1573376&&_(t,"transform",`translate3d(${y[20]}, ${y[19]}, 0) scale(${y[9].scale})`)},i(y){h||(H(i),H(r),h=!0)},o(y){Y(i),Y(r),h=!1},d(y){y&&X(t),d[e].d(),g[o].d(),n[36](null)}}}function M6(n){let t;return{c(){t=U("div"),P(t,"data-info","tag point is disable")},m(e,i){Z(e,t,i)},p:ce,i:ce,o:ce,d(e){e&&X(t)}}}function I6(n){let t,e,i;function s(r){n[34](r)}let o={tag:n[0],handleMouseEnter:n[30],handleMouseLeave:n[31],handleTagPointClick:n[32]};return n[12]!==void 0&&(o.tagPointClickHelper=n[12]),t=new C7({props:o}),qe.push(()=>Wl(t,"tagPointClickHelper",s)),n[35](t),t.$on("audioInstanceReady",n[27].audioInstanceReady),t.$on("audioPlay",n[27].audioPlay),t.$on("audioPause",n[27].audioPause),t.$on("audioTimeUpdate",n[27].audioTimeUpdate),t.$on("audioDuration",n[27].audioDuration),{c(){ge(t.$$.fragment)},m(r,a){pe(t,r,a),i=!0},p(r,a){const l={};a[0]&1&&(l.tag=r[0]),!e&&a[0]&4096&&(e=!0,l.tagPointClickHelper=r[12],Gl(()=>e=!1)),t.$set(l)},i(r){i||(H(t.$$.fragment,r),i=!0)},o(r){Y(t.$$.fragment,r),i=!1},d(r){n[35](null),me(t,r)}}}function E6(n){let t;return{c(){t=U("div"),P(t,"data-info","tag content is disable")},m(e,i){Z(e,t,i)},p:ce,i:ce,o:ce,d(e){e&&X(t)}}}function k6(n){let t,e;return t=new od({props:{mediaStore:n[1],tag:mt(n[0]),hooks:n[26],state:n[4],temporaryState:n[5],rendererMap:n[2],contentTypeMap:n[3]}}),{c(){ge(t.$$.fragment)},m(i,s){pe(t,i,s),e=!0},p(i,s){const o={};s[0]&2&&(o.mediaStore=i[1]),s[0]&1&&(o.tag=mt(i[0])),s[0]&16&&(o.state=i[4]),s[0]&32&&(o.temporaryState=i[5]),s[0]&4&&(o.rendererMap=i[2]),s[0]&8&&(o.contentTypeMap=i[3]),t.$set(o)},i(i){e||(H(t.$$.fragment,i),e=!0)},o(i){Y(t.$$.fragment,i),e=!1},d(i){me(t,i)}}}function r0(n){var i;let t,e;return t=new P6({props:{tag:n[0],config:n[0].config.popoverConfig,theme:(i=n[0].config.popoverConfig)==null?void 0:i.theme,wrapperElement:n[6],triggerElement:n[12],popoverContainer:n[7],visible:!0,closePopover:n[33],audioInstance:n[14],audioPlaying:n[15],audioCurrentTime:n[16],audioDuration:n[17]}}),t.$on("mouseenter",n[28]),t.$on("mouseleave",n[29]),t.$on("close",n[33]),{c(){ge(t.$$.fragment)},m(s,o){pe(t,s,o),e=!0},p(s,o){var a;const r={};o[0]&1&&(r.tag=s[0]),o[0]&1&&(r.config=s[0].config.popoverConfig),o[0]&1&&(r.theme=(a=s[0].config.popoverConfig)==null?void 0:a.theme),o[0]&64&&(r.wrapperElement=s[6]),o[0]&4096&&(r.triggerElement=s[12]),o[0]&128&&(r.popoverContainer=s[7]),o[0]&16384&&(r.audioInstance=s[14]),o[0]&32768&&(r.audioPlaying=s[15]),o[0]&65536&&(r.audioCurrentTime=s[16]),o[0]&131072&&(r.audioDuration=s[17]),t.$set(r)},i(s){e||(H(t.$$.fragment,s),e=!0)},o(s){Y(t.$$.fragment,s),e=!1},d(s){me(t,s)}}}function x6(n){var a;let t,e=n[0].isPopoverConfigEnabled()&&n[24]&&(n[11]||((a=n[0].config.popoverConfig)==null?void 0:a.debug)),i,s,o=n[9]&&(!n[22]||n[11])&&o0(n),r=e&&r0(n);return{c(){o&&o.c(),t=ue(),r&&r.c(),i=Be()},m(l,c){o&&o.m(l,c),Z(l,t,c),r&&r.m(l,c),Z(l,i,c),s=!0},p(l,c){var h;l[9]&&(!l[22]||l[11])?o?(o.p(l,c),c[0]&4196864&&H(o,1)):(o=o0(l),o.c(),H(o,1),o.m(t.parentNode,t)):o&&(xe(),Y(o,1,1,()=>{o=null}),Se()),c[0]&16779265&&(e=l[0].isPopoverConfigEnabled()&&l[24]&&(l[11]||((h=l[0].config.popoverConfig)==null?void 0:h.debug))),e?r?(r.p(l,c),c[0]&16779265&&H(r,1)):(r=r0(l),r.c(),H(r,1),r.m(i.parentNode,i)):r&&(xe(),Y(r,1,1,()=>{r=null}),Se())},i(l){s||(H(o),H(r),s=!0)},o(l){Y(o),Y(r),s=!1},d(l){o&&o.d(l),l&&X(t),r&&r.d(l),l&&X(i)}}}function S6(n,t,e){let i,s,o,r,a,l,c,h,u,d,p,{tag:m}=t,{mediaStore:g}=t,{rendererMap:v=new Map}=t,{contentTypeMap:y=new Map}=t,{state:w}=t,{temporaryState:C}=t,{wrapperElement:E=null}=t,{popoverContainer:D=null}=t;const L=cn("hooks");let R=!1,z,O,A=null,M=!1,I=!1,k=null,x=null,S=!1,j=0,F=0;const J={audioInstanceReady:te=>{e(14,x=te.detail),e(15,S=!x.paused)},audioPlay:()=>{e(15,S=!0)},audioPause:()=>{e(15,S=!1)},audioTimeUpdate:te=>{e(16,j=te.detail)},audioDuration:te=>{e(17,F=te.detail)}};let ne=!1;const q=te=>{if(O&&clearTimeout(O),te===!0&&!ne){ne=!0,e(11,R=!0);return}O=setTimeout(()=>{var ke;!M&&!I&&!((ke=m.config.popoverConfig)!=null&&ke.debug)&&(ne=!1,e(11,R=!1))},300)},oe=()=>{M=!0,O&&clearTimeout(O)},se=()=>{M=!1,q(!1)},ae=te=>{var Re,ye,De,ve,Ae,Oe;if(te.pointerType!=="mouse")return;I=!0;const ke=(ye=(Re=m.currentConfig)==null?void 0:Re.popoverConfig)==null?void 0:ye.trigger;if(m.isPopoverConfigEnabled()&&m.isHoverEnabled()&&ke==="hover"){if(O&&clearTimeout(O),z!==void 0)return;((ve=(De=m.currentConfig)==null?void 0:De.popoverConfig)==null?void 0:ve.triggerDelay)>0?z=setTimeout(()=>{q(!0),m.hooks.emit("hover",{event:te,tag:m}),z=void 0},(Oe=(Ae=m.currentConfig)==null?void 0:Ae.popoverConfig)==null?void 0:Oe.triggerDelay):(q(!0),m.hooks.emit("hover",{event:te,tag:m}))}},ze=te=>{var Re,ye;if(te.pointerType!=="mouse")return;I=!1;const ke=(ye=(Re=m.currentConfig)==null?void 0:Re.popoverConfig)==null?void 0:ye.trigger;m.isHoverEnabled()&&m.isPopoverConfigEnabled()&&ke==="hover"&&(z!==void 0&&(clearTimeout(z),z=void 0),q(!1))},ee=te=>{var ye,De;const ke=m.contentType==="Audio"&&m.data.appearance==="plane",Re=(De=(ye=m.currentConfig)==null?void 0:ye.popoverConfig)==null?void 0:De.trigger;m.isPopoverConfigEnabled()&&m.isHoverEnabled()&&Re==="click"&&(ke?R||(e(11,R=!0),m.hooks.emit("hover",{event:te,tag:m})):(e(11,R=!R),R&&m.hooks.emit("hover",{event:te,tag:m})))};function we(){ne=!1,e(11,R=!1)}zt(()=>()=>{z&&clearTimeout(z),O&&clearTimeout(O)});function le(te){A=te,e(12,A)}function he(te){qe[te?"unshift":"push"](()=>{k=te,e(13,k)})}function be(te){qe[te?"unshift":"push"](()=>{m.dom=te,e(0,m)})}return n.$$set=te=>{"tag"in te&&e(0,m=te.tag),"mediaStore"in te&&e(1,g=te.mediaStore),"rendererMap"in te&&e(2,v=te.rendererMap),"contentTypeMap"in te&&e(3,y=te.contentTypeMap),"state"in te&&e(4,w=te.state),"temporaryState"in te&&e(5,C=te.temporaryState),"wrapperElement"in te&&e(6,E=te.wrapperElement),"popoverContainer"in te&&e(7,D=te.popoverContainer)},n.$$.update=()=>{var te,ke,Re,ye;n.$$.dirty[0]&5&&e(10,i=(()=>{var De,ve,Ae;return((ve=(De=m.style)==null?void 0:De.point)==null?void 0:ve.enabled)===!1||((Ae=v.get(m.contentType))==null?void 0:Ae.usePoint)===!1||m.contentType==="Sticker"||m.contentType==="Link"||m.contentType==="VRLink"||m.contentType==="PanoLink"?!1:m.contentType==="Panorama"?!0:m.contentType==="Audio"&&m.data.appearance==="plane"?m.isPopoverConfigEnabled():!(m.stickType&&m.stickType!=="2DPoint"&&m.stickType!=="3DPoint")})()),n.$$.dirty[0]&1029&&e(25,s=(()=>m.isPopoverConfigEnabled()&&m.contentType==="Panorama"||m.isPopoverConfigEnabled()&&m.contentType==="ImageText"||m.isPopoverConfigEnabled()&&m.contentType==="Text"||m.isPopoverConfigEnabled()&&m.contentType==="Audio"?!1:m.element||v.has(m.contentType)?!0:!(m.stickType&&m.stickType!=="2DPoint"&&m.stickType!=="3DPoint"||m.entryFromModel&&Ii(m.five.state.mode)&&i))()),n.$$.dirty[0]&1&&e(24,o=(()=>{var De;return m.contentType==="Marketing"?!!(m.data.title||m.data.name||m.data.description||m.data.tooltip||(De=m.data.price)!=null&&De.value||m.data.brandTags&&m.data.brandTags.length>0||m.data.tags&&m.data.tags.length>0||m.data.imageUrl||m.data.mediaUrl||m.data.mediaData&&m.data.mediaData.length>0):!!(m.data.title||m.data.name||m.data.text||m.data.description||m.data.tooltip||m.data.imageUrl||m.data.mediaUrl||m.data.audioUrl||m.data.mediaData&&m.data.mediaData.length>0)})()),n.$$.dirty[0]&1&&e(23,r=m.id),n.$$.dirty[0]&1&&e(9,a=m.screenPosition),n.$$.dirty[0]&1&&e(22,l=m.enabled===!1||!m.state),n.$$.dirty[0]&513&&e(21,c=!((te=m.state)!=null&&te.visible)||((ke=m.temporaryState)==null?void 0:ke.visible)===!1||!a),n.$$.dirty[0]&1&&e(8,h=((Re=m.state)==null?void 0:Re.unfolded)&&!m.isPopoverConfigEnabled()),n.$$.dirty[0]&512&&e(20,u=(a==null?void 0:a.leftPx)+"px"),n.$$.dirty[0]&512&&e(19,d=(a==null?void 0:a.topPx)+"px"),n.$$.dirty[0]&257&&e(18,p=h?((ye=m.zIndex)!=null?ye:0)+(h?1e6:0):void 0)},[m,g,v,y,w,C,E,D,h,a,i,R,A,k,x,S,j,F,p,d,u,c,l,r,o,s,L,J,oe,se,ae,ze,ee,we,le,he,be]}class T6 extends Ee{constructor(t){super(),Ie(this,t,S6,x6,Me,{tag:0,mediaStore:1,rendererMap:2,contentTypeMap:3,state:4,temporaryState:5,wrapperElement:6,popoverContainer:7},C6,[-1,-1])}}let Mn=null;function D6(n=2e6){return Mn&&document.body.contains(Mn)?(Mn.style.zIndex=String(n),Mn):(Mn=document.createElement("div"),Mn.className="tag-popover-container",Object.assign(Mn.style,{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",zIndex:String(n),pointerEvents:"none",overflow:"hidden"}),document.body.appendChild(Mn),Mn)}function L6(n){Le(n,"svelte-9ehqs9",".tag--container.svelte-9ehqs9{box-sizing:border-box;position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;opacity:1;-webkit-user-select:none;-moz-user-select:none;user-select:none;transform:translate3d(0, 0, 0);transition:opacity 0.2s linear;overflow:hidden}.tag--container.hide.svelte-9ehqs9{opacity:0 !important;pointer-events:none}.tag--container.hide.svelte-9ehqs9 *{pointer-events:none !important}")}function a0(n,t,e){const i=n.slice();return i[12]=t[e],i}function l0(n){let t,e=[],i=new Map,s,o,r,a=n[0];const l=c=>c[12].id;for(let c=0;c<a.length;c+=1){let h=a0(n,a,c),u=l(h);i.set(u,e[c]=c0(u,h))}return{c(){var c;t=U("div");for(let h=0;h<e.length;h+=1)e[h].c();P(t,"class","tag--container svelte-9ehqs9"),P(t,"data-infive",s=!n[4].visible||!n[5].visible?"1":"0"),Pe(t,"hide",!n[4].visible||!n[5].visible),_(t,"z-index",(c=n[6])!=null?c:""),_(t,"opacity",!n[4].visible||!n[5].visible?null:1)},m(c,h){Z(c,t,h);for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(t,null);n[10](t),r=!0},p(c,h){var u;h&447&&(a=c[0],xe(),e=ai(e,h,l,1,c,a,i,t,fn,c0,null,a0),Se()),(!r||h&48&&s!==(s=!c[4].visible||!c[5].visible?"1":"0"))&&P(t,"data-infive",s),(!r||h&48)&&Pe(t,"hide",!c[4].visible||!c[5].visible),h&64&&_(t,"z-index",(u=c[6])!=null?u:""),h&48&&_(t,"opacity",!c[4].visible||!c[5].visible?null:1)},i(c){if(!r){for(let h=0;h<a.length;h+=1)H(e[h]);o||At(()=>{o=vs(t,Ht,{}),o.start()}),r=!0}},o(c){for(let h=0;h<e.length;h+=1)Y(e[h]);r=!1},d(c){c&&X(t);for(let h=0;h<e.length;h+=1)e[h].d();n[10](null)}}}function c0(n,t){let e,i,s;return i=new T6({props:{state:t[4],temporaryState:t[5],tag:t[12],mediaStore:t[1],rendererMap:t[2],contentTypeMap:t[3],wrapperElement:t[7],popoverContainer:t[8]}}),{key:n,first:null,c(){e=Be(),ge(i.$$.fragment),this.first=e},m(o,r){Z(o,e,r),pe(i,o,r),s=!0},p(o,r){t=o;const a={};r&16&&(a.state=t[4]),r&32&&(a.temporaryState=t[5]),r&1&&(a.tag=t[12]),r&2&&(a.mediaStore=t[1]),r&4&&(a.rendererMap=t[2]),r&8&&(a.contentTypeMap=t[3]),r&128&&(a.wrapperElement=t[7]),r&256&&(a.popoverContainer=t[8]),i.$set(a)},i(o){s||(H(i.$$.fragment,o),s=!0)},o(o){Y(i.$$.fragment,o),s=!1},d(o){o&&X(e),me(i,o)}}}function z6(n){let t,e,i=n[4].enabled&&l0(n);return{c(){i&&i.c(),t=Be()},m(s,o){i&&i.m(s,o),Z(s,t,o),e=!0},p(s,[o]){s[4].enabled?i?(i.p(s,o),o&16&&H(i,1)):(i=l0(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(xe(),Y(i,1,1,()=>{i=null}),Se())},i(s){e||(H(i),e=!0)},o(s){Y(i),e=!1},d(s){i&&i.d(s),s&&X(t)}}}function O6(n,t,e){let{tags:i=[]}=t,{hooks:s}=t,{mediaStore:o}=t,{rendererMap:r}=t,{contentTypeMap:a}=t,{state:l}=t,{temporaryState:c}=t,{zIndex:h=void 0}=t,u=null,d=null,p=2e3;ul("hooks",s),ul("mediaStore",o),zt(()=>{e(8,d=D6(p))});function m(g){qe[g?"unshift":"push"](()=>{u=g,e(7,u)})}return n.$$set=g=>{"tags"in g&&e(0,i=g.tags),"hooks"in g&&e(9,s=g.hooks),"mediaStore"in g&&e(1,o=g.mediaStore),"rendererMap"in g&&e(2,r=g.rendererMap),"contentTypeMap"in g&&e(3,a=g.contentTypeMap),"state"in g&&e(4,l=g.state),"temporaryState"in g&&e(5,c=g.temporaryState),"zIndex"in g&&e(6,h=g.zIndex)},n.$$.update=()=>{var g,v,y,w;n.$$.dirty&1&&i&&i.length>0&&(p=(w=(y=(v=(g=i[0])==null?void 0:g.config)==null?void 0:v.popoverConfig)==null?void 0:y.zIndex)!=null?w:2e6)},[i,o,r,a,l,c,h,u,d,s,m]}class j6 extends Ee{constructor(t){super(),Ie(this,t,O6,z6,Me,{tags:0,hooks:9,mediaStore:1,rendererMap:2,contentTypeMap:3,state:4,temporaryState:5,zIndex:6},L6)}}const Vy="Dnalogel-PanoTagPlugin",R6=n=>`${Vy}--${n}`;class kl extends B4{constructor(e,i){super(e);f(this,"state",{enabled:!0,visible:!0});f(this,"debug");f(this,"debugUtil",new H4(this));f(this,"globalHoverEnabled",!0);f(this,"changeTagModel",(e,i)=>$(this,null,function*(){var s;e.data=it({},e.data,i),yield(s=e.loadModel)==null?void 0:s.call(e)}));f(this,"handleFiveModeChange",e=>{const i=()=>{this.filter2DPointTag.forEach(s=>{s.state.visible=!1,s.applyVisible()}),this.five.ready().then(()=>{this.tagsDo(this.tags,s=>{s.updateVisible(),Bs(s)&&e!=="Panorama"&&this.changeTagMode(s,"behind")}),e==="Panorama"?this.updateMaskTagsForCurrentPano():this.filterMaskTag.forEach(s=>{s.state.visible=!1,s.applyVisible()})})};this.tags.length<500?i():this.five.ready().then(()=>i())});f(this,"handleFiveWantsMoveToPano",()=>{if(this.tags.length>500){this.temporaryState.visible=!1,this.addRenderQueue({type:"TagContainerSvelte",keys:["temporaryState"]});return}else this.temporaryState.visible=!0,this.tags.forEach(e=>{e.temporaryState.visible=!0}),this.addRenderQueue({type:"TagContainerSvelte",keys:["tags"]}),this.tags.forEach(e=>e.applyVisible())});f(this,"clickhandler",e=>{e.tag.onClick(e)});f(this,"handleFiveCameraUpdate",()=>{this.filterPointTag.forEach(e=>e.updateScreenPosition())});f(this,"handleFiveCameraFovUpdate",()=>{this.handleFiveCameraUpdate(),this.five.off("render.prepare",this.handleFiveCameraUpdate),this.five.on("render.prepare",this.handleFiveCameraUpdate),setTimeout(()=>{this.five.off("render.prepare",this.handleFiveCameraUpdate)},1e3)});f(this,"handleFivePanoArrived",()=>$(this,null,function*(){this.filter2DPointTag.forEach(e=>{e.state.visible=!1,e.applyVisible()}),this.tagsDo(this.tags,e=>{e.updateVisible()}),this.updateMaskTagsForCurrentPano(),this.temporaryState.visible=!0,this.addRenderQueue({type:"TagContainerSvelte",keys:["temporaryState"]}),yield this.setUnfolded(),this.tags.filter(w4).filter(e=>{var i;return(i=e.getConfig().modelConfig)==null?void 0:i.autoLookAtEnabled}).forEach(e=>{var c;const i=new b.Mesh(new b.BoxGeometry,new b.MeshBasicMaterial),s=(c=e.model)==null?void 0:c.object;if(!s)return;i.position.copy(s.position),i.quaternion.copy(s.quaternion);const o=this.five.camera.position;i.lookAt(o.clone().setY(i.position.y));const r=s.quaternion.clone(),a=i.quaternion.clone(),l=Gr();l.onUpdate(({progress:h})=>{s.quaternion.copy(r.clone().slerp(a,h))}),l.play()})}));f(this,"handleFiveModelShownFloorChange",()=>{this.tagsDo(this.tags,e=>e.updateVisible())});f(this,"onFiveRefined",hm(()=>{Ii(this.five.getCurrentState().mode)?this.setUnfoldedByCamera():this.tags.forEach(e=>e.cache.clear()),this.tagsDo(this.tags,e=>e.updateVisible())}));f(this,"onFiveEveryReady",()=>{this.setUnfoldedByCamera(),Ii(this.five.getCurrentState().mode)&&this.tagsDo(this.tags,e=>e.updateVisible())});f(this,"render",()=>{this.renderQueue.forEach((e,i)=>{const{keys:s}=e;if(i==="TagContainerSvelte"){const r=this.filterPointTag.filter(l=>l.screenPosition),a={hooks:this.hooks,tags:r,state:this.state,temporaryState:this.temporaryState,mediaStore:this.mediaStore,rendererMap:this.rendererMap,contentTypeMap:this.contentTypeMap,zIndex:this.params.containerZIndex};if(this.TagContainerSvelte){let l={};if(s.length===0)l=a;else for(const c of s)l[c]=a[c];this.TagContainerSvelte.$set(l)}else{if(!this.container)return console.error("updateRenderPlaneTag: tag2DContainer not found");this.TagContainerSvelte=new j6({target:this.container,props:de(V({},a),{state:de(V({},this.state),{enabled:!1})})}),aa(()=>{var l;(l=this.TagContainerSvelte)==null||l.$set({state:this.state})})}}}),this.renderQueue.clear()});this.params=it({},{debug:!1,config:this.config},V({},i)),this.debug=this.params.debug,this.config=this.params.config,this.debug&&this.debugUtil.bindLog(),D4(1,{namespace:Xu.PlayAudio});try{Array.isArray(window.__PANOTAGPLUGIN_DEBUG_LIST__)||(window.__PANOTAGPLUGIN_DEBUG_LIST__=[]),this.NAME=Vy+"-"+window.__PANOTAGPLUGIN_DEBUG_LIST__.length,window.__PANOTAGPLUGIN_DEBUG_LIST__.push(this),window.__PANOTAGPLUGIN_DEBUG__||Object.defineProperty(window,"__PANOTAGPLUGIN_DEBUG__",{get:function(){return window.__PANOTAGPLUGIN_DEBUG_LIST__.sort((s,o)=>o.tags.length-s.tags.length)[0]}})}catch(s){}}appendTo(e){var s,o,r;this.container=e;const i=(o=(s=this.TagContainerSvelte)==null?void 0:s.$$)==null?void 0:o.root;i&&i!==this.container&&((r=this.TagContainerSvelte)==null||r.$destroy(),this.TagContainerSvelte=void 0)}load(e){return $(this,null,function*(){var o,r;Mi.clearSharedMeshRegistry(),this.clearTags();try{console.debug(this.NAME," load:",{data:JSON.parse(JSON.stringify(e))})}catch(a){}const i=ki(this.five);e.tagList.forEach(a=>{if(a.enu_position&&this.isValidArrayPosition(a.enu_position))try{const l=Lt(a.enu_position),c=i.viewLayers[0].scene.enuToWorld(l);a.position=ri(c)}catch(l){}if(a.enu_normal&&this.isValidArrayPosition(a.enu_normal))try{const l=Lt(a.enu_normal),c=i.viewLayers[0].scene.enuToWorld(l);a.normal=ri(c)}catch(l){}}),this.config=it({},this.config,{globalConfig:(o=e.globalConfig)!=null?o:{},contentTypeConfig:(r=e.contentTypeConfig)!=null?r:{}});const s=yield this.addTag(e.tagList);return this.five.state.mode==="Panorama"&&this.updateMaskTagsForCurrentPano(),this.hooks.emit("loaded"),s})}addTag(e,i){return $(this,null,function*(){var a,l;const o=(Array.isArray(e)?e:[e]).filter(c=>c.stickType==="3DBox"||c.stickType==="Mask"||c.position);if(i!=null&&i.updateMaskUrl&&o.length===1&&o[0].stickType==="Mask"){const c=o[0],h=(a=c.maskUrl)!=null?a:c.mask,u=(l=c.fiveState)==null?void 0:l.panoIndex;h&&typeof u=="number"&&this.tags.filter(p=>{var m;return p instanceof Mi&&((m=p.fiveState)==null?void 0:m.panoIndex)===u}).forEach(p=>p.set({mask:h}))}const r=o.map(c=>{const h=Qu(c);return h==="2DPoint"||h==="3DPoint"?new G4(this,c):h==="Model"?new wy(this,c):h==="Plane"?new o7(this,c):h==="3DBox"?new a7(this,c):h==="Polygon"?new l7(this,c):h==="Mask"?new Mi(this,c):null});return r.forEach(c=>S4(c)),this.tags.push(...r),this.tagsLengthWillUpdate=!0,xi(this.five).then(()=>$(this,null,function*(){var c,h;this.store.eventListenerDisposer&&((h=(c=this.store).eventListenerDisposer)==null||h.call(c)),this.state.enabled&&this.handleEnable(),this.addResizeListener(),this.clearUnusedPanelTag(),this.tagsDo(r,u=>{this.tags.includes(u)&&(u.updateVisible(),u.updateZIndex())}),this.setUnfolded(),this.addRenderQueue({type:"TagContainerSvelte"}),this.hooks.emit("tagsLengthChange")}))})}changeConfig(e,i=!0){i?this.config=it({},this.config,e):this.config=e,this.tags.forEach(s=>{s.updateConfig()}),this.tagsDo(this.tags,s=>s.updateVisible())}changeGlobalConfig(e,i=!0){i?this.config.globalConfig=it({},this.config.globalConfig,e):this.config.globalConfig=e,this.tags.forEach(s=>{s.updateConfig()}),this.tagsDo(this.tags,s=>{s.updateVisible()})}changeContentTypeConfig(e,i,s=!0){this.config.contentTypeConfig||(this.config.contentTypeConfig={}),s?this.config.contentTypeConfig[e]=it({},this.config.contentTypeConfig[e],i):this.config.contentTypeConfig[e]=i,this.tags.forEach(o=>{o.updateConfig()}),this.tagsDo(this.tags,o=>{o.updateVisible()})}show(e){return $(this,null,function*(){if(this.checkDisposed())return;const{userAction:i=!0}=e!=null?e:{};this.setState({visible:!0},{userAction:i}),this.hooks.emit("show",{userAction:i})})}hide(e){return $(this,null,function*(){if(this.checkDisposed())return;const{userAction:i=!0}=e!=null?e:{};this.setState({visible:!1},{userAction:i}),this.hooks.emit("hide",{userAction:i})})}enable(e){if(this.checkDisposed())return;const{userAction:i=!0}=e!=null?e:{};this.setState({enabled:!0},{userAction:i}),this.hooks.emit("enable",{userAction:i})}disable(e){if(this.checkDisposed())return;const{userAction:i=!0}=e!=null?e:{};this.setState({enabled:!1},{userAction:i}),this.hooks.emit("disable",{userAction:i})}setState(e,i){if(this.checkDisposed())return;const{userAction:s=!0}=i!=null?i:{},o=V({},this.state);this.state=Object.assign(this.state,e),o.visible!==this.state.visible&&(e.visible?this.handleShow():this.handleHide()),o.enabled!==this.state.enabled&&(e.enabled?this.handleEnable():this.handleDisable()),this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:s})}dispose(){var e,i,s,o,r,a;this.pauseCurrentMedia(),this.disposeAllCSS3DContainer(),(e=this.TagContainerSvelte)==null||e.$destroy(),this.filterCSS3DTag.forEach(l=>{var c;return(c=l.tag3DContentSvelte)==null?void 0:c.svelteApp.$destroy()}),this.tags.forEach(l=>{var c;(c=l.rectanglePlane)==null||c.editor.disable(),l.cache.clear()}),this.tags=[],this.tagsLengthWillUpdate=!0,this.hooks.emit("tagsLengthChange"),(i=this.store.disposers)==null||i.forEach(l=>l==null?void 0:l()),this.store.disposers=[],(o=(s=this.store).eventListenerDisposer)==null||o.call(s),this.store.eventListenerDisposer=void 0,(a=(r=this.store).resizeObserverDisposer)==null||a.call(r),this.store.resizeObserverDisposer=void 0,this.store.resizeObserverDisposerAdding=!1,this.five.scene.remove(this.group),this.group.remove(...this.group.children),this.gltfObjectGroup.remove(...this.gltfObjectGroup.children),this.imagePlaneGroup.remove(...this.imagePlaneGroup.children),this.five.needsRender=!0,this.store.disposed=!0,this.hooks.emit("dispose")}blinkTagById(e,i){return $(this,null,function*(){var s;return(s=this.getTagById(e))==null?void 0:s.blink(i)})}changeUnfoldedById(e,i){const s=this.getTagById(e);i?s==null||s.unfold():s==null||s.fold()}changeEnabledById(e,i){var o;const s=this.getTagById(e);s&&(s.enabled=i,(o=s.hooks)==null||o.emit(i?"enable":"disable"))}changeTagNormalById(e,i){const s=this.getTagById(e);s&&s.tag3DContentSvelte&&(s.tag3DContentSvelte.currentNormal=Lt(i))}changePositionById(e,i){const s=this.getTagById(e);s&&s.setPosition(i)}changeDataById(e,i,s=!0){const o=this.getTagById(e);o&&(o.setData(i,s),this.clearUnusedPanelTag(),o.hooks.emit("dataChanged",o.data))}changeStickTypeById(e,i,s=!0){this.changeTagById(e,i,s)}changeTagById(e,i,s=!0){const o=this.getTagById(e);if(o){if(i.stickType&&i.stickType!==o.stickType){console.log(`[PanoTagPlugin] stickType changed from ${o.stickType} to ${i.stickType}, recreating tag`);const r=V({},o);this.destroyTagById(e),this.five.ready().then(()=>{this.addTag(V(V({},r),i))});return}o.set(i),o instanceof Mi&&o.updateMaskStyle(),o.updateVisible(),this.clearUnusedPanelTag(),o.hooks.emit("dataChanged",o.data)}}changeMask(e){if(!Array.isArray(e)||e.length===0){console.warn("[PanoTagPlugin] changeMask: invalid or empty maskUpdates");return}e.forEach(({index:i,mask:s})=>{if(typeof i!="number"){console.warn("[PanoTagPlugin] changeMask: invalid index",i);return}if(!s){console.warn("[PanoTagPlugin] changeMask: invalid mask for index",i);return}const o=this.tags.filter(r=>{var a;return r instanceof Mi&&((a=r.fiveState)==null?void 0:a.panoIndex)===i});if(o.length===0){console.debug(`[PanoTagPlugin] changeMask: no MaskTag found at panoIndex ${i}`);return}o.forEach(r=>{r.set({mask:s}),console.log(`[PanoTagPlugin] Updated mask for tag ${r.id} at panoIndex ${i}`)})}),this.five.needsRender=!0}destroyTagById(e){(Array.isArray(e)?e:[e]).forEach(s=>{var o;return(o=this.getTagById(s))==null?void 0:o.destroy()})}updateRenderAllTags(){this.tagsDo(this.tags,e=>e.updateVisible()),this.five.needsRender=!0}clearTags(){var e;this.tags.length&&(this.tags.forEach(i=>{var s,o,r,a,l,c,h,u,d,p,m;(s=i.tag3DContentSvelte)==null||s.dispose(),(r=(o=i.mediaPlane)==null?void 0:o.parent)==null||r.remove(i.mediaPlane),(c=(l=(a=i.model)==null?void 0:a.object)==null?void 0:l.parent)==null||c.remove(i.model.object),(u=(h=i.rectanglePlane)==null?void 0:h.parent)==null||u.remove(i.rectanglePlane),(d=i.boxShape)!=null&&d.parent&&i.boxShape.parent.remove(i.boxShape),(m=(p=i.polygonShape)==null?void 0:p.parent)==null||m.remove(i.polygonShape),i!=null&&i.tagNormalLine&&(i==null||i.removeTagNormalLine()),i instanceof Mi&&i.dispose()}),this.tags=[],this.tagsLengthWillUpdate=!0,this.hooks.emit("tagsLengthChange"),(e=this.TagContainerSvelte)==null||e.$destroy(),this.TagContainerSvelte=void 0,this.disposeAllCSS3DContainer()),this.enabledModelTagSet.clear(),this.cache.clear()}setUnfolded(){return $(this,null,function*(){return new Promise(e=>{setTimeout(()=>{this.setUnfoldedByCamera(),e()},100)})})}handleShow(){this.state.visible=!0,this.group.visible=!0,this.addRenderQueue({type:"TagContainerSvelte",keys:["state"]}),this.updateRenderAllTags(),this.five.needsRender=!0}handleHide(){this.pauseCurrentMedia(),this.state.visible=!1,this.group.visible=!1,this.addRenderQueue({type:"TagContainerSvelte",keys:["state"]}),this.five.needsRender=!0}handleEnable(){this.state.enabled=!0,this.store.eventListenerDisposer=this.addEventListener(),this.five.scene.children.includes(this.group)||this.five.scene.add(this.group),this.five.needsRender=!0}handleDisable(){var e,i,s;this.pauseCurrentMedia(),this.tags.forEach(o=>{var r;return(r=o.rectanglePlane)==null?void 0:r.delete()}),this.state.enabled=!1,(i=(e=this.store).eventListenerDisposer)==null||i.call(e),this.five.scene.remove(this.group),(s=this.TagContainerSvelte)==null||s.$set({tags:[]}),this.five.needsRender=!0}addResizeListener(){if(!this.store.resizeObserverDisposer&&!this.store.resizeObserverDisposerAdding){const e=this.addResizeObserver();this.store.resizeObserverDisposerAdding=!0,setTimeout(()=>{this.store.resizeObserverDisposer=e,this.store.resizeObserverDisposerAdding=!1},200)}}addResizeObserver(){if(this.store.disposed)return;const e=this.five.getElement(),i=()=>{this.state.enabled&&(this.filterPointTag.forEach(c=>c.updateScreenPosition({force:!0})),this.temporaryState.visible=!0,this.addRenderQueue({type:"TagContainerSvelte",keys:["temporaryState"]}))},s=()=>{this.state.enabled&&(this.temporaryState.visible=!1,this.addRenderQueue({type:"TagContainerSvelte",keys:["temporaryState"]}))},{observe:o,unobserve:r}=Ka(E4(()=>{this.store.resizeObserverDisposer&&s()},500),e),{observe:a,unobserve:l}=Ka(hm(()=>i(),400),e);return o(),a(),()=>{r(),l()}}setUnfoldedByCamera(){let e=!1;this.filterPointTag.forEach(i=>{const s=i.getUnfoldedByCamera();if(i.state&&s!==void 0){if(s===!0&&i.screenPosition){const o=i.getConfig().unfoldedConfig;qs(o).keep!=="unfolded"&&(e=!0)}i.state.unfolded=s}}),e&&this.filterPointTag.forEach(i=>{const s=i.getConfig().unfoldedConfig;typeof s=="object"&&(s.autoUnfold||s.autoUnfold===!1||qs(s.autoUnfold).enable===!1||s.keep)||i.state&&(i.state.unfolded=!1)})}changeTagMode(e,i){var s;(s=e.tag3DContentSvelte)!=null&&s.css3DInstance&&(e.tag3DContentSvelte.css3DInstance.mode=i)}addEventListener(){const{five:e,hooks:i}=this,s=Gh(this.five,this.onFiveEveryReady);return this.handleFivePanoArrived(),e.on("wantsMoveToPano",this.handleFiveWantsMoveToPano),e.on("models.refined",this.onFiveRefined),e.on("modeChange",this.handleFiveModeChange),e.on("modelShownFloorChange",this.handleFiveModelShownFloorChange),e.on("cameraUpdate",this.handleFiveCameraUpdate),e.on("cameraFovUpdate",this.handleFiveCameraFovUpdate),e.on("panoArrived",this.handleFivePanoArrived),e.on("panoArrived",this.loadVideoFirstFrame),e.on("render.prepare",this.render),i.on("click",this.clickhandler),()=>{s(),e.off("wantsMoveToPano",this.handleFiveWantsMoveToPano),e.off("models.refined",this.onFiveRefined),e.off("modeChange",this.handleFiveModeChange),e.off("modelShownFloorChange",this.handleFiveModelShownFloorChange),e.off("cameraUpdate",this.handleFiveCameraUpdate),e.off("cameraFovUpdate",this.handleFiveCameraFovUpdate),e.off("panoArrived",this.handleFivePanoArrived),e.off("panoArrived",this.loadVideoFirstFrame),e.off("render.prepare",this.render),i.off("click",this.clickhandler),this.store.eventListenerDisposer=void 0}}setTagHoverEnabled(e,i){const s=this.getTagById(e);s&&(s.hoverEnabled=i)}getTagHoverEnabled(e){const i=this.getTagById(e);return i==null?void 0:i.hoverEnabled}setGlobalHoverEnabled(e){this.globalHoverEnabled=e}getGlobalHoverEnabled(){return this.globalHoverEnabled}isValidArrayPosition(e){return!Array.isArray(e)||e.length!==3?!1:e.every(i=>typeof i=="number"&&!isNaN(i)&&isFinite(i))}updateMaskTagsForCurrentPano(){const e=this.five.getCurrentState().panoIndex;console.log("[PanoTagPlugin] updateMaskTagsForCurrentPano, current panoIndex:",e,"mask tags count:",this.filterMaskTag.length),this.filterMaskTag.forEach(i=>{var o;const s=(o=i.fiveState)==null?void 0:o.panoIndex;console.log("[PanoTagPlugin] Processing mask tag:",i.id,"tagPanoIndex:",s,"matches current:",s===e),s===e?(console.log("[PanoTagPlugin] Tag matches current pano, updating visibility..."),i.updateVisible(),i.applyVisible()):i.visible&&(console.log("[PanoTagPlugin] Tag is from different pano, hiding..."),i.state.visible=!1,i.applyVisible())})}get filterMaskTag(){return this.tags.filter(e=>e.stickType==="Mask")}getMaskTagPerformanceStats(){const e=Mi.getCacheStats(),i=this.filterMaskTag.length,s=this.filterMaskTag.filter(o=>o.visible).length;return{totalMaskTags:i,visibleMaskTags:s,textureCache:e,currentPanoIndex:this.five.state.panoIndex}}clearMaskTagCache(){Mi.clearAllCache()}}const _6=(n,t)=>new kl(n,t);function V6(n){Le(n,"svelte-f09cfl",".guide-line__tag.svelte-f09cfl.svelte-f09cfl{position:relative}.text-with-distance.svelte-f09cfl.svelte-f09cfl{display:flex;flex-direction:column;position:relative;padding:0.125rem 0.25rem;border-radius:0.125rem;background:linear-gradient(to top, rgba(147, 147, 147, 0.3), rgba(74, 74, 74, 0.3));box-shadow:0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.2)}.text-with-distance.svelte-f09cfl .border.svelte-f09cfl{position:absolute;top:-50%;right:-50%;bottom:-50%;left:-50%;padding:0.0625rem;border-radius:0.25rem;background:linear-gradient(to right, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2));-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);mask-composite:exclude;-webkit-mask-composite:xor;transform:scale(0.5)}.distance-and-name.svelte-f09cfl.svelte-f09cfl{display:flex;gap:0.1875rem}.distance.svelte-f09cfl.svelte-f09cfl{white-space:nowrap;font-size:0.625rem;line-height:0.875rem;color:#66afff}.name.svelte-f09cfl.svelte-f09cfl{opacity:0.6;font-size:0.625rem;line-height:0.875rem;white-space:nowrap;color:#ffffff}.line-name.svelte-f09cfl.svelte-f09cfl{color:#fff;white-space:nowrap;font-size:0.625rem;line-height:0.875rem}.guide-line__tag-point.svelte-f09cfl.svelte-f09cfl{position:absolute;left:50%;bottom:0.0625rem;width:0.4375rem;height:0.125rem;transform:translateX(-50%);background:#fff;border-radius:50%;opacity:0.5}.guide-line__tag-line.svelte-f09cfl.svelte-f09cfl{position:absolute;left:50%;bottom:0.0625rem;width:0.0625rem;height:1.875rem;transform:translateX(-50%);background:linear-gradient(to top, #fff, rgba(255, 255, 255, 0))}.guide-line__tag-content.svelte-f09cfl.svelte-f09cfl{position:absolute;left:-0.9375rem;bottom:1.9375rem;display:flex;justify-content:center;align-items:center}.guide-line__tag-icon.svelte-f09cfl.svelte-f09cfl{width:1.875rem;height:1.875rem;background-size:100%}.guide-line__tag-text.svelte-f09cfl.svelte-f09cfl{box-sizing:content-box;width:-moz-max-content;width:max-content;transform:translateX(-0.1875rem);white-space:nowrap;font-size:0.625rem;line-height:0.875rem;border:solid transparent;border-width:0.125rem 0.5rem 0.125rem 0.375rem;border-image-slice:6 25 6 18 fill;color:#fff;display:flex;align-items:center;justify-content:center}")}function h0(n){let t,e;return{c(){t=U("div"),e=Fe(n[0]),P(t,"class","guide-line__tag-text svelte-f09cfl"),_(t,"font-size",n[8]),_(t,"padding",n[7]),_(t,"border-image-source",`url(${n[9]})`)},m(i,s){Z(i,t,s),B(t,e)},p(i,s){s&1&&Ne(e,i[0]),s&256&&_(t,"font-size",i[8]),s&128&&_(t,"padding",i[7])},d(i){i&&X(t)}}}function u0(n){let t,e,i,s,o,r,a,l,c,h,u=n[4]&&d0(n);return{c(){t=U("div"),u&&u.c(),e=ue(),i=U("div"),s=U("span"),o=Fe(n[2]),r=ue(),a=U("span"),l=Fe(n[0]),c=ue(),h=U("div"),P(s,"class","distance svelte-f09cfl"),_(s,"line-height",n[5]),_(s,"font-size",n[8]),P(a,"class","name svelte-f09cfl"),_(a,"line-height",n[5]),_(a,"font-size",n[8]),P(i,"class","distance-and-name svelte-f09cfl"),P(h,"class","border svelte-f09cfl"),P(t,"class","text-with-distance svelte-f09cfl"),_(t,"padding",n[6])},m(d,p){Z(d,t,p),u&&u.m(t,null),B(t,e),B(t,i),B(i,s),B(s,o),B(i,r),B(i,a),B(a,l),B(t,c),B(t,h)},p(d,p){d[4]?u?u.p(d,p):(u=d0(d),u.c(),u.m(t,e)):u&&(u.d(1),u=null),p&4&&Ne(o,d[2]),p&32&&_(s,"line-height",d[5]),p&256&&_(s,"font-size",d[8]),p&1&&Ne(l,d[0]),p&32&&_(a,"line-height",d[5]),p&256&&_(a,"font-size",d[8]),p&64&&_(t,"padding",d[6])},d(d){d&&X(t),u&&u.d()}}}function d0(n){let t,e;return{c(){t=U("span"),e=Fe(n[4]),P(t,"class","line-name svelte-f09cfl"),_(t,"line-height",n[5]),_(t,"font-size",n[8])},m(i,s){Z(i,t,s),B(t,e)},p(i,s){s&16&&Ne(e,i[4]),s&32&&_(t,"line-height",i[5]),s&256&&_(t,"font-size",i[8])},d(i){i&&X(t)}}}function F6(n){let t,e,i,s,o,r,a,l,c,h=n[0]&&!n[2]&&h0(n),u=n[2]&&u0(n);return{c(){t=U("div"),e=U("div"),i=ue(),s=U("div"),o=ue(),r=U("div"),a=U("div"),l=ue(),h&&h.c(),c=ue(),u&&u.c(),P(e,"class","guide-line__tag-point svelte-f09cfl"),P(s,"class","guide-line__tag-line svelte-f09cfl"),P(a,"class","guide-line__tag-icon svelte-f09cfl"),_(a,"background-image",`url(${n[1]})`),P(r,"class","guide-line__tag-content svelte-f09cfl"),P(t,"class","guide-line__tag svelte-f09cfl"),_(t,"opacity",n[3])},m(d,p){Z(d,t,p),B(t,e),B(t,i),B(t,s),B(t,o),B(t,r),B(r,a),B(r,l),h&&h.m(r,null),B(r,c),u&&u.m(r,null)},p(d,[p]){p&2&&_(a,"background-image",`url(${d[1]})`),d[0]&&!d[2]?h?h.p(d,p):(h=h0(d),h.c(),h.m(r,c)):h&&(h.d(1),h=null),d[2]?u?u.p(d,p):(u=u0(d),u.c(),u.m(r,null)):u&&(u.d(1),u=null),p&8&&_(t,"opacity",d[3])},i:ce,o:ce,d(d){d&&X(t),h&&h.d(),u&&u.d()}}}function B6(n,t,e){let i,s,o,r,a,l,c,h,{text:u=""}=t,{icon_url:d=""}=t,{distance:p=""}=t,{opacity:m=1}=t,{name:g=""}=t,{fontSize:v="md"}=t;const y="data:image/png;base64,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";return n.$$set=w=>{"text"in w&&e(0,u=w.text),"icon_url"in w&&e(1,d=w.icon_url),"distance"in w&&e(2,p=w.distance),"opacity"in w&&e(3,m=w.opacity),"name"in w&&e(4,g=w.name),"fontSize"in w&&e(10,v=w.fontSize)},n.$$.update=()=>{var w,C;n.$$.dirty&1024&&e(12,i=ku[v]),n.$$.dirty&4096&&e(8,s=ft((i==null?void 0:i.name)||12)),n.$$.dirty&4096&&e(14,o=((w=i==null?void 0:i.padding)==null?void 0:w.guide)||[8,2]),n.$$.dirty&16384&&e(7,r=`${ft(o[1])} ${ft(o[0])}`),n.$$.dirty&4096&&e(13,a=((C=i==null?void 0:i.padding)==null?void 0:C.distance)||[4,2]),n.$$.dirty&8192&&e(6,l=`${ft(a[1])} ${ft(a[0])}`),n.$$.dirty&4096&&e(11,c=(i==null?void 0:i.lineHeight)||14),n.$$.dirty&2048&&e(5,h=ft(c))},[u,d,p,m,g,h,l,r,s,y,v,c,i,a,o]}class H6 extends Ee{constructor(t){super(),Ie(this,t,B6,F6,Me,{text:0,icon_url:1,distance:2,opacity:3,name:4,fontSize:10},V6)}}function N6(n){return n.length===0?[]:n.filter((t,e)=>t!==n[e-1])}function G6(n,t,e){if(n.length<2)return[];const i=[];n.forEach((r,a)=>{var u,d,p,m,g,v,y,w;let l=(u=e==null?void 0:e.route_standing_positions)==null?void 0:u[r];if(l||(l=(p=(d=t.observers[r])==null?void 0:d.standingPosition)==null?void 0:p.toArray()),!l)return;const c=n[a-1],h=(w=(g=(m=e==null?void 0:e.node_pair_to_route_points)==null?void 0:m[`${c}:${r}`])==null?void 0:g.slice())!=null?w:(y=(v=e==null?void 0:e.node_pair_to_route_points)==null?void 0:v[`${r}:${c}`])==null?void 0:y.slice().reverse();h==null||h.forEach(C=>{i.push(C)}),i.push(l)});const s=t.transform,o=i.map(r=>Vt(new b.Vector3().fromArray(r),s).toArray());return[de(V({},e),{type:"CatmullRomCurve3",points:o})]}const W6=`
|
|
1112
1118
|
varying vec2 vUv;
|
|
1113
1119
|
varying float ignoreAnimationMap;
|
|
1114
1120
|
attribute float animationWillError;
|