Advent-Incremental/assets/index.ae9651e9.js

20 lines
272 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.92681fcb.js";import{Z as v,l as bt,aa as Ce,t as H,ay as ga,ar as Rl,aE as C,a0 as I,aK as Xt,a1 as h,O as M,aG as sa,A as Nt,_ as be,a8 as n,b6 as ge,b8 as ya,bs as ci,C as u,aq as Ol,bu as Xl,bb as ha,T as nn,a7 as s,u as ba,j as on,bv as Ia,q as la,b1 as jt,G as ht,aC as pi,w as Yt,b2 as Vt,ao as sn,I as wt,aN as pt,$ as G,J as Ie,aH as gl,aF as yl,z as ol,al as da,aL as Ml,H as rn,aJ as mi,bn as un,br as dn,be as cn}from"./@vue.4ce677c2.js";import{c as vi}from"./nanoevents.1080beb7.js";import{L as Cl}from"./lz-string.731cedc5.js";import{i as pn}from"./is-plain-object.906d88e8.js";import{Y as mn}from"./vue-next-select.a2bfab1d.js";import{s as vn,u as fi}from"./vue-toastification.6f567382.js";import{D as fn}from"./vuedraggable.7949458c.js";import{p as gn}from"./vue-textarea-autosize.35804eaf.js";import{v as yn,n as hn}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const bn=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const d of r.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function l(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerpolicy&&(r.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?r.credentials="include":o.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(o){if(o.ep)return;o.ep=!0;const r=l(o);fetch(o.href,r)}};bn();const wn="modulepreload",za={},An="./",ca=function(t,l){return!l||l.length===0?t():Promise.all(l.map(i=>{if(i=`${An}${i}`,i in za)return;za[i]=!0;const o=i.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${r}`))return;const d=document.createElement("link");if(d.rel=o?"stylesheet":wn,o||(d.as="script",d.crossOrigin=""),d.href=i,document.head.appendChild(d),o)return new Promise((c,m)=>{d.addEventListener("load",c),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},kn="./projInfo-schema.json",Cn="Advent Incremental",En="An incremental game you play a day at a time, leading up to Christmas!",_n="advent-incremental",Sn="thepaperpilot and friends",Mn="",Bn="",xn="0.5",Nn="Initial Commit",Dn=!0,In=!1,Tn=2,Pn=!0,Fn=null,Un="",Rn=["main"],On=3600,qn=0,Ln=!0,Gn="base64";var je={$schema:kn,title:Cn,description:En,id:_n,author:Sn,discordName:Mn,discordLink:Bn,versionNumber:xn,versionTitle:Nn,allowGoBack:Dn,defaultShowSmall:In,defaultDecimalsShown:Tn,useHeader:Pn,banner:Fn,logo:Un,initialTabs:Rn,maxTickLength:On,offlineLimit:qn,enablePausing:Ln,exportEncoding:Gn};const _a=17,Qn=9e15,$n=Math.log10(9e15),Hn=1/9e15,Vn=308,jn=-324,Ka=5,Jn=function(){const e=[];for(let l=jn+1;l<=Vn;l++)e.push(Number("1e"+l));const t=323;return function(l){return e[l+t]}}(),Pl=[2,Math.E,3,4,5,6,7,8,9,10],Wn=[[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.167090535
Stack: ${ll}
Trying to pop ${l.id}`;return ll.pop(),z(l,"color"),z(l,"display"),z(l,"name"),xt(l,"name",l.id),z(l,"minWidth"),xt(l,"minWidth",600),z(l,"minimizable"),xt(l,"minimizable",!0),l})}function Mi(e,t){if(console.info("Adding layer",e.id),Bt[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,Bt[e.id]);return}xt(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),Bt[e.id]=e,et.emit("addLayer",e,t.layers[e.id])}function So(e){return Bt[e]}function Bi(e){console.info("Removing layer",e.id),et.emit("removeLayer",e),Bt[e.id]=void 0}function Mo(e){Bi(e),Mi(e,me)}function Bo(e){const t=H(!1);return{openModal:()=>t.value=!0,modal:S(()=>n(Ct,{modelValue:t.value,"onUpdate:modelValue":l=>t.value=l},{header:()=>n("h2",null,[u(e.name)]),body:u(e.display)}))}}et.on("update",function(t){Object.values(Bt).forEach(l=>{l==null||l.emit("preUpdate",t)}),Object.values(Bt).forEach(l=>{l==null||l.emit("update",t)}),Object.values(Bt).forEach(l=>{l==null||l.emit("postUpdate",t)})});var xo=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Ua,UnregisterNodeInjectionKey:Ra,NodesInjectionKey:Oa,BoundsInjectionKey:qa,layers:Bt,persistentRefs:Ll,addingLayers:ll,createLayer:$t,addLayer:Mi,getLayer:So,removeLayer:Bi,reloadLayer:Mo,setupLayerModal:Bo},Symbol.toStringTag,{value:"Module"}));const La=Symbol("PersistentState"),_l=Symbol("DefaultValue"),va=Symbol("StackTrace"),xi=Symbol("Deleted"),Zl=Symbol("NonPersistent"),Kl=Symbol("SaveDataPath");function No(){var e;return((e=new Error().stack)==null?void 0:e.split(`
`).slice(3,5).map(t=>t.trim()).join(`
`))||""}function Me(e){const t=bt(e)?e:H(e);t[La]=t,t[_l]=bt(e)?e.value:e,t[va]=No(),t[xi]=!1;const l=v({get(){return t.value},set(i){t.value=i}});return l[_l]=t[_l],t[Zl]=l,t[Kl]=void 0,ll.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
Created at:
`+t[va]):Ll[ll[ll.length-1]].add(t),t}function Do(e){return e&&typeof e=="object"&&La in e}function R(e){return e[Zl]}et.on("addLayer",(e,t)=>{const l=[],i=(o,r=[])=>{let d=!1;return Object.keys(o).forEach(c=>{let m=o[c];if(m&&typeof m=="object")if(mt in m&&(m=m[mt]),Do(m)){if(d=!0,m[xi]){console.warn("Deleted persistent ref present in returned object. Ignoring...",m,`
Created at:
`+m[va]);return}Ll[e.id].delete(m);const p=[e.id,...r,c];m[Kl]!=null&&JSON.stringify(p)!==JSON.stringify(m[Kl])&&console.error(`Persistent ref is being saved to \`${p.join(".")}\` when it's already present at \`${m[Kl].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,m),m[Kl]=p;const w=r.reduce((A,f)=>(f in A||(A[f]={}),A[f]),t),b=w[c];w[c]=m[La],on(w)?b!=null?w[c]=b:w[c]=m[_l]:b!=null?w[c].value=b:w[c].value=m[_l]}else!(m instanceof a)&&!bt(m)&&!l.includes(m)&&(typeof m.type=="symbol"&&l.push(m),i(m,[...r,c])&&(Ia(m)&&!Ia(o)?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.",mt in o?o[mt]:o,c):d=!0))}),d};i(e[mt]),Ll[e.id].forEach(o=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,o,`
Created at:
`+o[va])}),Ll[e.id].clear()});const mt=Symbol("ProxyState"),ql=Symbol("ProxyPath");function Ht(e,t={}){const l=t;let i=!1;function o(){return i||(Object.assign(l,e(l)),i=!0),l}return new Proxy(l,{get(r,d){if(d===mt)return o();const c=o()[d];return c&&typeof c=="object"&&Zl in c?c[Zl]:c},set(r,d,c){return o()[d]=c,!0},has(r,d){return d===mt?!0:Reflect.has(o(),d)},ownKeys(){return Reflect.ownKeys(o())},getOwnPropertyDescriptor(r,d){return i||(Object.assign(l,e(l)),i=!0),Object.getOwnPropertyDescriptor(r,d)}})}var ft=window.state=ba({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Ni=la({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function Di(e){return JSON.stringify(e,(t,l)=>u(l))}const Ii={get(e,t){var i;if(t===mt||t===ql)return e[t];const l=e[mt][t];if(t!=="value"&&(pn(l)||Array.isArray(l))){if(l!==((i=e[t])==null?void 0:i[mt])){const o=[...e[ql],t];e[t]=new Proxy({[mt]:l,[ql]:o},Ii)}return e[t]}return l},set(e,t,l,i){if(!ft.hasNaN&&(typeof l=="number"&&isNaN(l)||l instanceof a&&(isNaN(l.sign)||isNaN(l.layer)||isNaN(l.mag)))){const o=e[mt][t];if(!(typeof o=="number"&&isNaN(o)||o instanceof a&&(isNaN(o.sign)||isNaN(o.layer)||isNaN(o.mag))))throw Ni.autosave=!1,ft.hasNaN=!0,ft.NaNPath=[...e[ql],t],ft.NaNReceiver=i,console.error("Attempted to set NaN value",[...e[ql],t],e[mt]),"Attempted to set NaN value. See above for details"}return e[mt][t]=l,!0},ownKeys(e){return Reflect.ownKeys(e[mt])},has(e,t){return Reflect.has(e[mt],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[mt],t)}};var me=window.player=new Proxy({[mt]:Ni,[ql]:["player"]},Ii);function Ti(e={}){return Object.assign({id:`${je.id}-0`,name:"Default Save",tabs:je.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:je.id,modVersion:je.versionNumber,layers:{}},e)}function al(e){const t=Cl.compressToUTF16(Di(e!=null?e:me[mt]));return localStorage.setItem((e!=null?e:me[mt]).id,t),t}async function Io(){Po();try{let e=localStorage.getItem(ct.active);if(e==null){await Ul(Gl());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Cl.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==je.id){await Ul(Gl());return}t.id=ct.active,await Ul(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
`,e),await Ul(Gl())}}function Gl(){const e=ua(),t=Ti({id:e});return al(t),ct.saves.push(e),t}function ua(){let e,t=0;do e=`${je.id}-${t++}`;while(localStorage.getItem(e));return e}const Ga=H(!1);async function Ul(e){console.info("Loading save",e),Ga.value=!0;const{layers:t,removeLayer:l,addLayer:i}=await ca(()=>Promise.resolve().then(function(){return xo}),void 0),{fixOldSave:o,getInitialLayers:r}=await ca(()=>Promise.resolve().then(function(){return Ir}),void 0);for(const d in t){const c=t[d];c&&l(c)}r(e).forEach(d=>i(d,e)),e=Ti(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,je.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==je.versionNumber&&(o(e.modVersion,e),e.modVersion=je.versionNumber),Object.assign(me,e),ct.active=me.id,et.emit("onLoad")}setInterval(()=>{me.autosave&&al()},1e3);window.onbeforeunload=()=>{me.autosave&&al()};window.save=al;const To=window.hardReset=async()=>{await Ul(Gl())},ea=la({active:"",saves:[],showTPS:!0,theme:Fa.Nordic,unthrottled:!1});jt(ea,e=>{const t=Cl.compressToUTF16(JSON.stringify(e));localStorage.setItem(je.id,t)},{deep:!0});var ct=window.settings=ea;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Fa.Nordic};et.emit("loadSettings",e),Object.assign(ea,e),To()};function Po(){try{let e=localStorage.getItem(je.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Cl.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(ea,t)}et.emit("loadSettings",ea)}catch{}}const Pi=la([]);function Fo(e){Pi.push(e)}const Fi=la([]);function Uo(e){Fi.push(e)}const Ro=la([]),Oo={class:"table"},Qt=Ce({__name:"Column",setup(e){const t=v(()=>Vl[ct.theme].mergeAdjacent);return(l,i)=>(C(),I("div",Oo,[h("div",{class:ht(["col",{mergeAdjacent:u(t)}])},[Xt(l.$slots,"default")],2)]))}}),qo={class:"table"},$l=Ce({__name:"Row",setup(e){const t=v(()=>Vl[ct.theme].mergeAdjacent);return(l,i)=>(C(),I("div",qo,[h("div",{class:ht(["row",{mergeAdjacent:u(t)}])},[Xt(l.$slots,"default")],2)]))}});function Qa(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!sn(e)}function He(e,t="span"){return typeof e=="function"?Ce({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),Ce({template:e})):Ce({render:()=>({})}):e}function ce(e){if(fl(e))return typeof e=="function"?e():He(e);const t=e[xl];return n(t,e[Nl](),null)}function at(...e){let t;return n($l,null,Qa(t=e.map(ce))?t:{default:()=>[t]})}function Zt(...e){let t;return n(Qt,null,Qa(t=e.map(ce))?t:{default:()=>[t]})}function Sl(...e){return n("div",{class:"table-grid"},[e.map(t=>n("div",{class:{["row-grid"]:!0,mergeAdjacent:Vl[ct.theme].mergeAdjacent}},[t.map(ce)]))])}function nl(e){if(fl(e))return typeof e=="function"?e():typeof e=="string"?n(M,null,[e]):n(e,null,null);const t=e[xl];return n(t,e[Nl](),null)}function Lo(...e){let t;return n(Qt,null,Qa(t=e.map(nl))?t:{default:()=>[t]})}function fl(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Yl]===!0}function Ui(e,t,l){const i=H(null),o=H(void 0);function r(m){i.value||(i.value=setInterval(c,250)),o.value=m,l&&(l.value=!0)}function d(){i.value&&(clearInterval(i.value),i.value=null),l&&(l.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(o.value)}return pi(d),{start:r,stop:d,handleHolding:c}}function Go(e,t){const l=v(()=>e.filter(i=>u(i.visibility)===At.Visible&&t(i)));return{firstFeature:v(()=>l.value[0]),collapsedContent:S(()=>Zt(...l.value.slice(1))),hasCollapsedContent:v(()=>l.value.length>1)}}function fa(e,t="div"){const l=Yt();return Vt(()=>{l.value=He(_t(e),t)}),l}function Bl(e,t="div"){const l=Yt(null);return Vt(()=>{const i=_t(e);l.value=i==null?null:He(i,t)}),l}function Qo(e){return v(()=>_t(e))}function _t(e){return u(u(e))}function Y(...e){return e.includes(Object)||e.push(Obj
<br/>
<br/>
Cost: 50 ${l.displayName}<br/>${Ee(1e11)} ${L.coal.displayName}`}})),Se=q(()=>({resource:R(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:()=>y(ue.depthMilestones[4].earned.value)})),Re=Le(()=>({resource:R(l),cost(){return a.pow(1.15,this.amount.value).times(10)},display:{title:"Mining Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:S(()=>n(M,null,[s("Mine 2.5x faster. Increase ore mining amount by")," ",ke(Re.amount.value),s(" ore per operation")]))},visibility:()=>y(a.gte(Re.amount.value,1)||a.div(r.value,c.value).plus(i.value).gte(10)),style:{width:"200px"}})),fe=Le(()=>({resource:R(l),cost(){return a.pow(1.15,a.times(this.amount.value,10)).times(10)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:S(()=>n(M,null,[s("Automatically smelts")," ",ke(a.times(fe.amount.value,10)),s(" ore per second")]))},visibility:()=>y(a.gte(fe.amount.value,1)||a.gte(Re.amount.value,4)||a.gte(r.value,50)),style:{width:"200px"}})),Oe=Me(!0),xe=Le(()=>({resource:L.coal,cost(){return a.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:S(()=>n(M,null,[s("Gain "),ke(a.times(qe.value,100)),s("% more metal per ore")]))},visibility:()=>y(a.gte(xe.amount.value,1)||De.bought.value),style:{width:"200px"}})),qe=v(()=>a.times(xe.amount.value,.25));et.on("update",se=>{F.value=a.times(se,E.value).plus(F.value);const $e=F.value.trunc();F.value=F.value.minus($e),o.value=a.add(o.value,a.times($e,J.value)),Oe.value&&N(a.min(f.value,a.times(p.value,se)),b.value)});const[pe,Ze]=sl(()=>[{title:"Auto Smelt Speed",modifier:m,base:0,unit:"/s",visible(){return a.gt(fe.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:w,base:1,visible(){return a.gt(b.value,1)}},{title:"Metal per Ore",modifier:d,base:.1},{title:"Ore per Mining Operation",modifier:T,base:1},{title:"Mining Speed",modifier:B,base:.1,unit:"/s"}]),K=H(!1),st=S(()=>n(Ct,{modelValue:K.value,"onUpdate:modelValue":se=>K.value=se},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:pe})),{total:ze,trackerDisplay:Je}=hl({resource:l,goal:25e3,name:e,day:oi,color:t,modal:{show:K,display:st}});return{name:e,day:oi,color:t,ore:o,bestOre:r,oreProgress:F,metal:l,bestMetal:i,totalMetal:ze,simplePickaxe:ye,doublePickaxe:ee,crucible:te,coalDrill:Ue,industrialFurnace:De,efficientDrill:Se,oreDrill:Re,industrialCrucible:fe,autoSmeltEnabled:Oe,hotterForge:xe,generalTabCollapsed:Ze,minWidth:700,display:S(()=>n(M,null,[ce(Je),n(_e,null,null),n(Lt,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:S(()=>n(M,null,[Oe.value&&a.gte(fe.amount.value,1)?`+${Ai([[p.value,"smelting speed"],[ve.value,"ore gain"],[a.div(L.computedCoalGain.value,A),"coal gain"]],"/s",a.mul(c.value,b.value))}`:void 0]))},null),n(_e,null,null),ce(_),a.gte(fe.amount.value,1)?n("div",{style:{width:"150px"}},[n(vl,{title:"Auto Smelt",modelValue:Oe.value,"onUpdate:modelValue":se=>Oe.value=se},null)]):void 0,n(_e,null,null),n(Lt,{resource:o,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:S(()=>n(M,null,[ki(Be.value)]))},null),n(_e,null,null),n("div",null,[s("Currently mining "),Ee(J.value),s(" ore every")," ",Ee(a.recip(E.value)),s(" seconds")]),ce(ie),n(_e,null,null),at(ye,ee,te,Ue,De,Se),at(Re,fe,xe)]))}}),wr="coal",si=3,L=$t(wr,function(){const e="Coal",t="#151716",l="#B2BeB5",i="var(--foreground)",o=yt(0,"coal"),r=yt(0,"ash"),d=Me(0),c=v(()=>a.times(d.value,1e3)),m=v(()=>{let x=a.times(d.value,.1);return U.elfTraining.smallfireElfTraining.milestones[0].earned.value&&(x=x.times(5)),x}),p=v(()=>{let x=a.times(d.value,50);return U.elfTraining.smallfireElfTraining.milestones[0].earned.value&&(x=x.times(5)),x}),w=Le(()=>({resource:de.logs,cost(){let x=a.times(F.amount.value,u(F.cost)).plus(this.amount.value);return a.gte(x,100)&
margin: 10px 0;"/>${Z}`:F,l.value=!0},onOpenLayer(){if(ie.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(me.tabs.includes(T!=null?T:"trees")){const oe=me.tabs.lastIndexOf(T!=null?T:"trees");me.tabs.splice(oe,1)}else me.tabs.push(T!=null?T:"trees"),O.minimized.value=!0;else me.tabs.splice(1,1/0,T!=null?T:"trees")},onUnlockLayer(){T&&(B.value=!0,setTimeout(()=>{var oe,ve;i.value=-1,o.value=u((ve=(oe=Bt[T!=null?T:"trees"])==null?void 0:oe.name)!=null?ve:""),r.value=F,me.devSpeed=null,l.value=!0},1e3))}}}}})}const c=[d(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Li,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!"})),d(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:Gi,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!"})),d(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:Qi,story:"Santa tells you that unfortunately there are quite a few naughty children out there this year, and he's going to need you to gather as much coal as you can for him to give out.",completedStory:"Santa looks at all the coal you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),d(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:$i,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!"})),d(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:Hi,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!"})),d(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:Vi,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!"})),d(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:ji,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 sound
${F}
${E}`)}}return p[B]}jt(l,B=>{B&&Object.keys(p).forEach(E=>delete p[E])});const b=v(()=>ct.saves.reduce((B,E)=>(B[E]=w(E),B),{}));function A(B){let E;switch(me.id===B?E=Di(me[mt]):E=JSON.stringify(b.value[B]),je.exportEncoding){default:console.warn(`Unknown save encoding: ${je.exportEncoding}. Defaulting to lz`);case"lz":E=Cl.compressToUTF16(E);break;case"base64":E=btoa(unescape(encodeURIComponent(E)));break;case"plain":break}const F=document.createElement("textarea");F.value=E,document.body.appendChild(F),F.select(),F.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(F)}function f(B){me.id===B&&al();const E={...b.value[B],id:ua()};al(E),ct.saves.push(E.id)}function _(B){ct.saves=ct.saves.filter(E=>E!==B),localStorage.removeItem(B),p[B]=void 0}function N(B){b.value[me.id].time=me.time,al(),p[me.id]=void 0,Ul(b.value[B]),p[B]=void 0}function T(B){if(d.value=B,Rl(()=>{d.value=null}),B[0]!=="{")if(B[0]==="e")B=decodeURIComponent(escape(atob(B)));else if(B[0]==="\u1BE1")B=Cl.decompressFromUTF16(B);else{console.warn("Unable to determine preset encoding",B);return}const E=JSON.parse(B);E.id=ua(),al(E),ct.saves.push(E.id),N(E.id)}function J(B,E){const F=b.value[B];F&&(F.name=E,me.id===B?(me.name=E,al()):(al(F),p[B]=void 0))}return(B,E)=>(C(),be(Ct,{modelValue:l.value,"onUpdate:modelValue":E[4]||(E[4]=F=>l.value=F),ref_key:"modal",ref:i},{header:ge(()=>[ed]),body:ge(({shown:F})=>[F?(C(),be(u(fn),{key:0,list:u(ct).saves,handle:".handle",itemKey:Z=>Z},{item:ge(({element:Z})=>[n(Zu,{save:u(b)[Z],onOpen:ie=>N(Z),onExport:ie=>A(Z),onEditName:ie=>J(Z,ie),onDuplicate:ie=>f(Z),onDelete:ie=>_(Z)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):G("",!0)]),footer:ge(()=>[h("div",td,[n(Zi,{modelValue:r.value,"onUpdate:modelValue":E[0]||(E[0]=F=>r.value=F),title:"Import Save",placeholder:"Paste your save here!",class:ht({importingFailed:o.value})},null,8,["modelValue","class"]),h("div",ld,[ad,h("div",id,[h("button",{class:"button",onClick:E[1]||(E[1]=F=>N(u(Gl)().id))},"New Game"),Object.keys(u(m)).length>0?(C(),be(Va,{key:0,options:u(m),modelValue:d.value,"onUpdate:modelValue":E[2]||(E[2]=F=>T(F)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):G("",!0)])]),h("div",nd,[od,h("button",{class:"button modal-default-button",onClick:E[3]||(E[3]=F=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var en=Ve(sd,[["__scopeId","data-v-3b9991aa"]]);const Jt=e=>(gl("data-v-8495e562"),e=e(),yl(),e),rd=["src","alt"],ud={key:1,class:"title"},dd=Jt(()=>h("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),cd={class:"discord"},pd={class:"discord-links"},md={key:0},vd=["href"],fd=Jt(()=>h("li",null,[h("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),gd=Jt(()=>h("li",null,[h("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),yd={href:"https://forums.moddingtree.com/",target:"_blank"},hd=Jt(()=>h("span",{class:"material-icons"},"forum",-1)),bd=Jt(()=>h("span",{class:"material-icons"},"info",-1)),wd=Jt(()=>h("span",{class:"material-icons"},"library_books",-1)),Ad=Jt(()=>h("span",{class:"material-icons"},"settings",-1)),kd=Jt(()=>h("span",{class:"material-icons"},"library_books",-1)),Cd=Jt(()=>h("span",{class:"material-icons"},"settings",-1)),Ed=Jt(()=>h("span",{class:"material-icons"},"info",-1)),_d={href:"https://forums.moddingtree.com/",target:"_blank"},Sd=Jt(()=>h("span",{class:"material-icons"},"forum",-1)),Md={class:"discord"},Bd={class:"discord-links"},xd={key:0},Nd=["href"],Dd=Jt(()=>h("li",null,[h("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Id=Jt(()=>h("li",null,[h("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Td=Ce({__name:"Nav",setup(e){const t=H(null),l=H(null),i=H(null),o=H(null),{useHeader:r,banner:d,title:c,discordName:m,discordLink:p,versionNumber:w}=je;function b(){window.open(p,"mywindow")}return(A,f)=>(C(),I(M,null,[u(r)?(C(),I("div",Ol({key:0,
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 Io();const{globalBus:e}=await ca(()=>Promise.resolve().then(function(){return fo}),void 0),{startGameLoop:t}=await ca(()=>import("./gameLoop.a132ef13.js"),["assets/gameLoop.a132ef13.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=cn(fc);e.emit("setupVue",l),l.mount("#app"),Rl(()=>{const i=fi(),{updateServiceWorker:o}=yc({onNeedRefresh(){i.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){o()}})},onOfflineReady(){i.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(r){r&&setInterval(()=>r.update(),60*60*1e3)}})}),t()});export{a as D,ca as _,ft as a,je as b,Ir as c,et as g,Ga as l,me as p,ct as s};