@fps-games/editor-deployment 0.2.3-beta.20 → 0.2.3-beta.21
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/licenses/THIRD_PARTY_NOTICES.txt +2 -2
- package/manifest.json +39 -39
- package/npm-shrinkwrap.json +2 -2
- package/package.json +7 -7
- package/public/assets/{index-CSRKtiw4.js → index-igN1GVhI.js} +1 -1
- package/public/assets/index-igN1GVhI.js.br +0 -0
- package/public/assets/index-igN1GVhI.js.gz +0 -0
- package/public/assets/{playable-sdk-CxfjVWHL.js → playable-sdk-B8_VwaXx.js} +1 -1
- package/public/assets/playable-sdk-B8_VwaXx.js.br +0 -0
- package/public/assets/{playable-sdk-CxfjVWHL.js.gz → playable-sdk-B8_VwaXx.js.gz} +0 -0
- package/public/assets/{playable-standard-project-ZSBdsTD4.js → playable-standard-project-X3XQewnw.js} +56 -56
- package/public/assets/playable-standard-project-X3XQewnw.js.br +0 -0
- package/public/assets/playable-standard-project-X3XQewnw.js.gz +0 -0
- package/public/index.html +3 -3
- package/public/index.html.br +0 -0
- package/public/index.html.gz +0 -0
- package/public/assets/index-CSRKtiw4.js.br +0 -0
- package/public/assets/index-CSRKtiw4.js.gz +0 -0
- package/public/assets/playable-sdk-CxfjVWHL.js.br +0 -0
- package/public/assets/playable-standard-project-ZSBdsTD4.js.br +0 -0
- package/public/assets/playable-standard-project-ZSBdsTD4.js.gz +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{go as Yt,Z as yt,Y as br,B as yr,F as Pr,kA as at,kO as Ir,kB as Pt,c0 as Ar,iL as Tr,jV as Rr,fX as wr,ja as Mr,hl as _r,k1 as Dr,lw as qt,lq as Kt,lx as Cr,lS as vr,gL as Lr,a3 as Wt,l as xr,m as Or,o as Nr,E as It,p as Xt,jT as kr,lB as $e,jU as jr,n as Gr,q as Fr,r as Br,lJ as At,g_ as zr,mP as Ur,mF as $r,jO as Hr,aQ as Tt,jy as Rt,nj as wt,mZ as Vr,ge as se,bq as Yr,bp as qr,mQ as Kr}from"./playable-standard-project-ZSBdsTD4.js";import{C as ji,D as Gi,a as Fi,b as Bi,c as zi,d as Ui,e as $i,f as Hi,g as Vi,h as Yi,i as qi,j as Ki,k as Wi,s as Xi,t as Ji,u as Zi,v as Qi,w as eo,x as to,y as ro,z as ao,A as no,G as io,H as oo,I as so,J as co,K as lo,L as uo,M as fo,N as mo,O as go,P as Eo,Q as po,R as So,S as ho,T as bo,U as yo,V as Po,W as Io,X as Ao,_ as To,$ as Ro,a0 as wo,a1 as Mo,a2 as _o,a4 as Do,a6 as Co,a7 as vo,a8 as Lo,a9 as xo,aa as Oo,ab as No,ac as ko,ad as jo,ae as Go,af as Fo,ag as Bo,ah as zo,ai as Uo,aj as $o,ak as Ho,al as Vo,am as Yo,an as qo,ao as Ko,ap as Wo,aq as Xo,ar as Jo,as as Zo,at as Qo,au as es,av as ts,aw as rs,ax as as,ay as ns,az as is,aA as os,aB as ss,aC as cs,aD as ds,aE as ls,aF as us,aG as fs,aH as ms,aI as gs,aJ as Es,aK as ps,aL as Ss,aM as hs,aN as bs,aO as ys,aP as Ps,aR as Is,aS as As,aT as Ts,aU as Rs,aV as ws,aW as Ms,aX as _s,aY as Ds,aZ as Cs,a_ as vs,a$ as Ls,b0 as xs,b1 as Os,b2 as Ns,b3 as ks,b4 as js,b5 as Gs,b6 as Fs,b7 as Bs,b8 as zs,b9 as Us,ba as $s,bb as Hs,bc as Vs,bd as Ys,be as qs,bf as Ks,bg as Ws,bh as Xs,bi as Js,bj as Zs,bk as Qs,bl as ec,bm as tc,bn as rc,bo as ac,br as nc,bs as ic,bt as oc,bu as sc,bv as cc,bw as dc,bx as lc,by as uc,bz as fc,bA as mc,bB as gc,bC as Ec,bD as pc,bE as Sc,bF as hc,bG as bc,bH as yc,bI as Pc,bJ as Ic,bK as Ac,bL as Tc,bM as Rc,bN as wc,bO as Mc,bP as _c,bQ as Dc,bR as Cc,bS as vc,bT as Lc,bU as xc,bV as Oc,bW as Nc,bX as kc,bY as jc,bZ as Gc,b_ as Fc,b$ as Bc,c1 as zc,c2 as Uc,c3 as $c,c4 as Hc,c5 as Vc,c6 as Yc,c7 as qc,c8 as Kc,c9 as Wc,ca as Xc,cb as Jc,cc as Zc,cd as Qc,ce as ed,cf as td,cg as rd,ch as ad,ci as nd,cj as id,ck as od,cl as sd,cm as cd,cn as dd,co as ld,cp as ud,cq as fd,cr as md,cs as gd,ct as Ed,cu as pd,cv as Sd,cw as hd,cx as bd,cy as yd,cz as Pd,cA as Id,cB as Ad,cC as Td,cD as Rd,cE as wd,cF as Md,cG as _d,cH as Dd,cI as Cd,cJ as vd,cK as Ld,cL as xd,cM as Od,cN as Nd,cO as kd,cP as jd,cQ as Gd,cR as Fd,cS as Bd,cT as zd,cU as Ud,cV as $d,cW as Hd,cX as Vd,cY as Yd,cZ as qd,c_ as Kd,c$ as Wd,d0 as Xd,d1 as Jd,d2 as Zd,d3 as Qd,d4 as el,d5 as tl,d6 as rl,d7 as al,d8 as nl,d9 as il,da as ol,db as sl,dc as cl,dd as dl,de as ll,df as ul,dg as fl,dh as ml,di as gl,dj as El,dk as pl,dl as Sl,dm as hl,dn as bl,dp as yl,dq as Pl,dr as Il,ds as Al,dt as Tl,du as Rl,dv as wl,dw as Ml,dx as _l,dy as Dl,dz as Cl,dA as vl,dB as Ll,dC as xl,dD as Ol,dE as Nl,dF as kl,dG as jl,dH as Gl,dI as Fl,dJ as Bl,dK as zl,dL as Ul,dM as $l,dN as Hl,dO as Vl,dP as Yl,dQ as ql,dR as Kl,dS as Wl,dT as Xl,dU as Jl,dV as Zl,dW as Ql,dX as eu,dY as tu,dZ as ru,d_ as au,d$ as nu,e0 as iu,e1 as ou,e2 as su,e3 as cu,e4 as du,e5 as lu,e6 as uu,e7 as fu,e8 as mu,e9 as gu,ea as Eu,eb as pu,ec as Su,ed as hu,ee as bu,ef as yu,eg as Pu,eh as Iu,ei as Au,ej as Tu,ek as Ru,el as wu,em as Mu,en as _u,eo as Du,ep as Cu,eq as vu,er as Lu,es as xu,et as Ou,eu as Nu,ev as ku,ew as ju,ey as Gu,ez as Fu,eA as Bu,eB as zu,eC as Uu,eD as $u,eE as Hu,eF as Vu,eG as Yu,eH as qu,eI as Ku,eJ as Wu,eK as Xu,eL as Ju,eM as Zu,eN as Qu,eO as ef,eP as tf,eQ as rf,eR as af,eS as nf,eT as of,eU as sf,eV as cf,eW as df,eX as lf,eY as uf,eZ as ff,e_ as mf,e$ as gf,f0 as Ef,f1 as pf,f2 as Sf,f3 as hf,f4 as bf,f5 as yf,f6 as Pf,f7 as If,f8 as Af,f9 as Tf,fa as Rf,fb as wf,fc as Mf,fd as _f,fe as Df,ff as Cf,fg as vf,fh as Lf,fi as xf,fj as Of,fk as Nf,fl as kf,fm as jf,fn as Gf,fo as Ff,fp as Bf,fq as zf,fr as Uf,fs as $f,ft as Hf,fu as Vf,fv as Yf,fw as qf,fx as Kf,fy as Wf,fz as Xf,fA as Jf,fB as Zf,fC as Qf,fD as em,fE as tm,fF as rm,fG as am,fJ as nm,fK as im,fL as om,fM as sm,fN as cm,fO as dm,fP as lm,fQ as um,fR as fm,fS as mm,fT as gm,fU as Em,fV as pm,fW as Sm,fY as hm,fZ as bm,f_ as ym,f$ as Pm,g0 as Im,g1 as Am,g2 as Tm,g3 as Rm,g4 as wm,g5 as Mm,g6 as _m,g7 as Dm,g8 as Cm,g9 as vm,ga as Lm,gb as xm,gc as Om,gd as Nm,gf as km,gg as jm,gh as Gm,gi as Fm,gj as Bm,gk as zm,gl as Um,gm as $m,gn as Hm,gp as Vm,gq as Ym,gr as qm,gs as Km,gt as Wm,gu as Xm,gv as Jm,gw as Zm,gx as Qm,gy as eg,gz as tg,gA as rg,gB as ag,gC as ng,gD as ig,gE as og,gF as sg,gG as cg,gH as dg,gI as lg,gJ as ug,gK as fg,gM as mg,gN as gg,gO as Eg,gP as pg,gQ as Sg,gR as hg,gS as bg,gT as yg,gU as Pg,gV as Ig,gW as Ag,gX as Tg,gY as Rg,gZ as wg,g$ as Mg,h0 as _g,h1 as Dg,h2 as Cg,h3 as vg,h4 as Lg,h5 as xg,h6 as Og,h7 as Ng,h8 as kg,h9 as jg,ha as Gg,hb as Fg,hc as Bg,hd as zg,he as Ug,hf as $g,hg as Hg,hh as Vg,hi as Yg,hj as qg,hk as Kg,hm as Wg,hn as Xg,ho as Jg,hp as Zg,hq as Qg,hr as eE,hs as tE,ht as rE,hu as aE,hv as nE,hw as iE,hx as oE,hy as sE,hz as cE,hA as dE,hB as lE,hC as uE,hD as fE,hE as mE,hF as gE,hG as EE,hH as pE,hI as SE,hJ as hE,hK as bE,hL as yE,hM as PE,hN as IE,hO as AE,hP as TE,hQ as RE,hR as wE,hS as ME,hT as _E,hU as DE,hV as CE,hW as vE,hX as LE,hY as xE,hZ as OE,h_ as NE,i0 as kE,i1 as jE,i2 as GE,i3 as FE,i4 as BE,i5 as zE,i6 as UE,i7 as $E,i8 as HE,i9 as VE,ia as YE,ib as qE,ic as KE,id as WE,ie as XE,ig as JE,ih as ZE,ii as QE,ij as ep,ik as tp,il as rp,im as ap,io as np,ip,iq as op,ir as sp,is as cp,it as dp,iu as lp,iv as up,iw as fp,ix as mp,iy as gp,iz as Ep,iA as pp,iB as Sp,iC as hp,iD as bp,iE as yp,iF as Pp,iG as Ip,iH as Ap,iI as Tp,iJ as Rp,iK as wp,iM as Mp,iN as _p,iO as Dp,iP as Cp,iQ as vp,iR as Lp,iS as xp,iT as Op,iU as Np,iV as kp,iW as jp,iX as Gp,iY as Fp,iZ as Bp,i_ as zp,i$ as Up,j0 as $p,j1 as Hp,j2 as Vp,j3 as Yp,j4 as qp,j5 as Kp,j6 as Wp,j7 as Xp,j8 as Jp,j9 as Zp,jb as Qp,jc as eS,jd as tS,je as rS,jf as aS,jg as nS,jh as iS,ji as oS,jj as sS,jk as cS,jl as dS,jm as lS,jn as uS,jo as fS,jp as mS,jq as gS,jr as ES,js as pS,jt as SS,ju as hS,jv as bS,jw as yS,jx as PS,jz as IS,jA as AS,jB as TS,jC as RS,jD as wS,jE as MS,jF as _S,jG as DS,jH as CS,jI as vS,jJ as LS,jK as xS,jL as OS,jM as NS,jN as kS,jP as jS,jQ as GS,jR as FS,jS as BS,jW as zS,jX as US,jY as $S,jZ as HS,j_ as VS,j$ as YS,k0 as qS,k2 as KS,k3 as WS,k4 as XS,k5 as JS,k6 as ZS,k7 as QS,k8 as eh,k9 as th,ka as rh,kb as ah,kc as nh,kd as ih,ke as oh,kf as sh,kg as ch,kh as dh,ki as lh,kj as uh,kk as fh,kl as mh,km as gh,kn as Eh,ko as ph,kp as Sh,kq as hh,kr as bh,ks as yh,kt as Ph,ku as Ih,kv as Ah,kw as Th,kx as Rh,ky as wh,kz as Mh,kC as _h,kD as Dh,kE as Ch,kF as vh,kG as Lh,kH as xh,kI as Oh,kJ as Nh,kK as kh,kL as jh,kM as Gh,kN as Fh,kP as Bh,kQ as zh,kR as Uh,kS as $h,kT as Hh,kU as Vh,kV as Yh,kW as qh,kX as Kh,kY as Wh,kZ as Xh,k_ as Jh,k$ as Zh,l0 as Qh,l1 as eb,l2 as tb,l3 as rb,l4 as ab,l5 as nb,l6 as ib,l7 as ob,l8 as sb,l9 as cb,la as db,lb,lc as ub,ld as fb,le as mb,lf as gb,lg as Eb,lh as pb,li as Sb,lj as hb,lk as bb,ll as yb,lm as Pb,ln as Ib,lo as Ab,lp as Tb,lr as Rb,ls as wb,lt as Mb,lu as _b,lv as Db,ly as Cb,lz as vb,lA as Lb,lC as xb,lD as Ob,lE as Nb,lF as kb,lG as jb,lH as Gb,lI as Fb,lK as Bb,lL as zb,lM as Ub,lN as $b,lO as Hb,lP as Vb,lQ as Yb,lR as qb,lT as Kb,lU as Wb,lV as Xb,lW as Jb,lX as Zb,lY as Qb,lZ as ey,l_ as ty,l$ as ry,m0 as ay,m1 as ny,m2 as iy,m3 as oy,m4 as sy,m5 as cy,m6 as dy,m7 as ly,m8 as uy,m9 as fy,ma as my,mb as gy,mc as Ey,md as py,me as Sy,mf as hy,mg as by,mh as yy,mi as Py,mj as Iy,mk as Ay,ml as Ty,mm as Ry,mn as wy,mo as My,mp as _y,mq as Dy,mr as Cy,ms as vy,mt as Ly,mu as xy,mv as Oy,mw as Ny,mx as ky,my as jy,mz as Gy,mA as Fy,mB as By,mC as zy,mD as Uy,mE as $y,mG as Hy,mH as Vy,mI as Yy,mJ as qy,mK as Ky,mL as Wy,mM as Xy,mN as Jy,mO as Zy,mR as Qy,mS as eP,mT as tP,mU as rP,mV as aP,mW as nP,mX as iP,mY as oP,m_ as sP,m$ as cP,n0 as dP,n1 as lP,n2 as uP,n3 as fP,n4 as mP,n5 as gP,n6 as EP,n7 as pP,n8 as SP,n9 as hP,na as bP,nb as yP,nc as PP,nd as IP,ne as AP,nf as TP,ng as RP,nh as wP,ni as MP,nk as _P,nl as DP,nm as CP,nn as vP,no as LP,np as xP,nq as OP,nr as NP,ns as kP,nt as jP,nu as GP,nv as FP,nw as BP,nx as zP,ny as UP,nz as $P,nA as HP,nB as VP,nC as YP,nD as qP,nE as KP,nF as WP,nG as XP,nH as JP,nI as ZP,nJ as QP,nK as eI,nL as tI,nM as rI,nN as aI,nO as nI,nP as iI,nQ as oI,nR as sI,nS as cI}from"./playable-standard-project-ZSBdsTD4.js";import"./hemisphericLight-C4swwL68.js";import"@fps-games/editor-core/plugin-host";function ri(e,t){const r=Yt(e),n=Wr(t),a=r.revision??null;if(!n)return{detected:!0,sourceId:r.sourceId,sourceType:r.sourceType,sourceRevision:a,generatedRevision:null,reason:"missing-generated-from"};const i=typeof n.revision=="number"?n.revision:null;return n.sourceId!==r.sourceId||n.sourceType!==r.sourceType?{detected:!0,sourceId:r.sourceId,sourceType:r.sourceType,sourceRevision:a,generatedRevision:i,reason:"source-mismatch"}:a!==i?{detected:!0,sourceId:r.sourceId,sourceType:r.sourceType,sourceRevision:a,generatedRevision:i,reason:"revision-mismatch"}:{detected:!1,sourceId:r.sourceId,sourceType:r.sourceType,sourceRevision:a,generatedRevision:i}}function Wr(e){if(!e||typeof e!="object")return null;const t=e.meta;if(!t||typeof t!="object")return null;const r=t.generatedFrom;if(!r||typeof r!="object")return null;const n=r.sourceId,a=r.sourceType;return typeof n!="string"||typeof a!="string"?null:{sourceId:n,sourceType:a,revision:typeof r.revision=="number"?r.revision:void 0}}function Xr(e){const{document:t,runtimePatch:r}=e,n=e.getSourceRef?.(t)??Yt(t),a=r.sourceBinding;if(!r.applyable||!a||r.applyTarget!==yt||a.sourceId!==br||a.sourceType!==yt||a.sourceId!==n.sourceId||a.sourceType!==n.sourceType)return null;const i=a.objectId;if(!i||!e.findGameObject(t,i)||e.isRootGameObjectId?.(i))return null;const s=r.after;return Jr(s)?{label:r.label??`Apply runtime transform ${i}`,patch:e.createPatch(i,s)}:null}function ai(e,t){return Xr({document:e,runtimePatch:t,findGameObject:(r,n)=>r.scene.gameObjects.find(a=>a.id===n)??null,isRootGameObjectId:r=>r==="root",createPatch:(r,n)=>({kind:"game-object.transform",targetId:r,transform:n})})}function Jr(e){if(!e||typeof e!="object")return!1;const t=e;return Ke(t.position)&&Ke(t.rotation)&&Ke(t.scale)}function Ke(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.x=="number"&&Number.isFinite(t.x)&&typeof t.y=="number"&&Number.isFinite(t.y)&&typeof t.z=="number"&&Number.isFinite(t.z)}const Jt="fps-editor.lighting-debug.open",Zt="fps-editor.lighting-debug.language",Zr=[{field:"environmentIntensity",textKey:"intensity",tooltipKey:"environmentIntensity",step:.01,min:0},{field:"iblIntensity",textKey:"iblIntensity",tooltipKey:"iblIntensity",step:.01,min:0,max:4},{field:"iblRotationY",textKey:"iblRotationY",tooltipKey:"iblRotationY",step:.01},{field:"directionalIntensity",textKey:"intensity",tooltipKey:"directionalIntensity",step:.01,min:0},{field:"directionalHorizontalAngle",textKey:"horizontalAngle",tooltipKey:"horizontalAngle",step:.01,min:-180,max:180},{field:"directionalElevationAngle",textKey:"elevationAngle",tooltipKey:"elevationAngle",step:.01,min:Pr,max:yr},{field:"shadowStrength",textKey:"shadowStrength",tooltipKey:"shadowStrength",step:.01,min:0,max:1},{field:"shadowSoftness",textKey:"shadowSoftness",tooltipKey:"shadowSoftness",step:.005,min:0,max:1}];function ce(e){const t=Zr.find(r=>r.field===e);if(!t)throw new Error(`Missing lighting number field config: ${e}`);return t}function We(e){const t=e.trim();if(!t||/^[+-]$/.test(t)||t.endsWith(".")||/[eE][+-]?$/.test(t))return null;const r=Number(t);return Number.isFinite(r)?r:null}const Mt={zh:{title:"光照调试",runtime:"运行时",languageButton:"EN",toggleTitle:"打开光照调试面板",environmentSection:"环境光",environmentTextureSection:"环境贴图 IBL",directionalSection:"直射光",shadowSection:"阴影外观",enabled:"启用",intensity:"强度",iblIntensity:"IBL 强度",iblRotationY:"IBL 旋转",skyLightColor:"天空光颜色",groundColor:"地面颜色",horizontalAngle:"水平角",elevationAngle:"高度角",lightColor:"光照颜色",rawDirection:"原始方向",shadowReadout:"阴影",shadowStrength:"阴影强度",shadowSoftness:"轮廓柔和度",shadowMap:"Shadow Map",shadowPlanarFollow:"Planar / 跟随直射光",shadowDynamic:"动态阴影",shadowBlob:"Blob 阴影",shadowStatic:"静态烘焙阴影",shadowNone:"Off",shadowUnknown:"Unknown",reset:"重置参数",save:"保存参数",resetStatus:"已重置为初始运行时光照。",savingStatus:"正在保存光照、IBL 和阴影参数...",savedStatus:"已保存光照、IBL 和阴影参数。",saveFailed:"保存失败",missingBindingStatus:"缺少光源绑定,只能临时预览,不能保存。"},en:{title:"Lighting Debug",runtime:"Runtime",languageButton:"中文",toggleTitle:"Toggle lighting debug panel",environmentSection:"Environment Light",environmentTextureSection:"Environment Texture IBL",directionalSection:"Directional Light",shadowSection:"Shadow Appearance",enabled:"Enabled",intensity:"Intensity",iblIntensity:"IBL Intensity",iblRotationY:"IBL Rotation",skyLightColor:"Sky Light Color",groundColor:"Ground Color",horizontalAngle:"Horizontal Angle",elevationAngle:"Elevation Angle",lightColor:"Light Color",rawDirection:"Raw Direction",shadowReadout:"Shadow",shadowStrength:"Shadow Strength",shadowSoftness:"Edge Softness",shadowMap:"Shadow Map",shadowPlanarFollow:"Planar / Follow Directional Light",shadowDynamic:"Dynamic Shadow",shadowBlob:"Blob Shadow",shadowStatic:"Static Baked Shadow",shadowNone:"Off",shadowUnknown:"Unknown",reset:"Reset",save:"Save Parameters",resetStatus:"Reset to initial runtime lighting.",savingStatus:"Saving lighting, IBL and shadows...",savedStatus:"Saved lighting, IBL and shadows.",saveFailed:"Save failed",missingBindingStatus:"Light binding missing; preview only, saving disabled."}},_t={zh:{languageButton:"切换光照调试面板的显示语言。",toggleTitle:"打开或关闭运行时光照调试面板。",enabled:"启用或禁用对应的运行时光源,保存后写回编辑器场景。",environmentIntensity:"环境光强度,对应运行时环境光 intensity。",iblIntensity:"环境贴图对 PBR 材质的光照贡献强度;实时预览不会重新加载贴图。",iblRotationY:"环境贴图绕 Y 轴的旋转弧度,用于调整环境反射和高光方向。",directionalIntensity:"直射光强度,对应运行时直射光 intensity。",skyLightColor:"环境光来自天空方向的漫反射颜色。",groundColor:"环境光来自地面反射方向的颜色。",horizontalAngle:"直射光在 XZ 平面内的朝向角度,会转换为运行时方向向量。",elevationAngle:"直射光相对地平线的高度角;90 度表示从正上方照下。",lightColor:"直射光漫反射颜色。",rawDirection:"只读方向向量,用于排查运行时转换结果。",shadowReadout:"只读阴影状态;支持宿主提供的运行时阴影模式摘要。",shadowStrength:"控制阴影的可见深浅;1 最深,0 不显示阴影。",shadowSoftness:"控制阴影接收边缘的柔和程度;0 表示硬边。",reset:"恢复为打开运行时时读取到的初始光照、IBL 和阴影参数。",save:"通过编辑器保存链路写回环境光、直射光、IBL 和 Shadow Map 外观参数。"},en:{languageButton:"Switch the lighting debug panel language.",toggleTitle:"Open or close the runtime lighting debug panel.",enabled:"Enable or disable the runtime light and save it back to the editor scene.",environmentIntensity:"Environment intensity. Maps to the runtime environment light intensity.",iblIntensity:"Environment texture contribution to PBR lighting. Live preview does not reload the texture.",iblRotationY:"Environment texture rotation around the Y axis in radians, affecting reflections and highlights.",directionalIntensity:"Directional intensity. Maps to the runtime directional light intensity.",skyLightColor:"Diffuse sky color for the environment light.",groundColor:"Ground bounce color for the environment light.",horizontalAngle:"Directional heading in the XZ plane, converted to a runtime direction vector.",elevationAngle:"Directional elevation above the horizon; 90 degrees points straight down.",lightColor:"Directional diffuse color.",rawDirection:"Read-only direction vector for checking runtime conversion.",shadowReadout:"Read-only shadow status supplied by the host runtime.",shadowStrength:"Visible shadow strength. One is darkest; zero hides the shadow.",shadowSoftness:"Receiver-edge softness. Zero produces a hard edge.",reset:"Restore the lighting, IBL and shadows captured when runtime opened.",save:"Save lighting, IBL and Shadow Map appearance through the editor authoring pipeline."}};function Qr(e){return Mt[e]??Mt.zh}function ea(e){return _t[e]??_t.zh}function ta(e,t){return e==="shadow-map"?t.shadowMap:e==="planar"?t.shadowPlanarFollow:e==="dynamic"?t.shadowDynamic:e==="blob"?t.shadowBlob:e==="static"?t.shadowStatic:e==="none"?t.shadowNone:t.shadowUnknown}function ra(e){try{return e?.localStorage?.getItem(Jt)==="true"}catch{return!1}}function aa(e,t){try{e?.localStorage?.setItem(Jt,String(t))}catch{}}function na(e){try{return e?.localStorage?.getItem(Zt)==="en"?"en":"zh"}catch{return"zh"}}function ia(e,t){try{e?.localStorage?.setItem(Zt,t)}catch{}}function ni(e,t){const r=Dt(Dt(e)?.__fpsEditor),n=Z(r?.sourceId),a=Z(r?.objectGuid),i=Z(r?.objectId),s=Z(r?.propertyPath),d=Z(r?.lightType);return!n||s!=="light"||!a&&!i||t&&d&&d!==t?null:{sourceId:n,propertyPath:"light",...t?{lightType:t}:d?{lightType:d}:{},...a?{objectGuid:a}:{},...i?{objectId:i}:{}}}function oa(e){const t=Z(e.sourceId),r=Z(e.propertyPath),n=Z(e.objectGuid),a=Z(e.objectId),i=Z(e.lightType);if(!t)throw new Error("Runtime light binding is missing sourceId.");if(r!=="light")throw new Error(`Runtime light binding is not for light: ${r??"missing"}`);if(!n&&!a)throw new Error("Runtime light binding is missing objectGuid/objectId.");return{sourceId:t,propertyPath:r,...n?{objectGuid:n}:{},...a?{objectId:a}:{},...i?{lightType:i}:{}}}function Dt(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function Z(e){return typeof e=="string"&&e.trim()?e.trim():null}function de(e){return{environment:{enabled:e.environment.enabled,binding:e.environment.binding?{...e.environment.binding}:null,light:{type:"hemispheric",intensity:e.environment.light.intensity,...e.environment.light.diffuseColor?{diffuseColor:{...e.environment.light.diffuseColor}}:{},...e.environment.light.groundColor?{groundColor:{...e.environment.light.groundColor}}:{}}},...e.environmentTexture?{environmentTexture:{...e.environmentTexture}}:{},directional:{enabled:e.directional.enabled,binding:e.directional.binding?{...e.directional.binding}:null,light:{type:"directional",intensity:e.directional.light.intensity,direction:{...e.directional.light.direction},...e.directional.light.diffuseColor?{diffuseColor:{...e.directional.light.diffuseColor}}:{}}},shadow:{...e.shadow,...e.shadow.shadowMap?{shadowMap:{...e.shadow.shadowMap,lastRefreshReasons:[...e.shadow.shadowMap.lastRefreshReasons],...e.shadow.shadowMap.appearance?{appearance:{...e.shadow.shadowMap.appearance}}:{}}}:{}}}}function Be(e){return!!e.environment.binding&&!!e.directional.binding}function ii(e){return Be(e)?[{binding:e.environment.binding,enabled:e.environment.enabled,light:e.environment.light},{binding:e.directional.binding,enabled:e.directional.enabled,light:e.directional.light}]:[]}function Pe(e,t){switch(t){case"environmentIntensity":return e.environment.light.intensity;case"iblIntensity":return e.environmentTexture?.iblIntensity??0;case"iblRotationY":return e.environmentTexture?.iblRotationY??0;case"directionalIntensity":return e.directional.light.intensity;case"directionalHorizontalAngle":return at(e.directional.light.direction).horizontalAngleDeg;case"directionalElevationAngle":return at(e.directional.light.direction).elevationAngleDeg;case"shadowStrength":return e.shadow.shadowMap?.appearance?.strength??0;case"shadowSoftness":return e.shadow.shadowMap?.appearance?.softness??0}}function Ct(e,t){switch(t){case"environmentDiffuseColor":return e.environment.light.diffuseColor??{r:1,g:1,b:1};case"environmentGroundColor":return e.environment.light.groundColor??{r:.48,g:.52,b:.62};case"directionalDiffuseColor":return e.directional.light.diffuseColor??{r:1,g:1,b:1}}}function sa(e,t,r){if(!Number.isFinite(r))return de(e);const n=de(e);switch(t){case"environmentIntensity":return n.environment.light.intensity=r,n;case"iblIntensity":return n.environmentTexture&&(n.environmentTexture.iblIntensity=r),n;case"iblRotationY":return n.environmentTexture&&(n.environmentTexture.iblRotationY=r),n;case"directionalIntensity":return n.directional.light.intensity=r,n;case"directionalHorizontalAngle":{const a=Pt(e.directional.light.direction);return vt(n,r,a.elevationAngleDeg)}case"directionalElevationAngle":{const a=Pt(e.directional.light.direction);return vt(n,a.horizontalAngleDeg,r)}case"shadowStrength":{const a=n.shadow.shadowMap?.appearance;return a&&(a.strength=r,a.darkness=1-r),n}case"shadowSoftness":return n.shadow.shadowMap?.appearance&&(n.shadow.shadowMap.appearance.softness=r),n}}function ca(e,t,r){const n=de(e);switch(t){case"environmentDiffuseColor":return n.environment.light.diffuseColor={...r},n;case"environmentGroundColor":return n.environment.light.groundColor={...r},n;case"directionalDiffuseColor":return n.directional.light.diffuseColor={...r},n}}function da(e,t,r){const n=de(e);return n[t].enabled=r,n}function vt(e,t,r){const n=Ar(t,r);return la(e,n)}function la(e,t){const r=de(e);return r.directional.light.direction={...t},r.shadow.projectedLengthMultiplier=Ir(t),r}function Qt(e,t){const r=typeof t?.materialAssetId=="string"?t.materialAssetId.trim():"",n=r?e.scene.materialAssets?.find(i=>i.id===r)??null:null,a=Tr(n?.properties,t?.override);return{materialAsset:n,...n?{materialAssetShaderId:n.shaderId}:{},profile:a,...r&&!n?{missingMaterialAssetId:r}:{}}}function oi(e,t){const r=Qt(e,t.overrides?.materialBinding),n={},a=Rr(r.materialAssetShaderId);return a&&(Object.keys(r.profile).length>0?(n.artistMaterialShaderId=a,n.artistMaterialProfile=r.profile):n.artistMaterialShaderId=a),n}function si(e,t){const r={},n=t.overrides?.materialSlotBindings??{};for(const[a,i]of Object.entries(n)){if(!a||!i)continue;const s=Qt(e,i);Object.keys(s.profile).length!==0&&(r[a]=s.profile)}return r}function ci(e,t){const r=ua(t),n=[];for(const a of e.inspector.fields){if(a.control!=="color"||a.updateClass!=="uniform")continue;const i=fa(e,a.schemaPath??a.path);if(i?.kind!=="color")continue;const s=i.channels===4?"vec4":"vec3",d=r.get(a.binding);if(!d){n.push({code:"material.shaderColorBindingMissing",path:a.path,binding:a.binding,expectedType:s,message:`GLSL uniform ${a.binding} is missing; expected ${s}.`});continue}d!==s&&n.push({code:"material.shaderColorBindingTypeMismatch",path:a.path,binding:a.binding,expectedType:s,actualType:d,message:`GLSL uniform ${a.binding} uses ${d}; Shader Definition expects ${s}.`})}return n}function ua(e){const t=e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/.*$/gm,""),r=new Map,n=/\buniform\s+(?:(?:lowp|mediump|highp)\s+)?([A-Za-z_]\w*)\s+([A-Za-z_]\w*)\s*(?:\[[^\]]+\])?\s*;/g;for(const a of t.matchAll(n))r.set(a[2],a[1]);return r}function fa(e,t){const r=t.replace(/^properties\./,"").split(".").filter(Boolean);let n=e.propertiesSchema;for(const a of r){if(n.kind!=="object")return null;const i=n.properties[a];if(!i)return null;n=i}return n}function di(e,t,r={}){const n=er(e);let a=wr(e);const i=[];for(const s of t){const d=ga(s),u=oa(d.binding);if(r.expectedSourceId&&u.sourceId!==r.expectedSourceId)throw new Error(`Runtime light binding source mismatch: ${u.sourceId} !== ${r.expectedSourceId}`);const c=ma(a,u,n);if(!c)throw new Error("Runtime light binding did not match an editor light object.");Sa(c,d.light.type,u),a=Ie(a,c.id,"enabled",d.enabled,r),a=Ie(a,c.id,"light.intensity",d.light.intensity,r),d.light.diffuseColor&&(a=Ie(a,c.id,"light.diffuseColor",d.light.diffuseColor,r)),d.light.type==="hemispheric"?d.light.groundColor&&(a=Ie(a,c.id,"light.groundColor",d.light.groundColor,r)):a=Ie(a,c.id,"light.direction",d.light.direction,r),i.push({id:c.id,...c.guid?{objectGuid:c.guid}:{},lightType:d.light.type})}return{document:a,targets:i}}function ma(e,t,r=er(e)){if(t.objectGuid){const i=e.scene.gameObjects.find(s=>s.guid===t.objectGuid)??null;if(i){if(t.objectId&&i.id!==t.objectId)throw new Error(`Runtime light binding guid/id conflict: ${t.objectGuid} belongs to ${i.id}, not ${t.objectId}.`);return i}}if(!t.objectId)return null;const n=e.scene.gameObjects.find(i=>i.id===t.objectId)??null;if(!n)return null;const a=r.get(n.id);if(t.objectGuid&&a&&a!==t.objectGuid)throw new Error(`Runtime light binding guid conflict for ${n.id}.`);return n}function ga(e){const t=ha(e.enabled,"enabled");return e.light.type==="hemispheric"?{binding:e.binding,enabled:t,light:Ea(e.light)}:{binding:e.binding,enabled:t,light:pa(e.light)}}function Ea(e){if(e.type!=="hemispheric")throw new Error("Runtime light patch must be hemispheric.");return{type:"hemispheric",intensity:tr(e.intensity,"hemispheric.intensity"),...e.diffuseColor?{diffuseColor:nt(e.diffuseColor,"hemispheric.diffuseColor")}:{},...e.groundColor?{groundColor:nt(e.groundColor,"hemispheric.groundColor")}:{}}}function pa(e){if(e.type!=="directional")throw new Error("Runtime light patch must be directional.");return{type:"directional",intensity:tr(e.intensity,"directional.intensity"),direction:Mr(ba(e.direction,"directional.direction")),...e.diffuseColor?{diffuseColor:nt(e.diffuseColor,"directional.diffuseColor")}:{}}}function Ie(e,t,r,n,a){return a.patchLightField?a.patchLightField(e,t,r,n):Dr(e,t,r,n,a.fieldMutation)}function Sa(e,t,r){if(!_r(e))throw new Error(`Runtime light binding target is not a light object: ${e.id}`);if(!e.light)throw new Error(`Runtime light binding target is missing light config: ${e.id}`);if(e.light.type!==t)throw new Error(`Runtime light binding type mismatch for ${e.id}: ${e.light.type} !== ${t}`);if(r.lightType&&r.lightType!==t)throw new Error(`Runtime light binding metadata type mismatch: ${r.lightType} !== ${t}`)}function er(e){const t=new Map;for(const r of e.scene.gameObjects){const n=ya(r.guid);n&&t.set(r.id,n)}return t}function ha(e,t){if(typeof e!="boolean")throw new Error(`Runtime light ${t} must be a boolean.`);return e}function tr(e,t){if(typeof e!="number"||!Number.isFinite(e)||e<0)throw new Error(`Runtime light ${t} must be a non-negative finite number.`);return e}function nt(e,t){return{r:he(e.r,`${t}.r`),g:he(e.g,`${t}.g`),b:he(e.b,`${t}.b`)}}function ba(e,t){return{x:he(e.x,`${t}.x`),y:he(e.y,`${t}.y`),z:he(e.z,`${t}.z`)}}function he(e,t){if(typeof e!="number"||!Number.isFinite(e))throw new Error(`Runtime light ${t} must be a finite number.`);return e}function ya(e){return typeof e=="string"&&e.trim()?e.trim():null}function li(e={}){const t=e.ttlMs??3e4,r=e.now??(()=>Date.now()),n=new Map;return{remember(a){const i=Kt(a);for(const s of Cr(a)){const d=Lt(s);if(d.length===0)continue;const u={point:i??void 0,asset:s,timestamp:r()};for(const c of d)n.set(c,u)}Xe(n,t,r())},normalize(a){Xe(n,t,r());const i=qt(a);if(!i)return a;const s=Lt(i),d=s.map(u=>n.get(u)).find(u=>!!u)??null;for(const u of s)n.delete(u);return Pa(a,d)},clearExpired(){Xe(n,t,r())}}}function Pa(e,t){const r=qt(e);if(!r)return e;const n=t?.asset??{},a={...n,...r,...e},i=G(e.assetName)??G(r.assetName)??G(r.name)??G(n.assetName)??G(n.name),s=G(e.assetPath)??G(r.assetPath)??G(r.path)??G(n.assetPath)??G(n.path),d=G(e.assetUrl)??G(r.assetUrl)??G(r.url)??G(n.assetUrl)??G(n.url);return{...a,...i?{assetName:i}:{},...s?{assetPath:s}:{},...d?{assetUrl:d}:{},...t?.point&&!Kt(a)?{point:t.point}:{}}}function Xe(e,t,r){for(const[n,a]of e)r-a.timestamp>t&&e.delete(n)}function Lt(e){return[G(e.id),G(e.platformAssetId),G(e.assetId)].filter((t,r,n)=>!!t&&n.indexOf(t)===r)}function G(e){return typeof e=="string"&&e.trim()?e.trim():void 0}class Ia extends Error{constructor(t){super(t),this.name="PlayableEditorEntryReloadRequiredError"}}function Aa(e){const t=e.now??(()=>Date.now()),r=new AbortController,n=new Set;let a=xt({phase:"idle",attempt:0,phaseStartedAtMs:t(),phaseDurationsMs:{},failure:null}),i=null,s=null,d=null,u=!1;const c=m=>{try{e.reportListenerError?.(m)}catch{}},h=(m,A={})=>{const b=t(),y={...a.phaseDurationsMs,[a.phase]:Math.max(0,b-a.phaseStartedAtMs)};a=xt({phase:m,attempt:A.attempt??a.attempt,phaseStartedAtMs:b,phaseDurationsMs:y,failure:A.failure===void 0?null:A.failure});for(const N of[...n])try{N(a)}catch(L){c(L)}return a},g=(m,A,b)=>{try{e.reportFailure?.(Object.freeze({failure:m,cause:A,rollbackCause:b}))}catch(y){c(y)}},M=()=>{if(u||r.signal.aborted)throw it()},I=m=>{if(u||a.phase==="disposed")return Promise.reject(it());if(a.phase==="ready"||a.phase==="preparing"||a.phase==="committing"||a.phase==="editing"||a.phase==="failed"&&a.failure?.phase!=="warmup")return Promise.resolve();if(i)return i;const A=Promise.resolve().then(async()=>{try{h("warming",m===void 0?{}:{attempt:m}),M(),await e.backend.warmup?.(r.signal),M(),h("ready")}catch(b){if(u||r.signal.aborted)throw b;const y=Re("warmup-failed","warmup",b,!0);throw h("failed",{failure:y}),g(y,b),b}});return i=A,A.finally(()=>{i===A&&(i=null)}).catch(()=>{}),A},O=async()=>{if(u||a.phase==="disposed")return ge(a.attempt);if(a.phase==="editing")return Object.freeze({ok:!0,attempt:a.attempt});if(a.phase==="failed"&&a.failure&&!a.failure.recoverable)return Object.freeze({ok:!1,attempt:a.attempt,failure:a.failure});const m=a.attempt+1;try{await I(m)}catch(b){if(u||r.signal.aborted)return ge(m);const y=a.failure??Re("warmup-failed","warmup",b,!0);return Object.freeze({ok:!1,attempt:m,failure:y})}if(u)return ge(m);h("preparing",{attempt:m});let A;try{A=await e.backend.prepare({signal:r.signal}),M()}catch(b){if(u||r.signal.aborted)return ge(m);const y=Re("prepare-failed","prepare",b,!0);return h("failed",{attempt:m,failure:y}),g(y,b),Object.freeze({ok:!1,attempt:m,failure:y})}h("committing",{attempt:m});try{return await e.backend.commit(A,{signal:r.signal}),M(),h("editing",{attempt:m}),Object.freeze({ok:!0,attempt:m})}catch(b){h("rolling-back",{attempt:m});try{await e.backend.rollback(A,b)}catch(N){if(u&&Ot(b)&&Ot(N))return ge(m);const L=ze("commit-failed","commit",b),x=ze("rollback-failed","rollback",N),F=Ue({...x,recoverable:!1,primary:L,rollback:x});return u||h("failed",{attempt:m,failure:F}),g(F,b,N),Object.freeze({ok:!1,attempt:m,failure:F})}if(u||r.signal.aborted)return ge(m);const y=Re("commit-failed","commit",b,!0);return h("failed",{attempt:m,failure:y}),g(y,b),Object.freeze({ok:!1,attempt:m,failure:y})}},v=()=>{if(s)return s;const m=O();return s=m,m.finally(()=>{s===m&&(s=null)}).catch(()=>{}),m};return Object.freeze({start:()=>I(),enter:v,retry(){const m=a.failure;return a.phase!=="failed"||!m||m.recoverable?v():Promise.resolve(Object.freeze({ok:!1,attempt:a.attempt,failure:m}))},reset(){if(u||a.phase==="disposed")throw new Error("Disposed editor entry controller cannot be reset.");if(i||s)throw new Error("Editor entry controller cannot be reset during an active operation.");if(a.phase==="failed"&&a.failure&&!a.failure.recoverable)throw new Error("Non-recoverable editor entry failure cannot be reset. Refresh the page.");(a.phase!=="idle"||a.attempt!==0||a.failure)&&h("idle",{attempt:0})},getState:()=>a,subscribe(m){if(u)return()=>{};n.add(m);try{m(a)}catch(A){c(A)}return()=>{n.delete(m)}},dispose(){if(d)return d;u=!0,r.abort();const m=(async()=>{const A=[s,i].filter((b,y,N)=>b!==null&&N.indexOf(b)===y);await Promise.allSettled(A);try{await e.backend.dispose()}finally{a.phase!=="disposed"&&h("disposed"),n.clear()}})();return d=m,m.catch(()=>{d===m&&(d=null)}),m}})}function Re(e,t,r,n){return Ta(r)?Ue({...ze("reload-required","runtime",r),recoverable:!1}):Ue({...ze(e,t,r),recoverable:n})}function Ta(e){return e instanceof Error&&e.name==="PlayableEditorEntryReloadRequiredError"}function ze(e,t,r){return Object.freeze({code:e,phase:t,message:Ra(r)})}function Ue(e){return Object.freeze({...e,primary:e.primary?Object.freeze({...e.primary}):void 0,rollback:e.rollback?Object.freeze({...e.rollback}):void 0})}function xt(e){return Object.freeze({...e,phaseDurationsMs:Object.freeze({...e.phaseDurationsMs}),failure:e.failure?Ue(e.failure):null})}function Ra(e){return e instanceof Error&&e.message.trim()?e.message:typeof e=="string"&&e.trim()?e:"Unknown editor entry failure."}function Ot(e){return e instanceof Error&&e.name==="AbortError"}function it(){const e=new Error("Editor entry was disposed.");return e.name="AbortError",e}function ge(e){return Object.freeze({ok:!1,attempt:e,failure:Re("disposed","dispose",it(),!1)})}function ui(e){return vr({...e,includeCompatibilityAliases:!0,registry:{defineCapability(t){const r=Lr(t.descriptor);if(r==="scene.objects.create")return()=>{};const n=r===Wt?_a():Ma(r,wa(r));return e.host.registerCommand({manifest:n,...t.available?{available:t.available}:{},...t.expectedRevisionPolicy?{expectedRevisionPolicy:t.expectedRevisionPolicy}:{},handler:(a,i)=>t.execute(a,{signal:i.signal,...i.traceId?{traceId:i.traceId}:{},principal:i.principal,sessionId:i.sessionId,expectedRevision:i.expectedRevision,session:i.session,dispatch:i.dispatch,captureAuthoringPatch:i.captureAuthoringPatch})})}}})}function wa(e){switch(e){case"object.resolve":case"transform.move":case"transform.set":return{activeId:"objectId"};case"object.delete":return{selectedIds:"objectIds"};default:return}}function Ma(e,t){const r=xr[e],n=Nr[e],a=Or[e];if(!r)throw new Error(`Built-in Editor command metadata is missing: ${e}`);return{schemaVersion:Xt,id:e,version:1,title:r.title,...It[e]?{description:It[e]}:{},target:r.target,access:r.access,stability:r.stability,inputSchema:n.inputSchema,outputSchema:n.outputSchema,effects:{persistence:r.access==="write"?"authoring":"none",undoable:r.access==="write",idempotent:r.access==="read"},...r.target==="authoring"&&r.access==="write"?{transaction:{compatible:!0,sideEffects:"authoring",phase:"mutation"}}:{},presentation:{category:r.category,inputMode:Da(n.inputSchema)?"schema-form":"none",...a?.aliases?{aliases:a.aliases}:{},...a?.keywords?{keywords:a.keywords}:{},...a?.examples?{examples:a.examples}:{},...a?.shortcut?{shortcut:a.shortcut}:{},...a?.menu?{menu:a.menu}:{},...t?{selectionBinding:t}:{}}}}function _a(){return{schemaVersion:Xt,id:Wt,version:1,title:"Create object from feature",description:"Creates one Scene object from an authoritative registered feature preset.",target:"authoring",access:"write",stability:"experimental",inputSchema:{type:"object",required:["featureId"],properties:{featureId:{type:"string",minLength:1}},additionalProperties:!1},outputSchema:{type:"object",required:["createdId","selection"],properties:{createdId:{type:"string",minLength:1},object:{type:"object"},selection:{type:"object"}},additionalProperties:!1},effects:{persistence:"authoring",undoable:!0,idempotent:!1},transaction:{compatible:!0,sideEffects:"authoring",phase:"mutation"},presentation:{category:"scene",inputMode:"schema-form"}}}function Da(e){const t=e.properties;return!!t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length>0}function fi(e){return{...e,paths:{...e.paths},supportedExtensions:e.supportedExtensions?[...e.supportedExtensions]:void 0,commands:e.commands?{...e.commands}:void 0}}const mi=["model","texture","image","sound"],ct=[".glb",".gltf"],rr=[".png",".jpg",".jpeg",".webp"],Ca=[".env",".hdr",".dds",".ktx",".ktx2"],dt=[...rr,...Ca],lt=[".mp3",".wav",".ogg",".flac",".aac",".m4a"],va=[...ct,...dt,...lt];function La(e){return e.randomUUID?e.randomUUID():ka(e)}function ar(e){return String(e??"").trim().toLowerCase().replace(/-/g,"")}function xa(e,t){const r=ar(t);return`${e==="model"?"asset":e==="texture"?"texture":e==="sound"?"sound":"image"}_${r}`}function gi(e){const a=String(e??"").trim().split(/[^a-zA-Z0-9_$]+/).filter(Boolean).map((i,s)=>s===0?i:`${i.charAt(0).toUpperCase()}${i.slice(1)}`).join("").replace(/[^a-zA-Z0-9_$]/g,"")||"assetUrl";return/^[a-zA-Z_$]/.test(a)?a:`asset${a}`}function Oa(e,t=""){const r=String(e??"").trim().toLowerCase();if(r==="glb"||r==="gltf"||r==="model")return"model";if(r==="groundtexture"||r==="ground-texture"||r==="texture")return"texture";if(r==="ui"||r==="image"||r==="img")return"image";if(r==="audio"||r==="sound")return"sound";const n=Na(t);return ct.includes(n)?"model":lt.includes(n)?"sound":dt.includes(n)?"texture":null}function Na(e){const t=e.split(/[?#]/,1)[0]??"",r=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\")),n=t.slice(r+1),a=n.lastIndexOf(".");return a>=0?n.slice(a).toLowerCase():""}function ka(e){const t=new Uint8Array(16);if(!e.fillRandomBytes)throw new Error("Asset GUID random source must provide randomUUID or fillRandomBytes.");if(e.fillRandomBytes(t),t.every(n=>n===0))throw new Error("Asset GUID random source returned no entropy.");t[6]=t[6]&15|64,t[8]=t[8]&63|128;const r=[...t].map(n=>n.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}function ut(e){let t=String(e??"").trim();const r=t.toLowerCase();for(const n of[...va].sort((a,i)=>i.length-a.length))if(r.endsWith(n)){t=t.slice(0,-n.length);break}return t}function Ei(e,t){return String(e??"").trim()||ut(t)||"Asset"}function pi(e,t){return ut(e||t).trim().toLowerCase().normalize("NFKD").replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"").replace(/_{2,}/g,"_")||null}function Si(e){return e==="model"?ct:e==="sound"?lt:e==="texture"?dt:e==="image"?rr:[]}class fe extends Error{constructor(t,r){super(r),this.code=t,this.name="PlayableEditorManagedAssetError"}}function ja(){const e=globalThis.crypto;return La({...typeof e?.randomUUID=="function"?{randomUUID:()=>e.randomUUID()}:{},fillRandomBytes(t){if(typeof e?.getRandomValues=="function")e.getRandomValues(t);else for(let r=0;r<t.length;r+=1)t[r]=Math.floor(Math.random()*256)}})}function hi(e){return ar(e)}function Ga(e,t){return xa(e,t)}function Nt(e){return ut(e).trim()}function nr(e,t,r){const n=Ua(t.kind,t.assetPath??t.assetName),a=Q(t.guid),i=Q(t.assetId),s=ir(t),d=$a(e,t);if(d&&a&&d.guid&&d.guid!==a)throw new fe(r.errorCodes.assetIdConflict,`Requested guid "${a}" does not match existing asset guid "${d.guid}"`);const u=d?.guid??a??ja(),c=Ga(n,u);if(d?.id&&d.id!==c)throw new fe(r.errorCodes.assetIdConflict,`Asset id "${d.id}" does not match guid "${u}" (expected "${c}")`);if(i&&i!==c)throw new fe(r.errorCodes.assetIdConflict,`Project asset id "${i}" does not match guid "${u}" (expected "${c}")`);const h=e.assets.find(g=>g.id===c&&g.guid&&g.guid!==u);if(h)throw new fe(r.errorCodes.assetIdConflict,`Asset id "${c}" already points to guid "${h.guid}"`);return{guid:u,assetId:c,kind:n,...s?{external:s}:d?.external?{external:d.external}:{}}}function Fa(e){if(typeof e=="number"&&Number.isFinite(e)&&e>0)return e;if(!e||typeof e!="object")return;const t=e,r=Je(t.x),n=Je(t.y),a=Je(t.z);if(!(r==null||n==null||a==null||r<=0||n<=0||a<=0))return{x:r,y:n,z:a}}function ot(e,t,r){const n=nr(e,t,r),a=t.displayName?.trim()||Nt(t.assetName)||Nt(t.assetPath?.split("/").pop())||"Imported Asset",i=t.category?.trim(),s=Ha(t.materialMode),d=Va(t.warmupCount),u=Fa(t.defaultScale??t.scale),c=Ya(t.metadata);return{...n,displayName:a,...i?{category:i}:{},...s?{materialMode:s}:{},...d!=null?{warmupCount:d}:{},...typeof t.singleton=="boolean"?{singleton:t.singleton}:{},...u?{scale:u}:{},...c?{metadata:c}:{}}}function st(e,t){if(e.kind==="model")return{id:e.assetId,guid:e.guid,type:"glb",displayName:e.displayName,...e.category?{category:e.category}:{},...e.materialMode?{materialMode:e.materialMode}:{},...e.warmupCount!=null?{warmupCount:e.warmupCount}:{},...typeof e.singleton=="boolean"?{singleton:e.singleton}:{},...e.scale?{defaults:{transform:{scale:e.scale}}}:{},...e.external?{external:e.external}:{},metadata:{...e.metadata??{},[t.metadata.key]:t.metadata.value}}}function Ba(e,t,r){const n=t.assetName||t.assetPath?.split("/").pop()||"imported_asset.glb",a=ot(e,{...t,assetName:n},r),i=t.requestId,s=t.payloadPath??t.createPayloadPath?.({...i?{requestId:i}:{},guid:a.guid,assetId:a.assetId,kind:a.kind})??`/tmp/playable-editor-asset-${i??a.assetId}.json`,d=st(a,r),u=t.registerCommand??"npm run asset:register",c={...t.assetPath?{sourcePath:t.assetPath,assetPath:t.assetPath}:{},...t.assetUrl?{assetUrl:t.assetUrl}:{},guid:a.guid,projectAssetId:a.assetId,assetType:a.kind,assetName:n,displayName:a.displayName,...a.category?{category:a.category}:{},...a.materialMode?{materialMode:a.materialMode}:{},...a.warmupCount!=null?{warmupCount:a.warmupCount}:{},...typeof a.singleton=="boolean"?{singleton:a.singleton}:{},...a.scale?{scale:a.scale}:{},...a.metadata?{metadata:a.metadata}:{},...a.external?{external:a.external}:{},...a.external?.platformAssetId?{platformAssetId:a.external.platformAssetId}:{}},h=`${u} -- --payload ${s}`;return{...i?{requestId:i}:{},guid:a.guid,assetId:a.assetId,kind:a.kind,displayName:a.displayName,...a.external?{external:a.external}:{},transportPlan:{writes:[{path:s,contentType:"application/json",content:c}],commands:[{cmd:h,cwd:".",timeoutMs:6e4}]},...d?{sceneAsset:d}:{}}}function za(e,t){const r=Q(e.assetId),n=Q(e.guid);if(!r&&!n)throw new fe(t.errorCodes.missingAssetId??"missing_asset_id","Missing assetId or guid for asset unregistration");const a=e.requestId,i=e.payloadPath??e.createPayloadPath?.({...a?{requestId:a}:{},...r?{assetId:r}:{},...n?{guid:n}:{}})??`/tmp/playable-editor-asset-unregister-${a??r??n}.json`,s=e.deleteFile!==!1,d=e.unregisterCommand??"npm run asset:unregister",u={...r?{assetId:r}:{},...n?{guid:n}:{},deleteFile:s},c=`${d} -- --payload ${i}`;return{...a?{requestId:a}:{},...n?{guid:n}:{},assetId:r??"",transportPlan:{writes:[{path:i,contentType:"application/json",content:u}],commands:[{cmd:c,cwd:".",timeoutMs:6e4}]}}}function Q(e){return typeof e=="string"&&e.trim()?e.trim():void 0}function Ua(e,t){return Oa(e,t)??"model"}function ir(e){const t=e.external&&typeof e.external=="object"?e.external:{},r=Q(t.platformAssetId)??Q(e.platformAssetId);let n;if(Object.prototype.hasOwnProperty.call(t,"assetPath")){try{n=kr(t.assetPath)}catch{throw new fe("external_asset_path_must_be_portable","Explicit external.assetPath must be a non-empty portable relative path")}if(!n)throw new fe("external_asset_path_must_be_portable","Explicit external.assetPath must be a non-empty portable relative path")}const a=Q(t.assetUrl)??Q(e.assetUrl);if(!(!r&&!n&&!a))return{...r?{platformAssetId:r}:{},...n?{assetPath:n}:{},...a?{assetUrl:a}:{}}}function $a(e,t){const r=Q(t.guid),n=Q(t.assetId),a=ir(t);return e.assets.find(i=>!!(r&&i.guid===r||n&&i.id===n||a?.platformAssetId&&i.external?.platformAssetId===a.platformAssetId||a?.assetPath&&i.external?.assetPath===a.assetPath))}function Je(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function Ha(e){return e==="shared"||e==="instance"?e:void 0}function Va(e){return Number.isInteger(e)&&e>=0?e:void 0}function Ya(e){if(!(!e||typeof e!="object"||Array.isArray(e)))return JSON.parse(JSON.stringify(e))}function qa(e){return{resolveAssetIdentity:(t,r,n=e.rules)=>Ae(e,()=>nr(t,r,n)),buildAssetArgs:(t,r,n=e.rules)=>Ae(e,()=>ot(t,r,n)),createSceneAsset:(t,r=e.rules)=>st(t,r),planAssetRegistrationCore:(t,r,n=e.rules)=>Ae(e,()=>Ba(t,Ka(r,e),n)),planAssetUnregistrationCore:(t,r=e.rules)=>Ae(e,()=>za(Wa(t,e),r)),resolveAssetReference:(t,r,n=e.rules)=>{const a=Ae(e,()=>ot(t,r,n)),i=st(a,n);if(!i)throw new Error(`Asset "${a.assetId}" is not a placeable model asset`);return{guid:a.guid,assetId:a.assetId,displayName:a.displayName,asset:i}}}}function Ka(e,t){return{...e,kind:e.kind??e.assetType,createPayloadPath:e.createPayloadPath??(e.payloadPath?void 0:t.createRegistrationPayloadPath)}}function Wa(e,t){return{...e,createPayloadPath:e.createPayloadPath??(e.payloadPath?void 0:t.createUnregistrationPayloadPath)}}function Ae(e,t){try{return t()}catch(r){throw e.wrapError&&e.wrapError(r),r}}function bi(e){const t=qa(e);return{facade:t,planAssetRegistration(r,n){return t.planAssetRegistrationCore(kt(n),r)},planAssetRegistrationWithAssets(r,n){return t.planAssetRegistrationCore({assets:r},n)},planAssetUnregistration(r){return t.planAssetUnregistrationCore(r)},resolveAssetReference(r,n){return t.resolveAssetReference(kt(n),r)}}}function kt(e){return{assets:e.getAssets()}}const Xa=["/__fps_editor_authoring"],Ja=[["manifest","/manifest"],["commit","/commit"],["editor-scene","/editor-scene"],["editor-asset-library","/editor-asset-library"],["project-files","/project-files"],["project-media","/project-media"],["project-file","/project-file"],["asset-import","/asset-import"],["save-editor-scene","/save-editor-scene"]];function Za(e,t={}){const r=new URL(e??"","http://localhost").pathname,n=t.prefixes??Xa,a=Qa(r,n);if(!a)return null;const i=r.slice(a.length)||"/",s=en(i);return s?{route:i,routeName:s,prefix:a}:null}function Qa(e,t){return t.find(r=>e===r||e.startsWith(`${r}/`))??null}function en(e){return Ja.find(([,t])=>e===t)?.[0]??null}function U(e,t){return{statusCode:e,body:t}}function or(e){return{statusCode:e,body:null}}async function yi(e,t){const r=Za(e.url);if(!r)return null;const n=(e.method??"GET").toUpperCase();if(n==="OPTIONS")return or(204);try{if(tn(r.routeName)){if(n!=="GET")return U(405,{ok:!1,error:"method_not_allowed"});if(r.routeName==="project-file"){const i=new URL(e.url??"","http://localhost").searchParams.get("path")?.trim()??"";if(!i)return U(400,{ok:!1,error:"missing_file_path"});const s=await t.loadProjectFile?.({path:i,route:r});return U(200,s??{ok:!1,error:"not_found"})}return U(200,await rn(r,t))}if(n!=="POST")return U(405,{ok:!1,error:"method_not_allowed"});const a=e.body??await t.readBody?.(e,r)??{};return await an(r,a,t)}catch(a){const i=typeof a?.code=="string"?a.code:"authoring_request_failed",s=i==="asset_import_payload_too_large"?413:r.routeName==="save-editor-scene"&&i==="authoring_source_revision_mismatch"?200:r.routeName==="asset-import"?400:500;return U(s,{ok:!1,error:a instanceof Error?a.message:String(a),code:i,details:$e(a?.details)})}}function tn(e){return e==="manifest"||e==="editor-scene"||e==="editor-asset-library"||e==="project-files"||e==="project-file"||e==="project-media"}async function rn(e,t){return e.routeName==="manifest"&&t.loadManifest?t.loadManifest(e):e.routeName==="editor-scene"&&t.loadEditorScene?t.loadEditorScene(e):e.routeName==="editor-asset-library"&&t.loadEditorAssetLibrary?t.loadEditorAssetLibrary(e):e.routeName==="project-files"&&t.loadProjectFiles?t.loadProjectFiles(e):{ok:!1,error:"not_found"}}async function an(e,t,r){if(e.routeName==="asset-import"){const n=jr(t),a=await r.importAsset?.({payload:n,route:e});return U(200,a??{ok:!1,error:"not_found"})}return e.routeName==="save-editor-scene"?nn(e,t,r):e.routeName==="commit"?U(410,await on(e,t,r)):U(404,{ok:!1,error:"not_found"})}async function nn(e,t,r){const n=t.mode==="prepare-platform-save"?"prepare-platform-save":"local-commit-save",a=await r.saveEditorScene?.({body:t,mode:n,rawEditorScene:t.editorScene,route:e});return U(200,a??{ok:!1,error:"not_found"})}async function on(e,t,r){return r.commit?.({body:t,route:e})??{ok:!1,error:"platform_commit_route_disabled",message:"Save through /__fps_editor_authoring/save-editor-scene so scene.main remains the authoring source of truth."}}const le=Gr,X=Fr,Pi=Br;function Me(e){return D(e.requestId)}function sr(e){return{requestId:Me(e),assetName:D(e.assetName),assetPath:D(e.assetPath),assetUrl:D(e.assetUrl),guid:D(e.guid),assetId:D(e.projectAssetId),kind:D(e.assetType)??D(e.kind),platformAssetId:D(e.platformAssetId)??D(e.assetId),displayName:D(e.displayName),category:D(e.category),materialMode:e.materialMode,scale:e.scale,defaultScale:e.defaultScale,metadata:$e(e.metadata),payloadPath:D(e.payloadPath)}}function sn(e){return{requestId:Me(e),guid:D(e.guid),assetId:D(e.projectAssetId)??D(e.assetId),payloadPath:D(e.payloadPath),deleteFile:typeof e.deleteFile=="boolean"?e.deleteFile:void 0}}function cn(e){const t=D(e.assetName)??"",r=D(e.assetPath);return{...sr(e),kind:D(e.assetType)??D(e.kind)??"model",rawAssetName:t,inferredAssetPath:r,inferredAssetUrl:D(e.assetUrl)??(r?`/@fs${r}`:""),instanceScale:e.instanceScale,dropSurfaceName:D(e.dropSurfaceName),clientX:typeof e.clientX=="number"&&Number.isFinite(e.clientX)?e.clientX:void 0,clientY:typeof e.clientY=="number"&&Number.isFinite(e.clientY)?e.clientY:void 0,position:e.position}}function dn(e){const t=un(e);return{requestId:Me(e),id:D(e.id),name:D(e.name),kind:e.kind,parentId:D(e.parentId),enabled:typeof e.enabled=="boolean"?e.enabled:void 0,transform:e.transform,instance:e.instance,primitive:e.primitive,transformType:e.transformType,...t?{customTransformData:t}:{},camera:e.camera,light:e.light}}function ln(e){return{requestId:Me(e),nodeId:D(e.nodeId)??"",patches:Array.isArray(e.patches)?e.patches:D(e.path)?[{path:e.path,value:e.value}]:[]}}function jt(e){return{requestId:Me(e),nodeId:D(e.nodeId)}}function D(e){if(typeof e!="string")return;const t=e.trim();return t||void 0}function un(e){const t=new Set(["requestId","id","name","kind","parentId","enabled","transform","instance","primitive","transformType","customTransformData","camera","light"]),r=$e(e.customTransformData),n=r?{...r}:{};for(const[a,i]of Object.entries(e))t.has(a)||(n[a]=i);return Object.keys(n).length>0?n:void 0}function fn(e,t,r={}){const n=r.readProjectError?.(e);if(n)return n;const a=e,i=At(a?.code)??t,s=e instanceof Error?e.message:At(a?.message)??String(e),d=$e(a?.details);return{code:i,error:s,...d?{details:d}:{}}}function mn(e,t={}){const r=new Set(t.omitKeys??["rootNode"]),n={...e};for(const a of r)delete n[a];return n}function gn(e){return{async handleCommand(t,r,n){const a=n;if(t===le.ASSET_REGISTRATION_PLAN){const i=sr(r);return await xe({eventName:X.ASSET_REGISTRATION_PLANNED,failedEventName:X.ASSET_REGISTRATION_FAILED,requestId:i.requestId,fallbackCode:e.errorCodes.assetRegistrationPlanFailed,emitEvent:e.emitEvent,createCommandError:e.handlers.createCommandError,run:()=>e.handlers.assetRegistrationPlan(i,a)}),!0}if(t===le.ASSET_UNREGISTRATION_PLAN){const i=sn(r);return await xe({eventName:X.ASSET_UNREGISTRATION_PLANNED,failedEventName:X.ASSET_UNREGISTRATION_FAILED,requestId:i.requestId,fallbackCode:e.errorCodes.assetUnregistrationPlanFailed,emitEvent:e.emitEvent,createCommandError:e.handlers.createCommandError,run:()=>e.handlers.assetUnregistrationPlan(i,a)}),!0}if(t===le.ASSET_IMPORT){const i=cn(r),s=await e.handlers.assetImport(i,a);return s&&e.emitEvent(X.ASSET_IMPORT_RESULT,s),!0}if(t===le.ASSET_REMOVE){const i=jt(r),s=await e.handlers.assetRemove(i,a);return s&&e.emitEvent(X.ASSET_REMOVE_RESULT,s),!0}if(t===le.SCENE_NODE_CREATE){const i=dn(r);return await xe({eventName:X.SCENE_NODE_CREATE_RESULT,failedEventName:X.SCENE_NODE_CREATE_RESULT,requestId:i.requestId,fallbackCode:e.errorCodes.sceneNodeCreateFailed,emitEvent:e.emitEvent,createCommandError:e.handlers.createCommandError,run:()=>e.handlers.sceneNodeCreate(i,a)}),!0}if(t===le.SCENE_NODE_PATCH){const i=ln(r);return await xe({eventName:X.SCENE_NODE_PATCH_RESULT,failedEventName:X.SCENE_NODE_PATCH_RESULT,requestId:i.requestId,fallbackCode:e.errorCodes.sceneNodePatchFailed,failureExtra:{nodeId:i.nodeId},emitEvent:e.emitEvent,createCommandError:e.handlers.createCommandError,run:()=>e.handlers.sceneNodePatch(i,a)}),!0}if(t===le.SCENE_NODE_REMOVE){const i=jt(r),s=await e.handlers.sceneNodeRemove(i,a);return s&&e.emitEvent(X.SCENE_NODE_REMOVE_RESULT,s),!0}return!1}}}async function xe(e){try{const t=await e.run();t&&e.emitEvent(e.eventName,t)}catch(t){e.emitEvent(e.failedEventName,{requestId:e.requestId,ok:!1,...e.failureExtra,...e.createCommandError(t,e.fallbackCode)})}}function Ii(e){const t=e.notifyDocumentStatus??(()=>{}),r=e.createCommandError??((n,a)=>fn(n,a));return gn({emitEvent:e.emitEvent,errorCodes:e.errorCodes,handlers:{createCommandError:r,assetRegistrationPlan:(n,a)=>e.planAssetRegistration(n,a),assetUnregistrationPlan:(n,a)=>e.planAssetUnregistration(n,a),assetImport:(n,a)=>En(n,a,e,t),assetRemove:(n,a)=>pn(n,a,e,t),sceneNodeCreate:async(n,a)=>{e.ensureDocumentLoaded();const i=await e.sceneNodeCreate(n,a);return i.rootNode&&e.selectRuntimeNode?.(i.rootNode),t(),{requestId:n.requestId,ok:!0,nodeId:i.node.id,node:i.node}},sceneNodePatch:async(n,a)=>{e.ensureDocumentLoaded();const i=await e.sceneNodePatch(n,a);return i.rootNode&&e.selectRuntimeNode?.(i.rootNode),t(),{requestId:n.requestId,ok:!0,nodeId:i.node.id,node:i.node}},sceneNodeRemove:async(n,a)=>{e.ensureDocumentLoaded();const i=await e.sceneNodeRemove(n,a);return i&&(e.selectRuntimeNode?.(null),t()),{requestId:n.requestId,ok:!!i,nodeId:n.nodeId,...i?{removedNodeId:i.node.id}:{code:e.errorCodes.nodeNotFound,error:e.errorCodes.nodeNotFound}}}}})}async function En(e,t,r,n){if(r.isBridgeActive?.())return null;r.ensureDocumentLoaded();const a=Sn(e.inferredAssetUrl)||(e.inferredAssetPath?`/@fs${e.inferredAssetPath}`:""),i=await r.planAssetRegistration({...e,assetName:e.rawAssetName||void 0,assetPath:e.inferredAssetPath,assetUrl:a},t);let s=null;e.inferredAssetPath&&(s=await(r.importAsset??(h=>zr(h)))({assetPath:e.inferredAssetPath,...i.assetId?{projectAssetId:i.assetId}:{},...i.guid?{guid:i.guid}:{},...e.rawAssetName?{assetName:e.rawAssetName}:{},...e.displayName?{displayName:e.displayName}:{},...e.category?{category:e.category}:{},...e.metadata?{metadata:e.metadata}:{},...i.external?{external:i.external}:{}},t));const d=Ur({result:s,fallback:{guid:i.guid,assetId:i.assetId,assetUrl:a,external:i.external}}),u=await r.createAssetInstance({requestId:e.requestId,guid:d.guid,assetId:d.assetId,external:d.external,assetUrl:d.assetUrl,assetName:e.rawAssetName||void 0,displayName:e.displayName,category:e.category,materialMode:e.materialMode,scale:e.scale,defaultScale:e.defaultScale,instanceScale:e.instanceScale,metadata:e.metadata,dropSurfaceName:e.dropSurfaceName,clientX:e.clientX,clientY:e.clientY,position:e.position},t);return u.ok&&(u.rootNode&&r.selectRuntimeNode?.(u.rootNode),n()),mn(u)}async function pn(e,t,r,n){r.ensureDocumentLoaded();const a=e.nodeId?await r.removeAssetInstance(e,t):{ok:!1,assetId:"",code:r.errorCodes.missingNodeId,error:r.errorCodes.missingNodeId};return a.ok&&(r.selectRuntimeNode?.(null),n()),{requestId:e.requestId,...a}}function Sn(e){return typeof e=="string"&&e.trim()?e.trim():void 0}const Te="public-export",w="bundled-alias",ue="external-peer",J="default",C="exclude",Se="prebundle",hn=[["@fps-games/editor","packages/editor/src/index.ts",null,Te,J],["@fps-games/editor/vite","packages/editor/src/vite.ts",null,Te,J],["@fps-games/engine",null,null,ue,J],["@fps-games/engine/config",null,null,ue,J],["@fps-games/engine/rendering",null,null,ue,J],["@fps-games/engine/babylon",null,null,ue,Se],["@fps-games/editor-tooling","packages/editor-tooling/src/index.ts","@fps-games/editor-tooling/dist/index.js",w,C],["@fps-games/editor-tooling/node","packages/editor-tooling/src/package-metadata-node.ts","@fps-games/editor-tooling/dist/package-metadata-node.js",w,C],["@fps-games/editor-tooling/vite","packages/editor-tooling/src/vite.ts","@fps-games/editor-tooling/dist/vite.js",w,C],["@fps-games/plugin-sdk",null,null,ue,J],["@fps-games/plugin-sdk/host",null,null,ue,J],["@fps-games/plugin-sdk/runtime",null,null,ue,J],["@fps-games/plugin-hierarchy","packages/plugin-hierarchy/src/reference.ts","@fps-games/plugin-hierarchy/dist/reference.js",w,Se],["@fps-games/plugin-hierarchy/kernel","packages/plugin-hierarchy/src/kernel.ts","@fps-games/plugin-hierarchy/dist/kernel.js",w,C],["@fps-games/plugin-hierarchy/integration","packages/plugin-hierarchy/src/integration.ts","@fps-games/plugin-hierarchy/dist/integration.js",w,C],["@fps-games/plugin-hierarchy/editor","packages/plugin-hierarchy/src/editor.ts","@fps-games/plugin-hierarchy/dist/editor.js",w,Se],["@fps-games/editor/playable-sdk","packages/editor/src/playable-sdk.ts",null,Te,J],["@fps-games/editor/playable-sdk/upgrade-doctor","packages/editor/src/playable-sdk-upgrade-doctor.ts",null,Te,J],["@fps-games/editor/playable-sdk/vite","packages/editor/src/playable-sdk-vite.ts",null,Te,J],["@fps-games/editor-playable-sdk","packages/editor-playable-sdk/src/index.ts","@fps-games/editor-playable-sdk/dist/index.js",w,C],["@fps-games/editor-playable-sdk/internal/authoring-queries","packages/editor-playable-sdk/src/internal/authoring-queries.ts","@fps-games/editor-playable-sdk/dist/internal/authoring-queries.js",w,C],["@fps-games/editor-playable-sdk/internal/local-harness","packages/editor-playable-sdk/src/internal/local-harness.ts","@fps-games/editor-playable-sdk/dist/internal/local-harness.js",w,C],["@fps-games/editor-playable-sdk/upgrade-doctor","packages/editor-playable-sdk/src/upgrade-doctor/index.ts","@fps-games/editor-playable-sdk/dist/upgrade-doctor/index.js",w,C],["@fps-games/editor-playable-sdk/vite","packages/editor-playable-sdk/src/vite/index.ts","@fps-games/editor-playable-sdk/dist/vite/index.js",w,C],["@fps-games/editor-babylon","packages/editor-babylon/src/index.ts","@fps-games/editor-babylon/dist/index.js",w,C],["@fps-games/editor-browser","packages/editor-browser/src/index.ts","@fps-games/editor-browser/dist/index.js",w,C],["@fps-games/editor-browser/plugin-contributions","packages/editor-browser/src/plugin-contributions.ts","@fps-games/editor-browser/dist/plugin-contributions.js",w,C],["@fps-games/editor-browser/runtime-debug","packages/editor-browser/src/runtime-debug.ts","@fps-games/editor-browser/dist/runtime-debug.js",w,C],["@fps-games/editor-core","packages/editor-core/src/index.ts","@fps-games/editor-core/dist/index.js",w,C],["@fps-games/editor-core/plugin-host","packages/editor-core/src/editor-plugin-host.ts","@fps-games/editor-core/dist/editor-plugin-host.js",w,C],["@fps-games/editor-core/lifecycle","packages/editor-core/src/lifecycle.ts","@fps-games/editor-core/dist/lifecycle.js",w,C],["@fps-games/editor-core/events","packages/editor-core/src/events.ts","@fps-games/editor-core/dist/events.js",w,C],["@fps-games/editor-core/document-adapter","packages/editor-core/src/document-adapter.ts","@fps-games/editor-core/dist/document-adapter.js",w,C],["@fps-games/editor-core/diagnostics","packages/editor-core/src/editor-diagnostic-store.ts","@fps-games/editor-core/dist/editor-diagnostic-store.js",w,C],["@fps-games/editor-core/tools","packages/editor-core/src/editor-tools.ts","@fps-games/editor-core/dist/editor-tools.js",w,C],["@fps-games/editor-forge-play","packages/editor-forge-play/src/index.ts","@fps-games/editor-forge-play/dist/index.js",w,C],["@fps-games/editor-protocol","packages/editor-protocol/src/index.ts","@fps-games/editor-protocol/dist/index.js",w,C],["@fps-games/editor-ui","packages/editor-ui/src/index.ts","@fps-games/editor-ui/dist/index.js",w,C],["@babel/parser",null,"@babel/parser/lib/index.js",w,Se],["@playcanvas/observer",null,"@playcanvas/observer/dist/index.mjs",w,C],["@playcanvas/pcui",null,"@playcanvas/pcui/dist/module/src/index.mjs",w,C],["@playcanvas/pcui/styles",null,"@playcanvas/pcui/styles/dist/index.mjs",w,C],["semver",null,"semver/index.js",w,Se]],_e=Object.freeze(hn.map(([e,t,r,n,a])=>Object.freeze({packageId:e,...t?{sourceFile:t}:{},...r?{bundledFile:r,bundledRoot:"editor-node-modules"}:{},resolution:n,optimizer:a,projectAllowlist:!0}))),Ai=Object.freeze(_e.filter(e=>e.projectAllowlist).map(e=>e.packageId)),Ti=Object.freeze(_e.filter(e=>e.resolution===w).map(e=>e.packageId)),Ri=Object.freeze(_e.filter(e=>e.optimizer===Se).map(e=>e.packageId));function bn(e,t={}){const r=t.resolvePath??ft;return{entries:_e.filter(n=>typeof n.sourceFile=="string").map(n=>({packageId:n.packageId,file:r(e,...n.sourceFile.split("/"))}))}}function wi(e,t={}){const r=bn(e,{resolvePath:t.resolvePath}),n=t.relativePath??Pn,a={};for(const i of r.entries){if(i.packageId==="semver")continue;const s=t.pathOverrides?.[i.packageId];a[i.packageId]=s?yn(s):[t.projectRoot?ye(n(t.projectRoot,i.file)):ye(i.file)]}return{paths:a}}function Mi(e,t={}){const r=t.resolvePath??ft,n=r(e,"node_modules","@fps-games","editor");return{editorPackageRoot:n,bundledEditorPackagesRoot:r(n,"node_modules","@fps-games"),bundledEditorNodeModulesRoot:r(n,"node_modules"),editorPackageJsonPath:r(n,"package.json")}}function _i(e){const t=e.resolvePath??ft,r=e.bundledEditorNodeModulesRoot??Gt(e.bundledEditorPackagesRoot),n=e.editorPackageRoot??Gt(r);return{entries:_e.filter(i=>i.resolution===w&&typeof i.bundledFile=="string").map(i=>({packageId:i.packageId,file:t(i.bundledRoot==="editor-package"?n:r,...i.bundledFile.split("/"))}))}}function Di(e,t){return e.entries.filter(r=>!t(r.file)).map(r=>({packageId:r.packageId,file:r.file}))}function Ci(e,t="The @fps-games editor package aliases point to missing files."){return[t,...e.map(r=>`- ${r.packageId}: ${r.file}`)].join(`
|
|
1
|
+
import{go as Yt,Z as yt,Y as br,B as yr,F as Pr,kA as at,kO as Ir,kB as Pt,c0 as Ar,iL as Tr,jV as Rr,fX as wr,ja as Mr,hl as _r,k1 as Dr,lw as qt,lq as Kt,lx as Cr,lS as vr,gL as Lr,a3 as Wt,l as xr,m as Or,o as Nr,E as It,p as Xt,jT as kr,lB as $e,jU as jr,n as Gr,q as Fr,r as Br,lJ as At,g_ as zr,mP as Ur,mF as $r,jO as Hr,aQ as Tt,jy as Rt,nj as wt,mZ as Vr,ge as se,bq as Yr,bp as qr,mQ as Kr}from"./playable-standard-project-X3XQewnw.js";import{C as ji,D as Gi,a as Fi,b as Bi,c as zi,d as Ui,e as $i,f as Hi,g as Vi,h as Yi,i as qi,j as Ki,k as Wi,s as Xi,t as Ji,u as Zi,v as Qi,w as eo,x as to,y as ro,z as ao,A as no,G as io,H as oo,I as so,J as co,K as lo,L as uo,M as fo,N as mo,O as go,P as Eo,Q as po,R as So,S as ho,T as bo,U as yo,V as Po,W as Io,X as Ao,_ as To,$ as Ro,a0 as wo,a1 as Mo,a2 as _o,a4 as Do,a6 as Co,a7 as vo,a8 as Lo,a9 as xo,aa as Oo,ab as No,ac as ko,ad as jo,ae as Go,af as Fo,ag as Bo,ah as zo,ai as Uo,aj as $o,ak as Ho,al as Vo,am as Yo,an as qo,ao as Ko,ap as Wo,aq as Xo,ar as Jo,as as Zo,at as Qo,au as es,av as ts,aw as rs,ax as as,ay as ns,az as is,aA as os,aB as ss,aC as cs,aD as ds,aE as ls,aF as us,aG as fs,aH as ms,aI as gs,aJ as Es,aK as ps,aL as Ss,aM as hs,aN as bs,aO as ys,aP as Ps,aR as Is,aS as As,aT as Ts,aU as Rs,aV as ws,aW as Ms,aX as _s,aY as Ds,aZ as Cs,a_ as vs,a$ as Ls,b0 as xs,b1 as Os,b2 as Ns,b3 as ks,b4 as js,b5 as Gs,b6 as Fs,b7 as Bs,b8 as zs,b9 as Us,ba as $s,bb as Hs,bc as Vs,bd as Ys,be as qs,bf as Ks,bg as Ws,bh as Xs,bi as Js,bj as Zs,bk as Qs,bl as ec,bm as tc,bn as rc,bo as ac,br as nc,bs as ic,bt as oc,bu as sc,bv as cc,bw as dc,bx as lc,by as uc,bz as fc,bA as mc,bB as gc,bC as Ec,bD as pc,bE as Sc,bF as hc,bG as bc,bH as yc,bI as Pc,bJ as Ic,bK as Ac,bL as Tc,bM as Rc,bN as wc,bO as Mc,bP as _c,bQ as Dc,bR as Cc,bS as vc,bT as Lc,bU as xc,bV as Oc,bW as Nc,bX as kc,bY as jc,bZ as Gc,b_ as Fc,b$ as Bc,c1 as zc,c2 as Uc,c3 as $c,c4 as Hc,c5 as Vc,c6 as Yc,c7 as qc,c8 as Kc,c9 as Wc,ca as Xc,cb as Jc,cc as Zc,cd as Qc,ce as ed,cf as td,cg as rd,ch as ad,ci as nd,cj as id,ck as od,cl as sd,cm as cd,cn as dd,co as ld,cp as ud,cq as fd,cr as md,cs as gd,ct as Ed,cu as pd,cv as Sd,cw as hd,cx as bd,cy as yd,cz as Pd,cA as Id,cB as Ad,cC as Td,cD as Rd,cE as wd,cF as Md,cG as _d,cH as Dd,cI as Cd,cJ as vd,cK as Ld,cL as xd,cM as Od,cN as Nd,cO as kd,cP as jd,cQ as Gd,cR as Fd,cS as Bd,cT as zd,cU as Ud,cV as $d,cW as Hd,cX as Vd,cY as Yd,cZ as qd,c_ as Kd,c$ as Wd,d0 as Xd,d1 as Jd,d2 as Zd,d3 as Qd,d4 as el,d5 as tl,d6 as rl,d7 as al,d8 as nl,d9 as il,da as ol,db as sl,dc as cl,dd as dl,de as ll,df as ul,dg as fl,dh as ml,di as gl,dj as El,dk as pl,dl as Sl,dm as hl,dn as bl,dp as yl,dq as Pl,dr as Il,ds as Al,dt as Tl,du as Rl,dv as wl,dw as Ml,dx as _l,dy as Dl,dz as Cl,dA as vl,dB as Ll,dC as xl,dD as Ol,dE as Nl,dF as kl,dG as jl,dH as Gl,dI as Fl,dJ as Bl,dK as zl,dL as Ul,dM as $l,dN as Hl,dO as Vl,dP as Yl,dQ as ql,dR as Kl,dS as Wl,dT as Xl,dU as Jl,dV as Zl,dW as Ql,dX as eu,dY as tu,dZ as ru,d_ as au,d$ as nu,e0 as iu,e1 as ou,e2 as su,e3 as cu,e4 as du,e5 as lu,e6 as uu,e7 as fu,e8 as mu,e9 as gu,ea as Eu,eb as pu,ec as Su,ed as hu,ee as bu,ef as yu,eg as Pu,eh as Iu,ei as Au,ej as Tu,ek as Ru,el as wu,em as Mu,en as _u,eo as Du,ep as Cu,eq as vu,er as Lu,es as xu,et as Ou,eu as Nu,ev as ku,ew as ju,ey as Gu,ez as Fu,eA as Bu,eB as zu,eC as Uu,eD as $u,eE as Hu,eF as Vu,eG as Yu,eH as qu,eI as Ku,eJ as Wu,eK as Xu,eL as Ju,eM as Zu,eN as Qu,eO as ef,eP as tf,eQ as rf,eR as af,eS as nf,eT as of,eU as sf,eV as cf,eW as df,eX as lf,eY as uf,eZ as ff,e_ as mf,e$ as gf,f0 as Ef,f1 as pf,f2 as Sf,f3 as hf,f4 as bf,f5 as yf,f6 as Pf,f7 as If,f8 as Af,f9 as Tf,fa as Rf,fb as wf,fc as Mf,fd as _f,fe as Df,ff as Cf,fg as vf,fh as Lf,fi as xf,fj as Of,fk as Nf,fl as kf,fm as jf,fn as Gf,fo as Ff,fp as Bf,fq as zf,fr as Uf,fs as $f,ft as Hf,fu as Vf,fv as Yf,fw as qf,fx as Kf,fy as Wf,fz as Xf,fA as Jf,fB as Zf,fC as Qf,fD as em,fE as tm,fF as rm,fG as am,fJ as nm,fK as im,fL as om,fM as sm,fN as cm,fO as dm,fP as lm,fQ as um,fR as fm,fS as mm,fT as gm,fU as Em,fV as pm,fW as Sm,fY as hm,fZ as bm,f_ as ym,f$ as Pm,g0 as Im,g1 as Am,g2 as Tm,g3 as Rm,g4 as wm,g5 as Mm,g6 as _m,g7 as Dm,g8 as Cm,g9 as vm,ga as Lm,gb as xm,gc as Om,gd as Nm,gf as km,gg as jm,gh as Gm,gi as Fm,gj as Bm,gk as zm,gl as Um,gm as $m,gn as Hm,gp as Vm,gq as Ym,gr as qm,gs as Km,gt as Wm,gu as Xm,gv as Jm,gw as Zm,gx as Qm,gy as eg,gz as tg,gA as rg,gB as ag,gC as ng,gD as ig,gE as og,gF as sg,gG as cg,gH as dg,gI as lg,gJ as ug,gK as fg,gM as mg,gN as gg,gO as Eg,gP as pg,gQ as Sg,gR as hg,gS as bg,gT as yg,gU as Pg,gV as Ig,gW as Ag,gX as Tg,gY as Rg,gZ as wg,g$ as Mg,h0 as _g,h1 as Dg,h2 as Cg,h3 as vg,h4 as Lg,h5 as xg,h6 as Og,h7 as Ng,h8 as kg,h9 as jg,ha as Gg,hb as Fg,hc as Bg,hd as zg,he as Ug,hf as $g,hg as Hg,hh as Vg,hi as Yg,hj as qg,hk as Kg,hm as Wg,hn as Xg,ho as Jg,hp as Zg,hq as Qg,hr as eE,hs as tE,ht as rE,hu as aE,hv as nE,hw as iE,hx as oE,hy as sE,hz as cE,hA as dE,hB as lE,hC as uE,hD as fE,hE as mE,hF as gE,hG as EE,hH as pE,hI as SE,hJ as hE,hK as bE,hL as yE,hM as PE,hN as IE,hO as AE,hP as TE,hQ as RE,hR as wE,hS as ME,hT as _E,hU as DE,hV as CE,hW as vE,hX as LE,hY as xE,hZ as OE,h_ as NE,i0 as kE,i1 as jE,i2 as GE,i3 as FE,i4 as BE,i5 as zE,i6 as UE,i7 as $E,i8 as HE,i9 as VE,ia as YE,ib as qE,ic as KE,id as WE,ie as XE,ig as JE,ih as ZE,ii as QE,ij as ep,ik as tp,il as rp,im as ap,io as np,ip,iq as op,ir as sp,is as cp,it as dp,iu as lp,iv as up,iw as fp,ix as mp,iy as gp,iz as Ep,iA as pp,iB as Sp,iC as hp,iD as bp,iE as yp,iF as Pp,iG as Ip,iH as Ap,iI as Tp,iJ as Rp,iK as wp,iM as Mp,iN as _p,iO as Dp,iP as Cp,iQ as vp,iR as Lp,iS as xp,iT as Op,iU as Np,iV as kp,iW as jp,iX as Gp,iY as Fp,iZ as Bp,i_ as zp,i$ as Up,j0 as $p,j1 as Hp,j2 as Vp,j3 as Yp,j4 as qp,j5 as Kp,j6 as Wp,j7 as Xp,j8 as Jp,j9 as Zp,jb as Qp,jc as eS,jd as tS,je as rS,jf as aS,jg as nS,jh as iS,ji as oS,jj as sS,jk as cS,jl as dS,jm as lS,jn as uS,jo as fS,jp as mS,jq as gS,jr as ES,js as pS,jt as SS,ju as hS,jv as bS,jw as yS,jx as PS,jz as IS,jA as AS,jB as TS,jC as RS,jD as wS,jE as MS,jF as _S,jG as DS,jH as CS,jI as vS,jJ as LS,jK as xS,jL as OS,jM as NS,jN as kS,jP as jS,jQ as GS,jR as FS,jS as BS,jW as zS,jX as US,jY as $S,jZ as HS,j_ as VS,j$ as YS,k0 as qS,k2 as KS,k3 as WS,k4 as XS,k5 as JS,k6 as ZS,k7 as QS,k8 as eh,k9 as th,ka as rh,kb as ah,kc as nh,kd as ih,ke as oh,kf as sh,kg as ch,kh as dh,ki as lh,kj as uh,kk as fh,kl as mh,km as gh,kn as Eh,ko as ph,kp as Sh,kq as hh,kr as bh,ks as yh,kt as Ph,ku as Ih,kv as Ah,kw as Th,kx as Rh,ky as wh,kz as Mh,kC as _h,kD as Dh,kE as Ch,kF as vh,kG as Lh,kH as xh,kI as Oh,kJ as Nh,kK as kh,kL as jh,kM as Gh,kN as Fh,kP as Bh,kQ as zh,kR as Uh,kS as $h,kT as Hh,kU as Vh,kV as Yh,kW as qh,kX as Kh,kY as Wh,kZ as Xh,k_ as Jh,k$ as Zh,l0 as Qh,l1 as eb,l2 as tb,l3 as rb,l4 as ab,l5 as nb,l6 as ib,l7 as ob,l8 as sb,l9 as cb,la as db,lb,lc as ub,ld as fb,le as mb,lf as gb,lg as Eb,lh as pb,li as Sb,lj as hb,lk as bb,ll as yb,lm as Pb,ln as Ib,lo as Ab,lp as Tb,lr as Rb,ls as wb,lt as Mb,lu as _b,lv as Db,ly as Cb,lz as vb,lA as Lb,lC as xb,lD as Ob,lE as Nb,lF as kb,lG as jb,lH as Gb,lI as Fb,lK as Bb,lL as zb,lM as Ub,lN as $b,lO as Hb,lP as Vb,lQ as Yb,lR as qb,lT as Kb,lU as Wb,lV as Xb,lW as Jb,lX as Zb,lY as Qb,lZ as ey,l_ as ty,l$ as ry,m0 as ay,m1 as ny,m2 as iy,m3 as oy,m4 as sy,m5 as cy,m6 as dy,m7 as ly,m8 as uy,m9 as fy,ma as my,mb as gy,mc as Ey,md as py,me as Sy,mf as hy,mg as by,mh as yy,mi as Py,mj as Iy,mk as Ay,ml as Ty,mm as Ry,mn as wy,mo as My,mp as _y,mq as Dy,mr as Cy,ms as vy,mt as Ly,mu as xy,mv as Oy,mw as Ny,mx as ky,my as jy,mz as Gy,mA as Fy,mB as By,mC as zy,mD as Uy,mE as $y,mG as Hy,mH as Vy,mI as Yy,mJ as qy,mK as Ky,mL as Wy,mM as Xy,mN as Jy,mO as Zy,mR as Qy,mS as eP,mT as tP,mU as rP,mV as aP,mW as nP,mX as iP,mY as oP,m_ as sP,m$ as cP,n0 as dP,n1 as lP,n2 as uP,n3 as fP,n4 as mP,n5 as gP,n6 as EP,n7 as pP,n8 as SP,n9 as hP,na as bP,nb as yP,nc as PP,nd as IP,ne as AP,nf as TP,ng as RP,nh as wP,ni as MP,nk as _P,nl as DP,nm as CP,nn as vP,no as LP,np as xP,nq as OP,nr as NP,ns as kP,nt as jP,nu as GP,nv as FP,nw as BP,nx as zP,ny as UP,nz as $P,nA as HP,nB as VP,nC as YP,nD as qP,nE as KP,nF as WP,nG as XP,nH as JP,nI as ZP,nJ as QP,nK as eI,nL as tI,nM as rI,nN as aI,nO as nI,nP as iI,nQ as oI,nR as sI,nS as cI}from"./playable-standard-project-X3XQewnw.js";import"./hemisphericLight-C4swwL68.js";import"@fps-games/editor-core/plugin-host";function ri(e,t){const r=Yt(e),n=Wr(t),a=r.revision??null;if(!n)return{detected:!0,sourceId:r.sourceId,sourceType:r.sourceType,sourceRevision:a,generatedRevision:null,reason:"missing-generated-from"};const i=typeof n.revision=="number"?n.revision:null;return n.sourceId!==r.sourceId||n.sourceType!==r.sourceType?{detected:!0,sourceId:r.sourceId,sourceType:r.sourceType,sourceRevision:a,generatedRevision:i,reason:"source-mismatch"}:a!==i?{detected:!0,sourceId:r.sourceId,sourceType:r.sourceType,sourceRevision:a,generatedRevision:i,reason:"revision-mismatch"}:{detected:!1,sourceId:r.sourceId,sourceType:r.sourceType,sourceRevision:a,generatedRevision:i}}function Wr(e){if(!e||typeof e!="object")return null;const t=e.meta;if(!t||typeof t!="object")return null;const r=t.generatedFrom;if(!r||typeof r!="object")return null;const n=r.sourceId,a=r.sourceType;return typeof n!="string"||typeof a!="string"?null:{sourceId:n,sourceType:a,revision:typeof r.revision=="number"?r.revision:void 0}}function Xr(e){const{document:t,runtimePatch:r}=e,n=e.getSourceRef?.(t)??Yt(t),a=r.sourceBinding;if(!r.applyable||!a||r.applyTarget!==yt||a.sourceId!==br||a.sourceType!==yt||a.sourceId!==n.sourceId||a.sourceType!==n.sourceType)return null;const i=a.objectId;if(!i||!e.findGameObject(t,i)||e.isRootGameObjectId?.(i))return null;const s=r.after;return Jr(s)?{label:r.label??`Apply runtime transform ${i}`,patch:e.createPatch(i,s)}:null}function ai(e,t){return Xr({document:e,runtimePatch:t,findGameObject:(r,n)=>r.scene.gameObjects.find(a=>a.id===n)??null,isRootGameObjectId:r=>r==="root",createPatch:(r,n)=>({kind:"game-object.transform",targetId:r,transform:n})})}function Jr(e){if(!e||typeof e!="object")return!1;const t=e;return Ke(t.position)&&Ke(t.rotation)&&Ke(t.scale)}function Ke(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.x=="number"&&Number.isFinite(t.x)&&typeof t.y=="number"&&Number.isFinite(t.y)&&typeof t.z=="number"&&Number.isFinite(t.z)}const Jt="fps-editor.lighting-debug.open",Zt="fps-editor.lighting-debug.language",Zr=[{field:"environmentIntensity",textKey:"intensity",tooltipKey:"environmentIntensity",step:.01,min:0},{field:"iblIntensity",textKey:"iblIntensity",tooltipKey:"iblIntensity",step:.01,min:0,max:4},{field:"iblRotationY",textKey:"iblRotationY",tooltipKey:"iblRotationY",step:.01},{field:"directionalIntensity",textKey:"intensity",tooltipKey:"directionalIntensity",step:.01,min:0},{field:"directionalHorizontalAngle",textKey:"horizontalAngle",tooltipKey:"horizontalAngle",step:.01,min:-180,max:180},{field:"directionalElevationAngle",textKey:"elevationAngle",tooltipKey:"elevationAngle",step:.01,min:Pr,max:yr},{field:"shadowStrength",textKey:"shadowStrength",tooltipKey:"shadowStrength",step:.01,min:0,max:1},{field:"shadowSoftness",textKey:"shadowSoftness",tooltipKey:"shadowSoftness",step:.005,min:0,max:1}];function ce(e){const t=Zr.find(r=>r.field===e);if(!t)throw new Error(`Missing lighting number field config: ${e}`);return t}function We(e){const t=e.trim();if(!t||/^[+-]$/.test(t)||t.endsWith(".")||/[eE][+-]?$/.test(t))return null;const r=Number(t);return Number.isFinite(r)?r:null}const Mt={zh:{title:"光照调试",runtime:"运行时",languageButton:"EN",toggleTitle:"打开光照调试面板",environmentSection:"环境光",environmentTextureSection:"环境贴图 IBL",directionalSection:"直射光",shadowSection:"阴影外观",enabled:"启用",intensity:"强度",iblIntensity:"IBL 强度",iblRotationY:"IBL 旋转",skyLightColor:"天空光颜色",groundColor:"地面颜色",horizontalAngle:"水平角",elevationAngle:"高度角",lightColor:"光照颜色",rawDirection:"原始方向",shadowReadout:"阴影",shadowStrength:"阴影强度",shadowSoftness:"轮廓柔和度",shadowMap:"Shadow Map",shadowPlanarFollow:"Planar / 跟随直射光",shadowDynamic:"动态阴影",shadowBlob:"Blob 阴影",shadowStatic:"静态烘焙阴影",shadowNone:"Off",shadowUnknown:"Unknown",reset:"重置参数",save:"保存参数",resetStatus:"已重置为初始运行时光照。",savingStatus:"正在保存光照、IBL 和阴影参数...",savedStatus:"已保存光照、IBL 和阴影参数。",saveFailed:"保存失败",missingBindingStatus:"缺少光源绑定,只能临时预览,不能保存。"},en:{title:"Lighting Debug",runtime:"Runtime",languageButton:"中文",toggleTitle:"Toggle lighting debug panel",environmentSection:"Environment Light",environmentTextureSection:"Environment Texture IBL",directionalSection:"Directional Light",shadowSection:"Shadow Appearance",enabled:"Enabled",intensity:"Intensity",iblIntensity:"IBL Intensity",iblRotationY:"IBL Rotation",skyLightColor:"Sky Light Color",groundColor:"Ground Color",horizontalAngle:"Horizontal Angle",elevationAngle:"Elevation Angle",lightColor:"Light Color",rawDirection:"Raw Direction",shadowReadout:"Shadow",shadowStrength:"Shadow Strength",shadowSoftness:"Edge Softness",shadowMap:"Shadow Map",shadowPlanarFollow:"Planar / Follow Directional Light",shadowDynamic:"Dynamic Shadow",shadowBlob:"Blob Shadow",shadowStatic:"Static Baked Shadow",shadowNone:"Off",shadowUnknown:"Unknown",reset:"Reset",save:"Save Parameters",resetStatus:"Reset to initial runtime lighting.",savingStatus:"Saving lighting, IBL and shadows...",savedStatus:"Saved lighting, IBL and shadows.",saveFailed:"Save failed",missingBindingStatus:"Light binding missing; preview only, saving disabled."}},_t={zh:{languageButton:"切换光照调试面板的显示语言。",toggleTitle:"打开或关闭运行时光照调试面板。",enabled:"启用或禁用对应的运行时光源,保存后写回编辑器场景。",environmentIntensity:"环境光强度,对应运行时环境光 intensity。",iblIntensity:"环境贴图对 PBR 材质的光照贡献强度;实时预览不会重新加载贴图。",iblRotationY:"环境贴图绕 Y 轴的旋转弧度,用于调整环境反射和高光方向。",directionalIntensity:"直射光强度,对应运行时直射光 intensity。",skyLightColor:"环境光来自天空方向的漫反射颜色。",groundColor:"环境光来自地面反射方向的颜色。",horizontalAngle:"直射光在 XZ 平面内的朝向角度,会转换为运行时方向向量。",elevationAngle:"直射光相对地平线的高度角;90 度表示从正上方照下。",lightColor:"直射光漫反射颜色。",rawDirection:"只读方向向量,用于排查运行时转换结果。",shadowReadout:"只读阴影状态;支持宿主提供的运行时阴影模式摘要。",shadowStrength:"控制阴影的可见深浅;1 最深,0 不显示阴影。",shadowSoftness:"控制阴影接收边缘的柔和程度;0 表示硬边。",reset:"恢复为打开运行时时读取到的初始光照、IBL 和阴影参数。",save:"通过编辑器保存链路写回环境光、直射光、IBL 和 Shadow Map 外观参数。"},en:{languageButton:"Switch the lighting debug panel language.",toggleTitle:"Open or close the runtime lighting debug panel.",enabled:"Enable or disable the runtime light and save it back to the editor scene.",environmentIntensity:"Environment intensity. Maps to the runtime environment light intensity.",iblIntensity:"Environment texture contribution to PBR lighting. Live preview does not reload the texture.",iblRotationY:"Environment texture rotation around the Y axis in radians, affecting reflections and highlights.",directionalIntensity:"Directional intensity. Maps to the runtime directional light intensity.",skyLightColor:"Diffuse sky color for the environment light.",groundColor:"Ground bounce color for the environment light.",horizontalAngle:"Directional heading in the XZ plane, converted to a runtime direction vector.",elevationAngle:"Directional elevation above the horizon; 90 degrees points straight down.",lightColor:"Directional diffuse color.",rawDirection:"Read-only direction vector for checking runtime conversion.",shadowReadout:"Read-only shadow status supplied by the host runtime.",shadowStrength:"Visible shadow strength. One is darkest; zero hides the shadow.",shadowSoftness:"Receiver-edge softness. Zero produces a hard edge.",reset:"Restore the lighting, IBL and shadows captured when runtime opened.",save:"Save lighting, IBL and Shadow Map appearance through the editor authoring pipeline."}};function Qr(e){return Mt[e]??Mt.zh}function ea(e){return _t[e]??_t.zh}function ta(e,t){return e==="shadow-map"?t.shadowMap:e==="planar"?t.shadowPlanarFollow:e==="dynamic"?t.shadowDynamic:e==="blob"?t.shadowBlob:e==="static"?t.shadowStatic:e==="none"?t.shadowNone:t.shadowUnknown}function ra(e){try{return e?.localStorage?.getItem(Jt)==="true"}catch{return!1}}function aa(e,t){try{e?.localStorage?.setItem(Jt,String(t))}catch{}}function na(e){try{return e?.localStorage?.getItem(Zt)==="en"?"en":"zh"}catch{return"zh"}}function ia(e,t){try{e?.localStorage?.setItem(Zt,t)}catch{}}function ni(e,t){const r=Dt(Dt(e)?.__fpsEditor),n=Z(r?.sourceId),a=Z(r?.objectGuid),i=Z(r?.objectId),s=Z(r?.propertyPath),d=Z(r?.lightType);return!n||s!=="light"||!a&&!i||t&&d&&d!==t?null:{sourceId:n,propertyPath:"light",...t?{lightType:t}:d?{lightType:d}:{},...a?{objectGuid:a}:{},...i?{objectId:i}:{}}}function oa(e){const t=Z(e.sourceId),r=Z(e.propertyPath),n=Z(e.objectGuid),a=Z(e.objectId),i=Z(e.lightType);if(!t)throw new Error("Runtime light binding is missing sourceId.");if(r!=="light")throw new Error(`Runtime light binding is not for light: ${r??"missing"}`);if(!n&&!a)throw new Error("Runtime light binding is missing objectGuid/objectId.");return{sourceId:t,propertyPath:r,...n?{objectGuid:n}:{},...a?{objectId:a}:{},...i?{lightType:i}:{}}}function Dt(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function Z(e){return typeof e=="string"&&e.trim()?e.trim():null}function de(e){return{environment:{enabled:e.environment.enabled,binding:e.environment.binding?{...e.environment.binding}:null,light:{type:"hemispheric",intensity:e.environment.light.intensity,...e.environment.light.diffuseColor?{diffuseColor:{...e.environment.light.diffuseColor}}:{},...e.environment.light.groundColor?{groundColor:{...e.environment.light.groundColor}}:{}}},...e.environmentTexture?{environmentTexture:{...e.environmentTexture}}:{},directional:{enabled:e.directional.enabled,binding:e.directional.binding?{...e.directional.binding}:null,light:{type:"directional",intensity:e.directional.light.intensity,direction:{...e.directional.light.direction},...e.directional.light.diffuseColor?{diffuseColor:{...e.directional.light.diffuseColor}}:{}}},shadow:{...e.shadow,...e.shadow.shadowMap?{shadowMap:{...e.shadow.shadowMap,lastRefreshReasons:[...e.shadow.shadowMap.lastRefreshReasons],...e.shadow.shadowMap.appearance?{appearance:{...e.shadow.shadowMap.appearance}}:{}}}:{}}}}function Be(e){return!!e.environment.binding&&!!e.directional.binding}function ii(e){return Be(e)?[{binding:e.environment.binding,enabled:e.environment.enabled,light:e.environment.light},{binding:e.directional.binding,enabled:e.directional.enabled,light:e.directional.light}]:[]}function Pe(e,t){switch(t){case"environmentIntensity":return e.environment.light.intensity;case"iblIntensity":return e.environmentTexture?.iblIntensity??0;case"iblRotationY":return e.environmentTexture?.iblRotationY??0;case"directionalIntensity":return e.directional.light.intensity;case"directionalHorizontalAngle":return at(e.directional.light.direction).horizontalAngleDeg;case"directionalElevationAngle":return at(e.directional.light.direction).elevationAngleDeg;case"shadowStrength":return e.shadow.shadowMap?.appearance?.strength??0;case"shadowSoftness":return e.shadow.shadowMap?.appearance?.softness??0}}function Ct(e,t){switch(t){case"environmentDiffuseColor":return e.environment.light.diffuseColor??{r:1,g:1,b:1};case"environmentGroundColor":return e.environment.light.groundColor??{r:.48,g:.52,b:.62};case"directionalDiffuseColor":return e.directional.light.diffuseColor??{r:1,g:1,b:1}}}function sa(e,t,r){if(!Number.isFinite(r))return de(e);const n=de(e);switch(t){case"environmentIntensity":return n.environment.light.intensity=r,n;case"iblIntensity":return n.environmentTexture&&(n.environmentTexture.iblIntensity=r),n;case"iblRotationY":return n.environmentTexture&&(n.environmentTexture.iblRotationY=r),n;case"directionalIntensity":return n.directional.light.intensity=r,n;case"directionalHorizontalAngle":{const a=Pt(e.directional.light.direction);return vt(n,r,a.elevationAngleDeg)}case"directionalElevationAngle":{const a=Pt(e.directional.light.direction);return vt(n,a.horizontalAngleDeg,r)}case"shadowStrength":{const a=n.shadow.shadowMap?.appearance;return a&&(a.strength=r,a.darkness=1-r),n}case"shadowSoftness":return n.shadow.shadowMap?.appearance&&(n.shadow.shadowMap.appearance.softness=r),n}}function ca(e,t,r){const n=de(e);switch(t){case"environmentDiffuseColor":return n.environment.light.diffuseColor={...r},n;case"environmentGroundColor":return n.environment.light.groundColor={...r},n;case"directionalDiffuseColor":return n.directional.light.diffuseColor={...r},n}}function da(e,t,r){const n=de(e);return n[t].enabled=r,n}function vt(e,t,r){const n=Ar(t,r);return la(e,n)}function la(e,t){const r=de(e);return r.directional.light.direction={...t},r.shadow.projectedLengthMultiplier=Ir(t),r}function Qt(e,t){const r=typeof t?.materialAssetId=="string"?t.materialAssetId.trim():"",n=r?e.scene.materialAssets?.find(i=>i.id===r)??null:null,a=Tr(n?.properties,t?.override);return{materialAsset:n,...n?{materialAssetShaderId:n.shaderId}:{},profile:a,...r&&!n?{missingMaterialAssetId:r}:{}}}function oi(e,t){const r=Qt(e,t.overrides?.materialBinding),n={},a=Rr(r.materialAssetShaderId);return a&&(Object.keys(r.profile).length>0?(n.artistMaterialShaderId=a,n.artistMaterialProfile=r.profile):n.artistMaterialShaderId=a),n}function si(e,t){const r={},n=t.overrides?.materialSlotBindings??{};for(const[a,i]of Object.entries(n)){if(!a||!i)continue;const s=Qt(e,i);Object.keys(s.profile).length!==0&&(r[a]=s.profile)}return r}function ci(e,t){const r=ua(t),n=[];for(const a of e.inspector.fields){if(a.control!=="color"||a.updateClass!=="uniform")continue;const i=fa(e,a.schemaPath??a.path);if(i?.kind!=="color")continue;const s=i.channels===4?"vec4":"vec3",d=r.get(a.binding);if(!d){n.push({code:"material.shaderColorBindingMissing",path:a.path,binding:a.binding,expectedType:s,message:`GLSL uniform ${a.binding} is missing; expected ${s}.`});continue}d!==s&&n.push({code:"material.shaderColorBindingTypeMismatch",path:a.path,binding:a.binding,expectedType:s,actualType:d,message:`GLSL uniform ${a.binding} uses ${d}; Shader Definition expects ${s}.`})}return n}function ua(e){const t=e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/.*$/gm,""),r=new Map,n=/\buniform\s+(?:(?:lowp|mediump|highp)\s+)?([A-Za-z_]\w*)\s+([A-Za-z_]\w*)\s*(?:\[[^\]]+\])?\s*;/g;for(const a of t.matchAll(n))r.set(a[2],a[1]);return r}function fa(e,t){const r=t.replace(/^properties\./,"").split(".").filter(Boolean);let n=e.propertiesSchema;for(const a of r){if(n.kind!=="object")return null;const i=n.properties[a];if(!i)return null;n=i}return n}function di(e,t,r={}){const n=er(e);let a=wr(e);const i=[];for(const s of t){const d=ga(s),u=oa(d.binding);if(r.expectedSourceId&&u.sourceId!==r.expectedSourceId)throw new Error(`Runtime light binding source mismatch: ${u.sourceId} !== ${r.expectedSourceId}`);const c=ma(a,u,n);if(!c)throw new Error("Runtime light binding did not match an editor light object.");Sa(c,d.light.type,u),a=Ie(a,c.id,"enabled",d.enabled,r),a=Ie(a,c.id,"light.intensity",d.light.intensity,r),d.light.diffuseColor&&(a=Ie(a,c.id,"light.diffuseColor",d.light.diffuseColor,r)),d.light.type==="hemispheric"?d.light.groundColor&&(a=Ie(a,c.id,"light.groundColor",d.light.groundColor,r)):a=Ie(a,c.id,"light.direction",d.light.direction,r),i.push({id:c.id,...c.guid?{objectGuid:c.guid}:{},lightType:d.light.type})}return{document:a,targets:i}}function ma(e,t,r=er(e)){if(t.objectGuid){const i=e.scene.gameObjects.find(s=>s.guid===t.objectGuid)??null;if(i){if(t.objectId&&i.id!==t.objectId)throw new Error(`Runtime light binding guid/id conflict: ${t.objectGuid} belongs to ${i.id}, not ${t.objectId}.`);return i}}if(!t.objectId)return null;const n=e.scene.gameObjects.find(i=>i.id===t.objectId)??null;if(!n)return null;const a=r.get(n.id);if(t.objectGuid&&a&&a!==t.objectGuid)throw new Error(`Runtime light binding guid conflict for ${n.id}.`);return n}function ga(e){const t=ha(e.enabled,"enabled");return e.light.type==="hemispheric"?{binding:e.binding,enabled:t,light:Ea(e.light)}:{binding:e.binding,enabled:t,light:pa(e.light)}}function Ea(e){if(e.type!=="hemispheric")throw new Error("Runtime light patch must be hemispheric.");return{type:"hemispheric",intensity:tr(e.intensity,"hemispheric.intensity"),...e.diffuseColor?{diffuseColor:nt(e.diffuseColor,"hemispheric.diffuseColor")}:{},...e.groundColor?{groundColor:nt(e.groundColor,"hemispheric.groundColor")}:{}}}function pa(e){if(e.type!=="directional")throw new Error("Runtime light patch must be directional.");return{type:"directional",intensity:tr(e.intensity,"directional.intensity"),direction:Mr(ba(e.direction,"directional.direction")),...e.diffuseColor?{diffuseColor:nt(e.diffuseColor,"directional.diffuseColor")}:{}}}function Ie(e,t,r,n,a){return a.patchLightField?a.patchLightField(e,t,r,n):Dr(e,t,r,n,a.fieldMutation)}function Sa(e,t,r){if(!_r(e))throw new Error(`Runtime light binding target is not a light object: ${e.id}`);if(!e.light)throw new Error(`Runtime light binding target is missing light config: ${e.id}`);if(e.light.type!==t)throw new Error(`Runtime light binding type mismatch for ${e.id}: ${e.light.type} !== ${t}`);if(r.lightType&&r.lightType!==t)throw new Error(`Runtime light binding metadata type mismatch: ${r.lightType} !== ${t}`)}function er(e){const t=new Map;for(const r of e.scene.gameObjects){const n=ya(r.guid);n&&t.set(r.id,n)}return t}function ha(e,t){if(typeof e!="boolean")throw new Error(`Runtime light ${t} must be a boolean.`);return e}function tr(e,t){if(typeof e!="number"||!Number.isFinite(e)||e<0)throw new Error(`Runtime light ${t} must be a non-negative finite number.`);return e}function nt(e,t){return{r:he(e.r,`${t}.r`),g:he(e.g,`${t}.g`),b:he(e.b,`${t}.b`)}}function ba(e,t){return{x:he(e.x,`${t}.x`),y:he(e.y,`${t}.y`),z:he(e.z,`${t}.z`)}}function he(e,t){if(typeof e!="number"||!Number.isFinite(e))throw new Error(`Runtime light ${t} must be a finite number.`);return e}function ya(e){return typeof e=="string"&&e.trim()?e.trim():null}function li(e={}){const t=e.ttlMs??3e4,r=e.now??(()=>Date.now()),n=new Map;return{remember(a){const i=Kt(a);for(const s of Cr(a)){const d=Lt(s);if(d.length===0)continue;const u={point:i??void 0,asset:s,timestamp:r()};for(const c of d)n.set(c,u)}Xe(n,t,r())},normalize(a){Xe(n,t,r());const i=qt(a);if(!i)return a;const s=Lt(i),d=s.map(u=>n.get(u)).find(u=>!!u)??null;for(const u of s)n.delete(u);return Pa(a,d)},clearExpired(){Xe(n,t,r())}}}function Pa(e,t){const r=qt(e);if(!r)return e;const n=t?.asset??{},a={...n,...r,...e},i=G(e.assetName)??G(r.assetName)??G(r.name)??G(n.assetName)??G(n.name),s=G(e.assetPath)??G(r.assetPath)??G(r.path)??G(n.assetPath)??G(n.path),d=G(e.assetUrl)??G(r.assetUrl)??G(r.url)??G(n.assetUrl)??G(n.url);return{...a,...i?{assetName:i}:{},...s?{assetPath:s}:{},...d?{assetUrl:d}:{},...t?.point&&!Kt(a)?{point:t.point}:{}}}function Xe(e,t,r){for(const[n,a]of e)r-a.timestamp>t&&e.delete(n)}function Lt(e){return[G(e.id),G(e.platformAssetId),G(e.assetId)].filter((t,r,n)=>!!t&&n.indexOf(t)===r)}function G(e){return typeof e=="string"&&e.trim()?e.trim():void 0}class Ia extends Error{constructor(t){super(t),this.name="PlayableEditorEntryReloadRequiredError"}}function Aa(e){const t=e.now??(()=>Date.now()),r=new AbortController,n=new Set;let a=xt({phase:"idle",attempt:0,phaseStartedAtMs:t(),phaseDurationsMs:{},failure:null}),i=null,s=null,d=null,u=!1;const c=m=>{try{e.reportListenerError?.(m)}catch{}},h=(m,A={})=>{const b=t(),y={...a.phaseDurationsMs,[a.phase]:Math.max(0,b-a.phaseStartedAtMs)};a=xt({phase:m,attempt:A.attempt??a.attempt,phaseStartedAtMs:b,phaseDurationsMs:y,failure:A.failure===void 0?null:A.failure});for(const N of[...n])try{N(a)}catch(L){c(L)}return a},g=(m,A,b)=>{try{e.reportFailure?.(Object.freeze({failure:m,cause:A,rollbackCause:b}))}catch(y){c(y)}},M=()=>{if(u||r.signal.aborted)throw it()},I=m=>{if(u||a.phase==="disposed")return Promise.reject(it());if(a.phase==="ready"||a.phase==="preparing"||a.phase==="committing"||a.phase==="editing"||a.phase==="failed"&&a.failure?.phase!=="warmup")return Promise.resolve();if(i)return i;const A=Promise.resolve().then(async()=>{try{h("warming",m===void 0?{}:{attempt:m}),M(),await e.backend.warmup?.(r.signal),M(),h("ready")}catch(b){if(u||r.signal.aborted)throw b;const y=Re("warmup-failed","warmup",b,!0);throw h("failed",{failure:y}),g(y,b),b}});return i=A,A.finally(()=>{i===A&&(i=null)}).catch(()=>{}),A},O=async()=>{if(u||a.phase==="disposed")return ge(a.attempt);if(a.phase==="editing")return Object.freeze({ok:!0,attempt:a.attempt});if(a.phase==="failed"&&a.failure&&!a.failure.recoverable)return Object.freeze({ok:!1,attempt:a.attempt,failure:a.failure});const m=a.attempt+1;try{await I(m)}catch(b){if(u||r.signal.aborted)return ge(m);const y=a.failure??Re("warmup-failed","warmup",b,!0);return Object.freeze({ok:!1,attempt:m,failure:y})}if(u)return ge(m);h("preparing",{attempt:m});let A;try{A=await e.backend.prepare({signal:r.signal}),M()}catch(b){if(u||r.signal.aborted)return ge(m);const y=Re("prepare-failed","prepare",b,!0);return h("failed",{attempt:m,failure:y}),g(y,b),Object.freeze({ok:!1,attempt:m,failure:y})}h("committing",{attempt:m});try{return await e.backend.commit(A,{signal:r.signal}),M(),h("editing",{attempt:m}),Object.freeze({ok:!0,attempt:m})}catch(b){h("rolling-back",{attempt:m});try{await e.backend.rollback(A,b)}catch(N){if(u&&Ot(b)&&Ot(N))return ge(m);const L=ze("commit-failed","commit",b),x=ze("rollback-failed","rollback",N),F=Ue({...x,recoverable:!1,primary:L,rollback:x});return u||h("failed",{attempt:m,failure:F}),g(F,b,N),Object.freeze({ok:!1,attempt:m,failure:F})}if(u||r.signal.aborted)return ge(m);const y=Re("commit-failed","commit",b,!0);return h("failed",{attempt:m,failure:y}),g(y,b),Object.freeze({ok:!1,attempt:m,failure:y})}},v=()=>{if(s)return s;const m=O();return s=m,m.finally(()=>{s===m&&(s=null)}).catch(()=>{}),m};return Object.freeze({start:()=>I(),enter:v,retry(){const m=a.failure;return a.phase!=="failed"||!m||m.recoverable?v():Promise.resolve(Object.freeze({ok:!1,attempt:a.attempt,failure:m}))},reset(){if(u||a.phase==="disposed")throw new Error("Disposed editor entry controller cannot be reset.");if(i||s)throw new Error("Editor entry controller cannot be reset during an active operation.");if(a.phase==="failed"&&a.failure&&!a.failure.recoverable)throw new Error("Non-recoverable editor entry failure cannot be reset. Refresh the page.");(a.phase!=="idle"||a.attempt!==0||a.failure)&&h("idle",{attempt:0})},getState:()=>a,subscribe(m){if(u)return()=>{};n.add(m);try{m(a)}catch(A){c(A)}return()=>{n.delete(m)}},dispose(){if(d)return d;u=!0,r.abort();const m=(async()=>{const A=[s,i].filter((b,y,N)=>b!==null&&N.indexOf(b)===y);await Promise.allSettled(A);try{await e.backend.dispose()}finally{a.phase!=="disposed"&&h("disposed"),n.clear()}})();return d=m,m.catch(()=>{d===m&&(d=null)}),m}})}function Re(e,t,r,n){return Ta(r)?Ue({...ze("reload-required","runtime",r),recoverable:!1}):Ue({...ze(e,t,r),recoverable:n})}function Ta(e){return e instanceof Error&&e.name==="PlayableEditorEntryReloadRequiredError"}function ze(e,t,r){return Object.freeze({code:e,phase:t,message:Ra(r)})}function Ue(e){return Object.freeze({...e,primary:e.primary?Object.freeze({...e.primary}):void 0,rollback:e.rollback?Object.freeze({...e.rollback}):void 0})}function xt(e){return Object.freeze({...e,phaseDurationsMs:Object.freeze({...e.phaseDurationsMs}),failure:e.failure?Ue(e.failure):null})}function Ra(e){return e instanceof Error&&e.message.trim()?e.message:typeof e=="string"&&e.trim()?e:"Unknown editor entry failure."}function Ot(e){return e instanceof Error&&e.name==="AbortError"}function it(){const e=new Error("Editor entry was disposed.");return e.name="AbortError",e}function ge(e){return Object.freeze({ok:!1,attempt:e,failure:Re("disposed","dispose",it(),!1)})}function ui(e){return vr({...e,includeCompatibilityAliases:!0,registry:{defineCapability(t){const r=Lr(t.descriptor);if(r==="scene.objects.create")return()=>{};const n=r===Wt?_a():Ma(r,wa(r));return e.host.registerCommand({manifest:n,...t.available?{available:t.available}:{},...t.expectedRevisionPolicy?{expectedRevisionPolicy:t.expectedRevisionPolicy}:{},handler:(a,i)=>t.execute(a,{signal:i.signal,...i.traceId?{traceId:i.traceId}:{},principal:i.principal,sessionId:i.sessionId,expectedRevision:i.expectedRevision,session:i.session,dispatch:i.dispatch,captureAuthoringPatch:i.captureAuthoringPatch})})}}})}function wa(e){switch(e){case"object.resolve":case"transform.move":case"transform.set":return{activeId:"objectId"};case"object.delete":return{selectedIds:"objectIds"};default:return}}function Ma(e,t){const r=xr[e],n=Nr[e],a=Or[e];if(!r)throw new Error(`Built-in Editor command metadata is missing: ${e}`);return{schemaVersion:Xt,id:e,version:1,title:r.title,...It[e]?{description:It[e]}:{},target:r.target,access:r.access,stability:r.stability,inputSchema:n.inputSchema,outputSchema:n.outputSchema,effects:{persistence:r.access==="write"?"authoring":"none",undoable:r.access==="write",idempotent:r.access==="read"},...r.target==="authoring"&&r.access==="write"?{transaction:{compatible:!0,sideEffects:"authoring",phase:"mutation"}}:{},presentation:{category:r.category,inputMode:Da(n.inputSchema)?"schema-form":"none",...a?.aliases?{aliases:a.aliases}:{},...a?.keywords?{keywords:a.keywords}:{},...a?.examples?{examples:a.examples}:{},...a?.shortcut?{shortcut:a.shortcut}:{},...a?.menu?{menu:a.menu}:{},...t?{selectionBinding:t}:{}}}}function _a(){return{schemaVersion:Xt,id:Wt,version:1,title:"Create object from feature",description:"Creates one Scene object from an authoritative registered feature preset.",target:"authoring",access:"write",stability:"experimental",inputSchema:{type:"object",required:["featureId"],properties:{featureId:{type:"string",minLength:1}},additionalProperties:!1},outputSchema:{type:"object",required:["createdId","selection"],properties:{createdId:{type:"string",minLength:1},object:{type:"object"},selection:{type:"object"}},additionalProperties:!1},effects:{persistence:"authoring",undoable:!0,idempotent:!1},transaction:{compatible:!0,sideEffects:"authoring",phase:"mutation"},presentation:{category:"scene",inputMode:"schema-form"}}}function Da(e){const t=e.properties;return!!t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length>0}function fi(e){return{...e,paths:{...e.paths},supportedExtensions:e.supportedExtensions?[...e.supportedExtensions]:void 0,commands:e.commands?{...e.commands}:void 0}}const mi=["model","texture","image","sound"],ct=[".glb",".gltf"],rr=[".png",".jpg",".jpeg",".webp"],Ca=[".env",".hdr",".dds",".ktx",".ktx2"],dt=[...rr,...Ca],lt=[".mp3",".wav",".ogg",".flac",".aac",".m4a"],va=[...ct,...dt,...lt];function La(e){return e.randomUUID?e.randomUUID():ka(e)}function ar(e){return String(e??"").trim().toLowerCase().replace(/-/g,"")}function xa(e,t){const r=ar(t);return`${e==="model"?"asset":e==="texture"?"texture":e==="sound"?"sound":"image"}_${r}`}function gi(e){const a=String(e??"").trim().split(/[^a-zA-Z0-9_$]+/).filter(Boolean).map((i,s)=>s===0?i:`${i.charAt(0).toUpperCase()}${i.slice(1)}`).join("").replace(/[^a-zA-Z0-9_$]/g,"")||"assetUrl";return/^[a-zA-Z_$]/.test(a)?a:`asset${a}`}function Oa(e,t=""){const r=String(e??"").trim().toLowerCase();if(r==="glb"||r==="gltf"||r==="model")return"model";if(r==="groundtexture"||r==="ground-texture"||r==="texture")return"texture";if(r==="ui"||r==="image"||r==="img")return"image";if(r==="audio"||r==="sound")return"sound";const n=Na(t);return ct.includes(n)?"model":lt.includes(n)?"sound":dt.includes(n)?"texture":null}function Na(e){const t=e.split(/[?#]/,1)[0]??"",r=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\")),n=t.slice(r+1),a=n.lastIndexOf(".");return a>=0?n.slice(a).toLowerCase():""}function ka(e){const t=new Uint8Array(16);if(!e.fillRandomBytes)throw new Error("Asset GUID random source must provide randomUUID or fillRandomBytes.");if(e.fillRandomBytes(t),t.every(n=>n===0))throw new Error("Asset GUID random source returned no entropy.");t[6]=t[6]&15|64,t[8]=t[8]&63|128;const r=[...t].map(n=>n.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}function ut(e){let t=String(e??"").trim();const r=t.toLowerCase();for(const n of[...va].sort((a,i)=>i.length-a.length))if(r.endsWith(n)){t=t.slice(0,-n.length);break}return t}function Ei(e,t){return String(e??"").trim()||ut(t)||"Asset"}function pi(e,t){return ut(e||t).trim().toLowerCase().normalize("NFKD").replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"").replace(/_{2,}/g,"_")||null}function Si(e){return e==="model"?ct:e==="sound"?lt:e==="texture"?dt:e==="image"?rr:[]}class fe extends Error{constructor(t,r){super(r),this.code=t,this.name="PlayableEditorManagedAssetError"}}function ja(){const e=globalThis.crypto;return La({...typeof e?.randomUUID=="function"?{randomUUID:()=>e.randomUUID()}:{},fillRandomBytes(t){if(typeof e?.getRandomValues=="function")e.getRandomValues(t);else for(let r=0;r<t.length;r+=1)t[r]=Math.floor(Math.random()*256)}})}function hi(e){return ar(e)}function Ga(e,t){return xa(e,t)}function Nt(e){return ut(e).trim()}function nr(e,t,r){const n=Ua(t.kind,t.assetPath??t.assetName),a=Q(t.guid),i=Q(t.assetId),s=ir(t),d=$a(e,t);if(d&&a&&d.guid&&d.guid!==a)throw new fe(r.errorCodes.assetIdConflict,`Requested guid "${a}" does not match existing asset guid "${d.guid}"`);const u=d?.guid??a??ja(),c=Ga(n,u);if(d?.id&&d.id!==c)throw new fe(r.errorCodes.assetIdConflict,`Asset id "${d.id}" does not match guid "${u}" (expected "${c}")`);if(i&&i!==c)throw new fe(r.errorCodes.assetIdConflict,`Project asset id "${i}" does not match guid "${u}" (expected "${c}")`);const h=e.assets.find(g=>g.id===c&&g.guid&&g.guid!==u);if(h)throw new fe(r.errorCodes.assetIdConflict,`Asset id "${c}" already points to guid "${h.guid}"`);return{guid:u,assetId:c,kind:n,...s?{external:s}:d?.external?{external:d.external}:{}}}function Fa(e){if(typeof e=="number"&&Number.isFinite(e)&&e>0)return e;if(!e||typeof e!="object")return;const t=e,r=Je(t.x),n=Je(t.y),a=Je(t.z);if(!(r==null||n==null||a==null||r<=0||n<=0||a<=0))return{x:r,y:n,z:a}}function ot(e,t,r){const n=nr(e,t,r),a=t.displayName?.trim()||Nt(t.assetName)||Nt(t.assetPath?.split("/").pop())||"Imported Asset",i=t.category?.trim(),s=Ha(t.materialMode),d=Va(t.warmupCount),u=Fa(t.defaultScale??t.scale),c=Ya(t.metadata);return{...n,displayName:a,...i?{category:i}:{},...s?{materialMode:s}:{},...d!=null?{warmupCount:d}:{},...typeof t.singleton=="boolean"?{singleton:t.singleton}:{},...u?{scale:u}:{},...c?{metadata:c}:{}}}function st(e,t){if(e.kind==="model")return{id:e.assetId,guid:e.guid,type:"glb",displayName:e.displayName,...e.category?{category:e.category}:{},...e.materialMode?{materialMode:e.materialMode}:{},...e.warmupCount!=null?{warmupCount:e.warmupCount}:{},...typeof e.singleton=="boolean"?{singleton:e.singleton}:{},...e.scale?{defaults:{transform:{scale:e.scale}}}:{},...e.external?{external:e.external}:{},metadata:{...e.metadata??{},[t.metadata.key]:t.metadata.value}}}function Ba(e,t,r){const n=t.assetName||t.assetPath?.split("/").pop()||"imported_asset.glb",a=ot(e,{...t,assetName:n},r),i=t.requestId,s=t.payloadPath??t.createPayloadPath?.({...i?{requestId:i}:{},guid:a.guid,assetId:a.assetId,kind:a.kind})??`/tmp/playable-editor-asset-${i??a.assetId}.json`,d=st(a,r),u=t.registerCommand??"npm run asset:register",c={...t.assetPath?{sourcePath:t.assetPath,assetPath:t.assetPath}:{},...t.assetUrl?{assetUrl:t.assetUrl}:{},guid:a.guid,projectAssetId:a.assetId,assetType:a.kind,assetName:n,displayName:a.displayName,...a.category?{category:a.category}:{},...a.materialMode?{materialMode:a.materialMode}:{},...a.warmupCount!=null?{warmupCount:a.warmupCount}:{},...typeof a.singleton=="boolean"?{singleton:a.singleton}:{},...a.scale?{scale:a.scale}:{},...a.metadata?{metadata:a.metadata}:{},...a.external?{external:a.external}:{},...a.external?.platformAssetId?{platformAssetId:a.external.platformAssetId}:{}},h=`${u} -- --payload ${s}`;return{...i?{requestId:i}:{},guid:a.guid,assetId:a.assetId,kind:a.kind,displayName:a.displayName,...a.external?{external:a.external}:{},transportPlan:{writes:[{path:s,contentType:"application/json",content:c}],commands:[{cmd:h,cwd:".",timeoutMs:6e4}]},...d?{sceneAsset:d}:{}}}function za(e,t){const r=Q(e.assetId),n=Q(e.guid);if(!r&&!n)throw new fe(t.errorCodes.missingAssetId??"missing_asset_id","Missing assetId or guid for asset unregistration");const a=e.requestId,i=e.payloadPath??e.createPayloadPath?.({...a?{requestId:a}:{},...r?{assetId:r}:{},...n?{guid:n}:{}})??`/tmp/playable-editor-asset-unregister-${a??r??n}.json`,s=e.deleteFile!==!1,d=e.unregisterCommand??"npm run asset:unregister",u={...r?{assetId:r}:{},...n?{guid:n}:{},deleteFile:s},c=`${d} -- --payload ${i}`;return{...a?{requestId:a}:{},...n?{guid:n}:{},assetId:r??"",transportPlan:{writes:[{path:i,contentType:"application/json",content:u}],commands:[{cmd:c,cwd:".",timeoutMs:6e4}]}}}function Q(e){return typeof e=="string"&&e.trim()?e.trim():void 0}function Ua(e,t){return Oa(e,t)??"model"}function ir(e){const t=e.external&&typeof e.external=="object"?e.external:{},r=Q(t.platformAssetId)??Q(e.platformAssetId);let n;if(Object.prototype.hasOwnProperty.call(t,"assetPath")){try{n=kr(t.assetPath)}catch{throw new fe("external_asset_path_must_be_portable","Explicit external.assetPath must be a non-empty portable relative path")}if(!n)throw new fe("external_asset_path_must_be_portable","Explicit external.assetPath must be a non-empty portable relative path")}const a=Q(t.assetUrl)??Q(e.assetUrl);if(!(!r&&!n&&!a))return{...r?{platformAssetId:r}:{},...n?{assetPath:n}:{},...a?{assetUrl:a}:{}}}function $a(e,t){const r=Q(t.guid),n=Q(t.assetId),a=ir(t);return e.assets.find(i=>!!(r&&i.guid===r||n&&i.id===n||a?.platformAssetId&&i.external?.platformAssetId===a.platformAssetId||a?.assetPath&&i.external?.assetPath===a.assetPath))}function Je(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function Ha(e){return e==="shared"||e==="instance"?e:void 0}function Va(e){return Number.isInteger(e)&&e>=0?e:void 0}function Ya(e){if(!(!e||typeof e!="object"||Array.isArray(e)))return JSON.parse(JSON.stringify(e))}function qa(e){return{resolveAssetIdentity:(t,r,n=e.rules)=>Ae(e,()=>nr(t,r,n)),buildAssetArgs:(t,r,n=e.rules)=>Ae(e,()=>ot(t,r,n)),createSceneAsset:(t,r=e.rules)=>st(t,r),planAssetRegistrationCore:(t,r,n=e.rules)=>Ae(e,()=>Ba(t,Ka(r,e),n)),planAssetUnregistrationCore:(t,r=e.rules)=>Ae(e,()=>za(Wa(t,e),r)),resolveAssetReference:(t,r,n=e.rules)=>{const a=Ae(e,()=>ot(t,r,n)),i=st(a,n);if(!i)throw new Error(`Asset "${a.assetId}" is not a placeable model asset`);return{guid:a.guid,assetId:a.assetId,displayName:a.displayName,asset:i}}}}function Ka(e,t){return{...e,kind:e.kind??e.assetType,createPayloadPath:e.createPayloadPath??(e.payloadPath?void 0:t.createRegistrationPayloadPath)}}function Wa(e,t){return{...e,createPayloadPath:e.createPayloadPath??(e.payloadPath?void 0:t.createUnregistrationPayloadPath)}}function Ae(e,t){try{return t()}catch(r){throw e.wrapError&&e.wrapError(r),r}}function bi(e){const t=qa(e);return{facade:t,planAssetRegistration(r,n){return t.planAssetRegistrationCore(kt(n),r)},planAssetRegistrationWithAssets(r,n){return t.planAssetRegistrationCore({assets:r},n)},planAssetUnregistration(r){return t.planAssetUnregistrationCore(r)},resolveAssetReference(r,n){return t.resolveAssetReference(kt(n),r)}}}function kt(e){return{assets:e.getAssets()}}const Xa=["/__fps_editor_authoring"],Ja=[["manifest","/manifest"],["commit","/commit"],["editor-scene","/editor-scene"],["editor-asset-library","/editor-asset-library"],["project-files","/project-files"],["project-media","/project-media"],["project-file","/project-file"],["asset-import","/asset-import"],["save-editor-scene","/save-editor-scene"]];function Za(e,t={}){const r=new URL(e??"","http://localhost").pathname,n=t.prefixes??Xa,a=Qa(r,n);if(!a)return null;const i=r.slice(a.length)||"/",s=en(i);return s?{route:i,routeName:s,prefix:a}:null}function Qa(e,t){return t.find(r=>e===r||e.startsWith(`${r}/`))??null}function en(e){return Ja.find(([,t])=>e===t)?.[0]??null}function U(e,t){return{statusCode:e,body:t}}function or(e){return{statusCode:e,body:null}}async function yi(e,t){const r=Za(e.url);if(!r)return null;const n=(e.method??"GET").toUpperCase();if(n==="OPTIONS")return or(204);try{if(tn(r.routeName)){if(n!=="GET")return U(405,{ok:!1,error:"method_not_allowed"});if(r.routeName==="project-file"){const i=new URL(e.url??"","http://localhost").searchParams.get("path")?.trim()??"";if(!i)return U(400,{ok:!1,error:"missing_file_path"});const s=await t.loadProjectFile?.({path:i,route:r});return U(200,s??{ok:!1,error:"not_found"})}return U(200,await rn(r,t))}if(n!=="POST")return U(405,{ok:!1,error:"method_not_allowed"});const a=e.body??await t.readBody?.(e,r)??{};return await an(r,a,t)}catch(a){const i=typeof a?.code=="string"?a.code:"authoring_request_failed",s=i==="asset_import_payload_too_large"?413:r.routeName==="save-editor-scene"&&i==="authoring_source_revision_mismatch"?200:r.routeName==="asset-import"?400:500;return U(s,{ok:!1,error:a instanceof Error?a.message:String(a),code:i,details:$e(a?.details)})}}function tn(e){return e==="manifest"||e==="editor-scene"||e==="editor-asset-library"||e==="project-files"||e==="project-file"||e==="project-media"}async function rn(e,t){return e.routeName==="manifest"&&t.loadManifest?t.loadManifest(e):e.routeName==="editor-scene"&&t.loadEditorScene?t.loadEditorScene(e):e.routeName==="editor-asset-library"&&t.loadEditorAssetLibrary?t.loadEditorAssetLibrary(e):e.routeName==="project-files"&&t.loadProjectFiles?t.loadProjectFiles(e):{ok:!1,error:"not_found"}}async function an(e,t,r){if(e.routeName==="asset-import"){const n=jr(t),a=await r.importAsset?.({payload:n,route:e});return U(200,a??{ok:!1,error:"not_found"})}return e.routeName==="save-editor-scene"?nn(e,t,r):e.routeName==="commit"?U(410,await on(e,t,r)):U(404,{ok:!1,error:"not_found"})}async function nn(e,t,r){const n=t.mode==="prepare-platform-save"?"prepare-platform-save":"local-commit-save",a=await r.saveEditorScene?.({body:t,mode:n,rawEditorScene:t.editorScene,route:e});return U(200,a??{ok:!1,error:"not_found"})}async function on(e,t,r){return r.commit?.({body:t,route:e})??{ok:!1,error:"platform_commit_route_disabled",message:"Save through /__fps_editor_authoring/save-editor-scene so scene.main remains the authoring source of truth."}}const le=Gr,X=Fr,Pi=Br;function Me(e){return D(e.requestId)}function sr(e){return{requestId:Me(e),assetName:D(e.assetName),assetPath:D(e.assetPath),assetUrl:D(e.assetUrl),guid:D(e.guid),assetId:D(e.projectAssetId),kind:D(e.assetType)??D(e.kind),platformAssetId:D(e.platformAssetId)??D(e.assetId),displayName:D(e.displayName),category:D(e.category),materialMode:e.materialMode,scale:e.scale,defaultScale:e.defaultScale,metadata:$e(e.metadata),payloadPath:D(e.payloadPath)}}function sn(e){return{requestId:Me(e),guid:D(e.guid),assetId:D(e.projectAssetId)??D(e.assetId),payloadPath:D(e.payloadPath),deleteFile:typeof e.deleteFile=="boolean"?e.deleteFile:void 0}}function cn(e){const t=D(e.assetName)??"",r=D(e.assetPath);return{...sr(e),kind:D(e.assetType)??D(e.kind)??"model",rawAssetName:t,inferredAssetPath:r,inferredAssetUrl:D(e.assetUrl)??(r?`/@fs${r}`:""),instanceScale:e.instanceScale,dropSurfaceName:D(e.dropSurfaceName),clientX:typeof e.clientX=="number"&&Number.isFinite(e.clientX)?e.clientX:void 0,clientY:typeof e.clientY=="number"&&Number.isFinite(e.clientY)?e.clientY:void 0,position:e.position}}function dn(e){const t=un(e);return{requestId:Me(e),id:D(e.id),name:D(e.name),kind:e.kind,parentId:D(e.parentId),enabled:typeof e.enabled=="boolean"?e.enabled:void 0,transform:e.transform,instance:e.instance,primitive:e.primitive,transformType:e.transformType,...t?{customTransformData:t}:{},camera:e.camera,light:e.light}}function ln(e){return{requestId:Me(e),nodeId:D(e.nodeId)??"",patches:Array.isArray(e.patches)?e.patches:D(e.path)?[{path:e.path,value:e.value}]:[]}}function jt(e){return{requestId:Me(e),nodeId:D(e.nodeId)}}function D(e){if(typeof e!="string")return;const t=e.trim();return t||void 0}function un(e){const t=new Set(["requestId","id","name","kind","parentId","enabled","transform","instance","primitive","transformType","customTransformData","camera","light"]),r=$e(e.customTransformData),n=r?{...r}:{};for(const[a,i]of Object.entries(e))t.has(a)||(n[a]=i);return Object.keys(n).length>0?n:void 0}function fn(e,t,r={}){const n=r.readProjectError?.(e);if(n)return n;const a=e,i=At(a?.code)??t,s=e instanceof Error?e.message:At(a?.message)??String(e),d=$e(a?.details);return{code:i,error:s,...d?{details:d}:{}}}function mn(e,t={}){const r=new Set(t.omitKeys??["rootNode"]),n={...e};for(const a of r)delete n[a];return n}function gn(e){return{async handleCommand(t,r,n){const a=n;if(t===le.ASSET_REGISTRATION_PLAN){const i=sr(r);return await xe({eventName:X.ASSET_REGISTRATION_PLANNED,failedEventName:X.ASSET_REGISTRATION_FAILED,requestId:i.requestId,fallbackCode:e.errorCodes.assetRegistrationPlanFailed,emitEvent:e.emitEvent,createCommandError:e.handlers.createCommandError,run:()=>e.handlers.assetRegistrationPlan(i,a)}),!0}if(t===le.ASSET_UNREGISTRATION_PLAN){const i=sn(r);return await xe({eventName:X.ASSET_UNREGISTRATION_PLANNED,failedEventName:X.ASSET_UNREGISTRATION_FAILED,requestId:i.requestId,fallbackCode:e.errorCodes.assetUnregistrationPlanFailed,emitEvent:e.emitEvent,createCommandError:e.handlers.createCommandError,run:()=>e.handlers.assetUnregistrationPlan(i,a)}),!0}if(t===le.ASSET_IMPORT){const i=cn(r),s=await e.handlers.assetImport(i,a);return s&&e.emitEvent(X.ASSET_IMPORT_RESULT,s),!0}if(t===le.ASSET_REMOVE){const i=jt(r),s=await e.handlers.assetRemove(i,a);return s&&e.emitEvent(X.ASSET_REMOVE_RESULT,s),!0}if(t===le.SCENE_NODE_CREATE){const i=dn(r);return await xe({eventName:X.SCENE_NODE_CREATE_RESULT,failedEventName:X.SCENE_NODE_CREATE_RESULT,requestId:i.requestId,fallbackCode:e.errorCodes.sceneNodeCreateFailed,emitEvent:e.emitEvent,createCommandError:e.handlers.createCommandError,run:()=>e.handlers.sceneNodeCreate(i,a)}),!0}if(t===le.SCENE_NODE_PATCH){const i=ln(r);return await xe({eventName:X.SCENE_NODE_PATCH_RESULT,failedEventName:X.SCENE_NODE_PATCH_RESULT,requestId:i.requestId,fallbackCode:e.errorCodes.sceneNodePatchFailed,failureExtra:{nodeId:i.nodeId},emitEvent:e.emitEvent,createCommandError:e.handlers.createCommandError,run:()=>e.handlers.sceneNodePatch(i,a)}),!0}if(t===le.SCENE_NODE_REMOVE){const i=jt(r),s=await e.handlers.sceneNodeRemove(i,a);return s&&e.emitEvent(X.SCENE_NODE_REMOVE_RESULT,s),!0}return!1}}}async function xe(e){try{const t=await e.run();t&&e.emitEvent(e.eventName,t)}catch(t){e.emitEvent(e.failedEventName,{requestId:e.requestId,ok:!1,...e.failureExtra,...e.createCommandError(t,e.fallbackCode)})}}function Ii(e){const t=e.notifyDocumentStatus??(()=>{}),r=e.createCommandError??((n,a)=>fn(n,a));return gn({emitEvent:e.emitEvent,errorCodes:e.errorCodes,handlers:{createCommandError:r,assetRegistrationPlan:(n,a)=>e.planAssetRegistration(n,a),assetUnregistrationPlan:(n,a)=>e.planAssetUnregistration(n,a),assetImport:(n,a)=>En(n,a,e,t),assetRemove:(n,a)=>pn(n,a,e,t),sceneNodeCreate:async(n,a)=>{e.ensureDocumentLoaded();const i=await e.sceneNodeCreate(n,a);return i.rootNode&&e.selectRuntimeNode?.(i.rootNode),t(),{requestId:n.requestId,ok:!0,nodeId:i.node.id,node:i.node}},sceneNodePatch:async(n,a)=>{e.ensureDocumentLoaded();const i=await e.sceneNodePatch(n,a);return i.rootNode&&e.selectRuntimeNode?.(i.rootNode),t(),{requestId:n.requestId,ok:!0,nodeId:i.node.id,node:i.node}},sceneNodeRemove:async(n,a)=>{e.ensureDocumentLoaded();const i=await e.sceneNodeRemove(n,a);return i&&(e.selectRuntimeNode?.(null),t()),{requestId:n.requestId,ok:!!i,nodeId:n.nodeId,...i?{removedNodeId:i.node.id}:{code:e.errorCodes.nodeNotFound,error:e.errorCodes.nodeNotFound}}}}})}async function En(e,t,r,n){if(r.isBridgeActive?.())return null;r.ensureDocumentLoaded();const a=Sn(e.inferredAssetUrl)||(e.inferredAssetPath?`/@fs${e.inferredAssetPath}`:""),i=await r.planAssetRegistration({...e,assetName:e.rawAssetName||void 0,assetPath:e.inferredAssetPath,assetUrl:a},t);let s=null;e.inferredAssetPath&&(s=await(r.importAsset??(h=>zr(h)))({assetPath:e.inferredAssetPath,...i.assetId?{projectAssetId:i.assetId}:{},...i.guid?{guid:i.guid}:{},...e.rawAssetName?{assetName:e.rawAssetName}:{},...e.displayName?{displayName:e.displayName}:{},...e.category?{category:e.category}:{},...e.metadata?{metadata:e.metadata}:{},...i.external?{external:i.external}:{}},t));const d=Ur({result:s,fallback:{guid:i.guid,assetId:i.assetId,assetUrl:a,external:i.external}}),u=await r.createAssetInstance({requestId:e.requestId,guid:d.guid,assetId:d.assetId,external:d.external,assetUrl:d.assetUrl,assetName:e.rawAssetName||void 0,displayName:e.displayName,category:e.category,materialMode:e.materialMode,scale:e.scale,defaultScale:e.defaultScale,instanceScale:e.instanceScale,metadata:e.metadata,dropSurfaceName:e.dropSurfaceName,clientX:e.clientX,clientY:e.clientY,position:e.position},t);return u.ok&&(u.rootNode&&r.selectRuntimeNode?.(u.rootNode),n()),mn(u)}async function pn(e,t,r,n){r.ensureDocumentLoaded();const a=e.nodeId?await r.removeAssetInstance(e,t):{ok:!1,assetId:"",code:r.errorCodes.missingNodeId,error:r.errorCodes.missingNodeId};return a.ok&&(r.selectRuntimeNode?.(null),n()),{requestId:e.requestId,...a}}function Sn(e){return typeof e=="string"&&e.trim()?e.trim():void 0}const Te="public-export",w="bundled-alias",ue="external-peer",J="default",C="exclude",Se="prebundle",hn=[["@fps-games/editor","packages/editor/src/index.ts",null,Te,J],["@fps-games/editor/vite","packages/editor/src/vite.ts",null,Te,J],["@fps-games/engine",null,null,ue,J],["@fps-games/engine/config",null,null,ue,J],["@fps-games/engine/rendering",null,null,ue,J],["@fps-games/engine/babylon",null,null,ue,Se],["@fps-games/editor-tooling","packages/editor-tooling/src/index.ts","@fps-games/editor-tooling/dist/index.js",w,C],["@fps-games/editor-tooling/node","packages/editor-tooling/src/package-metadata-node.ts","@fps-games/editor-tooling/dist/package-metadata-node.js",w,C],["@fps-games/editor-tooling/vite","packages/editor-tooling/src/vite.ts","@fps-games/editor-tooling/dist/vite.js",w,C],["@fps-games/plugin-sdk",null,null,ue,J],["@fps-games/plugin-sdk/host",null,null,ue,J],["@fps-games/plugin-sdk/runtime",null,null,ue,J],["@fps-games/plugin-hierarchy","packages/plugin-hierarchy/src/reference.ts","@fps-games/plugin-hierarchy/dist/reference.js",w,Se],["@fps-games/plugin-hierarchy/kernel","packages/plugin-hierarchy/src/kernel.ts","@fps-games/plugin-hierarchy/dist/kernel.js",w,C],["@fps-games/plugin-hierarchy/integration","packages/plugin-hierarchy/src/integration.ts","@fps-games/plugin-hierarchy/dist/integration.js",w,C],["@fps-games/plugin-hierarchy/editor","packages/plugin-hierarchy/src/editor.ts","@fps-games/plugin-hierarchy/dist/editor.js",w,Se],["@fps-games/editor/playable-sdk","packages/editor/src/playable-sdk.ts",null,Te,J],["@fps-games/editor/playable-sdk/upgrade-doctor","packages/editor/src/playable-sdk-upgrade-doctor.ts",null,Te,J],["@fps-games/editor/playable-sdk/vite","packages/editor/src/playable-sdk-vite.ts",null,Te,J],["@fps-games/editor-playable-sdk","packages/editor-playable-sdk/src/index.ts","@fps-games/editor-playable-sdk/dist/index.js",w,C],["@fps-games/editor-playable-sdk/internal/authoring-queries","packages/editor-playable-sdk/src/internal/authoring-queries.ts","@fps-games/editor-playable-sdk/dist/internal/authoring-queries.js",w,C],["@fps-games/editor-playable-sdk/internal/local-harness","packages/editor-playable-sdk/src/internal/local-harness.ts","@fps-games/editor-playable-sdk/dist/internal/local-harness.js",w,C],["@fps-games/editor-playable-sdk/upgrade-doctor","packages/editor-playable-sdk/src/upgrade-doctor/index.ts","@fps-games/editor-playable-sdk/dist/upgrade-doctor/index.js",w,C],["@fps-games/editor-playable-sdk/vite","packages/editor-playable-sdk/src/vite/index.ts","@fps-games/editor-playable-sdk/dist/vite/index.js",w,C],["@fps-games/editor-babylon","packages/editor-babylon/src/index.ts","@fps-games/editor-babylon/dist/index.js",w,C],["@fps-games/editor-browser","packages/editor-browser/src/index.ts","@fps-games/editor-browser/dist/index.js",w,C],["@fps-games/editor-browser/plugin-contributions","packages/editor-browser/src/plugin-contributions.ts","@fps-games/editor-browser/dist/plugin-contributions.js",w,C],["@fps-games/editor-browser/runtime-debug","packages/editor-browser/src/runtime-debug.ts","@fps-games/editor-browser/dist/runtime-debug.js",w,C],["@fps-games/editor-core","packages/editor-core/src/index.ts","@fps-games/editor-core/dist/index.js",w,C],["@fps-games/editor-core/plugin-host","packages/editor-core/src/editor-plugin-host.ts","@fps-games/editor-core/dist/editor-plugin-host.js",w,C],["@fps-games/editor-core/lifecycle","packages/editor-core/src/lifecycle.ts","@fps-games/editor-core/dist/lifecycle.js",w,C],["@fps-games/editor-core/events","packages/editor-core/src/events.ts","@fps-games/editor-core/dist/events.js",w,C],["@fps-games/editor-core/document-adapter","packages/editor-core/src/document-adapter.ts","@fps-games/editor-core/dist/document-adapter.js",w,C],["@fps-games/editor-core/diagnostics","packages/editor-core/src/editor-diagnostic-store.ts","@fps-games/editor-core/dist/editor-diagnostic-store.js",w,C],["@fps-games/editor-core/tools","packages/editor-core/src/editor-tools.ts","@fps-games/editor-core/dist/editor-tools.js",w,C],["@fps-games/editor-forge-play","packages/editor-forge-play/src/index.ts","@fps-games/editor-forge-play/dist/index.js",w,C],["@fps-games/editor-protocol","packages/editor-protocol/src/index.ts","@fps-games/editor-protocol/dist/index.js",w,C],["@fps-games/editor-ui","packages/editor-ui/src/index.ts","@fps-games/editor-ui/dist/index.js",w,C],["@babel/parser",null,"@babel/parser/lib/index.js",w,Se],["@playcanvas/observer",null,"@playcanvas/observer/dist/index.mjs",w,C],["@playcanvas/pcui",null,"@playcanvas/pcui/dist/module/src/index.mjs",w,C],["@playcanvas/pcui/styles",null,"@playcanvas/pcui/styles/dist/index.mjs",w,C],["semver",null,"semver/index.js",w,Se]],_e=Object.freeze(hn.map(([e,t,r,n,a])=>Object.freeze({packageId:e,...t?{sourceFile:t}:{},...r?{bundledFile:r,bundledRoot:"editor-node-modules"}:{},resolution:n,optimizer:a,projectAllowlist:!0}))),Ai=Object.freeze(_e.filter(e=>e.projectAllowlist).map(e=>e.packageId)),Ti=Object.freeze(_e.filter(e=>e.resolution===w).map(e=>e.packageId)),Ri=Object.freeze(_e.filter(e=>e.optimizer===Se).map(e=>e.packageId));function bn(e,t={}){const r=t.resolvePath??ft;return{entries:_e.filter(n=>typeof n.sourceFile=="string").map(n=>({packageId:n.packageId,file:r(e,...n.sourceFile.split("/"))}))}}function wi(e,t={}){const r=bn(e,{resolvePath:t.resolvePath}),n=t.relativePath??Pn,a={};for(const i of r.entries){if(i.packageId==="semver")continue;const s=t.pathOverrides?.[i.packageId];a[i.packageId]=s?yn(s):[t.projectRoot?ye(n(t.projectRoot,i.file)):ye(i.file)]}return{paths:a}}function Mi(e,t={}){const r=t.resolvePath??ft,n=r(e,"node_modules","@fps-games","editor");return{editorPackageRoot:n,bundledEditorPackagesRoot:r(n,"node_modules","@fps-games"),bundledEditorNodeModulesRoot:r(n,"node_modules"),editorPackageJsonPath:r(n,"package.json")}}function _i(e){const t=e.resolvePath??ft,r=e.bundledEditorNodeModulesRoot??Gt(e.bundledEditorPackagesRoot),n=e.editorPackageRoot??Gt(r);return{entries:_e.filter(i=>i.resolution===w&&typeof i.bundledFile=="string").map(i=>({packageId:i.packageId,file:t(i.bundledRoot==="editor-package"?n:r,...i.bundledFile.split("/"))}))}}function Di(e,t){return e.entries.filter(r=>!t(r.file)).map(r=>({packageId:r.packageId,file:r.file}))}function Ci(e,t="The @fps-games editor package aliases point to missing files."){return[t,...e.map(r=>`- ${r.packageId}: ${r.file}`)].join(`
|
|
2
2
|
`)}function ft(...e){return e.filter(t=>t.length>0).join("/").replace(/\/+/g,"/")}function ye(e){return e.replace(/\\/g,"/").replace(/\/+/g,"/")}function Gt(e){const t=ye(e).replace(/\/$/,""),r=t.lastIndexOf("/");return r>0?t.slice(0,r):"."}function yn(e){return(Array.isArray(e)?e:[e]).map(ye)}function Pn(e,t){const r=ye(e).replace(/\/$/,""),n=ye(t).replace(/\/$/,""),a=r.split("/").filter(Boolean),i=n.split("/").filter(Boolean);let s=0;for(;s<a.length&&s<i.length&&a[s]===i[s];)s+=1;const d=a.slice(s).map(()=>".."),u=i.slice(s);return[...d,...u].join("/")||"."}const In=new Set(["leftToRight","rightToLeft","bottomToTop","topToBottom"]);function vi(e){const t=$r(e),r={uiKind:e.uiKind,size:{width:e.size.width,depth:e.size.depth},layers:e.layers.map((n,a)=>An(n,a)),rendering:{textureWidth:t.width,textureHeight:t.height}};return e.aspectSourceLayerId&&(r.aspectSourceLayerId=e.aspectSourceLayerId),typeof e.lockAspectToBorder=="boolean"&&(r.lockAspectToBorder=e.lockAspectToBorder),e.mask&&(r.mask={...typeof e.mask.enabled=="boolean"?{enabled:e.mask.enabled}:{},...e.mask.source==="roundedRect"||e.mask.source==="borderAlpha"||e.mask.source==="texture"?{source:e.mask.source}:{},...e.mask.textureId?{textureId:e.mask.textureId}:{},...typeof e.mask.cornerRadius=="number"&&Number.isFinite(e.mask.cornerRadius)?{cornerRadius:e.mask.cornerRadius}:{},...typeof e.mask.padding=="number"&&Number.isFinite(e.mask.padding)?{padding:e.mask.padding}:{}}),e.rendering&&(r.rendering={...r.rendering,...typeof e.rendering.alphaIndex=="number"&&Number.isFinite(e.rendering.alphaIndex)?{alphaIndex:e.rendering.alphaIndex}:{},...typeof e.rendering.diffuseTextureLevel=="number"&&Number.isFinite(e.rendering.diffuseTextureLevel)?{diffuseTextureLevel:e.rendering.diffuseTextureLevel}:{},...typeof e.rendering.emissiveTextureLevel=="number"&&Number.isFinite(e.rendering.emissiveTextureLevel)?{emissiveTextureLevel:e.rendering.emissiveTextureLevel}:{}}),r}function An(e,t){const r=Hr(e.rotationDeg??0)??0,n={id:e.id,role:e.role,zOrder:typeof e.zOrder=="number"&&Number.isFinite(e.zOrder)?e.zOrder:t,rect:Tn(e.rect),...r!==0?{rotationDeg:r}:{},...typeof e.enabled=="boolean"?{enabled:e.enabled}:{},...typeof e.opacity=="number"&&Number.isFinite(e.opacity)?{opacity:e.opacity}:{}};return e.kind==="texture"?{...n,kind:"texture",...e.textureId?{textureId:e.textureId}:{},...e.tint?{tint:Ee(e.tint)}:{},...e.imageFit?{imageFit:e.imageFit}:{}}:e.kind==="textureProgress"?{...n,kind:"textureProgress",...e.textureId?{textureId:e.textureId}:{},value:Bt(e.value),...e.tint?{tint:Ee(e.tint)}:{},...e.imageFit?{imageFit:e.imageFit}:{},...Ft(e.direction)?{direction:e.direction}:{}}:e.kind==="color"?{...n,kind:"color",color:Ee(e.color)}:e.kind==="progress"?{...n,kind:"progress",value:Bt(e.value??0),color:Ee(e.color),...Ft(e.direction)?{direction:e.direction}:{}}:{...n,kind:"text",text:{value:e.text.value,color:Ee(e.text.color),...e.text.fontFamily?{fontFamily:e.text.fontFamily}:{},...typeof e.text.fontSize=="number"&&Number.isFinite(e.text.fontSize)?{fontSize:e.text.fontSize}:{},...e.text.fontWeight!=null?{fontWeight:String(e.text.fontWeight)}:{},...e.text.strokeColor?{strokeColor:Ee(e.text.strokeColor)}:{},...typeof e.text.strokeWidth=="number"&&Number.isFinite(e.text.strokeWidth)?{strokeWidth:e.text.strokeWidth}:{},...e.text.align==="left"||e.text.align==="center"||e.text.align==="right"?{align:e.text.align}:{},...e.text.baseline==="top"||e.text.baseline==="middle"||e.text.baseline==="bottom"?{baseline:e.text.baseline}:{}}}}function Tn(e){return{x:e.x,z:e.z,width:e.width,depth:e.depth}}function Ee(e){return{r:e.r,g:e.g,b:e.b,...typeof e.a=="number"?{a:e.a}:{}}}function Ft(e){return typeof e=="string"&&In.has(e)}function Bt(e){return Number.isFinite(e)?Math.max(0,Math.min(1,e)):0}const cr=1,Rn="/__fps_editor/entry-manifest.json",wn="no-cache",Mn="public, max-age=31536000, immutable";function _n(e){return vn({schemaVersion:cr,build:{packageName:ee(e.packageName,"packageName"),version:ee(e.version,"version"),buildId:ee(e.buildId,"buildId"),distHash:ee(e.distHash,"distHash")},entry:{kind:"module",url:dr(e.entryUrl),cache:e.entryCache??"revalidate"},cacheControl:{manifest:wn,immutableResource:Mn}})}function Dn(e){if(!Ze(e))throw new Error("Editor entry manifest must be an object.");if(e.schemaVersion!==cr)throw new Error(`Unsupported Editor entry manifest schemaVersion: ${String(e.schemaVersion)}.`);if(!Ze(e.build))throw new Error("Editor entry manifest build must be an object.");if(!Ze(e.entry))throw new Error("Editor entry manifest entry must be an object.");if(e.entry.kind!=="module")throw new Error("Editor entry manifest entry.kind must be module.");if(e.entry.cache!=="revalidate"&&e.entry.cache!=="immutable")throw new Error("Editor entry manifest entry.cache must be revalidate or immutable.");return _n({packageName:ee(e.build.packageName,"build.packageName"),version:ee(e.build.version,"build.version"),buildId:ee(e.build.buildId,"build.buildId"),distHash:ee(e.build.distHash,"build.distHash"),entryUrl:dr(e.entry.url),entryCache:e.entry.cache})}function Cn(e,t){const r=new URL(e.entry.url,ee(t.baseUrl,"baseUrl"));r.searchParams.set("fps-editor-build",e.build.buildId);const n=t.retryAttempt??1;if(!Number.isInteger(n)||n<1)throw new Error("Editor entry retryAttempt must be a positive integer.");return n>1?r.searchParams.set("fps-editor-entry-retry",String(n)):r.searchParams.delete("fps-editor-entry-retry"),r.href}function vn(e){return Object.freeze({...e,build:Object.freeze({...e.build}),entry:Object.freeze({...e.entry}),cacheControl:Object.freeze({...e.cacheControl})})}function dr(e){const t=ee(e,"entry.url");let r;try{r=new URL(t,"https://fps-editor.invalid/")}catch{throw new Error(`Editor entry manifest entry.url is invalid: ${t}.`)}if(r.protocol!=="http:"&&r.protocol!=="https:")throw new Error(`Editor entry manifest entry.url must use HTTP(S): ${t}.`);return t}function ee(e,t){if(typeof e!="string"||!e.trim())throw new Error(`Editor entry manifest ${t} must be a non-empty string.`);return e.trim()}function Ze(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Ln(e){const t=new URL(e.manifestUrl??Rn,e.baseUrl).href,r=e.fetchManifest??On();let n=null,a,i=!1,s=0,d=null;return Object.freeze({load:c=>{if(i)return Promise.resolve(a);if(d)return d;const h=(async()=>{Qe(c);const g=n??await xn({fetchManifest:r,manifestUrl:t,signal:c});Qe(c),n=g;const M=s+1,I=Cn(g,{baseUrl:e.baseUrl,retryAttempt:M});s=M;const O=await e.importModule(I);return Qe(c),a=O,i=!0,O})();return d=h,h.finally(()=>{d===h&&(d=null)}).catch(()=>{}),h},getManifest:()=>n,getImportAttempt:()=>s})}async function xn(e){const t=await e.fetchManifest(e.manifestUrl,{cache:"no-cache",headers:Object.freeze({accept:"application/json"}),...e.signal?{signal:e.signal}:{}});if(!t.ok)throw new Error(`Editor entry manifest request failed with HTTP ${t.status}.`);return Dn(await t.json())}function On(){const e=globalThis.fetch;if(typeof e!="function")throw new Error("Editor entry module loader requires fetchManifest outside a browser.");return e.bind(globalThis)}function Qe(e){if(!e?.aborted)return;const t=new Error("Editor entry module load was aborted.");throw t.name="AbortError",t}function Nn(e={}){const t=e.performance??Fn(),r=e.maxResourceDetails??100,n=e.resourceTimingBufferSize??2e3;if(!Number.isInteger(r)||r<0)throw new Error("Editor entry maxResourceDetails must be a non-negative integer.");if(!Number.isInteger(n)||n<1)throw new Error("Editor entry resourceTimingBufferSize must be a positive integer.");return t.setResourceTimingBufferSize?.(n),Object.freeze({mark(){return Object.freeze({startedAtMs:t.now(),resourceIndex:t.getEntriesByType("resource").length})},measure(a){const i=t.getEntriesByType("resource").slice(a.resourceIndex).flatMap(Gn).filter(u=>e.includeResource?.(u)??!0).map(kn),s={network:0,revalidated:0,cache:0,unknown:0};for(const u of i)s[u.cacheStatus]+=1;const d=i.slice(0,r);return Object.freeze({durationMs:Math.max(0,t.now()-a.startedAtMs),resourceCount:i.length,transferSize:et(i,u=>u.transferSize),encodedBodySize:et(i,u=>u.encodedBodySize),decodedBodySize:et(i,u=>u.decodedBodySize),cacheCounts:Object.freeze(s),resources:Object.freeze(d),truncatedResourceCount:i.length-d.length})}})}function kn(e){const t=be(e.transferSize),r=be(e.encodedBodySize),n=be(e.decodedBodySize);return Object.freeze({name:e.name,initiatorType:e.initiatorType??"",startTimeMs:e.startTime,durationMs:e.duration,transferSize:t,encodedBodySize:r,decodedBodySize:n,cacheStatus:jn({transferSize:t,encodedBodySize:r,decodedBodySize:n})})}function jn(e){return e.transferSize===0?e.encodedBodySize>0||e.decodedBodySize>0?"cache":"unknown":e.encodedBodySize>0&&e.transferSize<e.encodedBodySize?"revalidated":"network"}function Gn(e){if(!e||typeof e!="object"||Array.isArray(e))return[];const t=e;return typeof t.name!="string"||!t.name?[]:!Number.isFinite(t.startTime)||!Number.isFinite(t.duration)?[]:[{name:t.name,initiatorType:typeof t.initiatorType=="string"?t.initiatorType:"",startTime:t.startTime,duration:t.duration,transferSize:be(t.transferSize),encodedBodySize:be(t.encodedBodySize),decodedBodySize:be(t.decodedBodySize)}]}function Fn(){const e=globalThis.performance;if(!e||typeof e!="object")throw new Error("Editor entry performance tracker requires a performance adapter.");const t=e;if(typeof t.now!="function"||typeof t.getEntriesByType!="function")throw new Error("Editor entry performance tracker requires now() and getEntriesByType().");return t}function be(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0?e:0}function et(e,t){return e.reduce((r,n)=>r+t(n),0)}async function Li(e,t){const r=String(e.method??"GET").toUpperCase();if(r==="OPTIONS")return or(204);try{if(r==="GET"){const u=$n(await t.loadConfig?.()),c=u.renderingConfig;Tt(c);const h=Rt(c);return U(200,{ok:!0,...u.response,renderingConfig:Un(c),normalized:h,summary:wt(h)})}if(r!=="POST")return U(405,{ok:!1,error:"method_not_allowed"});const n=e.body??await t.readBody?.(e)??{},a=we(n.renderingConfig);if(!a)return U(400,{ok:!1,error:"missing_rendering_config"});Tt(a);const i=Rt(a),s=wt(i),d=await t.saveConfig?.({body:n,renderingConfig:a,normalized:i,summary:s});return U(200,{ok:!0,...d??{},renderingConfig:a,normalized:i,summary:s})}catch(n){const a=Bn(n),i=zn(n);return U(a?.startsWith("schema.")?400:500,{ok:!1,error:a??(n instanceof Error?n.message:String(n)),...i?{path:i}:{},details:we(n?.details)})}}function Bn(e){const t=e?.code;return typeof t=="string"&&t?t:null}function zn(e){const t=e?.path;return typeof t=="string"&&t?t:null}function we(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function Un(e){return we(e)??{}}function $n(e){const t=we(e);return t&&Object.prototype.hasOwnProperty.call(t,"renderingConfig")?{renderingConfig:t.renderingConfig,response:we(t.response)??{}}:{renderingConfig:e??{},response:{}}}function zt(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}function Hn(e){const t=e.root??document.body,r=t.ownerDocument,n=e.tooltipDataAttribute??"editorRuntimeDebugTooltip",a=e.tooltipDelayMs??160;let i=e.initialOpen===!0,s=e.language,d=0,u=null,c=0;const h=e.panelMode==="managed",g=r.createElement("div");g.style.cssText=h?["position:relative","display:none","width:100%","max-width:100%","flex-direction:column","align-items:stretch",'font-family:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',"color:#edf2ff","pointer-events:none"].join(";"):["position:fixed",`right:${rt(e.placement?.right??16)}`,`bottom:${rt(e.placement?.bottom??16)}`,`z-index:${e.placement?.zIndex??2147482600}`,"display:none","flex-direction:column","align-items:flex-end",'font-family:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',"color:#edf2ff","pointer-events:none"].join(";");const M=r.createElement("button");M.type="button",M.textContent=e.toggleLabel,M.style.cssText=["pointer-events:auto",h?"align-self:flex-end":"","height:34px","padding:0 12px","border:1px solid rgba(148, 163, 184, 0.36)","border-radius:7px","background:rgba(15, 23, 42, 0.88)","color:#f8fafc",'font:600 12px system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',"box-shadow:0 10px 26px rgba(0,0,0,0.28)","cursor:pointer"].join(";");const I=r.createElement("section");I.style.cssText=["pointer-events:auto",`width:${h?"100%":rt(e.placement?.width??320)}`,"max-height:min(70vh, 720px)","overflow:auto","box-sizing:border-box","margin-bottom:8px","padding:12px","border:1px solid rgba(148, 163, 184, 0.28)","border-radius:8px","background:rgba(13, 18, 28, 0.94)","box-shadow:0 18px 44px rgba(0,0,0,0.34)","backdrop-filter:blur(8px)","display:none"].join(";");const O=r.createElement("div");O.style.cssText="display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px;";const v=r.createElement("div");v.style.cssText="font-size:13px;font-weight:700;line-height:1.2;";const m=r.createElement("div");m.style.cssText="display:flex;align-items:center;gap:8px;";const A=r.createElement("div");A.style.cssText="font-size:11px;color:#93c5fd;line-height:1.2;";const b=r.createElement("button");b.type="button",b.style.cssText=["height:24px","padding:0 8px","border:1px solid rgba(148, 163, 184, 0.3)","border-radius:6px","background:rgba(30, 41, 59, 0.8)","color:#dbeafe",'font:700 11px system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',"cursor:pointer"].join(";"),m.append(A,b),O.append(v,m);const y=r.createElement("div"),N=r.createElement("div");N.style.cssText="display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px;";const L=r.createElement("div");L.style.cssText="min-height:16px;margin-top:8px;font-size:11px;color:#94a3b8;",I.append(O,y,N,L),g.append(I,M),t.append(g);const x=r.createElement("div");x.style.cssText=["position:fixed","z-index:2147483601","display:none","max-width:min(280px, calc(100vw - 16px))","box-sizing:border-box","padding:5px 7px","border:1px solid rgba(148, 163, 184, 0.32)","border-radius:5px","background:rgba(15, 23, 42, 0.94)","box-shadow:0 10px 26px rgba(0, 0, 0, 0.3)","color:#dbeafe",'font:700 11px system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',"line-height:1.35","white-space:normal","pointer-events:none"].join(";"),t.append(x);const F={root:t,ownerDocument:r,container:g,panel:I,title:v,modeLabel:A,languageButton:b,toggleButton:M,content:y,actions:N,status:L,get open(){return i},get language(){return s},setOpen(S){i=S,ie(),e.onOpenChange?.(i)},setLanguageChrome(S){s=S.language,v.textContent=S.title,A.textContent=S.modeLabel,b.textContent=S.languageButtonLabel,F.setTooltip(b,S.languageTooltip??""),F.setTooltip(M,S.toggleTooltip??""),S.toggleTooltip&&M.setAttribute("aria-label",S.toggleTooltip)},setToggleActive(S){M.style.background=S?"rgba(29, 78, 216, 0.9)":"rgba(15, 23, 42, 0.88)"},setStatus(S,_={}){L.textContent=S,L.style.color=_.tone==="error"?"#fca5a5":"#94a3b8",d&&r.defaultView?.clearTimeout(d),d=0,!_.sticky&&(d=r.defaultView?.setTimeout(()=>{L.textContent===S&&(L.textContent=""),d=0},1800)??0)},setTooltip(S,_){const Y=_.trim();if(!Y){delete S.dataset[n],S.removeAttribute("title");return}S.dataset[n]=Y,S.removeAttribute("title")},hideTooltip:H,dispose(){d&&r.defaultView?.clearTimeout(d),V(),g.removeEventListener("pointerover",$),g.removeEventListener("pointerout",q),g.removeEventListener("focusin",te),g.removeEventListener("focusout",H),g.removeEventListener("click",H),g.remove(),x.remove()}};return M.addEventListener("click",()=>F.setOpen(!i)),g.addEventListener("pointerover",$),g.addEventListener("pointerout",q),g.addEventListener("focusin",te),g.addEventListener("focusout",H),g.addEventListener("click",H),F.setLanguageChrome({title:e.title,modeLabel:e.modeLabel,languageButtonLabel:e.languageButtonLabel,toggleTooltip:e.toggleTooltip,languageTooltip:e.languageTooltip,language:s}),ie(),F;function ie(){g.style.display="flex",I.style.display=i?"block":"none",F.setToggleActive(i),i||H()}function $(S){const _=oe(S.target);!_||_===u||re(_)}function q(S){if(!u)return;const _=S.relatedTarget instanceof Node?S.relatedTarget:null;_&&u.contains(_)||H()}function te(S){const _=oe(S.target);_&&re(_)}function oe(S){return S instanceof HTMLElement?S.closest(`[data-${Yn(n)}]`):null}function re(S){const _=S.dataset[n]?.trim();if(!_){H();return}V(),u=S,c=r.defaultView?.setTimeout(()=>{c=0,u===S&&me(S,_)},a)??0}function me(S,_){x.textContent=_,x.style.display="",x.style.left="0px",x.style.top="0px";const Y=S.getBoundingClientRect(),f=x.getBoundingClientRect(),E=r.defaultView?.innerWidth??r.documentElement.clientWidth,R=r.defaultView?.innerHeight??r.documentElement.clientHeight,B=Math.max(8,Math.min(Y.left+(Y.width-f.width)/2,E-f.width-8)),k=Y.bottom+7,T=Y.top-f.height-7,j=k+f.height<=R-8?k:Math.max(8,T);x.style.left=`${B}px`,x.style.top=`${j}px`}function H(){V(),u=null,x.style.display="none",x.textContent=""}function V(){c&&(r.defaultView?.clearTimeout(c),c=0)}}function Ut(e){const t=e.createElement("button");return t.type="button",t.style.cssText=["height:28px","border:1px solid rgba(148, 163, 184, 0.32)","border-radius:6px","background:rgba(30, 41, 59, 0.86)","color:#f8fafc",'font:600 11px system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',"cursor:pointer"].join(";"),t}function z(e){const t=e.createElement("label");return t.style.cssText="font-size:11px;color:#cbd5e1;",t}function Oe(e){const t=e.createElement("div");return t.style.cssText="display:grid;grid-template-columns:1fr 108px;gap:7px 8px;align-items:center;",t}function Ne(e){const t=e.createElement("div");return t.style.cssText="display:flex;flex-direction:column;gap:7px;",t}function ke(e){const t=e.createElement("div");return t.style.cssText="font-size:11px;font-weight:800;color:#e2e8f0;letter-spacing:0;text-transform:none;",t}function pe(e,t={}){const r=e.createElement("input");return r.type="number",t.step!=null&&(r.step=String(t.step)),t.min!=null&&(r.min=String(t.min)),t.max!=null&&(r.max=String(t.max)),r.inputMode="decimal",r.style.cssText=lr(),r}function Vn(e,t={}){const r=e.createElement("input");return r.type="range",t.step!=null&&(r.step=String(t.step)),t.min!=null&&(r.min=String(t.min)),t.max!=null&&(r.max=String(t.max)),r.style.cssText="width:100%;min-width:0;height:18px;margin:0;accent-color:#3b82f6;cursor:pointer;",r}function tt(e){const t=e.createElement("input");return t.type="color",t.style.cssText=[lr(),"padding:2px 4px"].join(";"),t}function $t(e){const t=e.createElement("input");return t.type="checkbox",t.style.cssText="justify-self:start;width:16px;height:16px;accent-color:#3b82f6;",t}function Ht(e){const t=e.createElement("div");return t.style.cssText=["min-height:26px","box-sizing:border-box","padding:5px 6px","border:1px solid rgba(148, 163, 184, 0.2)","border-radius:6px","background:rgba(15, 23, 42, 0.58)","color:#dbeafe","font:11px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace","line-height:1.35","white-space:normal"].join(";"),t}function lr(e="12px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"){return["width:108px","height:26px","min-width:0","box-sizing:border-box","border:1px solid rgba(148, 163, 184, 0.34)","border-radius:6px","background:rgba(15, 23, 42, 0.84)","color:#f8fafc","padding:0 6px",`font:${e}`].join(";")}function rt(e){return typeof e=="number"?`${e}px`:e}function Yn(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function xi(e){const t=e.root??document.body,r=t.ownerDocument;let n=na(r.defaultView),a=!1,i=!1,s=0,d=null,u=null;const c=Hn({root:t,toggleLabel:"Light",title:W().title,modeLabel:W().runtime,languageButtonLabel:W().languageButton,toggleTooltip:qe().toggleTitle,languageTooltip:qe().languageButton,tooltipDataAttribute:"lightingDebugTooltip",initialOpen:ra(r.defaultView),language:n,panelMode:e.panelMode,placement:{right:100,width:330,...e.placement},onOpenChange:o=>{aa(r.defaultView,o),o&>(0)}}),h=Ne(r),g=ke(r),M=Oe(r),I=$t(r),O=pe(r,ce("environmentIntensity")),v=tt(r),m=tt(r);M.append(z(r),I,z(r),O,z(r),v,z(r),m),h.append(g,M);const A=Ne(r),b=ke(r),y=Oe(r),N=pe(r,ce("iblIntensity")),L=pe(r,ce("iblRotationY"));y.append(z(r),N,z(r),L),A.append(b,y);const x=Ne(r),F=ke(r),ie=Oe(r),$=$t(r),q=pe(r,ce("directionalIntensity")),te=pe(r,ce("directionalHorizontalAngle")),oe=pe(r,ce("directionalElevationAngle")),re=tt(r),me=Ht(r),H=Ht(r);ie.append(z(r),$,z(r),q,z(r),te,z(r),oe,z(r),re,z(r),me,z(r),H),x.append(F,ie);const V=Ne(r),S=ke(r),_=Oe(r),Y=o=>{const l=r.createElement("div");l.style.cssText="display:grid;grid-template-columns:minmax(54px,1fr) 36px;align-items:center;gap:6px;min-width:0;";const p=Vn(r,ce(o)),P=r.createElement("output");return P.style.cssText="font:11px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;color:#dbeafe;text-align:right;font-variant-numeric:tabular-nums;",p.dataset.lightingDebugOutputId=o,P.dataset.lightingDebugOutput=o,p.addEventListener("input",()=>{P.value=se(Number(p.value))}),l.append(p,P),{input:p,wrapper:l}},f=Y("shadowStrength"),E=Y("shadowSoftness");_.append(z(r),f.wrapper,z(r),E.wrapper),V.append(S,_),c.content.style.cssText="display:flex;flex-direction:column;gap:10px;",c.content.append(h,A,x,V);const R=Ut(r),B=Ut(r);c.actions.append(R,B);const k=ie.children,T={environmentEnabled:M.children[0],environmentIntensity:M.children[2],environmentDiffuseColor:M.children[4],environmentGroundColor:M.children[6],iblIntensity:y.children[0],iblRotationY:y.children[2],directionalEnabled:k[0],directionalIntensity:k[2],directionalHorizontalAngle:k[4],directionalElevationAngle:k[6],directionalDiffuseColor:k[8],rawDirection:k[10],shadowReadout:k[12],shadowStrength:_.children[0],shadowSoftness:_.children[2]},j=new Map([["environmentIntensity",O],["iblIntensity",N],["iblRotationY",L],["directionalIntensity",q],["directionalHorizontalAngle",te],["directionalElevationAngle",oe],["shadowStrength",f.input],["shadowSoftness",E.input]]),ae=new Map([["environmentDiffuseColor",v],["environmentGroundColor",m],["directionalDiffuseColor",re]]),mr=[I,$];I.addEventListener("change",()=>{De({kind:"enabled",target:"environment"})}),$.addEventListener("change",()=>{De({kind:"enabled",target:"directional"})});for(const[o,l]of j)l.addEventListener("input",()=>{l.type==="number"&&We(l.value)===null||De({kind:"number",field:o})}),l.type==="number"&&(l.addEventListener("blur",()=>St(o)),l.addEventListener("keydown",p=>{p.key==="Enter"?(p.preventDefault(),St(o),l.blur()):p.key==="Escape"&&(p.preventDefault(),ht(o),l.blur())}));for(const[o,l]of ae)l.addEventListener("input",()=>De({kind:"color",field:o}));return c.languageButton.addEventListener("click",()=>{n=n==="zh"?"en":"zh",ia(r.defaultView,n),bt()}),R.addEventListener("click",()=>{!d||a||(Et(d),Ve(d),c.setStatus(W().resetStatus))}),B.addEventListener("click",()=>{const o=u??e.readSnapshot();if(!o||a||!Be(o)){c.setStatus(W().missingBindingStatus,{tone:"error"});return}a=!0,He(o),c.setStatus(W().savingStatus,{sticky:!0}),Promise.resolve(e.saveSnapshot(o)).then(()=>{c.setStatus(W().savedStatus,{sticky:!0})}).catch(l=>{console.error("[EditorRuntimeLightingDebugPanel] Save lighting failed",l),a=!1,c.setStatus(qn(l,W().saveFailed),{sticky:!0,tone:"error"}),He(u)})}),bt(),mt(),{dispose(){i=!0,s&&r.defaultView?.clearTimeout(s),c.dispose()}};function mt(){if(i)return;s=0;const o=e.readSnapshot();o?(d||(d=de(o)),u=de(o)):(d=null,u=null),He(o),gt(c.open?250:1e3)}function gt(o){i||(s&&r.defaultView?.clearTimeout(s),s=r.defaultView?.setTimeout(mt,o)??0)}function He(o){if(c.container.style.display=o?"flex":"none",!o){c.hideTooltip();return}for(const p of[...j.values(),...ae.values(),...mr])p.disabled=a;const l=!!o.shadow.shadowMap?.appearance;A.style.display=o.environmentTexture?"flex":"none",V.style.display=l?"flex":"none",f.input.disabled=a||!l,E.input.disabled=a||!l,R.disabled=!d||a,B.disabled=a||!Be(o),B.style.opacity=B.disabled?"0.68":"1",B.style.cursor=B.disabled?"not-allowed":"pointer",Sr()||Et(o),Ye(o),!Be(o)&&!a&&c.setStatus(W().missingBindingStatus,{tone:"error"})}function De(o){if(a)return;const l=u??e.readSnapshot();if(!l)return;const p=pt(l,o);Ve(p),gr(p)}function Ve(o){e.applySnapshot(o),u=de(o),Ye(o)}function Et(o){I.checked=o.environment.enabled,$.checked=o.directional.enabled,K("environmentIntensity",o.environment.light.intensity),Ce("environmentDiffuseColor",o.environment.light.diffuseColor??{r:1,g:1,b:1}),Ce("environmentGroundColor",o.environment.light.groundColor??{r:.48,g:.52,b:.62}),o.environmentTexture&&(K("iblIntensity",o.environmentTexture.iblIntensity),K("iblRotationY",o.environmentTexture.iblRotationY));const l=at(o.directional.light.direction);K("directionalIntensity",o.directional.light.intensity),K("directionalHorizontalAngle",l.horizontalAngleDeg),K("directionalElevationAngle",l.elevationAngleDeg),Ce("directionalDiffuseColor",o.directional.light.diffuseColor??{r:1,g:1,b:1}),o.shadow.shadowMap?.appearance&&(K("shadowStrength",o.shadow.shadowMap.appearance.strength),K("shadowSoftness",o.shadow.shadowMap.appearance.softness))}function gr(o){const l=zt(r);l!==I&&(I.checked=o.environment.enabled),l!==$&&($.checked=o.directional.enabled);for(const p of j.keys()){const P=j.get(p);!P||l===P||K(p,Pe(o,p))}for(const p of ae.keys()){const P=ae.get(p);!P||l===P||Ce(p,Ct(o,p))}}function pt(o,l){if(l.kind==="enabled"){const P=l.target==="environment"?I.checked:$.checked;return da(o,l.target,P)}if(l.kind==="color"){const P=Ct(o,l.field);return ca(o,l.field,pr(l.field,P))}const p=Pe(o,l.field);return sa(o,l.field,Er(l.field,p))}function K(o,l){const p=j.get(o);if(!p)return;p.value=String(Vr(l));const P=c.container.querySelector(`output[data-lighting-debug-output="${o}"]`);P&&(P.value=se(l))}function Er(o,l){const p=j.get(o);if(!p)return l;const P=We(p.value);if(P===null)return l;const ve=ce(o),Le=ve.min??Number.NEGATIVE_INFINITY,hr=ve.max??Number.POSITIVE_INFINITY;return Math.min(hr,Math.max(Le,P))}function St(o){if(a)return;const l=u??e.readSnapshot();if(!l)return;const p=j.get(o);if(!p||We(p.value)===null){ht(o);return}const P=pt(l,{kind:"number",field:o}),ve=Pe(l,o),Le=Pe(P,o);Math.abs(Le-ve)>1e-6&&Ve(P),K(o,Le)}function ht(o){const l=u??e.readSnapshot();l&&K(o,Pe(l,o))}function Ce(o,l){const p=ae.get(o);p&&(p.value=Yr(l))}function pr(o,l){const p=ae.get(o);return p?qr(p.value,l):l}function Ye(o){const l=o.directional.light.direction;me.textContent=`x ${se(l.x)} y ${se(l.y)} z ${se(l.z)}`;const p=ta(o.shadow.mode,W()),P=o.shadow.shadowMap;H.textContent=o.shadow.mode==="shadow-map"&&P?[`${p} / ${P.backend??"pending"}`,...P.appearance?[`strength ${se(P.appearance.strength)} softness ${se(P.appearance.softness)}`]:[],`depth S ${P.staticRefreshCount??"-"} D ${P.dynamicRefreshCount??"-"} C ${P.compositeRefreshCount??"-"}`,P.lastRefreshReasons[P.lastRefreshReasons.length-1]??"ready"].join(`
|
|
3
3
|
`):`${p}
|
|
4
4
|
shadow length x${se(o.shadow.projectedLengthMultiplier)}`}function bt(){const o=W(),l=qe();c.setLanguageChrome({title:o.title,modeLabel:o.runtime,languageButtonLabel:o.languageButton,toggleTooltip:l.toggleTitle,languageTooltip:l.languageButton,language:n}),g.textContent=o.environmentSection,b.textContent=o.environmentTextureSection,F.textContent=o.directionalSection,S.textContent=o.shadowSection,T.environmentEnabled.textContent=o.enabled,T.environmentIntensity.textContent=o.intensity,T.environmentDiffuseColor.textContent=o.skyLightColor,T.environmentGroundColor.textContent=o.groundColor,T.iblIntensity.textContent=o.iblIntensity,T.iblRotationY.textContent=o.iblRotationY,T.directionalEnabled.textContent=o.enabled,T.directionalIntensity.textContent=o.intensity,T.directionalHorizontalAngle.textContent=o.horizontalAngle,T.directionalElevationAngle.textContent=o.elevationAngle,T.directionalDiffuseColor.textContent=o.lightColor,T.rawDirection.textContent=o.rawDirection,T.shadowReadout.textContent=o.shadowReadout,T.shadowStrength.textContent=o.shadowStrength,T.shadowSoftness.textContent=o.shadowSoftness;for(const[p,P]of j)P.setAttribute("aria-label",T[p].textContent??p);c.setTooltip(I,l.enabled),c.setTooltip(T.environmentEnabled,l.enabled),c.setTooltip(T.environmentIntensity,l.environmentIntensity),c.setTooltip(O,l.environmentIntensity),c.setTooltip(T.environmentDiffuseColor,l.skyLightColor),c.setTooltip(v,l.skyLightColor),c.setTooltip(T.environmentGroundColor,l.groundColor),c.setTooltip(m,l.groundColor),c.setTooltip(T.iblIntensity,l.iblIntensity),c.setTooltip(N,l.iblIntensity),c.setTooltip(T.iblRotationY,l.iblRotationY),c.setTooltip(L,l.iblRotationY),c.setTooltip($,l.enabled),c.setTooltip(T.directionalEnabled,l.enabled),c.setTooltip(T.directionalIntensity,l.directionalIntensity),c.setTooltip(q,l.directionalIntensity),c.setTooltip(T.directionalHorizontalAngle,l.horizontalAngle),c.setTooltip(te,l.horizontalAngle),c.setTooltip(T.directionalElevationAngle,l.elevationAngle),c.setTooltip(oe,l.elevationAngle),c.setTooltip(T.directionalDiffuseColor,l.lightColor),c.setTooltip(re,l.lightColor),c.setTooltip(T.rawDirection,l.rawDirection),c.setTooltip(me,l.rawDirection),c.setTooltip(T.shadowReadout,l.shadowReadout),c.setTooltip(H,l.shadowReadout),c.setTooltip(T.shadowStrength,l.shadowStrength),c.setTooltip(f.input,l.shadowStrength),c.setTooltip(T.shadowSoftness,l.shadowSoftness),c.setTooltip(E.input,l.shadowSoftness),R.textContent=o.reset,c.setTooltip(R,l.reset),B.textContent=o.save,c.setTooltip(B,l.save),u&&Ye(u)}function Sr(){const o=zt(r);return o===c.languageButton||o===I||o===$||[...j.values()].includes(o)||[...ae.values()].includes(o)}function W(){return Qr(n)}function qe(){return ea(n)}}function qn(e,t){const r=e instanceof Error?e.message:String(e??"");return r?`${t}: ${r}`:t}const Kn=Object.freeze({preparingEditor:"正在准备编辑器…",enterEditor:"进入编辑场景",checkingEditor:"正在检查编辑环境…",enteringEditor:"正在进入编辑界面…",restoringPlayMode:"正在恢复游戏…",retryEditor:"重试进入编辑器",reloadPage:"刷新页面恢复"});function Oi(e){const t=e.browser?.window??window,r=e.browser?.document??t.document,n=e.browser?.canvasId??"renderCanvas",a=e.initialMode??"play",i=e.initialModeIntent??"fresh",s=Object.freeze({...Kn,...e.browser?.entryContent}),d=(f,E)=>{e.reportError?e.reportError(f,E):console.error(`[FpsGameEditor] ${f}`,E)},u=Ln({baseUrl:e.editorModule.baseUrl,...e.editorModule.manifestUrl?{manifestUrl:e.editorModule.manifestUrl}:{},importModule:e.editorModule.importModule}),c=Nn({performance:t.performance}),h=new Set,g=new Set,M=new WeakMap;let I=null,O=null,v=je(),m=null,A=null,b=!1,y=!1,N=null,L;const x=()=>{if(y)return;const f=t;f.__FPS_EDITOR_ENTRY_DIAGNOSTICS__=v},F=()=>Object.freeze({entry:L.getState()}),ie=()=>{if(y)return;const f=F();for(const E of[...h])try{E(f)}catch(R){d("editor entry listener failed",R)}},$=f=>{if(f.phase==="preparing"){m=c.mark(),v=je({...v,enter:null}),x();return}if(!(f.phase==="editing"||f.phase==="failed"&&f.failure?.phase!=="warmup")||!m)return;const R=m;m=null,v=je({...v,enter:c.measure(R)}),x()},q=f=>{const E=M.get(f);if(E)return E;const R=Promise.resolve().then(()=>f.switcher.dispose());return M.set(f,R),R.finally(()=>{M.get(f)===R&&M.delete(f)}).catch(()=>{}),R},te=async()=>{const f=[];for(const E of[...g])try{await q(E),g.delete(E)}catch(R){f.push(R)}Ge(f,"Retired Local Editor entry cleanup failed.")},oe=f=>{I===f&&(I=null),g.add(f),A!==null&&t.clearTimeout(A),A=t.setTimeout(()=>{if(A=null,!y){try{L.reset()}catch(E){d("editor entry reset after play-mode return failed",E);return}L.start().catch(E=>d("editor warmup after play-mode return failed",E))}},0)},re=f=>{if(y||f.aborted)return Promise.reject(Fe());if(I)return Promise.resolve(I);if(O)return O;const E=te().then(async()=>{const R=c.mark();let B;try{B=await u.load(f)}catch(j){throw Wn(j)?new Ia("开发服务已更新,当前预览已失效,请刷新页面。"):j}finally{v=je({build:u.getManifest()?.build??null,editorModuleImportAttempt:u.getImportAttempt(),editorModuleWarmup:c.measure(R),enter:v.enter}),x()}if(y||f.aborted)throw Fe();const k={switcher:void 0,editorModeEntryAttempted:!1,playModeEntryCompleted:!1},T=await e.editorModule.mount(B,{projectMode:{async enterEditorMode(j){k.editorModeEntryAttempted=!0;const ae=Jn(r,n);try{await e.projectMode.enterEditorMode(j)}finally{Zn(r,ae)}},async enterPlayMode(j){await e.projectMode.enterPlayMode(j),k.playModeEntryCompleted=!0,oe(k)}},getCanvas:()=>ur(r,n)},f);if(k.switcher=T,y||f.aborted)throw await q(k),Fe();return I=k,k});return O=E,E.finally(()=>{O===E&&(O=null)}).catch(()=>{}),E};L=Aa({backend:{warmup:f=>re(f).then(()=>{}),prepare:f=>re(f.signal),async commit(f,E){if(f!==I)throw new Error("Prepared Local Editor switcher is no longer current.");if(await f.switcher.enterEditor(),E.signal.aborted)throw Fe()},async rollback(f){const E=[];try{await q(f),g.delete(f),I===f&&(I=null)}catch(R){E.push(R)}if(f.editorModeEntryAttempted&&!f.playModeEntryCompleted)try{await e.projectMode.enterPlayMode({reason:"editor-entry-rollback"}),f.playModeEntryCompleted=!0}catch(R){E.push(R)}Ge(E,"Local Editor entry rollback failed.")},async dispose(){const f=O;await Promise.allSettled(f?[f]:[]);const E=[];if(I){const R=I;try{await q(R),I===R&&(I=null)}catch(B){E.push(B)}}try{await te()}catch(R){E.push(R)}Ge(E,"Local Editor entry cleanup failed.")}},reportFailure:({failure:f,cause:E,rollbackCause:R})=>{d(`editor entry ${f.code}`,R===void 0?E:fr(f.message,[E,R]))},reportListenerError:f=>d("editor entry listener failed",f)});const H=L.subscribe(f=>{$(f),ie()});x();const V={start:()=>L.start(),enterEditor:()=>L.enter(),retryEditorEntry:()=>L.retry(),getEntryState:F,getDiagnostics:()=>v,subscribe(f){return y?()=>{}:(h.add(f),f(F()),()=>h.delete(f))},dispose(){if(N)return N;y=!0;const f=(async()=>{t.removeEventListener("pagehide",Y),r.removeEventListener("DOMContentLoaded",_),A!==null&&(t.clearTimeout(A),A=null),S(),H(),h.clear(),delete t.__FPS_EDITOR_ENTRY_DIAGNOSTICS__;const E=[];try{await L.dispose()}catch(R){E.push(R)}E.push(...await Kr()),Ge(E,"Local Editor Entry cleanup failed.")})();return N=f,f.catch(()=>{N===f&&(N=null)}),f}},S=e.browser?.showEntryButton===!1?()=>{}:Xn(V,t,r,e.browser?.root,s,d),_=()=>{if(y||b)return;b=!0,r.removeEventListener("DOMContentLoaded",_),(a==="edit"&&i==="fresh"?V.enterEditor():V.start()).catch(E=>d("local editor entry start failed",E))},Y=()=>{V.dispose().catch(f=>d("local editor entry dispose failed",f))};return t.addEventListener("pagehide",Y),e.browser?.autoStart!==!1&&(r.readyState==="loading"?(r.addEventListener("DOMContentLoaded",_,{once:!0}),t.queueMicrotask(_)):_()),V}function Wn(e){const t=e instanceof Error?e.message:String(e);return/failed to fetch dynamically imported module|error loading dynamically imported module|importing a module script failed/i.test(t)}function Xn(e,t,r,n,a,i){r.getElementById("fps-game-editor-entry-surface")?.remove(),r.getElementById("fps-game-editor-entry")?.remove();const s=r.createElement("div");s.id="fps-game-editor-entry-surface";const d=r.createElement("p");d.style.cssText=["margin:0 0 14px","color:var(--fps-editor-panel-fg,#edf0f2)",'font:500 14px/1.6 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif'].join(";");const u=r.createElement("button");u.id="fps-game-editor-entry",u.type="button";const c=["position:fixed","top:14px","right:16px","z-index:2147482604","height:32px","min-width:104px","padding:0 12px","border:1px solid #aee7c2","border-radius:999px","background:#e1f8e8","color:#2f6f52",'font:800 12px system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif',"box-shadow:0 8px 20px rgba(15,23,42,.18)","white-space:nowrap","user-select:none"].join(";"),h=["position:static","height:36px","min-width:132px","padding:0 14px","border:1px solid var(--fps-editor-border-strong,#59656d)","border-radius:4px","background:var(--fps-editor-field-bg,#252b2f)","color:var(--fps-editor-panel-fg,#f4f6f7)",'font:700 13px system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif',"box-shadow:none","white-space:nowrap","user-select:none"].join(";");u.style.cssText=c,s.append(d,u);let g=Vt(e.getEntryState(),a);const M=v=>{g=Vt(v,a);const m=g.action==="reload";u.disabled=g.disabled,u.textContent=g.label,u.title=g.title,u.style.cssText=m?h:c,u.style.opacity=g.disabled?".72":"1",u.style.cursor=g.disabled?"default":"pointer",d.hidden=!m||n!==void 0,d.textContent=v.entry.failure?.message??a.reloadPage,s.setAttribute("role",m?"alert":"presentation"),s.style.cssText=m&&n===void 0?["position:fixed","left:50%","top:50%","transform:translate(-50%,-50%)","z-index:2147482604","width:min(420px,calc(100vw - 32px))","padding:20px","border:1px solid var(--fps-editor-danger-border,#714040)","border-radius:6px","background:var(--fps-editor-panel-bg,#171b1e)","box-shadow:0 18px 50px rgba(0,0,0,.42)"].join(";"):"",g.hidden?s.remove():s.isConnected||(n??r.body)?.append(s)},I=e.subscribe(M),O=()=>{(g.action==="enter"?e.enterEditor():g.action==="retry"?e.retryEditorEntry():g.action==="reload"?Promise.resolve(t.location.reload()):Promise.resolve()).catch(m=>i("editor entry action failed",m))};return u.addEventListener("click",O),()=>{I(),u.removeEventListener("click",O),s.remove()}}function Vt(e,t){switch(e.entry.phase){case"idle":case"warming":return ne("none",!0,!1,t.preparingEditor);case"ready":return ne("enter",!1,!1,t.enterEditor);case"preparing":return ne("none",!0,!1,t.checkingEditor);case"committing":return ne("none",!0,!1,t.enteringEditor);case"rolling-back":return ne("none",!0,!1,t.restoringPlayMode);case"failed":return e.entry.failure?.recoverable?ne("retry",!1,!1,t.retryEditor,e.entry.failure.message):ne("reload",!1,!1,t.reloadPage,e.entry.failure?.message);case"editing":case"disposed":return ne("none",!0,!0,t.enterEditor)}return ne("none",!0,!0,t.enterEditor)}function ne(e,t,r,n,a=n){return Object.freeze({action:e,disabled:t,hidden:r,label:n,title:a})}function je(e={}){return Object.freeze({build:e.build??null,editorModuleImportAttempt:e.editorModuleImportAttempt??0,editorModuleWarmup:e.editorModuleWarmup??null,enter:e.enter??null})}function Jn(e,t){const r=ur(e,t);return r?.parentNode?{canvas:r,parent:r.parentNode,nextSibling:r.nextSibling}:null}function Zn(e,t){if(!t||t.canvas.isConnected)return;const r=t.parent.isConnected?t.parent:e.body,n=t.nextSibling?.parentNode===r?t.nextSibling:null;r.insertBefore(t.canvas,n)}function ur(e,t){const r=e.getElementById(t),n=e.defaultView?.HTMLCanvasElement;return n?r instanceof n?r:null:r?.tagName==="CANVAS"?r:null}function fr(e,t){return Object.assign(new Error(e),{errors:[...t]})}function Ge(e,t){if(e.length===1)throw e[0];if(e.length>1)throw fr(t,e)}function Fe(){return Object.assign(new Error("Local Editor Entry was disposed."),{name:"AbortError"})}export{ji as CAMERA_LANGUAGE_OPTIONS,Gi as DEFAULT_EDITOR_SCENE_ARTIST_MATERIAL_ASSET_ID,Fi as DEFAULT_EDITOR_SCENE_CAMERA,Bi as DEFAULT_EDITOR_SCENE_ENVIRONMENT_LIGHT,zi as DEFAULT_EDITOR_SCENE_SUN_LIGHT,Ui as DEFAULT_EDITOR_SCENE_TRANSFORM_TYPE_OPTIONS,$i as DEFAULT_PBR_EDITOR_SCENE_MATERIAL_ASSET,Hi as DEFAULT_PBR_EDITOR_SCENE_MATERIAL_ASSET_GUID,Vi as DEFAULT_PBR_EDITOR_SCENE_MATERIAL_ASSET_ID,Yi as DEFAULT_READONLY_EDITOR_SCENE_MATERIAL_ASSET_IDS,qi as DEFAULT_STANDARD_EDITOR_SCENE_MATERIAL_ASSET,Ki as DEFAULT_STANDARD_EDITOR_SCENE_MATERIAL_ASSET_GUID,Wi as DEFAULT_STANDARD_EDITOR_SCENE_MATERIAL_ASSET_ID,Xi as EDITOR_SCENE_ASSET_RESOURCE_PROJECTION_VERSION,Ji as EDITOR_SCENE_BUILTIN_MATERIAL_SHADER_DEFINITIONS,Zi as EDITOR_SCENE_BUILTIN_MATERIAL_SHADER_DEFINITION_REGISTRY,Qi as EDITOR_SCENE_DEFAULT_DIRECTIONAL_LIGHT_DIRECTION,eo as EDITOR_SCENE_DUPLICATE_MATERIAL_ASSET_VALUE_PREFIX,to as EDITOR_SCENE_ENVIRONMENT_LIGHT_ID,ro as EDITOR_SCENE_FIELD_SCHEMA,ao as EDITOR_SCENE_LARGE_SELECTION_LIGHTWEIGHT_INSPECTOR_THRESHOLD,Zt as EDITOR_SCENE_LIGHTING_DEBUG_LANGUAGE_STORAGE_KEY,Zr as EDITOR_SCENE_LIGHTING_DEBUG_NUMBER_FIELDS,Jt as EDITOR_SCENE_LIGHTING_DEBUG_STORAGE_KEY,Mt as EDITOR_SCENE_LIGHTING_DEBUG_TEXT,_t as EDITOR_SCENE_LIGHTING_DEBUG_TOOLTIPS,no as EDITOR_SCENE_LIGHT_DIRECTION_ELEVATION_ANGLE_PATH,yr as EDITOR_SCENE_LIGHT_DIRECTION_ELEVATION_MAX_DEG,Pr as EDITOR_SCENE_LIGHT_DIRECTION_ELEVATION_MIN_DEG,io as EDITOR_SCENE_LIGHT_DIRECTION_HORIZONTAL_ANGLE_PATH,oo as EDITOR_SCENE_LIGHT_DIRECTION_HORIZONTAL_MAX_DEG,so as EDITOR_SCENE_LIGHT_DIRECTION_HORIZONTAL_MIN_DEG,co as EDITOR_SCENE_LIGHT_INSPECTOR_LANGUAGE_OPTIONS,lo as EDITOR_SCENE_MAIN_CAMERA_ID,uo as EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX,fo as EDITOR_SCENE_MATERIAL_ASSET_ID_PREFIX,mo as EDITOR_SCENE_PREFAB_COMPOSITION_VERSION,go as EDITOR_SCENE_PREFAB_DEFAULT_MODEL_NODE_ID,Eo as EDITOR_SCENE_PREFAB_DEFAULT_ROOT_NODE_ID,po as EDITOR_SCENE_RENDERING_PROFILE_ALLOWED_PATCH_PATHS,So as EDITOR_SCENE_ROOT_ID,ho as EDITOR_SCENE_ROOT_TRANSFORM,bo as EDITOR_SCENE_RUNTIME_COLOR_SLOTS,yo as EDITOR_SCENE_RUNTIME_INTENSITY_SLOTS,Po as EDITOR_SCENE_RUNTIME_METALLIC_ROUGHNESS_SLOTS,Io as EDITOR_SCENE_RUNTIME_TEXTURE_SLOTS,Ao as EDITOR_SCENE_SCHEMA_VERSION,br as EDITOR_SCENE_SOURCE_ID,yt as EDITOR_SCENE_SOURCE_TYPE,To as EDITOR_SCENE_STATIC_SHADOW_BAKE_ACTION_PATH,Ro as EDITOR_SCENE_SUN_LIGHT_ID,wo as FPS_GAME_EDITOR_GROUND_DECAL_FEATURE_ID,Mo as FPS_GAME_EDITOR_GROUND_DECAL_PLUGIN_ID,_o as FPS_GAME_EDITOR_GROUND_DECAL_PLUGIN_PACKAGE,Wt as FPS_GAME_EDITOR_OBJECT_CREATE_FROM_FEATURE_COMMAND_ID,Do as FPS_GAME_EDITOR_SCENE_OBJECTS_CREATE_MAX_ITEMS,Co as MATERIAL_LANGUAGE_OPTIONS,vo as PLAYABLE_AUTHORING_API_BASE,Lo as PLAYABLE_BABYLON_DEFAULT_OUTLINE_OVERRIDE,mi as PLAYABLE_EDITOR_ASSET_CATALOG_KINDS,Ti as PLAYABLE_EDITOR_BUNDLED_ALIAS_PACKAGE_IDS,le as PLAYABLE_EDITOR_COMMAND_NAME,va as PLAYABLE_EDITOR_DEFAULT_EXTENSIONS,Mn as PLAYABLE_EDITOR_ENTRY_IMMUTABLE_CACHE_CONTROL,wn as PLAYABLE_EDITOR_ENTRY_MANIFEST_CACHE_CONTROL,Rn as PLAYABLE_EDITOR_ENTRY_MANIFEST_PATH,cr as PLAYABLE_EDITOR_ENTRY_MANIFEST_SCHEMA_VERSION,Ca as PLAYABLE_EDITOR_ENVIRONMENT_TEXTURE_EXTENSIONS,X as PLAYABLE_EDITOR_EVENT_NAME,rr as PLAYABLE_EDITOR_IMAGE_EXTENSIONS,ct as PLAYABLE_EDITOR_MODEL_EXTENSIONS,Ai as PLAYABLE_EDITOR_PACKAGE_IDS,_e as PLAYABLE_EDITOR_PACKAGE_RESOLUTION_CONTRACT,Pi as PLAYABLE_EDITOR_POST_MESSAGE,Ri as PLAYABLE_EDITOR_PREBUNDLE_PACKAGE_IDS,xo as PLAYABLE_EDITOR_SCENE_COMPILER_ID,Oo as PLAYABLE_EDITOR_SCENE_COMPILER_VERSION,No as PLAYABLE_EDITOR_SCENE_OUTLINE_DEFAULT_DISABLED_REASON,lt as PLAYABLE_EDITOR_SOUND_EXTENSIONS,dt as PLAYABLE_EDITOR_TEXTURE_EXTENSIONS,ko as PLAYABLE_FORGE_PLAY_BRIDGE_SOURCE,jo as PLAYABLE_FORGE_PLAY_COMMAND,Go as PLAYABLE_FORGE_PLAY_COMMAND_ALIASES,Fo as PLAYABLE_FORGE_PLAY_EVENT,Bo as PLAYABLE_FORGE_PLAY_EVENT_ALIASES,zo as PLAYABLE_FORGE_PLAY_HISTORY_COMMANDS,Uo as PLAYABLE_FORGE_PLAY_POST_MESSAGE,$o as PLAYABLE_FORGE_PLAY_PROJECT_ASSET_COMMANDS,Ho as PLAYABLE_GROUND_DECAL_TEXTURE_TINT,Vo as PLAYABLE_LOCAL_EDITOR_HOST_MANIFEST_VERSION,Yo as PLAYABLE_LOCAL_EDITOR_HOST_REQUIRED_CONTRACT,qo as PLAYABLE_LOCAL_EDITOR_SAVE_CANCELLATION_CODE,Ko as PLAYABLE_PROJECT_ASSET_IMPORT_MAX_REQUEST_BYTES,Ia as PlayableEditorEntryReloadRequiredError,fe as PlayableEditorManagedAssetError,Wo as SCENE_MAIN_SOURCE_RENDERING_COMPANION_CONFIG_KEY,Xo as SCENE_MAIN_SOURCE_STATIC_SHADOWS_COMPANION_CONFIG_KEY,Jo as addAssetLibraryItemToEditorSceneDocument,Zo as addEditorSceneLightingPreviewColors,Qo as addEditorSceneMaterialAsset,es as addEditorSceneMaterialAssetAndBind,ts as addEditorSceneMaterialAssetAndBindPrefabOverride,rs as addEditorScenePrefabAsset,as as addVec3,ns as appendEditorSceneReadonlyInspectorProperty,is as appendEditorSceneRuntimeColorProperties,os as appendEditorSceneRuntimeInspectorProperty,ss as appendEditorSceneRuntimeTextureProperties,cs as appendEditorSceneRuntimeVector3Properties,ds as applyEditorSceneAuthoringHierarchyPatch,ls as applyEditorSceneAuthoringMarkerPatch,us as applyEditorSceneDocumentMutationPatch,fs as applyEditorSceneJsonFieldPatch,ms as applyEditorSceneRenderingProfileAction,gs as applyEditorSceneRenderingProfilePatch,Es as applyEditorSceneSerializedPropertyPatch,ps as areMarkerGraphsEqual,Ss as assertEditorSceneDocumentAssetCatalogCompleteness,hs as assertEditorSceneMarkerConfigContract,bs as assertEditorSceneMaterialAssetIntegrity,ys as assertEditorScenePrefabMarkerNodeContract,Ps as assertEditorSceneTransformComponentContract,Is as assertPlayableEditorSceneDocumentContract,As as assertPlayableEditorScenePersistedSourceContract,Ts as bindImportedEditorSceneMaterialAssets,ot as buildPlayableEditorManagedAssetArgs,Rs as bumpEditorSceneAuthoringSourceRevision,ws as callEditorSceneRuntimeMethod,Ms as canEditEditorSceneShadowSettings,_s as canEditorSceneGameObjectHaveChildren,Ds as canPatchPlayableEditorSceneGroundDecalMultiField,Cs as canPatchPlayableGroundDecalLayerField,Be as canSaveEditorSceneLightingDebugSnapshot,vs as canonicalizePlayableJsonNumbers,Ls as clampEditorSceneLightingPreview01,xs as clampEditorSceneLightingPreviewNumber,Os as clampEditorSceneMaterialPreview01,Ns as cleanupEditorSceneGameObjectOverrides,ks as cloneBuiltInMarkerTypeDefinition,js as cloneEditorSceneDocument,de as cloneEditorSceneLightingDebugSnapshot,Gs as cloneEditorTransformMatrix,Fs as cloneEditorTransformSnapshot,Bs as cloneMarker,zs as cloneMarkerGraphCommand,Us as cloneMarkerTypeDefinition,$s as cloneRelation,Hs as cloneVec3,Vs as collectEditorSceneAssetReferences,Ys as collectEditorSceneChildMaterialSlots,qs as collectEditorSceneGameObjectSubtreeIds,Ks as collectEditorSceneMaterialAssetBindingIds,Ws as collectEditorSceneMaterialAssetReferences,Xs as collectEditorSceneMaterialAssetUsages,Js as collectEditorSceneRenderingAlphaIndexMigrationTargetIds,Zs as collectEditorSceneRuntimeChildNodes,Qs as collectEditorSceneRuntimeMeshes,ec as collectEditorSceneSlotSourceMaterialIndices,tc as collectEditorSceneSubtreeIdList,rc as collectEditorSceneSubtreeIds,ac as collectEditorShadowReceiverCandidates,Di as collectMissingPlayableEditorPackageAliasFiles,qr as colorFromEditorSceneLightingHex,Yr as colorToEditorSceneLightingHex,nc as combineEditorTransforms,ic as compareEditorSceneAssetLibraryItems,oc as compileEditorSceneDocumentToSceneConfig,vi as compilePlayableGroundDecalRuntimeConfig,sc as composeEditorTransformMatrix,cc as createArtistMaterialAssetInspectorProperties,dc as createArtistMaterialBindingSummary,lc as createArtistMaterialInspectorSections,uc as createAuthoredMarkerTypeDefinition,fc as createBabylonAssetContainerProjectionImporter,mc as createBabylonPrimitiveProjectionInstancingController,gc as createBoundsCenter,Ec as createCameraInspectorProperties,pc as createChildMaterialBindingInspectorProperties,Sc as createChildMaterialBindingSummary,hc as createDefaultEditorSceneCameraGameObject,bc as createDefaultEditorSceneEnvironmentLightGameObject,yc as createDefaultEditorSceneSunLightGameObject,ai as createDefaultEditorSceneTransformPatchFromRuntimePatch,Pc as createDefaultMarkerScaleForKind,Ic as createDefaultPbrEditorSceneMaterialAsset,Ac as createDefaultStandardEditorSceneMaterialAsset,Tc as createEditorSceneAssetFromLibraryItem,Rc as createEditorSceneAssetHydrationCatalog,wc as createEditorSceneAssetLibrary,Mc as createEditorSceneAssetLibraryItem,_c as createEditorSceneAssetLibrarySnapshot,Dc as createEditorSceneAssetPlacementPatch,Cc as createEditorSceneAssetResourceProjection,vc as createEditorSceneAuthoringSourceDescriptor,Lc as createEditorSceneCameraInspectorSection,xc as createEditorSceneCommonInspectorProperties,Oc as createEditorSceneCommonInspectorSection,Nc as createEditorSceneComponentsInspectorProperties,kc as createEditorSceneComponentsInspectorSection,jc as createEditorSceneComponentsInspectorSummary,Gc as createEditorSceneCreateGroupPatch,Fc as createEditorSceneCreatePrimitivePatch,Bc as createEditorSceneDeleteSubtreePatch,Ar as createEditorSceneDirectionalLightDirectionFromAngles,zc as createEditorSceneDirectionalLightDirectionFromTransformRotation,Uc as createEditorSceneDirectionalLightShadowSummaryInspectorSection,$c as createEditorSceneDocumentInspectorProperty,Hc as createEditorSceneDocumentInspectorSections,Vc as createEditorSceneDuplicateMaterialAssetForBindingPatch,Yc as createEditorSceneDuplicateMaterialAssetValue,qc as createEditorSceneDuplicateSelectionPatch,Kc as createEditorSceneDuplicatedMaterialAsset,Wc as createEditorSceneDuplicatedMaterialAssetCopy,Xc as createEditorSceneDuplicatedPrefabDefinition,Jc as createEditorSceneFieldInspectorValidator,Zc as createEditorSceneGameObjectFieldPatch,Qc as createEditorSceneGameObjectGuid,ed as createEditorSceneGameObjectsFieldPatch,td as createEditorSceneGroupSelectionPatch,rd as createEditorSceneHierarchyMovePatch,ad as createEditorSceneHierarchySourceInspectorProperties,nd as createEditorSceneHierarchySourceInspectorSection,id as createEditorSceneHierarchySourceInspectorSummary,od as createEditorSceneIdentityTransformComponent,sd as createEditorSceneInspectorActionProperty,cd as createEditorSceneLightInspectorProperties,dd as createEditorSceneLightInspectorSections,ld as createEditorSceneMarkerConfig,ud as createEditorSceneMarkerGameObjectDocument,fd as createEditorSceneMarkerGeometry,md as createEditorSceneMarkerGraphPatchLabel,gd as createEditorSceneMaterialActionPatch,Ed as createEditorSceneMaterialAssetFieldInspectorPropertyInput,pd as createEditorSceneMaterialAssetFromShaderDefinition,Sd as createEditorSceneMaterialAssetFromSourceProfile,hd as createEditorSceneMaterialAssetGuid,bd as createEditorSceneMaterialAssetId,yd as createEditorSceneMaterialAssetInspectorObject,Pd as createEditorSceneMaterialAssetMeta,Id as createEditorSceneMaterialAssetOwnershipView,Ad as createEditorSceneMaterialAssetPreview,Td as createEditorSceneMaterialAssetSelectionId,Rd as createEditorSceneMaterialBindingSummary,wd as createEditorSceneMaterialBrowserAssetItems,Md as createEditorSceneMaterialPickerControlOptions,_d as createEditorSceneMaterialShaderDefinitionRegistry,Dd as createEditorSceneMetadataInspectorProperties,Cd as createEditorSceneMetadataInspectorSection,vd as createEditorSceneMetadataInspectorSummary,Ld as createEditorSceneModelAssetInspectorObject,xd as createEditorSceneModelAssetSelectionId,Od as createEditorSceneModelGameObjectForAsset,Nd as createEditorScenePlacementWorldTransform,kd as createEditorScenePlayableFieldInspectorExtraValidator,jd as createEditorScenePrefabActionPatch,Gd as createEditorScenePrefabAgentSummary,Fd as createEditorScenePrefabBrowserAssetItems,Bd as createEditorScenePrefabDefinitionFromAsset,zd as createEditorScenePrefabDefinitionFromGameObject,Ud as createEditorScenePrefabDraftCommitInput,$d as createEditorScenePrefabGameObjectForAsset,Hd as createEditorScenePrefabGroupNode,Vd as createEditorScenePrefabGuid,Yd as createEditorScenePrefabInstanceGameObject,qd as createEditorScenePrefabInstanceScopedNodeId,Kd as createEditorScenePrefabMarkerNode,Wd as createEditorScenePrefabMaterialOverrideInspectorSection,Xd as createEditorScenePrefabNodeFromAsset,Jd as createEditorScenePrefabPrimitiveNode,Zd as createEditorScenePrefabSourceStructureInspectorSection,Qd as createEditorScenePrefabStageCompositionProjectionNodes,el as createEditorScenePrefabStageContextLightProjectionNodes,tl as createEditorScenePrefabStageInspectorObject,rl as createEditorScenePrefabStageMaterialSlotGroup,al as createEditorScenePrefabStageMaterialSlotItems,nl as createEditorScenePrefabStageModelProjectionNode,il as createEditorScenePrefabStageNodeFallbackLabel,ol as createEditorScenePrefabStageNodeTransform,sl as createEditorScenePrefabStageNodeTreeItem,cl as createEditorScenePrefabStageProjectionKind,dl as createEditorScenePrefabStageProjectionNodeFromCompositionNode,ll as createEditorScenePrefabStageProjectionNodeId,ul as createEditorScenePrefabStageRuntimeGroups,fl as createEditorScenePrefabStageRuntimeLeaf,ml as createEditorScenePrefabStageRuntimeNodeTree,gl as createEditorScenePrefabStageSourceItem,El as createEditorScenePrefabStageStableId,pl as createEditorScenePrimitiveInspectorProperties,Sl as createEditorScenePrimitiveInspectorSection,hl as createEditorSceneReadonlyDocumentInspectorProperty,bl as createEditorSceneReadonlyInspectorProperty,yl as createEditorSceneReadonlyInspectorSection,Pl as createEditorSceneReadonlyVector3Properties,Il as createEditorSceneRenamePatch,Al as createEditorSceneRendererInspectorProperties,Tl as createEditorSceneRendererInspectorSection,Rl as createEditorSceneRendererInspectorSummary,wl as createEditorSceneRenderingInspectorSection,Ml as createEditorSceneRenderingPanelState,_l as createEditorSceneRenderingProfileDraftState,Dl as createEditorSceneReparentPatch,Cl as createEditorSceneRootTransformComponent,vl as createEditorSceneRuntimeAnimationSkeletonSection,Ll as createEditorSceneRuntimeBindingSection,xl as createEditorSceneRuntimeCollisionsSection,Ol as createEditorSceneRuntimeGeometryBoxSection,Nl as createEditorSceneRuntimeInspectorSection,kl as createEditorSceneRuntimeInspectorSections,jl as createEditorSceneRuntimeInspectorSectionsForDocument,Gl as createEditorSceneRuntimeInspectorSnapshot,Fl as createEditorSceneRuntimeIntensityPropertiesSection,Bl as createEditorSceneRuntimeMaterialColorsSection,zl as createEditorSceneRuntimeMaterialSection,Ul as createEditorSceneRuntimeMaterialTexturesSection,$l as createEditorSceneRuntimeMetallicRoughnessSection,Hl as createEditorSceneRuntimePhysicsSection,Vl as createEditorSceneRuntimePreviewImageImportPlan,Yl as createEditorSceneRuntimePreviewImportPlan,ql as createEditorSceneRuntimePreviewMainCameraRig,Kl as createEditorSceneRuntimePreviewMissingAssetUrlDiagnostic,Wl as createEditorSceneRuntimePreviewModelImportPlan,Xl as createEditorSceneRuntimePreviewNode,Jl as createEditorSceneRuntimePreviewNodes,Zl as createEditorSceneRuntimeRawMiscSection,Ql as createEditorSceneRuntimeRenderingSection,eu as createEditorSceneRuntimeShadowsSection,tu as createEditorSceneSerializedMultiInspectorObject,ru as createEditorSceneSerializedMultiInspectorSections,au as createEditorSceneSerializedMultiObject,nu as createEditorSceneSerializedMultiTransformPatch,iu as createEditorSceneSerializedObject,ou as createEditorSceneSerializedPropertyDescriptors,su as createEditorSceneSourceAssetFromActionInput,cu as createEditorSceneSourceMaterialAssetForBindingPatch,du as createEditorSceneStandardPrefabAssetFieldServices,lu as createEditorSceneStaticShadowArtifactDiagnostic,uu as createEditorSceneStaticShadowArtifactDraftStore,fu as createEditorSceneTextureAssetPreview,mu as createEditorSceneTexturePickerControlOptions,gu as createEditorSceneTransformBatchPatch,Eu as createEditorSceneTransformFromSerializedPath,pu as createEditorSceneTransformInspectorProperties,Su as createEditorSceneTransformInspectorSection,hu as createEditorSceneTransformInspectorSummary,bu as createEditorSceneTransformPatch,Xr as createEditorSceneTransformPatchFromRuntimePatch,yu as createEditorSceneTransformRotationFromDirectionalLightDirection,Pu as createEditorTransformMatrixSnapshot,Iu as createFpsGameEditorAdapter,Au as createFpsGameEditorConfiguredGroundDecalSceneFeature,Tu as createFpsGameEditorDeclarativeGroundDecalSceneFeature,Ru as createFpsGameEditorGroundDecalSceneFeature,wu as createFpsGameEditorLocalEditorHost,Mu as createFpsGameEditorLocalEditorHostManifest,bi as createFpsGameEditorManagedAssetServices,_u as createFpsGameEditorPlayableProjectHostAssembly,Du as createFpsGameEditorProductHostAssembly,Cu as createFpsGameEditorProductProjectHostServices,vu as createFpsGameEditorProductProjectionPreview,Lu as createFpsGameEditorProductRenderingRuntime,xu as createFpsGameEditorProductSceneHostOptions,Ou as createFpsGameEditorSceneSourceServices,Nu as createFpsGameEditorStandardAssetActionPatch,ku as createFpsGameEditorStandardProjectRuntime,ju as createFpsGameEditorStandardSceneAssembly,Gu as createIdentityEditorTransform,Fu as createImportedEditorSceneMaterialAssetFromSourceProfile,Bu as createMarkerGameObjectFromSpatialMarker,zu as createMarkerSemanticFrameFromTransform,Uu as createMarkerType,$u as createMaterialAlphaModeOptions,Hu as createMaterialAssetPickerControlOptions,Vu as createMaterialAssetSelectorInspectorProperty,Yu as createMaterialLightingModelOptions,qu as createObjectBoundSemanticFrame,Ku as createPlayableAuthoringClient,or as createPlayableAuthoringEmptyResponse,U as createPlayableAuthoringJsonResponse,Wu as createPlayableBabylonEnvironmentTextureProfile,Xu as createPlayableBabylonOutlineInspectorSection,Ju as createPlayableBabylonOutlineInspectorSeedPatchValue,Zu as createPlayableBabylonPlanarShadowPolicyInput,Qu as createPlayableBabylonPlanarShadowPreviewOptions,ef as createPlayableBabylonRenderingAlphaIndexMigrationPatch,tf as createPlayableBabylonRenderingCapability,rf as createPlayableBabylonRenderingCapabilityFacade,af as createPlayableBabylonRenderingDiagnostics,nf as createPlayableBabylonRenderingPanelState,of as createPlayableBabylonWorldRendering,gn as createPlayableBridgeCommandAssetAdapter,mn as createPlayableBridgeEventPayload,La as createPlayableEditorAssetGuid,xa as createPlayableEditorAssetId,_i as createPlayableEditorBundledPackageAliasPlan,Mi as createPlayableEditorBundledPackageRoots,sf as createPlayableEditorDoctorReport,Aa as createPlayableEditorEntryController,_n as createPlayableEditorEntryManifest,Ln as createPlayableEditorEntryModuleLoader,Cn as createPlayableEditorEntryModuleUrl,Nn as createPlayableEditorEntryPerformanceTracker,qa as createPlayableEditorManagedAssetFacade,ja as createPlayableEditorManagedAssetGuid,Ga as createPlayableEditorManagedAssetId,st as createPlayableEditorManagedSceneAsset,cf as createPlayableEditorSceneFieldMutationOptions,df as createPlayableEditorSceneHierarchyFacade,lf as createPlayableEditorSceneInspectorMultiObject,uf as createPlayableEditorSceneInspectorObject,ff as createPlayableEditorSceneInspectorPropertyPatch,mf as createPlayableEditorSceneInspectorSections,gf as createPlayableEditorSceneMarkerGraphFacade,Ef as createPlayableEditorSceneMarkerInspectorSection,pf as createPlayableEditorSceneObjectCommandFacade,Sf as createPlayableEditorSceneOutlineInspectorSection,hf as createPlayableEditorSceneSessionFacade,bn as createPlayableEditorSourcePackageAliasPlan,wi as createPlayableEditorSourceTsconfigPathsPlan,bf as createPlayableForgePlaySaveState,yf as createPlayableGroundDecalDocumentBridge,Pf as createPlayableGroundDecalDocumentServices,If as createPlayableGroundDecalInspectorProperties,Af as createPlayableGroundDecalInspectorSection,Tf as createPlayableGroundDecalInspectorServices,Rf as createPlayableGroundDecalLayerLabel,wf as createPlayableGroundDecalMultiInspectorSection,Mf as createPlayableLocalEditorHost,_f as createPlayableLocalEditorLoadingOverlay,li as createPlayablePlatformAssetDropCache,Df as createPlayablePlatformAssetRegistrationPayload,Ii as createPlayableProjectAssetBridgeAdapter,Cf as createPlayableProjectAssetCommandHandler,vf as createPrefabInstanceInspectorSection,Lf as createPrefabMaterialBindingPresentationImpact,xf as createPrefabStageEditableProperty,Of as createPrefabStageShadowDefaultProperties,Nf as createProjectIOSceneSourceFetch,kf as createReadonlyMaterialSlotListInspectorProperties,jf as createRuntimeSceneCompiledArtifact,Gf as createSceneMainSourceDriver,Ff as createSceneMainSourceSaveCompanionConfigPayload,Bf as createSceneMaterialBindingPresentationImpact,zf as createSceneObjectMarkerTargetRef,Uf as createSpatialMarkerFromGameObject,$f as createSpatialMarkerGeometryForPresentation,Hf as createSpatialMarkerGeometryForTargetPatch,Vf as createSpatialMarkerGeometryFromGameObject,Yf as createSpatialMarkersFromGameObjects,qf as createStableEditorSceneMaterialAssetGuid,Kf as createTexturePickerControlOptions,Wf as createUniqueEditorSceneGameObjectDisplayName,Xf as createUniqueEditorSceneGameObjectId,Jf as createUniqueEditorSceneId,Zf as createUniqueEditorSceneMaterialAssetId,Qf as createUniqueEditorScenePrefabAssetId,em as createUniqueMarkerGameObjectId,tm as createVec3,rm as defineFpsGameEditorFeature,am as defineFpsGameEditorProject,fi as definePlayableEditorAssetDatabaseConfig,nm as degreesToEditorSceneRadians,im as dehydrateEditorSceneDocumentAssets,om as deleteDefaultEditorSceneMaterialAsset,sm as deleteEditorSceneMarkerGameObject,cm as deleteEditorSceneMaterialAsset,dm as deleteEditorScenePrefabNode,lm as deleteMarkerType,um as describeEditorSceneRuntimeObject,fm as detectEditorSceneDirectionalLightOrientationDrift,ri as detectEditorSceneRuntimeInputDrift,mm as editorSceneGuidToStableToken,gm as encodeEditorScenePrefabInstanceIdentitySegment,Em as enrichEditorSceneDocumentAssets,pm as ensureDefaultEditorSceneMaterialAssets,Sm as ensureEditorSceneAuthoringSource,wr as ensureEditorSceneGameObjectGuids,hm as ensureEditorScenePrefabComposition,bm as ensurePlayableEditorSceneEnvironmentDefaultsCore,ym as findEditorSceneGameObject,Pm as findEditorSceneImageRenderer,Im as findEditorSceneInspectorTextureAsset,Am as findEditorSceneInspectorTextureAssetFromContext,ce as findEditorSceneLightingDebugNumberFieldConfig,Tm as findEditorSceneLightingPreviewLightObject,Rm as findEditorSceneMaterialAsset,wm as findEditorSceneModelRenderer,Mm as findEditorScenePrefabAsset,_m as findEditorScenePrefabNode,Dm as findEditorScenePrefabStageInspectorItem,Cm as findEditorScenePrefabStageStructureItem,ma as findEditorSceneRuntimeLightTarget,vm as findEditorSceneTransform,Lm as fingerprintEditorScenePrefabStageAssetProjection,xm as fingerprintEditorScenePrefabStageDocumentScope,Om as flattenEditorScenePrefabStageStructureItems,Nm as formatEditorSceneBoundsSummary,se as formatEditorSceneLightingNumber,ta as formatEditorSceneLightingShadowMode,km as formatEditorSceneMaterialPreviewNumber,jm as formatEditorSceneMaterialSlotLabel,Gm as formatEditorScenePrefabStageMaterialSlotSummary,Fm as formatPlayableEditorDoctorReport,Ci as formatPlayableEditorPackageAliasPlanError,Bm as formatPlayableLocalEditorHostCompatibilityReport,zm as getArtistMaterialInspectorText,Um as getBuiltInMarkerType,$m as getCameraInspectorText,Hm as getDefaultEditorSceneMaterialPreset,Yt as getEditorSceneAuthoringSourceRef,Vm as getEditorSceneGameObjectWorldTransform,Ym as getEditorSceneGameObjectWorldTrsTransform,qm as getEditorSceneHierarchyItems,Km as getEditorSceneLightInspectorLanguage,Wm as getEditorSceneLightInspectorText,Xm as getEditorSceneMarkerGraphPatchSelection,Jm as getEditorSceneMarkerTypeCatalogFromGraph,Zm as getEditorSceneMaterialAssetDefaultPreset,Qm as getEditorSceneMaterialAssetDisplayMeta,eg as getEditorSceneMaterialAssetDisplayName,tg as getEditorSceneMaterialShaderDefinition,rg as getEditorSceneMaterialSlotPrimaryOwnerPath,ag as getEditorScenePrefabStageDescriptor,ng as getEditorScenePrefabStageProjectionNodeIdForNode,ig as getEditorScenePrefabStageProjectionNodes,og as getEditorScenePrefabStageStructure,sg as getEditorSceneRelationTypeCatalog,cg as getEditorSceneSlotMaterialBinding,dg as getEditorSceneSlotMaterialBindingPath,lg as getEditorSceneSlotSelectionKey,ug as getEditorSceneSlotSourceMaterialName,fg as getEditorSceneSlotSourceMaterialProfile,Lr as getFpsGameEditorStandardCompatibilityCommandId,mg as getNextEditorSceneAssetPlacementPosition,Si as getPlayableEditorAssetKindExtensions,Na as getPlayableEditorAssetPathExtension,gg as getPlayableForgePlayHistoryResultEventName,Eg as getTopLevelSceneGraphNodeIds,pg as groundDecalFeature,ar as guidToPlayableEditorAssetStableToken,hi as guidToPlayableEditorManagedAssetStableToken,Li as handleEditorSceneRenderingProfileAuthoringRequest,yi as handlePlayableAuthoringServerRequest,Sg as hasDetectedModelMaterialSlots,hg as hasEditorSceneAncestorDescendantPair,bg as hasEditorSceneCamera,yg as hasEditorSceneDescendants,Pg as hasEditorSceneMaterialAsset,Ig as hasEditorScenePrefabForSourceAsset,Ag as hasEditorScenePrefabStageRuntimeStructure,Tg as hasInvalidEditorSceneCameraRelationships,Rg as hasReadonlyEditorSceneMaterialSlotReimportIssues,wg as hslToEditorSceneMaterialPreviewRgb,zr as importPlayableProjectAsset,Mg as inspectPlayableEditorHostCompatibilityReport,_g as inspectPlayableLocalEditorHostManifest,Dg as installPlayableForgePlayModeBridge,Cg as isBlockedPlayableEditorSceneSystemFieldPatch,vg as isBuiltInMarkerType,Lg as isCompiledArtifactForSource,xg as isDefaultEditorSceneMaterialAsset,Og as isDefaultReadonlyEditorSceneMaterialAsset,Ng as isDeletedRelationEndpoint,kg as isEditorProjectFilePreviewable,jg as isEditorProjectMediaPreviewable,Gg as isEditorSceneArtistMaterialPatchPath,Fg as isEditorSceneAssetPlaceable,Bg as isEditorSceneBuiltinMaterialTextureRefFieldPath,zg as isEditorSceneCameraGameObject,Ug as isEditorSceneCameraProjection,$g as isEditorSceneColor,Hg as isEditorSceneDuplicateMaterialAssetPickerValue,Vg as isEditorSceneFiniteNumber,Yg as isEditorSceneGameObjectShadowParticipationOwner,qg as isEditorSceneGroupLikeGameObject,Kg as isEditorSceneLightDirectionAnglePath,_r as isEditorSceneLightGameObject,Wg as isEditorSceneLightType,Xg as isEditorSceneMarkerGameObject,Jg as isEditorSceneMarkerGraphCommandSupported,Zg as isEditorSceneMaterialAssetReadonlyForInspector,Qg as isEditorSceneMaterialBindingNullableStringPath,eE as isEditorSceneMaterialBindingPath,tE as isEditorSceneMaterialColorRgb,rE as isEditorSceneMaterialColorRgba,aE as isEditorSceneMaterialTextureRefFieldPath,nE as isEditorSceneMatrixTransformComponent,iE as isEditorSceneNonNegativeFiniteNumber,oE as isEditorSceneOptionalBoolean,sE as isEditorSceneOptionalNonEmptyString,cE as isEditorSceneOptionalString,dE as isEditorScenePositiveFiniteNumber,lE as isEditorScenePositiveSize,uE as isEditorScenePrefabAsset,fE as isEditorScenePrefabCoreMaterialOverridePath,mE as isEditorScenePrefabDefaultShadowPath,gE as isEditorScenePrefabInstance,EE as isEditorScenePrefabMaterialAssetIdOverridePath,pE as isEditorScenePrefabOverridePath,SE as isEditorSceneProtectedSystemGameObject,hE as isEditorSceneProtectedSystemGameObjectId,bE as isEditorSceneRenderingProfileDraftDirty,yE as isEditorSceneRenderingProfilePatchPath,PE as isEditorSceneRootGameObject,IE as isEditorSceneRootGameObjectId,AE as isEditorSceneRootTransformPath,TE as isEditorSceneRuntimeMeshLike,RE as isEditorSceneScale,wE as isEditorSceneSelectableHierarchyId,ME as isEditorSceneStringArray,_E as isEditorSceneTextureAsset,DE as isEditorSceneTransformLike,CE as isEditorSceneTrsTransformComponent,vE as isEditorSceneUnitRangeNumber,LE as isEditorSceneVec2,xE as isEditorSceneVec3,OE as isEditorTransformMatrixSnapshot,NE as isEditorTransformTrsSnapshot,kE as isMarkerEndpoint,jE as isMarkerTypeDefinitionValid,GE as isObjectMarkerKind,FE as isPlayableBabylonOutlineInspectorPatchPath,BE as isPlayableBabylonRenderingEnvironmentTextureAsset,zE as isPlayableBabylonRenderingEnvironmentTextureResource,UE as isPlayableEditorSceneGroundDecalProjectionPath,$E as isPlayableGroundDecalEditableColorLayer,HE as isPlayableGroundDecalEditableTextLayer,VE as isPlayableGroundDecalEditableTextureLayer,YE as isPlayableGroundDecalInspectorPatchPath,qE as isPlayableGroundDecalLayerColorAlphaPath,KE as isPlayableGroundDecalLayerColorPath,WE as isPlayableGroundDecalLayerProgressPreviewPercentPath,XE as isPlayableGroundDecalLayerRectPath,JE as isPlayableGroundDecalLayerRotationPath,ZE as isPlayableGroundDecalLayerTextColorAlphaPath,QE as isPlayableGroundDecalLayerTextColorPath,ep as isPlayableGroundDecalLayerTextFontSizePath,tp as isPlayableGroundDecalLayerTextValuePath,rp as isPlayableGroundDecalLayerTexturePath,ap as isPlayableGroundDecalLayerTextureTintAlphaPath,np as isPlayableGroundDecalLayerTextureTintPath,ip as isPlayableGroundDecalLayoutEditableLayer,op as isPlayableGroundDecalLayoutPatchCompatibleWithDecal,sp as isPlayableGroundDecalProjectEditableLayer,cp as isPlayableGroundDecalRenderingTextureDimensionPath,dp as isPlayableGroundDecalRotationEditableLayer,lp as isPlayableGroundDecalSerializedMultiFieldPath,up as isPlayableLocalEditorSaveCancellation,fp as isReadonlyEditorSceneMaterialAsset,mp as isRegionMarkerKind,gp as isRelationEndpointValid,Ep as isTargetRefValid,pp as isValidEditorAffineTransformMatrix,Sp as isVec3ApproximatelyEqual,hp as isVec3Like,bp as loadEditorAssetLibrary,yp as loadEditorAssetLibrarySnapshot,Pp as loadEditorProjectFile,Ip as loadEditorProjectFiles,xn as loadPlayableEditorEntryManifest,Ap as loadSceneMainSource,Tp as markEditorSceneInspectorPropertiesEffect,Rp as markEditorSceneRenderingProfileDraftSaved,Za as matchPlayableAuthoringRoute,wp as materializeImportedEditorSceneMaterialAssets,Mp as mergeEditorSceneAssetWithLibraryItem,_p as mergeEditorSceneCameraDefaults,Dp as mergeEditorSceneLightDefaults,Cp as mergeEditorSceneMaterialBindingOverrides,vp as mergeEditorScenePrefabOverrides,Lp as mergeEditorSceneSourceMaterialProfile,xp as mergeMarkerTypeDefinition,Op as mergePlayableEditorDoctorReports,Np as mergePlayableGroundDecalDefaults,kp as migrateEditorSceneDocumentRenderingAlphaIndex,jp as migrateEditorSceneGameObjectsRenderingAlphaIndex,Gp as migrateEditorSceneMarkerGraphMarkersToGameObjects,Fp as migrateEditorSceneMaterialAssetShader,Bp as mixEditorSceneLightingPreviewColor,Hn as mountEditorRuntimeDebugPanelShell,xi as mountEditorRuntimeLightingDebugPanel,Oi as mountFpsGameEditorLocalEditorEntry,zp as mountFpsGameEditorProductLocalEditor,Up as mountFpsGameEditorProductLocalEditorFromEnvironmentModule,$p as mountFpsGameEditorStandardLocalEditorFromEnvironmentModule,Hp as mountFpsGameEditorStandardProject,Vp as normalizeCompiledArtifacts,Yp as normalizeEditorSceneAssetBytesUrl,qp as normalizeEditorSceneCameraAfterFieldPatch,Kp as normalizeEditorSceneCameraGameObject,Wp as normalizeEditorSceneFieldInspectorValue,Xp as normalizeEditorSceneGameObjectDisplayName,Jp as normalizeEditorSceneHierarchyDocument,Zp as normalizeEditorSceneLightDirectionAngleValue,Mr as normalizeEditorSceneLightDirectionVector,Qp as normalizeEditorSceneLightingAngleDegrees,eS as normalizeEditorSceneLightingPreviewVec3,tS as normalizeEditorSceneMarkerGameObject,rS as normalizeEditorSceneMarkerGameObjects,aS as normalizeEditorSceneMarkerGraph,nS as normalizeEditorSceneMarkerGraphCommand,iS as normalizeEditorSceneMarkerPresentation,oS as normalizeEditorSceneMaterialAssetValue,sS as normalizeEditorSceneMaterialBindings,cS as normalizeEditorSceneMaterialPreviewHue,dS as normalizeEditorSceneMaterialSlotOwnerPath,lS as normalizeEditorScenePlainTransformGameObject,uS as normalizeEditorScenePlayableInspectorValue,fS as normalizeEditorScenePrefabAssetComposition,mS as normalizeEditorScenePrefabAssetFieldValue,gS as normalizeEditorScenePrefabIdentifierPart,ES as normalizeEditorScenePrefabStageOwnerNodePath,pS as normalizeEditorScenePrimitiveShape,SS as normalizeEditorSceneRootGameObject,hS as normalizeEditorSceneRootTransformDocument,oa as normalizeEditorSceneRuntimeLightBinding,bS as normalizeEditorSceneRuntimePreviewProjectUrlPath,yS as normalizeEditorSceneShadowAuthoringSource,PS as normalizeEditorSceneSystemLightGameObject,IS as normalizeMarkerBoxSize,AS as normalizeMarkerCylinderHeight,TS as normalizeMarkerCylinderRadius,RS as normalizeMarkerNodeKind,pi as normalizePlayableEditorAssetCodeKey,Ei as normalizePlayableEditorAssetDisplayName,Oa as normalizePlayableEditorAssetKind,wS as normalizePlayableEditorSceneGroundDecalGameObject,MS as normalizePlayableForgePlayCommandName,_S as normalizePlayableFsPath,DS as normalizePlayableGroundDecalAlphaValue,CS as normalizePlayableGroundDecalColorValue,vS as normalizePlayableGroundDecalFontSizeValue,LS as normalizePlayableGroundDecalInspectorFieldValue,xS as normalizePlayableGroundDecalLayoutLayerPatch,OS as normalizePlayableGroundDecalLayoutPatchValue,NS as normalizePlayableGroundDecalLayoutRect,kS as normalizePlayableGroundDecalProgressPreviewPercentValue,Hr as normalizePlayableGroundDecalRotationDegrees,jS as normalizePlayableGroundDecalTextureDimension,GS as normalizePlayableGroundDecalUiScaleAfterFieldPatch,FS as normalizePlayableGroundDecalUiScales,BS as normalizePlayableGroundDecalUiScalesForCommand,Pa as normalizePlayablePlatformAssetPayload,kr as normalizePlayablePortableAssetPath,jr as normalizePlayableProjectAssetImportRequest,zS as parseEditorSceneDuplicateMaterialAssetValue,We as parseEditorSceneLightingDebugNumberDraft,US as parseEditorSceneMaterialAssetFieldPath,$S as parseEditorSceneMaterialAssetSelectionId,HS as parseEditorSceneModelAssetSelectionId,Dn as parsePlayableEditorEntryManifest,VS as parsePlayableGroundDecalLayerPatchPath,YS as patchEditorSceneDirectionalLightOrientationAngles,qS as patchEditorSceneGameObjectByField,Dr as patchEditorSceneGameObjectField,KS as patchEditorSceneGameObjectFieldsMany,WS as patchEditorSceneGameObjectMaterialBinding,XS as patchEditorSceneGameObjectTransform,JS as patchEditorSceneGameObjectTransformsMany,ZS as patchEditorSceneGameObjectsField,QS as patchEditorSceneMaterialAsset,eh as patchEditorSceneMaterialAssetField,th as patchEditorScenePrefabAsset,rh as patchEditorScenePrefabAssetField,ah as patchEditorScenePrefabOverride,di as patchEditorSceneRuntimeLights,nh as patchMarkerGameObjectFromSpatialMarker,ih as patchMarkerGameObjectTransformComponents,oh as patchPlayableEditorSceneDirectionalLightAngleField,sh as patchPlayableEditorSceneGameObjectFieldWithServices,ch as patchPlayableEditorSceneGameObjectsFieldWithServices,dh as patchPlayableEditorSceneGroundDecalInspectorField,lh as patchPlayableEditorSceneGroundDecalKind,uh as patchPlayableEditorSceneGroundDecalLayout,fh as patchPlayableEditorSceneGroundDecalRenderingDimension,mh as patchPlayableGroundDecalLayer,Ba as planPlayableEditorAssetRegistrationCore,za as planPlayableEditorAssetUnregistrationCore,gh as playableGroundDecalColorsEqual,Eh as playableGroundDecalRectsEqual,ph as postPlayableAuthoringJson,Sh as postPlayableForgePlayEvent,hh as prepareFpsGameEditorObjectRenameCommand,bh as preparePlayableEditorSceneDocument,yh as pruneEditorSceneArtistMaterialProfile,Ph as radiansToEditorSceneDegrees,Ih as readArtistMaterialInspectorLanguage,Ah as readArtistMaterialTexturePickerValue,Th as readCompiledRuntimeSceneArtifact,Rh as readEditorProjectFileContent,wh as readEditorProjectFileSnapshot,Mh as readEditorSceneAssetMaterialSlots,at as readEditorSceneDirectionalLightAngles,Pt as readEditorSceneDirectionalLightAnglesExact,_h as readEditorSceneDirectionalLightOrientation,Dh as readEditorSceneGameObjectAlphaIndex,Ch as readEditorSceneGameObjectLocalTransform,vh as readEditorSceneGameObjectRenderingGroupId,Lh as readEditorSceneInspectorColor,xh as readEditorSceneInspectorShadowSettings,Oh as readEditorSceneInspectorVec3,Nh as readEditorSceneLightType,Ct as readEditorSceneLightingDebugColorSnapshotField,Pe as readEditorSceneLightingDebugNumberSnapshotField,Qr as readEditorSceneLightingDebugText,ea as readEditorSceneLightingDebugTooltipText,kh as readEditorSceneLightingPreviewColor,jh as readEditorSceneLightingPreviewDirectionalLight,Gh as readEditorSceneLightingPreviewFiniteNumber,Fh as readEditorSceneLightingPreviewHemisphericLight,Ir as readEditorSceneLightingProjectedLengthMultiplier,Bh as readEditorSceneMaterialBindingConfig,zh as readEditorSceneMaterialSlotBindingSlotId,Uh as readEditorSceneMaterialSlotDescriptor,$h as readEditorSceneNodeKind,Hh as readEditorScenePhysicsParam,Vh as readEditorScenePrefabMaterialOverrideBinding,Yh as readEditorScenePrefabNodeChildren,qh as readEditorScenePrefabNodes,Kh as readEditorScenePrefabOverrideMaterialPath,Wh as readEditorScenePrefabRootNodeId,Xh as readEditorScenePrefabStageAssetProjection,Jh as readEditorScenePrefabStageMaterialSlot,Zh as readEditorSceneRuntimeArrayLength,Qh as readEditorSceneRuntimeArrayLengthFromMethod,eb as readEditorSceneRuntimeBoolean,tb as readEditorSceneRuntimeBounds,rb as readEditorSceneRuntimeClassName,ab as readEditorSceneRuntimeIsEnabled,ni as readEditorSceneRuntimeLightBinding,nb as readEditorSceneRuntimeNumber,ib as readEditorSceneRuntimePreviewAssetId,ob as readEditorSceneRuntimePreviewAssetKind,sb as readEditorSceneRuntimePreviewAssetMetadata,cb as readEditorSceneRuntimeProjectionAssetId,db as readEditorSceneRuntimeProjectionAssetMetadata,lb as readEditorSceneRuntimeString,ub as readEditorSceneRuntimeValue,fb as readEditorSceneTextureUrl,mb as readEditorSceneTransformVector,gb as readEditorTransformPosition,Eb as readFpsGameEditorPlatformAssetLookup,pb as readMarkerConfigTarget,Sb as readMarkerGameObjectScale,hb as readMarkerTypeDefinition,bb as readMarkerTypeOverrides,cn as readPlayableAssetImportInput,sr as readPlayableAssetRegistrationPlanInput,yb as readPlayableAssetRegistrationResultRecord,sn as readPlayableAssetUnregistrationPlanInput,Me as readPlayableBridgeRequestId,Fa as readPlayableEditorManagedAssetScale,Pb as readPlayableForgePlayHistoryOperationOptions,Ib as readPlayableForgePlayRequestId,Ab as readPlayableGroundDecalFiniteNumber,Tb as readPlayableGroundDecalPositiveFiniteNumber,Kt as readPlayablePlatformAssetDropPoint,Rb as readPlayablePlatformAssetExternal,wb as readPlayablePlatformAssetKind,Mb as readPlayablePlatformAssetName,_b as readPlayablePlatformAssetPath,Db as readPlayablePlatformAssetPlacement,qt as readPlayablePlatformAssetRecord,Cr as readPlayablePlatformAssetRecords,Cb as readPlayablePlatformAssetUrl,vb as readPlayablePlatformRawAssetId,dn as readPlayableSceneNodeCreateInput,ln as readPlayableSceneNodePatchInput,jt as readPlayableSceneNodeRemoveInput,Lb as readRawEditorSceneGameObjectLocalTransform,xb as readSceneMainSourceRenderingConfig,Ob as readSceneMainSourceRevisionConflict,Nb as readSceneMainSourceSaveCompanionConfigs,kb as readSceneMainSourceStaticShadowsArtifact,jb as readSpatialMarkerTransformPosition,Gb as readSpatialMarkerTransformRotation,Fb as readSpatialMarkerTransformScale,na as readStoredEditorSceneLightingDebugLanguage,ra as readStoredEditorSceneLightingDebugOpen,Bb as rebaseEditorScenePrefabMarkerConfig,zb as rebaseEditorScenePrefabMarkerTarget,Ub as reconcileEditorSceneMaterialSlotReimportBindings,$b as reconcileEditorScenePrefabMaterialSlotReimportBindings,Hb as reduceEditorSceneDocumentMutation,Vb as reduceEditorSceneMarkerGameObjectCommand,Yb as reduceEditorSceneMarkerGraph,qb as reducePlayableEditorSceneDocumentCore,ui as registerFpsGameEditorStandardAuthoringCommands,vr as registerFpsGameEditorStandardCapabilityDefinitions,Kb as registerPlayablePlatformAsset,Wb as registerPlayablePlatformAssetIfNeeded,Xb as renameEditorScenePrefabAsset,Jb as renameEditorScenePrefabNode,Zb as reparentEditorScenePrefabNode,Qb as replaceEditorSceneMaterialAsset,ey as replaceEditorScenePrefabAsset,ty as replaceEditorScenePrefabStageAssetProjection,ry as replacePlayableEditorSceneGroundDecalUi,ay as resetEditorSceneRenderingProfileDraft,ny as resolveAllowedRegionMarkerGeometryKinds,iy as resolveDefaultEditorSceneMaterialAssetDeleteState,oy as resolveDefaultRegionMarkerGeometryKind,sy as resolveEditorProjectFileExtension,cy as resolveEditorProjectFileLanguage,dy as resolveEditorProjectMediaSource,ly as resolveEditorProjectMediaSupport,uy as resolveEditorRuntimeAssetFetchUrl,Qt as resolveEditorSceneArtistMaterialBinding,oi as resolveEditorSceneArtistMaterialRuntimePreview,si as resolveEditorSceneArtistMaterialSlotProfiles,fy as resolveEditorSceneAssetAvailabilityKey,my as resolveEditorSceneAssetLibraryItemRelativePath,gy as resolveEditorSceneEffectiveShadowMode,Ey as resolveEditorSceneFieldSchema,py as resolveEditorSceneGameObjectRendering,Sy as resolveEditorSceneGameObjectRuntimeEntityIds,hy as resolveEditorSceneGameObjectShadowSettings,by as resolveEditorSceneLightingPreviewProfile,yy as resolveEditorSceneMaterialAssetDeleteState,Py as resolveEditorSceneMaterialAssetIntegrity,Iy as resolveEditorSceneMaterialRuntimeKind,Ay as resolveEditorSceneMaterialSlotReimportDiff,Ty as resolveEditorScenePrefabInstanceEffectiveOverrides,Ry as resolveEditorScenePrefabInstanceMarkers,wy as resolveEditorScenePrefabInstanceRelation,My as resolveEditorScenePrefabMaterialSlotReimportDiffs,_y as resolveEditorScenePrefabSourceAssetId,Dy as resolveEditorScenePrefabSourceSessionState,Cy as resolveEditorScenePrefabStageMarkers,vy as resolveEditorScenePrefabStageMaterialDropTarget,Ly as resolveEditorScenePrefabStageMaterialOverrideTarget,xy as resolveEditorScenePrefabStagePreviewTarget,Oy as resolveEditorSceneProjectedMaterialRuntimeKind,Ny as resolveEditorSceneRenderingAlphaIndexPresetValueMigration,ky as resolveEditorSceneRootContainerId,jy as resolveEditorSceneRuntimePreviewAssetUrl,Gy as resolveEditorSceneRuntimePreviewAssetUrlCandidate,Fy as resolveEditorShadowPlan,By as resolveEditorTransformPreserveWorldPolicy,zy as resolveFpsGameEditorFeatureSceneContribution,Uy as resolveFpsGameEditorGroundDecalFeatureConfig,$y as resolveFpsGameEditorStaticProject,Hy as resolveMarkerGeometryKindForPresentation,Vy as resolveMarkerNodeKindForType,Yy as resolvePlayableBabylonPlanarShadowPolicy,qy as resolvePlayableBabylonRenderingEnvironmentTextureDiagnostic,Ky as resolvePlayableBabylonRenderingEnvironmentTextureResource,nr as resolvePlayableEditorAssetIdentity,Wy as resolvePlayableGroundDecalImageRect,Xy as resolvePlayableGroundDecalMultiInspectorTargetIds,Jy as resolvePlayableGroundDecalUiInspectorScale,Zy as resolvePlayableGroundDecalUniformScaleFromVec3,Ur as resolvePlayablePlatformAssetRegistrationResult,Qy as rewriteMarkerRelationEndpoint,eP as rewriteMarkerRelationIds,tP as rewriteMarkerTargetRef,rP as rewriteSpatialMarkerGeometryTargetRefs,aP as rewriteSpatialMarkerTargetRefs,nP as rgbToEditorSceneMaterialPreviewHsl,iP as rotateVec3ByEuler,oP as roundEditorSceneInspectorNumber,Vr as roundEditorSceneLightingNumber,sP as roundPlayableGroundDecalFieldValue,cP as sanitizeEditorSceneGameObjectId,dP as sanitizeEditorSceneId,lP as sanitizeEditorSceneMaterialAssetIdPart,pa as sanitizeEditorSceneRuntimeDirectionalLight,Ea as sanitizeEditorSceneRuntimeHemisphericLight,ga as sanitizeEditorSceneRuntimeLightingPatch,uP as sanitizeMarkerGameObjectId,Nt as sanitizePlayableEditorManagedAssetName,fP as saveSceneMainSource,mP as scaleEditorSceneLightingPreviewColor,gP as selectEditorScenePrefabNode,EP as serializeEditorSceneStaticShadowArtifact,pP as setEditorScenePrefabNodeMarker,SP as setEditorScenePrefabNodeTransform,hP as setEditorSceneRenderingProfileDraftConfig,bP as setEditorSceneRenderingProfileDraftError,yP as shallowEditorSceneGameObjectsEqual,PP as shouldApplyMarkerDefaultScaleForKind,IP as shouldApplyMarkerDefaultScaleOnPresentationChange,AP as shouldPreserveTransformForMarkerGeometry,TP as splitEditorSceneFieldPath,RP as splitMaterialSlotBindingFieldPath,wP as stripKnownPlayableAssetExtension,ut as stripKnownPlayableEditorAssetExtension,MP as sumEditorSceneRuntimeMeshNumbers,_P as summarizeSaveResult,DP as syncEditorSceneDirectionalLightOrientationAfterTransformPatch,CP as syncEditorSceneDirectionalLightTransformRotationAfterDirectionPatch,vP as syncEditorSceneMarkerGraph,LP as syncEditorSceneMarkerGraphDocument,xP as syncEditorScenePrefabRootNodeFields,OP as toEditorLocalTransformFromWorld,NP as toEditorSceneInspectorLabel,kP as toEditorSceneInspectorSafeValue,jP as toEditorSceneLocalTransformForParent,GP as toEditorSceneLocalTransformFromWorld,FP as toEditorSceneLocalTrsTransformForParent,BP as toEditorScenePreserveWorldLocalTransformForParent,ii as toEditorSceneRuntimeLightingPatches,zP as toEditorSceneTransformComponent,UP as toEditorSceneTransformSnapshot,fn as toPlayableBridgeCommandError,gi as toPlayableEditorAssetImportName,$P as toneMapEditorSceneLightingPreviewColor,HP as toneMapEditorSceneLightingPreviewNumber,VP as transformEditorSceneMaterialPreviewBaseColor,YP as tryCreateEditorSceneTransformComponent,qP as tryCreateEditorSceneTransformSnapshot,ca as updateEditorSceneLightingDebugSnapshotColorField,la as updateEditorSceneLightingDebugSnapshotDirection,da as updateEditorSceneLightingDebugSnapshotEnabled,vt as updateEditorSceneLightingDebugSnapshotFromAngles,sa as updateEditorSceneLightingDebugSnapshotNumberField,KP as updateEditorSceneMarkerGameObject,WP as updateMarkerType,XP as validateAndNormalizeEditorSceneMaterialAssetField,JP as validateEditorSceneFieldInspectorValue,ZP as validateEditorSceneGroupSelection,QP as validateEditorSceneHierarchyMove,eI as validateEditorSceneMaterialAssetFieldValue,ci as validateEditorSceneMaterialGlslColorBindings,tI as validateEditorScenePrefabAssetFieldValue,rI as validateEditorSceneReparent,aI as validatePlayableGroundDecalInspectorField,nI as validateSceneMainDocument,iI as waitForPlayableLocalEditorPaint,oI as waitForPlayableMilliseconds,sI as withEditorSceneMarkerGraph,cI as writeMarkerTypeOverrides,ia as writeStoredEditorSceneLightingDebugLanguage,aa as writeStoredEditorSceneLightingDebugOpen};
|
|
Binary file
|