next-flow-interface 0.19.9 → 0.19.11

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.js CHANGED
@@ -1 +1,805 @@
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};
1
+ import { BaseTexture as Zt, Material as pt, AbstractMesh as vt, Quaternion as y, Vector3 as tr } from "@babylonjs/core";
2
+ import { fileTypeFromBlob as rr, fileTypeFromStream as Y, fileTypeFromBuffer as nr } from "file-type";
3
+ class er extends Error {
4
+ constructor(n) {
5
+ super(n), this.name = "NotFoundError";
6
+ }
7
+ }
8
+ class xe extends er {
9
+ constructor(n) {
10
+ super(n), this.name = "DomNotFoundError";
11
+ }
12
+ }
13
+ class ge extends Error {
14
+ constructor(n) {
15
+ super(`${n} is a static class and cannot be instantiated.`), this.name = "StaticClassInstantiationError";
16
+ }
17
+ }
18
+ var j = /* @__PURE__ */ ((t) => (t.Default = "Default", t))(j || {});
19
+ class Be {
20
+ constructor(n, r = null, e = "", o = j.Default, s = 0, i = 0) {
21
+ this.nid = n, this.node = r, this.text = e, this.theme = o, this.x = s, this.y = i;
22
+ }
23
+ parentElement = null;
24
+ pointElement = null;
25
+ lineElement = null;
26
+ blockElement = null;
27
+ textElement = null;
28
+ validate = !1;
29
+ always = !1;
30
+ show = !1;
31
+ lastClickTime = 0;
32
+ lastSp = null;
33
+ }
34
+ var or = /* @__PURE__ */ ((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))(or || {}), ur = /* @__PURE__ */ ((t) => (t.WAITING = "WAITING", t.LOADING = "LOADING", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(ur || {}), sr = /* @__PURE__ */ ((t) => (t.WAITING = "WAITING", t.LOADING = "LOADING", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(sr || {}), ir = /* @__PURE__ */ ((t) => (t.START = "START", t.PROGRESS = "PROGRESS", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(ir || {});
35
+ class K {
36
+ constructor(n, r, e = [], o = !1, s = 0, i = 0, a = !1, l, E = null, h = /* @__PURE__ */ new Date()) {
37
+ this.options = n, this.id = r, this.lines = e, this.showIcon = o, this.x = s, this.y = i, this.closeOnOutsideClick = a, this.theme = l, this.controller = E, this.createTime = h;
38
+ }
39
+ static fromOptions(n, r, e) {
40
+ let { showIcon: o } = r;
41
+ return o === void 0 && r.lines?.forEach((s) => {
42
+ s.icon && (o = !0);
43
+ }), new K(
44
+ r,
45
+ n,
46
+ e,
47
+ o,
48
+ r.x,
49
+ r.y,
50
+ r.closeOnOutsideClick,
51
+ r.theme
52
+ );
53
+ }
54
+ }
55
+ var V = /* @__PURE__ */ ((t) => (t.BUTTON = "BUTTON", t.DIVIDER = "DIVIDER", t.CHECKBOX = "CHECKBOX", t.SUB = "SUB", t.VIEW = "VIEW", t))(V || {});
56
+ class $ {
57
+ constructor(n, r, e = V.BUTTON, o = "", s = "", i = void 0, a = void 0, l = "", E = !1, h = "", N = () => {
58
+ }, T = () => {
59
+ }, L = () => {
60
+ }, B = e === V.BUTTON, b = !1, w = () => {
61
+ }, m = void 0, G = /* @__PURE__ */ new Date()) {
62
+ this.options = n, this.id = r, this.type = e, this.text = o, this.tip = s, this.icon = i, this.view = a, this.color = l, this.disabled = E, this.shortcut = h, this.onClick = N, this.onMouseOver = T, this.onMouseOut = L, this.closeAllOnClick = B, this.checkboxDefaultValue = b, this.onCheckboxChange = w, this.sub = m, this.createTime = G;
63
+ }
64
+ static fromOptions(n, r) {
65
+ return new $(
66
+ r,
67
+ n,
68
+ r.type,
69
+ r.text,
70
+ r.tip,
71
+ r.icon,
72
+ r.view,
73
+ r.color,
74
+ r.disabled,
75
+ r.shortcut,
76
+ r.onClick,
77
+ r.onMouseOver,
78
+ r.onMouseOut,
79
+ r.closeAllOnClick,
80
+ r.checkboxDefaultValue,
81
+ r.onCheckboxChange,
82
+ r.sub
83
+ );
84
+ }
85
+ }
86
+ var J = /* @__PURE__ */ ((t) => (t.GREEN = "GREEN", t.PURPLE = "PURPLE", t.BLUE = "BLUE", t.PINK = "PINK", t))(J || {}), cr = /* @__PURE__ */ ((t) => (t.LEFT = "LEFT", t.CENTER = "CENTER", t.RIGHT = "RIGHT", t))(cr || {});
87
+ class q {
88
+ constructor(n, r, e = "", o = void 0, s = "", i = "LEFT", a = void 0, l = void 0, E = void 0, h = J.BLUE, N = !1, T = "", L = {}, B = "", b = "", w = !1, m = "", G = "", Pt = w, xt = !1, gt = () => {
89
+ }, Bt = () => !0, bt = !0, Gt = () => {
90
+ }, Ht = () => {
91
+ }, Vt = () => {
92
+ }, Mt = () => {
93
+ }, yt = () => {
94
+ }, Ft = () => {
95
+ }, Wt = () => {
96
+ }, _t = () => {
97
+ }, kt = () => () => {
98
+ }, zt = !0, Xt = !0, Yt = !1, jt = !0, Kt = !1, $t = m, Jt = /* @__PURE__ */ new Date(), qt = () => {
99
+ }, Qt = /* @__PURE__ */ new Map()) {
100
+ this.options = n, this.id = r, this.title = e, this.titleIcon = o, this.content = s, this.contentAlign = i, this.contentView = a, this.icon = l, this.view = E, this.theme = h, this.leftMode = N, this.className = T, this.style = L, this.confirmText = B, this.cancelText = b, this.enableInput = w, this.defaultValue = m, this.inputPlaceholder = G, this.autoFocus = Pt, this.allowEmpty = xt, this.onChange = gt, this.onCheck = Bt, this.enableCloseButton = bt, this.onConfirm = Gt, this.onCancel = Ht, this.onClose = Vt, this.onConfirmButtonClick = Mt, this.onCancelButtonClick = yt, this.onOutsideClick = Ft, this.onCloseButtonClick = Wt, this.onRender = _t, this.onEffect = kt, this.closeOnConfirm = zt, this.closeOnCancel = Xt, this.closeOnOutsideClick = Yt, this.closeOnCloseButtonClick = jt, this.alignButton = Kt, this.inputValue = $t, this.createTime = Jt, this.focusInput = qt, this.elements = Qt;
101
+ }
102
+ static fromOptions(n, r) {
103
+ return new q(
104
+ r,
105
+ n,
106
+ r.title,
107
+ r.titleIcon,
108
+ r.content,
109
+ r.contentAlign,
110
+ r.contentView,
111
+ r.icon,
112
+ r.view,
113
+ r.theme,
114
+ r.leftMode,
115
+ r.className,
116
+ r.style,
117
+ r.confirmText,
118
+ r.cancelText,
119
+ r.enableInput,
120
+ r.defaultValue,
121
+ r.inputPlaceholder,
122
+ r.autoFocus,
123
+ r.allowEmpty,
124
+ r.onChange,
125
+ r.onCheck,
126
+ r.enableCloseButton,
127
+ r.onConfirm,
128
+ r.onCancel,
129
+ r.onClose,
130
+ r.onConfirmButtonClick,
131
+ r.onCancelButtonClick,
132
+ r.onOutsideClick,
133
+ r.onCloseButtonClick,
134
+ r.onRender,
135
+ r.onEffect,
136
+ r.closeOnConfirm,
137
+ r.closeOnCancel,
138
+ r.closeOnOutsideClick,
139
+ r.closeOnCloseButtonClick,
140
+ r.alignButton
141
+ );
142
+ }
143
+ setHide = () => {
144
+ };
145
+ }
146
+ var fr = /* @__PURE__ */ ((t) => (t.WAITING = "WAITING", t.LOADING = "LOADING", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(fr || {}), ar = /* @__PURE__ */ ((t) => (t.START = "START", t.PROGRESS = "PROGRESS", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(ar || {});
147
+ const f = "*/*", u = "unknown/unknown", A = "babylonjs/scene", F = "babylonjs/mesh", Q = "babylonjs/light", Z = "babylonjs/camera", O = "babylonjs/texture", C = "babylonjs/material", P = "babylonjs/uv", p = "babylonjs/animation", v = "model/gltf-binary", tt = "model/gltf+json", W = "model/stl", rt = "model/obj", nt = "audio/mpeg", et = "audio/wav", Er = "audio/aac", lr = "audio/ogg", hr = "audio/flac", Ar = "audio/opus", ot = "image/jpeg", ut = "image/png", Or = "image/gif", Dr = "image/bmp", Rr = "image/webp", Nr = "image/svg+xml", Tr = "image/tiff", Lr = "image/x-icon", Ir = "image/heif", Sr = "image/avif", st = "video/mp4", Cr = "video/webm", dr = "video/x-msvideo", Ur = "video/mpeg", wr = "video/quicktime", mr = "video/x-ms-wmv", Pr = "video/x-flv", xr = "video/ogg", gr = "video/3gpp", Br = "video/x-matroska", it = "application/json", ct = "nextflow/sync", ft = "text/plain", br = "text/markdown", D = [ot, ut], d = [A, v, tt, W, rt], R = [st], _ = [A, F, Q, Z, O, C, P, p], x = [nt, et], U = [ft], g = [it], Gr = [ct], at = [
148
+ ...D,
149
+ ...d,
150
+ ...R,
151
+ ..._,
152
+ ...x,
153
+ ...U,
154
+ ...g
155
+ ], Et = [
156
+ ...D,
157
+ ...d,
158
+ ...R,
159
+ ...x,
160
+ ...U,
161
+ ...g
162
+ ], lt = [
163
+ ...D,
164
+ ...d,
165
+ ...R,
166
+ ...U
167
+ ], ht = [...D, ...R, O], At = [O, C, P];
168
+ async function Ot(t) {
169
+ if (t && t instanceof Blob) {
170
+ if (t instanceof File && t.name.endsWith(".babylon"))
171
+ return A;
172
+ const n = await rr(t);
173
+ return !n && t instanceof File && t.name.endsWith(".stl") ? W : n?.mime ?? u;
174
+ }
175
+ return u;
176
+ }
177
+ async function k(t) {
178
+ return t ? t.endsWith(".babylon") ? A : (await import("mime")).default.getType(t) ?? u : u;
179
+ }
180
+ async function Dt(t) {
181
+ if (!t)
182
+ return u;
183
+ if (t.endsWith(".babylon"))
184
+ return A;
185
+ try {
186
+ const n = await fetch(t);
187
+ if (!n.body)
188
+ return u;
189
+ const r = await Y(n.body);
190
+ if (r?.mime) return r.mime;
191
+ const o = new URL(t).pathname;
192
+ if (o.includes("."))
193
+ return await k(o);
194
+ } catch (n) {
195
+ console.error("getMimeByUrl", n);
196
+ }
197
+ return u;
198
+ }
199
+ async function Rt(t) {
200
+ return t ? (await nr(t))?.mime ?? u : u;
201
+ }
202
+ async function Nt(t) {
203
+ return (await Y(t))?.mime ?? u;
204
+ }
205
+ async function Hr(t) {
206
+ if (t) {
207
+ if (typeof ReadableStream < "u" && t instanceof ReadableStream)
208
+ return Nt(t);
209
+ if (t instanceof Blob)
210
+ return Ot(t);
211
+ if (typeof t == "string")
212
+ return t.startsWith("http://") || t.startsWith("https://") ? Dt(t) : k(t);
213
+ if (t instanceof ArrayBuffer || t instanceof Uint8Array)
214
+ return Rt(t);
215
+ if (t instanceof Zt)
216
+ return O;
217
+ if (t instanceof pt)
218
+ return C;
219
+ if (t instanceof vt)
220
+ return F;
221
+ } else return u;
222
+ return u;
223
+ }
224
+ async function Vr(t = u) {
225
+ return t === A ? "babylon" : Tt(t) || Lt(t) ? t : t === f || t === u ? "" : (await import("mime")).default.getExtension(t) ?? "";
226
+ }
227
+ function Mr(t = u) {
228
+ return t == f ? !0 : t == u ? !1 : at.includes(t);
229
+ }
230
+ function yr(t = u) {
231
+ return t == f ? !0 : t == u ? !1 : Et.includes(t);
232
+ }
233
+ function Fr(t = u) {
234
+ return t == f ? !0 : t == u ? !1 : D.includes(t);
235
+ }
236
+ function Wr(t = u) {
237
+ return t == f ? !0 : t == u ? !1 : d.includes(t);
238
+ }
239
+ function _r(t = u) {
240
+ return t == f ? !0 : t == u ? !1 : R.includes(t);
241
+ }
242
+ function kr(t = u) {
243
+ return t == f ? !0 : t == u ? !1 : U.includes(t);
244
+ }
245
+ function zr(t = u) {
246
+ return t == f ? !0 : t == u ? !1 : g.includes(t);
247
+ }
248
+ function Tt(t = u) {
249
+ return t == f ? !0 : t == u ? !1 : _.includes(t);
250
+ }
251
+ function Xr(t = u) {
252
+ return t == f ? !0 : t == u ? !1 : x.includes(t);
253
+ }
254
+ function Yr(t = u) {
255
+ return t == f ? !0 : t == u ? !1 : lt.includes(t);
256
+ }
257
+ function jr(t = u) {
258
+ return t == f ? !0 : t == u ? !1 : ht.includes(t);
259
+ }
260
+ function Kr(t = u) {
261
+ return t == f ? !0 : t == u ? !1 : t == O;
262
+ }
263
+ function $r(t = u) {
264
+ return t == f ? !0 : t == u ? !1 : t == C;
265
+ }
266
+ function Jr(t = u) {
267
+ return t == f ? !0 : t == u ? !1 : t == P;
268
+ }
269
+ function Lt(t = u) {
270
+ return t == f ? !0 : t == u ? !1 : At.includes(t);
271
+ }
272
+ const be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, AAC: Er, ANIMATION: p, ANY: f, ATTACH_LIST: At, AVI: dr, AVIF: Sr, BMP: Dr, CAMERA: Z, FLAC: hr, FLV: Pr, GIF: Or, GLB: v, GLTF: tt, GP3: gr, HEIF: Ir, ICO: Lr, JPG: ot, JSON: it, LIGHT: Q, MARKDOWN: br, MATERIAL: C, MESH: F, MKV: Br, MOV: wr, MP3: nt, MP4: st, MPEG: Ur, NF: ct, OBJ: rt, OGG: lr, OGV: xr, OPUS: Ar, PNG: ut, SCENE: A, STL: W, SUPPORT_ALL_LIST: at, SUPPORT_AUDIO_LIST: x, SUPPORT_BABYLON_LIST: _, SUPPORT_FILE_LIST: Et, SUPPORT_IMAGE_LIST: D, SUPPORT_JSON_LIST: g, SUPPORT_MODEL_LIST: d, SUPPORT_NEXTFLOW_LIST: Gr, SUPPORT_RENDER_LIST: lt, SUPPORT_TEXTURE_LIST: ht, SUPPORT_TEXT_LIST: U, SUPPORT_VIDEO_LIST: R, SVG: Nr, TEXTURE: O, TIFF: Tr, TXT: ft, UNKNOWN: u, UV: P, WAV: et, WMV: mr, WebM: Cr, WebP: Rr, getExtension: Vr, getMime: Hr, getMimeByBlob: Ot, getMimeByBuffer: Rt, getMimeByPath: k, getMimeByStream: Nt, getMimeByUrl: Dt, isAttach: Lt, isBabylon: Tt, isMaterial: $r, isSupport: Mr, isSupportAudio: Xr, isSupportFile: yr, isSupportImage: Fr, isSupportJson: zr, isSupportModel: Wr, isSupportRender: Yr, isSupportText: kr, isSupportTexture: jr, isSupportVideo: _r, isTexture: Kr, isUV: Jr }, Symbol.toStringTag, { value: "Module" }));
273
+ var qr = /* @__PURE__ */ ((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))(qr || {}), Qr = /* @__PURE__ */ ((t) => (t.WAITING = "WAITING", t.LOADING = "LOADING", t.PAUSED = "PAUSED", t.LOADED = "LOADED", t.FAILED = "FAILED", t.CANCELED = "CANCELED", t))(Qr || {}), Zr = /* @__PURE__ */ ((t) => (t.BLOB = "BLOB", t.OBJECT = "OBJECT", t))(Zr || {}), pr = /* @__PURE__ */ ((t) => (t.WAITING = "WAITING", t.UPLOADING = "UPLOADING", t.PAUSED = "PAUSED", t.COMPLETED = "COMPLETED", t.FAILED = "FAILED", t.CANCELED = "CANCELED", t))(pr || {}), vr = /* @__PURE__ */ ((t) => (t.START = "START", t.PROGRESS = "PROGRESS", t.PAUSE = "PAUSE", t.RESUME = "RESUME", t.UPLOADED = "UPLOADED", t.FAILED = "FAILED", t.CANCELED = "CANCELED", t))(vr || {}), tn = /* @__PURE__ */ ((t) => (t.ZH = "zh", t.EN = "en", t))(tn || {}), rn = /* @__PURE__ */ ((t) => (t.PENDING = "PENDING", t.PROGRESSING = "PROGRESSING", t.ENDED = "ENDED", t.CANCELED = "CANCELED", t.BANNED = "BANNED", t))(rn || {}), nn = /* @__PURE__ */ ((t) => (t.NONE = "NONE", t.SELF = "SELF", t.ALL = "ALL", t))(nn || {});
274
+ class Ge {
275
+ constructor(n, r, e, o) {
276
+ this.text = n, this.type = r, this.duration = e, this.id = o;
277
+ }
278
+ show = !0;
279
+ height = 20;
280
+ opacity = 0;
281
+ }
282
+ var en = /* @__PURE__ */ ((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))(en || {}), on = /* @__PURE__ */ ((t) => (t.DISPLAY = "DISPLAY", t.FULL = "FULL", t.HP_BOX = "HP_BOX", t.VR = "VR", t.MR = "MR", t))(on || {}), I = /* @__PURE__ */ ((t) => (t.EDITOR = "EDITOR", t.VIEWER = "VIEWER", t.VISITOR = "VISITOR", t))(I || {}), un = /* @__PURE__ */ ((t) => (t.DEFAULT = "DEFAULT", t.DESCRIPTION = "DESCRIPTION", t))(un || {}), sn = /* @__PURE__ */ ((t) => (t.XS = "XS", t.SM = "SM", t.MD = "MD", t.LG = "LG", t.XL = "XL", t))(sn || {}), cn = /* @__PURE__ */ ((t) => (t.DEFAULT = "DEFAULT", t.BACKGROUND = "BACKGROUND", t.LIGHT = "LIGHT", t.DARK = "DARK", t))(cn || {}), fn = /* @__PURE__ */ ((t) => (t.GENERAL = "GENERAL", t.RHINE = "RHINE", t))(fn || {}), an = /* @__PURE__ */ ((t) => (t.UNDO = "UNDO", t.REDO = "REDO", t))(an || {}), En = /* @__PURE__ */ ((t) => (t.ADD = "ADD", t.REMOVE = "REMOVE", t))(En || {}), ln = /* @__PURE__ */ ((t) => (t.OSS = "OSS", t.URL = "URL", t))(ln || {}), hn = /* @__PURE__ */ ((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 || {}), An = /* @__PURE__ */ ((t) => (t.BASIC = "BASIC", t.PROVIDE = "PROVIDE", t.UPLOAD = "UPLOAD", t))(An || {}), On = /* @__PURE__ */ ((t) => (t.NONE = "NONE", t.INSTALL = "INSTALL", t.ENABLE = "ENABLE", t.OPEN = "OPEN", t))(On || {}), Dn = /* @__PURE__ */ ((t) => (t.LATEST_STABLE = "LATEST_STABLE", t.LATEST_NIGHTLY = "LATEST_NIGHTLY", t.LATEST_CANARY = "LATEST_CANARY", t))(Dn || {}), Rn = /* @__PURE__ */ ((t) => (t.TEXTURE = "TEXTURE", t.MATERIAL = "MATERIAL", t.UV = "UV", t))(Rn || {}), Nn = /* @__PURE__ */ ((t) => (t.FILE = "FILE", t.ATTACH = "ATTACH", t))(Nn || {}), Tn = /* @__PURE__ */ ((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))(Tn || {}), Ln = /* @__PURE__ */ ((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))(Ln || {}), In = /* @__PURE__ */ ((t) => (t.ADD = "ADD", t.REMOVE = "REMOVE", t))(In || {}), Sn = /* @__PURE__ */ ((t) => (t.SYNC = "SYNC", t.STEP = "STEP", t.SELECT = "SELECT", t.ADD = "ADD", t.UPDATE = "UPDATE", t.DELETE = "DELETE", t))(Sn || {}), Cn = /* @__PURE__ */ ((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))(Cn || {}), dn = /* @__PURE__ */ ((t) => (t.BUTTON = "BUTTON", t.SWITCH = "SWITCH", t.DRAWER = "DRAWER", t.DIALOG = "DIALOG", t.CONTENT = "CONTENT", t.WINDOW = "WINDOW", t.SERVICE = "SERVICE", t))(dn || {});
283
+ async function Un(t) {
284
+ const n = await crypto.subtle.digest("SHA-256", t);
285
+ return Array.from(new Uint8Array(n)).map((e) => e.toString(16).padStart(2, "0")).join("");
286
+ }
287
+ const H = {
288
+ computeSHA256: Un
289
+ };
290
+ function wn(t, n) {
291
+ const r = [];
292
+ return r.push({ path: t, value: n }), r;
293
+ }
294
+ const He = {
295
+ recursPathValue: wn
296
+ };
297
+ function It(t) {
298
+ const n = Math.floor(t).toString().length, r = n <= 1 ? 2 : 1;
299
+ return t.toFixed(r);
300
+ }
301
+ function mn(t) {
302
+ const n = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
303
+ let r = 0;
304
+ for (; t >= 1024 && r < n.length - 1; )
305
+ t /= 1024, r++;
306
+ let e = It(t);
307
+ return e.endsWith(".0") && (e = e.slice(0, -2)), e.endsWith(".00") && (e = e.slice(0, -3)), `${e} ${n[r]}`;
308
+ }
309
+ function Pn(t) {
310
+ const n = t.lastIndexOf(".");
311
+ return n === -1 ? [t, ""] : [t.substring(0, n), t.substring(n + 1)];
312
+ }
313
+ function xn(t) {
314
+ return t ? t instanceof File ? [t] : t instanceof FileList ? Array.from(t) : t : [];
315
+ }
316
+ async function St(t) {
317
+ const n = [0.25, 0.5, 0.75], r = 64 * 1024, e = 1024 * 1024;
318
+ if (t.size <= e) {
319
+ const E = await t.arrayBuffer();
320
+ return H.computeSHA256(E);
321
+ }
322
+ const o = n.map((E) => Math.floor(t.size * E)), s = await Promise.all(
323
+ o.map(async (E) => {
324
+ const h = E, N = Math.min(h + r, t.size), T = t.slice(h, N), L = await T.arrayBuffer();
325
+ return H.computeSHA256(L);
326
+ })
327
+ ), i = new TextEncoder(), a = s.join(""), l = i.encode(a);
328
+ return H.computeSHA256(l);
329
+ }
330
+ async function gn(t, n, r, e) {
331
+ if (n === t.name && r === t.size)
332
+ if (e) {
333
+ if (e === await St(t))
334
+ return !0;
335
+ } else
336
+ return !0;
337
+ return !1;
338
+ }
339
+ async function Bn(t) {
340
+ const n = await fetch(t, { method: "HEAD" });
341
+ if (!n.ok)
342
+ throw new Error(`HEAD request failed with status: ${String(n.status)}`);
343
+ const r = n.headers.get("Content-Length");
344
+ let e;
345
+ if (r) {
346
+ if (e = parseInt(r, 10), isNaN(e))
347
+ throw new Error("Invalid file size from header");
348
+ } else {
349
+ const i = await fetch(t);
350
+ if (!i.ok)
351
+ throw new Error(`GET request failed with status: ${String(i.status)}`);
352
+ e = (await i.blob()).size;
353
+ }
354
+ return { name: new URL(t).pathname.split("/").pop() ?? "unknown", size: e };
355
+ }
356
+ const Ve = {
357
+ to3n: It,
358
+ convertBytesToHigherUnit: mn,
359
+ splitName: Pn,
360
+ ensureFileArray: xn,
361
+ chunkHash: St,
362
+ isSameFile: gn,
363
+ getFileInfo: Bn
364
+ };
365
+ function bn(t) {
366
+ return t * (180 / Math.PI);
367
+ }
368
+ function Gn(t) {
369
+ return t * (Math.PI / 180);
370
+ }
371
+ function Hn(t, n, r = 1e-6) {
372
+ return Math.abs(t - n) < r;
373
+ }
374
+ function Vn(t, n, r, e) {
375
+ return Math.sqrt((r - t) ** 2 + (e - n) ** 2);
376
+ }
377
+ function Mn(t, n, r, e, o, s) {
378
+ return Math.sqrt((e - t) ** 2 + (o - n) ** 2 + (s - r) ** 2);
379
+ }
380
+ function yn(t, n) {
381
+ let r = 1 / 0, e = -1;
382
+ for (let o = 0; o < n.length; o++) {
383
+ const s = Math.abs(t - n[o]);
384
+ s < r && (r = s, e = o);
385
+ }
386
+ return e;
387
+ }
388
+ const Fn = {
389
+ toDegrees: bn,
390
+ toRadians: Gn,
391
+ approximatelyEqual: Hn,
392
+ getDistance: Vn,
393
+ getDistance3d: Mn,
394
+ getNearestNumberIndex: yn
395
+ };
396
+ function M(t) {
397
+ if (t.type.includes("touch")) {
398
+ const r = t;
399
+ if (r.touches.length) {
400
+ const i = r.touches[0], a = i.clientX, l = i.clientY;
401
+ return [a, l];
402
+ }
403
+ const e = r.changedTouches[0], o = e.clientX, s = e.clientY;
404
+ return [o, s];
405
+ }
406
+ const n = t;
407
+ return [n.clientX, n.clientY];
408
+ }
409
+ function Wn(t, n) {
410
+ const [r, e] = M(t), [o, s] = M(n);
411
+ return Fn.getDistance(r, e, o, s);
412
+ }
413
+ function _n(t) {
414
+ t.preventDefault();
415
+ }
416
+ function kn(t) {
417
+ t.stopPropagation();
418
+ }
419
+ function zn(t) {
420
+ t.preventDefault(), t.stopPropagation();
421
+ }
422
+ const Me = {
423
+ getEventPosition: M,
424
+ getDistanceBetweenEvents: Wn,
425
+ preventDefaultListener: _n,
426
+ stopPropagationListener: kn,
427
+ preventDefaultStopPropagationListener: zn
428
+ };
429
+ async function Xn(t, n = 3) {
430
+ let r;
431
+ for (let e = 0; e < n; e++)
432
+ try {
433
+ const o = await fetch(t);
434
+ if (!o.ok)
435
+ throw new Error(`HTTP Error: Status ${o.status.toString()}`);
436
+ return await o.json();
437
+ } catch (o) {
438
+ r = o, console.log(`Attempt ${(e + 1).toString()} Failed: Retrying...
439
+ ${t}`);
440
+ }
441
+ throw r;
442
+ }
443
+ async function Yn(t, n = 3) {
444
+ let r;
445
+ for (let e = 0; e < n; e++)
446
+ try {
447
+ const o = await fetch(t);
448
+ if (!o.ok)
449
+ throw new Error(`HTTP Error: Status ${o.status.toString()}`);
450
+ return await o.blob();
451
+ } catch (o) {
452
+ r = o, console.log(`Attempt ${(e + 1).toString()} Failed: Retrying...
453
+ ${t}`);
454
+ }
455
+ throw r;
456
+ }
457
+ const ye = {
458
+ fetchJsonWithRetry: Xn,
459
+ fetchBlobWithRetry: Yn
460
+ };
461
+ function z(t, n) {
462
+ const r = 10 ** n;
463
+ return Math.round(t * r) / r;
464
+ }
465
+ function jn(t) {
466
+ return z(t, 2);
467
+ }
468
+ function Kn(t) {
469
+ return z(t, 3);
470
+ }
471
+ function $n(t) {
472
+ return typeof t == "number" && !isNaN(t) && isFinite(t);
473
+ }
474
+ const c = {
475
+ roundToX: z,
476
+ r2: jn,
477
+ r3: Kn,
478
+ isValidNumber: $n
479
+ };
480
+ function Jn(t) {
481
+ return t === "space" ? I.EDITOR : t === "m" ? I.VISITOR : I.VIEWER;
482
+ }
483
+ function qn(t) {
484
+ return new URLSearchParams(window.location.search).get(t) ?? void 0;
485
+ }
486
+ const Fe = {
487
+ getPageTypeBySpaceText: Jn,
488
+ getSearchParams: qn
489
+ };
490
+ function Ct(t) {
491
+ const n = [];
492
+ for (const r of t.split(".")) {
493
+ const e = parseInt(r, 10);
494
+ !isNaN(e) && r === e.toString() ? n.push(e) : n.push(r);
495
+ }
496
+ return n;
497
+ }
498
+ function dt(t) {
499
+ return t.join(".");
500
+ }
501
+ function S(t) {
502
+ return typeof t == "string" ? Ct(t) : t;
503
+ }
504
+ function Qn(t) {
505
+ return typeof t != "string" ? dt(t) : t;
506
+ }
507
+ function Zn(t, n) {
508
+ const r = S(n);
509
+ let e = t;
510
+ for (const o of r) {
511
+ if (e == null)
512
+ return;
513
+ e = e[o];
514
+ }
515
+ return e;
516
+ }
517
+ function pn(t, n, r) {
518
+ const e = S(n);
519
+ let o = t;
520
+ for (let s = 0; s < e.length - 1; s++)
521
+ o = o[e[s]];
522
+ o[e[e.length - 1]] = r;
523
+ }
524
+ function vn(t, n) {
525
+ const r = S(t), e = S(n), o = r.length > e.length ? e.length : r.length;
526
+ for (let s = 0; s < o; s++)
527
+ if (r[s] != e[s])
528
+ return !1;
529
+ return !0;
530
+ }
531
+ const We = {
532
+ makeRvPath: Ct,
533
+ makeRvPathString: dt,
534
+ ensureRvPath: S,
535
+ ensureRvPathString: Qn,
536
+ getByRvPath: Zn,
537
+ setByRvPath: pn,
538
+ checkRvPathOverlay: vn
539
+ };
540
+ function _e(t) {
541
+ return new Promise((n) => {
542
+ setTimeout(n, t);
543
+ });
544
+ }
545
+ function ke(t, n) {
546
+ if (n === 0)
547
+ return t;
548
+ let r, e = 0, o, s = null;
549
+ function i() {
550
+ e = Date.now(), r && t.apply(o, r);
551
+ }
552
+ return function(...l) {
553
+ const E = Date.now(), h = E - e;
554
+ if (r = l, o = this, e === 0) {
555
+ setTimeout(i, 1);
556
+ return;
557
+ }
558
+ s && (clearTimeout(s), s = null), h < n ? s = setTimeout(() => {
559
+ i(), s = null;
560
+ }, n - h) : i();
561
+ };
562
+ }
563
+ function te(t) {
564
+ const n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), e = Math.floor(t % 60);
565
+ return [
566
+ n > 0 ? String(n).padStart(2, "0") : null,
567
+ String(r).padStart(2, "0"),
568
+ String(e).padStart(2, "0")
569
+ ].filter(Boolean).join(":");
570
+ }
571
+ function re(t = /* @__PURE__ */ new Date()) {
572
+ const n = t.getFullYear().toString(), r = (t.getMonth() + 1).toString().padStart(2, "0"), e = t.getDate().toString().padStart(2, "0"), o = t.getHours().toString().padStart(2, "0"), s = t.getMinutes().toString().padStart(2, "0"), i = t.getSeconds().toString().padStart(2, "0"), a = t.getMilliseconds().toString().padStart(3, "0");
573
+ return n + r + e + o + s + i + a;
574
+ }
575
+ function ne(t, n) {
576
+ const r = n - t, e = Math.floor(r / 1e3), o = Math.floor(e / 3600), s = Math.floor(e % 3600 / 60), i = e % 60;
577
+ return `${o > 0 ? `${o.toString().padStart(2, "0")}:` : ""}${s.toString().padStart(2, "0")}:${i.toString().padStart(2, "0")}`;
578
+ }
579
+ const ze = {
580
+ convertTimeText: te,
581
+ formatDateTo17Digits: re,
582
+ formatDuration: ne
583
+ };
584
+ function ee(t) {
585
+ const n = new RegExp(`(^|&)${t}=([^&]*)(&|$)`, "i"), r = window.location.search.substring(1).match(n);
586
+ return r != null ? decodeURIComponent(r[2]) : "";
587
+ }
588
+ function oe(t) {
589
+ const n = new RegExp(`(^|&)${t}=([^&]*)(&|$)`, "i"), r = window.location.hash.substring(1).match(n);
590
+ return r != null ? decodeURIComponent(r[2]) : "";
591
+ }
592
+ function ue(t) {
593
+ return new RegExp(
594
+ "^(?!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]*)?$",
595
+ "i"
596
+ ).test(t);
597
+ }
598
+ async function se() {
599
+ const t = window.location.href;
600
+ return Ut(t);
601
+ }
602
+ async function ie(t) {
603
+ try {
604
+ return await navigator.clipboard.writeText(t), !0;
605
+ } catch {
606
+ return !1;
607
+ }
608
+ }
609
+ async function Ut(t) {
610
+ try {
611
+ return await navigator.clipboard.writeText(t), !0;
612
+ } catch {
613
+ return !1;
614
+ }
615
+ }
616
+ function ce(t, n = !0) {
617
+ try {
618
+ const o = new URL(t).pathname.split("/").pop() ?? "";
619
+ return !n && o.includes(".") ? o.substring(0, o.lastIndexOf(".")) : o;
620
+ } catch {
621
+ return "";
622
+ }
623
+ }
624
+ const Xe = {
625
+ getParam: ee,
626
+ getHashParam: oe,
627
+ check: ue,
628
+ copyCurrentUrlToClipboard: se,
629
+ copyText: ie,
630
+ trySetClipboard: Ut,
631
+ extractFilenameFromUrl: ce
632
+ };
633
+ function fe(t, n = -1, r = [0, 0]) {
634
+ return t ? n === -1 ? [t.x, t.y] : [c.roundToX(t.x, n), c.roundToX(t.y, n)] : r;
635
+ }
636
+ function ae(t, n = -1, r = [0, 0, 0]) {
637
+ return t ? n === -1 ? [t.x, t.y, t.z] : [
638
+ c.roundToX(t.x, n),
639
+ c.roundToX(t.y, n),
640
+ c.roundToX(t.z, n)
641
+ ] : r;
642
+ }
643
+ function Ee(t, n = -1, r = [0, 0, 0, 0]) {
644
+ return t ? n === -1 ? [t.x, t.y, t.z, t.w] : [
645
+ c.roundToX(t.x, n),
646
+ c.roundToX(t.y, n),
647
+ c.roundToX(t.z, n),
648
+ c.roundToX(t.w, n)
649
+ ] : r;
650
+ }
651
+ function le(t, n) {
652
+ return { x: n.x * t, y: n.y * t, z: n.z * t };
653
+ }
654
+ function wt(t) {
655
+ return { x: t.x * 180 / Math.PI, y: t.y * 180 / Math.PI, z: t.z * 180 / Math.PI };
656
+ }
657
+ function he(t) {
658
+ return { x: t.x * Math.PI / 180, y: t.y * Math.PI / 180, z: t.z * Math.PI / 180 };
659
+ }
660
+ function Ae(t) {
661
+ return y.RotationYawPitchRoll(t.y, t.x, t.z);
662
+ }
663
+ function Oe(t) {
664
+ return y.RotationYawPitchRoll(
665
+ t.y * Math.PI / 180,
666
+ t.x * Math.PI / 180,
667
+ t.z * Math.PI / 180
668
+ );
669
+ }
670
+ function De(t) {
671
+ return new tr(t.x, t.y, t.z);
672
+ }
673
+ function Re(t) {
674
+ return { x: t.x, y: t.y, z: t.z };
675
+ }
676
+ function Ne(t, n = 0) {
677
+ return {
678
+ x: c.roundToX(t.x, n),
679
+ y: c.roundToX(t.y, n),
680
+ z: c.roundToX(t.z, n)
681
+ };
682
+ }
683
+ function Te(t) {
684
+ return isFinite(t.x) && isFinite(t.y) && isFinite(t.z);
685
+ }
686
+ function Le(t) {
687
+ return t.x !== 0 && t.y !== 0 && t.z !== 0;
688
+ }
689
+ function Ie(t, n) {
690
+ return { x: n.x * t, y: n.y * t, z: n.z * t, w: n.w * t };
691
+ }
692
+ function X(t) {
693
+ return new y(t.x, t.y, t.z, t.w);
694
+ }
695
+ function Se(t) {
696
+ return X(t).toEulerAngles();
697
+ }
698
+ function Ce(t) {
699
+ const n = X(t);
700
+ return wt(n.toEulerAngles());
701
+ }
702
+ function mt(t) {
703
+ return "w" in t;
704
+ }
705
+ function de(t) {
706
+ return mt(t) ? [t.x, t.y, t.z, t.w] : [t.x, t.y, t.z];
707
+ }
708
+ function Ue(t) {
709
+ return { x: t.x, y: t.y, z: t.z, w: t.w };
710
+ }
711
+ function we(t, n = 0) {
712
+ return mt(t) ? [
713
+ c.roundToX(t.x, n),
714
+ c.roundToX(t.y, n),
715
+ c.roundToX(t.z, n),
716
+ c.roundToX(t.w, n)
717
+ ] : [c.roundToX(t.x, n), c.roundToX(t.y, n), c.roundToX(t.z, n)];
718
+ }
719
+ const Ye = {
720
+ xyToArray: fe,
721
+ xyzToArray: ae,
722
+ xyzwToArray: Ee,
723
+ scaleV3: le,
724
+ radiansToDegrees: wt,
725
+ degreeToRadians: he,
726
+ radiansToQuaternion: Ae,
727
+ degreesToQuaternion: Oe,
728
+ toVector3: De,
729
+ fromVector3: Re,
730
+ withRound: Ne,
731
+ isFiniteVector: Te,
732
+ noZero: Le,
733
+ scaleV4: Ie,
734
+ toQuaternionVector: X,
735
+ toEulerRadians: Se,
736
+ toEulerDegrees: Ce,
737
+ toArray: de,
738
+ fromQuaternion: Ue,
739
+ toArrayWithRound4: we
740
+ };
741
+ export {
742
+ be as AcceptMime,
743
+ K as ContextMenu,
744
+ H as CryptoUtils,
745
+ He as DataUtils,
746
+ q as Dialog,
747
+ cr as DialogContentAlign,
748
+ xe as DomNotFoundError,
749
+ On as EnableLevel,
750
+ Ve as FileUtils,
751
+ ir as FirstLoadModelServiceEventType,
752
+ sr as FirstLoadModelServiceStatus,
753
+ ar as FirstLoadServiceEventType,
754
+ fr as FirstLoadServiceStatus,
755
+ un as FocusMode,
756
+ an as HistoryServiceEventType,
757
+ Cn as IconPluginPosition,
758
+ Be as LabelInfo,
759
+ j as LabelTheme,
760
+ qr as LocalDataServiceEventType,
761
+ Qr as LocalDataStatus,
762
+ Zr as LocalDataType,
763
+ tn as Locale,
764
+ Fn as MathUtils,
765
+ rn as MeetingStatus,
766
+ $ as MenuLine,
767
+ V as MenuLineType,
768
+ Ge as Message,
769
+ Me as NativeEventUtils,
770
+ ye as NetworkUtils,
771
+ er as NotFoundError,
772
+ c as NumberUtils,
773
+ pr as OssUploadInstanceStatus,
774
+ vr as OssUploadServiceEventType,
775
+ on as PageMode,
776
+ I as PageType,
777
+ Fe as PageUtils,
778
+ en as PluginEventType,
779
+ dn as PluginType,
780
+ or as RsModelServiceEventType,
781
+ ur as RsModelStatus,
782
+ Rn as RvAttachType,
783
+ hn as RvBasicType,
784
+ En as RvFileServiceEventType,
785
+ ln as RvFileType,
786
+ Tn as RvMaterialType,
787
+ An as RvModelOrigin,
788
+ Ln as RvPresetType,
789
+ In as RvResourceServiceEventType,
790
+ Nn as RvResourceType,
791
+ We as RvUtils,
792
+ sn as ScreenSize,
793
+ nn as ShareMode,
794
+ ge as StaticClassInstantiationError,
795
+ Sn as TChangeType,
796
+ cn as ThemeBackground,
797
+ J as ThemeColor,
798
+ fn as ThemeShape,
799
+ ze as TimeUtils,
800
+ Xe as UrlUtils,
801
+ Ye as VectorUtils,
802
+ Dn as VersionPoint,
803
+ _e as sleep,
804
+ ke as throttle
805
+ };