function p(e){const{layers:r,parameters:a}=JSON.parse(e),s={layers:[],parameters:[]};for(const t of r){const n={...t};delete n._stateMachineGraphData,s.layers.push(n)}return s.parameters=a,JSON.stringify(s)}function u(e){const r=JSON.parse(e),a=r.type,s={type:a};for(const t in r)t!=="type"&&t.startsWith(a)&&(s[t]=r[t]);return JSON.stringify(s)}async function d(e,r,a,s){const t=JSON.parse(r);delete t.quickPivot;const n=t.belongToAtlas,i=n==null?void 0:n.refId;if(!i)c(n)||delete t.belongToAtlas;else{const o=await s(i);o&&((JSON.parse(o).sprites??[]).some(l=>l.refId==e)||(delete t.belongToAtlas,console.warn("Sprite atlas asset not includes this sprite.")))}return t.fullPath=a,JSON.stringify(t)}function c(e){return typeof(e==null?void 0:e.url)=="string"&&e.url.length>0}export{u as a,p as b,d as c};
