mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-27 02:21:42 +00:00
17 lines
168 KiB
JavaScript
17 lines
168 KiB
JavaScript
|
/* empty css */import"./vue.92681fcb.js";import{Z as S,l as Fe,u as Sn,q as cn,C as o,b1 as lt,aa as L,aE as y,a0 as M,a1 as f,aK as ft,G as we,t as q,aC as fi,w as tt,b2 as Je,a8 as u,O as F,ao as rs,I as Me,ay as Mn,ar as Lt,aG as gn,A as Re,_ as G,b6 as U,b8 as In,bs as pi,aq as Gt,bu as sn,bb as An,T as us,a7 as h,j as cs,bv as ei,J as W,$ as B,aH as wt,aF as kt,z as ot,aN as ye,al as bn,aL as Et,H as ds,aJ as hi,bn as ms,br as fs,be as ps}from"./@vue.4ce677c2.js";import{i as hs}from"./is-plain-object.906d88e8.js";import{c as gi}from"./nanoevents.1080beb7.js";import{L as It}from"./lz-string.731cedc5.js";import{Y as gs}from"./vue-next-select.a2bfab1d.js";import{s as vs,u as vi}from"./vue-toastification.6f567382.js";import{D as ys}from"./vuedraggable.7949458c.js";import{p as bs}from"./vue-textarea-autosize.35804eaf.js";import{v as _s,n as ws}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const ks=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 r of l.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).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)}};ks();const Cs="modulepreload",ti={},Ns="./",_n=function(t,n){return!n||n.length===0?t():Promise.all(n.map(i=>{if(i=`${Ns}${i}`,i in ti)return;ti[i]=!0;const s=i.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${l}`))return;const r=document.createElement("link");if(r.rel=s?"stylesheet":Cs,s||(r.as="script",r.crossOrigin=""),r.href=i,document.head.appendChild(r),s)return new Promise((c,m)=>{r.addEventListener("load",c),r.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},Ss="./projInfo-schema.json",Ms="Advent Incremental",Is="An incremental game you play a day at a time, leading up to Christmas!",As="advent-incremental",Es="thepaperpilot and friends",Bs="",xs="",Ps="0.3",Fs="Initial Commit",Ts=!0,Rs=!1,$s=2,Ds=!0,Os=null,qs="",Us=["main"],Vs=3600,Ls=0,Gs=!0,Hs="base64";var ee={$schema:Ss,title:Ms,description:Is,id:As,author:Es,discordName:Bs,discordLink:xs,versionNumber:Ps,versionTitle:Fs,allowGoBack:Ts,defaultShowSmall:Rs,defaultDecimalsShown:$s,useHeader:Ds,banner:Os,logo:qs,initialTabs:Us,maxTickLength:Vs,offlineLimit:Ls,enablePausing:Gs,exportEncoding:Hs};const $n=17,Qs=9e15,zs=Math.log10(9e15),js=1/9e15,Ks=308,Ws=-324,ni=5,Js=function(){const e=[];for(let n=Ws+1;n<=Ks;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),Dt=[2,Math.E,3,4,5,6,7,8,9,10],Xs=[[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 qt(jt())}}function jt(){const e=yn(),t=Bi({id:e});return it(t),ue.saves.push(e),t}function yn(){let e,t=0;do e=`${ee.id}-${t++}`;while(localStorage.getItem(e));return e}async function qt(e){console.info("Loading save",e);const{layers:t,removeLayer:n,addLayer:i}=await _n(()=>Promise.resolve().then(function(){return Qa}),void 0),{fixOldSave:s,getInitialLayers:l}=await _n(()=>Promise.resolve().then(function(){return Xi}),void 0);for(const r in t){const c=t[r];c&&n(c)}l(e).forEach(r=>i(r,e)),e=Bi(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,ee.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==ee.versionNumber&&s(e.modVersion,e),Object.assign(E,e),ue.active=E.id,pe.emit("onLoad")}setInterval(()=>{E.autosave&&it()},1e3);window.onbeforeunload=()=>{E.autosave&&it()};window.save=it;const wa=window.hardReset=async()=>{await qt(jt())},ln=cn({active:"",saves:[],showTPS:!0,theme:Un.Nordic,unthrottled:!1});lt(ln,e=>{const t=It.compressToUTF16(JSON.stringify(e));localStorage.setItem(ee.id,t)},{deep:!0});var ue=window.settings=ln;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Un.Nordic};pe.emit("loadSettings",e),Object.assign(ln,e),wa()};function ka(){try{let e=localStorage.getItem(ee.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=It.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(ln,t)}pe.emit("loadSettings",ln)}catch{}}const xi=cn([]);function Ca(e){xi.push(e)}const Pi=cn([]);function Na(e){Pi.push(e)}const Sa=cn([]),Ma={class:"table"},Kt=L({__name:"Column",setup(e){const t=S(()=>dn[ue.theme].mergeAdjacent);return(n,i)=>(y(),M("div",Ma,[f("div",{class:we(["col",{mergeAdjacent:o(t)}])},[ft(n.$slots,"default")],2)]))}}),Ia={class:"table"},Fi=L({__name:"Row",setup(e){const t=S(()=>dn[ue.theme].mergeAdjacent);return(n,i)=>(y(),M("div",Ia,[f("div",{class:we(["row",{mergeAdjacent:o(t)}])},[ft(n.$slots,"default")],2)]))}});function Vn(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!rs(e)}function Z(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 me(e){if(_t(e))return typeof e=="function"?e():Z(e);const t=e[xt];return u(t,e[Pt](),null)}function De(...e){let t;return u(Fi,null,Vn(t=e.map(me))?t:{default:()=>[t]})}function Ti(...e){let t;return u(Kt,null,Vn(t=e.map(me))?t:{default:()=>[t]})}function at(e){if(_t(e))return typeof e=="function"?e():typeof e=="string"?u(F,null,[e]):u(e,null,null);const t=e[xt];return u(t,e[Pt](),null)}function Aa(...e){let t;return u(Kt,null,Vn(t=e.map(at))?t:{default:()=>[t]})}function _t(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[an]===!0}function Ri(e,t,n){const i=q(null),s=q(void 0);function l(m){i.value||(i.value=setInterval(c,250)),s.value=m,n&&(n.value=!0)}function r(){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 fi(r),{start:l,stop:r,handleHolding:c}}function Ea(e,t){const n=S(()=>e.filter(i=>o(i.visibility)===Ie.Visible&&t(i)));return{firstFeature:S(()=>n.value[0]),collapsedContent:R(()=>Ti(...n.value.slice(1))),hasCollapsedContent:S(()=>n.value.length>1)}}function Cn(e,t="div"){const n=tt();return Je(()=>{n.value=Z(Ae(e),t)}),n}function Bt(e,t="div"){const n=tt(null);return Je(()=>{const i=Ae(e);n.value=i==null?null:Z(i,t)}),n}function Ba(e){return S(()=>Ae(e))}function Ae(e){return o(o(e))}function D(...e){return e.includes(Object)||e.push(Object),e}const ve=L({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(y(),M("div",{style:Me({width:e.width,height:e.height})},null,4))}});var ne=(e,t)=>{const n=e.__vccOpts||e;for(const
|
||
|
`).slice(3,5).map(t=>t.trim()).join(`
|
||
|
`))||""}function Ee(e){const t=Fe(e)?e:q(e);return t[on]=t,t[rn]=Fe(e)?e.value:e,t[Nn]=Va(),t[Di]=!1,st.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
|
||
|
Created at:
|
||
|
`+t[Nn]):Wt[st[st.length-1]].add(t),t}pe.on("addLayer",(e,t)=>{const n=[],i=(s,l=[])=>{let r=!1;return Object.keys(s).forEach(c=>{const m=s[c];if(m&&typeof m=="object")if(on in m){if(r=!0,m[Di]){console.warn("Deleted persistent ref present in returned object. Ignoring...",m,`
|
||
|
Created at:
|
||
|
`+m[Nn]);return}Wt[e.id].delete(ge in m?m[ge]:m);const d=l.reduce((_,b)=>(b in _||(_[b]={}),_[b]),t),g=d[c];d[c]=m[on],cs(d)?g!=null?d[c]=g:d[c]=m[rn]:g!=null?d[c].value=g:d[c].value=m[rn]}else!(m instanceof a)&&!Fe(m)&&!n.includes(m)&&(typeof m.type=="symbol"&&n.push(m),i(m,[...l,c])&&(ei(m)&&!ei(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.",ge in s?s[ge]:s,c):r=!0))}),r};i(e),Wt[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[Nn])}),Wt[e.id].clear()});const Ln=Symbol("RegisterNode"),Gn=Symbol("UnregisterNode"),Hn=Symbol("Nodes"),Qn=Symbol("Bounds"),Oe=Sn({});window.layers=Oe;const Wt={},st=[];function Ft(e,t){return Qe(()=>{const n={},i=n.emitter=gi();if(n.on=i.on.bind(i),n.emit=i.emit.bind(i),n.nodes=q({}),n.id=e,st.push(e),Wt[e]=new Set,n.minimized=Ee(!1),Object.assign(n,t.call(n)),st[st.length-1]==null||st[st.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen
|
||
|
Stack: ${st}
|
||
|
Trying to pop ${n.id}`;return st.pop(),T(n,"color"),T(n,"display"),T(n,"name"),Te(n,"name",n.id),T(n,"minWidth"),Te(n,"minWidth",600),T(n,"minimizable"),Te(n,"minimizable",!0),n})}function Oi(e,t){if(console.info("Adding layer",e.id),Oe[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,Oe[e.id]);return}Te(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),Oe[e.id]=e,pe.emit("addLayer",e,t.layers[e.id])}function La(e){return Oe[e]}function qi(e){console.info("Removing layer",e.id),pe.emit("removeLayer",e),Oe[e.id]=void 0}function Ga(e){qi(e),Oi(e,E)}function Ha(e){const t=q(!1);return{openModal:()=>t.value=!0,modal:R(()=>u(rt,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>u("h2",null,[o(e.name)]),body:o(e.display)}))}}pe.on("update",function(t){Object.values(Oe).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(Oe).forEach(n=>{n==null||n.emit("update",t)}),Object.values(Oe).forEach(n=>{n==null||n.emit("postUpdate",t)})});var Qa=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Ln,UnregisterNodeInjectionKey:Gn,NodesInjectionKey:Hn,BoundsInjectionKey:Qn,layers:Oe,persistentRefs:Wt,addingLayers:st,createLayer:Ft,addLayer:Oi,getLayer:La,removeLayer:qi,reloadLayer:Ga,setupLayerModal:Ha},Symbol.toStringTag,{value:"Module"}));const za={},ja={class:"notif"};function Ka(e,t){return y(),M("div",ja,"!")}var li=ne(za,[["render",Ka],["__scopeId","data-v-66323fd4"]]);const Bn=e=>(wt("data-v-1a86f696"),e=e(),kt(),e),Wa={key:0,class:"day feature dontMerge opened"},Ja={class:"date"},Xa=h("Dec"),Ya=Bn(()=>f("br",null,null,-1)),Za={class:"date"},el=h("Dec"),tl=Bn(()=>f("br",null,null,-1)),nl=Bn(()=>f("div",{class:"doors"},null,-1)),il={class:"date"},sl=h("Dec"),al=Bn(()=>f("br",null,null,-1)),ll={key:0,class:"material-icons lock"},ol=L({__name:"Day",props:{day:null,symbol:null,opened:null,recentlyUpdated:null,shouldNotify:null},emits:["openLore","openLayer","unlockLayer"],setup(e,{emit:t}){const n=e,i=S(()=>a.gte(Q.day.value,n.day)&&new Date().getMonth()===11&&new Date().getDate()>=n.day);function s(){i.value&&t("unlockLayer")}return(l,r)=>e.opened.value?(y(),M("div",Wa,[u(An,{appear:"",name:"door"},{default:U(()=>[f("div",{class:"doors",onClick:r[0]||(r[0]=c=>t("openLayer"))},[f("div",Ja,[Xa,Ya,h(W(e.day),1)]),f("div",Za,[el,tl,h(W(e.day),1)])])]),_:1}),f("div",{class:"icon",style:Me({backgroundImage:`url(${e.symbol})`})},null,4),f("div",{class:"lore",onClick:r[1]||(r[1]=c=>t("openLore"))},"?"),o(e.shouldNotify)?(y(),G(li,{key:0})):B("",!0)])):(y(),M("div",{key:1,class:we(["day feature dontMerge",{can:o(i),locked:!o(i),canOpen:o(i)}]),onClick:s},[nl,f("div",il,[sl,al,h(W(e.day),1)]),o(i)?B("",!0):(y(),M("div",ll,"lock")),o(i)?(y(),G(li,{key:1})):B("",!0)],2))}});var rl=ne(ol,[["__scopeId","data-v-1a86f696"]]);const ul=L({__name:"Collapsible",props:{collapsed:null,display:null,content:null},setup(e){const t=e,n=Cn(ot(t,"display")),i=Cn(ot(t,"content"));return(s,l)=>(y(),G(Kt,{class:"collapsible-container"},{default:U(()=>[f("button",{onClick:l[0]||(l[0]=r=>e.collapsed.value=!e.collapsed.value),class:"feature collapsible-toggle"},[(y(),G(ye(o(n))))]),e.collapsed.value?B("",!0):(y(),G(ye(o(i)),{key:0}))]),_:1}))}});var cl=ne(ul,[["__scopeId","data-v-a72c16aa"]]);const dl={key:0},ml={key:0,class:"mark star"},fl=["src"],pl=L({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(y(),M("div",dl,[e.mark===!0?(y(),M("div",ml)):(y(),M("img",{key:1,class:"mark",src:e.mark},null,8,fl))])):B("",!0)}});var xn=ne(pl,[["__scopeId","data-v-2207999f"]]);const hl=L({__name:"Node",props:{id:null},setup(e){const n=Re(e),i=bn(Ln,()=>{}),s=bn(Gn,()=>{}),l=tt(null),r=S(()=>l.value&&l.value.parentElement);return lt([r,n.id],([c,m],[d,g])=>{d&&s(o(g)),c&&i(m,c)}),fi(()=>s(o(n.id))),(c,m)=>(y(),M("div",{class:"node",ref_key:"node",ref:l},null,512))}});var mn=ne(hl,[["__scopeId","data-v-a48cb382"]]);const gl=L({props:{progress:{type:D(String,Object,Number),required:!0},width:{type:D(Number),required:!0},height:{type:D(Number),required:!0},di
|
||
|
margin: 10px 0;"/>${$}`:N,t.value=!0},onOpenLayer(){if(fe.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(E.tabs.includes(C!=null?C:"trees")){const ce=E.tabs.lastIndexOf(C!=null?C:"trees");E.tabs.splice(ce,1)}else E.tabs.push(C!=null?C:"trees"),Q.minimized.value=!0;else E.tabs.splice(1,1/0,C!=null?C:"trees")},onUnlockLayer(){ae.value=!0,setTimeout(()=>{var ce,Ze;n.value=-1,i.value=o((Ze=(ce=Oe[C!=null?C:"trees"])==null?void 0:ce.name)!=null?Ze:""),s.value=N,E.devSpeed=null,t.value=!0},1e3)}}}}})}const r=[l(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Qi,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:zi,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:ji,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:Ki,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:Wi,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:Ji,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,symbo
|
||
|
${$}
|
||
|
${N}`)}}return d[I]}lt(n,I=>{I&&Object.keys(d).forEach(N=>delete d[N])});const _=S(()=>ue.saves.reduce((I,N)=>(I[N]=g(N),I),{}));function b(I){let N;switch(E.id===I?N=Ai(E[ge]):N=JSON.stringify(_.value[I]),ee.exportEncoding){default:console.warn(`Unknown save encoding: ${ee.exportEncoding}. Defaulting to lz`);case"lz":N=It.compressToUTF16(N);break;case"base64":N=btoa(unescape(encodeURIComponent(N)));break;case"plain":break}const $=document.createElement("textarea");$.value=N,document.body.appendChild($),$.select(),$.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild($)}function v(I){E.id===I&&it();const N={..._.value[I],id:yn()};it(N),ue.saves.push(N.id)}function w(I){ue.saves=ue.saves.filter(N=>N!==I),localStorage.removeItem(I),d[I]=void 0}function C(I){_.value[E.id].time=E.time,it(),d[E.id]=void 0,qt(_.value[I]),d[I]=void 0}function P(I){if(r.value=I,Lt(()=>{r.value=null}),I[0]!=="{")if(I[0]==="e")I=decodeURIComponent(escape(atob(I)));else if(I[0]==="\u1BE1")I=It.decompressFromUTF16(I);else{console.warn("Unable to determine preset encoding",I);return}const N=JSON.parse(I);N.id=yn(),it(N),ue.saves.push(N.id),C(N.id)}function ae(I,N){const $=_.value[I];$&&($.name=N,E.id===I?(E.name=N,it()):(it($),d[I]=void 0))}return(I,N)=>(y(),G(rt,{modelValue:n.value,"onUpdate:modelValue":N[4]||(N[4]=$=>n.value=$),ref_key:"modal",ref:i},{header:U(()=>[Ar]),body:U(({shown:$})=>[$?(y(),G(o(ys),{key:0,list:o(ue).saves,handle:".handle",itemKey:fe=>fe},{item:U(({element:fe})=>[u(Ir,{save:o(_)[fe],onOpen:ce=>C(fe),onExport:ce=>b(fe),onEditName:ce=>ae(fe,ce),onDuplicate:ce=>v(fe),onDelete:ce=>w(fe)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):B("",!0)]),footer:U(()=>[f("div",Er,[u(es,{modelValue:l.value,"onUpdate:modelValue":N[0]||(N[0]=$=>l.value=$),title:"Import Save",placeholder:"Paste your save here!",class:we({importingFailed:s.value})},null,8,["modelValue","class"]),f("div",Br,[xr,f("div",Pr,[f("button",{class:"button",onClick:N[1]||(N[1]=$=>C(o(jt)().id))},"New Game"),Object.keys(o(m)).length>0?(y(),G(Wn,{key:0,options:o(m),modelValue:r.value,"onUpdate:modelValue":N[2]||(N[2]=$=>P($)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):B("",!0)])]),f("div",Fr,[Tr,f("button",{class:"button modal-default-button",onClick:N[3]||(N[3]=$=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var ts=ne(Rr,[["__scopeId","data-v-3b9991aa"]]);const Ye=e=>(wt("data-v-4a3f8425"),e=e(),kt(),e),$r=["src","alt"],Dr={key:1,class:"title"},Or=Ye(()=>f("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),qr={class:"discord"},Ur={class:"discord-links"},Vr={key:0},Lr=["href"],Gr=Ye(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Hr=Ye(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Qr={href:"https://forums.moddingtree.com/",target:"_blank"},zr=Ye(()=>f("span",{class:"material-icons"},"forum",-1)),jr=Ye(()=>f("span",{class:"material-icons"},"info",-1)),Kr=Ye(()=>f("span",{class:"material-icons"},"library_books",-1)),Wr=Ye(()=>f("span",{class:"material-icons"},"settings",-1)),Jr=Ye(()=>f("span",{class:"material-icons"},"library_books",-1)),Xr=Ye(()=>f("span",{class:"material-icons"},"settings",-1)),Yr=Ye(()=>f("span",{class:"material-icons"},"info",-1)),Zr={href:"https://forums.moddingtree.com/",target:"_blank"},eu=Ye(()=>f("span",{class:"material-icons"},"forum",-1)),tu={class:"discord"},nu={class:"discord-links"},iu={key:0},su=["href"],au=Ye(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),lu=Ye(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),ou=L({__name:"Nav",setup(e){const t=q(null),n=q(null),i=q(null),s=q(null),{useHeader:l,banner:r,title:c,discordName:m,discordLink:d,versionNumber:g}=ee;function _(){window.open(d,"mywindow")}return(b,v)=>(y(),M(F,null,[o(l)?(y(),M("div",Gt({key:0,class
|
||
|
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 _a();const{globalBus:e,startGameLoop:t}=await _n(()=>Promise.resolve().then(function(){return ba}),void 0),n=window.vue=ps(Gu);e.emit("setupVue",n),n.mount("#app"),Lt(()=>{const i=vi(),{updateServiceWorker:s}=Qu({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()});
|