Advent-Incremental/assets/index.f683dcb4.js

20 lines
179 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.92681fcb.js";import{Z as N,l as Fe,aa as Q,t as O,ay as An,ar as Kt,aE as y,a0 as M,aK as _t,a1 as f,O as B,aG as yn,A as je,_ as G,a8 as u,b6 as L,b8 as In,bs as Sl,C as r,aq as Wt,bu as on,bb as En,T as ki,a7 as p,u as Bn,j as Ci,bv as ul,q as dn,b1 as yt,G as Ie,aC as Ml,w as rt,b2 as at,ao as Ni,I as Te,J as W,$ as P,aH as Mt,aF as At,z as bt,aN as be,al as kn,aL as Rt,H as Si,aJ as Al,bn as Mi,br as Ai,be as Ii}from"./@vue.4ce677c2.js";import{c as Il}from"./nanoevents.1080beb7.js";import{L as Tt}from"./lz-string.731cedc5.js";import{i as Ei}from"./is-plain-object.906d88e8.js";import{Y as Bi}from"./vue-next-select.a2bfab1d.js";import{s as xi,u as El}from"./vue-toastification.6f567382.js";import{D as Pi}from"./vuedraggable.7949458c.js";import{p as Fi}from"./vue-textarea-autosize.35804eaf.js";import{v as Ti,n as Di}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const $i=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))l(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&l(o)}).observe(document,{childList:!0,subtree:!0});function n(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerpolicy&&(s.referrerPolicy=a.referrerpolicy),a.crossorigin==="use-credentials"?s.credentials="include":a.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function l(a){if(a.ep)return;a.ep=!0;const s=n(a);fetch(a.href,s)}};$i();const Ri="modulepreload",cl={},Oi="./",Cn=function(t,n){return!n||n.length===0?t():Promise.all(n.map(l=>{if(l=`${Oi}${l}`,l in cl)return;cl[l]=!0;const a=l.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${s}`))return;const o=document.createElement("link");if(o.rel=a?"stylesheet":Ri,a||(o.as="script",o.crossOrigin=""),o.href=l,document.head.appendChild(o),a)return new Promise((c,m)=>{o.addEventListener("load",c),o.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>t())},Ui="./projInfo-schema.json",qi="Advent Incremental",Vi="An incremental game you play a day at a time, leading up to Christmas!",Li="advent-incremental",Gi="thepaperpilot and friends",Hi="",Qi="",zi="0.3",ji="Initial Commit",Ki=!0,Wi=!1,Ji=2,Xi=!0,Yi=null,Zi="",ea=["main"],ta=3600,na=0,la=!0,ia="base64";var re={$schema:Ui,title:qi,description:Vi,id:Li,author:Gi,discordName:Hi,discordLink:Qi,versionNumber:zi,versionTitle:ji,allowGoBack:Ki,defaultShowSmall:Wi,defaultDecimalsShown:Ji,useHeader:Xi,banner:Yi,logo:Zi,initialTabs:ea,maxTickLength:ta,offlineLimit:na,enablePausing:la,exportEncoding:ia};const Un=17,aa=9e15,sa=Math.log10(9e15),oa=1/9e15,ra=308,ua=-324,dl=5,ca=function(){const e=[];for(let n=ua+1;n<=ra;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),Ht=[2,Math.E,3,4,5,6,7,8,9,10],da=[[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
Stack: ${ht}
Trying to pop ${n.id}`;return ht.pop(),$(n,"color"),$(n,"display"),$(n,"name"),ze(n,"name",n.id),$(n,"minWidth"),ze(n,"minWidth",600),$(n,"minimizable"),ze(n,"minimizable",!0),n})}function Vl(e,t){if(console.info("Adding layer",e.id),Xe[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,Xe[e.id]);return}ze(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),Xe[e.id]=e,Ee.emit("addLayer",e,t.layers[e.id])}function La(e){return Xe[e]}function Ll(e){console.info("Removing layer",e.id),Ee.emit("removeLayer",e),Xe[e.id]=void 0}function Ga(e){Ll(e),Vl(e,V)}function Ha(e){const t=O(!1);return{openModal:()=>t.value=!0,modal:x(()=>u(ct,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>u("h2",null,[r(e.name)]),body:r(e.display)}))}}Ee.on("update",function(t){Object.values(Xe).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(Xe).forEach(n=>{n==null||n.emit("update",t)}),Object.values(Xe).forEach(n=>{n==null||n.emit("postUpdate",t)})});var Qa=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:zn,UnregisterNodeInjectionKey:jn,NodesInjectionKey:Kn,BoundsInjectionKey:Wn,layers:Xe,persistentRefs:Yt,addingLayers:ht,createLayer:It,addLayer:Vl,getLayer:La,removeLayer:Ll,reloadLayer:Ga,setupLayerModal:Ha},Symbol.toStringTag,{value:"Module"}));const Jn=Symbol("PersistentState"),$t=Symbol("DefaultValue"),Sn=Symbol("StackTrace"),Gl=Symbol("Deleted"),un=Symbol("NonPersistent"),sn=Symbol("SaveDataPath");function za(){var e;return((e=new Error().stack)==null?void 0:e.split(`
`).slice(3,5).map(t=>t.trim()).join(`
`))||""}function _e(e){const t=Fe(e)?e:O(e);t[Jn]=t,t[$t]=Fe(e)?e.value:e,t[Sn]=za(),t[Gl]=!1;const n=N({get(){return t.value},set(l){t.value=l}});return n[$t]=t[$t],t[un]=n,t[sn]=void 0,ht.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
Created at:
`+t[Sn]):Yt[ht[ht.length-1]].add(t),t}function ja(e){return e&&typeof e=="object"&&Jn in e}function K(e){return e[un]}Ee.on("addLayer",(e,t)=>{const n=[],l=(a,s=[])=>{let o=!1;return Object.keys(a).forEach(c=>{let m=a[c];if(m&&typeof m=="object")if(ke in m&&(m=m[ke]),ja(m)){if(o=!0,m[Gl]){console.warn("Deleted persistent ref present in returned object. Ignoring...",m,`
Created at:
`+m[Sn]);return}Yt[e.id].delete(m);const d=[e.id,...s,c];m[sn]!=null&&JSON.stringify(d)!==JSON.stringify(m[sn])&&console.error(`Persistent ref is being saved to \`${d.join(".")}\` when it's already present at \`${m[sn].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,m),m[sn]=d;const v=s.reduce((_,g)=>(g in _||(_[g]={}),_[g]),t),b=v[c];v[c]=m[Jn],Ci(v)?b!=null?v[c]=b:v[c]=m[$t]:b!=null?v[c].value=b:v[c].value=m[$t]}else!(m instanceof i)&&!Fe(m)&&!n.includes(m)&&(typeof m.type=="symbol"&&n.push(m),l(m,[...s,c])&&(ul(m)&&!ul(a)?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.",ke in a?a[ke]:a,c):o=!0))}),o};l(e[ke]),Yt[e.id].forEach(a=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,a,`
Created at:
`+a[Sn])}),Yt[e.id].clear()});const ke=Symbol("ProxyState"),Xt=Symbol("ProxyPath");function lt(e,t={}){const n=t;let l=!1;function a(){return l||(Object.assign(n,e(n)),l=!0),n}return new Proxy(n,{get(s,o){if(o===ke)return a();const c=a()[o];return c&&typeof c=="object"&&un in c?c[un]:c},set(s,o,c){return a()[o]=c,!0},has(s,o){return o===ke?!0:Reflect.has(a(),o)},ownKeys(){return Reflect.ownKeys(a())},getOwnPropertyDescriptor(s,o){return l||(Object.assign(n,e(n)),l=!0),Object.getOwnPropertyDescriptor(s,o)}})}var Me=window.state=Bn({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Hl=dn({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function Ql(e){return JSON.stringify(e,(t,n)=>r(n))}const zl={get(e,t){var l;if(t===ke||t===Xt)return e[t];const n=e[ke][t];if(t!=="value"&&(Ei(n)||Array.isArray(n))){if(n!==((l=e[t])==null?void 0:l[ke])){const a=[...e[Xt],t];e[t]=new Proxy({[ke]:n,[Xt]:a},zl)}return e[t]}return n},set(e,t,n,l){if(!Me.hasNaN&&(typeof n=="number"&&isNaN(n)||n instanceof i&&(isNaN(n.sign)||isNaN(n.layer)||isNaN(n.mag)))){const a=e[ke][t];if(!(typeof a=="number"&&isNaN(a)||a instanceof i&&(isNaN(a.sign)||isNaN(a.layer)||isNaN(a.mag))))throw Hl.autosave=!1,Me.hasNaN=!0,Me.NaNPath=[...e[Xt],t],Me.NaNReceiver=l,console.error("Attempted to set NaN value",[...e[Xt],t],e[ke]),"Attempted to set NaN value. See above for details"}return e[ke][t]=n,!0},ownKeys(e){return Reflect.ownKeys(e[ke])},has(e,t){return Reflect.has(e[ke],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[ke],t)}};var V=window.player=new Proxy({[ke]:Hl,[Xt]:["player"]},zl);function jl(e={}){return Object.assign({id:`${re.id}-0`,name:"Default Save",tabs:re.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:re.id,modVersion:re.versionNumber,layers:{}},e)}function gt(e){const t=Tt.compressToUTF16(Ql(e!=null?e:V[ke]));return localStorage.setItem((e!=null?e:V[ke]).id,t),t}async function Ka(){Ja();try{let e=localStorage.getItem(Ce.active);if(e==null){await zt(Zt());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Tt.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==re.id){await zt(Zt());return}t.id=Ce.active,await zt(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
`,e),await zt(Zt())}}function Zt(){const e=_n(),t=jl({id:e});return gt(t),Ce.saves.push(e),t}function _n(){let e,t=0;do e=`${re.id}-${t++}`;while(localStorage.getItem(e));return e}async function zt(e){console.info("Loading save",e);const{layers:t,removeLayer:n,addLayer:l}=await Cn(()=>Promise.resolve().then(function(){return Qa}),void 0),{fixOldSave:a,getInitialLayers:s}=await Cn(()=>Promise.resolve().then(function(){return Bo}),void 0);for(const o in t){const c=t[o];c&&n(c)}s(e).forEach(o=>l(o,e)),e=jl(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,re.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==re.versionNumber&&a(e.modVersion,e),Object.assign(V,e),Ce.active=V.id,Ee.emit("onLoad")}setInterval(()=>{V.autosave&&gt()},1e3);window.onbeforeunload=()=>{V.autosave&&gt()};window.save=gt;const Wa=window.hardReset=async()=>{await zt(Zt())},cn=dn({active:"",saves:[],showTPS:!0,theme:Qn.Nordic,unthrottled:!1});yt(cn,e=>{const t=Tt.compressToUTF16(JSON.stringify(e));localStorage.setItem(re.id,t)},{deep:!0});var Ce=window.settings=cn;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Qn.Nordic};Ee.emit("loadSettings",e),Object.assign(cn,e),Wa()};function Ja(){try{let e=localStorage.getItem(re.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Tt.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(cn,t)}Ee.emit("loadSettings",cn)}catch{}}const Kl=dn([]);function Xa(e){Kl.push(e)}const Wl=dn([]);function Ya(e){Wl.push(e)}const Za=dn([]),es={class:"table"},jt=Q({__name:"Column",setup(e){const t=N(()=>mn[Ce.theme].mergeAdjacent);return(n,l)=>(y(),M("div",es,[f("div",{class:Ie(["col",{mergeAdjacent:r(t)}])},[_t(n.$slots,"default")],2)]))}}),ts={class:"table"},Jl=Q({__name:"Row",setup(e){const t=N(()=>mn[Ce.theme].mergeAdjacent);return(n,l)=>(y(),M("div",ts,[f("div",{class:Ie(["row",{mergeAdjacent:r(t)}])},[_t(n.$slots,"default")],2)]))}});function Xn(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Ni(e)}function ie(e,t="span"){return typeof e=="function"?Q({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),Q({template:e})):Q({render:()=>({})}):e}function he(e){if(St(e))return typeof e=="function"?e():ie(e);const t=e[Ut];return u(t,e[qt](),null)}function xe(...e){let t;return u(Jl,null,Xn(t=e.map(he))?t:{default:()=>[t]})}function Xl(...e){let t;return u(jt,null,Xn(t=e.map(he))?t:{default:()=>[t]})}function vt(e){if(St(e))return typeof e=="function"?e():typeof e=="string"?u(B,null,[e]):u(e,null,null);const t=e[Ut];return u(t,e[qt](),null)}function ns(...e){let t;return u(jt,null,Xn(t=e.map(vt))?t:{default:()=>[t]})}function St(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 Yl(e,t,n){const l=O(null),a=O(void 0);function s(m){l.value||(l.value=setInterval(c,250)),a.value=m,n&&(n.value=!0)}function o(){l.value&&(clearInterval(l.value),l.value=null),n&&(n.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(a.value)}return Ml(o),{start:s,stop:o,handleHolding:c}}function ls(e,t){const n=N(()=>e.filter(l=>r(l.visibility)===Ue.Visible&&t(l)));return{firstFeature:N(()=>n.value[0]),collapsedContent:x(()=>Xl(...n.value.slice(1))),hasCollapsedContent:N(()=>n.value.length>1)}}function Mn(e,t="div"){const n=rt();return at(()=>{n.value=ie(qe(e),t)}),n}function Ot(e,t="div"){const n=rt(null);return at(()=>{const l=qe(e);n.value=l==null?null:ie(l,t)}),n}function is(e){return N(()=>qe(e))}function qe(e){return r(r(e))}function R(...e){return e.includes(Object)||e.push(Object),e}const fe=Q({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(y(),M("div",{style:Te({width:e.width,height:e.height})},null,4))}});const as={},ss={class:"notif"};function os(
<br/>
<br/>
Cost: 50 ${n.displayName}<br/>${De(1e11)} ${U.coal.displayName}`}})),ce=He(()=>({resource:K(n),cost(){return i.pow(1.15,this.amount.value).times(10)},display:{title:"Mining Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:x(()=>u(B,null,[p("Mine 2.5x faster. Increase ore mining amount by")," ",Ae(ce.amount.value),p(" ore per operation")]))},visibility:()=>q(i.gte(ce.amount.value,1)||i.div(s.value,c.value).plus(l.value).gte(10)),style:{width:"200px"}})),te=He(()=>({resource:K(n),cost(){return i.pow(1.15,i.times(this.amount.value,10)).times(10)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:x(()=>u(B,null,[p("Automatically smelts")," ",Ae(i.times(te.amount.value,10)),p(" ore per second")]))},visibility:()=>q(i.gte(te.amount.value,1)||i.gte(ce.amount.value,4)||i.gte(s.value,50)),style:{width:"200px"}})),X=_e(!0),Je=He(()=>({resource:U.coal,cost(){return i.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:x(()=>u(B,null,[p("Gain "),Ae(i.times(we.value,100)),p("% more metal per ore")]))},visibility:()=>q(i.gte(Je.amount.value,1)||mt.bought.value),style:{width:"200px"}})),we=N(()=>i.times(Je.amount.value,.25));Ee.on("update",pe=>{A.value=i.times(pe,se.value).plus(A.value);const Le=A.value.div(C).trunc();A.value=A.value.minus(Le.times(C)),a.value=i.add(a.value,i.times(Le,S.value)),X.value&&g(i.min(b.value,i.times(te.amount.value,10).times(pe)))});const[tt,Oe]=Tn(()=>[{title:"Automatic Smelting",modifier:m,base:0,visible(){return i.gt(te.amount.value,0)}},{title:"Metal per Ore",modifier:o,base:.1},{title:"Ore per Mining Operation",modifier:w,base:1},{title:"Mining Speed",modifier:I,base:1}]),Ne=O(!1),Ye=x(()=>u(ct,{modelValue:Ne.value,"onUpdate:modelValue":pe=>Ne.value=pe},{header:()=>u("h2",null,[e,p(" Modifiers")]),body:tt})),{total:Se,trackerDisplay:pt}=hn({resource:n,goal:25e3,name:e,day:wl,color:t,modal:{show:Ne,display:Ye}});return{name:e,day:wl,color:t,ore:a,bestOre:s,oreProgress:A,metal:n,bestMetal:l,totalMetal:Se,simplePickaxe:dt,doublePickaxe:Re,crucible:ve,coalDrill:We,industrialFurnace:mt,oreDrill:ce,industrialCrucible:te,autoSmeltEnabled:X,hotterForge:Je,generalTabCollapsed:Oe,minWidth:700,display:x(()=>u(B,null,[he(pt),u(fe,null,null),u(Nt,{resource:n,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:x(()=>u(B,null,[X.value?`+${Dl([[$e.value,"smelting speed"],[Ke.value,"ore gain"],[i.div(U.computedCoalGain.value,v),"coal gain"]],"/s")}`:void 0]))},null),u(fe,null,null),he(_),i.gte(te.amount.value,1)?u("div",{style:{width:"150px"}},[u(Ct,{title:"Auto Smelt",modelValue:X.value,"onUpdate:modelValue":pe=>X.value=pe},null)]):void 0,u(fe,null,null),u(Nt,{resource:a,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:x(()=>u(B,null,[$l(et.value)]))},null),u(fe,null,null),u("div",null,[p("Currently mining "),De(S.value),p(" ore every")," ",De(i.div(C,se.value)),p(" seconds")]),he(T),u(fe,null,null),xe(dt,Re,ve,We,mt),xe(ce,te,Je)]))}}),Mo="coal",kl=3,U=It(Mo,function(){const e="Coal",t="#151716",n="#B2BeB5",l="var(--foreground)",a=ut(0,"coal"),s=ut(0,"ash"),o=_e(0),c=N(()=>i.times(o.value,1e3)),m=N(()=>i.times(o.value,.1)),d=N(()=>i.times(o.value,50)),v=He(()=>({resource:ee.logs,cost(){let E=i.times(T.amount.value,r(T.cost)).plus(this.amount.value);return i.gte(E,100)&&(E=i.pow(E,2).div(100)),i.gte(E,1e4)&&(E=i.pow(E,2).div(1e4)),E=i.pow(.95,de.books.smallFireBook.amount.value).times(E),E.pow(1.5).times(1e4)},display:x(()=>u(B,null,[u("h3",null,[p("Small Fire")]),u("br",null,null),p("Burn 1000 logs for 0.1 coal and 50 ash"),u("br",null,null),u("br",null,null),p("Currently:"),u("br",null,null),p("-"),ne(c.value),p(" logs/sec"),u("br",null,null),p("+"),ne(m.value),p(" coal/sec"),u("br",null,null),p("+"),ne(d.value),p(" ash/sec"),u("br",null,null),u("br",null,null),p("Cost: "),Z(r(v.cost)),p(" "),v.resource.displayName])),onPurcha
margin: 10px 0;"/>${ge}`:T,n.value=!0},onOpenLayer(){if($e.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(V.tabs.includes(I!=null?I:"trees")){const Ve=V.tabs.lastIndexOf(I!=null?I:"trees");V.tabs.splice(Ve,1)}else V.tabs.push(I!=null?I:"trees"),z.minimized.value=!0;else V.tabs.splice(1,1/0,I!=null?I:"trees")},onUnlockLayer(){A.value=!0,setTimeout(()=>{var Ve,Ke;l.value=-1,a.value=r((Ke=(Ve=Xe[I!=null?I:"trees"])==null?void 0:Ve.name)!=null?Ke:""),s.value=T,V.devSpeed=null,n.value=!0},1e3)}}}}})}const c=[o(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:ii,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!"})),o(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:ai,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!"})),o(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:si,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!"})),o(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:oi,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!"})),o(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:ri,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!"})),o(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:ui,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!"})),o(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:ci,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 drill
${T}
${C}`)}}return d[A]}yt(n,A=>{A&&Object.keys(d).forEach(C=>delete d[C])});const b=N(()=>Ce.saves.reduce((A,C)=>(A[C]=v(C),A),{}));function _(A){let C;switch(V.id===A?C=Ql(V[ke]):C=JSON.stringify(b.value[A]),re.exportEncoding){default:console.warn(`Unknown save encoding: ${re.exportEncoding}. Defaulting to lz`);case"lz":C=Tt.compressToUTF16(C);break;case"base64":C=btoa(unescape(encodeURIComponent(C)));break;case"plain":break}const T=document.createElement("textarea");T.value=C,document.body.appendChild(T),T.select(),T.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(T)}function g(A){V.id===A&&gt();const C={...b.value[A],id:_n()};gt(C),Ce.saves.push(C.id)}function w(A){Ce.saves=Ce.saves.filter(C=>C!==A),localStorage.removeItem(A),d[A]=void 0}function S(A){b.value[V.id].time=V.time,gt(),d[V.id]=void 0,zt(b.value[A]),d[A]=void 0}function I(A){if(o.value=A,Kt(()=>{o.value=null}),A[0]!=="{")if(A[0]==="e")A=decodeURIComponent(escape(atob(A)));else if(A[0]==="\u1BE1")A=Tt.decompressFromUTF16(A);else{console.warn("Unable to determine preset encoding",A);return}const C=JSON.parse(A);C.id=_n(),gt(C),Ce.saves.push(C.id),S(C.id)}function se(A,C){const T=b.value[A];T&&(T.name=C,V.id===A?(V.name=C,gt()):(gt(T),d[A]=void 0))}return(A,C)=>(y(),G(ct,{modelValue:n.value,"onUpdate:modelValue":C[4]||(C[4]=T=>n.value=T),ref_key:"modal",ref:l},{header:L(()=>[Jr]),body:L(({shown:T})=>[T?(y(),G(r(Pi),{key:0,list:r(Ce).saves,handle:".handle",itemKey:ge=>ge},{item:L(({element:ge})=>[u(Wr,{save:r(b)[ge],onOpen:$e=>S(ge),onExport:$e=>_(ge),onEditName:$e=>se(ge,$e),onDuplicate:$e=>g(ge),onDelete:$e=>w(ge)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):P("",!0)]),footer:L(()=>[f("div",Xr,[u(pi,{modelValue:s.value,"onUpdate:modelValue":C[0]||(C[0]=T=>s.value=T),title:"Import Save",placeholder:"Paste your save here!",class:Ie({importingFailed:a.value})},null,8,["modelValue","class"]),f("div",Yr,[Zr,f("div",eu,[f("button",{class:"button",onClick:C[1]||(C[1]=T=>S(r(Zt)().id))},"New Game"),Object.keys(r(m)).length>0?(y(),G(el,{key:0,options:r(m),modelValue:o.value,"onUpdate:modelValue":C[2]||(C[2]=T=>I(T)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):P("",!0)])]),f("div",tu,[nu,f("button",{class:"button modal-default-button",onClick:C[3]||(C[3]=T=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var fi=ue(lu,[["__scopeId","data-v-3b9991aa"]]);const st=e=>(Mt("data-v-4a3f8425"),e=e(),At(),e),iu=["src","alt"],au={key:1,class:"title"},su=st(()=>f("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),ou={class:"discord"},ru={class:"discord-links"},uu={key:0},cu=["href"],du=st(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),mu=st(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),pu={href:"https://forums.moddingtree.com/",target:"_blank"},fu=st(()=>f("span",{class:"material-icons"},"forum",-1)),hu=st(()=>f("span",{class:"material-icons"},"info",-1)),gu=st(()=>f("span",{class:"material-icons"},"library_books",-1)),vu=st(()=>f("span",{class:"material-icons"},"settings",-1)),yu=st(()=>f("span",{class:"material-icons"},"library_books",-1)),bu=st(()=>f("span",{class:"material-icons"},"settings",-1)),_u=st(()=>f("span",{class:"material-icons"},"info",-1)),wu={href:"https://forums.moddingtree.com/",target:"_blank"},ku=st(()=>f("span",{class:"material-icons"},"forum",-1)),Cu={class:"discord"},Nu={class:"discord-links"},Su={key:0},Mu=["href"],Au=st(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Iu=st(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Eu=Q({__name:"Nav",setup(e){const t=O(null),n=O(null),l=O(null),a=O(null),{useHeader:s,banner:o,title:c,discordName:m,discordLink:d,versionNumber:v}=re;function b(){window.open(d,"mywindow")}return(_,g)=>(y(),M(B,null,[r(s)?(y(),M("div",Wt({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 Ka();const{globalBus:e}=await Cn(()=>Promise.resolve().then(function(){return xa}),void 0),{startGameLoop:t}=await Cn(()=>import("./gameLoop.14d3116b.js"),["assets/gameLoop.14d3116b.js","assets/@fontsource.f66d05e7.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"]),n=window.vue=Ii(dc);e.emit("setupVue",n),n.mount("#app"),Kt(()=>{const l=El(),{updateServiceWorker:a}=pc({onNeedRefresh(){l.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(){a()}})},onOfflineReady(){l.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(s.update,60*60*1e3)}})}),t()});export{i as D,Cn as _,Me as a,re as b,Bo as c,Ee as g,V as p,Ce as s};