Advent-Incremental/assets/index.4d678209.js

17 lines
166 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.92681fcb.js";import{Z as M,l as Be,u as In,q as mn,C as o,b1 as st,aa as G,aE as b,a0 as S,a1 as f,aK as ot,G as ke,t as D,aC as pi,w as We,b2 as $e,a8 as r,O as F,ao as as,I as Ne,ay as En,ar as qt,aG as bn,A as Pe,_ as Q,b6 as V,b8 as Gn,bs as ls,aq as Ut,bu as on,bb as Bn,T as os,a7 as h,j as rs,bv as li,J as W,$ as B,aH as pt,aF as ht,al as Cn,aL as Nt,aN as Fe,z as ft,H as us,aJ as hi,bn as ds,br as cs,be as ms}from"./@vue.4ce677c2.js";import{i as fs}from"./is-plain-object.906d88e8.js";import{c as gi}from"./nanoevents.1080beb7.js";import{L as wt}from"./lz-string.731cedc5.js";import{Y as ps}from"./vue-next-select.a2bfab1d.js";import{s as hs,u as vi}from"./vue-toastification.6f567382.js";import{D as gs}from"./vuedraggable.7949458c.js";import{p as vs}from"./vue-textarea-autosize.35804eaf.js";import{v as ys,n as bs}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const _s=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 u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).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)}};_s();const ws="modulepreload",oi={},ks="./",Nn=function(t,n){return!n||n.length===0?t():Promise.all(n.map(i=>{if(i=`${ks}${i}`,i in oi)return;oi[i]=!0;const s=i.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${l}`))return;const u=document.createElement("link");if(u.rel=s?"stylesheet":ws,s||(u.as="script",u.crossOrigin=""),u.href=i,document.head.appendChild(u),s)return new Promise((c,m)=>{u.addEventListener("load",c),u.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},Cs="./projInfo-schema.json",Ns="Advent Incremental",Ss="An incremental game you play a day at a time, leading up to Christmas!",Ms="advent-incremental",As="thepaperpilot and friends",Is="",Es="",Bs="0.3",xs="Initial Commit",Ps=!0,Fs=!1,Ts=2,Rs=!0,$s=null,Ds="",Os=["main"],qs=3600,Us=0,Vs=!0,Ls="base64";var ie={$schema:Cs,title:Ns,description:Ss,id:Ms,author:As,discordName:Is,discordLink:Es,versionNumber:Bs,versionTitle:xs,allowGoBack:Ps,defaultShowSmall:Fs,defaultDecimalsShown:Ts,useHeader:Rs,banner:$s,logo:Ds,initialTabs:Os,maxTickLength:qs,offlineLimit:Us,enablePausing:Vs,exportEncoding:Ls};const qn=17,Gs=9e15,Hs=Math.log10(9e15),Qs=1/9e15,zs=308,js=-324,ri=5,Ks=function(){const e=[];for(let n=js+1;n<=zs;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),Tt=[2,Math.E,3,4,5,6,7,8,9,10],Ws=[[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.1670905356972
`,e),await $t(jt())}}function jt(){const e=wn(),t=Ei({id:e});return nt(t),me.saves.push(e),t}function wn(){let e,t=0;do e=`${ie.id}-${t++}`;while(localStorage.getItem(e));return e}async function $t(e){console.info("Loading save",e);const{layers:t,removeLayer:n,addLayer:i}=await Nn(()=>Promise.resolve().then(function(){return Ua}),void 0),{fixOldSave:s,getInitialLayers:l}=await Nn(()=>Promise.resolve().then(function(){return Ji}),void 0);for(const u in t){const c=t[u];c&&n(c)}l(e).forEach(u=>i(u,e)),e=Ei(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,ie.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==ie.versionNumber&&s(e.modVersion,e),Object.assign(E,e),me.active=E.id,ve.emit("onLoad")}setInterval(()=>{E.autosave&&nt()},1e3);window.onbeforeunload=()=>{E.autosave&&nt()};window.save=nt;const ya=window.hardReset=async()=>{await $t(jt())},un=mn({active:"",saves:[],showTPS:!0,theme:Hn.Nordic,unthrottled:!1});st(un,e=>{const t=wt.compressToUTF16(JSON.stringify(e));localStorage.setItem(ie.id,t)},{deep:!0});var me=window.settings=un;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Hn.Nordic};ve.emit("loadSettings",e),Object.assign(un,e),ya()};function ba(){try{let e=localStorage.getItem(ie.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=wt.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(un,t)}ve.emit("loadSettings",un)}catch{}}const Bi=mn([]);function _a(e){Bi.push(e)}const xi=mn([]);function wa(e){xi.push(e)}const ka=mn([]),Ca={class:"table"},kn=G({__name:"Column",setup(e){const t=M(()=>fn[me.theme].mergeAdjacent);return(n,i)=>(b(),S("div",Ca,[f("div",{class:ke(["col",{mergeAdjacent:o(t)}])},[ot(n.$slots,"default")],2)]))}}),Na={class:"table"},Pi=G({__name:"Row",setup(e){const t=M(()=>fn[me.theme].mergeAdjacent);return(n,i)=>(b(),S("div",Na,[f("div",{class:ke(["row",{mergeAdjacent:o(t)}])},[ot(n.$slots,"default")],2)]))}});function Fi(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!as(e)}function se(e,t="span"){return typeof e=="function"?G({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),G({template:e})):G({render:()=>({})}):e}function he(e){if(At(e))return typeof e=="function"?e():se(e);const t=e[St];return r(t,e[Mt](),null)}function Te(...e){let t;return r(Pi,null,Fi(t=e.map(he))?t:{default:()=>[t]})}function Qn(...e){let t;return r(kn,null,Fi(t=e.map(he))?t:{default:()=>[t]})}function rt(e){if(At(e))return typeof e=="function"?e():typeof e=="string"?r(F,null,[e]):r(e,null,null);const t=e[St];return r(t,e[Mt](),null)}function At(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[rn]===!0}function Ti(e,t,n){const i=D(null),s=D(void 0);function l(m){i.value||(i.value=setInterval(c,250)),s.value=m,n&&(n.value=!0)}function u(){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 pi(u),{start:l,stop:u,handleHolding:c}}function Ri(e,t="div"){const n=We();return $e(()=>{n.value=se(Se(e),t)}),n}function Vt(e,t="div"){const n=We(null);return $e(()=>{const i=Se(e);n.value=i==null?null:se(i,t)}),n}function Sa(e){return M(()=>Se(e))}function Se(e){return o(o(e))}function P(...e){return e.includes(Object)||e.push(Object),e}const we=G({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(b(),S("div",{style:Ne({width:e.width,height:e.height})},null,4))}});var le=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n};const Ma=G({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var _;const n=D({}),i=new ResizeObserver(c),s=D(null);En(()=>{const y=s.value;y!=null&&i.observe(y)});let l=!0,u=D((_=s.value)==null?void 0:_.getBoundingClientRect());function c(){l&&(l=!1,
`).slice(3,5).map(t=>t.trim()).join(`
`))||""}function De(e){const t=Be(e)?e:D(e);return t[dn]=t,t[cn]=Be(e)?e.value:e,t[An]=$a(),t[Di]=!1,it.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
Created at:
`+t[An]):Kt[it[it.length-1]].add(t),t}ve.on("addLayer",(e,t)=>{const n=[],i=(s,l=[])=>{let u=!1;return Object.keys(s).forEach(c=>{const m=s[c];if(m&&typeof m=="object")if(dn in m){if(u=!0,m[Di]){console.warn("Deleted persistent ref present in returned object. Ignoring...",m,`
Created at:
`+m[An]);return}Kt[e.id].delete(be in m?m[be]:m);const d=l.reduce((y,v)=>(v in y||(y[v]={}),y[v]),t),_=d[c];d[c]=m[dn],rs(d)?_!=null?d[c]=_:d[c]=m[cn]:_!=null?d[c].value=_:d[c].value=m[cn]}else!(m instanceof a)&&!Be(m)&&!n.includes(m)&&(typeof m.type=="symbol"&&n.push(m),i(m,[...l,c])&&(li(m)&&!li(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.",be in s?s[be]:s,c):u=!0))}),u};i(e),Kt[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[An])}),Kt[e.id].clear()});const zn=Symbol("RegisterNode"),jn=Symbol("UnregisterNode"),Kn=Symbol("Nodes"),Wn=Symbol("Bounds"),Re=In({});window.layers=Re;const Kt={},it=[];function It(e,t){return Le(()=>{const n={},i=n.emitter=gi();if(n.on=i.on.bind(i),n.emit=i.emit.bind(i),n.nodes=D({}),n.id=e,it.push(e),Kt[e]=new Set,n.minimized=De(!1),Object.assign(n,t.call(n)),it[it.length-1]==null||it[it.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen
Stack: ${it}
Trying to pop ${n.id}`;return it.pop(),x(n,"color"),x(n,"display"),x(n,"name"),xe(n,"name",n.id),x(n,"minWidth"),xe(n,"minWidth",600),x(n,"minimizable"),xe(n,"minimizable",!0),n})}function Oi(e,t){if(console.info("Adding layer",e.id),Re[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,Re[e.id]);return}xe(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),Re[e.id]=e,ve.emit("addLayer",e,t.layers[e.id])}function Da(e){return Re[e]}function qi(e){console.info("Removing layer",e.id),ve.emit("removeLayer",e),Re[e.id]=void 0}function Oa(e){qi(e),Oi(e,E)}function qa(e){const t=D(!1);return{openModal:()=>t.value=!0,modal:T(()=>r(at,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>r("h2",null,[o(e.name)]),body:o(e.display)}))}}ve.on("update",function(t){Object.values(Re).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(Re).forEach(n=>{n==null||n.emit("update",t)}),Object.values(Re).forEach(n=>{n==null||n.emit("postUpdate",t)})});var Ua=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:zn,UnregisterNodeInjectionKey:jn,NodesInjectionKey:Kn,BoundsInjectionKey:Wn,layers:Re,persistentRefs:Kt,addingLayers:it,createLayer:It,addLayer:Oi,getLayer:Da,removeLayer:qi,reloadLayer:Oa,setupLayerModal:qa},Symbol.toStringTag,{value:"Module"}));const Va={},La={class:"notif"};function Ga(e,t){return b(),S("div",La,"!")}var mi=le(Va,[["render",Ga],["__scopeId","data-v-66323fd4"]]);const Pn=e=>(pt("data-v-949cc93c"),e=e(),ht(),e),Ha={key:0,class:"day feature dontMerge opened"},Qa={class:"date"},za=h("Dec"),ja=Pn(()=>f("br",null,null,-1)),Ka={class:"date"},Wa=h("Dec"),Ja=Pn(()=>f("br",null,null,-1)),Xa=Pn(()=>f("div",{class:"doors"},null,-1)),Ya={class:"date"},Za=h("Dec"),el=Pn(()=>f("br",null,null,-1)),tl={key:0,class:"material-icons lock"},nl=G({__name:"Day",props:{day:null,symbol:null,opened:null,shouldNotify:null},emits:["openLore","openLayer","unlockLayer"],setup(e,{emit:t}){const n=e,i=M(()=>a.gte(U.day.value,n.day)&&new Date().getMonth()===11&&new Date().getDate()>=n.day);function s(){i.value&&t("unlockLayer")}return(l,u)=>e.opened.value?(b(),S("div",Ha,[r(Bn,{appear:"",name:"door"},{default:V(()=>[f("div",{class:"doors",onClick:u[0]||(u[0]=c=>t("openLayer"))},[f("div",Qa,[za,ja,h(W(e.day),1)]),f("div",Ka,[Wa,Ja,h(W(e.day),1)])])]),_:1}),f("div",{class:"icon",style:Ne({backgroundImage:`url(${e.symbol})`})},null,4),f("div",{class:"lore",onClick:u[1]||(u[1]=c=>t("openLore"))},"?"),o(e.shouldNotify)?(b(),Q(mi,{key:0})):B("",!0)])):(b(),S("div",{key:1,class:ke(["day feature dontMerge",{can:o(i),locked:!o(i),canOpen:o(i)}]),onClick:s},[Xa,f("div",Ya,[Za,el,h(W(e.day),1)]),o(i)?B("",!0):(b(),S("div",tl,"lock")),o(i)?(b(),Q(mi,{key:1})):B("",!0)],2))}});var il=le(nl,[["__scopeId","data-v-949cc93c"]]);const sl={key:0},al={key:0,class:"mark star"},ll=["src"],ol=G({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(b(),S("div",sl,[e.mark===!0?(b(),S("div",al)):(b(),S("img",{key:1,class:"mark",src:e.mark},null,8,ll))])):B("",!0)}});var Fn=le(ol,[["__scopeId","data-v-2207999f"]]);const rl=G({__name:"Node",props:{id:null},setup(e){const n=Pe(e),i=Cn(zn,()=>{}),s=Cn(jn,()=>{}),l=We(null),u=M(()=>l.value&&l.value.parentElement);return st([u,n.id],([c,m],[d,_])=>{d&&s(o(_)),c&&i(m,c)}),pi(()=>s(o(n.id))),(c,m)=>(b(),S("div",{class:"node",ref_key:"node",ref:l},null,512))}});var pn=le(rl,[["__scopeId","data-v-a48cb382"]]),ul=G({props:{display:{type:P(Object,String,Function),required:!0},visibility:{type:P(Number),required:!0},style:P(Object,String,Array),classes:P(Object),onClick:Function,onHold:Function,canClick:{type:P(Boolean),required:!0},small:Boolean,mark:P(Boolean,String),id:{type:String,required:!0},isHolding:Object},components:{Node:pn,MarkNode:Fn},setup(e){const{display:t,onClick:n,onHold:i}=Pe(e),s=We("");$e(()=>{const c=Se(t);if(c==null){s.value="";return}if(At(c)){s.value=se(c);return}const m=se(c.title||"","h3"),d=se(c.description,"div");s.value=se(T(()=>r("span",null,[c.title?r("div",null,[r(m,null,null)]):null,r(d,null
margin: 10px 0;"/>${A}`:ue,t.value=!0},onOpenLayer(){if(window.matchMedia("(min-width: 1468px)").matches)if(E.tabs.includes(p!=null?p:"trees")){const k=E.tabs.lastIndexOf(p!=null?p:"trees");E.tabs.splice(k,1)}else E.tabs.push(p!=null?p:"trees"),U.minimized.value=!0;else E.tabs.splice(1,1/0,p!=null?p:"trees")},onUnlockLayer(){N.value=!0,setTimeout(()=>{var k,O;n.value=-1,i.value=o((O=(k=Re[p!=null?p:"trees"])==null?void 0:k.name)!=null?O:""),s.value=ue,E.devSpeed=null,t.value=!0},1e3)}}}}})}const u=[l(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Hi,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:Qi,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:zi,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:ji,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:"paper",symbol:Ki,story:"With the elves trained, we're almost ready to start working on these presents! Just a couple more pre-reqs first, starting with turning all this wood into wood pulp and finally into paper, which will be required for wrapping paper later on but in the meantime can be used to help write guides to help these elves continue their education!",completedStory:"You look upon your rivers of book pulp as you hand out stacks of papers to elves to read through. You've continued getting closer and closer to preparing for Christmas, and can go to bed satisfied with your progress. Good Job!"})),l(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:Wi,story:"You watch all these elves carrying incredibly large loads just in their open elf-sized hands, and realize there's probably a better way. You need to put the toys in boxes anyways, so why don't we get started working on those so the workers can take advantage as well?",completedStory:"Wow, those boxes are really convenient! The workshop feels more and more proper with every day. You tick another requirement of your list and start looking towards tomorrow. Good Job!"})),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:"",compl
${O}
${k}`)}}return d[A]}st(n,A=>{A&&Object.keys(d).forEach(k=>delete d[k])});const y=M(()=>me.saves.reduce((A,k)=>(A[k]=_(k),A),{}));function v(A){let k;switch(E.id===A?k=Ai(E[be]):k=JSON.stringify(y.value[A]),ie.exportEncoding){default:console.warn(`Unknown save encoding: ${ie.exportEncoding}. Defaulting to lz`);case"lz":k=wt.compressToUTF16(k);break;case"base64":k=btoa(unescape(encodeURIComponent(k)));break;case"plain":break}const O=document.createElement("textarea");O.value=k,document.body.appendChild(O),O.select(),O.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(O)}function p(A){E.id===A&&nt();const k={...y.value[A],id:wn()};nt(k),me.saves.push(k.id)}function w(A){me.saves=me.saves.filter(k=>k!==A),localStorage.removeItem(A),d[A]=void 0}function N(A){y.value[E.id].time=E.time,nt(),d[E.id]=void 0,$t(y.value[A]),d[A]=void 0}function j(A){if(u.value=A,qt(()=>{u.value=null}),A[0]!=="{")if(A[0]==="e")A=decodeURIComponent(escape(atob(A)));else if(A[0]==="\u1BE1")A=wt.decompressFromUTF16(A);else{console.warn("Unable to determine preset encoding",A);return}const k=JSON.parse(A);k.id=wn(),nt(k),me.saves.push(k.id),N(k.id)}function ue(A,k){const O=y.value[A];O&&(O.name=k,E.id===A?(E.name=k,nt()):(nt(O),d[A]=void 0))}return(A,k)=>(b(),Q(at,{modelValue:n.value,"onUpdate:modelValue":k[4]||(k[4]=O=>n.value=O),ref_key:"modal",ref:i},{header:V(()=>[br]),body:V(({shown:O})=>[O?(b(),Q(o(gs),{key:0,list:o(me).saves,handle:".handle",itemKey:J=>J},{item:V(({element:J})=>[r(yr,{save:o(y)[J],onOpen:oe=>N(J),onExport:oe=>v(J),onEditName:oe=>ue(J,oe),onDuplicate:oe=>p(J),onDelete:oe=>w(J)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):B("",!0)]),footer:V(()=>[f("div",_r,[r(Zi,{modelValue:l.value,"onUpdate:modelValue":k[0]||(k[0]=O=>l.value=O),title:"Import Save",placeholder:"Paste your save here!",class:ke({importingFailed:s.value})},null,8,["modelValue","class"]),f("div",wr,[kr,f("div",Cr,[f("button",{class:"button",onClick:k[1]||(k[1]=O=>N(o(jt)().id))},"New Game"),Object.keys(o(m)).length>0?(b(),Q(Zn,{key:0,options:o(m),modelValue:u.value,"onUpdate:modelValue":k[2]||(k[2]=O=>j(O)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):B("",!0)])]),f("div",Nr,[Sr,f("button",{class:"button modal-default-button",onClick:k[3]||(k[3]=O=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var es=le(Mr,[["__scopeId","data-v-3b9991aa"]]);const je=e=>(pt("data-v-4a3f8425"),e=e(),ht(),e),Ar=["src","alt"],Ir={key:1,class:"title"},Er=je(()=>f("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),Br={class:"discord"},xr={class:"discord-links"},Pr={key:0},Fr=["href"],Tr=je(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Rr=je(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),$r={href:"https://forums.moddingtree.com/",target:"_blank"},Dr=je(()=>f("span",{class:"material-icons"},"forum",-1)),Or=je(()=>f("span",{class:"material-icons"},"info",-1)),qr=je(()=>f("span",{class:"material-icons"},"library_books",-1)),Ur=je(()=>f("span",{class:"material-icons"},"settings",-1)),Vr=je(()=>f("span",{class:"material-icons"},"library_books",-1)),Lr=je(()=>f("span",{class:"material-icons"},"settings",-1)),Gr=je(()=>f("span",{class:"material-icons"},"info",-1)),Hr={href:"https://forums.moddingtree.com/",target:"_blank"},Qr=je(()=>f("span",{class:"material-icons"},"forum",-1)),zr={class:"discord"},jr={class:"discord-links"},Kr={key:0},Wr=["href"],Jr=je(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Xr=je(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Yr=G({__name:"Nav",setup(e){const t=D(null),n=D(null),i=D(null),s=D(null),{useHeader:l,banner:u,title:c,discordName:m,discordLink:d,versionNumber:_}=ie;function y(){window.open(d,"mywindow")}return(v,p)=>(b(),S(F,null,[o(l)?(b(),S("div",Ut({key:0,class:"nav"},v
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 va();const{globalBus:e,startGameLoop:t}=await Nn(()=>Promise.resolve().then(function(){return ga}),void 0),n=window.vue=ms(Tu);e.emit("setupVue",n),n.mount("#app"),qt(()=>{const i=vi(),{updateServiceWorker:s}=$u({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()});