@rainbow-robotics/preview-host 0.10.1 → 0.11.1-dev.0
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/assets/{AmrCapabilityControl.oytFydB2.js → AmrCapabilityControl.BDkhhuBK.js} +1 -1
- package/dist/assets/RbLocalizationProvider.JCsfV_OG.js +311 -0
- package/dist/assets/{__federation_expose_App.CoxVRbg2.js → __federation_expose_App.CGkevKfs.js} +290 -272
- package/dist/assets/__federation_fn_import.DdkEuT6t.js +2 -2
- package/dist/assets/{cssMode.CDd5a5k3.js → cssMode.BVEaeWSs.js} +1 -1
- package/dist/assets/{freemarker2.COhzEhmH.js → freemarker2.JOxf8btK.js} +1 -1
- package/dist/assets/{handlebars.fAJ1EtoF.js → handlebars.Dqcd9xVD.js} +1 -1
- package/dist/assets/{html.BFDEQN82.js → html.Dtsjnc1b.js} +1 -1
- package/dist/assets/{htmlMode.BhRG8xH6.js → htmlMode.BMQAKo2F.js} +1 -1
- package/dist/assets/index.DK57Qq2B.js +1 -0
- package/dist/assets/index.DW7kOYVV.js +26 -0
- package/dist/assets/{index.Do3USvek.js → index.zOoIw-kG.js} +1 -1
- package/dist/assets/{javascript.vTR4xHS9.js → javascript.mjbhg2Bq.js} +1 -1
- package/dist/assets/{jsonMode.CdSv2TR8.js → jsonMode.B1a7Tc-F.js} +1 -1
- package/dist/assets/{liquid.Bg8T4DqL.js → liquid.DV4Fy3YF.js} +1 -1
- package/dist/assets/{lspLanguageFeatures.DlGOK9QQ.js → lspLanguageFeatures.VY35Kh2X.js} +1 -1
- package/dist/assets/{mdx.DfxgCFLL.js → mdx.Ckq5nIl1.js} +1 -1
- package/dist/assets/{python.CtjD-9s8.js → python.HC7uKVu2.js} +1 -1
- package/dist/assets/{razor.ByAGqfse.js → razor.D5c2oI3A.js} +1 -1
- package/dist/assets/remoteEntry.js +1 -1
- package/dist/assets/{tsMode.BQkMAKE2.js → tsMode.BROKpIFT.js} +1 -1
- package/dist/assets/{typescript.dCIafmsR.js → typescript.BpPrOYBs.js} +1 -1
- package/dist/assets/{useFileDownload.BuzVN3F3.js → useParsedPointCloudData.BQ0lSOua.js} +202 -201
- package/dist/assets/{xml.3NMm6_T0.js → xml.C_QSMyeV.js} +1 -1
- package/dist/assets/{yaml.C6xFnrFW.js → yaml.Cbbga5do.js} +1 -1
- package/dist/imgs/nexus/commands_tree_icons/custom_weaving.png +0 -0
- package/dist/imgs/nexus/forms/weaving/weave_type_1.png +0 -0
- package/dist/imgs/nexus/forms/weaving/weave_type_2.png +0 -0
- package/dist/imgs/nexus/forms/weaving/weave_type_3.png +0 -0
- package/dist/imgs/nexus/forms/weaving/weave_type_4.png +0 -0
- package/dist/imgs/nexus/forms/weaving/weave_type_5.png +0 -0
- package/dist/imgs/nexus/forms/weaving/weave_type_6.png +0 -0
- package/dist/imgs/nexus/forms/weaving/weave_type_7.png +0 -0
- package/dist/imgs/nexus/forms/weaving/weave_type_8.png +0 -0
- package/dist/index.html +5 -5
- package/package.json +1 -1
- package/dist/assets/RbLocalizationProvider.CI7oesfV.js +0 -311
- package/dist/assets/index.Bfb-Nfl_.js +0 -1
- package/dist/assets/index.Di1B_zOl.js +0 -26
- package/dist/assets/parseLasPointCloud.worker-BZeU-mt8.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as g,co as F,U as z,a$ as V,x as _,bg as K,cw as Y,eh as E,g7 as Q,db as P,eg as M,cu as X,gF as u}from"./RbLocalizationProvider.CI7oesfV.js";import{importShared as k}from"./__federation_fn_import.DdkEuT6t.js";const Z=()=>!0,J=()=>Z()&&!L(),L=()=>typeof window<"u"&&window.__RB_ROBOT_HOST__||void 0||void 0,ee=()=>J(),Le=(e,t)=>e?.find(s=>s.point===t),ye=(e,t)=>{if(typeof e=="string")return e;const s=String(t);return e?.[s]},_e=(e,t)=>{if(typeof e=="string")return e;const s=String(t);return e?.[s]||e?.en},Pe=e=>e.toLocaleLowerCase()==="rainbowrobotics",Me=e=>e===void 0?"—":`${e.toFixed(1)}%`,Ue=e=>{if(e===void 0)return"—";const t=e/1024/1024;return t<1024?`${Math.round(t)} MB`:`${(t/1024).toFixed(1)} GB`};var y=(e=>(e[e.SUPERVISOR=0]="SUPERVISOR",e[e.ADMIN=1]="ADMIN",e[e.MANAGER=2]="MANAGER",e[e.OPERATOR=3]="OPERATOR",e[e.USER=4]="USER",e[e.GUEST=999999]="GUEST",e))(y||{});const be={SUPERVISOR:0,ADMIN:1,MANAGER:2,OPERATOR:3,USER:4,GUEST:999999};function x(e){try{const t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/");return JSON.parse(atob(t))}catch{return null}}function U(e){if(!e)return null;const t=x(e);return t?t.exp*1e3:null}function v(){const e=c();return e?x(e)?.sid??"":""}const o={isAutoLogin:"isAutoLogin",accessToken:"access_token",refreshToken:"refresh_token"};function A(){localStorage.removeItem(o.accessToken),localStorage.removeItem(o.refreshToken),sessionStorage.removeItem(o.accessToken),sessionStorage.removeItem(o.refreshToken)}function h(){return localStorage.getItem(o.isAutoLogin)==="true"}function we(e){localStorage.setItem(o.isAutoLogin,e?"true":"false")}function c(){return h()?localStorage.getItem(o.accessToken):sessionStorage.getItem(o.accessToken)}function p(){return h()?localStorage.getItem(o.refreshToken):sessionStorage.getItem(o.refreshToken)}function te(e,t,s){s?(localStorage.setItem(o.isAutoLogin,"true"),localStorage.setItem(o.accessToken,e),localStorage.setItem(o.refreshToken,t)):(localStorage.setItem(o.isAutoLogin,"false"),sessionStorage.setItem(o.accessToken,e),sessionStorage.setItem(o.refreshToken,t))}const{useQuery:se}=await k("@tanstack/react-query"),O="/auth/me",ne=[O],oe=()=>q.get(O,{}),re=({enabled:e})=>se({queryKey:ne,queryFn:oe,enabled:e}),{createContext:ae,useCallback:ie,useContext:ce,useEffect:N,useState:ue}=await k("react"),le={id:"GUEST",username:"게스트",role:y.SUPERVISOR,sid:""},C=ae({isLoggedIn:!1,setLoggedIn:()=>{}});let T=null;function $(e){T?.(e)}function xe({children:e}){const[t,s]=ue(!!c()),n=ie(r=>{s(r)},[]);return N(()=>(T=n,()=>{T=null}),[n]),g(C.Provider,{value:{isLoggedIn:t,setLoggedIn:n},children:e})}function de(){const{isLoggedIn:e,setLoggedIn:t}=ce(C),s=c(),n=p(),r=h(),{data:a}=re({enabled:e}),i=a?{id:a.user_id,username:a.username??a.user_id,role:a.role??y.GUEST,sid:v()}:le;return N(()=>{const f=!!s&&!!n;e!==f&&t(f)},[e,s,n,t]),{isLoggedIn:e,setLoggedIn:t,user:i,accessToken:s,refreshToken:n,isAutoLogin:r,isAtLeast:f=>i.role<=f,hasRole:f=>i.role===f}}const fe=({className:e,open:t,onOpenChange:s,onConfirm:n})=>{const{t:r}=F(),a=()=>{s(!1),n()};return g(K,{className:_(e,"w-100 max-w-full border-none p-0"),enableDimClose:!1,hideCloseButton:!0,open:t,onOpenChange:s,header:{title:r("login.modal.title.sessionExpired")},footer:g(z,{className:_("w-full gap-1","[&_button]:h-8 [&_button]:w-20"),justifyContent:"end",children:g(V,{variant:"brand",size:"sm",onClick:a,children:r("login.modal.button.sessionExpiredConfirm")})}),children:g("div",{className:"px-4 pt-3 pb-0",children:g("span",{className:"text-fg-default typo-compact-sm-normal",children:r("login.modal.desc.sessionExpired")})})})},ve="/muscat/app/log",R="/muscat/app/login",{useMutation:ge}=await k("@tanstack/react-query"),me="/logout",G=async e=>q.post(me,{sid:e}),Oe=()=>{const{setLoggedIn:e,user:t}=de(),s=Y();return ge({mutationFn:async()=>{if(t?.sid)return G(t.sid)},onSettled:()=>{A(),e(!1),s(R)}})},he=`http://${L()||window.location.hostname}:undefined`,pe=1e4,Se=1e4,b=5e3;let D=null,j=null;function Ne(e){D=e}function Ce(e){j=e}let I=!1,H=0;function Ae(){return!!(I||Date.now()-H<pe)}const w=()=>{if(window.location.pathname===R)return;const e=async()=>{const t=v();if(t)try{await G(t)}catch{}A(),$(!1),j?.(R)};Q.openModal({component:fe,props:{onConfirm:e,onClose:e},options:{componentName:"SessionExpiredModal"}})};async function B(){if(Ae())return null;const e=p();if(!e)return w(),null;I=!0;try{const t=await E.post(`${he}/common/refresh`,{refresh_token:e}),{access_token:s,refresh_token:n}=t.data;return te(s,n,h()),$(!0),D?.("auth",{token:s,autoLogin:h()?"true":"false"}),H=Date.now(),S(),s}catch(t){console.log("Token refresh failed:",t);const s=E.isAxiosError(t)?t.response?.status:null;if(s===403||s===401||s===409)return A(),w(),null;throw t}finally{I=!1}}let m=null;function W(){m&&(clearTimeout(m),m=null)}function S(){W();const e=U(c());if(!e)return;const t=Math.max(e-Date.now(),0),s=Math.min(Math.max(e-Date.now()-Se,b),t);m=setTimeout(async()=>{try{if(!p())return;!await B()&&p()&&S()}catch{if(c()){const n=U(c());if(n&&n>Date.now()){const r=Math.min(b*2,n-Date.now());r>0&&(m=setTimeout(S,r))}}}},s)}window.addEventListener("storage",e=>{e.key!==o.accessToken&&e.key!==o.refreshToken||(c()&&p()?S():W())});const l={onRequest({config:e}){if(e.url?.endsWith("/login")||e.url?.endsWith("/logout")||e.url?.endsWith("/refresh")||/^https?:\/\//i.test(e.url??"")&&!e.url?.startsWith(e.baseURL??""))return e;const n=c();return n&&e.headers&&(e.headers.Authorization=`Bearer ${n}`),e},onResponse({response:e}){return e?.data},async onResponseError({error:e}){const t=e.config;if(!t)return Promise.reject(e);if(t.url?.endsWith("/login")||t.url?.endsWith("/logout")||t.url?.endsWith("/refresh"))return A(),Promise.reject(e);if(e.response?.status===401&&!t._retry){t._retry=!0;try{const i=await B();return i?(t.headers.Authorization=`Bearer ${i}`,E(t)):Promise.reject(e)}catch(i){return Promise.reject(i)}}const n=e?.response?.data;P("useSimulator")!=="false"&&P("useSimulator");const r=typeof n=="object"&&"message"in n&&typeof n.message=="string"?n.message:M("common.toast.apiError.content"),a=e.status??e.response?.status;return[502,504].includes(a)||e.code==="ERR_NETWORK"||ee()||t.skipErrorToast||X.openToast({title:e.config.url?`[API Error] ${e.config.url}`:M("common.toast.apiError.title"),content:r,type:"basic",variant:"warning"}),Promise.reject(e)}},Ee=3e3,d=`http://${L()||window.location.hostname}:${Ee}`,q=u({baseURL:`${d}/common`},l),$e=u({baseURL:`${d}/manipulate`},l),Ge=u({baseURL:`${d}/log`},l),De=u({baseURL:`${d}/amr`},l),je=u({baseURL:`${d}/rby1`},l);u({baseURL:`${d}/deploy`},l);const He=u({baseURL:`${d}/host`},l);export{A,G as B,He as C,xe as D,c as E,y as J,ve as L,d as M,be as R,De as a,ye as b,q as c,Z as d,_e as e,Le as f,L as g,Me as h,J as i,Ue as j,R as k,Ge as l,$e as m,Oe as n,Ne as o,B as p,W as q,je as r,Ce as s,ne as t,de as u,Pe as v,te as w,S as x,h as y,we as z};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import{aw as k,aZ as j,a$ as _}from"./useFileDownload.BuzVN3F3.js";import{aB as ge,b0 as he,aS as fe,aP as xe,b1 as be,b2 as Ne,b3 as ye,ax as ue,b4 as ve,aC as we,b5 as Pe,aA as Te,b6 as ke,b7 as Me,b8 as je,b9 as Oe,ba as Ae,aN as $e,aD as Re,aM as Se,aO as De,bb as Le,bc as Ce,bd as _e,aQ as Ee,be as ze,bf as Ie,bg as Fe,aR as Ue,bh as Ge,aU as Ve,aW as He,aV as Ye,bi as qe,bj as Be,bk as Ke,aT as Xe,bl as Ze,bm as We,bn as Je,bo as Qe,bp as ea,bq as aa,br as ta,aF as sa,bs as la,az as ra,aL as na,aK as ca,ay as ia,aI as oa,aJ as ma,aH as da,aG as pa,aE as ga}from"./useFileDownload.BuzVN3F3.js";import{c as y,H as a,j as e,cA as E,co as $,c1 as n,gd as z,ge as I,U as r,gf as F,ff as U,a$ as N,eA as G,eI as V,gg as H,gh as Y,gi as q,gj as B,eq as K}from"./RbLocalizationProvider.CI7oesfV.js";/**
|
|
2
|
-
* @license lucide-react v0.486.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const X=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Z=y("activity",X);/**
|
|
7
|
-
* @license lucide-react v0.486.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const W=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],J=y("hard-drive",W);/**
|
|
12
|
-
* @license lucide-react v0.486.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const Q=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],P=y("radar",Q);/**
|
|
17
|
-
* @license lucide-react v0.486.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const ee=[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]],ae=y("thermometer",ee);/**
|
|
22
|
-
* @license lucide-react v0.486.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const te=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],O=y("video",te),ce=({systemStatus:t,expandedSections:i,toggleSection:m})=>a("div",{className:"h-full space-y-3 overflow-y-auto",children:[e("h3",{className:"mb-4 text-sm font-semibold tracking-wide text-gray-400 uppercase",children:"Sensor Information"}),a("div",{className:"space-y-2 pb-4",children:[a("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:[a("button",{onClick:()=>m("lidar2d"),className:"flex w-full items-center justify-between bg-gray-900/50 px-3 py-2 transition-colors hover:bg-gray-900",children:[a("div",{className:"flex items-center gap-2",children:[e(P,{className:"h-4 w-4 text-blue-400"}),e("span",{className:"text-xs font-medium text-gray-300",children:"2D LiDAR"})]}),e(k,{className:`h-4 w-4 text-gray-500 transition-transform ${i.lidar2d?"rotate-180":""}`})]}),i.lidar2d&&e("div",{className:"space-y-1.5 border-t border-gray-800 p-2",children:t.lidar.map(s=>e("div",{className:"rounded bg-gray-900 px-3 py-2",children:a("div",{className:"flex items-center justify-between text-xs",children:[a("div",{className:"flex items-center gap-2",children:[e(P,{className:"h-3.5 w-3.5 text-blue-400"}),a("span",{className:"text-gray-400",children:["LiDAR ",s.index]})]}),a("div",{className:"flex items-center gap-3",children:[a("span",{className:"font-mono text-gray-400",children:[s.pts," pts"]}),a("div",{className:`flex items-center gap-1 ${s.connection?"text-green-400":"text-red-400"}`,children:[e("div",{className:`h-1.5 w-1.5 rounded-full ${s.connection?"bg-green-400":"bg-red-400"}`}),e("span",{children:s.connection?"Online":"Offline"})]})]})]})},s.index))})]}),a("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:[a("button",{onClick:()=>m("lidar3d"),className:"flex w-full items-center justify-between bg-gray-900/50 px-3 py-2 transition-colors hover:bg-gray-900",children:[a("div",{className:"flex items-center gap-2",children:[e(P,{className:"h-4 w-4 text-purple-400"}),e("span",{className:"text-xs font-medium text-gray-300",children:"3D LiDAR"})]}),e(k,{className:`h-4 w-4 text-gray-500 transition-transform ${i.lidar3d?"rotate-180":""}`})]}),i.lidar3d&&e("div",{className:"space-y-1.5 border-t border-gray-800 p-2",children:t.lidar3D.map(s=>e("div",{className:"rounded bg-gray-900 px-3 py-2",children:a("div",{className:"flex items-center justify-between text-xs",children:[a("div",{className:"flex items-center gap-2",children:[e(P,{className:"h-3.5 w-3.5 text-purple-400"}),a("span",{className:"text-gray-400",children:["3D LiDAR ",s.index]})]}),a("div",{className:"flex items-center gap-3",children:[a("span",{className:"font-mono text-gray-400",children:[s.pts," pts"]}),a("div",{className:`flex items-center gap-1 ${s.connection?"text-green-400":"text-red-400"}`,children:[e("div",{className:`h-1.5 w-1.5 rounded-full ${s.connection?"bg-green-400":"bg-red-400"}`}),e("span",{children:s.connection?"Online":"Offline"})]})]})]})},s.index))})]}),a("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:[a("button",{onClick:()=>m("cameras"),className:"flex w-full items-center justify-between bg-gray-900/50 px-3 py-2 transition-colors hover:bg-gray-900",children:[a("div",{className:"flex items-center gap-2",children:[e(O,{className:"h-4 w-4 text-cyan-400"}),e("span",{className:"text-xs font-medium text-gray-300",children:"Cameras"})]}),e(k,{className:`h-4 w-4 text-gray-500 transition-transform ${i.cameras?"rotate-180":""}`})]}),i.cameras&&e("div",{className:"space-y-1.5 border-t border-gray-800 p-2",children:t.cam.map(s=>a("div",{className:"rounded bg-gray-900 px-3 py-2",children:[a("div",{className:"mb-1.5 flex items-center justify-between text-xs",children:[a("div",{className:"flex items-center gap-2",children:[e(O,{className:"h-3.5 w-3.5 text-cyan-400"}),a("span",{className:"text-gray-400",children:["Camera ",s.index]})]}),a("div",{className:`flex items-center gap-1 ${s.connection?"text-green-400":"text-red-400"}`,children:[e("div",{className:`h-1.5 w-1.5 rounded-full ${s.connection?"bg-green-400":"bg-red-400"}`}),e("span",{children:s.connection?"Online":"Offline"})]})]}),a("div",{className:"grid grid-cols-2 gap-2 text-xs text-gray-500",children:[a("div",{children:["RGB: ",s.rgb_w,"×",s.rgb_h]}),a("div",{children:["Depth: ",s.depth_w,"×",s.depth_h]})]})]},s.index))})]})]})]}),ie=({systemStatus:t,expandedSections:i,toggleSection:m})=>{const s=(o,f,x)=>o>=x?"text-red-400":o>=f?"text-yellow-400":"text-green-400";return a("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:[a("button",{onClick:()=>m("systemResources"),className:"flex w-full items-center justify-between bg-gray-900/50 px-3 py-2 transition-colors hover:bg-gray-900",children:[a("div",{className:"flex items-center gap-2",children:[e(j,{className:"h-4 w-4 text-blue-400"}),e("span",{className:"text-xs font-medium text-gray-300",children:"System Resources"})]}),e(k,{className:`h-4 w-4 text-gray-500 transition-transform ${i.systemResources?"rotate-180":""}`})]}),i.systemResources&&a("div",{className:"space-y-3 border-t border-gray-800 bg-gray-900 px-3 py-3",children:[a("div",{children:[a("div",{className:"mb-1.5 flex items-center justify-between",children:[a("div",{className:"flex items-center gap-2",children:[e(j,{className:"h-3.5 w-3.5 text-blue-400"}),e("span",{className:"text-xs text-gray-400",children:"CPU"})]}),a("span",{className:`font-mono text-sm font-medium ${s(t.cpu,70,85)}`,children:[t.cpu,"%"]})]}),e("div",{className:"h-1.5 w-full rounded-full bg-gray-800",children:e("div",{className:`h-1.5 rounded-full transition-all ${t.cpu>=85?"bg-red-500":t.cpu>=70?"bg-yellow-500":"bg-green-500"}`,style:{width:`${t.cpu}%`}})})]}),a("div",{children:[a("div",{className:"mb-1.5 flex items-center justify-between",children:[a("div",{className:"flex items-center gap-2",children:[e(Z,{className:"h-3.5 w-3.5 text-purple-400"}),e("span",{className:"text-xs text-gray-400",children:"RAM"})]}),a("span",{className:`font-mono text-sm font-medium ${s(t.memory,75,90)}`,children:[t.memory,"%"]})]}),e("div",{className:"h-1.5 w-full rounded-full bg-gray-800",children:e("div",{className:`h-1.5 rounded-full transition-all ${t.memory>=90?"bg-red-500":t.memory>=75?"bg-yellow-500":"bg-green-500"}`,style:{width:`${t.memory}%`}})})]}),a("div",{children:[a("div",{className:"mb-1.5 flex items-center justify-between",children:[a("div",{className:"flex items-center gap-2",children:[e(J,{className:"h-3.5 w-3.5 text-cyan-400"}),e("span",{className:"text-xs text-gray-400",children:"Storage"})]}),a("span",{className:`font-mono text-sm font-medium ${s(t.disk,80,95)}`,children:[t.disk,"%"]})]}),e("div",{className:"h-1.5 w-full rounded-full bg-gray-800",children:e("div",{className:`h-1.5 rounded-full transition-all ${t.disk>=95?"bg-red-500":t.disk>=80?"bg-yellow-500":"bg-green-500"}`,style:{width:`${t.disk}%`}})})]}),e("div",{children:a("div",{className:"flex items-center justify-between",children:[a("div",{className:"flex items-center gap-2",children:[e(ae,{className:"h-3.5 w-3.5 text-orange-400"}),e("span",{className:"text-xs text-gray-400",children:"CPU Temp"})]}),a("span",{className:`font-mono text-sm font-medium ${s(t.temperature,60,75)}`,children:[t.temperature,"°C"]})]})})]})]})},A=t=>{const i=Math.floor(t/3600).toString().padStart(2,"0"),m=Math.floor(t%3600/60).toString().padStart(2,"0"),s=Math.floor(t%60).toString().padStart(2,"0");return`${i}:${m}:${s}`},oe=({mappingStatus:t="idle",elapsedSeconds:i=0,completedKeyframeCount:m=0,totalKeyframePoints:s=0,onStartMapping:o,onStopMapping:f,onSaveMapping:x,onDiscard:u,mapList:M})=>{const{modal:v}=E(),{t:l}=$(),c=t==="recording",g=t==="stopped"||t==="saving"||t==="discarding",h=t==="saving"||t==="discarding",d=m>0,w=l(d?"move.amr.rightPanel.map.mapping.readyToSave":"move.amr.rightPanel.map.mapping.cannotSaveYet"),p=d?null:l("move.amr.rightPanel.map.mapping.noKeyframeReceived"),R=async()=>{try{await o?.()}catch(b){console.error(b)}},S=async()=>{try{await f?.()}catch(b){console.error(b)}},D=async()=>{await u?.()},L=async b=>x?.(b)??{ok:!1,reason:"save-failed"},C=()=>{v({component:_,props:{onSaveMapping:L,completedKeyframeCount:m,totalKeyframePoints:s,durationSeconds:i,existingMapNames:M}})};return a(n,{className:"h-full overflow-y-auto p-3",children:[!c&&!g&&a(n,{className:"flex-1 items-center gap-1 pt-[4rem]",children:[e(z,{className:"text-fg-brand size-8"}),e("p",{className:"typo-compact-xs-semibold text-fg-brand",children:l("move.amr.rightPanel.map.mapping.readyToMap")}),a("p",{className:"typo-title-02-bold text-fg-default text-center",children:[l("move.amr.rightPanel.map.mapping.clickStartMapping"),e("br",{}),l("move.amr.rightPanel.map.mapping.toBegin")]})]}),c&&a(n,{className:"flex-1 pt-[4rem]",children:[a(n,{className:"items-center gap-1",children:[e(I,{className:"text-fg-danger size-8"}),e("p",{className:"typo-compact-xs-semibold text-fg-danger",children:l("move.amr.rightPanel.map.mapping.recordingActive")}),e("p",{className:"typo-title-02-bold text-fg-default text-center",children:l("move.amr.rightPanel.map.mapping.buildingKeyframes")})]}),a(n,{className:"gap-2 p-3",children:[e("p",{className:"typo-compact-xs2-semibold text-fg-default",children:l("move.amr.rightPanel.map.mapping.captureStatus")}),a(n,{className:"bg-bg-alt-1 gap-1 rounded-md p-2.5",children:[a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.map.mapping.saveStatus")}),e("p",{className:`typo-compact-xs-semibold text-right ${d?"text-fg-success":"text-fg-danger"}`,children:w})]}),p&&e("p",{className:"typo-compact-2xs-normal text-fg-subtler text-right",children:p}),a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.map.mapping.keyframesReceived")}),e("p",{className:"typo-compact-xs-semibold text-fg-default text-right",children:m.toLocaleString()})]}),a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.map.mapping.keyframePoints")}),e("p",{className:"typo-compact-xs-semibold text-fg-default text-right",children:l("move.amr.rightPanel.map.mapping.points",{count:s.toLocaleString()})})]}),a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.task.duration")}),e("p",{className:"typo-compact-xs-semibold text-fg-default text-right",children:A(i)})]})]})]})]}),g&&a(n,{className:"flex-1 pt-[4rem]",children:[a(n,{className:"items-center gap-1",children:[e(F,{className:`${d?"text-fg-success":"text-fg-danger"} size-8`}),e("p",{className:`typo-compact-xs-semibold ${d?"text-fg-success":"text-fg-danger"}`,children:l(d?"move.amr.rightPanel.map.mapping.readyToSaveTitle":"move.amr.rightPanel.map.mapping.noKeyframeCaptured")}),e("p",{className:"typo-title-02-bold text-fg-default text-center",children:l(d?"move.amr.rightPanel.map.mapping.mapReadyToSave":"move.amr.rightPanel.map.mapping.cannotSaveRecording")}),e("p",{className:"typo-compact-xs-normal text-fg-subtler text-center",children:l(d?"move.amr.rightPanel.map.mapping.canSaveAsNewMap":"move.amr.rightPanel.map.mapping.keyframeRequired")})]}),a(n,{className:"gap-2 p-3",children:[e("p",{className:"typo-compact-xs2-semibold text-fg-default",children:l("move.amr.rightPanel.map.mapping.result")}),a(n,{className:"bg-bg-alt-1 gap-1 rounded-md p-2.5",children:[a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.map.mapping.saveStatus")}),e("p",{className:`typo-compact-xs-semibold text-right ${d?"text-fg-success":"text-fg-danger"}`,children:w})]}),p&&e("p",{className:"typo-compact-2xs-normal text-fg-subtler text-right",children:p}),a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.map.mapping.keyframesReceived")}),e("p",{className:"typo-compact-xs-semibold text-fg-default text-right",children:m.toLocaleString()})]}),a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.map.mapping.keyframePoints")}),e("p",{className:"typo-compact-xs-semibold text-fg-default text-right",children:l("move.amr.rightPanel.map.mapping.points",{count:s.toLocaleString()})})]}),a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.task.duration")}),e("p",{className:"typo-compact-xs-semibold text-fg-default text-right",children:A(i)})]})]})]})]}),!g&&a(r,{className:"shrink-0 justify-between gap-2",children:[e(N,{onClick:S,disabled:!c||h,className:"gap-1 px-3.5",leadingIcon:e(U,{}),variant:"danger",children:l("move.amr.rightPanel.common.stop")}),e(N,{onClick:R,disabled:c||h,className:"flex-1 gap-1 px-3.5",variant:"brand",children:l("move.amr.rightPanel.map.mapping.startMapping")})]}),g&&a(n,{className:"shrink-0 gap-2",children:[!d&&e(n,{className:"items-center",children:e("p",{className:"typo-compact-2xs-normal text-fg-danger",children:l("move.amr.rightPanel.map.mapping.keyframeRequired")})}),a(r,{className:"justify-between gap-2",children:[e(N,{onClick:D,disabled:h,className:"gap-1 px-3.5",children:l(t==="discarding"?"move.amr.rightPanel.map.mapping.discarding":"move.amr.rightPanel.common.discard")}),e(N,{onClick:C,disabled:!d||h,className:"flex-1 gap-1 px-3.5",variant:"brand",children:l(t==="saving"?"move.amr.rightPanel.common.saving":"move.amr.rightPanel.common.save")})]})]})]})},se=()=>({GOAL:0,ROUTE:0,ALIGN:0}),le=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:`${t}`,T=t=>`${t<0?"-":"+"}${Math.abs(t).toFixed(1)}m`,me=({currentMapName:t,createdAt:i,lastModified:m,mapCloudCount:s,mapBounds:o,topologyCount:f,nodeTypeCounts:x,onLoadMap:u,loadMapDisabled:M,onDownloadMap:v,downloadMapDisabled:l})=>{const{t:c}=$(),g=o?`${T(o.minX)} ~ ${T(o.maxX)}`:"--",h=o?`${T(o.minY)} ~ ${T(o.maxY)}`:"--",d=o?Math.abs(o.maxX-o.minX)*Math.abs(o.maxY-o.minY):null,w=d===null?"--":`${d.toFixed(1)} m²`,p=x??se();return a(n,{className:"h-full justify-between overflow-y-auto",children:[a(n,{className:"items-start",children:[a(n,{className:"border-border-subtler w-full gap-1.5 border-b-[1px] p-3",children:[u?a("button",{type:"button",className:"hover:bg-fill-subtlest flex w-full items-center justify-between gap-3 rounded-md p-2 text-left disabled:cursor-not-allowed disabled:opacity-50",disabled:M,onClick:u,children:[a(n,{className:"min-w-0 gap-0.5",children:[e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:c("move.amr.rightPanel.map.info.mapName")}),e("p",{className:"typo-compact-md-semibold text-fg-default truncate",children:t})]}),e(G,{className:"text-fg-subtle size-4 shrink-0"})]}):a(n,{className:"gap-0.5 self-stretch",children:[e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:c("move.amr.rightPanel.map.info.mapName")}),e("p",{className:"typo-compact-md-semibold text-fg-default",children:t})]}),a(n,{className:"items-start gap-1 self-stretch",children:[a(r,{className:"items-center justify-between self-stretch",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:c("move.amr.rightPanel.common.created")}),e("p",{className:"typo-compact-xs-normal text-fg-subtle",children:i??"--"})]}),a(r,{className:"items-center justify-between self-stretch",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:c("move.amr.rightPanel.map.info.lastModified")}),e("p",{className:"typo-compact-xs-normal text-fg-subtle",children:m??"--"})]})]})]}),a(n,{className:"border-border-subtler w-full gap-2 border-b-[1px] p-3",children:[e("p",{className:"typo-compact-md-semibold text-fg-default",children:c("move.amr.rightPanel.map.info.statistics")}),a(r,{className:"items-center justify-between self-stretch",children:[a(r,{className:"items-center gap-[6px]",children:[e("div",{className:"bg-fill-subtler flex size-6 items-center justify-center rounded-full",children:e(V,{className:"text-fg-subtle size-4"})}),e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:c("move.amr.rightPanel.map.info.nodes")})]}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:f})]}),a(r,{className:"items-center justify-between self-stretch",children:[e(r,{children:a(r,{className:"items-center gap-[6px]",children:[e("div",{className:"bg-fill-subtler flex size-6 items-center justify-center rounded-full",children:e(H,{className:"text-fg-subtle size-4"})}),e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:c("move.amr.rightPanel.map.info.pointCloud")})]})}),a("p",{className:"typo-compact-xs2-normal text-fg-default",children:[le(s)," pts"]})]})]}),a(n,{className:"border-border-subtler w-full gap-2 border-b-[1px] p-3",children:[e("p",{className:"typo-compact-md-semibold text-fg-default",children:c("move.amr.rightPanel.map.info.mapBoundaries")}),a(r,{className:"items-center justify-between self-stretch",children:[e(r,{className:"items-center gap-[6px]",children:e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:c("move.amr.rightPanel.map.info.xRange")})}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:g})]}),a(r,{className:"items-center justify-between self-stretch",children:[e(r,{children:e(r,{className:"items-center gap-[6px]",children:e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:c("move.amr.rightPanel.map.info.yRange")})})}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:h})]}),a(r,{className:"items-center justify-between self-stretch",children:[e(r,{className:"items-center gap-[6px]",children:e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:c("move.amr.rightPanel.map.info.totalArea")})}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:w})]})]}),a(n,{className:"border-border-subtler w-full gap-2 border-b-[1px] p-3",children:[e("p",{className:"typo-compact-md-semibold text-fg-default",children:c("move.amr.rightPanel.menu.topology")}),a(r,{className:"items-center justify-between self-stretch",children:[a(r,{className:"items-center gap-[6px]",children:[e("div",{className:"bg-fill-warning-subtler flex size-6 items-center justify-center rounded-full",children:e(Y,{className:"text-fg-warning size-4"})}),e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:c("move.amr.rightPanel.topology.nodeType.goal")})]}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:p.GOAL})]}),a(r,{className:"items-center justify-between self-stretch",children:[e(r,{children:a(r,{className:"items-center gap-[6px]",children:[e("div",{className:"bg-fill-brand-subtler flex size-6 items-center justify-center rounded-full",children:e(q,{className:"text-fg-brand size-4"})}),e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:c("move.amr.rightPanel.topology.nodeType.route")})]})}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:p.ROUTE})]}),a(r,{className:"items-center justify-between self-stretch",children:[a(r,{className:"items-center gap-[6px]",children:[e("div",{className:"bg-fill-success-subtler flex size-6 items-center justify-center rounded-full",children:e(B,{className:"text-fg-success size-4"})}),e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:c("move.amr.rightPanel.topology.nodeType.align")})]}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:p.ALIGN})]})]})]}),v?e(n,{className:"shrink-0 gap-2 p-3",children:e(N,{variant:"brand",size:"sm",leadingIcon:e(K,{}),disabled:l,onClick:v,children:c("move.amr.rightPanel.map.info.downloadMap")})}):null]})};export{ge as AMRNodeFromTo,he as ArrowHelper2,fe as BottomStatusBar,xe as CameraStreamsPanel,be as DEFAULT_EDITOR_CAMERA,Ne as DEFAULT_NAVIGATION_TOOLS,ye as DEFAULT_TOOL_GROUPS,ue as DEFAULT_TOPOLOGY_FORMAT_VERSION,ve as DEFAULT_TOPOLOGY_LINK_CREATION_SETTINGS,we as DEFAULT_TRANSFORM_TOOLS,Pe as DockControl,Te as EDITOR_CAMERA_POSITION_KEY,ke as EDITOR_MODE,Me as Editor,je as Eraser,Oe as EraserTab,Ae as EventHandler,$e as HUDStatusPanel,Re as LeftToolBar,me as MapInfo,Se as MapLoadDialog,De as MapNameHUD,oe as MappingTab,Le as MarkerControl,ce as MonitorSensorsTab,Ce as NODE_TYPE,_e as NodeManager,Ee as ObstacleMapPanel,ze as Overview,Ie as PathDrawer,Fe as PduInfo,Ue as RobotControlPanel,Ge as RobotManager,Ve as SelectedLinkOverlay,He as SelectedNodeOverlay,Ye as SelectedZoneOverlay,qe as Selector,ie as SystemResources,Be as TaskInformation,Ke as TopologyActionFooter,Xe as TopologyControl,Ze as TopologyLinkTabPanel,We as TopologyNodeAddSection,Je as TopologyNodeEditSection,Qe as TopologyNodeTabPanel,ea as TopologyOverviewTabPanel,aa as TopologyZoneTabPanel,ta as TrajectoryDrawer,sa as ViewControlsPanel,la as Viewport,ra as WorldStudio,na as useBottomStatusBar,ca as useEditorKeyboardShortcut,ia as useEditorState,oa as useEditorTool,ma as useEditorViewportOptions,da as useFileDownload,pa as useOverlayPosition,ga as useTopologyLinkCreationSettings};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const X="LASF";const R=(e,t,r)=>{let o="";for(let s=0;s<r;s+=1)o+=String.fromCharCode(e.getUint8(t+s));return o},m=(e,t)=>{const r=e.getBigUint64(t,!0);if(r>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("LAS point count exceeds Number.MAX_SAFE_INTEGER.");return Number(r)},D=e=>{switch(e){case 2:return 20;case 3:return 28;case 7:return 30;case 8:return 30;default:return null}},f=e=>Math.min(1,Math.max(0,e)),c=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4,w=e=>{const t=f(Math.sqrt(e/255));return{r:f(.13572138+t*(4.6153926+t*(-42.66032258+t*(132.13108234+t*(-152.94239396+t*59.28637943))))),g:f(.09140261+t*(2.19418839+t*(4.84296658+t*(-14.18503333+t*(4.27729857+t*2.82956604))))),b:f(.1066733+t*(12.64194608+t*(-60.58204836+t*(110.36276771+t*(-89.90310912+t*27.34824973)))))}},U=e=>({minX:e.getFloat64(187,!0),minY:e.getFloat64(203,!0),minZ:e.getFloat64(219,!0),maxX:e.getFloat64(179,!0),maxY:e.getFloat64(195,!0),maxZ:e.getFloat64(211,!0)}),y=e=>{const t=new DataView(e);if(t.byteLength<227)throw new Error("Invalid LAS buffer: header is too short.");if(R(t,0,4)!==X)throw new Error("Invalid LAS buffer: LASF signature not found.");const r=t.getUint16(94,!0),o=t.getUint32(96,!0),F=t.getUint8(104)&63,O=t.getUint16(105,!0),N=t.getUint32(107,!0),_=N>0&&F<=5?N:m(t,247);if(r>o||o>t.byteLength)throw new Error("Invalid LAS buffer: point data offset is out of range.");if(O<20)throw new Error("Invalid LAS buffer: point record length is too short.");if(o+_*O>t.byteLength)throw new Error("Invalid LAS buffer: point records exceed buffer length.");const d=t.getFloat64(131,!0),M=t.getFloat64(139,!0),h=t.getFloat64(147,!0),L=t.getFloat64(155,!0),p=t.getFloat64(163,!0),b=t.getFloat64(171,!0),S=new Float32Array(_*3),I=new Float32Array(_),u=new Float32Array(_*3),i=D(F),a=i===null?void 0:new Float32Array(_*3);let C=!1;for(let T=0;T<_;T+=1){const E=o+T*O,n=T*3;S[n]=t.getInt32(E,!0)*d+L,S[n+1]=t.getInt32(E+4,!0)*M+p,S[n+2]=t.getInt32(E+8,!0)*h+b;const l=t.getUint16(E+12,!0);I[T]=l,l>0&&(C=!0);const g=w(l);u[n]=c(g.r),u[n+1]=c(g.g),u[n+2]=c(g.b),a&&i!==null&&i+6<=O&&(a[n]=c(t.getUint16(E+i,!0)/65535),a[n+1]=c(t.getUint16(E+i+2,!0)/65535),a[n+2]=c(t.getUint16(E+i+4,!0)/65535))}return{pointCount:_,positions:S,colors:a,intensities:C?I:void 0,intensityColors:u,bounds:U(t)}},A=self;A.onmessage=e=>{const{id:t,buffer:r}=e.data;try{const o=y(r),s={id:t,type:"success",data:o},F=[o.positions.buffer];o.colors&&F.push(o.colors.buffer),o.intensities&&F.push(o.intensities.buffer),o.intensityColors&&F.push(o.intensityColors.buffer),A.postMessage(s,F)}catch(o){const s={id:t,type:"error",message:o instanceof Error?o.message:"Unknown LAS parse error."};A.postMessage(s)}};
|