/* empty css */import"./vue.804e2479.js";import{_asI,Casa,lasue,qas_t,tasF,b2asFe,abasj,aDas$n,wasTe,b3asLe,a9as_,Oasie,azasJt,asasut,aFasN,a1asS,aLasJe,a2asp,aHasqt,Aasme,$asZ,b7asO,b9asan,arasqe,bvasvt,a8asD,btasci,bcasbt,Tasdi,uason,jasgi,bwashn,aMasjt,a0asV,aOasSe,JasH,Gasae,IasPe,aIasct,aGasdt,zasKe,boasfi,bsasmi,aKasyt,bdasvn,amasGt,Haspi,bfashi}from"./@vue.6f8187b0.js";import{casTn}from"./nanoevents.1080beb7.js";import{LasZe}from"./lz-string.dccec454.js";import{Yasvi}from"./vue-next-select.f5f69b1a.js";import{Dasbi}from"./vuedraggable.ce650350.js";import{pasyi}from"./vue-textarea-autosize.35804eaf.js";import{Pas_i}from"./vue-panzoom.89be130f.js";import{saswi,uasFn}from"./vue-toastification.5231d1bd.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";constNi=function(){constt=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(constrofdocument.querySelectorAll('link[rel="modulepreload"]'))i(r);newMutationObserver(r=>{for(constsofr)if(s.type==="childList")for(constlofs.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});functionn(r){consts={};returnr.integrity&&(s.integrity=r.integrity),r.referrerpolicy&&(s.referrerPolicy=r.referrerpolicy),r.crossorigin==="use-credentials"?s.credentials="include":r.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}functioni(r){if(r.ep)return;r.ep=!0;consts=n(r);fetch(r.href,s)}};Ni();constCi="modulepreload",bn={},ki="./",$t=function(t,n){return!n||n.length===0?t():Promise.all(n.map(i=>{if(i=`${ki}${i}`,iinbn)return;bn[i]=!0;constr=i.endsWith(".css"),s=r?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${s}`))return;constl=document.createElement("link");if(l.rel=r?"stylesheet":Ci,r||(l.as="script",l.crossOrigin=""),l.href=i,document.head.appendChild(l),r)returnnewPromise((o,c)=>{l.addEventListener("load",o),l.addEventListener("error",()=>c(newError(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},Si="./projInfo-schema.json",xi="Planar Pioneers",Ii="A game about controlling and exploiting planes!",Mi="planar-pioneers",Ei="thepaperpilot",$i="",Ti="",Fi="0.0",Pi="Initial Commit",Di=!0,Vi=!1,Ai=2,Oi=!0,Li=null,Bi="",qi=["main"],Ri=3600,Ui=0,zi=!0,ji="base64";varJ={$schema:Si,title:xi,description:Ii,id:Mi,author:Ei,discordName:$i,discordLink:Ti,versionNumber:Fi,versionTitle:Pi,allowGoBack:Di,defaultShowSmall:Vi,defaultDecimalsShown:Ai,useHeader:Oi,banner:Li,logo:Bi,initialTabs:qi,maxTickLength:Ri,offlineLimit:Ui,enablePausing:zi,exportEncoding:ji};classGi{constructor(t){this.map=newMap,this.first=void0,this.last=void0,this.maxSize=t}getsize(){returnthis.map.size}get(t){constn=this.map.get(t);if(n!==void0)returnn!==this.first&&(n===this.last?(this.last=n.prev,this.last.next=void0):(n.prev.next=n.next,n.next.prev=n.prev),n.next=this.first,this.first.prev=n,this.first=n),n.value}set(t,n){if(this.maxSize<1)return;if(this.map.has(t))thrownewError("Cannot update existing keys in the cache");consti=newWi(t,n);for(this.first===void0?(this.first=i,this.last=i):(i.next=this.first,this.first.prev=i,this.first=i),this.map.set(t,i);this.map.size>this.maxSize;){constr=this.last;this.map.delete(r.key),this.last=r.prev,this.last.next=void0}}}classWi{constructor(t,n){this.next=void0,this.prev=void0,this.key=t,this.value=n}}consttn=17,Hi=9e15,Zi=Math.log10(9e15),Yi=1/9e15,Ji=308,Ki=-324,yn=5,Xi=(1<<10)-1,Qi=function(){conste=[];for(letn=Ki+1;n<=Ji;n++)e.push(Number("1e"+n));constt=323;returnfunction(n){returne[n+t]}}(),tt=[2,Math.E,3,4,5,6,7,8,9,10],er=[[1,1.0891180521811203,1.1789767925673957,1.2701455431742086,1.3632090180450092,1.4587818160364217,1.5575237916251419,1.6601571006859253,1.767485818836978,1.8804192098842727,2],[1,1.1121
`))!=null?t:""}function Cn(e,t){var n;if(u.isNaN(t))throw ge.hasNaN||(U.autosave=!1,ge.hasNaN=!0,ge.NaNPath=e[at],ge.NaNPersistent=e),console.error("Attempted to save NaN value to",(n=e[at])==null?void 0:n.join("."),e),new Error("Attempted to set NaN value. See above for details");e[ht].value=t}function Nt(e,t=!0){const n=ue(e)?e:F(e);ue(e)&&(e=e.value);const i=I({get(){return n.value},set(s){t?Cn(r,s):r[ht].value=s}});i[Vt]=e;const r={get value(){return n.value},set value(s){t?Cn(r,s):r[ht].value=s},__v_isRef:!0,[ht]:n,[Vt]:e,[Zt]:Lr(),[Yt]:!1,[Ye]:i,[at]:void 0};return Ne.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",r,`
`+r[Zt]):lt[Ne[Ne.length-1]].add(r),r}function Br(e){return e!=null&&typeof e=="object"&&ht in e}function qr(e){Ne.length===0?console.warn("Deleting a persistent ref outside of a layer. Ignoring...",e):lt[Ne[Ne.length-1]].delete(e),e[Yt]=!0}Ce.on("addLayer",(e,t)=>{const n=[],i=(r,s=[])=>{let l=!1;return Object.keys(r).forEach(o=>{let c=r[o];if(c!=null&&typeof c=="object"){if(c[Or]===!0)return;if(it in c&&(c=c[it]),Br(c)){if(l=!0,c[Yt]){console.warn("Deleted persistent ref present in returned object. Ignoring...",c,`
`+c[Zt]);return}lt[e.id].delete(c);const d=[e.id,...s,o];c[at]!=null&&JSON.stringify(d)!==JSON.stringify(c[at])&&console.error(`Persistentrefisbeingsavedto\`${d.join(".")}\` when it's already present at \`${c[at].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,c),c[at]=d;constb=s.reduce((w,y)=>(yinw||(w[y]={}),w[y]),t),m=b[o];b[o]=c[ht],gi(b)?m!=null?b[o]=m:b[o]=c[Vt]:m!=null?b[o].value=m:b[o].value=c[Vt]}else!(cinstanceofu)&&!ue(c)&&!n.includes(c)&&(typeofc.type=="symbol"&&n.push(c),i(c,[...s,o])&&(hn(c)&&!hn(r)?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.",itinr?r[it]:r,o):l=!0))}}),l};i(e[it]),lt[e.id].forEach(r=>{r[Yt]||console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,r,`
Tryingtopop${n.id}`;Ne.pop(),A(n,"color"),A(n,"display"),A(n,"classes"),A(n,"style"),A(n,"name"),de(n,"name",n.id),A(n,"minWidth"),de(n,"minWidth",600),A(n,"minimizable"),de(n,"minimizable",!0),A(n,"minimizedDisplay");const r=n.style;return n.style=I(()=>{var l,o;let s=a(n.minWidth);return(typeof s=="number"||!Number.isNaN(parseInt(s)))&&(s=s+"px"),[(l=a(r))!=null?l:"",(o=n.minimized)!=null&&o.value?{flexGrow:"0",flexShrink:"0",width:"60px",minWidth:"",flexBasis:"",margin:"0"}:{flexGrow:"",flexShrink:"",width:"",minWidth:s,flexBasis:s,margin:""}]}),n})}function Wn(e,t){if(console.info("Adding layer",e.id),_e[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,_e[e.id]);return}de(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),_e[e.id]=e,Ce.emit("addLayer",e,t.layers[e.id])}function Rr(e){return _e[e]}function Hn(e){console.info("Removing layer",e.id),Ce.emit("removeLayer",e),_e[e.id]=void 0}function Ur(e){Hn(e),Wn(e,U)}function zr(e){const t=F(!1);return{openModal:()=>t.value=!0,modal:ne(()=>_(Qe,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>_("h2",null,[a(e.name)]),body:a(e.display)}))}}Ce.on("update",function(t){Object.values(_e).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(_e).forEach(n=>{n==null||n.emit("update",t)}),Object.values(_e).forEach(n=>{n==null||n.emit("postUpdate",t)})});var jr=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:un,UnregisterNodeInjectionKey:cn,NodesInjectionKey:dn,BoundsInjectionKey:gn,layers:_e,persistentRefs:lt,addingLayers:Ne,createLayer:Gn,addLayer:Wn,getLayer:Rr,removeLayer:Hn,reloadLayer:Ur,setupLayerModal:zr},Symbol.toStringTag,{value:"Module"}));const Gr=j({components:{Context:jn},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:i,minimizedDisplay:r}=me(e),s=zn(t),l=Ot(r),o=I(()=>J.allowGoBack&&n.value>0&&!we(i));function c(){U.tabs.splice(a(e.index),1/0)}function d(b){e.nodes.value=b}return{component:s,minimizedComponent:l,showGoBack:o,updateNodes:d,unref:a,goBack:c}}}),Wr={key:1};function Hr(e,t,n,i,r,s){const l=jt("Context");return N(),S("div",{class:"layer-container",style:Pe({"--layer-color":e.unref(e.color)})},[e.showGoBack?(N(),S("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...o)=>e.goBack&&e.goBack(...o))},"\u274C")):V("",!0),e.unref(e.minimized)?(N(),S("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=o=>e.$emit("setMinimized",!1))},[e.minimizedComponent?(N(),Z(Se(e.minimizedComponent),{key:0})):(N(),S("div",Wr,H(e.unref(e.name)),1))])):(N(),S("div",{key:2,class:ae(["layer-tab",{showGoBack:e.showGoBack}])},[_(l,{onUpdateNodes:e.updateNodes},{default:O(()=>[(N(),Z(Se(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(N(),S("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=o=>e.$emit("setMinimized",!0))}," \u25BC ")):V("",!0)],4)}var Zr=Q(Gr,[["render",Hr],["__scopeId","data-v-72dd78b1"]]);const Zn=e=>(ct("data-v-4b4bda40"),e=e(),dt(),e),Yr=Zn(()=>p("h2",null,"Changelog",-1)),Jr=Zn(()=>p("details",{open:""},[p("summary",null,[D("v0.0 Initial Commit - "),p("time",null,"2021-09-04")]),D(" This is the first release :D "),p("ul",null,[p("li",{class:"feature"},"Did everything"),p("li",{class:"fix"},"Had some fun"),p("li",{class:"breaking"},"Removed everything"),p("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),Kr=j({__name:"Changelog",setup(e,{expose:t}){const n=F(!1);return t({open(){n.value=!0}}),(i,r)=>(N(),Z(Qe,{modelValue:n.value,"onUpdate:modelValue":r[0]||(r[0]=s=>n.value=s)},{header:O(()=>[Yr]),body:O(()=>[Jr]),_:1},8,["modelValue"]))}});var Xr=Q(Kr,[["__scopeId","data-v-4b4bda40"]]),Qr=j({props:{element:Object,display:{type:q(Object,String,Function),required:!0},style:q(Object,String,Array),classes:q(Object),directio
Learnmoreatwww.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await Nr();const{globalBus:e}=await $t(()=>Promise.resolve().then(function(){return _r}),void 0),{startGameLoop:t}=await $t(()=>import("./gameLoop.e346fc31.js"),["assets/gameLoop.e346fc31.js","assets/@fontsource.f66d05e7.css","assets/vue.804e2479.js","assets/amator.1e5a40c8.js","assets/bezier-easing.a990b400.js","assets/@vue.6f8187b0.js","assets/nanoevents.1080beb7.js","assets/lz-string.dccec454.js","assets/vue-next-select.f5f69b1a.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.ce650350.js","assets/sortablejs.a0f68e5e.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-panzoom.89be130f.js","assets/panzoom.30c56ba6.js","assets/wheel.f2ae740f.js","assets/ngraph.events.083734c6.js","assets/vue-toastification.5231d1bd.js","assets/vue-toastification.4b5f8ac8.css"]),n=window.vue=hi(Uu);e.emit("setupVue",n),n.mount("#app"),ut(()=>{const i=Fn(),{updateServiceWorker:r}=ju({onNeedRefresh(){i.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(){r()}})},onOfflineReady(){i.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{u as D,$t as _,ge as a,J as b,pu as c,Ce as g,Cr as l,U as p,K as s};