@dcl-regenesislabs/web-editor 0.3.25-41750763563.commit-7f52255 → 0.3.25

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.
Files changed (2) hide show
  1. package/editor.js +1 -1
  2. package/package.json +2 -3
package/editor.js CHANGED
@@ -38078,4 +38078,4 @@ ${n}
38078
38078
  ${r}`));return"w"+Array.from(new Uint8Array(a).slice(0,16),s=>s.toString(16).padStart(2,"0")).join("")}function CPr(t){return`${t.file===void 0?"":`${t.file}:${t.line??1}:${t.column??0}: `}${t.severity==="error"?"ERROR":"WARNING"}: ${t.message}`}function OPr(t){return t.length<=3?t.join(", "):`${t.slice(0,3).join(", ")} and ${t.length-3} more`}function PPr(t,n){const r=Db(t.get("package.json"));for(const a of[r==null?void 0:r.devDependencies,r==null?void 0:r.dependencies]){const s=typeof a=="object"&&a!==null?a["@dcl/sdk"]:void 0;if(typeof s=="string"&&s!==n)return`⚠ This project asks for @dcl/sdk ${s}; the editor builds it with ${n}.`}return null}function IPr(t){const{emit:n,log:r}=t;let a=null,s=!1,l=null,d=Promise.resolve();const p=k=>{const N=d.then(k,k);return d=N.catch(()=>{}),N};async function _(){if(s)throw new Error("The editor was closed");a===null&&(l=null);const k=a??QEr(t.urls);a=k;try{const N=await k.ready;return{builder:k,sdkVersion:N.sdkVersion,info:N}}catch(N){throw k.dispose(),a===k&&(a=null),N}}async function b(k,N,L){const{builder:B,info:W}=await _();let Z=!1;const Q=await kPr(N,t.packages,W.snapshot,ue=>{t.onPackages(k,ue),L&&!Z&&r("Downloading packages from npm…"),Z=!0});Q.lockFile!==void 0&&(N.set(HR,Q.lockFile),await t.saveLock(k,Q.lockFile));const K=Q.lock===null?"":gGt(Q.lock);if(K!==l)try{await B.setPackages(Q.lock,t.packages),l=K}catch(ue){L&&r(`⚠ ${QIt(ue)}`),await B.setPackages(null),l=""}if(t.onPackages(k,Q.status),!(!L||Q.status===null)){if(Q.status.state==="error")r(`✖ ${Q.status.message??"The packages could not be installed"}`);else if(Q.downloaded>0){const ue=Object.entries(Q.status.installed).map(([ce,X])=>`${ce} ${X}`);r(`✔ Packages frozen into the scene: ${ue.join(", ")} (${Q.status.total} in all)`)}for(const ue of Q.status.warnings)r(`⚠ ${ue}`)}}function S(k,N,L=k){const B=oqe(t.pageDir,L),W=new Set;let Z=null,Q=null,K=!0,ue=!1,ce=!1,X=null;const fe=mt=>(n({type:"failed",message:mt}),r(`✖ Build failed: ${mt.split(`
38079
38079
  `)[0]}`),!1);async function Ee(mt){const st=performance.now();n({type:"buildStarted",changed:mt}),r(mt.length===0?"Building the scene…":`Rebuilding: ${OPr(mt)}`);try{const{builder:yt,sdkVersion:ht}=await _(),He=mt.length===0?PPr(N,ht):null;He!==null&&r(He);const Mt=mt.length===0||mt.includes("package.json")||mt.includes(HR),{snapshot:$e,result:Re}=await p(async()=>{(Mt||l!==X)&&(await b(k,N,!0),X=l);const St=new Map(N);return{snapshot:St,result:await yt.build(St)}});if(ce)return!1;const zt=Re.diagnostics.filter(St=>St.severity==="error"||St.file===void 0||$e.has(St.file));n({type:"diagnostics",diagnostics:zt.map(({severity:St,message:vt,file:Nt,line:Ht,column:Gt})=>({severity:St,message:vt,file:Nt,line:Ht,column:Gt}))});for(const St of zt)r(CPr(St));if(!Re.ok){const St=Re.events.find(vt=>vt.type==="failed");return fe((St==null?void 0:St.type)==="failed"?St.message:"The build produced no bundle")}const wt=Db($e.get("scene.json"));return wt===null?fe("scene.json is missing or is not valid JSON"):(await aCr({realmUrl:B,projectId:L,files:$e,buildOutputs:Re.outputs,sceneJson:wt,sdkVersion:ht,machineId:await t.machineId(L)}),ce?!1:(n({type:"bundleSaved"}),r(`✔ Built in ${Math.round(performance.now()-st)} ms`),!0))}catch(yt){return ce?!1:fe(QIt(yt))}}function Be(){return ce?Promise.resolve(!1):(Q!==null||(Q=(async()=>{for(;(K||W.size>0)&&!ce;){const mt=K?[]:[...W];K=!1,W.clear(),ue=await Ee(mt)}return ue&&!ce})().finally(()=>{Q=null})),Q)}return{id:k,files:N,start:Be,flush(){return Z!==null&&clearTimeout(Z),Z=null,Be()},async published(){const mt=await(await caches.open(Awe)).match(cqe(B)),st=await(mt==null?void 0:mt.json().catch(()=>{})),yt=st==null?void 0:st.entity;return(yt==null?void 0:yt.id)===NKe(L,await t.machineId(L))},changed(mt){ce||(W.add(mt),Z!==null&&clearTimeout(Z),Z=setTimeout(()=>{Z=null,Be()},EPr))},stop(){ce=!0,Z!==null&&clearTimeout(Z)}}}return{realmUrl:k=>oqe(t.pageDir,k),open:S,async build(k,N,L){const{builder:B,sdkVersion:W}=await _();return p(async()=>(await b(k,N,!1),{...await B.build(N,L),sdkVersion:W}))},install:(k,N)=>p(()=>b(k,N,!1)),dispose(){s=!0,a==null||a.dispose(),a=null}}}const XIt=64*1024*1024,NPr=4*1024*1024;function DPr(t,n){return t.length>8192?!1:n==="POST"?t==="/content/entities/active":n!=="GET"&&n!=="HEAD"?!1:t==="/about"||t==="/scene.json"||/^\/content\/contents\/(?:b64-[A-Za-z0-9+/=]+|[A-Za-z0-9]+)$/.test(decodeURIComponent(t))}function RPr(t,n,r){const a=t===null?null:new URL(t).origin;let s="",l=null,d="",p="",_=new AbortController,b=0,S=0;const k=(B,W=[])=>{l!==null&&a!==null&&l.postMessage({...B,session:n,instance:s},a,W)},N=async B=>{var fe;if(typeof B.requestId!="string"||B.requestId.length>128||typeof B.path!="string")return;const W=B.requestId;if(b>=64){k({type:"realm-response",requestId:W,error:"Too many preview resource requests"});return}const Z=_,Q=l,K=new AbortController,ue=setTimeout(()=>K.abort(new Error("Preview resource timed out")),3e4);let ce=0,X;b++;try{const Ee=new URL(d+B.path);if(!Ee.href.startsWith(d+"/")||!DPr(B.path,B.method))throw new Error("Invalid preview resource");if(B.body!==void 0&&(!(B.body instanceof ArrayBuffer)||B.body.byteLength>1024*1024))throw new Error("Invalid preview request body");const Be=await fetch(Ee,{method:String(B.method),credentials:"omit",redirect:"error",signal:AbortSignal.any([Z.signal,K.signal]),headers:{"Content-Type":"application/json"},body:B.method==="POST"?B.body:void 0}),mt=Be.headers.get("Content-Type")??"application/octet-stream",st=mt.includes("application/json")?NPr:XIt;if(X=(fe=Be.body)==null?void 0:fe.getReader(),Number(Be.headers.get("Content-Length"))>st)throw new Error("Preview resource exceeds the memory limit");const yt=[];if(X!==void 0)for(;;){const{done:$e,value:Re}=await X.read();if($e)break;if(ce+=Re.byteLength,S+=Re.byteLength,ce>st||S>XIt)throw new Error("Preview resource exceeds the memory limit");yt.push(Re)}const ht=new Uint8Array(ce);let He=0;for(const $e of yt)ht.set($e,He),He+=$e.byteLength;yt.length=0;let Mt=ht.buffer;if(B.method!=="HEAD"&&Mt.byteLength>0&&mt.includes("application/json")){const $e=JSON.parse(new TextDecoder().decode(Mt)),Re=zt=>typeof zt=="string"?zt.startsWith(d+"/")||zt===d?p+zt.slice(d.length):zt:Array.isArray(zt)?zt.map(Re):ac(zt)?Object.fromEntries(Object.entries(zt).map(([wt,St])=>[wt,Re(St)])):zt;Mt=new TextEncoder().encode(JSON.stringify(Re($e))).buffer}!Z.signal.aborted&&Q===l&&k({type:"realm-response",requestId:W,status:Be.status,headers:{"Content-Type":mt},body:Mt},[Mt])}catch(Ee){!Z.signal.aborted&&Q===l&&k({type:"realm-response",requestId:W,error:Ee instanceof Error?Ee.message:String(Ee)})}finally{clearTimeout(ue),K.abort(),X!==void 0&&X.cancel().catch(Ee=>{Ee instanceof Error&&Ee.name==="AbortError"||console.warn("Preview stream cleanup:",Ee)}),S-=ce,b--}},L=B=>{const W=B.data;B.origin!==a||!ac(W)||W.session!==n||W.instance!==s||s===""||(W.type==="connect"&&l===null&&B.source!==null&&"postMessage"in B.source&&(l=B.source),!(B.source!==l||l===null)&&(W.type==="realm-request"?N(W):r(W)))};return window.addEventListener("message",L),{send:k,reset:(B="",W="",Z="")=>{_.abort(),_=new AbortController,l=null,s=B,d=W,p=Z},dispose:()=>{_.abort(),window.removeEventListener("message",L)}}}const ZIt=["localhost","127.0.0.1","[::1]"];function MPr(t,n,r=""){if(ZIt.includes(new URL(t).hostname)){const a=new URLSearchParams(r).get("editor-mobile");return`${a!==null&&URL.canParse(a)&&ZIt.includes(new URL(a).hostname)?new URL(a).origin:"http://127.0.0.1:8788"}/mobile-preview/index.html`}return n===null?null:new URL("mobile-preview/index.html",n.replace(/\/$/,"")+"/").href}function LPr(t){if(t===null)return null;const n=new URL(t).hostname;return n==="decentraland.zone"||n.endsWith(".decentraland.zone")?"zone":null}function FPr(t,n,r,a=null){const s=crypto.randomUUID(),l=RPr(t,s,ce=>ue(ce)),d=new Set,p=new Map;let _={mode:"closed",url:null,ready:!1},b=null,S="",k="",N=0,L=null,B=!1,W=null;const Z=ce=>{_=ce;for(const X of d)X()},Q=()=>{k!==""&&l.send({type:"stop",session:s,instance:k}),l.reset(),W==null||W.close(),W=null,k="";for(const ce of p.values())ce.reject(new Error("The mobile preview was closed."));p.clear(),Z({mode:"closed",url:null,ready:!1})},K=()=>{N++,b=null,Q()};window.addEventListener("pagehide",K);const ue=ce=>{if(!ac(ce)||ce.session!==s||ce.instance!==k||(ce.type==="ready"&&(Z({..._,ready:!0}),l.send({type:"visibility",session:s,instance:k,visible:_.mode!=="minimized"})),ce.type==="closed"&&K(),ce.type!=="capture"||typeof ce.requestId!="string"))return;const X=p.get(ce.requestId);X!==void 0&&(typeof ce.error=="string"?X.reject(new Error(ce.error)):typeof ce.image=="string"&&ce.image.length<=4e6&&typeof ce.width=="number"&&ce.width>0&&ce.width<=1024&&typeof ce.height=="number"&&ce.height>0&&ce.height<=1024?X.resolve({mimeType:"image/jpeg",image:ce.image,width:ce.width,height:ce.height}):X.reject(new Error("The mobile preview sent an invalid picture.")))};return{state:()=>_,status:()=>({mode:_.mode,ready:_.ready}),subscribe:ce=>(d.add(ce),()=>d.delete(ce)),open:async(ce,X,fe="embedded")=>{if(B||t===null)return{ok:!1,reason:"unavailable"};const Ee=ce.replace(/\/$/,"");if(_.mode===fe&&b===Ee)return N++,{ok:!0};if((fe==="embedded"||fe==="minimized")&&(_.mode==="embedded"||_.mode==="minimized")&&b===Ee){if(N++,Z({..._,mode:fe}),l.send({type:"visibility",session:s,instance:k,visible:fe!=="minimized"}),fe==="minimized")for(const Mt of p.values())Mt.reject(new Error("Restore the mobile preview before taking a picture."));return{ok:!0}}if(fe==="minimized")return{ok:!1,reason:"unavailable"};const Be=fe==="tab"?window.open("about:blank",`dcl-phone-preview-${crypto.randomUUID()}`):null;if(fe==="tab"&&Be===null)return{ok:!1,reason:"unavailable"};const mt=++N;if(!await fetch(t,{method:"HEAD",signal:AbortSignal.timeout(5e3)}).then(Mt=>Mt.ok,()=>!1)||mt!==N||B||Be!=null&&Be.closed)return Be==null||Be.close(),{ok:!1,reason:"unavailable"};if(Q(),await new Promise(Mt=>setTimeout(Mt,100)),mt!==N||B||Be!=null&&Be.closed)return Be==null||Be.close(),{ok:!1,reason:"unavailable"};k=crypto.randomUUID();const yt=new URL(t);yt.searchParams.set("previewSession",s),yt.searchParams.set("previewInstance",k),yt.searchParams.set("editorOrigin",window.location.origin),fe==="tab"&&yt.searchParams.set("previewDetached","1"),yt.searchParams.set("maxpixels",String(1600*720)),S=new URL(`realm/${s}/${k}`,t).href,l.reset(k,Ee,S);const ht=new URL("decentraland://open");ht.searchParams.set("preview",S),ht.searchParams.set("position",X);const He=["--local-editor-preview","--skip-lobby","--guest-profile","--fake-deeplink",ht.href];return a!==null&&He.push("--dclenv",a),yt.searchParams.set("args",He.join(" ")),b=Ee,Z({mode:fe,url:yt.href,ready:!1}),W=Be,Be!==null&&jPr(Be,yt.href),{ok:!0}},close:K,capture:async ce=>{if(ce.throwIfAborted(),_.mode==="closed"||!_.ready)throw new Error("Open the mobile preview and wait for it to load before taking a picture.");_.mode==="minimized"&&(L=N,Z({..._,mode:"embedded"}),l.send({type:"visibility",session:s,instance:k,visible:!0}));const X=crypto.randomUUID();try{return await new Promise((fe,Ee)=>{const Be=()=>{clearTimeout(st),ce.removeEventListener("abort",mt),p.delete(X)},mt=()=>{Be(),Ee(ce.reason)},st=setTimeout(()=>{Be(),Ee(new Error("The mobile preview did not answer. Bring its tab to the foreground and retry."))},1e4);p.set(X,{resolve:yt=>{Be(),fe(yt)},reject:yt=>{Be(),Ee(yt)}}),ce.addEventListener("abort",mt,{once:!0}),l.send({type:"capture",session:s,instance:k,requestId:X})})}finally{p.size===0&&(L===N&&_.mode==="embedded"&&(Z({..._,mode:"minimized"}),l.send({type:"visibility",session:s,instance:k,visible:!1})),L=null)}},built:async ce=>{if(b===null)return;const X=b,fe=await n(ce),Ee=NKe(fe,await r(fe));!B&&X===b&&l.send({type:"scene-updated",session:s,instance:k,realm:S,entityId:Ee})},dispose:()=>{K(),B=!0,window.removeEventListener("pagehide",K),l.dispose(),d.clear()}}}function jPr(t,n){const r=t.document;r.title="Mobile scene preview",r.body.style.cssText="margin:0;background:#19191c;overflow:hidden";const a=r.createElement("iframe");a.title="Mobile scene preview",a.allow="autoplay; fullscreen; gamepad; cross-origin-isolated",a.style.cssText="width:100vw;height:100vh;border:0;display:block",a.src=n,r.body.replaceChildren(a)}const BPr=200,UPr=2e3,$Pr=/^\((?:no logs|\+\d+ older entries not retained)\)$/;function zPr(t,n){for(let r=Math.min(t.length,n.length);r>0;r--){const a=t.length-r;if(n.slice(0,r).every((s,l)=>s===t[a+l]))return n.slice(r)}return[...n]}function VPr(t,n){let r=[],a=!1,s;const l=async()=>{try{const d=await t(`scene_logs ${BPr} --server`);if(a)return;const p=d.split(`
38080
38080
  `).filter(_=>_.trim()!==""&&!$Pr.test(_.trim()));for(const _ of zPr(r,p))n(_);r=p}catch{}a||(s=setTimeout(()=>void l(),UPr))};return l(),()=>{a=!0,clearTimeout(s)}}function WPr(t,n,r){r.throwIfAborted();const a=tt.scene,s=[...t].sort().join(";");return new Promise((l,d)=>{const p=()=>{clearTimeout(N),S(),r.removeEventListener("abort",k)},_=L=>{p(),d(L)},b=()=>{var B;tt.scene===a||tt.status!=="ready"||!tt.frozen||((B=tt.scene)==null?void 0:B.parcels.map(W=>`${W.x},${W.y}`).sort().join(";"))!==s||(p(),l())},S=Sqe(b),k=()=>_(r.reason),N=setTimeout(()=>_(new Error("The preview has not loaded the new parcels. Retry sceneSettings before building outside the current layout.")),9e4);r.addEventListener("abort",k,{once:!0});try{n(),b()}catch(L){_(L)}})}const HPr=new Set(["node_modules",".git","bin","dist"]),qPr=300*1024,GPr=56,JPr=5;function QPr(t){const n=t.origin,r=typeof n=="object"&&n!==null&&!Array.isArray(n)?n:null;return r!==null&&(r.source==="import"||r.source==="github")?r:{...r??{},source:"user"}}function YPr(t,n){const r=new Map;let a=new Map;function s(p,_){if(_.size>qPr)return t.blob(p,_.hash);let b=r.get(_.hash);return b===void 0&&(b=t.blob(p,_.hash),r.set(_.hash,b),b.catch(()=>r.delete(_.hash))),b}const l={async folders(){const p=await t.list();return a=new Map(p.map(b=>[b.name,b])),(await Promise.all(p.map(async b=>{const S=b.files["data.json"];if(S===void 0)return null;const k=await s(b.name,S).then(L=>new TextDecoder().decode(L),()=>null);if(k===null)return null;const N=Object.fromEntries(Object.entries(b.files).map(([L,B])=>[L,B.size]));return{name:b.name,data:k,files:N}}))).filter(b=>b!==null)},async read(p,_){var S;const b=(S=a.get(p.name))==null?void 0:S.files[_];if(b===void 0)throw new Error(`${p.name}/${_} is not in your library`);return s(p.name,b)}};async function d(p,_){const b={},S=new Map;for(const[N,L]of _){const B=await n(L);b[N]={hash:B,size:L.length},S.set(B,L)}const k=[...S].map(([N,L])=>({hash:N,size:L.length}));for(const N of await t.uploads(p,k)){const L=S.get(N.hash);L!==void 0&&await t.putBlob(N,L)}await t.put(p,b)}return{tree:l,async copyOut(p,_){const[b,S,k]=_.split("/");if(b!=="custom"||S===void 0||k!==void 0||!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(S))throw new Error(`not a prefab folder: ${_}`);const N=`${_}/`,L=new Map;for(const[X,fe]of p.files()){const Ee=X.slice(N.length);X.startsWith(N)&&!Ee.split("/").some(Be=>HPr.has(Be))&&L.set(Ee,fe)}const B=L.get("data.json"),W=B===void 0?null:rq(new TextDecoder().decode(B));if(W===null)throw new Error(`${_} has no readable data.json`);const Z={...W,id:typeof W.id=="string"?W.id:crypto.randomUUID(),origin:QPr(W)},Q=`${JSON.stringify(Z,null,2)}
38081
- `;L.set("data.json",new TextEncoder().encode(Q));const K=yqe(WGt(W,S)).slice(0,GPr).replace(/_+$/,"")||"prefab",ue=new Set((await t.list()).map(X=>X.name));let ce=1;for(let X=0;X<JPr;X++){let fe=K;for(;ue.has(fe);)fe=`${K}_${++ce}`;try{return await d(fe,L),{ref:`user:${fe}`,scope:"user",data:Q}}catch(Ee){if(!(Ee instanceof NGt))throw Ee;ue.add(fe)}}throw new Error("could not find a free name in your library — try again")},remove:p=>t.remove(p)}}const KIt=new WeakMap;function XPr(t){let n=KIt.get(t);return n===void 0&&(n=crypto.subtle.digest("SHA-256",new Uint8Array(t)).then(r=>[...new Uint8Array(r)].map(a=>a.toString(16).padStart(2,"0")).join("")),KIt.set(t,n)),n}async function ZPr(t){const n=t.get(".dclignore"),r=RKe(t.keys(),n===void 0?void 0:new TextDecoder().decode(n)).filter(l=>l!==HR),a=new Map;let s=0;for(const l of r){const d=t.get(l);d!==void 0&&(a.set(await XPr(d),d.byteLength),s++)}return{bytes:[...a.values()].reduce((l,d)=>l+d,0),files:s}}const eNt=4e3,KPr=4e6,eIr=_Nt*24*60*60*1e3,tIr="assets/images",nIr=3e3,rIr=100,iIr="Sign in to keep prefabs in your own library. The built-in prefabs work without it.",aIr=t=>t instanceof Error?t.message:String(t);function SUe(t,n){var r,a,s;return{realm:n.replace(/\/$/,""),systemScene:"",position:((r=t.scene)==null?void 0:r.base)??((s=(a=t.scene)==null?void 0:a.parcels)==null?void 0:s[0])??"0,0",spawn:TCr(t),spawnPoints:JSON.stringify(Array.isArray(t.spawnPoints)?t.spawnPoints:[])}}const sIr=({host:t,sceneCompiler:n})=>{const r=new uOr(iOr()),a=zS(t),s=a===null||a.services.projects===null?null:IGt(a.services.projects,(Xn,Fr)=>a.signedFetch(Xn,Fr)),l=()=>{const{address:Xn,isGuest:Fr}=t.identity();return Fr||Xn===null?null:Xn.toLowerCase()},d=[],p=[],_=[],b=[],S=[],k=Xn=>{d.push(Xn),d.length>eNt&&d.splice(0,d.length-eNt);for(const Fr of p)Fr(Xn)},N=FPr(MPr(t.pageDir,(a==null?void 0:a.services.projects)??null,location.search),fe,async Xn=>YIt(await Z,l()??"guest",Xn),LPr((a==null?void 0:a.services.worldsContent)??null)),L=Xn=>{for(const Fr of _)Fr(Xn);Xn.type==="bundleSaved"&&ue!==null&&N.built(ue.id).catch(Fr=>console.error("[editor] mobile preview reload failed",Fr))},B=new Map,W=new Set,Z=fMt.then(APr),Q=IPr({pageDir:t.pageDir,urls:n,machineId:async Xn=>YIt(await Z,l()??"guest",Xn),emit:L,log:k,packages:r.packages,saveLock:async(Xn,Fr)=>{await r.write(Xn,HR,Fr),St.touched(Xn,HR),(ue==null?void 0:ue.id)===Xn&&ue.files.set(HR,Fr)},onPackages:(Xn,Fr)=>{if(Fr===null){B.delete(Xn);return}B.set(Xn,Fr);for(const oi of W)oi(Xn,Fr)}});let K=null,ue=null,ce=null,X=null;async function fe(Xn){var Va;const Fr=(Va=(await r.list()).find(fs=>fs.id===Xn))==null?void 0:Va.previewId;if(Fr!==void 0)return Fr;const oi="p"+Array.from(crypto.getRandomValues(new Uint8Array(16)),fs=>fs.toString(16).padStart(2,"0")).join("");return await r.patch(Xn,{previewId:oi}),oi}async function Ee(Xn){const Fr=new URL("preview/",t.pageDir).href,oi=await caches.open(Awe);for(const Va of await oi.keys())Va.url.startsWith(Fr)&&(Xn===null||!Va.url.startsWith(Xn))&&await oi.delete(Va)}let Be=0,mt=Promise.resolve(),st=Promise.resolve();const yt=lCr({service:(a==null?void 0:a.services.projects)??null,fetch:(Xn,Fr)=>a===null?Promise.reject(new Error("The assistant service is not configured.")):a.signedFetch(Xn,Fr),wallet:l,mobilePreview:N.status,memory:{read:async(Xn,Fr)=>{const oi=await r.assistantMemory(Xn,Fr);return ac(oi)&&typeof oi.id=="string"&&typeof oi.key=="string"?{id:oi.id,key:oi.key}:null},write:(Xn,Fr,oi)=>r.setAssistantMemory(Xn,Fr,oi)},project:()=>{const Xn=Et();return{id:Xn.id,tools:{files:()=>Xn.files,write:(Fr,oi,Va,fs)=>Mt(Xn.id,Fr,oi,{expected:Va,signal:fs}),assets:uWt({files:()=>Xn.files}),scene:(Fr,oi)=>fke(Fr,oi,async Va=>{var ii,yl,Qu;const fs=Kd=>{var Ca,Hs;return JSON.stringify([(Ca=Kd==null?void 0:Kd.scene)==null?void 0:Ca.parcels,(Hs=Kd==null?void 0:Kd.scene)==null?void 0:Hs.base])};await Ik();const wc=fs(Db(await He(Xn.id,"scene.json")));await Ut(Xn.id,Kd=>CCr(Kd,Va));const uu=Db(await He(Xn.id,"scene.json")),ur=fs(uu)!==wc,El=((ii=uu==null?void 0:uu.scene)==null?void 0:ii.parcels)??[],Cp=(yl=tt.scene)==null?void 0:yl.parcels.map(Kd=>`${Kd.x},${Kd.y}`).sort().join(";");if(ur||Cp!==[...El].sort().join(";")){if(!await Xn.flush())throw new Error("The scene did not build. Fix the code and retry sceneSettings to load the new parcels.");oi.throwIfAborted();const Kd=await fe(Xn.id);K=SUe(uu??{},Q.realmUrl(Kd)),await WPr(El,()=>{for(const Ca of b)Ca(K)},oi)}else if(K!==null){const Kd=SUe(uu??{},K.realm);(Kd.spawn!==K.spawn||Kd.spawnPoints!==K.spawnPoints)&&(K={...K,spawn:Kd.spawn,spawnPoints:Kd.spawnPoints},tmr(Kd.spawn,Kd.spawnPoints))}return{requiredPermissions:(uu==null?void 0:uu.requiredPermissions)??[],spawnPoints:(uu==null?void 0:uu.spawnPoints)??[],parcels:El,base:((Qu=uu==null?void 0:uu.scene)==null?void 0:Qu.base)??null,previewReady:!0}}),written:hWt,view:(Fr,oi)=>Fse(Fr,oi),playtest:uKe,uiLayout:RHe,turnEnded:mHt,build:NOr({saveScene:cWt,fileWrites:()=>st,vendorRuntime:ase,compile:()=>Q.build(Xn.id,new Map(Xn.files)),run:lWt,mobilePreview:N.status})}}}});function ht(){yt.reset(),X==null||X(),X=null,ue!==null&&(ue.stop(),r.close(ue.id),St.flush(ue.id),ue=null,ce=null)}async function He(Xn,Fr){return(ue==null?void 0:ue.id)===Xn?ue.files.get(Fr):r.read(Xn,Fr).catch(oi=>{if(!xI(oi))throw oi})}function Mt(Xn,Fr,oi,Va){const fs=st.then(async()=>{if(Va==null||Va.signal.throwIfAborted(),Va!==void 0&&((ue==null?void 0:ue.id)!==Xn||!_Wt(ue.files.get(Fr),Va.expected)))throw new Error("This file changed. Read it again before writing.");await r.write(Xn,Fr,oi),St.touched(Xn,Fr),(ue==null?void 0:ue.id)===Xn&&(ue.files.set(Fr,oi),ue.changed(Fr))});return st=fs.catch(wc=>console.error("[editor] file write failed",wc)),fs}function $e(Xn,Fr){const oi=st.then(async()=>{const Va=await r.remove(Xn,Fr);return Va&&St.touched(Xn,Fr),Va&&(ue==null?void 0:ue.id)===Xn&&ue.files.delete(Fr)&&ue.changed(Fr),Va});return st=oi.catch(Va=>console.error("[editor] file removal failed",Va)),oi}function Re(Xn){const Fr=Et();if(Fr.id!==Xn)throw new Error("that scene is not the one open");return{files:()=>Fr.files,write:(oi,Va)=>Mt(Xn,oi,Va),remove:async oi=>{await $e(Xn,oi)}}}async function zt(Xn){var Va;const Fr=Db(await He(Xn,"scene.json").catch(()=>{})),oi=(((Va=Fr==null?void 0:Fr.display)==null?void 0:Va.title)??"").replace(/[\x00-\x1f\x7f]/g,"").replace(new RegExp(PGt.source,"g"),"").trim().slice(0,rIr);return oi===""?Xn:oi}async function wt(Xn,Fr){const oi=(await r.list()).find(fs=>fs.id===Xn);if(oi===void 0)return null;const Va=await r.duplicate(Xn,`${oi.name} ${Fr}`,St.remoteIds());return await Ut(Va.id,fs=>{var wc;return{...fs,display:{...fs.display??{},title:`${((wc=fs.display)==null?void 0:wc.title)||oi.name} ${Fr}`}}}),Va.id}const St=gOr({store:r,session:()=>{const Xn=l();return s===null||Xn===null?null:{api:s,wallet:Xn}},account:()=>s===null?"unavailable":l()===null?"guest":"on",hash:Twe,title:zt,duplicate:async Xn=>{const Fr=await wt(Xn,mNt(new Date));if(Fr===null)throw new Error("The scene is no longer on this device");return Fr}});let vt=!1,Nt=0;async function Ht(){const Xn=++Nt,Fr=l()!==null&&(await yt.shell.aiProviders()).some(oi=>oi.available);Xn!==Nt||Fr===vt||(vt=Fr,Y0())}Ht();let Gt=l();const ut=setInterval(()=>{const Xn=l();Xn!==Gt&&(Gt=Xn,yt.reset(),Y0(),Ht(),St.refresh(!0),Ee(ce).catch(Fr=>console.warn("[editor] could not clear the previews",Fr)))},nIr),Ue=()=>{document.visibilityState==="hidden"&&St.flush()};document.addEventListener("visibilitychange",Ue);const Ke=new Set;async function Ut(Xn,Fr){const oi=Db(await He(Xn,"scene.json"));if(oi===null)throw new Error("scene.json is missing or is not valid JSON");await Mt(Xn,"scene.json",vIt(Fr(oi)))}async function yn(Xn,Fr){if(Fr==null||Fr==="")return null;const oi=await He(Xn,Fr).catch(()=>{});return oi===void 0||oi.length>KPr?null:bIt(Fr,oi)}async function un(Xn,Fr=St.status().projects){var Va,fs,wc,uu;const oi=Db(await He(Xn.id,"scene.json").catch(()=>{}));return{sync:Fr[Xn.id],path:Xn.id,name:Xn.name,title:((Va=oi==null?void 0:oi.display)==null?void 0:Va.title)||Xn.name,world:((fs=oi==null?void 0:oi.worldConfiguration)==null?void 0:fs.name)||null,parcels:Array.isArray((wc=oi==null?void 0:oi.scene)==null?void 0:wc.parcels)?oi.scene.parcels.length:0,thumbnail:await yn(Xn.id,(uu=oi==null?void 0:oi.display)==null?void 0:uu.navmapThumbnail),favourite:Xn.favourite,lastOpened:Xn.lastOpened,published:Xn.published,deletedAt:Xn.deletedAt??void 0}}async function Pn(Xn,Fr){var Va,fs;ht(),d.length=0,L({type:"sessionStarted"});const oi=wc=>{if(ht(),Fr===Be){k(`✖ ${wc}`);for(const uu of S)uu(wc)}};try{if(await St.prepareOpen(Xn,(ii,yl)=>k(`Downloading from your account… ${ii}/${yl}`)),Fr!==Be)return;if(!await r.open(Xn)){oi("This scene is open in another tab. Close it there to edit it here.");return}const wc=await r.readAll(Xn).then(async ii=>{for(const[yl,Qu]of eAr(ii))await Mt(Xn,yl,Qu),ii.set(yl,Qu);return ii}).catch(ii=>{throw r.close(Xn),ii});if(Fr!==Be){r.close(Xn);return}const uu=await fe(Xn);if(Fr!==Be){r.close(Xn);return}const ur=Q.open(Xn,wc,uu);ue=ur;const El=Q.realmUrl(uu);if(ce=El,k(`▶ Opening ${((fs=(Va=Db(ur.files.get("scene.json")))==null?void 0:Va.display)==null?void 0:fs.title)||Xn}`),!await ur.start()&&!await ur.published()){if(Fr!==Be)return;k("✖ The scene did not build.");for(const ii of S)ii("The scene did not build.");return}if(await r.patch(Xn,{lastOpened:Date.now()}),Fr!==Be){ht();return}const Cp=Db(ur.files.get("scene.json"))??{};K=SUe(Cp,El),X=VPr(ii=>t.engineConsole(ii),k);for(const ii of b)ii(K)}catch(wc){oi(aIr(wc))}}function ci(Xn){N.close(),K=null;const Fr=++Be,oi=yt.reset(),Va=mt.then(async()=>{await oi,await st,Fr===Be&&await Xn(Fr)});return mt=Va.catch(fs=>console.error("[editor] project transition failed",fs)),Va}function Et(){if(ue===null)throw new Error("no project is open");return ue}const _i={saveFile:async({path:Xn,content:Fr})=>Mt(Et().id,Xn,Fr),getFile:async({path:Xn})=>{const Fr=Et().files.get(Xn)??pPr(Xn);if(Fr===void 0)throw new Error(`no such file: ${Xn}`);return{content:Fr}},removeFiles:async({filePaths:Xn})=>{const Fr=Et(),oi=[],Va=[];for(const fs of Xn)(await $e(Fr.id,fs).catch(()=>!1)?oi:Va).push(fs);return{success:oi,failed:Va}},getFilesSizes:async({path:Xn,ignore:Fr})=>{const oi=Xn===""?"":`${Xn.replace(/\/+$/,"")}/`;return{files:[...Et().files.keys()].filter(fs=>fs.startsWith(oi)&&!fs.split("/").some(wc=>Fr.includes(wc))).sort().map(fs=>({path:fs}))}}},yr={async find(Xn){return(await r.list()).some(Fr=>Fr.id===Xn)?!0:(await St.refresh(!0),St.remoteOnly().some(Fr=>Fr.id===Xn))},files:async Xn=>(ue==null?void 0:ue.id)===Xn?new Map(ue.files):r.readAll(Xn),manifest:Xn=>St.manifest(Xn),build:async(Xn,Fr)=>Q.build(Xn,await yr.files(Xn),Fr),dependencies:async Xn=>AGt(await He(Xn,"package.json")),onImported:Xn=>(Ke.add(Xn),()=>Ke.delete(Xn))},Ya=a===null?null:rOr({host:a,setWorld:async(Xn,Fr)=>{var Va,fs;((fs=(Va=Db(await He(Xn,"scene.json")))==null?void 0:Va.worldConfiguration)==null?void 0:fs.name)!==Fr&&await Ut(Xn,wc=>({...wc,worldConfiguration:{...wc.worldConfiguration??{},name:Fr}}))},files:Xn=>yr.files(Xn),build:(Xn,Fr)=>Q.build(Xn,Fr,{production:!0}),published:(Xn,Fr)=>r.patch(Xn,{published:Fr})}),xa=(a==null?void 0:a.services.projects)==null?null:YPr(pOr(a.services.projects,(Xn,Fr)=>a.signedFetch(Xn,Fr)),Twe);z_r(pCr(t.editorBase)),hCr(t.editorBase),gWt({material:mCr,sound:_Cr,iconIndex:vCr,iconBlock:bCr}),Xgr(async()=>ZPr(await yr.files(Et().id)));const mc=wPr({builtin:DOr(t.editorBase,LB("prefabs/catalog.json"),xke),user:()=>xa!==null&&l()!==null?xa.tree:null}),Cc={...(a==null?void 0:a.services.projects)==null?{}:{...yt.shell,aiOffered:()=>vt,aiTranscript:()=>{const Xn=Gt;if(Xn===null||ue===null)return null;const Fr=ue.id;return{owner:`${Fr}@${Xn.toLowerCase()}`,load:()=>r.transcript(Fr,Xn),save:oi=>r.setTranscript(Fr,Xn,oi)}}},pickProject:async()=>{},openProject:Xn=>ci(Fr=>Pn(Xn,Fr)),relaunchProject:Xn=>ci(Fr=>Pn(Xn,Fr)),closeProject:()=>ci(async()=>{ht(),L({type:"sessionStarted"}),k("■ Scene closed"),await Ee(null).catch(Xn=>console.warn("[editor] could not clear the previews",Xn))}),getState:async()=>{const Xn=await r.list(),Fr=St.status().projects,oi=St.remoteOnly().map(Va=>({path:Va.id,name:Va.name,title:Va.name,world:null,parcels:0,thumbnail:null,remoteOnly:!0}));return{recentProjects:[...Xn].sort((Va,fs)=>fs.lastOpened-Va.lastOpened).map(Va=>Va.id),projects:[...await Promise.all(Xn.map(Va=>un(Va,Fr))),...oi],logs:[...d],bevyWebDir:"",editorSceneDir:"",webPort:0,scenePort:0,editorScenePort:0,favourites:Xn.filter(Va=>Va.favourite).map(Va=>Va.id)}},onStackLog:Xn=>{p.push(Xn)},onBuildEvent:Xn=>{_.push(Xn)},onServersReady:Xn=>{b.push(Xn)},requestReady:async()=>K,phonePreview:async Xn=>K===null?{ok:!1,reason:"no-scene"}:N.open(K.realm,K.position,Xn),phonePreviewState:N.state,onPhonePreviewState:N.subscribe,closePhonePreview:N.close,capturePhonePreview:N.capture,onServersError:Xn=>{S.push(Xn)},toggleFavourite:async Xn=>{const Fr=(await r.list()).find(oi=>oi.id===Xn);Fr!==void 0&&await r.patch(Xn,{favourite:!Fr.favourite})},deleteProject:async Xn=>{const Fr=await r.trash(Xn);return Fr&&St.trashed(Xn),Fr},trashedProjects:async()=>Promise.all((await r.trashed()).map(Xn=>un(Xn))),restoreProject:async Xn=>{const Fr=await r.restore(Xn);return Fr&&St.restored(Xn),Fr},syncStatus:async()=>(St.refresh(),St.status()),onSyncStatus:Xn=>St.subscribe(Xn),resolveSyncConflict:(Xn,Fr)=>St.resolve(Xn,Fr),exportProject:async Xn=>OOr(await zt(Xn),await yr.files(Xn)),importProject:async Xn=>{const Fr=await IOr(Xn,async(oi,Va)=>{const fs=await r.create(oi,Va,{taken:St.remoteIds()});return St.touched(fs.id,"scene.json"),fs.id});if((Fr==null?void 0:Fr.ok)===!0){const{id:oi,needsPackages:Va}=Fr.report;Object.keys(Va).length>0&&r.readAll(oi).then(fs=>Q.install(oi,fs)).catch(fs=>console.warn("[editor] could not install the packages of",oi,fs));for(const fs of Ke)fs(Fr.report)}return Fr},projectPackages:async Xn=>B.get(Xn)??null,onProjectPackages:Xn=>(W.add(Xn),()=>W.delete(Xn)),...Ya===null||a===null?{}:{publishScene:(Xn,Fr,oi)=>Ya.publish(Xn,Fr,oi),...Ya.publishShared===void 0?{}:{publishShared:Ya.publishShared},publishStop:async()=>Ya.stop(),publishWorlds:async()=>tOr(l(),a.services.worldsContent)},canImportFolder:COr(),renameProject:(Xn,Fr)=>Ut(Xn,oi=>({...oi,display:{...oi.display??{},title:Fr.trim()}})),duplicateProject:Xn=>wt(Xn,"copy"),sceneTemplates:async()=>uPr(),createScene:async(Xn,Fr,oi)=>{const Va=zGt(oi),fs=Db(Va.get("scene.json"));if(fs===null)throw new Error(`template not found: ${oi}`);Va.set("scene.json",vIt({...fs,display:{...fs.display??{},title:Fr.trim()}}));const wc=await r.create(Fr,Va,{taken:St.remoteIds()});return St.touched(wc.id,"scene.json"),wc.id},openExternal:async Xn=>{/^https?:$/.test(new URL(Xn).protocol)&&window.open(Xn,"_blank","noopener,noreferrer")},compositeEntityIds:async Xn=>{for(const Fr of kCr){const oi=await He(Xn,Fr);if(oi!==void 0)return ECr(new TextDecoder().decode(oi))}return[]},sceneSettings:async Xn=>{const Fr=Db(await He(Xn,"scene.json"));if(Fr===null)throw new Error("scene.json is missing or is not valid JSON");const oi=xCr(Fr);return{...oi,thumbnail:await yn(Xn,oi.thumbnailPath)}},saveSceneSettings:async(Xn,Fr)=>{const oi=wCr(Fr);return oi!==null?oi:(await Ut(Xn,Va=>SCr(Va,Fr)),null)},pickSceneThumbnail:async Xn=>{const Fr=await $Gt(Object.values(lqe).join(","));if(Fr===null)return null;const oi=kGt(Fr.name);if(lqe[oi]===void 0)throw new Error("not a supported image (png, jpg, gif, webp)");const Va=`${tIr}/scene-thumbnail${oi}`,fs=new Uint8Array(await Fr.arrayBuffer());return await Mt(Xn,Va,fs),{path:Va,dataUrl:bIt(Va,fs)}},appVersion:async()=>sCr,prefabLibraryList:()=>mc.list(),prefabLibraryCopyIn:async(Xn,Fr)=>mc.copyIn(Xn,Re(Fr)),prefabLibraryUpdateCopy:async(Xn,Fr)=>mc.updateCopy(Xn,Re(Fr)),prefabUserLibrary:()=>xa===null?"unavailable":l()===null?"guest":"on",...xa===null?{}:{prefabLibraryCopyOut:async(Xn,Fr)=>{if(l()===null)throw new Error(iIr);return xa.copyOut(Re(Xn),Fr)},prefabLibraryDelete:async Xn=>{const Fr=VGt(Xn);return(Fr==null?void 0:Fr.scope)==="user"&&l()!==null?xa.remove(Fr.name):!1}}};async function Gl(){const Xn=new Set;for(const Fr of[...await r.list(),...await r.trashed()]){const oi=_Gt(await He(Fr.id,HR).catch(()=>{}));for(const Va of Object.keys((oi==null?void 0:oi.packages)??{}))Xn.add(Va);for(const[Va,fs]of Object.entries((oi==null?void 0:oi.dependencies)??{}))Xn.add(u7(Va,fs))}for(const Fr of await r.packages.keys())Xn.has(Fr)||await r.packages.remove(Fr)}return r.purge(Date.now()-eIr).then(async Xn=>{const Fr=await caches.open(Awe),oi=Xn.map(({id:fs,previewId:wc})=>Q.realmUrl(wc??fs));for(const fs of await Fr.keys())oi.some(wc=>fs.url.startsWith(wc))&&await Fr.delete(fs);const Va=await caches.open(iCr);for(const fs of oi)await Va.delete(`${fs}__storage`);Xn.length>0&&await Gl()}).catch(Xn=>console.warn("[editor] could not empty the trash",Xn)),{shell:Cc,projects:yr,dataLayer:_i,dispose:()=>{N.dispose(),yt.dispose(),Be++,ht(),Q.dispose(),clearInterval(ut),document.removeEventListener("visibilitychange",Ue),St.flush().finally(()=>St.dispose())}}};let d7=null,Bq=null,Ore=null,tNt=!1;function oIr(){if(d7!==null)return d7;const t=window.__dclEditorHost;if(t===void 0||t.version!==0&&t.version!==1)return console.error("[editor] window.__dclEditorHost (contract v0 or v1) is missing: nothing to mount into"),null;console.log("[editor] web build 2026-11-04T01:02:07.258Z"),vNt(t),iRt(a=>t.engineConsole(a)),wMt(()=>t.identity()),aXn.needed=!1;const n=sIr({host:t,sceneCompiler:fCr(t.editorBase)});window.editorShell=cIr(n.shell,t),R3t(n.dataLayer??null),mJe();const r=document.createElement("link");return r.rel="stylesheet",r.href=new URL("editor.css",t.editorBase).href,r.integrity=LB("editor.css"),r.crossOrigin="anonymous",r.onerror=()=>console.error("[editor] editor.css did not load or does not match the hash this editor was published with: its fonts are not applied"),document.head.appendChild(r),J1.project=null,J1.notice=null,d7={host:t,web:n,fonts:r},d7}function Iwe(){const t=Bq;Bq=null,t==null||t.unmount()}function cIr(t,n){const{createScene:r,importProject:a,duplicateProject:s}=t;return{...t,...r===void 0?{}:{createScene:async(l,d,p)=>{const _=await r(l,d,p);return _!==null&&rw("project_created",{project_id:_,source:"template",template:p}),_}},...a===void 0?{}:{importProject:async l=>{const d=await a(l);return(d==null?void 0:d.ok)===!0&&rw("project_created",{project_id:d.report.id,source:"import",import_kind:l}),d}},...s===void 0?{}:{duplicateProject:async l=>{const d=await s(l);return d!==null&&rw("project_created",{project_id:d,source:"duplicate",from_project_id:l}),d}},openProject:async l=>{const d=Bq;Iwe(),d==null||d.api.close(),Ore??(Ore=jBt(n.container,C.jsx(FEr,{}))),n.setMode("edit"),J1.project=l,J1.opens++,await t.openProject(l),rw("project_opened")}}}function lIr(t,n){var p;const r=oIr();if(r===null)return()=>{};Iwe();const a=document.createElement("div");a.style.cssText="position:relative;width:100%;height:100%",BYn(a),t.appendChild(a);const s=jBt(a,C.jsx(zYn,{}),"eui-create-root"),l={api:n,unmount:()=>{s(),a.remove()}};Bq=l;const d=tNt?null:((p=zS(r.host))==null?void 0:p.openProject)??null;return tNt=!0,rw("editor_opened",{deep_link:d!==null}),d!==null&&r.web.projects.find(d).catch(()=>!1).then(_=>{var b;Bq===l&&(_?(b=window.editorShell)==null||b.openProject(d):J1.notice=`“${d}” is not on this device or on your account. Here are your scenes.`)}),()=>{Bq===l&&Iwe()}}function uIr(){Iwe();const t=d7;if(t===null)return;d7=null;const n=Ik();Ore==null||Ore(),Ore=null,t.fonts.remove(),J1.project=null,delete window.editorShell,wMt(null),iRt(null),vNt(null),t.host.setMode("off"),n.finally(()=>{var r,a;(a=(r=t.web).dispose)==null||a.call(r),d7===null&&R3t(null)})}window.__dclEditor={mountHome:lIr,unmount:uIr};
38081
+ `;L.set("data.json",new TextEncoder().encode(Q));const K=yqe(WGt(W,S)).slice(0,GPr).replace(/_+$/,"")||"prefab",ue=new Set((await t.list()).map(X=>X.name));let ce=1;for(let X=0;X<JPr;X++){let fe=K;for(;ue.has(fe);)fe=`${K}_${++ce}`;try{return await d(fe,L),{ref:`user:${fe}`,scope:"user",data:Q}}catch(Ee){if(!(Ee instanceof NGt))throw Ee;ue.add(fe)}}throw new Error("could not find a free name in your library — try again")},remove:p=>t.remove(p)}}const KIt=new WeakMap;function XPr(t){let n=KIt.get(t);return n===void 0&&(n=crypto.subtle.digest("SHA-256",new Uint8Array(t)).then(r=>[...new Uint8Array(r)].map(a=>a.toString(16).padStart(2,"0")).join("")),KIt.set(t,n)),n}async function ZPr(t){const n=t.get(".dclignore"),r=RKe(t.keys(),n===void 0?void 0:new TextDecoder().decode(n)).filter(l=>l!==HR),a=new Map;let s=0;for(const l of r){const d=t.get(l);d!==void 0&&(a.set(await XPr(d),d.byteLength),s++)}return{bytes:[...a.values()].reduce((l,d)=>l+d,0),files:s}}const eNt=4e3,KPr=4e6,eIr=_Nt*24*60*60*1e3,tIr="assets/images",nIr=3e3,rIr=100,iIr="Sign in to keep prefabs in your own library. The built-in prefabs work without it.",aIr=t=>t instanceof Error?t.message:String(t);function SUe(t,n){var r,a,s;return{realm:n.replace(/\/$/,""),systemScene:"",position:((r=t.scene)==null?void 0:r.base)??((s=(a=t.scene)==null?void 0:a.parcels)==null?void 0:s[0])??"0,0",spawn:TCr(t),spawnPoints:JSON.stringify(Array.isArray(t.spawnPoints)?t.spawnPoints:[])}}const sIr=({host:t,sceneCompiler:n})=>{const r=new uOr(iOr()),a=zS(t),s=a===null||a.services.projects===null?null:IGt(a.services.projects,(Xn,Fr)=>a.signedFetch(Xn,Fr)),l=()=>{const{address:Xn,isGuest:Fr}=t.identity();return Fr||Xn===null?null:Xn.toLowerCase()},d=[],p=[],_=[],b=[],S=[],k=Xn=>{d.push(Xn),d.length>eNt&&d.splice(0,d.length-eNt);for(const Fr of p)Fr(Xn)},N=FPr(MPr(t.pageDir,(a==null?void 0:a.services.projects)??null,location.search),fe,async Xn=>YIt(await Z,l()??"guest",Xn),LPr((a==null?void 0:a.services.worldsContent)??null)),L=Xn=>{for(const Fr of _)Fr(Xn);Xn.type==="bundleSaved"&&ue!==null&&N.built(ue.id).catch(Fr=>console.error("[editor] mobile preview reload failed",Fr))},B=new Map,W=new Set,Z=fMt.then(APr),Q=IPr({pageDir:t.pageDir,urls:n,machineId:async Xn=>YIt(await Z,l()??"guest",Xn),emit:L,log:k,packages:r.packages,saveLock:async(Xn,Fr)=>{await r.write(Xn,HR,Fr),St.touched(Xn,HR),(ue==null?void 0:ue.id)===Xn&&ue.files.set(HR,Fr)},onPackages:(Xn,Fr)=>{if(Fr===null){B.delete(Xn);return}B.set(Xn,Fr);for(const oi of W)oi(Xn,Fr)}});let K=null,ue=null,ce=null,X=null;async function fe(Xn){var Va;const Fr=(Va=(await r.list()).find(fs=>fs.id===Xn))==null?void 0:Va.previewId;if(Fr!==void 0)return Fr;const oi="p"+Array.from(crypto.getRandomValues(new Uint8Array(16)),fs=>fs.toString(16).padStart(2,"0")).join("");return await r.patch(Xn,{previewId:oi}),oi}async function Ee(Xn){const Fr=new URL("preview/",t.pageDir).href,oi=await caches.open(Awe);for(const Va of await oi.keys())Va.url.startsWith(Fr)&&(Xn===null||!Va.url.startsWith(Xn))&&await oi.delete(Va)}let Be=0,mt=Promise.resolve(),st=Promise.resolve();const yt=lCr({service:(a==null?void 0:a.services.projects)??null,fetch:(Xn,Fr)=>a===null?Promise.reject(new Error("The assistant service is not configured.")):a.signedFetch(Xn,Fr),wallet:l,mobilePreview:N.status,memory:{read:async(Xn,Fr)=>{const oi=await r.assistantMemory(Xn,Fr);return ac(oi)&&typeof oi.id=="string"&&typeof oi.key=="string"?{id:oi.id,key:oi.key}:null},write:(Xn,Fr,oi)=>r.setAssistantMemory(Xn,Fr,oi)},project:()=>{const Xn=Et();return{id:Xn.id,tools:{files:()=>Xn.files,write:(Fr,oi,Va,fs)=>Mt(Xn.id,Fr,oi,{expected:Va,signal:fs}),assets:uWt({files:()=>Xn.files}),scene:(Fr,oi)=>fke(Fr,oi,async Va=>{var ii,yl,Qu;const fs=Kd=>{var Ca,Hs;return JSON.stringify([(Ca=Kd==null?void 0:Kd.scene)==null?void 0:Ca.parcels,(Hs=Kd==null?void 0:Kd.scene)==null?void 0:Hs.base])};await Ik();const wc=fs(Db(await He(Xn.id,"scene.json")));await Ut(Xn.id,Kd=>CCr(Kd,Va));const uu=Db(await He(Xn.id,"scene.json")),ur=fs(uu)!==wc,El=((ii=uu==null?void 0:uu.scene)==null?void 0:ii.parcels)??[],Cp=(yl=tt.scene)==null?void 0:yl.parcels.map(Kd=>`${Kd.x},${Kd.y}`).sort().join(";");if(ur||Cp!==[...El].sort().join(";")){if(!await Xn.flush())throw new Error("The scene did not build. Fix the code and retry sceneSettings to load the new parcels.");oi.throwIfAborted();const Kd=await fe(Xn.id);K=SUe(uu??{},Q.realmUrl(Kd)),await WPr(El,()=>{for(const Ca of b)Ca(K)},oi)}else if(K!==null){const Kd=SUe(uu??{},K.realm);(Kd.spawn!==K.spawn||Kd.spawnPoints!==K.spawnPoints)&&(K={...K,spawn:Kd.spawn,spawnPoints:Kd.spawnPoints},tmr(Kd.spawn,Kd.spawnPoints))}return{requiredPermissions:(uu==null?void 0:uu.requiredPermissions)??[],spawnPoints:(uu==null?void 0:uu.spawnPoints)??[],parcels:El,base:((Qu=uu==null?void 0:uu.scene)==null?void 0:Qu.base)??null,previewReady:!0}}),written:hWt,view:(Fr,oi)=>Fse(Fr,oi),playtest:uKe,uiLayout:RHe,turnEnded:mHt,build:NOr({saveScene:cWt,fileWrites:()=>st,vendorRuntime:ase,compile:()=>Q.build(Xn.id,new Map(Xn.files)),run:lWt,mobilePreview:N.status})}}}});function ht(){yt.reset(),X==null||X(),X=null,ue!==null&&(ue.stop(),r.close(ue.id),St.flush(ue.id),ue=null,ce=null)}async function He(Xn,Fr){return(ue==null?void 0:ue.id)===Xn?ue.files.get(Fr):r.read(Xn,Fr).catch(oi=>{if(!xI(oi))throw oi})}function Mt(Xn,Fr,oi,Va){const fs=st.then(async()=>{if(Va==null||Va.signal.throwIfAborted(),Va!==void 0&&((ue==null?void 0:ue.id)!==Xn||!_Wt(ue.files.get(Fr),Va.expected)))throw new Error("This file changed. Read it again before writing.");await r.write(Xn,Fr,oi),St.touched(Xn,Fr),(ue==null?void 0:ue.id)===Xn&&(ue.files.set(Fr,oi),ue.changed(Fr))});return st=fs.catch(wc=>console.error("[editor] file write failed",wc)),fs}function $e(Xn,Fr){const oi=st.then(async()=>{const Va=await r.remove(Xn,Fr);return Va&&St.touched(Xn,Fr),Va&&(ue==null?void 0:ue.id)===Xn&&ue.files.delete(Fr)&&ue.changed(Fr),Va});return st=oi.catch(Va=>console.error("[editor] file removal failed",Va)),oi}function Re(Xn){const Fr=Et();if(Fr.id!==Xn)throw new Error("that scene is not the one open");return{files:()=>Fr.files,write:(oi,Va)=>Mt(Xn,oi,Va),remove:async oi=>{await $e(Xn,oi)}}}async function zt(Xn){var Va;const Fr=Db(await He(Xn,"scene.json").catch(()=>{})),oi=(((Va=Fr==null?void 0:Fr.display)==null?void 0:Va.title)??"").replace(/[\x00-\x1f\x7f]/g,"").replace(new RegExp(PGt.source,"g"),"").trim().slice(0,rIr);return oi===""?Xn:oi}async function wt(Xn,Fr){const oi=(await r.list()).find(fs=>fs.id===Xn);if(oi===void 0)return null;const Va=await r.duplicate(Xn,`${oi.name} ${Fr}`,St.remoteIds());return await Ut(Va.id,fs=>{var wc;return{...fs,display:{...fs.display??{},title:`${((wc=fs.display)==null?void 0:wc.title)||oi.name} ${Fr}`}}}),Va.id}const St=gOr({store:r,session:()=>{const Xn=l();return s===null||Xn===null?null:{api:s,wallet:Xn}},account:()=>s===null?"unavailable":l()===null?"guest":"on",hash:Twe,title:zt,duplicate:async Xn=>{const Fr=await wt(Xn,mNt(new Date));if(Fr===null)throw new Error("The scene is no longer on this device");return Fr}});let vt=!1,Nt=0;async function Ht(){const Xn=++Nt,Fr=l()!==null&&(await yt.shell.aiProviders()).some(oi=>oi.available);Xn!==Nt||Fr===vt||(vt=Fr,Y0())}Ht();let Gt=l();const ut=setInterval(()=>{const Xn=l();Xn!==Gt&&(Gt=Xn,yt.reset(),Y0(),Ht(),St.refresh(!0),Ee(ce).catch(Fr=>console.warn("[editor] could not clear the previews",Fr)))},nIr),Ue=()=>{document.visibilityState==="hidden"&&St.flush()};document.addEventListener("visibilitychange",Ue);const Ke=new Set;async function Ut(Xn,Fr){const oi=Db(await He(Xn,"scene.json"));if(oi===null)throw new Error("scene.json is missing or is not valid JSON");await Mt(Xn,"scene.json",vIt(Fr(oi)))}async function yn(Xn,Fr){if(Fr==null||Fr==="")return null;const oi=await He(Xn,Fr).catch(()=>{});return oi===void 0||oi.length>KPr?null:bIt(Fr,oi)}async function un(Xn,Fr=St.status().projects){var Va,fs,wc,uu;const oi=Db(await He(Xn.id,"scene.json").catch(()=>{}));return{sync:Fr[Xn.id],path:Xn.id,name:Xn.name,title:((Va=oi==null?void 0:oi.display)==null?void 0:Va.title)||Xn.name,world:((fs=oi==null?void 0:oi.worldConfiguration)==null?void 0:fs.name)||null,parcels:Array.isArray((wc=oi==null?void 0:oi.scene)==null?void 0:wc.parcels)?oi.scene.parcels.length:0,thumbnail:await yn(Xn.id,(uu=oi==null?void 0:oi.display)==null?void 0:uu.navmapThumbnail),favourite:Xn.favourite,lastOpened:Xn.lastOpened,published:Xn.published,deletedAt:Xn.deletedAt??void 0}}async function Pn(Xn,Fr){var Va,fs;ht(),d.length=0,L({type:"sessionStarted"});const oi=wc=>{if(ht(),Fr===Be){k(`✖ ${wc}`);for(const uu of S)uu(wc)}};try{if(await St.prepareOpen(Xn,(ii,yl)=>k(`Downloading from your account… ${ii}/${yl}`)),Fr!==Be)return;if(!await r.open(Xn)){oi("This scene is open in another tab. Close it there to edit it here.");return}const wc=await r.readAll(Xn).then(async ii=>{for(const[yl,Qu]of eAr(ii))await Mt(Xn,yl,Qu),ii.set(yl,Qu);return ii}).catch(ii=>{throw r.close(Xn),ii});if(Fr!==Be){r.close(Xn);return}const uu=await fe(Xn);if(Fr!==Be){r.close(Xn);return}const ur=Q.open(Xn,wc,uu);ue=ur;const El=Q.realmUrl(uu);if(ce=El,k(`▶ Opening ${((fs=(Va=Db(ur.files.get("scene.json")))==null?void 0:Va.display)==null?void 0:fs.title)||Xn}`),!await ur.start()&&!await ur.published()){if(Fr!==Be)return;k("✖ The scene did not build.");for(const ii of S)ii("The scene did not build.");return}if(await r.patch(Xn,{lastOpened:Date.now()}),Fr!==Be){ht();return}const Cp=Db(ur.files.get("scene.json"))??{};K=SUe(Cp,El),X=VPr(ii=>t.engineConsole(ii),k);for(const ii of b)ii(K)}catch(wc){oi(aIr(wc))}}function ci(Xn){N.close(),K=null;const Fr=++Be,oi=yt.reset(),Va=mt.then(async()=>{await oi,await st,Fr===Be&&await Xn(Fr)});return mt=Va.catch(fs=>console.error("[editor] project transition failed",fs)),Va}function Et(){if(ue===null)throw new Error("no project is open");return ue}const _i={saveFile:async({path:Xn,content:Fr})=>Mt(Et().id,Xn,Fr),getFile:async({path:Xn})=>{const Fr=Et().files.get(Xn)??pPr(Xn);if(Fr===void 0)throw new Error(`no such file: ${Xn}`);return{content:Fr}},removeFiles:async({filePaths:Xn})=>{const Fr=Et(),oi=[],Va=[];for(const fs of Xn)(await $e(Fr.id,fs).catch(()=>!1)?oi:Va).push(fs);return{success:oi,failed:Va}},getFilesSizes:async({path:Xn,ignore:Fr})=>{const oi=Xn===""?"":`${Xn.replace(/\/+$/,"")}/`;return{files:[...Et().files.keys()].filter(fs=>fs.startsWith(oi)&&!fs.split("/").some(wc=>Fr.includes(wc))).sort().map(fs=>({path:fs}))}}},yr={async find(Xn){return(await r.list()).some(Fr=>Fr.id===Xn)?!0:(await St.refresh(!0),St.remoteOnly().some(Fr=>Fr.id===Xn))},files:async Xn=>(ue==null?void 0:ue.id)===Xn?new Map(ue.files):r.readAll(Xn),manifest:Xn=>St.manifest(Xn),build:async(Xn,Fr)=>Q.build(Xn,await yr.files(Xn),Fr),dependencies:async Xn=>AGt(await He(Xn,"package.json")),onImported:Xn=>(Ke.add(Xn),()=>Ke.delete(Xn))},Ya=a===null?null:rOr({host:a,setWorld:async(Xn,Fr)=>{var Va,fs;((fs=(Va=Db(await He(Xn,"scene.json")))==null?void 0:Va.worldConfiguration)==null?void 0:fs.name)!==Fr&&await Ut(Xn,wc=>({...wc,worldConfiguration:{...wc.worldConfiguration??{},name:Fr}}))},files:Xn=>yr.files(Xn),build:(Xn,Fr)=>Q.build(Xn,Fr,{production:!0}),published:(Xn,Fr)=>r.patch(Xn,{published:Fr})}),xa=(a==null?void 0:a.services.projects)==null?null:YPr(pOr(a.services.projects,(Xn,Fr)=>a.signedFetch(Xn,Fr)),Twe);z_r(pCr(t.editorBase)),hCr(t.editorBase),gWt({material:mCr,sound:_Cr,iconIndex:vCr,iconBlock:bCr}),Xgr(async()=>ZPr(await yr.files(Et().id)));const mc=wPr({builtin:DOr(t.editorBase,LB("prefabs/catalog.json"),xke),user:()=>xa!==null&&l()!==null?xa.tree:null}),Cc={...(a==null?void 0:a.services.projects)==null?{}:{...yt.shell,aiOffered:()=>vt,aiTranscript:()=>{const Xn=Gt;if(Xn===null||ue===null)return null;const Fr=ue.id;return{owner:`${Fr}@${Xn.toLowerCase()}`,load:()=>r.transcript(Fr,Xn),save:oi=>r.setTranscript(Fr,Xn,oi)}}},pickProject:async()=>{},openProject:Xn=>ci(Fr=>Pn(Xn,Fr)),relaunchProject:Xn=>ci(Fr=>Pn(Xn,Fr)),closeProject:()=>ci(async()=>{ht(),L({type:"sessionStarted"}),k("■ Scene closed"),await Ee(null).catch(Xn=>console.warn("[editor] could not clear the previews",Xn))}),getState:async()=>{const Xn=await r.list(),Fr=St.status().projects,oi=St.remoteOnly().map(Va=>({path:Va.id,name:Va.name,title:Va.name,world:null,parcels:0,thumbnail:null,remoteOnly:!0}));return{recentProjects:[...Xn].sort((Va,fs)=>fs.lastOpened-Va.lastOpened).map(Va=>Va.id),projects:[...await Promise.all(Xn.map(Va=>un(Va,Fr))),...oi],logs:[...d],bevyWebDir:"",editorSceneDir:"",webPort:0,scenePort:0,editorScenePort:0,favourites:Xn.filter(Va=>Va.favourite).map(Va=>Va.id)}},onStackLog:Xn=>{p.push(Xn)},onBuildEvent:Xn=>{_.push(Xn)},onServersReady:Xn=>{b.push(Xn)},requestReady:async()=>K,phonePreview:async Xn=>K===null?{ok:!1,reason:"no-scene"}:N.open(K.realm,K.position,Xn),phonePreviewState:N.state,onPhonePreviewState:N.subscribe,closePhonePreview:N.close,capturePhonePreview:N.capture,onServersError:Xn=>{S.push(Xn)},toggleFavourite:async Xn=>{const Fr=(await r.list()).find(oi=>oi.id===Xn);Fr!==void 0&&await r.patch(Xn,{favourite:!Fr.favourite})},deleteProject:async Xn=>{const Fr=await r.trash(Xn);return Fr&&St.trashed(Xn),Fr},trashedProjects:async()=>Promise.all((await r.trashed()).map(Xn=>un(Xn))),restoreProject:async Xn=>{const Fr=await r.restore(Xn);return Fr&&St.restored(Xn),Fr},syncStatus:async()=>(St.refresh(),St.status()),onSyncStatus:Xn=>St.subscribe(Xn),resolveSyncConflict:(Xn,Fr)=>St.resolve(Xn,Fr),exportProject:async Xn=>OOr(await zt(Xn),await yr.files(Xn)),importProject:async Xn=>{const Fr=await IOr(Xn,async(oi,Va)=>{const fs=await r.create(oi,Va,{taken:St.remoteIds()});return St.touched(fs.id,"scene.json"),fs.id});if((Fr==null?void 0:Fr.ok)===!0){const{id:oi,needsPackages:Va}=Fr.report;Object.keys(Va).length>0&&r.readAll(oi).then(fs=>Q.install(oi,fs)).catch(fs=>console.warn("[editor] could not install the packages of",oi,fs));for(const fs of Ke)fs(Fr.report)}return Fr},projectPackages:async Xn=>B.get(Xn)??null,onProjectPackages:Xn=>(W.add(Xn),()=>W.delete(Xn)),...Ya===null||a===null?{}:{publishScene:(Xn,Fr,oi)=>Ya.publish(Xn,Fr,oi),...Ya.publishShared===void 0?{}:{publishShared:Ya.publishShared},publishStop:async()=>Ya.stop(),publishWorlds:async()=>tOr(l(),a.services.worldsContent)},canImportFolder:COr(),renameProject:(Xn,Fr)=>Ut(Xn,oi=>({...oi,display:{...oi.display??{},title:Fr.trim()}})),duplicateProject:Xn=>wt(Xn,"copy"),sceneTemplates:async()=>uPr(),createScene:async(Xn,Fr,oi)=>{const Va=zGt(oi),fs=Db(Va.get("scene.json"));if(fs===null)throw new Error(`template not found: ${oi}`);Va.set("scene.json",vIt({...fs,display:{...fs.display??{},title:Fr.trim()}}));const wc=await r.create(Fr,Va,{taken:St.remoteIds()});return St.touched(wc.id,"scene.json"),wc.id},openExternal:async Xn=>{/^https?:$/.test(new URL(Xn).protocol)&&window.open(Xn,"_blank","noopener,noreferrer")},compositeEntityIds:async Xn=>{for(const Fr of kCr){const oi=await He(Xn,Fr);if(oi!==void 0)return ECr(new TextDecoder().decode(oi))}return[]},sceneSettings:async Xn=>{const Fr=Db(await He(Xn,"scene.json"));if(Fr===null)throw new Error("scene.json is missing or is not valid JSON");const oi=xCr(Fr);return{...oi,thumbnail:await yn(Xn,oi.thumbnailPath)}},saveSceneSettings:async(Xn,Fr)=>{const oi=wCr(Fr);return oi!==null?oi:(await Ut(Xn,Va=>SCr(Va,Fr)),null)},pickSceneThumbnail:async Xn=>{const Fr=await $Gt(Object.values(lqe).join(","));if(Fr===null)return null;const oi=kGt(Fr.name);if(lqe[oi]===void 0)throw new Error("not a supported image (png, jpg, gif, webp)");const Va=`${tIr}/scene-thumbnail${oi}`,fs=new Uint8Array(await Fr.arrayBuffer());return await Mt(Xn,Va,fs),{path:Va,dataUrl:bIt(Va,fs)}},appVersion:async()=>sCr,prefabLibraryList:()=>mc.list(),prefabLibraryCopyIn:async(Xn,Fr)=>mc.copyIn(Xn,Re(Fr)),prefabLibraryUpdateCopy:async(Xn,Fr)=>mc.updateCopy(Xn,Re(Fr)),prefabUserLibrary:()=>xa===null?"unavailable":l()===null?"guest":"on",...xa===null?{}:{prefabLibraryCopyOut:async(Xn,Fr)=>{if(l()===null)throw new Error(iIr);return xa.copyOut(Re(Xn),Fr)},prefabLibraryDelete:async Xn=>{const Fr=VGt(Xn);return(Fr==null?void 0:Fr.scope)==="user"&&l()!==null?xa.remove(Fr.name):!1}}};async function Gl(){const Xn=new Set;for(const Fr of[...await r.list(),...await r.trashed()]){const oi=_Gt(await He(Fr.id,HR).catch(()=>{}));for(const Va of Object.keys((oi==null?void 0:oi.packages)??{}))Xn.add(Va);for(const[Va,fs]of Object.entries((oi==null?void 0:oi.dependencies)??{}))Xn.add(u7(Va,fs))}for(const Fr of await r.packages.keys())Xn.has(Fr)||await r.packages.remove(Fr)}return r.purge(Date.now()-eIr).then(async Xn=>{const Fr=await caches.open(Awe),oi=Xn.map(({id:fs,previewId:wc})=>Q.realmUrl(wc??fs));for(const fs of await Fr.keys())oi.some(wc=>fs.url.startsWith(wc))&&await Fr.delete(fs);const Va=await caches.open(iCr);for(const fs of oi)await Va.delete(`${fs}__storage`);Xn.length>0&&await Gl()}).catch(Xn=>console.warn("[editor] could not empty the trash",Xn)),{shell:Cc,projects:yr,dataLayer:_i,dispose:()=>{N.dispose(),yt.dispose(),Be++,ht(),Q.dispose(),clearInterval(ut),document.removeEventListener("visibilitychange",Ue),St.flush().finally(()=>St.dispose())}}};let d7=null,Bq=null,Ore=null,tNt=!1;function oIr(){if(d7!==null)return d7;const t=window.__dclEditorHost;if(t===void 0||t.version!==0&&t.version!==1)return console.error("[editor] window.__dclEditorHost (contract v0 or v1) is missing: nothing to mount into"),null;console.log("[editor] web build 2026-11-04T01:13:59.783Z"),vNt(t),iRt(a=>t.engineConsole(a)),wMt(()=>t.identity()),aXn.needed=!1;const n=sIr({host:t,sceneCompiler:fCr(t.editorBase)});window.editorShell=cIr(n.shell,t),R3t(n.dataLayer??null),mJe();const r=document.createElement("link");return r.rel="stylesheet",r.href=new URL("editor.css",t.editorBase).href,r.integrity=LB("editor.css"),r.crossOrigin="anonymous",r.onerror=()=>console.error("[editor] editor.css did not load or does not match the hash this editor was published with: its fonts are not applied"),document.head.appendChild(r),J1.project=null,J1.notice=null,d7={host:t,web:n,fonts:r},d7}function Iwe(){const t=Bq;Bq=null,t==null||t.unmount()}function cIr(t,n){const{createScene:r,importProject:a,duplicateProject:s}=t;return{...t,...r===void 0?{}:{createScene:async(l,d,p)=>{const _=await r(l,d,p);return _!==null&&rw("project_created",{project_id:_,source:"template",template:p}),_}},...a===void 0?{}:{importProject:async l=>{const d=await a(l);return(d==null?void 0:d.ok)===!0&&rw("project_created",{project_id:d.report.id,source:"import",import_kind:l}),d}},...s===void 0?{}:{duplicateProject:async l=>{const d=await s(l);return d!==null&&rw("project_created",{project_id:d,source:"duplicate",from_project_id:l}),d}},openProject:async l=>{const d=Bq;Iwe(),d==null||d.api.close(),Ore??(Ore=jBt(n.container,C.jsx(FEr,{}))),n.setMode("edit"),J1.project=l,J1.opens++,await t.openProject(l),rw("project_opened")}}}function lIr(t,n){var p;const r=oIr();if(r===null)return()=>{};Iwe();const a=document.createElement("div");a.style.cssText="position:relative;width:100%;height:100%",BYn(a),t.appendChild(a);const s=jBt(a,C.jsx(zYn,{}),"eui-create-root"),l={api:n,unmount:()=>{s(),a.remove()}};Bq=l;const d=tNt?null:((p=zS(r.host))==null?void 0:p.openProject)??null;return tNt=!0,rw("editor_opened",{deep_link:d!==null}),d!==null&&r.web.projects.find(d).catch(()=>!1).then(_=>{var b;Bq===l&&(_?(b=window.editorShell)==null||b.openProject(d):J1.notice=`“${d}” is not on this device or on your account. Here are your scenes.`)}),()=>{Bq===l&&Iwe()}}function uIr(){Iwe();const t=d7;if(t===null)return;d7=null;const n=Ik();Ore==null||Ore(),Ore=null,t.fonts.remove(),J1.project=null,delete window.editorShell,wMt(null),iRt(null),vNt(null),t.host.setMode("off"),n.finally(()=>{var r,a;(a=(r=t.web).dispose)==null||a.call(r),d7===null&&R3t(null)})}window.__dclEditor={mountHome:lIr,unmount:uIr};
package/package.json CHANGED
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "name": "@dcl-regenesislabs/web-editor",
3
- "version": "0.3.25-41750763563.commit-7f52255",
3
+ "version": "0.3.25",
4
4
  "license": "Apache-2.0",
5
5
  "description": "The Decentraland scene editor for the web explorer: editor.js plus the files it loads beside it. Served by version, not installed.",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/dcl-regenesislabs/web-editor.git",
9
9
  "directory": "packages/web"
10
- },
11
- "commit": "7f522550e5b53e58dffce1cbcf976eed5d7f0097"
10
+ }
12
11
  }