Planar-Pioneers/assets/index.352dc0ae.js

19 lines
144 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.804e2479.js";import{_ as E,C as a,l as fe,q as ct,t as F,b2 as xe,ab as W,aD as dn,w as Ie,b3 as Le,a9 as y,O as Q,az as Dt,as as Qe,aF as _,a1 as I,aL as Be,a2 as m,aH as kt,A as de,$ as G,b7 as A,b9 as Wt,ar as Te,bv as st,a8 as D,bt as Un,bc as lt,T as jn,u as Gt,j as Wn,bw as tn,aM as Et,a0 as P,aO as we,J as H,G as oe,I as Me,aI as et,aG as tt,z as Re,bo as Gn,bs as Hn,aK as ut,bd as nn,am as $t,H as Zn,bf as Yn}from"./@vue.6f8187b0.js";import{c as gn}from"./nanoevents.1080beb7.js";import{L as Oe}from"./lz-string.dccec454.js";import{Y as Jn}from"./vue-next-select.f5f69b1a.js";import{D as Kn}from"./vuedraggable.ce650350.js";import{p as Xn}from"./vue-textarea-autosize.35804eaf.js";import{P as Qn}from"./vue-panzoom.89be130f.js";import{s as ei,u as fn}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";const ti=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerpolicy&&(o.referrerPolicy=r.referrerpolicy),r.crossorigin==="use-credentials"?o.credentials="include":r.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}};ti();const ni="modulepreload",rn={},ii="./",vt=function(t,n){return!n||n.length===0?t():Promise.all(n.map(i=>{if(i=`${ii}${i}`,i in rn)return;rn[i]=!0;const r=i.endsWith(".css"),o=r?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${o}`))return;const s=document.createElement("link");if(s.rel=r?"stylesheet":ni,r||(s.as="script",s.crossOrigin=""),s.href=i,document.head.appendChild(s),r)return new Promise((l,c)=>{s.addEventListener("load",l),s.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},ri="./projInfo-schema.json",ai="Planar Pioneers",oi="A game about controlling and exploiting planes!",si="planar-pioneers",li="thepaperpilot",ui="",ci="",di="0.0",gi="Initial Commit",fi=!0,mi=!1,hi=2,vi=!0,pi=null,bi="",yi=["main"],_i=3600,wi=0,Ni=!0,Ci="base64";var Y={$schema:ri,title:ai,description:oi,id:si,author:li,discordName:ui,discordLink:ci,versionNumber:di,versionTitle:gi,allowGoBack:fi,defaultShowSmall:mi,defaultDecimalsShown:hi,useHeader:vi,banner:pi,logo:bi,initialTabs:yi,maxTickLength:_i,offlineLimit:wi,enablePausing:Ni,exportEncoding:Ci};class Si{constructor(t){this.map=new Map,this.first=void 0,this.last=void 0,this.maxSize=t}get size(){return this.map.size}get(t){const n=this.map.get(t);if(n!==void 0)return n!==this.first&&(n===this.last?(this.last=n.prev,this.last.next=void 0):(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))throw new Error("Cannot update existing keys in the cache");const i=new ki(t,n);for(this.first===void 0?(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;){const r=this.last;this.map.delete(r.key),this.last=r.prev,this.last.next=void 0}}}class ki{constructor(t,n){this.next=void 0,this.prev=void 0,this.key=t,this.value=n}}const zt=17,Ii=9e15,xi=Math.log10(9e15),Mi=1/9e15,Ei=308,$i=-324,an=5,Ti=(1<<10)-1,Fi=function(){const e=[];for(let n=$i+1;n<=Ei;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),We=[2,Math.E,3,4,5,6,7,8,9,10],Pi=[[1,1.0891180521811203,1.1789767925673957,1.2701455431742086,1.3632090180450092,1.4587818160364217,1.5575237916251419,1.6601571006859253,1.767485818836978,1.8804192098842727,2],[1,1.11211
`,e),await Ze(at())}}function at(){const e=Mt(),t=Nn({id:e});return _e(t),K.saves.push(e),t}function Mt(){let e,t=0;do e=`${Y.id}-${t++}`;while(localStorage.getItem(e)!=null);return e}const nr=F(!1);async function Ze(e){console.info("Loading save",e),nr.value=!0;const{layers:t,removeLayer:n,addLayer:i}=await vt(()=>Promise.resolve().then(function(){return Cr}),void 0),{fixOldSave:r,getInitialLayers:o}=await vt(()=>Promise.resolve().then(function(){return Ql}),void 0);for(const s in t){const l=t[s];l&&n(l)}o(e).forEach(s=>i(s,e)),e=Nn(e),e.offlineProd&&e.time!=null&&e.time&&e.devSpeed!==0&&(e.offlineTime==null&&(e.offlineTime=0),e.offlineTime+=Math.min(e.offlineTime+(Date.now()-e.time)/1e3,Y.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==Y.versionNumber&&(r(e.modVersion,e),e.modVersion=Y.versionNumber),Object.assign(z,e),K.active=z.id,ye.emit("onLoad")}setInterval(()=>{z.autosave&&_e()},1e3);window.onbeforeunload=()=>{z.autosave&&_e()};window.save=_e;const ir=window.hardReset=async()=>{await Ze(at())};window.deleteLowerSaves=()=>{const e=Object.values(K.saves).indexOf(z.id)+1;Object.values(K.saves).slice(e).forEach(t=>localStorage.removeItem(t)),K.saves=K.saves.slice(0,e)};const yt=ct({active:"",saves:[],showTPS:!0,theme:Zt.Nordic,unthrottled:!1,alignUnits:!1});xe(yt,e=>{const t=Oe.compressToUTF16(JSON.stringify(e));localStorage.setItem(Y.id,t)},{deep:!0});var K=window.settings=yt;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Zt.Nordic,alignUnits:!1};ye.emit("loadSettings",e),Object.assign(yt,e),ir()};function rr(){try{let e=localStorage.getItem(Y.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Oe.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(yt,t)}ye.emit("loadSettings",yt)}catch{}}const ar=ct([]),or=ct([]),sr=ct([]);function me(e,t="span"){return typeof e=="function"?W({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),W({template:e})):W({render:()=>({})}):e}function De(e){if(Ke(e))return typeof e=="function"?e():me(e);const t=e[bt];return y(t,e[At](),null)}function qe(e){if(Ke(e))return typeof e=="function"?e():typeof e=="string"?y(Q,null,[e]):y(e,null,null);const t=e[bt];return y(t,e[At](),null)}function Ke(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[pt]===!0}function Cn(e,t){const n=F(null),i=F(void 0);function r(l){n.value||(n.value=setInterval(s,250)),i.value=l}function o(){n.value&&(clearInterval(n.value),n.value=null)}function s(){t&&t.value?t.value():e&&e.value&&e.value(i.value)}return dn(o),{start:r,stop:o,handleHolding:s}}function Sn(e,t="div"){const n=Ie();return Le(()=>{n.value=me(pe(e),t)}),n}function Nt(e,t="div"){const n=Ie(null);return Le(()=>{const i=pe(e);n.value=i==""||i==null?null:me(i,t)}),n}function pe(e){return a(a(e))}function R(...e){return e.includes(Object)||e.push(Object),e}var X=(e,t)=>{const n=e.__vccOpts||e;for(const[i,r]of t)n[i]=r;return n};const lr=W({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var b;const n=F({}),i=new ResizeObserver(l),r=F(null);Dt(()=>{const h=r.value;h!=null&&i.observe(h)});let o=!0,s=F((b=r.value)==null?void 0:b.getBoundingClientRect());function l(){o&&(o=!1,Qe(()=>{var h;s.value=(h=r.value)==null?void 0:h.getBoundingClientRect(),Object.values(n.value).filter(C=>C).forEach(C=>C.rect=C.element.getBoundingClientRect()),t("updateNodes",n.value),o=!0}))}ye.on("fontsLoaded",l);const c={attributes:!1,childList:!0,subtree:!1};kt(Yt,(h,C)=>{const N=new MutationObserver(()=>f(h));N.observe(C,c),n.value[h]={element:C,observer:N,rect:C.getBoundingClientRect()},l()}),kt(Jt,h=>{var C;(C=n.value[h])==null||C.observer.disconnect(),n.value[h]=void 0,l()}),kt(Kt,n),kt(Xt,s);function f(h){const C=n.value[h];C!=null&&(C.rect=C.element.getBoundingClientRect(),t("updateNodes",n.value))}return(h,C)=>(_(),I(Q,null,[Be(h.$slots,"default",{},void 0,!0),m("div"
`).slice(3,5).map(n=>n.trim()).join(`
`))!=null?t:""}function un(e,t){var n;if(u.isNaN(t))throw ue.hasNaN||(z.autosave=!1,ue.hasNaN=!0,ue.NaNPath=e[Ye],ue.NaNPersistent=e),console.error("Attempted to save NaN value to",(n=e[Ye])==null?void 0:n.join("."),e),new Error("Attempted to set NaN value. See above for details");e[ot].value=t}function dt(e,t=!0){const n=fe(e)?e:F(e);fe(e)&&(e=e.value);const i=E({get(){return n.value},set(o){t?un(r,o):r[ot].value=o}});i[_t]=e;const r={get value(){return n.value},set value(o){t?un(r,o):r[ot].value=o},__v_isRef:!0,[ot]:n,[_t]:e,[Pt]:pr(),[Vt]:!1,[Ae]:i,[Ye]:void 0};return be.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",r,`
Created at:
`+r[Pt]):Xe[be[be.length-1]].add(r),r}function br(e){return e!=null&&typeof e=="object"&&ot in e}function yr(e){be.length===0?console.warn("Deleting a persistent ref outside of a layer. Ignoring...",e):Xe[be[be.length-1]].delete(e),e[Vt]=!0}ye.on("addLayer",(e,t)=>{const n=[],i=(r,o=[])=>{let s=!1;return Object.keys(r).forEach(l=>{let c=r[l];if(c!=null&&typeof c=="object"){if(c[vr]===!0)return;if(He in c&&(c=c[He]),br(c)){if(s=!0,c[Vt]){console.warn("Deleted persistent ref present in returned object. Ignoring...",c,`
Created at:
`+c[Pt]);return}Xe[e.id].delete(c);const f=[e.id,...o,l];c[Ye]!=null&&JSON.stringify(f)!==JSON.stringify(c[Ye])&&console.error(`Persistent ref is being saved to \`${f.join(".")}\` when it's already present at \`${c[Ye].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,c),c[Ye]=f;const b=o.reduce((C,N)=>(N in C||(C[N]={}),C[N]),t),h=b[l];b[l]=c[ot],Wn(b)?h!=null?b[l]=h:b[l]=c[_t]:h!=null?b[l].value=h:b[l].value=c[_t]}else!(c instanceof u)&&!fe(c)&&!n.includes(c)&&(typeof c.type=="symbol"&&n.push(c),i(c,[...o,l])&&(tn(c)&&!tn(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.",He in r?r[He]:r,l):s=!0))}}),s};i(e[He]),Xe[e.id].forEach(r=>{r[Vt]||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,`
Created at:
`+r[Pt])}),Xe[e.id].clear()});const Yt=Symbol("RegisterNode"),Jt=Symbol("UnregisterNode"),Kt=Symbol("Nodes"),Xt=Symbol("Bounds"),ve=Gt({});window.layers=ve;const Xe={},be=[];function In(e,t){return Ct(()=>{const n={},i=n.emitter=gn();if(n.on=i.on.bind(i),n.emit=i.emit.bind(i),n.nodes=F({}),n.id=e,be.push(e),Xe[e]=new Set,n.minimized=dt(!1,!1),Object.assign(n,t.call(n,n)),be[be.length-1]==null||be[be.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen
Stack: ${be}
Trying to pop ${n.id}`;be.pop(),O(n,"color"),O(n,"display"),O(n,"classes"),O(n,"style"),O(n,"name"),ge(n,"name",n.id),O(n,"minWidth"),ge(n,"minWidth",600),O(n,"minimizable"),ge(n,"minimizable",!0),O(n,"minimizedDisplay");const r=n.style;return n.style=E(()=>{var s,l;let o=a(n.minWidth);return(typeof o=="number"||!Number.isNaN(parseInt(o)))&&(o=o+"px"),[(s=a(r))!=null?s:"",(l=n.minimized)!=null&&l.value?{flexGrow:"0",flexShrink:"0",width:"60px",minWidth:"",flexBasis:"",margin:"0"}:{flexGrow:"",flexShrink:"",width:"",minWidth:o,flexBasis:o,margin:""}]}),n})}function xn(e,t){if(console.info("Adding layer",e.id),ve[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,ve[e.id]);return}ge(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),ve[e.id]=e,ye.emit("addLayer",e,t.layers[e.id])}function _r(e){return ve[e]}function Mn(e){console.info("Removing layer",e.id),ye.emit("removeLayer",e),ve[e.id]=void 0}function wr(e){Mn(e),xn(e,z)}function Nr(e){const t=F(!1);return{openModal:()=>t.value=!0,modal:ne(()=>y(Ue,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>y("h2",null,[a(e.name)]),body:a(e.display)}))}}ye.on("update",function(t){Object.values(ve).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(ve).forEach(n=>{n==null||n.emit("update",t)}),Object.values(ve).forEach(n=>{n==null||n.emit("postUpdate",t)})});var Cr=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Yt,UnregisterNodeInjectionKey:Jt,NodesInjectionKey:Kt,BoundsInjectionKey:Xt,layers:ve,persistentRefs:Xe,addingLayers:be,createLayer:In,addLayer:xn,getLayer:_r,removeLayer:Mn,reloadLayer:wr,setupLayerModal:Nr},Symbol.toStringTag,{value:"Module"}));const Sr=W({components:{Context:kn},props:{index:{type:Number,required:!0},display:{type:R(Object,String,Function),required:!0},minimizedDisplay:R(Object,String,Function),minimized:{type:Object,required:!0},name:{type:R(String),required:!0},color:R(String),minimizable:R(Boolean),nodes:{type:Object,required:!0}},emits:["setMinimized"],setup(e){const{display:t,index:n,minimized:i,minimizedDisplay:r}=de(e),o=Sn(t),s=Nt(r),l=E(()=>Y.allowGoBack&&n.value>0&&!pe(i));function c(){z.tabs.splice(a(e.index),1/0)}function f(b){e.nodes.value=b}return{component:o,minimizedComponent:s,showGoBack:l,updateNodes:f,unref:a,goBack:c}}}),kr={key:1};function Ir(e,t,n,i,r,o){const s=Et("Context");return _(),I("div",{class:"layer-container",style:Me({"--layer-color":e.unref(e.color)})},[e.showGoBack?(_(),I("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...l)=>e.goBack&&e.goBack(...l))},"\u274C")):P("",!0),e.unref(e.minimized)?(_(),I("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=l=>e.$emit("setMinimized",!1))},[e.minimizedComponent?(_(),G(we(e.minimizedComponent),{key:0})):(_(),I("div",kr,H(e.unref(e.name)),1))])):(_(),I("div",{key:2,class:oe(["layer-tab",{showGoBack:e.showGoBack}])},[y(s,{onUpdateNodes:e.updateNodes},{default:A(()=>[(_(),G(we(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(_(),I("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=l=>e.$emit("setMinimized",!0))}," \u25BC ")):P("",!0)],4)}var xr=X(Sr,[["render",Ir],["__scopeId","data-v-72dd78b1"]]);const En=e=>(et("data-v-4b4bda40"),e=e(),tt(),e),Mr=En(()=>m("h2",null,"Changelog",-1)),Er=En(()=>m("details",{open:""},[m("summary",null,[D("v0.0 Initial Commit - "),m("time",null,"2021-09-04")]),D(" This is the first release :D "),m("ul",null,[m("li",{class:"feature"},"Did everything"),m("li",{class:"fix"},"Had some fun"),m("li",{class:"breaking"},"Removed everything"),m("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),$r=W({__name:"Changelog",setup(e,{expose:t}){const n=F(!1);return t({open(){n.value=!0}}),(i,r)=>(_(),G(Ue,{modelValue:n.value,"onUpdate:modelValue":r[0]||(r[0]=o=>n.value=o)},{header:A(()=>[Mr]),body:A(()=>[Er]),_:1},8,["modelValue"]))}});var Tr=X($r,[["__scopeId","data-v-4b4bda40"]]),Fr=W({props:{element:Object,display:{type:R(Object,String,Function),required:!0},style:R(Object,String,Array),classes:R(Object),directio
${q}
${k}`)}}return f[w]}xe(n,w=>{w&&Object.keys(f).forEach(k=>delete f[k])});const h=E(()=>K.saves.reduce((w,k)=>(w[k]=b(k),w),{}));function C(w){let k;switch(z.id===w?k=wn(z):k=JSON.stringify(h.value[w]),Y.exportEncoding){default:console.warn(`Unknown save encoding: ${Y.exportEncoding}. Defaulting to lz`);case"lz":k=Oe.compressToUTF16(k);break;case"base64":k=btoa(unescape(encodeURIComponent(k)));break;case"plain":break}const q=document.createElement("textarea");q.value=k,document.body.appendChild(q),q.select(),q.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(q)}function N(w){z.id===w&&_e();const k={...h.value[w],id:Mt()};_e(k),K.saves.push(k.id)}function S(w){K.saves=K.saves.filter(k=>k!==w),localStorage.removeItem(w),f[w]=void 0}function p(w){h.value[z.id].time=z.time,_e(),f[z.id]=void 0,Ze(h.value[w]),f[w]=void 0}function T(w){if(s.value=w,Qe(()=>{s.value=null}),w[0]!=="{")if(w[0]==="e")w=decodeURIComponent(escape(atob(w)));else if(w[0]==="\u1BE1")w=Oe.decompressFromUTF16(w);else{console.warn("Unable to determine preset encoding",w);return}const k=JSON.parse(w);k.id=Mt(),_e(k),K.saves.push(k.id),p(k.id)}function U(w,k){const q=h.value[w];q!=null&&(q.name=k,z.id===w?(z.name=k,_e()):(_e(q),f[w]=void 0))}return(w,k)=>(_(),G(Ue,{modelValue:n.value,"onUpdate:modelValue":k[4]||(k[4]=q=>n.value=q),ref_key:"modal",ref:i},{header:A(()=>[La]),body:A(({shown:q})=>[q?(_(),G(a(Kn),{key:0,list:a(K).saves,handle:".handle",itemKey:he=>he},{item:A(({element:he})=>[y(Aa,{save:a(h)[he],onOpen:$=>p(he),onExport:$=>C(he),onEditName:$=>U(he,$),onDuplicate:$=>N(he),onDelete:$=>S(he)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):P("",!0)]),footer:A(()=>[m("div",Ba,[y(Fn,{modelValue:o.value,"onUpdate:modelValue":k[0]||(k[0]=q=>o.value=q),title:"Import Save",placeholder:"Paste your save here!",class:oe({importingFailed:r.value})},null,8,["modelValue","class"]),m("div",qa,[Ra,m("div",za,[m("button",{class:"button",onClick:k[1]||(k[1]=q=>p(a(at)().id))},"New Game"),Object.keys(a(c)).length>0?(_(),G($n,{key:0,options:a(c),modelValue:s.value,"onUpdate:modelValue":k[2]||(k[2]=q=>T(q)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):P("",!0)])]),m("div",Ua,[ja,m("button",{class:"button modal-default-button",onClick:k[3]||(k[3]=q=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Pn=X(Wa,[["__scopeId","data-v-2a4275be"]]);const Ne=e=>(et("data-v-318a1c31"),e=e(),tt(),e),Ga=["src","alt"],Ha={key:1,class:"title"},Za=Ne(()=>m("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),Ya={class:"discord"},Ja={class:"discord-links"},Ka={key:0},Xa=["href"],Qa=Ne(()=>m("li",null,[m("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"The Paper Pilot Community")],-1)),eo=Ne(()=>m("li",null,[m("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),to={href:"https://forums.moddingtree.com/",target:"_blank"},no=Ne(()=>m("span",{class:"material-icons"},"forum",-1)),io=Ne(()=>m("span",{class:"material-icons"},"info",-1)),ro=Ne(()=>m("span",{class:"material-icons"},"library_books",-1)),ao=Ne(()=>m("span",{class:"material-icons"},"settings",-1)),oo=Ne(()=>m("span",{class:"material-icons"},"library_books",-1)),so=Ne(()=>m("span",{class:"material-icons"},"settings",-1)),lo=Ne(()=>m("span",{class:"material-icons"},"info",-1)),uo={href:"https://forums.moddingtree.com/",target:"_blank"},co=Ne(()=>m("span",{class:"material-icons"},"forum",-1)),go={class:"discord"},fo={class:"discord-links"},mo={key:0},ho=["href"],vo=Ne(()=>m("li",null,[m("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"The Paper Pilot Community")],-1)),po=Ne(()=>m("li",null,[m("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),bo=W({__name:"Nav",setup(e){const t=F(null),n=F(null),i=F(null),r=F(null),{useHeader:o,banner:s,title:l,discordName:c,discordLink:f,versionNumber:b}=Y;function h(){window.open(f,"mywindow")}return(C,N)=>(_(),I(Q,null,[a(o)?(_(),I("div",Te({key:0,class:"nav"},C.
${(-a(i)-30)*Math.sin(((e.actions.length-1)/2-C)*a(s))},
${(a(i)+30)*Math.cos(((e.actions.length-1)/2-C)*a(s))}
)`,onMousedown:p=>l(p,h),onTouchstart:p=>l(p,h),onMouseup:p=>c(p,h),onTouchend:st(p=>c(p,h),["stop"])},[m("circle",{fill:a(J)(h.fillColor,e.node),r:"20","stroke-width":((S=e.selectedAction)==null?void 0:S.id)===h.id?4:0,stroke:a(r)},null,8,Mo),m("text",{fill:a(o),class:"material-icons"},H(a(J)(h.icon,e.node)),9,Eo)],42,xo)}),128))])):P("",!0)]),_:1}))}});var To=X($o,[["__scopeId","data-v-51fdd2a0"]]);const Fo=["transform"],Po={key:0},Vo=["r","fill","stroke"],Do=["r","fill","stroke"],Oo=["r","fill"],Ao=["r","stroke-dasharray","stroke-dashoffset","stroke"],Lo={key:1,transform:"rotate(45, 0, 0)"},Bo=["width","height","transform","fill","stroke"],qo=["width","height","transform","fill","stroke"],Ro=["width","height","transform","fill"],zo=["width","height","transform","stroke-dasharray","stroke-dashoffset","stroke"],Uo=["fill","y"],jo=["fill"],Wo={key:0},Go=["fill","y"],Ho=["fill","y"],Zo=W({__name:"BoardNode",props:{node:null,nodeType:null,dragging:null,dragged:null,hasDragged:{type:Boolean},receivingNode:{type:Boolean},selectedNode:null,selectedAction:null},emits:["mouseDown","endDragging"],setup(e,{emit:t}){const n=e,i=Math.sqrt(2),r=de(n),o=E(()=>a(r.selectedNode)===a(r.node)),s=E(()=>J(r.nodeType.value.draggable,a(r.node)));xe(s,L=>{const Z=a(r.node);a(r.dragging)===Z&&!L&&t("endDragging",Z.id)});const l=E(()=>{var Z;const L=a(r.node);return(Z=J(r.nodeType.value.actions,L))==null?void 0:Z.filter(le=>ze(J(le.visibility,L)))}),c=E(()=>{var Z;const L=a(r.node);if(J(r.nodeType.value.draggable,L)&&((Z=a(r.dragging))==null?void 0:Z.id)===L.id&&a(r.dragged)!=null){const{x:le,y:se}=a(r.dragged);return{x:L.position.x+Math.round(le/25)*25,y:L.position.y+Math.round(se/25)*25}}return L.position}),f=E(()=>J(r.nodeType.value.shape,a(r.node))),b=E(()=>J(r.nodeType.value.title,a(r.node))),h=E(()=>J(r.nodeType.value.subtitle,a(r.node))),C=E(()=>{var L;return(L=o.value?a(r.selectedAction)&&J(a(r.selectedAction).tooltip,a(r.node)):null)!=null?L:J(r.nodeType.value.label,a(r.node))}),N=E(()=>J(r.nodeType.value.size,a(r.node))),S=E(()=>{var L;return(L=J(r.nodeType.value.progress,a(r.node)))!=null?L:0}),p=E(()=>Ee[K.theme].variables["--background"]),T=E(()=>{var L;return(L=J(r.nodeType.value.outlineColor,a(r.node)))!=null?L:Ee[K.theme].variables["--outline"]}),U=E(()=>{var L;return(L=J(r.nodeType.value.fillColor,a(r.node)))!=null?L:Ee[K.theme].variables["--raised-background"]}),w=E(()=>J(r.nodeType.value.progressColor,a(r.node))),k=E(()=>{var L;return(L=J(r.nodeType.value.titleColor,a(r.node)))!=null?L:Ee[K.theme].variables["--foreground"]}),q=E(()=>J(r.nodeType.value.progressDisplay,a(r.node))),he=E(()=>a(r.dragging)!=null&&a(r.hasDragged)&&J(r.nodeType.value.canAccept,a(r.node))),$=E(()=>J(r.nodeType.value.style,a(r.node))),M=E(()=>J(r.nodeType.value.classes,a(r.node)));function V(L){t("mouseDown",L,r.node.value.id,s.value)}function te(L){var Z,le,se;(Z=r.hasDragged)!=null&&Z.value||(t("endDragging",r.node.value.id),(se=(le=r.nodeType.value).onClick)==null||se.call(le,r.node.value),L.stopPropagation())}return(L,Z)=>{var le,se,je;return _(),I("g",{class:oe(["boardnode",{[e.node.type]:!0,isSelected:a(o),isDraggable:a(s),...a(M)}]),style:Me([{opacity:((le=e.dragging)==null?void 0:le.id)===e.node.id&&e.hasDragged?.5:1},(se=a($))!=null?se:[]]),transform:`translate(${a(c).x},${a(c).y})${a(o)?" scale(1.2)":""}`},[y(To,{actions:(je=a(l))!=null?je:[],"is-selected":a(o),node:e.node,"node-type":e.nodeType,"selected-action":e.selectedAction},null,8,["actions","is-selected","node","node-type","selected-action"]),m("g",{class:"node-container",onMousedown:V,onTouchstartPassive:V,onMouseup:te,onTouchendPassive:te},[a(f)===a(Je).Circle?(_(),I("g",Po,[a(he)?(_(),I("circle",{key:0,class:"receiver",r:a(N)+8,fill:a(p),stroke:e.receivingNode?"#0F0":"#0F03","stroke-width":2},null,8,Vo)):P("",!0),m("circle",{class:"body",r:a(N),fill:a(U),stroke:a(T),"stroke-width":4},null,8,Do),a(q)===a(wt).Fill?(_(),I("circle",{key:1,class:"progress progressFill",r:Math.max(a(N)*a(S)-2,0),fill:a(w)},null,8,Oo)):(_(),I("circle",{key:2,r:a(N)+4.5,class:"progres
Learn more at www.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await tr();const{globalBus:e}=await vt(()=>Promise.resolve().then(function(){return Qi}),void 0),{startGameLoop:t}=await vt(()=>import("./gameLoop.1677b2ed.js"),["assets/gameLoop.1677b2ed.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=Yn(Iu);e.emit("setupVue",n),n.mount("#app"),Qe(()=>{const i=fn(),{updateServiceWorker:r}=Mu({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(o){o&&setInterval(()=>o.update(),60*60*1e3)}})}),t()});export{u as D,vt as _,ue as a,Y as b,Ql as c,ye as g,nr as l,z as p,K as s};