/* empty css */import"./vue.c16a309b.js";import{qasln,Casa,abasX,tasG,aFasS,a1asT,aLasqt,bvasPn,GasNe,asasXt,_asy,azasQn,a2asN,Jasee,Oasne,aKasDt,a0asB,IasLe,a8asw,a9asd,b7asH,aIascn,aGasdn,lasVe,uasLr,b2aswt,aDasMi,was_t,b3asPt,apasca,aHassr,AasAe,$asre,b9asjr,arasVt,btasda,bcasWn,Taspa,jasfa,bwasBt,ayasga,aMasCt,aOasKe,zasJt,boasma,bsasva,bdasui,amasdr,Hasha,bxasba,bfasya}from"./@vue.6b211d3c.js";import{LasYt}from"./lz-string.dccec454.js";import{casIi}from"./nanoevents.1080beb7.js";import{Yaswa}from"./vue-next-select.ded54c4a.js";import{Das_a}from"./vuedraggable.1879de79.js";import{pasNa}from"./vue-textarea-autosize.35804eaf.js";import{PasCa}from"./vue-panzoom.8ce6f9b1.js";import{saska,uashr}from"./vue-toastification.9c2dad53.js";import"./amator.1e5a40c8.js";import"./bezier-easing.a990b400.js";import"./sortablejs.a0f68e5e.js";import"./panzoom.30c56ba6.js";import"./wheel.f2ae740f.js";import"./ngraph.events.083734c6.js";constSa=function(){constt=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(constiofdocument.querySelectorAll('link[rel="modulepreload"]'))r(i);newMutationObserver(i=>{for(constsofi)if(s.type==="childList")for(constlofs.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});functionn(i){consts={};returni.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}functionr(i){if(i.ep)return;i.ep=!0;consts=n(i);fetch(i.href,s)}};Sa();constMa="modulepreload",ci={},Ia="./",Hn=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${Ia}${r}`,rinci)return;ci[r]=!0;consti=r.endsWith(".css"),s=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${s}`))return;constl=document.createElement("link");if(l.rel=i?"stylesheet":Ma,i||(l.as="script",l.crossOrigin=""),l.href=r,document.head.appendChild(l),i)returnnewPromise((u,c)=>{l.addEventListener("load",u),l.addEventListener("error",()=>c(newError(`Unable to preload CSS for ${r}`)))})})).then(()=>t())},xa="./projInfo-schema.json",$a="Planar Pioneers",Da="A game about controlling and exploiting planes!",Ta="planar-pioneers",Pa="thepaperpilot",Aa="",Ra="",Ea="0.0",Fa="Initial Commit",Oa=!1,qa=!1,Va=2,Ba=!0,La=null,ja="",za=["main"],Ga=3600,Ua=0,Wa=!0,Ha="base64";varve={$schema:xa,title:$a,description:Da,id:Ta,author:Pa,discordName:Aa,discordLink:Ra,versionNumber:Ea,versionTitle:Fa,allowGoBack:Oa,defaultShowSmall:qa,defaultDecimalsShown:Va,useHeader:Ba,banner:La,logo:ja,initialTabs:za,maxTickLength:Ga,offlineLimit:Ua,enablePausing:Wa,exportEncoding:Ha};constYa=ln({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{}});varY=window.player=Ya;functionzr(e){returnJSON.stringify(e,(t,n)=>a(n))}varbe=(e,t)=>{constn=e.__vccOpts||e;for(const[r,i]oft)n[r]=i;returnn};constZa=["onClick"],Xa=X({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){constn=G(!1),r=G(null);functioni(){t("click"),r.value&&clearTimeout(r.value),n.value=!1,Xt(()=>{n.value=!0,r.value=setTimeout(()=>n.value=!1,500)})}return(s,l)=>(S(),T("button",{onClick:Pn(i,["stop"]),class:Ne(["feedback",{activated:n.value,left:e.left}])},[qt(s.$slots,"default",{},void0,!0)],10,Za))}});varGr=be(Xa,[["__scopeId","data-v-01a1b95c"]]);constbr=e=>(cn("data-v-ac351c02"),e=e(),dn(),e),Ja={class:"error"},Ka={class:"error-title"},Qa={class:"error-details",style:{"margin-top":"-10px"}},es={key:0},ts={class:"instructions"},ns=["href"],rs=br(()=>N("span",{class:"material-icons",style:{"font-size":"16px"}},"content_paste",-1)),is=br(()=>N("span",{style:{"margin-left":"8px","font-size":"medium"}},"Copy Save",-1)),as=br(()=>N("br",null,null,-1)),
`))!=null?t:""}function hi(e,t){var n;o.isNaN(t)&&(Fe.hasNaN||(Y.autosave=!1,Fe.hasNaN=!0,Fe.NaNPath=e[yn],Fe.NaNPersistent=e),console.error(`AttemptedtosaveNaNvalueto${(n=e[yn])==null?void0:n.join(".")}`)),e[on].value=t}function ct(e,t=!0){const n=Ve(e)?e:G(e);Ve(e)&&(e=e.value);const r=y({get(){return n.value},set(s){t?hi(i,s):i[on].value=s}});r[Kt]=e;const i={get value(){return n.value},set value(s){t?hi(i,s):i[on].value=s},__v_isRef:!0,[on]:n,[Kt]:e,[fr]:El(),[gr]:!1,[Ot]:r,[yn]:void 0};return ft.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",i,`
Createdat:
`+i[fr]):wn[ft[ft.length-1]].add(i),i}function Fl(e){return e!=null&&typeof e=="object"&&on in e}function In(e){return!(an in e)&&Ot in e?e[Ot]:new Proxy(e,{get(t,n){if(n!==on)return n===Kn?!0:t[n]},set(t,n,r){return t[n]=r,!0},has(t,n){return n===on?!1:n==Kn?!0:Reflect.has(t,n)}})}function Gi(e){ft.length===0?console.warn("Deleting a persistent ref outside of a layer. Ignoring...",e):wn[ft[ft.length-1]].delete(e),e[gr]=!0}Qe.on("addLayer",(e,t)=>{const n=[],r=(i,s=[])=>{let l=!1;return Object.keys(i).forEach(u=>{let c=i[u];if(c!=null&&typeof c=="object"){if(c[Kn]===!0)return;if(an in c&&(c=c[an]),Fl(c)){if(l=!0,c[gr]){console.warn("Deleted persistent ref present in returned object. Ignoring...",c,`
Createdat:
`+c[fr]);return}wn[e.id].delete(c);const p=[e.id,...s,u];c[yn]!=null&&JSON.stringify(p)!==JSON.stringify(c[yn])&&console.error(`Persistentrefisbeingsavedto\`${p.join(".")}\` when it's already present at \`${c[yn].join(".")}\`.`,"This can cause unexpected behavior when loading saves between updates."),c[yn]=p;consth=s.reduce((b,m)=>(minb||(b[m]={}),b[m]),t),g=h[u];h[u]=c[on],fa(h)?g!=null?h[u]=g:h[u]=c[Kt]:g!=null?h[u].value=g:h[u].value=c[Kt]}else!(cinstanceofo)&&!(cinstanceoff)&&!Ve(c)&&!n.includes(c)&&(typeofc.type=="symbol"&&n.push(c),r(c,[...s,u])&&(Bt(c)&&!Bt(i)?console.warn("Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.",anini?i[an]:i,u):l=!0))}}),l};r(e[an]),wn[e.id].forEach(i=>{i[gr]||console.error(`Created persistent ref in ${e.id} without registering it to the layer!`,`Make sure to include everything persistent in the returned object.
Createdat:
`+i[fr])}),wn[e.id].clear()});const Yr=Symbol("RegisterNode"),Zr=Symbol("UnregisterNode"),Xr=Symbol("Nodes"),Jr=Symbol("Bounds"),ge=Lr({});window.layers=ge;const wn={},ft=[];function Kr(e,t){return et(()=>{const n={},r=n.emitter=Ii();if(n.on=r.on.bind(r),n.emit=r.emit.bind(r),n.nodes=G({}),n.id=e,ft.push(e),wn[e]=new Set,n.minimized=ct(!1,!1),Object.assign(n,t.call(n,n)),ft[ft.length-1]==null||ft[ft.length-1]!==e)throw new Error(`Addinglayersstackininvalidstate.Thisshouldnothappen
Stack:${ft}
Tryingtopop${n.id}`);ft.pop(),A(n,"color"),A(n,"display"),A(n,"classes"),A(n,"style"),A(n,"name"),oe(n,"name",n.id),A(n,"minWidth"),oe(n,"minWidth",600),A(n,"minimizable"),oe(n,"minimizable",!0),A(n,"minimizedDisplay");const i=n.style;return n.style=y(()=>{var l,u;let s=a(n.minWidth);return(typeof s=="number"||!Number.isNaN(parseInt(s)))&&(s=s+"px"),[(l=a(i))!=null?l:"",(u=n.minimized)!=null&&u.value?{flexGrow:"0",flexShrink:"0",width:"60px",minWidth:"",flexBasis:"",margin:"0"}:{flexGrow:"",flexShrink:"",width:"",minWidth:s,flexBasis:s,margin:""}]}),n})}function Qr(e,t){if(console.info("Adding layer",e.id),ge[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,ge[e.id]);return}oe(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),ge[e.id]=e,Qe.emit("addLayer",e,t.layers[e.id])}function Ol(e){return ge[e]}function ei(e){console.info("Removing layer",e.id),Qe.emit("removeLayer",e),ge[e.id]=void 0}function ql(e){ei(e),Qr(e,Y)}function Vl(e){const t=G(!1);return{openModal:()=>t.value=!0,modal:j(()=>d(Lt,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>d("h2",null,[a(e.name)]),body:a(e.display)}))}}Qe.on("update",function(t){Object.values(ge).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(ge).forEach(n=>{n==null||n.emit("update",t)}),Object.values(ge).forEach(n=>{n==null||n.emit("postUpdate",t)})});var Bl=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Yr,UnregisterNodeInjectionKey:Zr,NodesInjectionKey:Xr,BoundsInjectionKey:Jr,layers:ge,persistentRefs:wn,addingLayers:ft,createLayer:Kr,addLayer:Qr,getLayer:Ol,removeLayer:ei,reloadLayer:ql,setupLayerModal:Vl},Symbol.toStringTag,{value:"Module"}));const Ll=X({components:{Context:Li,ErrorVue:xi},props:{index:{type:Number,required:!0},display:{type:q(Object,String,Function),required:!0},minimizedDisplay:q(Object,String,Function),minimized:{type:Object,required:!0},name:{type:q(String),required:!0},color:q(String),minimizable:q(Boolean),nodes:{type:Object,required:!0}},emits:["setMinimized"],setup(e){const{display:t,index:n,minimized:r,minimizedDisplay:i}=Ae(e),s=Hr(t),l=Rn(i),u=y(()=>ve.allowGoBack&&n.value>0&&!Pe(r));function c(){Y.tabs.splice(a(e.index),1/0)}function p(g){e.nodes.value=g}const h=G([]);return ga((g,b,m)=>(console.warn(`Errorcaughtin"${e.name}"layer`,g,b,m),h.value.push(g instanceof Error?g:new Error(JSON.stringify(g))),!1)),{component:s,minimizedComponent:l,showGoBack:u,updateNodes:p,unref:a,goBack:c,errors:h}}}),jl={key:1};function zl(e,t,n,r,i,s){const l=Ct("ErrorVue"),u=Ct("Context");return e.errors.length>0?(S(),re(l,{key:0,errors:e.errors},null,8,["errors"])):(S(),T("div",Vt({key:1,class:"layer-container",style:{"--layer-color":e.unref(e.color)}},e.$attrs),[e.showGoBack?(S(),T("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...c)=>e.goBack&&e.goBack(...c))},"\u274C")):B("",!0),e.unref(e.minimized)?(S(),T("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=c=>e.$emit("setMinimized",!1))},[e.minimizedComponent?(S(),re(Ke(e.minimizedComponent),{key:0})):(S(),T("div",jl,ee(e.unref(e.name)),1))])):(S(),T("div",{key:2,class:Ne(["layer-tab",{showGoBack:e.showGoBack}])},[d(u,{onUpdateNodes:e.updateNodes},{default:H(()=>[(S(),re(Ke(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(S(),T("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=c=>e.$emit("setMinimized",!0))}," \u25BC ")):B("",!0)],16))}var Gl=be(Ll,[["render",zl],["__scopeId","data-v-a9f5b1da"]]);const Ui=e=>(cn("data-v-4b4bda40"),e=e(),dn(),e),Ul=Ui(()=>N("h2",null,"Changelog",-1)),Wl=Ui(()=>N("details",{open:""},[N("summary",null,[w("v0.0 Initial Commit - "),N("time",null,"2021-09-04")]),w(" This is the first release :D "),N("ul",null,[N("li",{class:"feature"},"Did everything"),N("li",{class:"fix"},"Had some fun"),N("li",{class:"breaking"},"Removed everything"),N("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),Hl=X({__name:"Changelog",setup(e,{expose:t}){const n=G(!1);return t({open(){n.value=!0}}),(r,i)=>(S(),re(Lt,{modelValue:n.value,"onUpdate
Learnmoreatwww.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await js();const{globalBus:e}=await Hn(()=>Promise.resolve().then(function(){return Ls}),void 0),{startGameLoop:t}=await Hn(()=>import("./gameLoop.42689a05.js"),["assets/gameLoop.42689a05.js","assets/@fontsource.f66d05e7.css","assets/vue.c16a309b.js","assets/amator.1e5a40c8.js","assets/bezier-easing.a990b400.js","assets/@vue.6b211d3c.js","assets/lz-string.dccec454.js","assets/nanoevents.1080beb7.js","assets/vue-next-select.ded54c4a.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.1879de79.js","assets/sortablejs.a0f68e5e.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-panzoom.8ce6f9b1.js","assets/panzoom.30c56ba6.js","assets/wheel.f2ae740f.js","assets/ngraph.events.083734c6.js","assets/vue-toastification.9c2dad53.js","assets/vue-toastification.4b5f8ac8.css"]),n=window.vue=ya(Cf);n.config.errorHandler=function(r,i,s){console.error(r,s,i)},e.emit("setupVue",n),n.mount("#app"),Xt(()=>{const r=hr(),{updateServiceWorker:i}=Sf({onNeedRefresh(){r.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){i()}})},onOfflineReady(){r.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{o as D,Hn as _,Fe as a,ve as b,Xp as c,Qe as g,zs as l,Y as p,ie as s};