next-flow-interface 0.19.4 → 0.19.6

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/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { ColorPickerProps, Color } from 'antd/es/color-picker';
3
3
  import React$1, { ReactNode, MouseEventHandler, DetailedHTMLProps, HTMLAttributes, FunctionComponent, MouseEvent as MouseEvent$1, Attributes } from 'react';
4
4
  import { DefaultOptionType } from 'antd/es/select';
5
5
  import { RvPath, RhineVarMap, StoredRhineVar, RecursiveObject, RecursiveMap, RecursiveArray, RhineVarArray } from 'rhine-var';
6
- import { Node, NodeMaterialBlockConnectionPointTypes, BaseTexture, PBRMaterial, NodeMaterial, Animation, Color3, Color4, Scene, Material, NodeMaterialBlock, ShadowGenerator, AnimationGroup as AnimationGroup$1, TransformNode, Vector3, ArcRotateCamera, Light, CubeTexture, AbstractMesh, Mesh, Texture, DynamicTexture, Engine, WebGPUEngine, WebXRDefaultExperience, Quaternion } from '@babylonjs/core';
6
+ import { Node, NodeMaterialBlockConnectionPointTypes, BaseTexture, PBRMaterial, NodeMaterial, Animation, Color3, Color4, Scene, Material, NodeMaterialBlock, ShadowGenerator, AnimationGroup as AnimationGroup$1, TransformNode, Vector3, ArcRotateCamera, Light, CubeTexture, AbstractMesh, Texture, DynamicTexture, Engine, WebGPUEngine, WebXRDefaultExperience, Quaternion } from '@babylonjs/core';
7
7
  import { AnimationGroup } from '@babylonjs/core/Animations/animationGroup';
8
8
  import { TransformNode as TransformNode$1 } from '@babylonjs/core/Meshes/transformNode';
9
9
  import { Root } from 'react-dom/client';
@@ -864,23 +864,6 @@ interface RsEnvironmentServiceApi {
864
864
  getCurrentCameraLocation(): RvCameraLocation;
865
865
  }
866
866
 
867
- interface RsTransformGroundApi {
868
- m1: PBRMaterial;
869
- m10: PBRMaterial;
870
- g1: Mesh | undefined;
871
- g10: Mesh | undefined;
872
- state: {
873
- opacityRate: number;
874
- enableOnViewerMode: boolean;
875
- enableOnEditorMode: boolean;
876
- };
877
- initMaterial(): void;
878
- createGround(): void;
879
- hideGround(): void;
880
- showGround(): void;
881
- freshGround(): void;
882
- }
883
-
884
867
  declare enum LabelTheme {
885
868
  Default = "Default"
886
869
  }
@@ -1541,8 +1524,8 @@ interface NativeEventServiceApi {
1541
1524
  }
1542
1525
 
1543
1526
  declare enum Locale {
1544
- ZH = "ZH",
1545
- EN = "EN"
1527
+ ZH = "zh",
1528
+ EN = "en"
1546
1529
  }
1547
1530
 
1548
1531
  declare enum PluginType {
@@ -2004,20 +1987,18 @@ interface LocalDataServiceApi {
2004
1987
  isLoaded(fid: string): boolean | undefined;
2005
1988
  }
2006
1989
 
2007
- type MessageLoader = (locale: Locale) => Promise<Messages>;
2008
-
2009
1990
  type Translator = (key: string) => string;
2010
1991
  type NamespaceSubscriber = (namespaces: string[]) => void;
2011
- interface Messages {
2012
- [key: string]: Messages | string;
1992
+ type MessageLeaf = string;
1993
+ interface MessageTree {
1994
+ [key: string]: MessageTree | MessageLeaf;
2013
1995
  }
2014
1996
  interface InternationalizationServiceApi {
2015
1997
  ALL_SUPPORT: Locale[];
2016
1998
  DEFAULT_SUPPORT: Locale;
2017
1999
  locale: Locale;
2018
- messages: Messages;
2019
- load(messages: Messages): Promise<boolean>;
2020
- applyLoader(loader: MessageLoader): Promise<boolean>;
2000
+ messages: MessageTree;
2001
+ load(messages: MessageTree): Promise<boolean>;
2021
2002
  getTranslator(namespace?: string, wait?: boolean): Promise<Translator>;
2022
2003
  subscribe(subscriber: NamespaceSubscriber): () => void;
2023
2004
  unsubscribe(subscriber: NamespaceSubscriber): void;
@@ -2658,7 +2639,6 @@ interface NfpApi {
2658
2639
  rsEnvironment: RsEnvironmentApi;
2659
2640
  rsEnvironmentService: RsEnvironmentServiceApi;
2660
2641
  rsTextureService: RsTextureServiceApi;
2661
- rsTransformGround: RsTransformGroundApi;
2662
2642
  rsClick: RsClickApi;
2663
2643
  rsLabelService: RsLabelServiceApi;
2664
2644
  rsNodeMaterialManager: RsNodeMaterialManagerApi;
@@ -2908,10 +2888,12 @@ declare namespace acceptMime {
2908
2888
  export { acceptMime_AAC as AAC, acceptMime_ANIMATION as ANIMATION, acceptMime_ANY as ANY, acceptMime_ATTACH_LIST as ATTACH_LIST, acceptMime_AVI as AVI, acceptMime_AVIF as AVIF, acceptMime_BMP as BMP, acceptMime_CAMERA as CAMERA, acceptMime_FLAC as FLAC, acceptMime_FLV as FLV, acceptMime_GIF as GIF, acceptMime_GLB as GLB, acceptMime_GLTF as GLTF, acceptMime_GP3 as GP3, acceptMime_HEIF as HEIF, acceptMime_ICO as ICO, acceptMime_JPG as JPG, acceptMime_JSON as JSON, acceptMime_LIGHT as LIGHT, acceptMime_MARKDOWN as MARKDOWN, acceptMime_MATERIAL as MATERIAL, acceptMime_MESH as MESH, acceptMime_MKV as MKV, acceptMime_MOV as MOV, acceptMime_MP3 as MP3, acceptMime_MP4 as MP4, acceptMime_MPEG as MPEG, acceptMime_NF as NF, acceptMime_OBJ as OBJ, acceptMime_OGG as OGG, acceptMime_OGV as OGV, acceptMime_OPUS as OPUS, acceptMime_PNG as PNG, acceptMime_SCENE as SCENE, acceptMime_STL as STL, acceptMime_SUPPORT_ALL_LIST as SUPPORT_ALL_LIST, acceptMime_SUPPORT_AUDIO_LIST as SUPPORT_AUDIO_LIST, acceptMime_SUPPORT_BABYLON_LIST as SUPPORT_BABYLON_LIST, acceptMime_SUPPORT_FILE_LIST as SUPPORT_FILE_LIST, acceptMime_SUPPORT_IMAGE_LIST as SUPPORT_IMAGE_LIST, acceptMime_SUPPORT_JSON_LIST as SUPPORT_JSON_LIST, acceptMime_SUPPORT_MODEL_LIST as SUPPORT_MODEL_LIST, acceptMime_SUPPORT_NEXTFLOW_LIST as SUPPORT_NEXTFLOW_LIST, acceptMime_SUPPORT_RENDER_LIST as SUPPORT_RENDER_LIST, acceptMime_SUPPORT_TEXTURE_LIST as SUPPORT_TEXTURE_LIST, acceptMime_SUPPORT_TEXT_LIST as SUPPORT_TEXT_LIST, acceptMime_SUPPORT_VIDEO_LIST as SUPPORT_VIDEO_LIST, acceptMime_SVG as SVG, acceptMime_TEXTURE as TEXTURE, acceptMime_TIFF as TIFF, acceptMime_TXT as TXT, acceptMime_UNKNOWN as UNKNOWN, acceptMime_UV as UV, acceptMime_WAV as WAV, acceptMime_WMV as WMV, acceptMime_WebM as WebM, acceptMime_WebP as WebP, acceptMime_getExtension as getExtension, acceptMime_getMime as getMime, acceptMime_getMimeByBlob as getMimeByBlob, acceptMime_getMimeByBuffer as getMimeByBuffer, acceptMime_getMimeByPath as getMimeByPath, acceptMime_getMimeByStream as getMimeByStream, acceptMime_getMimeByUrl as getMimeByUrl, acceptMime_isAttach as isAttach, acceptMime_isBabylon as isBabylon, acceptMime_isMaterial as isMaterial, acceptMime_isSupport as isSupport, acceptMime_isSupportAudio as isSupportAudio, acceptMime_isSupportFile as isSupportFile, acceptMime_isSupportImage as isSupportImage, acceptMime_isSupportJson as isSupportJson, acceptMime_isSupportModel as isSupportModel, acceptMime_isSupportRender as isSupportRender, acceptMime_isSupportText as isSupportText, acceptMime_isSupportTexture as isSupportTexture, acceptMime_isSupportVideo as isSupportVideo, acceptMime_isTexture as isTexture, acceptMime_isUV as isUV };
2909
2889
  }
2910
2890
 
2891
+ type MessageLoader = (locale: Locale) => Promise<MessageTree>;
2892
+
2911
2893
  type MessageState = 'before' | 'show' | 'after';
2912
2894
 
2913
2895
  interface PluginConnectorApi {
2914
- install(plugin: BasePlugin, messageLoader?: MessageLoader): void;
2896
+ install(plugin: BasePlugin, messages: MessageTree): void;
2915
2897
  getNfpApi(): NfpApi;
2916
2898
  }
2917
2899
 
@@ -3152,4 +3134,4 @@ declare const VectorUtils: {
3152
3134
  toArrayWithRound4: typeof toArrayWithRound4;
3153
3135
  };
3154
3136
 
3155
- export { acceptMime as AcceptMime, type AddLocalDataOptionInterface as AddLocalDataOption, type AnchorProps, type AntCheckboxProps, type AntColorProps, type AntEmptyProps, type AntNumberProps, type AntSelectProps, type AntSwitchProps, type AwarenessChangeSubscriber, type AwarenessChanges, type AwarenessServiceApi, type BasePlugin, type C3, type C4, type CameraConfigurationAnimationApi, type CameraLocationAnimationApi, ContextMenu, type ContextMenuController, type ContextMenuCreateOptions, type ContextMenuServiceApi, CryptoUtils, DataUtils, Dialog, DialogContentAlign, type DialogCreateOptions, type DialogPlugin, type DialogServiceApi, type DivProps, type DivPropsSimple, DomNotFoundError, type DrawerPlugin, type EasyPropertyAnimationApi, EnableLevel, type FileData, type FileProgressBarProps, FileUtils, type FirstLoadModelServiceApi, FirstLoadModelServiceEventType, FirstLoadModelServiceStatus, type FirstLoadModelServiceSubscriber, type FirstLoadServiceApi, FirstLoadServiceEventType, FirstLoadServiceStatus, type FirstLoadServiceSubscriber, type FlexGrowProps, FocusMode, type FogAnimationApi, type GroundAnimationApi, type HighLightInfo, type HistoryServiceApi, HistoryServiceEventType, type HistoryServiceStateSubscriber, type HistoryServiceSubscriber, type IconPlugin, IconPluginPosition, type IconViewProps, type InternationalizationProviderProps, type InternationalizationServiceApi, LabelInfo, LabelTheme, type LastSubscriber, type LightAnimationApi, type LocalData, type LocalDataServiceApi, LocalDataServiceEventType, type LocalDataServiceSubscriber, LocalDataStatus, LocalDataType, Locale, type MainPortalProps, type MaterialSymbolFunction, type MaterialSymbolOptions, type MaterialSymbolProps, MathUtils, type MeetingServiceApi, type MeetingState, MeetingStatus, MenuLine, type MenuLineCreateOptions, MenuLineType, Message, type MessageLoader, type MessageServiceApi, type MessageState, type MessageType, type Messages, type MixView, type NamespaceSubscriber, type NativeAnyEventSubscriber, type NativeDragEventSubscriber, type NativeEventServiceApi, NativeEventUtils, type NativeFocusEventSubscriber, type NativeKeyboardEventSubscriber, type NativeMouseEventSubscriber, type NativePointerEventSubscriber, type NativeUIEventSubscriber, type NativeWheelEventSubscriber, NetworkUtils, type NfpApi, type NodeMaterialChangeListener, type NodeMaterialInfo, type NodePair, NotFoundError, NumberUtils, type OssUploadInstance, OssUploadInstanceStatus, type OssUploadServiceApi, OssUploadServiceEventType, type OssUploadServiceSubscriber, type Page, PageMode, PageType, PageUtils, type PluginConfig, type PluginConnectorApi, type PluginContainerServiceApi, PluginEventType, type PluginInformation, type PluginServiceApi, type PluginServiceSubscriber, type PluginState, PluginType, type PluginViewProps, type ProgressBarProps, type ResourcePreviewProps, type ResourceServiceApi, type RsAudioServiceApi, type RsClickApi, type RsEnvironmentApi, type RsEnvironmentServiceApi, type RsLabelServiceApi, type RsLoopAnimationManagerApi, type RsMaterialServiceApi, type RsModel, type RsModelServiceApi, RsModelServiceEventType, type RsModelServiceSubscriber, RsModelStatus, type RsNodeMaterialManagerApi, type RsNodeServiceApi, type RsSelectionApi, type RsSelectionMaterialInfo, type RsSelectionNodeInfo, type RsSelectionServiceApi, type RsSelectionState, type RsSeparateServiceApi, type RsServiceApi, type RsTextureServiceApi, type RsTransformGroundApi, type RsdButtonProps, type RsdCheckableButtonProps, type RsdCheckboxProps, type RsdColorProps, type RsdFileSelectProps, type RsdInputProps, type RsdMentionsProps, type RsdNoneProps, type RsdNumberListProps, type RsdNumberProps, type RsdSelectProps, type RsdSwitchProps, type RsdTitleProps, RvAttachType, type RvAttributes, type RvAttributesServiceApi, type RvAudio, type RvAwareness, type RvAwarenessClick, type RvAwarenessDevice, type RvAwarenessUser, type RvAwarenessWindow, type RvBase, type RvBasicConfig, RvBasicType, type RvCamera, type RvCameraLocation, type RvCode, type RvCodeAttributeApi, type RvConfiguration, type RvEnvironment, type RvFile, type RvFileServiceApi, RvFileServiceEventType, type RvFileServiceSubscriber, RvFileType, type RvGlobal, type RvGlobalServiceApi, type RvHistory, type RvLabel, type RvLabelAttributeApi, type RvLocation, type RvLocationAttributeApi, type RvLoop, type RvLoopAttributeApi, type RvMaterial, type RvMaterialAttributeApi, type RvMaterialGeneral, type RvMaterialNode, type RvMaterialNodeInput, type RvMaterialPBR, type RvMaterialTexture, RvMaterialType, type RvMeeting, type RvMeetingCurrent, type RvMeetingServiceApi, type RvMeetingStatistic, type RvModel, RvModelOrigin, type RvModelServiceApi, type RvNative, type RvNativeAttributeApi, type RvNode, type RvNodeMaterialAnalyzerApi, type RvPlugin, type RvPluginConfig, type RvPluginDebug, RvPresetType, type RvResource, type RvResourceServiceApi, RvResourceServiceEventType, type RvResourceServiceSubscriber, RvResourceType, type RvSceneNode, type RvSeparate, type RvStep, type RvStepServiceApi, RvUtils, type RvVersion, type SceneServiceApi, type Screen, ScreenSize, type ScrollBarProps, type SelectedSubscriber, type ShadowAnimationApi, ShareMode, type SkyboxAnimationApi, type SpaceServiceApi, type SpanProps, type SpanPropsSimple, StaticClassInstantiationError, type Status, type StatusChangeSubscriber, type StatusServiceApi, type StepChangeSubscriber, type StepOptions, type SupportAnimationTarget, type SyncServiceApi, type TAttributesServiceApi, type TAttributesSubscriber, TChangeType, type TStepServiceApi, type TSubscriber, type TextureInfo, ThemeBackground, ThemeColor, type ThemeProviderProps, type ThemeServiceApi, ThemeShape, type ThemeState, TimeUtils, type Translator, type UploadButtonAndListProps, UrlUtils, type UseBase, type UseStepOptions, type UseTAttributes, type UseTStep, type UseTranslations, type UserAuth, type UserInfo, type UserServiceApi, type V2, type V3, type V4, VectorUtils, VersionPoint, type ViewPlugin, sleep, throttle };
3137
+ export { acceptMime as AcceptMime, type AddLocalDataOptionInterface as AddLocalDataOption, type AnchorProps, type AntCheckboxProps, type AntColorProps, type AntEmptyProps, type AntNumberProps, type AntSelectProps, type AntSwitchProps, type AwarenessChangeSubscriber, type AwarenessChanges, type AwarenessServiceApi, type BasePlugin, type C3, type C4, type CameraConfigurationAnimationApi, type CameraLocationAnimationApi, ContextMenu, type ContextMenuController, type ContextMenuCreateOptions, type ContextMenuServiceApi, CryptoUtils, DataUtils, Dialog, DialogContentAlign, type DialogCreateOptions, type DialogPlugin, type DialogServiceApi, type DivProps, type DivPropsSimple, DomNotFoundError, type DrawerPlugin, type EasyPropertyAnimationApi, EnableLevel, type FileData, type FileProgressBarProps, FileUtils, type FirstLoadModelServiceApi, FirstLoadModelServiceEventType, FirstLoadModelServiceStatus, type FirstLoadModelServiceSubscriber, type FirstLoadServiceApi, FirstLoadServiceEventType, FirstLoadServiceStatus, type FirstLoadServiceSubscriber, type FlexGrowProps, FocusMode, type FogAnimationApi, type GroundAnimationApi, type HighLightInfo, type HistoryServiceApi, HistoryServiceEventType, type HistoryServiceStateSubscriber, type HistoryServiceSubscriber, type IconPlugin, IconPluginPosition, type IconViewProps, type InternationalizationProviderProps, type InternationalizationServiceApi, LabelInfo, LabelTheme, type LastSubscriber, type LightAnimationApi, type LocalData, type LocalDataServiceApi, LocalDataServiceEventType, type LocalDataServiceSubscriber, LocalDataStatus, LocalDataType, Locale, type MainPortalProps, type MaterialSymbolFunction, type MaterialSymbolOptions, type MaterialSymbolProps, MathUtils, type MeetingServiceApi, type MeetingState, MeetingStatus, MenuLine, type MenuLineCreateOptions, MenuLineType, Message, type MessageLoader, type MessageServiceApi, type MessageState, type MessageTree, type MessageType, type MixView, type NamespaceSubscriber, type NativeAnyEventSubscriber, type NativeDragEventSubscriber, type NativeEventServiceApi, NativeEventUtils, type NativeFocusEventSubscriber, type NativeKeyboardEventSubscriber, type NativeMouseEventSubscriber, type NativePointerEventSubscriber, type NativeUIEventSubscriber, type NativeWheelEventSubscriber, NetworkUtils, type NfpApi, type NodeMaterialChangeListener, type NodeMaterialInfo, type NodePair, NotFoundError, NumberUtils, type OssUploadInstance, OssUploadInstanceStatus, type OssUploadServiceApi, OssUploadServiceEventType, type OssUploadServiceSubscriber, type Page, PageMode, PageType, PageUtils, type PluginConfig, type PluginConnectorApi, type PluginContainerServiceApi, PluginEventType, type PluginInformation, type PluginServiceApi, type PluginServiceSubscriber, type PluginState, PluginType, type PluginViewProps, type ProgressBarProps, type ResourcePreviewProps, type ResourceServiceApi, type RsAudioServiceApi, type RsClickApi, type RsEnvironmentApi, type RsEnvironmentServiceApi, type RsLabelServiceApi, type RsLoopAnimationManagerApi, type RsMaterialServiceApi, type RsModel, type RsModelServiceApi, RsModelServiceEventType, type RsModelServiceSubscriber, RsModelStatus, type RsNodeMaterialManagerApi, type RsNodeServiceApi, type RsSelectionApi, type RsSelectionMaterialInfo, type RsSelectionNodeInfo, type RsSelectionServiceApi, type RsSelectionState, type RsSeparateServiceApi, type RsServiceApi, type RsTextureServiceApi, type RsdButtonProps, type RsdCheckableButtonProps, type RsdCheckboxProps, type RsdColorProps, type RsdFileSelectProps, type RsdInputProps, type RsdMentionsProps, type RsdNoneProps, type RsdNumberListProps, type RsdNumberProps, type RsdSelectProps, type RsdSwitchProps, type RsdTitleProps, RvAttachType, type RvAttributes, type RvAttributesServiceApi, type RvAudio, type RvAwareness, type RvAwarenessClick, type RvAwarenessDevice, type RvAwarenessUser, type RvAwarenessWindow, type RvBase, type RvBasicConfig, RvBasicType, type RvCamera, type RvCameraLocation, type RvCode, type RvCodeAttributeApi, type RvConfiguration, type RvEnvironment, type RvFile, type RvFileServiceApi, RvFileServiceEventType, type RvFileServiceSubscriber, RvFileType, type RvGlobal, type RvGlobalServiceApi, type RvHistory, type RvLabel, type RvLabelAttributeApi, type RvLocation, type RvLocationAttributeApi, type RvLoop, type RvLoopAttributeApi, type RvMaterial, type RvMaterialAttributeApi, type RvMaterialGeneral, type RvMaterialNode, type RvMaterialNodeInput, type RvMaterialPBR, type RvMaterialTexture, RvMaterialType, type RvMeeting, type RvMeetingCurrent, type RvMeetingServiceApi, type RvMeetingStatistic, type RvModel, RvModelOrigin, type RvModelServiceApi, type RvNative, type RvNativeAttributeApi, type RvNode, type RvNodeMaterialAnalyzerApi, type RvPlugin, type RvPluginConfig, type RvPluginDebug, RvPresetType, type RvResource, type RvResourceServiceApi, RvResourceServiceEventType, type RvResourceServiceSubscriber, RvResourceType, type RvSceneNode, type RvSeparate, type RvStep, type RvStepServiceApi, RvUtils, type RvVersion, type SceneServiceApi, type Screen, ScreenSize, type ScrollBarProps, type SelectedSubscriber, type ShadowAnimationApi, ShareMode, type SkyboxAnimationApi, type SpaceServiceApi, type SpanProps, type SpanPropsSimple, StaticClassInstantiationError, type Status, type StatusChangeSubscriber, type StatusServiceApi, type StepChangeSubscriber, type StepOptions, type SupportAnimationTarget, type SyncServiceApi, type TAttributesServiceApi, type TAttributesSubscriber, TChangeType, type TStepServiceApi, type TSubscriber, type TextureInfo, ThemeBackground, ThemeColor, type ThemeProviderProps, type ThemeServiceApi, ThemeShape, type ThemeState, TimeUtils, type Translator, type UploadButtonAndListProps, UrlUtils, type UseBase, type UseStepOptions, type UseTAttributes, type UseTStep, type UseTranslations, type UserAuth, type UserInfo, type UserServiceApi, type V2, type V3, type V4, VectorUtils, VersionPoint, type ViewPlugin, sleep, throttle };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var t=Object.defineProperty,n=class extends Error{constructor(t){super(t),this.name="NotFoundError"}},e=class extends n{constructor(t){super(t),this.name="DomNotFoundError"}},o=class extends Error{constructor(t){super(`${t} is a static class and cannot be instantiated.`),this.name="StaticClassInstantiationError"}},i=(t=>(t.Default="Default",t))(i||{}),r=class{constructor(t,n=null,e="",o="Default",i=0,r=0){this.nid=t,this.node=n,this.text=e,this.theme=o,this.x=i,this.y=r}parentElement=null;pointElement=null;lineElement=null;blockElement=null;textElement=null;validate=!1;always=!1;show=!1;lastClickTime=0;lastSp=null},a=(t=>(t.ADD="ADD",t.REMOVE="REMOVE",t.START="START",t.PROGRESS="PROGRESS",t.PAUSE="PAUSE",t.RESUME="RESUME",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(a||{}),s=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(s||{}),u=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(u||{}),c=(t=>(t.START="START",t.PROGRESS="PROGRESS",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(c||{}),E=class t{constructor(t,n,e=[],o=!1,i=0,r=0,a=!1,s,u=null,c=new Date){this.options=t,this.id=n,this.lines=e,this.showIcon=o,this.x=i,this.y=r,this.closeOnOutsideClick=a,this.theme=s,this.controller=u,this.createTime=c}static fromOptions(n,e,o){let{showIcon:i}=e;return void 0===i&&e.lines?.forEach(t=>{t.icon&&(i=!0)}),new t(e,n,o,i,e.x,e.y,e.closeOnOutsideClick,e.theme)}},l=(t=>(t.BUTTON="BUTTON",t.DIVIDER="DIVIDER",t.CHECKBOX="CHECKBOX",t.SUB="SUB",t.VIEW="VIEW",t))(l||{}),T=class t{constructor(t,n,e="BUTTON",o="",i="",r=void 0,a=void 0,s="",u=!1,c="",E=()=>{},l=()=>{},T=()=>{},f="BUTTON"===e,R=!1,A=()=>{},h=void 0,S=new Date){this.options=t,this.id=n,this.type=e,this.text=o,this.tip=i,this.icon=r,this.view=a,this.color=s,this.disabled=u,this.shortcut=c,this.onClick=E,this.onMouseOver=l,this.onMouseOut=T,this.closeAllOnClick=f,this.checkboxDefaultValue=R,this.onCheckboxChange=A,this.sub=h,this.createTime=S}static fromOptions(n,e){return new t(e,n,e.type,e.text,e.tip,e.icon,e.view,e.color,e.disabled,e.shortcut,e.onClick,e.onMouseOver,e.onMouseOut,e.closeAllOnClick,e.checkboxDefaultValue,e.onCheckboxChange,e.sub)}},f=(t=>(t.GREEN="GREEN",t.PURPLE="PURPLE",t.BLUE="BLUE",t.PINK="PINK",t))(f||{}),R=(t=>(t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT",t))(R||{}),A=class t{constructor(t,n,e="",o=void 0,i="",r="LEFT",a=void 0,s=void 0,u=void 0,c="BLUE",E=!1,l="",T={},f="",R="",A=!1,h="",S="",O=A,D=!1,L=()=>{},d=()=>!0,N=!0,I=()=>{},C=()=>{},m=()=>{},p=()=>{},P=()=>{},g=()=>{},y=()=>{},U=()=>{},w=()=>()=>{},M=!0,B=!0,x=!1,b=!0,G=!1,v=h,F=new Date,V=()=>{},H=new Map){this.options=t,this.id=n,this.title=e,this.titleIcon=o,this.content=i,this.contentAlign=r,this.contentView=a,this.icon=s,this.view=u,this.theme=c,this.leftMode=E,this.className=l,this.style=T,this.confirmText=f,this.cancelText=R,this.enableInput=A,this.defaultValue=h,this.inputPlaceholder=S,this.autoFocus=O,this.allowEmpty=D,this.onChange=L,this.onCheck=d,this.enableCloseButton=N,this.onConfirm=I,this.onCancel=C,this.onClose=m,this.onConfirmButtonClick=p,this.onCancelButtonClick=P,this.onOutsideClick=g,this.onCloseButtonClick=y,this.onRender=U,this.onEffect=w,this.closeOnConfirm=M,this.closeOnCancel=B,this.closeOnOutsideClick=x,this.closeOnCloseButtonClick=b,this.alignButton=G,this.inputValue=v,this.createTime=F,this.focusInput=V,this.elements=H}static fromOptions(n,e){return new t(e,n,e.title,e.titleIcon,e.content,e.contentAlign,e.contentView,e.icon,e.view,e.theme,e.leftMode,e.className,e.style,e.confirmText,e.cancelText,e.enableInput,e.defaultValue,e.inputPlaceholder,e.autoFocus,e.allowEmpty,e.onChange,e.onCheck,e.enableCloseButton,e.onConfirm,e.onCancel,e.onClose,e.onConfirmButtonClick,e.onCancelButtonClick,e.onOutsideClick,e.onCloseButtonClick,e.onRender,e.onEffect,e.closeOnConfirm,e.closeOnCancel,e.closeOnOutsideClick,e.closeOnCloseButtonClick,e.alignButton)}setHide=()=>{}},h=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(h||{}),S=(t=>(t.START="START",t.PROGRESS="PROGRESS",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(S||{}),O={};((n,e)=>{for(var o in e)t(n,o,{get:e[o],enumerable:!0})})(O,{AAC:()=>W,ANIMATION:()=>x,ANY:()=>m,ATTACH_LIST:()=>Pt,AVI:()=>ot,AVIF:()=>tt,BMP:()=>$,CAMERA:()=>U,FLAC:()=>k,FLV:()=>st,GIF:()=>j,GLB:()=>b,GLTF:()=>G,GP3:()=>ct,HEIF:()=>Z,ICO:()=>Q,JPG:()=>X,JSON:()=>lt,LIGHT:()=>y,MARKDOWN:()=>Rt,MATERIAL:()=>M,MESH:()=>g,MKV:()=>Et,MOV:()=>rt,MP3:()=>V,MP4:()=>nt,MPEG:()=>it,NF:()=>Tt,OBJ:()=>F,OGG:()=>_,OGV:()=>ut,OPUS:()=>z,PNG:()=>Y,SCENE:()=>P,STL:()=>v,SUPPORT_ALL_LIST:()=>It,SUPPORT_AUDIO_LIST:()=>Dt,SUPPORT_BABYLON_LIST:()=>Ot,SUPPORT_FILE_LIST:()=>Ct,SUPPORT_IMAGE_LIST:()=>At,SUPPORT_JSON_LIST:()=>dt,SUPPORT_MODEL_LIST:()=>ht,SUPPORT_NEXTFLOW_LIST:()=>Nt,SUPPORT_RENDER_LIST:()=>mt,SUPPORT_TEXTURE_LIST:()=>pt,SUPPORT_TEXT_LIST:()=>Lt,SUPPORT_VIDEO_LIST:()=>St,SVG:()=>J,TEXTURE:()=>w,TIFF:()=>q,TXT:()=>ft,UNKNOWN:()=>p,UV:()=>B,WAV:()=>H,WMV:()=>at,WebM:()=>et,WebP:()=>K,getExtension:()=>xt,getMime:()=>Bt,getMimeByBlob:()=>gt,getMimeByBuffer:()=>wt,getMimeByPath:()=>yt,getMimeByStream:()=>Mt,getMimeByUrl:()=>Ut,isAttach:()=>Kt,isBabylon:()=>_t,isMaterial:()=>jt,isSupport:()=>bt,isSupportAudio:()=>kt,isSupportFile:()=>Gt,isSupportImage:()=>vt,isSupportJson:()=>Wt,isSupportModel:()=>Ft,isSupportRender:()=>zt,isSupportText:()=>Ht,isSupportTexture:()=>Xt,isSupportVideo:()=>Vt,isTexture:()=>Yt,isUV:()=>$t});import{AbstractMesh as D,BaseTexture as L,Material as d}from"@babylonjs/core";import{fileTypeFromBlob as N,fileTypeFromBuffer as I,fileTypeFromStream as C}from"file-type";var m="*/*",p="unknown/unknown",P="babylonjs/scene",g="babylonjs/mesh",y="babylonjs/light",U="babylonjs/camera",w="babylonjs/texture",M="babylonjs/material",B="babylonjs/uv",x="babylonjs/animation",b="model/gltf-binary",G="model/gltf+json",v="model/stl",F="model/obj",V="audio/mpeg",H="audio/wav",W="audio/aac",_="audio/ogg",k="audio/flac",z="audio/opus",X="image/jpeg",Y="image/png",j="image/gif",$="image/bmp",K="image/webp",J="image/svg+xml",q="image/tiff",Q="image/x-icon",Z="image/heif",tt="image/avif",nt="video/mp4",et="video/webm",ot="video/x-msvideo",it="video/mpeg",rt="video/quicktime",at="video/x-ms-wmv",st="video/x-flv",ut="video/ogg",ct="video/3gpp",Et="video/x-matroska",lt="application/json",Tt="nextflow/sync",ft="text/plain",Rt="text/markdown",At=[X,Y],ht=[P,b,G,v,F],St=[nt],Ot=[P,g,y,U,w,M,B,x],Dt=[V,H],Lt=[ft],dt=[lt],Nt=[Tt],It=[...At,...ht,...St,...Ot,...Dt,...Lt,...dt],Ct=[...At,...ht,...St,...Dt,...Lt,...dt],mt=[...At,...ht,...St,...Lt],pt=[...At,...St,w],Pt=[w,M,B];async function gt(t){if(t&&t instanceof Blob){if(t instanceof File&&t.name.endsWith(".babylon"))return P;const n=await N(t);return!n&&t instanceof File&&t.name.endsWith(".stl")?v:n?.mime??p}return p}async function yt(t){if(t){if(t.endsWith(".babylon"))return P;return(await import("mime")).default.getType(t)??p}return p}async function Ut(t){if(!t)return p;if(t.endsWith(".babylon"))return P;try{const n=await fetch(t);if(!n.body)return p;const e=await C(n.body);if(e?.mime)return e.mime;const o=new URL(t).pathname;if(o.includes("."))return await yt(o)}catch(t){console.error("getMimeByUrl",t)}return p}async function wt(t){if(t){const n=await I(t);return n?.mime??p}return p}async function Mt(t){const n=await C(t);return n?.mime??p}async function Bt(t){return t?"undefined"!=typeof ReadableStream&&t instanceof ReadableStream?Mt(t):t instanceof Blob?gt(t):"string"==typeof t?t.startsWith("http://")||t.startsWith("https://")?Ut(t):yt(t):t instanceof ArrayBuffer||t instanceof Uint8Array?wt(t):t instanceof L?w:t instanceof d?M:t instanceof D?g:p:p}async function xt(t=p){if(t===P)return"babylon";if(_t(t)||Kt(t))return t;if(t===m||t===p)return"";return(await import("mime")).default.getExtension(t)??""}function bt(t=p){return t==m||t!=p&&It.includes(t)}function Gt(t=p){return t==m||t!=p&&Ct.includes(t)}function vt(t=p){return t==m||t!=p&&At.includes(t)}function Ft(t=p){return t==m||t!=p&&ht.includes(t)}function Vt(t=p){return t==m||t!=p&&St.includes(t)}function Ht(t=p){return t==m||t!=p&&Lt.includes(t)}function Wt(t=p){return t==m||t!=p&&dt.includes(t)}function _t(t=p){return t==m||t!=p&&Ot.includes(t)}function kt(t=p){return t==m||t!=p&&Dt.includes(t)}function zt(t=p){return t==m||t!=p&&mt.includes(t)}function Xt(t=p){return t==m||t!=p&&pt.includes(t)}function Yt(t=p){return t==m||t!=p&&t==w}function jt(t=p){return t==m||t!=p&&t==M}function $t(t=p){return t==m||t!=p&&t==B}function Kt(t=p){return t==m||t!=p&&Pt.includes(t)}var Jt=(t=>(t.ADD="ADD",t.REMOVE="REMOVE",t.START="START",t.PROGRESS="PROGRESS",t.PAUSE="PAUSE",t.RESUME="RESUME",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(Jt||{}),qt=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.PAUSED="PAUSED",t.LOADED="LOADED",t.FAILED="FAILED",t.CANCELED="CANCELED",t))(qt||{}),Qt=(t=>(t.BLOB="BLOB",t.OBJECT="OBJECT",t))(Qt||{}),Zt=(t=>(t.WAITING="WAITING",t.UPLOADING="UPLOADING",t.PAUSED="PAUSED",t.COMPLETED="COMPLETED",t.FAILED="FAILED",t.CANCELED="CANCELED",t))(Zt||{}),tn=(t=>(t.START="START",t.PROGRESS="PROGRESS",t.PAUSE="PAUSE",t.RESUME="RESUME",t.UPLOADED="UPLOADED",t.FAILED="FAILED",t.CANCELED="CANCELED",t))(tn||{}),nn=(t=>(t.ZH="ZH",t.EN="EN",t))(nn||{}),en=(t=>(t.PENDING="PENDING",t.PROGRESSING="PROGRESSING",t.ENDED="ENDED",t.CANCELED="CANCELED",t.BANNED="BANNED",t))(en||{}),on=(t=>(t.NONE="NONE",t.SELF="SELF",t.ALL="ALL",t))(on||{}),rn=class{constructor(t,n,e,o){this.text=t,this.type=n,this.duration=e,this.id=o}show=!0;height=20;opacity=0},an=(t=>(t.ADD="ADD",t.INSTALL="INSTALL",t.ENABLE="ENABLE",t.OPEN="OPEN",t.CLOSE="CLOSE",t.DISABLE="DISABLE",t.UNINSTALL="UNINSTALL",t.DEBUG="DEBUG",t))(an||{}),sn=(t=>(t.DISPLAY="DISPLAY",t.FULL="FULL",t.HP_BOX="HP_BOX",t.VR="VR",t.MR="MR",t))(sn||{}),un=(t=>(t.EDITOR="EDITOR",t.VIEWER="VIEWER",t.VISITOR="VISITOR",t))(un||{}),cn=(t=>(t.DEFAULT="DEFAULT",t.DESCRIPTION="DESCRIPTION",t))(cn||{}),En=(t=>(t.XS="XS",t.SM="SM",t.MD="MD",t.LG="LG",t.XL="XL",t))(En||{}),ln=(t=>(t.DEFAULT="DEFAULT",t.BACKGROUND="BACKGROUND",t.LIGHT="LIGHT",t.DARK="DARK",t))(ln||{}),Tn=(t=>(t.GENERAL="GENERAL",t.RHINE="RHINE",t))(Tn||{}),fn=(t=>(t.UNDO="UNDO",t.REDO="REDO",t))(fn||{}),Rn=(t=>(t.ADD="ADD",t.REMOVE="REMOVE",t))(Rn||{}),An=(t=>(t.OSS="OSS",t.URL="URL",t))(An||{}),hn=(t=>(t.TEXT="TEXT",t.CUBE="CUBE",t.SPHERE="SPHERE",t.CONE="CONE",t.PRISM="PRISM",t.POLYHEDRON="POLYHEDRON",t.TORUS="TORUS",t.CYLINDER="CYLINDER",t.ICO_SPHERE="ICO_SPHERE",t.CAPSULE="CAPSULE",t.PLANE="PLANE",t))(hn||{}),Sn=(t=>(t.BASIC="BASIC",t.PROVIDE="PROVIDE",t.UPLOAD="UPLOAD",t))(Sn||{}),On=(t=>(t.NONE="NONE",t.INSTALL="INSTALL",t.ENABLE="ENABLE",t.OPEN="OPEN",t))(On||{}),Dn=(t=>(t.LATEST_STABLE="LATEST_STABLE",t.LATEST_NIGHTLY="LATEST_NIGHTLY",t.LATEST_CANARY="LATEST_CANARY",t))(Dn||{}),Ln=(t=>(t.TEXTURE="TEXTURE",t.MATERIAL="MATERIAL",t.UV="UV",t))(Ln||{}),dn=(t=>(t.FILE="FILE",t.ATTACH="ATTACH",t))(dn||{}),Nn=(t=>(t.NONE="NONE",t.PBR="PBR",t.STANDARD="STANDARD",t.NODE="NODE",t.OTHER="OTHER",t.TERRAIN="TERRAIN",t.FUR="FUR",t.WATER="WATER",t.LAVA="LAVA",t.SKY="SKY",t.BACKGROUND="BACKGROUND",t.MULTI="MULTI",t.SHADER="SHADER",t))(Nn||{}),In=(t=>(t.NONE="NONE",t.METAL="METAL",t.PLASTIC="PLASTIC",t.GLASS="GLASS",t.WOOD="WOOD",t.MIRROR="MIRROR",t.CRYSTAL="CRYSTAL",t.PAINT="PAINT",t.CLOTH="CLOTH",t))(In||{}),Cn=(t=>(t.ADD="ADD",t.REMOVE="REMOVE",t))(Cn||{}),mn=(t=>(t.SYNC="SYNC",t.STEP="STEP",t.SELECT="SELECT",t.ADD="ADD",t.UPDATE="UPDATE",t.DELETE="DELETE",t))(mn||{}),pn=(t=>(t[t.TOP=0]="TOP",t[t.RIGHT=1]="RIGHT",t[t.BOTTOM=2]="BOTTOM",t[t.LEFT=3]="LEFT",t[t.TOP_LEFT=4]="TOP_LEFT",t[t.BOTTOM_LEFT=5]="BOTTOM_LEFT",t[t.TOP_RIGHT=6]="TOP_RIGHT",t[t.BOTTOM_RIGHT=7]="BOTTOM_RIGHT",t[t.UNKNOWN=8]="UNKNOWN",t))(pn||{}),Pn=(t=>(t.BUTTON="BUTTON",t.SWITCH="SWITCH",t.DRAWER="DRAWER",t.DIALOG="DIALOG",t.CONTENT="CONTENT",t.WINDOW="WINDOW",t.SERVICE="SERVICE",t))(Pn||{});var gn={computeSHA256:async function(t){const n=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map(t=>t.toString(16).padStart(2,"0")).join("")}};var yn={recursPathValue:function(t,n){const e=[];return e.push({path:t,value:n}),e}};function Un(t){const n=Math.floor(t).toString().length<=1?2:1;return t.toFixed(n)}async function wn(t){if(t.size<=1048576){const n=await t.arrayBuffer();return gn.computeSHA256(n)}const n=[.25,.5,.75].map(n=>Math.floor(t.size*n)),e=await Promise.all(n.map(async n=>{const e=n,o=Math.min(e+65536,t.size),i=t.slice(e,o),r=await i.arrayBuffer();return gn.computeSHA256(r)})),o=new TextEncoder,i=e.join(""),r=o.encode(i);return gn.computeSHA256(r)}var Mn={to3n:Un,convertBytesToHigherUnit:function(t){const n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];let e=0;for(;t>=1024&&e<n.length-1;)t/=1024,e++;let o=Un(t);return o.endsWith(".0")&&(o=o.slice(0,-2)),o.endsWith(".00")&&(o=o.slice(0,-3)),`${o} ${n[e]}`},splitName:function(t){const n=t.lastIndexOf(".");return-1===n?[t,""]:[t.substring(0,n),t.substring(n+1)]},ensureFileArray:function(t){return t?t instanceof File?[t]:t instanceof FileList?Array.from(t):t:[]},chunkHash:wn,isSameFile:async function(t,n,e,o){if(n===t.name&&e===t.size){if(!o)return!0;if(o===await wn(t))return!0}return!1},getFileInfo:async function(t){const n=await fetch(t,{method:"HEAD"});if(!n.ok)throw new Error(`HEAD request failed with status: ${String(n.status)}`);const e=n.headers.get("Content-Length");let o;if(e){if(o=parseInt(e,10),isNaN(o))throw new Error("Invalid file size from header")}else{const n=await fetch(t);if(!n.ok)throw new Error(`GET request failed with status: ${String(n.status)}`);o=(await n.blob()).size}return{name:new URL(t).pathname.split("/").pop()??"unknown",size:o}}};var Bn={toDegrees:function(t){return t*(180/Math.PI)},toRadians:function(t){return t*(Math.PI/180)},approximatelyEqual:function(t,n,e=1e-6){return Math.abs(t-n)<e},getDistance:function(t,n,e,o){return Math.sqrt((e-t)**2+(o-n)**2)},getDistance3d:function(t,n,e,o,i,r){return Math.sqrt((o-t)**2+(i-n)**2+(r-e)**2)},getNearestNumberIndex:function(t,n){let e=1/0,o=-1;for(let i=0;i<n.length;i++){const r=Math.abs(t-n[i]);r<e&&(e=r,o=i)}return o}};function xn(t){if(t.type.includes("touch")){const n=t;if(n.touches.length){const t=n.touches[0];return[t.clientX,t.clientY]}const e=n.changedTouches[0];return[e.clientX,e.clientY]}const n=t;return[n.clientX,n.clientY]}var bn={getEventPosition:xn,getDistanceBetweenEvents:function(t,n){const[e,o]=xn(t),[i,r]=xn(n);return Bn.getDistance(e,o,i,r)},preventDefaultListener:function(t){t.preventDefault()},stopPropagationListener:function(t){t.stopPropagation()},preventDefaultStopPropagationListener:function(t){t.preventDefault(),t.stopPropagation()}};var Gn={fetchJsonWithRetry:async function(t,n=3){let e;for(let o=0;o<n;o++)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP Error: Status ${n.status.toString()}`);return await n.json()}catch(n){e=n,console.log(`Attempt ${(o+1).toString()} Failed: Retrying...\n${t}`)}throw e},fetchBlobWithRetry:async function(t,n=3){let e;for(let o=0;o<n;o++)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP Error: Status ${n.status.toString()}`);return await n.blob()}catch(n){e=n,console.log(`Attempt ${(o+1).toString()} Failed: Retrying...\n${t}`)}throw e}};function vn(t,n){const e=10**n;return Math.round(t*e)/e}var Fn={roundToX:vn,r2:function(t){return vn(t,2)},r3:function(t){return vn(t,3)},isValidNumber:function(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}};var Vn={getPageTypeBySpaceText:function(t){return"space"===t?"EDITOR":"m"===t?"VISITOR":"VIEWER"},getSearchParams:function(t){return new URLSearchParams(window.location.search).get(t)??void 0}};function Hn(t){const n=[];for(const e of t.split(".")){const t=parseInt(e,10);isNaN(t)||e!==t.toString()?n.push(e):n.push(t)}return n}function Wn(t){return t.join(".")}function _n(t){return"string"==typeof t?Hn(t):t}var kn={makeRvPath:Hn,makeRvPathString:Wn,ensureRvPath:_n,ensureRvPathString:function(t){return"string"!=typeof t?Wn(t):t},getByRvPath:function(t,n){const e=_n(n);let o=t;for(const t of e){if(null==o)return;o=o[t]}return o},setByRvPath:function(t,n,e){const o=_n(n);let i=t;for(let t=0;t<o.length-1;t++)i=i[o[t]];i[o[o.length-1]]=e},checkRvPathOverlay:function(t,n){const e=_n(t),o=_n(n),i=e.length>o.length?o.length:e.length;for(let t=0;t<i;t++)if(e[t]!=o[t])return!1;return!0}};function zn(t){return new Promise(n=>{setTimeout(n,t)})}function Xn(t,n){if(0===n)return t;let e,o,i=0,r=null;function a(){i=Date.now(),e&&t.apply(o,e)}return function(...t){const s=Date.now()-i;e=t,o=this,0!==i?(r&&(clearTimeout(r),r=null),s<n?r=setTimeout(()=>{a(),r=null},n-s):a()):setTimeout(a,1)}}var Yn={convertTimeText:function(t){const n=Math.floor(t/3600),e=Math.floor(t%3600/60),o=Math.floor(t%60);return[n>0?String(n).padStart(2,"0"):null,String(e).padStart(2,"0"),String(o).padStart(2,"0")].filter(Boolean).join(":")},formatDateTo17Digits:function(t=new Date){return t.getFullYear().toString()+(t.getMonth()+1).toString().padStart(2,"0")+t.getDate().toString().padStart(2,"0")+t.getHours().toString().padStart(2,"0")+t.getMinutes().toString().padStart(2,"0")+t.getSeconds().toString().padStart(2,"0")+t.getMilliseconds().toString().padStart(3,"0")},formatDuration:function(t,n){const e=n-t,o=Math.floor(e/1e3),i=Math.floor(o/3600),r=Math.floor(o%3600/60),a=o%60;return`${i>0?`${i.toString().padStart(2,"0")}:`:""}${r.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}`}};async function jn(t){try{return await navigator.clipboard.writeText(t),!0}catch{return!1}}var $n={getParam:function(t){const n=new RegExp(`(^|&)${t}=([^&]*)(&|$)`,"i"),e=window.location.search.substring(1).match(n);return null!=e?decodeURIComponent(e[2]):""},getHashParam:function(t){const n=new RegExp(`(^|&)${t}=([^&]*)(&|$)`,"i"),e=window.location.hash.substring(1).match(n);return null!=e?decodeURIComponent(e[2]):""},check:function(t){return new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?:\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i").test(t)},copyCurrentUrlToClipboard:async function(){return jn(window.location.href)},copyText:async function(t){try{return await navigator.clipboard.writeText(t),!0}catch{return!1}},trySetClipboard:jn,extractFilenameFromUrl:function(t,n=!0){try{const e=new URL(t),o=e.pathname.split("/").pop()??"";return!n&&o.includes(".")?o.substring(0,o.lastIndexOf(".")):o}catch{return""}}};import{Quaternion as Kn,Vector3 as Jn}from"@babylonjs/core";function qn(t){return{x:180*t.x/Math.PI,y:180*t.y/Math.PI,z:180*t.z/Math.PI}}function Qn(t){return new Kn(t.x,t.y,t.z,t.w)}function Zn(t){return"w"in t}var te={xyToArray:function(t,n=-1,e=[0,0]){return t?-1===n?[t.x,t.y]:[Fn.roundToX(t.x,n),Fn.roundToX(t.y,n)]:e},xyzToArray:function(t,n=-1,e=[0,0,0]){return t?-1===n?[t.x,t.y,t.z]:[Fn.roundToX(t.x,n),Fn.roundToX(t.y,n),Fn.roundToX(t.z,n)]:e},xyzwToArray:function(t,n=-1,e=[0,0,0,0]){return t?-1===n?[t.x,t.y,t.z,t.w]:[Fn.roundToX(t.x,n),Fn.roundToX(t.y,n),Fn.roundToX(t.z,n),Fn.roundToX(t.w,n)]:e},scaleV3:function(t,n){return{x:n.x*t,y:n.y*t,z:n.z*t}},radiansToDegrees:qn,degreeToRadians:function(t){return{x:t.x*Math.PI/180,y:t.y*Math.PI/180,z:t.z*Math.PI/180}},radiansToQuaternion:function(t){return Kn.RotationYawPitchRoll(t.y,t.x,t.z)},degreesToQuaternion:function(t){return Kn.RotationYawPitchRoll(t.y*Math.PI/180,t.x*Math.PI/180,t.z*Math.PI/180)},toVector3:function(t){return new Jn(t.x,t.y,t.z)},fromVector3:function(t){return{x:t.x,y:t.y,z:t.z}},withRound:function(t,n=0){return{x:Fn.roundToX(t.x,n),y:Fn.roundToX(t.y,n),z:Fn.roundToX(t.z,n)}},isFiniteVector:function(t){return isFinite(t.x)&&isFinite(t.y)&&isFinite(t.z)},noZero:function(t){return 0!==t.x&&0!==t.y&&0!==t.z},scaleV4:function(t,n){return{x:n.x*t,y:n.y*t,z:n.z*t,w:n.w*t}},toQuaternionVector:Qn,toEulerRadians:function(t){return Qn(t).toEulerAngles()},toEulerDegrees:function(t){return qn(Qn(t).toEulerAngles())},toArray:function(t){return Zn(t)?[t.x,t.y,t.z,t.w]:[t.x,t.y,t.z]},fromQuaternion:function(t){return{x:t.x,y:t.y,z:t.z,w:t.w}},toArrayWithRound4:function(t,n=0){return Zn(t)?[Fn.roundToX(t.x,n),Fn.roundToX(t.y,n),Fn.roundToX(t.z,n),Fn.roundToX(t.w,n)]:[Fn.roundToX(t.x,n),Fn.roundToX(t.y,n),Fn.roundToX(t.z,n)]}};export{O as AcceptMime,E as ContextMenu,gn as CryptoUtils,yn as DataUtils,A as Dialog,R as DialogContentAlign,e as DomNotFoundError,On as EnableLevel,Mn as FileUtils,c as FirstLoadModelServiceEventType,u as FirstLoadModelServiceStatus,S as FirstLoadServiceEventType,h as FirstLoadServiceStatus,cn as FocusMode,fn as HistoryServiceEventType,pn as IconPluginPosition,r as LabelInfo,i as LabelTheme,Jt as LocalDataServiceEventType,qt as LocalDataStatus,Qt as LocalDataType,nn as Locale,Bn as MathUtils,en as MeetingStatus,T as MenuLine,l as MenuLineType,rn as Message,bn as NativeEventUtils,Gn as NetworkUtils,n as NotFoundError,Fn as NumberUtils,Zt as OssUploadInstanceStatus,tn as OssUploadServiceEventType,sn as PageMode,un as PageType,Vn as PageUtils,an as PluginEventType,Pn as PluginType,a as RsModelServiceEventType,s as RsModelStatus,Ln as RvAttachType,hn as RvBasicType,Rn as RvFileServiceEventType,An as RvFileType,Nn as RvMaterialType,Sn as RvModelOrigin,In as RvPresetType,Cn as RvResourceServiceEventType,dn as RvResourceType,kn as RvUtils,En as ScreenSize,on as ShareMode,o as StaticClassInstantiationError,mn as TChangeType,ln as ThemeBackground,f as ThemeColor,Tn as ThemeShape,Yn as TimeUtils,$n as UrlUtils,te as VectorUtils,Dn as VersionPoint,zn as sleep,Xn as throttle};
1
+ var t=Object.defineProperty,n=class extends Error{constructor(t){super(t),this.name="NotFoundError"}},e=class extends n{constructor(t){super(t),this.name="DomNotFoundError"}},o=class extends Error{constructor(t){super(`${t} is a static class and cannot be instantiated.`),this.name="StaticClassInstantiationError"}},i=(t=>(t.Default="Default",t))(i||{}),r=class{constructor(t,n=null,e="",o="Default",i=0,r=0){this.nid=t,this.node=n,this.text=e,this.theme=o,this.x=i,this.y=r}parentElement=null;pointElement=null;lineElement=null;blockElement=null;textElement=null;validate=!1;always=!1;show=!1;lastClickTime=0;lastSp=null},a=(t=>(t.ADD="ADD",t.REMOVE="REMOVE",t.START="START",t.PROGRESS="PROGRESS",t.PAUSE="PAUSE",t.RESUME="RESUME",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(a||{}),s=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(s||{}),u=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(u||{}),c=(t=>(t.START="START",t.PROGRESS="PROGRESS",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(c||{}),E=class t{constructor(t,n,e=[],o=!1,i=0,r=0,a=!1,s,u=null,c=new Date){this.options=t,this.id=n,this.lines=e,this.showIcon=o,this.x=i,this.y=r,this.closeOnOutsideClick=a,this.theme=s,this.controller=u,this.createTime=c}static fromOptions(n,e,o){let{showIcon:i}=e;return void 0===i&&e.lines?.forEach(t=>{t.icon&&(i=!0)}),new t(e,n,o,i,e.x,e.y,e.closeOnOutsideClick,e.theme)}},l=(t=>(t.BUTTON="BUTTON",t.DIVIDER="DIVIDER",t.CHECKBOX="CHECKBOX",t.SUB="SUB",t.VIEW="VIEW",t))(l||{}),T=class t{constructor(t,n,e="BUTTON",o="",i="",r=void 0,a=void 0,s="",u=!1,c="",E=()=>{},l=()=>{},T=()=>{},f="BUTTON"===e,R=!1,A=()=>{},h=void 0,S=new Date){this.options=t,this.id=n,this.type=e,this.text=o,this.tip=i,this.icon=r,this.view=a,this.color=s,this.disabled=u,this.shortcut=c,this.onClick=E,this.onMouseOver=l,this.onMouseOut=T,this.closeAllOnClick=f,this.checkboxDefaultValue=R,this.onCheckboxChange=A,this.sub=h,this.createTime=S}static fromOptions(n,e){return new t(e,n,e.type,e.text,e.tip,e.icon,e.view,e.color,e.disabled,e.shortcut,e.onClick,e.onMouseOver,e.onMouseOut,e.closeAllOnClick,e.checkboxDefaultValue,e.onCheckboxChange,e.sub)}},f=(t=>(t.GREEN="GREEN",t.PURPLE="PURPLE",t.BLUE="BLUE",t.PINK="PINK",t))(f||{}),R=(t=>(t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT",t))(R||{}),A=class t{constructor(t,n,e="",o=void 0,i="",r="LEFT",a=void 0,s=void 0,u=void 0,c="BLUE",E=!1,l="",T={},f="",R="",A=!1,h="",S="",O=A,D=!1,L=()=>{},d=()=>!0,N=!0,I=()=>{},C=()=>{},m=()=>{},p=()=>{},P=()=>{},g=()=>{},y=()=>{},U=()=>{},w=()=>()=>{},M=!0,B=!0,x=!1,b=!0,G=!1,v=h,F=new Date,V=()=>{},H=new Map){this.options=t,this.id=n,this.title=e,this.titleIcon=o,this.content=i,this.contentAlign=r,this.contentView=a,this.icon=s,this.view=u,this.theme=c,this.leftMode=E,this.className=l,this.style=T,this.confirmText=f,this.cancelText=R,this.enableInput=A,this.defaultValue=h,this.inputPlaceholder=S,this.autoFocus=O,this.allowEmpty=D,this.onChange=L,this.onCheck=d,this.enableCloseButton=N,this.onConfirm=I,this.onCancel=C,this.onClose=m,this.onConfirmButtonClick=p,this.onCancelButtonClick=P,this.onOutsideClick=g,this.onCloseButtonClick=y,this.onRender=U,this.onEffect=w,this.closeOnConfirm=M,this.closeOnCancel=B,this.closeOnOutsideClick=x,this.closeOnCloseButtonClick=b,this.alignButton=G,this.inputValue=v,this.createTime=F,this.focusInput=V,this.elements=H}static fromOptions(n,e){return new t(e,n,e.title,e.titleIcon,e.content,e.contentAlign,e.contentView,e.icon,e.view,e.theme,e.leftMode,e.className,e.style,e.confirmText,e.cancelText,e.enableInput,e.defaultValue,e.inputPlaceholder,e.autoFocus,e.allowEmpty,e.onChange,e.onCheck,e.enableCloseButton,e.onConfirm,e.onCancel,e.onClose,e.onConfirmButtonClick,e.onCancelButtonClick,e.onOutsideClick,e.onCloseButtonClick,e.onRender,e.onEffect,e.closeOnConfirm,e.closeOnCancel,e.closeOnOutsideClick,e.closeOnCloseButtonClick,e.alignButton)}setHide=()=>{}},h=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(h||{}),S=(t=>(t.START="START",t.PROGRESS="PROGRESS",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(S||{}),O={};((n,e)=>{for(var o in e)t(n,o,{get:e[o],enumerable:!0})})(O,{AAC:()=>W,ANIMATION:()=>x,ANY:()=>m,ATTACH_LIST:()=>Pt,AVI:()=>ot,AVIF:()=>tt,BMP:()=>$,CAMERA:()=>U,FLAC:()=>_,FLV:()=>st,GIF:()=>j,GLB:()=>b,GLTF:()=>G,GP3:()=>ct,HEIF:()=>Z,ICO:()=>Q,JPG:()=>X,JSON:()=>lt,LIGHT:()=>y,MARKDOWN:()=>Rt,MATERIAL:()=>M,MESH:()=>g,MKV:()=>Et,MOV:()=>rt,MP3:()=>V,MP4:()=>nt,MPEG:()=>it,NF:()=>Tt,OBJ:()=>F,OGG:()=>z,OGV:()=>ut,OPUS:()=>k,PNG:()=>Y,SCENE:()=>P,STL:()=>v,SUPPORT_ALL_LIST:()=>It,SUPPORT_AUDIO_LIST:()=>Dt,SUPPORT_BABYLON_LIST:()=>Ot,SUPPORT_FILE_LIST:()=>Ct,SUPPORT_IMAGE_LIST:()=>At,SUPPORT_JSON_LIST:()=>dt,SUPPORT_MODEL_LIST:()=>ht,SUPPORT_NEXTFLOW_LIST:()=>Nt,SUPPORT_RENDER_LIST:()=>mt,SUPPORT_TEXTURE_LIST:()=>pt,SUPPORT_TEXT_LIST:()=>Lt,SUPPORT_VIDEO_LIST:()=>St,SVG:()=>J,TEXTURE:()=>w,TIFF:()=>q,TXT:()=>ft,UNKNOWN:()=>p,UV:()=>B,WAV:()=>H,WMV:()=>at,WebM:()=>et,WebP:()=>K,getExtension:()=>xt,getMime:()=>Bt,getMimeByBlob:()=>gt,getMimeByBuffer:()=>wt,getMimeByPath:()=>yt,getMimeByStream:()=>Mt,getMimeByUrl:()=>Ut,isAttach:()=>Kt,isBabylon:()=>zt,isMaterial:()=>jt,isSupport:()=>bt,isSupportAudio:()=>_t,isSupportFile:()=>Gt,isSupportImage:()=>vt,isSupportJson:()=>Wt,isSupportModel:()=>Ft,isSupportRender:()=>kt,isSupportText:()=>Ht,isSupportTexture:()=>Xt,isSupportVideo:()=>Vt,isTexture:()=>Yt,isUV:()=>$t});import{AbstractMesh as D,BaseTexture as L,Material as d}from"@babylonjs/core";import{fileTypeFromBlob as N,fileTypeFromBuffer as I,fileTypeFromStream as C}from"file-type";var m="*/*",p="unknown/unknown",P="babylonjs/scene",g="babylonjs/mesh",y="babylonjs/light",U="babylonjs/camera",w="babylonjs/texture",M="babylonjs/material",B="babylonjs/uv",x="babylonjs/animation",b="model/gltf-binary",G="model/gltf+json",v="model/stl",F="model/obj",V="audio/mpeg",H="audio/wav",W="audio/aac",z="audio/ogg",_="audio/flac",k="audio/opus",X="image/jpeg",Y="image/png",j="image/gif",$="image/bmp",K="image/webp",J="image/svg+xml",q="image/tiff",Q="image/x-icon",Z="image/heif",tt="image/avif",nt="video/mp4",et="video/webm",ot="video/x-msvideo",it="video/mpeg",rt="video/quicktime",at="video/x-ms-wmv",st="video/x-flv",ut="video/ogg",ct="video/3gpp",Et="video/x-matroska",lt="application/json",Tt="nextflow/sync",ft="text/plain",Rt="text/markdown",At=[X,Y],ht=[P,b,G,v,F],St=[nt],Ot=[P,g,y,U,w,M,B,x],Dt=[V,H],Lt=[ft],dt=[lt],Nt=[Tt],It=[...At,...ht,...St,...Ot,...Dt,...Lt,...dt],Ct=[...At,...ht,...St,...Dt,...Lt,...dt],mt=[...At,...ht,...St,...Lt],pt=[...At,...St,w],Pt=[w,M,B];async function gt(t){if(t&&t instanceof Blob){if(t instanceof File&&t.name.endsWith(".babylon"))return P;const n=await N(t);return!n&&t instanceof File&&t.name.endsWith(".stl")?v:n?.mime??p}return p}async function yt(t){if(t){if(t.endsWith(".babylon"))return P;return(await import("mime")).default.getType(t)??p}return p}async function Ut(t){if(!t)return p;if(t.endsWith(".babylon"))return P;try{const n=await fetch(t);if(!n.body)return p;const e=await C(n.body);if(e?.mime)return e.mime;const o=new URL(t).pathname;if(o.includes("."))return await yt(o)}catch(t){console.error("getMimeByUrl",t)}return p}async function wt(t){if(t){const n=await I(t);return n?.mime??p}return p}async function Mt(t){const n=await C(t);return n?.mime??p}async function Bt(t){return t?"undefined"!=typeof ReadableStream&&t instanceof ReadableStream?Mt(t):t instanceof Blob?gt(t):"string"==typeof t?t.startsWith("http://")||t.startsWith("https://")?Ut(t):yt(t):t instanceof ArrayBuffer||t instanceof Uint8Array?wt(t):t instanceof L?w:t instanceof d?M:t instanceof D?g:p:p}async function xt(t=p){if(t===P)return"babylon";if(zt(t)||Kt(t))return t;if(t===m||t===p)return"";return(await import("mime")).default.getExtension(t)??""}function bt(t=p){return t==m||t!=p&&It.includes(t)}function Gt(t=p){return t==m||t!=p&&Ct.includes(t)}function vt(t=p){return t==m||t!=p&&At.includes(t)}function Ft(t=p){return t==m||t!=p&&ht.includes(t)}function Vt(t=p){return t==m||t!=p&&St.includes(t)}function Ht(t=p){return t==m||t!=p&&Lt.includes(t)}function Wt(t=p){return t==m||t!=p&&dt.includes(t)}function zt(t=p){return t==m||t!=p&&Ot.includes(t)}function _t(t=p){return t==m||t!=p&&Dt.includes(t)}function kt(t=p){return t==m||t!=p&&mt.includes(t)}function Xt(t=p){return t==m||t!=p&&pt.includes(t)}function Yt(t=p){return t==m||t!=p&&t==w}function jt(t=p){return t==m||t!=p&&t==M}function $t(t=p){return t==m||t!=p&&t==B}function Kt(t=p){return t==m||t!=p&&Pt.includes(t)}var Jt=(t=>(t.ADD="ADD",t.REMOVE="REMOVE",t.START="START",t.PROGRESS="PROGRESS",t.PAUSE="PAUSE",t.RESUME="RESUME",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(Jt||{}),qt=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.PAUSED="PAUSED",t.LOADED="LOADED",t.FAILED="FAILED",t.CANCELED="CANCELED",t))(qt||{}),Qt=(t=>(t.BLOB="BLOB",t.OBJECT="OBJECT",t))(Qt||{}),Zt=(t=>(t.WAITING="WAITING",t.UPLOADING="UPLOADING",t.PAUSED="PAUSED",t.COMPLETED="COMPLETED",t.FAILED="FAILED",t.CANCELED="CANCELED",t))(Zt||{}),tn=(t=>(t.START="START",t.PROGRESS="PROGRESS",t.PAUSE="PAUSE",t.RESUME="RESUME",t.UPLOADED="UPLOADED",t.FAILED="FAILED",t.CANCELED="CANCELED",t))(tn||{}),nn=(t=>(t.ZH="zh",t.EN="en",t))(nn||{}),en=(t=>(t.PENDING="PENDING",t.PROGRESSING="PROGRESSING",t.ENDED="ENDED",t.CANCELED="CANCELED",t.BANNED="BANNED",t))(en||{}),on=(t=>(t.NONE="NONE",t.SELF="SELF",t.ALL="ALL",t))(on||{}),rn=class{constructor(t,n,e,o){this.text=t,this.type=n,this.duration=e,this.id=o}show=!0;height=20;opacity=0},an=(t=>(t.ADD="ADD",t.INSTALL="INSTALL",t.ENABLE="ENABLE",t.OPEN="OPEN",t.CLOSE="CLOSE",t.DISABLE="DISABLE",t.UNINSTALL="UNINSTALL",t.DEBUG="DEBUG",t))(an||{}),sn=(t=>(t.DISPLAY="DISPLAY",t.FULL="FULL",t.HP_BOX="HP_BOX",t.VR="VR",t.MR="MR",t))(sn||{}),un=(t=>(t.EDITOR="EDITOR",t.VIEWER="VIEWER",t.VISITOR="VISITOR",t))(un||{}),cn=(t=>(t.DEFAULT="DEFAULT",t.DESCRIPTION="DESCRIPTION",t))(cn||{}),En=(t=>(t.XS="XS",t.SM="SM",t.MD="MD",t.LG="LG",t.XL="XL",t))(En||{}),ln=(t=>(t.DEFAULT="DEFAULT",t.BACKGROUND="BACKGROUND",t.LIGHT="LIGHT",t.DARK="DARK",t))(ln||{}),Tn=(t=>(t.GENERAL="GENERAL",t.RHINE="RHINE",t))(Tn||{}),fn=(t=>(t.UNDO="UNDO",t.REDO="REDO",t))(fn||{}),Rn=(t=>(t.ADD="ADD",t.REMOVE="REMOVE",t))(Rn||{}),An=(t=>(t.OSS="OSS",t.URL="URL",t))(An||{}),hn=(t=>(t.TEXT="TEXT",t.CUBE="CUBE",t.SPHERE="SPHERE",t.CONE="CONE",t.PRISM="PRISM",t.POLYHEDRON="POLYHEDRON",t.TORUS="TORUS",t.CYLINDER="CYLINDER",t.ICO_SPHERE="ICO_SPHERE",t.CAPSULE="CAPSULE",t.PLANE="PLANE",t))(hn||{}),Sn=(t=>(t.BASIC="BASIC",t.PROVIDE="PROVIDE",t.UPLOAD="UPLOAD",t))(Sn||{}),On=(t=>(t.NONE="NONE",t.INSTALL="INSTALL",t.ENABLE="ENABLE",t.OPEN="OPEN",t))(On||{}),Dn=(t=>(t.LATEST_STABLE="LATEST_STABLE",t.LATEST_NIGHTLY="LATEST_NIGHTLY",t.LATEST_CANARY="LATEST_CANARY",t))(Dn||{}),Ln=(t=>(t.TEXTURE="TEXTURE",t.MATERIAL="MATERIAL",t.UV="UV",t))(Ln||{}),dn=(t=>(t.FILE="FILE",t.ATTACH="ATTACH",t))(dn||{}),Nn=(t=>(t.NONE="NONE",t.PBR="PBR",t.STANDARD="STANDARD",t.NODE="NODE",t.OTHER="OTHER",t.TERRAIN="TERRAIN",t.FUR="FUR",t.WATER="WATER",t.LAVA="LAVA",t.SKY="SKY",t.BACKGROUND="BACKGROUND",t.MULTI="MULTI",t.SHADER="SHADER",t))(Nn||{}),In=(t=>(t.NONE="NONE",t.METAL="METAL",t.PLASTIC="PLASTIC",t.GLASS="GLASS",t.WOOD="WOOD",t.MIRROR="MIRROR",t.CRYSTAL="CRYSTAL",t.PAINT="PAINT",t.CLOTH="CLOTH",t))(In||{}),Cn=(t=>(t.ADD="ADD",t.REMOVE="REMOVE",t))(Cn||{}),mn=(t=>(t.SYNC="SYNC",t.STEP="STEP",t.SELECT="SELECT",t.ADD="ADD",t.UPDATE="UPDATE",t.DELETE="DELETE",t))(mn||{}),pn=(t=>(t[t.TOP=0]="TOP",t[t.RIGHT=1]="RIGHT",t[t.BOTTOM=2]="BOTTOM",t[t.LEFT=3]="LEFT",t[t.TOP_LEFT=4]="TOP_LEFT",t[t.BOTTOM_LEFT=5]="BOTTOM_LEFT",t[t.TOP_RIGHT=6]="TOP_RIGHT",t[t.BOTTOM_RIGHT=7]="BOTTOM_RIGHT",t[t.UNKNOWN=8]="UNKNOWN",t))(pn||{}),Pn=(t=>(t.BUTTON="BUTTON",t.SWITCH="SWITCH",t.DRAWER="DRAWER",t.DIALOG="DIALOG",t.CONTENT="CONTENT",t.WINDOW="WINDOW",t.SERVICE="SERVICE",t))(Pn||{});var gn={computeSHA256:async function(t){const n=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map(t=>t.toString(16).padStart(2,"0")).join("")}};var yn={recursPathValue:function(t,n){const e=[];return e.push({path:t,value:n}),e}};function Un(t){const n=Math.floor(t).toString().length<=1?2:1;return t.toFixed(n)}async function wn(t){if(t.size<=1048576){const n=await t.arrayBuffer();return gn.computeSHA256(n)}const n=[.25,.5,.75].map(n=>Math.floor(t.size*n)),e=await Promise.all(n.map(async n=>{const e=n,o=Math.min(e+65536,t.size),i=t.slice(e,o),r=await i.arrayBuffer();return gn.computeSHA256(r)})),o=new TextEncoder,i=e.join(""),r=o.encode(i);return gn.computeSHA256(r)}var Mn={to3n:Un,convertBytesToHigherUnit:function(t){const n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];let e=0;for(;t>=1024&&e<n.length-1;)t/=1024,e++;let o=Un(t);return o.endsWith(".0")&&(o=o.slice(0,-2)),o.endsWith(".00")&&(o=o.slice(0,-3)),`${o} ${n[e]}`},splitName:function(t){const n=t.lastIndexOf(".");return-1===n?[t,""]:[t.substring(0,n),t.substring(n+1)]},ensureFileArray:function(t){return t?t instanceof File?[t]:t instanceof FileList?Array.from(t):t:[]},chunkHash:wn,isSameFile:async function(t,n,e,o){if(n===t.name&&e===t.size){if(!o)return!0;if(o===await wn(t))return!0}return!1},getFileInfo:async function(t){const n=await fetch(t,{method:"HEAD"});if(!n.ok)throw new Error(`HEAD request failed with status: ${String(n.status)}`);const e=n.headers.get("Content-Length");let o;if(e){if(o=parseInt(e,10),isNaN(o))throw new Error("Invalid file size from header")}else{const n=await fetch(t);if(!n.ok)throw new Error(`GET request failed with status: ${String(n.status)}`);o=(await n.blob()).size}return{name:new URL(t).pathname.split("/").pop()??"unknown",size:o}}};var Bn={toDegrees:function(t){return t*(180/Math.PI)},toRadians:function(t){return t*(Math.PI/180)},approximatelyEqual:function(t,n,e=1e-6){return Math.abs(t-n)<e},getDistance:function(t,n,e,o){return Math.sqrt((e-t)**2+(o-n)**2)},getDistance3d:function(t,n,e,o,i,r){return Math.sqrt((o-t)**2+(i-n)**2+(r-e)**2)},getNearestNumberIndex:function(t,n){let e=1/0,o=-1;for(let i=0;i<n.length;i++){const r=Math.abs(t-n[i]);r<e&&(e=r,o=i)}return o}};function xn(t){if(t.type.includes("touch")){const n=t;if(n.touches.length){const t=n.touches[0];return[t.clientX,t.clientY]}const e=n.changedTouches[0];return[e.clientX,e.clientY]}const n=t;return[n.clientX,n.clientY]}var bn={getEventPosition:xn,getDistanceBetweenEvents:function(t,n){const[e,o]=xn(t),[i,r]=xn(n);return Bn.getDistance(e,o,i,r)},preventDefaultListener:function(t){t.preventDefault()},stopPropagationListener:function(t){t.stopPropagation()},preventDefaultStopPropagationListener:function(t){t.preventDefault(),t.stopPropagation()}};var Gn={fetchJsonWithRetry:async function(t,n=3){let e;for(let o=0;o<n;o++)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP Error: Status ${n.status.toString()}`);return await n.json()}catch(n){e=n,console.log(`Attempt ${(o+1).toString()} Failed: Retrying...\n${t}`)}throw e},fetchBlobWithRetry:async function(t,n=3){let e;for(let o=0;o<n;o++)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP Error: Status ${n.status.toString()}`);return await n.blob()}catch(n){e=n,console.log(`Attempt ${(o+1).toString()} Failed: Retrying...\n${t}`)}throw e}};function vn(t,n){const e=10**n;return Math.round(t*e)/e}var Fn={roundToX:vn,r2:function(t){return vn(t,2)},r3:function(t){return vn(t,3)},isValidNumber:function(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}};var Vn={getPageTypeBySpaceText:function(t){return"space"===t?"EDITOR":"m"===t?"VISITOR":"VIEWER"},getSearchParams:function(t){return new URLSearchParams(window.location.search).get(t)??void 0}};function Hn(t){const n=[];for(const e of t.split(".")){const t=parseInt(e,10);isNaN(t)||e!==t.toString()?n.push(e):n.push(t)}return n}function Wn(t){return t.join(".")}function zn(t){return"string"==typeof t?Hn(t):t}var _n={makeRvPath:Hn,makeRvPathString:Wn,ensureRvPath:zn,ensureRvPathString:function(t){return"string"!=typeof t?Wn(t):t},getByRvPath:function(t,n){const e=zn(n);let o=t;for(const t of e){if(null==o)return;o=o[t]}return o},setByRvPath:function(t,n,e){const o=zn(n);let i=t;for(let t=0;t<o.length-1;t++)i=i[o[t]];i[o[o.length-1]]=e},checkRvPathOverlay:function(t,n){const e=zn(t),o=zn(n),i=e.length>o.length?o.length:e.length;for(let t=0;t<i;t++)if(e[t]!=o[t])return!1;return!0}};function kn(t){return new Promise(n=>{setTimeout(n,t)})}function Xn(t,n){if(0===n)return t;let e,o,i=0,r=null;function a(){i=Date.now(),e&&t.apply(o,e)}return function(...t){const s=Date.now()-i;e=t,o=this,0!==i?(r&&(clearTimeout(r),r=null),s<n?r=setTimeout(()=>{a(),r=null},n-s):a()):setTimeout(a,1)}}var Yn={convertTimeText:function(t){const n=Math.floor(t/3600),e=Math.floor(t%3600/60),o=Math.floor(t%60);return[n>0?String(n).padStart(2,"0"):null,String(e).padStart(2,"0"),String(o).padStart(2,"0")].filter(Boolean).join(":")},formatDateTo17Digits:function(t=new Date){return t.getFullYear().toString()+(t.getMonth()+1).toString().padStart(2,"0")+t.getDate().toString().padStart(2,"0")+t.getHours().toString().padStart(2,"0")+t.getMinutes().toString().padStart(2,"0")+t.getSeconds().toString().padStart(2,"0")+t.getMilliseconds().toString().padStart(3,"0")},formatDuration:function(t,n){const e=n-t,o=Math.floor(e/1e3),i=Math.floor(o/3600),r=Math.floor(o%3600/60),a=o%60;return`${i>0?`${i.toString().padStart(2,"0")}:`:""}${r.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}`}};async function jn(t){try{return await navigator.clipboard.writeText(t),!0}catch{return!1}}var $n={getParam:function(t){const n=new RegExp(`(^|&)${t}=([^&]*)(&|$)`,"i"),e=window.location.search.substring(1).match(n);return null!=e?decodeURIComponent(e[2]):""},getHashParam:function(t){const n=new RegExp(`(^|&)${t}=([^&]*)(&|$)`,"i"),e=window.location.hash.substring(1).match(n);return null!=e?decodeURIComponent(e[2]):""},check:function(t){return new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?:\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i").test(t)},copyCurrentUrlToClipboard:async function(){return jn(window.location.href)},copyText:async function(t){try{return await navigator.clipboard.writeText(t),!0}catch{return!1}},trySetClipboard:jn,extractFilenameFromUrl:function(t,n=!0){try{const e=new URL(t),o=e.pathname.split("/").pop()??"";return!n&&o.includes(".")?o.substring(0,o.lastIndexOf(".")):o}catch{return""}}};import{Quaternion as Kn,Vector3 as Jn}from"@babylonjs/core";function qn(t){return{x:180*t.x/Math.PI,y:180*t.y/Math.PI,z:180*t.z/Math.PI}}function Qn(t){return new Kn(t.x,t.y,t.z,t.w)}function Zn(t){return"w"in t}var te={xyToArray:function(t,n=-1,e=[0,0]){return t?-1===n?[t.x,t.y]:[Fn.roundToX(t.x,n),Fn.roundToX(t.y,n)]:e},xyzToArray:function(t,n=-1,e=[0,0,0]){return t?-1===n?[t.x,t.y,t.z]:[Fn.roundToX(t.x,n),Fn.roundToX(t.y,n),Fn.roundToX(t.z,n)]:e},xyzwToArray:function(t,n=-1,e=[0,0,0,0]){return t?-1===n?[t.x,t.y,t.z,t.w]:[Fn.roundToX(t.x,n),Fn.roundToX(t.y,n),Fn.roundToX(t.z,n),Fn.roundToX(t.w,n)]:e},scaleV3:function(t,n){return{x:n.x*t,y:n.y*t,z:n.z*t}},radiansToDegrees:qn,degreeToRadians:function(t){return{x:t.x*Math.PI/180,y:t.y*Math.PI/180,z:t.z*Math.PI/180}},radiansToQuaternion:function(t){return Kn.RotationYawPitchRoll(t.y,t.x,t.z)},degreesToQuaternion:function(t){return Kn.RotationYawPitchRoll(t.y*Math.PI/180,t.x*Math.PI/180,t.z*Math.PI/180)},toVector3:function(t){return new Jn(t.x,t.y,t.z)},fromVector3:function(t){return{x:t.x,y:t.y,z:t.z}},withRound:function(t,n=0){return{x:Fn.roundToX(t.x,n),y:Fn.roundToX(t.y,n),z:Fn.roundToX(t.z,n)}},isFiniteVector:function(t){return isFinite(t.x)&&isFinite(t.y)&&isFinite(t.z)},noZero:function(t){return 0!==t.x&&0!==t.y&&0!==t.z},scaleV4:function(t,n){return{x:n.x*t,y:n.y*t,z:n.z*t,w:n.w*t}},toQuaternionVector:Qn,toEulerRadians:function(t){return Qn(t).toEulerAngles()},toEulerDegrees:function(t){return qn(Qn(t).toEulerAngles())},toArray:function(t){return Zn(t)?[t.x,t.y,t.z,t.w]:[t.x,t.y,t.z]},fromQuaternion:function(t){return{x:t.x,y:t.y,z:t.z,w:t.w}},toArrayWithRound4:function(t,n=0){return Zn(t)?[Fn.roundToX(t.x,n),Fn.roundToX(t.y,n),Fn.roundToX(t.z,n),Fn.roundToX(t.w,n)]:[Fn.roundToX(t.x,n),Fn.roundToX(t.y,n),Fn.roundToX(t.z,n)]}};export{O as AcceptMime,E as ContextMenu,gn as CryptoUtils,yn as DataUtils,A as Dialog,R as DialogContentAlign,e as DomNotFoundError,On as EnableLevel,Mn as FileUtils,c as FirstLoadModelServiceEventType,u as FirstLoadModelServiceStatus,S as FirstLoadServiceEventType,h as FirstLoadServiceStatus,cn as FocusMode,fn as HistoryServiceEventType,pn as IconPluginPosition,r as LabelInfo,i as LabelTheme,Jt as LocalDataServiceEventType,qt as LocalDataStatus,Qt as LocalDataType,nn as Locale,Bn as MathUtils,en as MeetingStatus,T as MenuLine,l as MenuLineType,rn as Message,bn as NativeEventUtils,Gn as NetworkUtils,n as NotFoundError,Fn as NumberUtils,Zt as OssUploadInstanceStatus,tn as OssUploadServiceEventType,sn as PageMode,un as PageType,Vn as PageUtils,an as PluginEventType,Pn as PluginType,a as RsModelServiceEventType,s as RsModelStatus,Ln as RvAttachType,hn as RvBasicType,Rn as RvFileServiceEventType,An as RvFileType,Nn as RvMaterialType,Sn as RvModelOrigin,In as RvPresetType,Cn as RvResourceServiceEventType,dn as RvResourceType,_n as RvUtils,En as ScreenSize,on as ShareMode,o as StaticClassInstantiationError,mn as TChangeType,ln as ThemeBackground,f as ThemeColor,Tn as ThemeShape,Yn as TimeUtils,$n as UrlUtils,te as VectorUtils,Dn as VersionPoint,kn as sleep,Xn as throttle};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-flow-interface",
3
- "version": "0.19.4",
3
+ "version": "0.19.6",
4
4
  "description": "Interface package for NEXT FlOW. You can use this package to build your own plugin that can control anything.",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",