Advent-Incremental/assets/index.ea46b1a4.js

17 lines
146 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.92681fcb.js";import{Z as S,l as we,u as _n,q as sn,C as r,b1 as je,aa as L,aE as b,a0 as M,a1 as m,aK as Je,G as pe,t as T,aC as ri,w as Le,b2 as Fe,a8 as u,O as D,ao as Ji,I as ge,ay as wn,ar as wt,aG as dn,A as ke,_ as U,b6 as O,b8 as On,bs as Xi,aq as Nt,bu as Zt,bb as Nn,T as Zi,a7 as g,j as Yi,bv as Yn,J as j,$ as P,aH as nt,aF as it,al as hn,aL as dt,aN as Ce,z as tt,H as es,aJ as oi,bn as ts,br as ns,be as is}from"./@vue.4ce677c2.js";import{i as ss}from"./is-plain-object.906d88e8.js";import{c as ui}from"./nanoevents.1080beb7.js";import{L as ut}from"./lz-string.731cedc5.js";import{Y as as}from"./vue-next-select.a2bfab1d.js";import{s as ls,u as ci}from"./vue-toastification.6f567382.js";import{D as rs}from"./vuedraggable.7949458c.js";import{p as os}from"./vue-textarea-autosize.35804eaf.js";import{v as us,n as cs}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const ds=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerpolicy&&(l.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?l.credentials="include":s.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}};ds();const fs="modulepreload",ei={},ms="./",gn=function(t,n){return!n||n.length===0?t():Promise.all(n.map(i=>{if(i=`${ms}${i}`,i in ei)return;ei[i]=!0;const s=i.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${l}`))return;const o=document.createElement("link");if(o.rel=s?"stylesheet":fs,s||(o.as="script",o.crossOrigin=""),o.href=i,document.head.appendChild(o),s)return new Promise((c,f)=>{o.addEventListener("load",c),o.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},ps="./projInfo-schema.json",hs="Advent Incremental",gs="An incremental game you play a day at a time, leading up to Christmas!",vs="advent-incremental",ys="thepaperpilot",bs="",_s="",ws="0.3",Ns="Initial Commit",ks=!0,Cs=!1,Ss=2,Ms=!0,Is=null,As="",$s=["main"],Es=3600,Ps=0,Ts=!0,xs="base64";var Q={$schema:ps,title:hs,description:gs,id:vs,author:ys,discordName:bs,discordLink:_s,versionNumber:ws,versionTitle:Ns,allowGoBack:ks,defaultShowSmall:Cs,defaultDecimalsShown:Ss,useHeader:Ms,banner:Is,logo:As,initialTabs:$s,maxTickLength:Es,offlineLimit:Ps,enablePausing:Ts,exportEncoding:xs};const xn=17,Fs=9e15,Bs=Math.log10(9e15),Ds=1/9e15,Os=308,Rs=-324,ti=5,qs=function(){const e=[];for(let n=Rs+1;n<=Os;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),vt=[2,Math.E,3,4,5,6,7,8,9,10],Vs=[[1,1.0891168053867777,1.1789745164521264,1.2701428397304229,1.3632066654400328,1.4587804913784246,1.557523817412741,1.660158301473385,1.767487542936873,1.8804205225512542,2],[1,1.1121114330934,1.23103892493161,1.35838369631113,1.49605193039935,1.64635423375119,1.81213853570186,1.99697132461829,2.20538955455724,2.44325744833852,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356972596,1.3632807
`,e),await bt(xt())}}function xt(){const e=mn(),t=Ni({id:e});return Ue(t),ie.saves.push(e),t}function mn(){let e,t=0;do e=`${Q.id}-${t++}`;while(localStorage.getItem(e));return e}async function bt(e){console.info("Loading save",e);const{layers:t,removeLayer:n,addLayer:i}=await gn(()=>Promise.resolve().then(function(){return Pa}),void 0),{fixOldSave:s,getInitialLayers:l}=await gn(()=>Promise.resolve().then(function(){return Li}),void 0);for(const o in t){const c=t[o];c&&n(c)}l(e).forEach(o=>i(o,e)),e=Ni(e),e.offlineProd&&e.time&&e.devSpeed!==0&&(e.offlineTime==null&&(e.offlineTime=0),e.offlineTime+=Math.min(e.offlineTime+(Date.now()-e.time)/1e3,Q.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==Q.versionNumber&&s(e.modVersion,e),Object.assign(A,e),ie.active=A.id,oe.emit("onLoad")}setInterval(()=>{A.autosave&&Ue()},1e3);window.onbeforeunload=()=>{A.autosave&&Ue()};window.save=Ue;const ua=window.hardReset=async()=>{await bt(xt())},en=sn({active:"",saves:[],showTPS:!0,theme:Rn.Nordic,unthrottled:!1});je(en,e=>{const t=ut.compressToUTF16(JSON.stringify(e));localStorage.setItem(Q.id,t)},{deep:!0});var ie=window.settings=en;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Rn.Nordic};oe.emit("loadSettings",e),Object.assign(en,e),ua()};function ca(){try{let e=localStorage.getItem(Q.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=ut.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(en,t)}oe.emit("loadSettings",en)}catch{}}const ki=sn([]);function da(e){ki.push(e)}const Ci=sn([]);function fa(e){Ci.push(e)}const ma=sn([]),pa={class:"table"},pn=L({__name:"Column",setup(e){const t=S(()=>an[ie.theme].mergeAdjacent);return(n,i)=>(b(),M("div",pa,[m("div",{class:pe(["col",{mergeAdjacent:r(t)}])},[Je(n.$slots,"default")],2)]))}}),ha={class:"table"},Si=L({__name:"Row",setup(e){const t=S(()=>an[ie.theme].mergeAdjacent);return(n,i)=>(b(),M("div",ha,[m("div",{class:pe(["row",{mergeAdjacent:r(t)}])},[Je(n.$slots,"default")],2)]))}});function Mi(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Ji(e)}function K(e,t="span"){return typeof e=="function"?L({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),L({template:e})):L({render:()=>({})}):e}function ve(e){if(pt(e))return typeof e=="function"?e():K(e);const t=e[ft];return u(t,e[mt](),null)}function De(...e){let t;return u(Si,null,Mi(t=e.map(ve))?t:{default:()=>[t]})}function Ii(...e){let t;return u(pn,null,Mi(t=e.map(ve))?t:{default:()=>[t]})}function Xe(e){if(pt(e))return typeof e=="function"?e():typeof e=="string"?u(D,null,[e]):u(e,null,null);const t=e[ft];return u(t,e[mt](),null)}function pt(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Yt]===!0}function Ai(e,t,n){const i=T(null),s=T(void 0);function l(f){i.value||(i.value=setInterval(c,250)),s.value=f,n&&(n.value=!0)}function o(){i.value&&(clearInterval(i.value),i.value=null),n&&(n.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(s.value)}return ri(o),{start:l,stop:o,handleHolding:c}}function $i(e,t="div"){const n=Le();return Fe(()=>{n.value=K(ye(e),t)}),n}function kt(e,t="div"){const n=Le(null);return Fe(()=>{const i=ye(e);n.value=i==null?null:K(i,t)}),n}function ga(e){return S(()=>ye(e))}function ye(e){return r(r(e))}function E(...e){return e.includes(Object)||e.push(Object),e}const Oe=L({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(b(),M("div",{style:ge({width:e.width,height:e.height})},null,4))}});var Z=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n};const va=L({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var _;const n=T({}),i=new ResizeObserver(c),s=T(null);wn(()=>{const y=s.value;y!=null&&i.observe(y)});let l=!0,o=T((_=s.value)==null?void 0:_.getBoundingClientRect());function c(){l&&(l=!1,wt(()=>{va
`).slice(3,5).map(t=>t.trim()).join(`
`))||""}function Ee(e){const t=we(e)?e:T(e);return t[tn]=t,t[nn]=we(e)?e.value:e,t[bn]=Ia(),t[Pi]=!1,He.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
Created at:
`+t[bn]):Ft[He[He.length-1]].add(t),t}oe.on("addLayer",(e,t)=>{const n=[],i=(s,l=[])=>{let o=!1;return Object.keys(s).forEach(c=>{const f=s[c];if(f&&typeof f=="object")if(tn in f){if(o=!0,f[Pi]){console.warn("Deleted persistent ref present in returned object. Ignoring...",f,`
Created at:
`+f[bn]);return}Ft[e.id].delete(ce in f?f[ce]:f);const d=l.reduce((y,v)=>(v in y||(y[v]={}),y[v]),t),_=d[c];d[c]=f[tn],Yi(d)?_!=null?d[c]=_:d[c]=f[nn]:_!=null?d[c].value=_:d[c].value=f[nn]}else!(f instanceof a)&&!we(f)&&!n.includes(f)&&(typeof f.type=="symbol"&&n.push(f),i(f,[...l,c])&&(Yn(f)&&!Yn(s)?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.",ce in s?s[ce]:s,c):o=!0))}),o};i(e),Ft[e.id].forEach(s=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,s,`
Created at:
`+s[bn])}),Ft[e.id].clear()});const qn=Symbol("RegisterNode"),Vn=Symbol("UnregisterNode"),Ln=Symbol("Nodes"),Gn=Symbol("Bounds"),Se=_n({});window.layers=Se;const Ft={},He=[];function Rt(e,t){return Be(()=>{const n={},i=n.emitter=ui();if(n.on=i.on.bind(i),n.emit=i.emit.bind(i),n.nodes=T({}),n.id=e,He.push(e),Ft[e]=new Set,n.minimized=Ee(!1),Object.assign(n,t.call(n)),He[He.length-1]==null||He[He.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen
Stack: ${He}
Trying to pop ${n.id}`;return He.pop(),$(n,"color"),$(n,"display"),$(n,"name"),Ne(n,"name",n.id),$(n,"minWidth"),Ne(n,"minWidth",600),$(n,"minimizable"),Ne(n,"minimizable",!0),n})}function Ti(e,t){if(console.info("Adding layer",e.id),Se[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,Se[e.id]);return}Ne(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),Se[e.id]=e,oe.emit("addLayer",e,t.layers[e.id])}function Aa(e){return Se[e]}function xi(e){console.info("Removing layer",e.id),oe.emit("removeLayer",e),Se[e.id]=void 0}function $a(e){xi(e),Ti(e,A)}function Ea(e){const t=T(!1);return{openModal:()=>t.value=!0,modal:B(()=>u(ze,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>u("h2",null,[r(e.name)]),body:r(e.display)}))}}oe.on("update",function(t){Object.values(Se).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(Se).forEach(n=>{n==null||n.emit("update",t)}),Object.values(Se).forEach(n=>{n==null||n.emit("postUpdate",t)})});var Pa=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:qn,UnregisterNodeInjectionKey:Vn,NodesInjectionKey:Ln,BoundsInjectionKey:Gn,layers:Se,persistentRefs:Ft,addingLayers:He,createLayer:Rt,addLayer:Ti,getLayer:Aa,removeLayer:xi,reloadLayer:$a,setupLayerModal:Ea},Symbol.toStringTag,{value:"Module"}));const Ta={},xa={class:"notif"};function Fa(e,t){return b(),M("div",xa,"!")}var ai=Z(Ta,[["render",Fa],["__scopeId","data-v-66323fd4"]]);const Cn=e=>(nt("data-v-949cc93c"),e=e(),it(),e),Ba={key:0,class:"day feature dontMerge opened"},Da={class:"date"},Oa=g("Dec"),Ra=Cn(()=>m("br",null,null,-1)),qa={class:"date"},Va=g("Dec"),La=Cn(()=>m("br",null,null,-1)),Ga=Cn(()=>m("div",{class:"doors"},null,-1)),Ua={class:"date"},Ha=g("Dec"),ja=Cn(()=>m("br",null,null,-1)),za={key:0,class:"material-icons lock"},Wa=L({__name:"Day",props:{day:null,symbol:null,opened:null,shouldNotify:null},emits:["openLore","openLayer","unlockLayer"],setup(e,{emit:t}){const n=e,i=S(()=>a.gte(z.day.value,n.day)&&new Date().getMonth()===11&&new Date().getDate()>=n.day);function s(){i.value&&t("unlockLayer")}return(l,o)=>e.opened.value?(b(),M("div",Ba,[u(Nn,{appear:"",name:"door"},{default:O(()=>[m("div",{class:"doors",onClick:o[0]||(o[0]=c=>t("openLayer"))},[m("div",Da,[Oa,Ra,g(j(e.day),1)]),m("div",qa,[Va,La,g(j(e.day),1)])])]),_:1}),m("div",{class:"icon",style:ge({backgroundImage:`url(${e.symbol})`})},null,4),m("div",{class:"lore",onClick:o[1]||(o[1]=c=>t("openLore"))},"?"),r(e.shouldNotify)?(b(),U(ai,{key:0})):P("",!0)])):(b(),M("div",{key:1,class:pe(["day feature dontMerge",{can:r(i),locked:!r(i),canOpen:r(i)}]),onClick:s},[Ga,m("div",Ua,[Ha,ja,g(j(e.day),1)]),r(i)?P("",!0):(b(),M("div",za,"lock")),r(i)?(b(),U(ai,{key:1})):P("",!0)],2))}});var Qa=Z(Wa,[["__scopeId","data-v-949cc93c"]]);const Ka={key:0},Ja={key:0,class:"mark star"},Xa=["src"],Za=L({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(b(),M("div",Ka,[e.mark===!0?(b(),M("div",Ja)):(b(),M("img",{key:1,class:"mark",src:e.mark},null,8,Xa))])):P("",!0)}});var Sn=Z(Za,[["__scopeId","data-v-2207999f"]]);const Ya=L({__name:"Node",props:{id:null},setup(e){const n=ke(e),i=hn(qn,()=>{}),s=hn(Vn,()=>{}),l=Le(null),o=S(()=>l.value&&l.value.parentElement);return je([o,n.id],([c,f],[d,_])=>{d&&s(r(_)),c&&i(f,c)}),ri(()=>s(r(n.id))),(c,f)=>(b(),M("div",{class:"node",ref_key:"node",ref:l},null,512))}});var ln=Z(Ya,[["__scopeId","data-v-a48cb382"]]),el=L({props:{display:{type:E(Object,String,Function),required:!0},visibility:{type:E(Number),required:!0},style:E(Object,String,Array),classes:E(Object),onClick:Function,onHold:Function,canClick:{type:E(Boolean),required:!0},small:Boolean,mark:E(Boolean,String),id:{type:String,required:!0},isHolding:Object},components:{Node:ln,MarkNode:Sn},setup(e){const{display:t,onClick:n,onHold:i}=ke(e),s=Le("");Fe(()=>{const c=ye(t);if(c==null){s.value="";return}if(pt(c)){s.value=K(c);return}const f=K(c.title||"","h3"),d=K(c.description,"div");s.value=K(B(()=>u("span",null,[c.title?u("div",null,[u(f,null,null)]):null,u(d,null,null)])
margin: 10px 0;"/>${I}`:le,t.value=!0},onOpenLayer(){if(window.matchMedia("(min-width: 1468px)").matches)if(A.tabs.includes(h!=null?h:"trees")){const k=A.tabs.lastIndexOf(h!=null?h:"trees");A.tabs.splice(k,1)}else A.tabs.push(h!=null?h:"trees"),z.minimized.value=!0;else A.tabs.splice(1,1/0,h!=null?h:"trees")},onUnlockLayer(){C.value=!0,setTimeout(()=>{var k,x;n.value=-1,i.value=r((x=(k=Se[h!=null?h:"trees"])==null?void 0:k.name)!=null?x:""),s.value=le,A.devSpeed=null,t.value=!0},1e3)}}}}})}const o=[l(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Oi,story:"Oh no! Santa forgot about Christmas and it's only 25 days away! He's asked for your help due to your history getting large quantities of things in short amounts of time. Unfortunately you're really starting from scratch here - let's start with getting wood, which you'll need for everything from building workshops to wrapping paper to many of the toys themselves!",completedStory:"Santa looks at all the wood you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),l(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:Ri,story:"Santa looked over your tree farm and was impressed with how much you could accomplish in just one day. Today's goal is to get a workshop built up for the elves to work in - and apparently, they need quite a lot of space to work!",completedStory:"The workshop complete, Santa once again dismisses you for the day. With a strong foundation, this workshop should suffice for supporting future work toward this impossible mission. Good Job!"})),l(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:qi,story:"Santa tells you that unfortunately there are quite a few naughty children out there this year, and he's going to need you to gather as much coal as you can for him to give out.",completedStory:"Santa looks at all the coal you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),l(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:Vi,story:"Alright, it seems you finally have enough things setup to start bringing in the elves! Unfortunately, it seems they'll need to be retrained on how to help, since they're out of practice by 11 months!",completedStory:"The workshop now hums with the bustling elves working everything. They can take it from here - you deserve a break after such a long day! Good Job!"})),l(()=>({day:5,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:6,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:7,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:8,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:9,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:10,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:11,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:12,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:13,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:14,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:15,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:16,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:17,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:18,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:19,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:20,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:21,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:22,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:23,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:24,shoul
${x}
${k}`)}}return d[I]}je(n,I=>{I&&Object.keys(d).forEach(k=>delete d[k])});const y=S(()=>ie.saves.reduce((I,k)=>(I[k]=_(k),I),{}));function v(I){let k;switch(A.id===I?k=_i(A[ce]):k=JSON.stringify(y.value[I]),Q.exportEncoding){default:console.warn(`Unknown save encoding: ${Q.exportEncoding}. Defaulting to lz`);case"lz":k=ut.compressToUTF16(k);break;case"base64":k=btoa(unescape(encodeURIComponent(k)));break;case"plain":break}const x=document.createElement("textarea");x.value=k,document.body.appendChild(x),x.select(),x.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(x)}function h(I){A.id===I&&Ue();const k={...y.value[I],id:mn()};Ue(k),ie.saves.push(k.id)}function w(I){ie.saves=ie.saves.filter(k=>k!==I),localStorage.removeItem(I),d[I]=void 0}function C(I){y.value[A.id].time=A.time,Ue(),d[A.id]=void 0,bt(y.value[I]),d[I]=void 0}function R(I){if(o.value=I,wt(()=>{o.value=null}),I[0]!=="{")if(I[0]==="e")I=decodeURIComponent(escape(atob(I)));else if(I[0]==="\u1BE1")I=ut.decompressFromUTF16(I);else{console.warn("Unable to determine preset encoding",I);return}const k=JSON.parse(I);k.id=mn(),Ue(k),ie.saves.push(k.id),C(k.id)}function le(I,k){const x=y.value[I];x&&(x.name=k,A.id===I?(A.name=k,Ue()):(Ue(x),d[I]=void 0))}return(I,k)=>(b(),U(ze,{modelValue:n.value,"onUpdate:modelValue":k[4]||(k[4]=x=>n.value=x),ref_key:"modal",ref:i},{header:O(()=>[lo]),body:O(({shown:x})=>[x?(b(),U(r(rs),{key:0,list:r(ie).saves,handle:".handle",itemKey:ue=>ue},{item:O(({element:ue})=>[u(ao,{save:r(y)[ue],onOpen:be=>C(ue),onExport:be=>v(ue),onEditName:be=>le(ue,be),onDuplicate:be=>h(ue),onDelete:be=>w(ue)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):P("",!0)]),footer:O(()=>[m("div",ro,[u(Hi,{modelValue:l.value,"onUpdate:modelValue":k[0]||(k[0]=x=>l.value=x),title:"Import Save",placeholder:"Paste your save here!",class:pe({importingFailed:s.value})},null,8,["modelValue","class"]),m("div",oo,[uo,m("div",co,[m("button",{class:"button",onClick:k[1]||(k[1]=x=>C(r(xt)().id))},"New Game"),Object.keys(r(f)).length>0?(b(),U(zn,{key:0,options:r(f),modelValue:o.value,"onUpdate:modelValue":k[2]||(k[2]=x=>R(x)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):P("",!0)])]),m("div",fo,[mo,m("button",{class:"button modal-default-button",onClick:k[3]||(k[3]=x=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var ji=Z(po,[["__scopeId","data-v-3b9991aa"]]);const Re=e=>(nt("data-v-4a3f8425"),e=e(),it(),e),ho=["src","alt"],go={key:1,class:"title"},vo=Re(()=>m("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),yo={class:"discord"},bo={class:"discord-links"},_o={key:0},wo=["href"],No=Re(()=>m("li",null,[m("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),ko=Re(()=>m("li",null,[m("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Co={href:"https://forums.moddingtree.com/",target:"_blank"},So=Re(()=>m("span",{class:"material-icons"},"forum",-1)),Mo=Re(()=>m("span",{class:"material-icons"},"info",-1)),Io=Re(()=>m("span",{class:"material-icons"},"library_books",-1)),Ao=Re(()=>m("span",{class:"material-icons"},"settings",-1)),$o=Re(()=>m("span",{class:"material-icons"},"library_books",-1)),Eo=Re(()=>m("span",{class:"material-icons"},"settings",-1)),Po=Re(()=>m("span",{class:"material-icons"},"info",-1)),To={href:"https://forums.moddingtree.com/",target:"_blank"},xo=Re(()=>m("span",{class:"material-icons"},"forum",-1)),Fo={class:"discord"},Bo={class:"discord-links"},Do={key:0},Oo=["href"],Ro=Re(()=>m("li",null,[m("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),qo=Re(()=>m("li",null,[m("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Vo=L({__name:"Nav",setup(e){const t=T(null),n=T(null),i=T(null),s=T(null),{useHeader:l,banner:o,title:c,discordName:f,discordLink:d,versionNumber:_}=Q;function y(){window.open(d,"mywindow")}return(v,h)=>(b(),M(D,null,[r(l)?(b(),M("div",Nt({key:0,class:"na
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 oa();const{globalBus:e,startGameLoop:t}=await gn(()=>Promise.resolve().then(function(){return ra}),void 0),n=window.vue=is(Nu);e.emit("setupVue",n),n.mount("#app"),wt(()=>{const i=ci(),{updateServiceWorker:s}=Cu({onNeedRefresh(){i.info("New content available, click or reload to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){s()}})},onOfflineReady(){i.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(l){l&&setInterval(l.update,60*60*1e3)}})}),t()});