mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-02-17 09:52:46 +00:00
20 lines
206 KiB
JavaScript
20 lines
206 KiB
JavaScript
|
/* empty css */import"./vue.92681fcb.js";import{Z as C,l as Je,aa as X,t as O,ay as Zl,ar as dl,aE as b,a0 as N,aK as xt,a1 as f,O as E,aG as Ll,A as st,_ as z,a8 as o,b6 as H,b8 as en,bs as Xn,C as r,aq as cl,bu as Ml,bb as tn,T as Ha,a7 as c,u as ln,j as ja,bv as Fn,q as Dl,b1 as Pt,G as Qe,aC as Yn,w as Mt,b2 as _t,ao as Wa,I as Xe,J as ae,$ as P,aH as zt,aF as Kt,z as Ft,aN as Ue,al as jl,aL as ll,H as za,aJ as Zn,bn as Ka,br as Ja,be as Xa}from"./@vue.4ce677c2.js";import{c as ea}from"./nanoevents.1080beb7.js";import{L as Zt}from"./lz-string.731cedc5.js";import{i as Ya}from"./is-plain-object.906d88e8.js";import{Y as Za}from"./vue-next-select.a2bfab1d.js";import{s as ei,u as ta}from"./vue-toastification.6f567382.js";import{D as ti}from"./vuedraggable.7949458c.js";import{p as li}from"./vue-textarea-autosize.35804eaf.js";import{v as ni,n as ai}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const ii=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))a(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function l(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function a(i){if(i.ep)return;i.ep=!0;const s=l(i);fetch(i.href,s)}};ii();const oi="modulepreload",Tn={},si="./",Wl=function(t,l){return!l||l.length===0?t():Promise.all(l.map(a=>{if(a=`${si}${a}`,a in Tn)return;Tn[a]=!0;const i=a.endsWith(".css"),s=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${s}`))return;const u=document.createElement("link");if(u.rel=i?"stylesheet":oi,i||(u.as="script",u.crossOrigin=""),u.href=a,document.head.appendChild(u),i)return new Promise((d,m)=>{u.addEventListener("load",d),u.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>t())},ri="./projInfo-schema.json",ui="Advent Incremental",di="An incremental game you play a day at a time, leading up to Christmas!",ci="advent-incremental",mi="thepaperpilot and friends",pi="",fi="",gi="0.3",hi="Initial Commit",vi=!0,yi=!1,bi=2,wi=!0,Ci=null,_i="",ki=["main"],Ai=3600,Si=0,Ni=!0,Mi="base64";var Se={$schema:ri,title:ui,description:di,id:ci,author:mi,discordName:pi,discordLink:fi,versionNumber:gi,versionTitle:hi,allowGoBack:vi,defaultShowSmall:yi,defaultDecimalsShown:bi,useHeader:wi,banner:Ci,logo:_i,initialTabs:ki,maxTickLength:Ai,offlineLimit:Si,enablePausing:Ni,exportEncoding:Mi};const fn=17,Ii=9e15,Ei=Math.log10(9e15),Bi=1/9e15,xi=308,Di=-324,Rn=5,Pi=function(){const e=[];for(let l=Di+1;l<=xi;l++)e.push(Number("1e"+l));const t=323;return function(l){return e[l+t]}}(),sl=[2,Math.E,3,4,5,6,7,8,9,10],Fi=[[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.167090535697
|
||
|
Stack: ${Et}
|
||
|
Trying to pop ${l.id}`;return Et.pop(),$(l,"color"),$(l,"display"),$(l,"name"),it(l,"name",l.id),$(l,"minWidth"),it(l,"minWidth",600),$(l,"minimizable"),it(l,"minimizable",!0),l})}function pa(e,t){if(console.info("Adding layer",e.id),ut[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,ut[e.id]);return}it(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),ut[e.id]=e,$e.emit("addLayer",e,t.layers[e.id])}function mo(e){return ut[e]}function fa(e){console.info("Removing layer",e.id),$e.emit("removeLayer",e),ut[e.id]=void 0}function po(e){fa(e),pa(e,L)}function fo(e){const t=O(!1);return{openModal:()=>t.value=!0,modal:B(()=>o(gt,{modelValue:t.value,"onUpdate:modelValue":l=>t.value=l},{header:()=>o("h2",null,[r(e.name)]),body:r(e.display)}))}}$e.on("update",function(t){Object.values(ut).forEach(l=>{l==null||l.emit("preUpdate",t)}),Object.values(ut).forEach(l=>{l==null||l.emit("update",t)}),Object.values(ut).forEach(l=>{l==null||l.emit("postUpdate",t)})});var go=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:wn,UnregisterNodeInjectionKey:Cn,NodesInjectionKey:_n,BoundsInjectionKey:kn,layers:ut,persistentRefs:vl,addingLayers:Et,createLayer:Tt,addLayer:pa,getLayer:mo,removeLayer:fa,reloadLayer:po,setupLayerModal:fo},Symbol.toStringTag,{value:"Module"}));const An=Symbol("PersistentState"),tl=Symbol("DefaultValue"),Jl=Symbol("StackTrace"),ga=Symbol("Deleted"),El=Symbol("NonPersistent"),Sl=Symbol("SaveDataPath");function ho(){var e;return((e=new Error().stack)==null?void 0:e.split(`
|
||
|
`).slice(3,5).map(t=>t.trim()).join(`
|
||
|
`))||""}function ge(e){const t=Je(e)?e:O(e);t[An]=t,t[tl]=Je(e)?e.value:e,t[Jl]=ho(),t[ga]=!1;const l=C({get(){return t.value},set(a){t.value=a}});return l[tl]=t[tl],t[El]=l,t[Sl]=void 0,Et.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
|
||
|
Created at:
|
||
|
`+t[Jl]):vl[Et[Et.length-1]].add(t),t}function vo(e){return e&&typeof e=="object"&&An in e}function q(e){return e[El]}$e.on("addLayer",(e,t)=>{const l=[],a=(i,s=[])=>{let u=!1;return Object.keys(i).forEach(d=>{let m=i[d];if(m&&typeof m=="object")if(Ve in m&&(m=m[Ve]),vo(m)){if(u=!0,m[ga]){console.warn("Deleted persistent ref present in returned object. Ignoring...",m,`
|
||
|
Created at:
|
||
|
`+m[Jl]);return}vl[e.id].delete(m);const p=[e.id,...s,d];m[Sl]!=null&&JSON.stringify(p)!==JSON.stringify(m[Sl])&&console.error(`Persistent ref is being saved to \`${p.join(".")}\` when it's already present at \`${m[Sl].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,m),m[Sl]=p;const y=s.reduce((w,g)=>(g in w||(w[g]={}),w[g]),t),h=y[d];y[d]=m[An],ja(y)?h!=null?y[d]=h:y[d]=m[tl]:h!=null?y[d].value=h:y[d].value=m[tl]}else!(m instanceof n)&&!Je(m)&&!l.includes(m)&&(typeof m.type=="symbol"&&l.push(m),a(m,[...s,d])&&(Fn(m)&&!Fn(i)?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.",Ve in i?i[Ve]:i,d):u=!0))}),u};a(e[Ve]),vl[e.id].forEach(i=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,i,`
|
||
|
Created at:
|
||
|
`+i[Jl])}),vl[e.id].clear()});const Ve=Symbol("ProxyState"),hl=Symbol("ProxyPath");function vt(e,t={}){const l=t;let a=!1;function i(){return a||(Object.assign(l,e(l)),a=!0),l}return new Proxy(l,{get(s,u){if(u===Ve)return i();const d=i()[u];return d&&typeof d=="object"&&El in d?d[El]:d},set(s,u,d){return i()[u]=d,!0},has(s,u){return u===Ve?!0:Reflect.has(i(),u)},ownKeys(){return Reflect.ownKeys(i())},getOwnPropertyDescriptor(s,u){return a||(Object.assign(l,e(l)),a=!0),Object.getOwnPropertyDescriptor(s,u)}})}var Le=window.state=ln({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const ha=Dl({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function va(e){return JSON.stringify(e,(t,l)=>r(l))}const ya={get(e,t){var a;if(t===Ve||t===hl)return e[t];const l=e[Ve][t];if(t!=="value"&&(Ya(l)||Array.isArray(l))){if(l!==((a=e[t])==null?void 0:a[Ve])){const i=[...e[hl],t];e[t]=new Proxy({[Ve]:l,[hl]:i},ya)}return e[t]}return l},set(e,t,l,a){if(!Le.hasNaN&&(typeof l=="number"&&isNaN(l)||l instanceof n&&(isNaN(l.sign)||isNaN(l.layer)||isNaN(l.mag)))){const i=e[Ve][t];if(!(typeof i=="number"&&isNaN(i)||i instanceof n&&(isNaN(i.sign)||isNaN(i.layer)||isNaN(i.mag))))throw ha.autosave=!1,Le.hasNaN=!0,Le.NaNPath=[...e[hl],t],Le.NaNReceiver=a,console.error("Attempted to set NaN value",[...e[hl],t],e[Ve]),"Attempted to set NaN value. See above for details"}return e[Ve][t]=l,!0},ownKeys(e){return Reflect.ownKeys(e[Ve])},has(e,t){return Reflect.has(e[Ve],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[Ve],t)}};var L=window.player=new Proxy({[Ve]:ha,[hl]:["player"]},ya);function ba(e={}){return Object.assign({id:`${Se.id}-0`,name:"Default Save",tabs:Se.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:Se.id,modVersion:Se.versionNumber,layers:{}},e)}function Bt(e){const t=Zt.compressToUTF16(va(e!=null?e:L[Ve]));return localStorage.setItem((e!=null?e:L[Ve]).id,t),t}async function yo(){wo();try{let e=localStorage.getItem(Ge.active);if(e==null){await ul(yl());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Zt.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==Se.id){await ul(yl());return}t.id=Ge.active,await ul(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
|
||
|
`,e),await ul(yl())}}function yl(){const e=Hl(),t=ba({id:e});return Bt(t),Ge.saves.push(e),t}function Hl(){let e,t=0;do e=`${Se.id}-${t++}`;while(localStorage.getItem(e));return e}const Sn=O(!1);async function ul(e){console.info("Loading save",e),Sn.value=!0;const{layers:t,removeLayer:l,addLayer:a}=await Wl(()=>Promise.resolve().then(function(){return go}),void 0),{fixOldSave:i,getInitialLayers:s}=await Wl(()=>Promise.resolve().then(function(){return rr}),void 0);for(const u in t){const d=t[u];d&&l(d)}s(e).forEach(u=>a(u,e)),e=ba(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,Se.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==Se.versionNumber&&i(e.modVersion,e),Object.assign(L,e),Ge.active=L.id,$e.emit("onLoad")}setInterval(()=>{L.autosave&&Bt()},1e3);window.onbeforeunload=()=>{L.autosave&&Bt()};window.save=Bt;const bo=window.hardReset=async()=>{await ul(yl())},Bl=Dl({active:"",saves:[],showTPS:!0,theme:bn.Nordic,unthrottled:!1});Pt(Bl,e=>{const t=Zt.compressToUTF16(JSON.stringify(e));localStorage.setItem(Se.id,t)},{deep:!0});var Ge=window.settings=Bl;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:bn.Nordic};$e.emit("loadSettings",e),Object.assign(Bl,e),bo()};function wo(){try{let e=localStorage.getItem(Se.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Zt.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(Bl,t)}$e.emit("loadSettings",Bl)}catch{}}const wa=Dl([]);function Co(e){wa.push(e)}const Ca=Dl([]);function _o(e){Ca.push(e)}const ko=Dl([]),Ao={class:"table"},bt=X({__name:"Column",setup(e){const t=C(()=>Pl[Ge.theme].mergeAdjacent);return(l,a)=>(b(),N("div",Ao,[f("div",{class:Qe(["col",{mergeAdjacent:r(t)}])},[xt(l.$slots,"default")],2)]))}}),So={class:"table"},xl=X({__name:"Row",setup(e){const t=C(()=>Pl[Ge.theme].mergeAdjacent);return(l,a)=>(b(),N("div",So,[f("div",{class:Qe(["row",{mergeAdjacent:r(t)}])},[xt(l.$slots,"default")],2)]))}});function Nn(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Wa(e)}function be(e,t="span"){return typeof e=="function"?X({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),X({template:e})):X({render:()=>({})}):e}function ne(e){if(Wt(e))return typeof e=="function"?e():be(e);const t=e[al];return o(t,e[il](),null)}function Ce(...e){let t;return o(xl,null,Nn(t=e.map(ne))?t:{default:()=>[t]})}function Nl(...e){let t;return o(bt,null,Nn(t=e.map(ne))?t:{default:()=>[t]})}function Dt(e){if(Wt(e))return typeof e=="function"?e():typeof e=="string"?o(E,null,[e]):o(e,null,null);const t=e[al];return o(t,e[il](),null)}function No(...e){let t;return o(bt,null,Nn(t=e.map(Dt))?t:{default:()=>[t]})}function Wt(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Il]===!0}function _a(e,t,l){const a=O(null),i=O(void 0);function s(m){a.value||(a.value=setInterval(d,250)),i.value=m,l&&(l.value=!0)}function u(){a.value&&(clearInterval(a.value),a.value=null),l&&(l.value=!1)}function d(){t&&t.value?t.value():e&&e.value&&e.value(i.value)}return Yn(u),{start:s,stop:u,handleHolding:d}}function Mo(e,t){const l=C(()=>e.filter(a=>r(a.visibility)===et.Visible&&t(a)));return{firstFeature:C(()=>l.value[0]),collapsedContent:B(()=>Nl(...l.value.slice(1))),hasCollapsedContent:C(()=>l.value.length>1)}}function Xl(e,t="div"){const l=Mt();return _t(()=>{l.value=be(tt(e),t)}),l}function nl(e,t="div"){const l=Mt(null);return _t(()=>{const a=tt(e);l.value=a==null?null:be(a,t)}),l}function Io(e){return C(()=>tt(e))}function tt(e){return r(r(e))}function V(...e){return e.includes(Object)||e.push(Object),e}const he=X({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,l)=>(b(),N("div",{style:Xe({width:e.width,height:e.height})},null,4))}});const Eo={},Bo={
|
||
|
<br/>
|
||
|
<br/>
|
||
|
Cost: 50 ${l.displayName}<br/>${Y(1e11)} ${U.coal.displayName}`}})),re=G(()=>({resource:q(l),cost:1e5,display:{title:"Efficient Drills",description:"Use metal and a bunch of R&D to make drilling stuff faster. Double coal and ore mining speed."},visibility:()=>F(We.depthMilestones[4].earned.value)})),oe=Be(()=>({resource:q(l),cost(){return n.pow(1.15,this.amount.value).times(10)},display:{title:"Mining Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:B(()=>o(E,null,[c("Mine 2.5x faster. Increase ore mining amount by")," ",J(oe.amount.value),c(" ore per operation")]))},visibility:()=>F(n.gte(oe.amount.value,1)||n.div(s.value,d.value).plus(a.value).gte(10)),style:{width:"200px"}})),ue=Be(()=>({resource:q(l),cost(){return n.pow(1.15,n.times(this.amount.value,10)).times(10)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:B(()=>o(E,null,[c("Automatically smelts")," ",J(n.times(ue.amount.value,10)),c(" ore per second")]))},visibility:()=>F(n.gte(ue.amount.value,1)||n.gte(oe.amount.value,4)||n.gte(s.value,50)),style:{width:"200px"}})),we=ge(!0),Me=Be(()=>({resource:U.coal,cost(){return n.pow(10,this.amount.value).times(1e12)},display:{title:"Hotter Forges",description:"More coal makes the fires burn hotter, getting just a little more metal out of each bit of ore",effectDisplay:B(()=>o(E,null,[c("Gain "),J(n.times(Ze.value,100)),c("% more metal per ore")]))},visibility:()=>F(n.gte(Me.amount.value,1)||rt.bought.value),style:{width:"200px"}})),Ze=C(()=>n.times(Me.amount.value,.25));$e.on("update",de=>{T.value=n.times(de,S.value).plus(T.value);const ht=T.value.trunc();T.value=T.value.minus(ht),i.value=n.add(i.value,n.times(ht,te.value)),we.value&&A(n.min(g.value,n.times(p.value,de)),h.value)});const[Re,Ie]=ml(()=>[{title:"Auto Smelt Speed",modifier:m,base:0,unit:"/s",visible(){return n.gt(ue.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:y,base:1,visible(){return n.gt(h.value,1)}},{title:"Metal per Ore",modifier:u,base:.1},{title:"Ore per Mining Operation",modifier:x,base:1},{title:"Mining Speed",modifier:M,base:.1,unit:"/s"}]),ve=O(!1),Ee=B(()=>o(gt,{modelValue:ve.value,"onUpdate:modelValue":de=>ve.value=de},{header:()=>o("h2",null,[e,c(" Modifiers")]),body:Re})),{total:lt,trackerDisplay:Oe}=pl({resource:l,goal:25e3,name:e,day:Wn,color:t,modal:{show:ve,display:Ee}});return{name:e,day:Wn,color:t,ore:i,bestOre:s,oreProgress:T,metal:l,bestMetal:a,totalMetal:lt,simplePickaxe:qe,doublePickaxe:Te,crucible:xe,coalDrill:He,industrialFurnace:rt,efficientDrill:re,oreDrill:oe,industrialCrucible:ue,autoSmeltEnabled:we,hotterForge:Me,generalTabCollapsed:Ie,minWidth:700,display:B(()=>o(E,null,[ne(Oe),o(he,null,null),o(kt,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>o(E,null,[we.value&&n.gte(ue.amount.value,1)?`+${sa([[p.value,"smelting speed"],[ie.value,"ore gain"],[n.div(U.computedCoalGain.value,w),"coal gain"]],"/s",n.mul(d.value,h.value))}`:void 0]))},null),o(he,null,null),ne(_),n.gte(ue.amount.value,1)?o("div",{style:{width:"150px"}},[o(Ht,{title:"Auto Smelt",modelValue:we.value,"onUpdate:modelValue":de=>we.value=de},null)]):void 0,o(he,null,null),o(kt,{resource:i,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>o(E,null,[ra(Ye.value)]))},null),o(he,null,null),o("div",null,[c("Currently mining "),Y(te.value),c(" ore every")," ",Y(n.recip(S.value)),c(" seconds")]),ne(Fe),o(he,null,null),Ce(qe,Te,xe,He,rt,re),Ce(oe,ue,Me)]))}}),ar="cloth",zn=8,Gt=Tt(ar,function(){const e="Cloth",t="white",l=ot(0,"cloth"),a=ot(0,"wool"),i=ot(10,"sheep"),s=ge(0),u=jt(()=>({direction:fe.Right,width:100,height:10,style:"margin-top: 8px",borderStyle:"border-color: black",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s; background: black",progress:()=>n.div(s.value,we.value)})),d=Ct(()=>({display:{title:"Breed sheep",description:B(()=>o(E,null,[c("Breed "),J(n.floor(oe.value)),c(" sheep"),o("br",null,null),ne(u)]))},style:{minHeight:"80px"},c
|
||
|
margin: 10px 0;"/>${ke}`:T,l.value=!0},onOpenLayer(){if(Fe.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(L.tabs.includes(x!=null?x:"trees")){const me=L.tabs.lastIndexOf(x!=null?x:"trees");L.tabs.splice(me,1)}else L.tabs.push(x!=null?x:"trees"),j.minimized.value=!0;else L.tabs.splice(1,1/0,x!=null?x:"trees")},onUnlockLayer(){x&&(M.value=!0,setTimeout(()=>{var me,ie;a.value=-1,i.value=r((ie=(me=ut[x!=null?x:"trees"])==null?void 0:me.name)!=null?ie:""),s.value=T,L.devSpeed=null,l.value=!0},1e3))}}}}})}const d=[u(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Ma,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!"})),u(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:Ia,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!"})),u(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:Ea,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!"})),u(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:Ba,story:"Alright, it seems you finally have enough things set up to start bringing in the elves! Unfortunately, it seems they'll need to be retrained on how to help, since they've stopped practicing for 11 months!",completedStory:"The workshop now hums with the bustling elves working on everything. They can take it from here - you deserve a break after such a long day! Good Job!"})),u(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:xa,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 which will 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!"})),u(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:Da,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 on your list and start looking towards tomorrow. Good Job!"})),u(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:Pa,story:"You woke up ready to make some toys, before realizing most toys these days are made out of more than just wood! You're sure you're close to really getting to work, but there's a few more materials you're going to need - like metal! Lots of things need metal!",completedStory:"The sounds of
|
||
|
${T}
|
||
|
${S}`)}}return p[M]}Pt(l,M=>{M&&Object.keys(p).forEach(S=>delete p[S])});const h=C(()=>Ge.saves.reduce((M,S)=>(M[S]=y(S),M),{}));function w(M){let S;switch(L.id===M?S=va(L[Ve]):S=JSON.stringify(h.value[M]),Se.exportEncoding){default:console.warn(`Unknown save encoding: ${Se.exportEncoding}. Defaulting to lz`);case"lz":S=Zt.compressToUTF16(S);break;case"base64":S=btoa(unescape(encodeURIComponent(S)));break;case"plain":break}const T=document.createElement("textarea");T.value=S,document.body.appendChild(T),T.select(),T.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(T)}function g(M){L.id===M&&Bt();const S={...h.value[M],id:Hl()};Bt(S),Ge.saves.push(S.id)}function _(M){Ge.saves=Ge.saves.filter(S=>S!==M),localStorage.removeItem(M),p[M]=void 0}function A(M){h.value[L.id].time=L.time,Bt(),p[L.id]=void 0,ul(h.value[M]),p[M]=void 0}function x(M){if(u.value=M,dl(()=>{u.value=null}),M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=Zt.decompressFromUTF16(M);else{console.warn("Unable to determine preset encoding",M);return}const S=JSON.parse(M);S.id=Hl(),Bt(S),Ge.saves.push(S.id),A(S.id)}function te(M,S){const T=h.value[M];T&&(T.name=S,L.id===M?(L.name=S,Bt()):(Bt(T),p[M]=void 0))}return(M,S)=>(b(),z(gt,{modelValue:l.value,"onUpdate:modelValue":S[4]||(S[4]=T=>l.value=T),ref_key:"modal",ref:a},{header:H(()=>[xu]),body:H(({shown:T})=>[T?(b(),z(r(ti),{key:0,list:r(Ge).saves,handle:".handle",itemKey:ke=>ke},{item:H(({element:ke})=>[o(Bu,{save:r(h)[ke],onOpen:Fe=>A(ke),onExport:Fe=>w(ke),onEditName:Fe=>te(ke,Fe),onDuplicate:Fe=>g(ke),onDelete:Fe=>_(ke)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):P("",!0)]),footer:H(()=>[f("div",Du,[o(Ua,{modelValue:s.value,"onUpdate:modelValue":S[0]||(S[0]=T=>s.value=T),title:"Import Save",placeholder:"Paste your save here!",class:Qe({importingFailed:i.value})},null,8,["modelValue","class"]),f("div",Pu,[Fu,f("div",Tu,[f("button",{class:"button",onClick:S[1]||(S[1]=T=>A(r(yl)().id))},"New Game"),Object.keys(r(m)).length>0?(b(),z(En,{key:0,options:r(m),modelValue:u.value,"onUpdate:modelValue":S[2]||(S[2]=T=>x(T)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):P("",!0)])]),f("div",Ru,[Ou,f("button",{class:"button modal-default-button",onClick:S[3]||(S[3]=T=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var $a=_e(Uu,[["__scopeId","data-v-3b9991aa"]]);const At=e=>(zt("data-v-8495e562"),e=e(),Kt(),e),$u=["src","alt"],qu={key:1,class:"title"},Vu=At(()=>f("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),Gu={class:"discord"},Lu={class:"discord-links"},Qu={key:0},Hu=["href"],ju=At(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Wu=At(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),zu={href:"https://forums.moddingtree.com/",target:"_blank"},Ku=At(()=>f("span",{class:"material-icons"},"forum",-1)),Ju=At(()=>f("span",{class:"material-icons"},"info",-1)),Xu=At(()=>f("span",{class:"material-icons"},"library_books",-1)),Yu=At(()=>f("span",{class:"material-icons"},"settings",-1)),Zu=At(()=>f("span",{class:"material-icons"},"library_books",-1)),ed=At(()=>f("span",{class:"material-icons"},"settings",-1)),td=At(()=>f("span",{class:"material-icons"},"info",-1)),ld={href:"https://forums.moddingtree.com/",target:"_blank"},nd=At(()=>f("span",{class:"material-icons"},"forum",-1)),ad={class:"discord"},id={class:"discord-links"},od={key:0},sd=["href"],rd=At(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),ud=At(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),dd=X({__name:"Nav",setup(e){const t=O(null),l=O(null),a=O(null),i=O(null),{useHeader:s,banner:u,title:d,discordName:m,discordLink:p,versionNumber:y}=Se;function h(){window.open(p,"mywindow")}return(w,g)=>(b(),N(E,null,[r(s)?(b(),N("div",cl({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 yo();const{globalBus:e}=await Wl(()=>Promise.resolve().then(function(){return eo}),void 0),{startGameLoop:t}=await Wl(()=>import("./gameLoop.a8ab48f2.js"),["assets/gameLoop.a8ab48f2.js","assets/@fontsource.c175eac8.css","assets/vue.92681fcb.js","assets/lz-string.731cedc5.js","assets/@vue.4ce677c2.js","assets/nanoevents.1080beb7.js","assets/is-plain-object.906d88e8.js","assets/vue-next-select.a2bfab1d.js","assets/vue-next-select.9e6f4164.css","assets/vue-toastification.6f567382.js","assets/vue-toastification.4b5f8ac8.css","assets/vuedraggable.7949458c.js","assets/sortablejs.29100d8a.js","assets/vue-textarea-autosize.35804eaf.js","assets/workbox-window.8d14e8b7.js"]),l=window.vue=Xa(jd);e.emit("setupVue",l),l.mount("#app"),dl(()=>{const a=ta(),{updateServiceWorker:i}=zd({onNeedRefresh(){a.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(){i()}})},onOfflineReady(){a.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{n as D,Wl as _,Le as a,Se as b,rr as c,$e as g,Sn as l,L as p,Ge as s};
|