mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-27 10:31:42 +00:00
20 lines
261 KiB
JavaScript
20 lines
261 KiB
JavaScript
|
/* empty css */import"./vue.92681fcb.js";import{Z as f,l as ht,aa as Ae,t as V,ay as ra,ar as _l,aE as k,a0 as I,aK as Qt,a1 as g,O as S,aG as Zl,A as Bt,_ as ye,a8 as i,b6 as pe,b8 as ua,bs as sn,C as u,aq as Sl,bu as Ll,bb as da,T as li,a7 as s,u as ca,j as ai,bv as Ea,q as jl,b1 as Xt,G as ct,aC as rn,w as $t,b2 as qt,ao as ni,I as yt,aN as nt,$ as G,J as Ne,aH as ol,aF as sl,z as Yt,al as la,aL as gl,H as ii,aJ as un,bn as oi,br as si,be as ri}from"./@vue.4ce677c2.js";import{c as dn}from"./nanoevents.1080beb7.js";import{L as ml}from"./lz-string.731cedc5.js";import{i as ui}from"./is-plain-object.906d88e8.js";import{Y as di}from"./vue-next-select.a2bfab1d.js";import{s as ci,u as cn}from"./vue-toastification.6f567382.js";import{D as pi}from"./vuedraggable.7949458c.js";import{p as mi}from"./vue-textarea-autosize.35804eaf.js";import{v as vi,n as fi}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const gi=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(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"&&n(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 n(o){if(o.ep)return;o.ep=!0;const r=l(o);fetch(o.href,r)}};gi();const hi="modulepreload",Ha={},yi="./",aa=function(t,l){return!l||l.length===0?t():Promise.all(l.map(n=>{if(n=`${yi}${n}`,n in Ha)return;Ha[n]=!0;const o=n.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${r}`))return;const d=document.createElement("link");if(d.rel=o?"stylesheet":hi,o||(d.as="script",d.crossOrigin=""),d.href=n,document.head.appendChild(d),o)return new Promise((c,p)=>{d.addEventListener("load",c),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t())},bi="./projInfo-schema.json",wi="Advent Incremental",Ai="An incremental game you play a day at a time, leading up to Christmas!",Ci="advent-incremental",ki="thepaperpilot and friends",Ei="",_i="",Si="0.5",Bi="Initial Commit",Mi=!0,Ni=!1,xi=2,Ii=!0,Di=null,Pi="",Ti=["main"],Fi=3600,Ui=0,Ri=!0,Oi="base64";var He={$schema:bi,title:wi,description:Ai,id:Ci,author:ki,discordName:Ei,discordLink:_i,versionNumber:Si,versionTitle:Bi,allowGoBack:Mi,defaultShowSmall:Ni,defaultDecimalsShown:xi,useHeader:Ii,banner:Di,logo:Pi,initialTabs:Ti,maxTickLength:Fi,offlineLimit:Ui,enablePausing:Ri,exportEncoding:Oi};const ba=17,qi=9e15,Gi=Math.log10(9e15),Li=1/9e15,Qi=308,$i=-324,ja=5,Vi=function(){const e=[];for(let l=$i+1;l<=Qi;l++)e.push(Number("1e"+l));const t=323;return function(l){return e[l+t]}}(),Cl=[2,Math.E,3,4,5,6,7,8,9,10],Hi=[[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: ${Wt}
|
||
|
Trying to pop ${l.id}`;return Wt.pop(),z(l,"color"),z(l,"display"),z(l,"name"),St(l,"name",l.id),z(l,"minWidth"),St(l,"minWidth",600),z(l,"minimizable"),St(l,"minimizable",!0),l})}function kn(e,t){if(console.info("Adding layer",e.id),_t[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,_t[e.id]);return}St(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),_t[e.id]=e,Xe.emit("addLayer",e,t.layers[e.id])}function ko(e){return _t[e]}function En(e){console.info("Removing layer",e.id),Xe.emit("removeLayer",e),_t[e.id]=void 0}function Eo(e){En(e),kn(e,de)}function _o(e){const t=V(!1);return{openModal:()=>t.value=!0,modal:B(()=>i(wt,{modelValue:t.value,"onUpdate:modelValue":l=>t.value=l},{header:()=>i("h2",null,[u(e.name)]),body:u(e.display)}))}}Xe.on("update",function(t){Object.values(_t).forEach(l=>{l==null||l.emit("preUpdate",t)}),Object.values(_t).forEach(l=>{l==null||l.emit("update",t)}),Object.values(_t).forEach(l=>{l==null||l.emit("postUpdate",t)})});var So=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Ma,UnregisterNodeInjectionKey:Na,NodesInjectionKey:xa,BoundsInjectionKey:Ia,layers:_t,persistentRefs:xl,addingLayers:Wt,createLayer:Rt,addLayer:kn,getLayer:ko,removeLayer:En,reloadLayer:Eo,setupLayerModal:_o},Symbol.toStringTag,{value:"Module"}));const Da=Symbol("PersistentState"),fl=Symbol("DefaultValue"),oa=Symbol("StackTrace"),_n=Symbol("Deleted"),$l=Symbol("NonPersistent"),Gl=Symbol("SaveDataPath");function Bo(){var e;return((e=new Error().stack)==null?void 0:e.split(`
|
||
|
`).slice(3,5).map(t=>t.trim()).join(`
|
||
|
`))||""}function Se(e){const t=ht(e)?e:V(e);t[Da]=t,t[fl]=ht(e)?e.value:e,t[oa]=Bo(),t[_n]=!1;const l=f({get(){return t.value},set(n){t.value=n}});return l[fl]=t[fl],t[$l]=l,t[Gl]=void 0,Wt.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
|
||
|
Created at:
|
||
|
`+t[oa]):xl[Wt[Wt.length-1]].add(t),t}function Mo(e){return e&&typeof e=="object"&&Da in e}function F(e){return e[$l]}Xe.on("addLayer",(e,t)=>{const l=[],n=(o,r=[])=>{let d=!1;return Object.keys(o).forEach(c=>{let p=o[c];if(p&&typeof p=="object")if(ot in p&&(p=p[ot]),Mo(p)){if(d=!0,p[_n]){console.warn("Deleted persistent ref present in returned object. Ignoring...",p,`
|
||
|
Created at:
|
||
|
`+p[oa]);return}xl[e.id].delete(p);const m=[e.id,...r,c];p[Gl]!=null&&JSON.stringify(m)!==JSON.stringify(p[Gl])&&console.error(`Persistent ref is being saved to \`${m.join(".")}\` when it's already present at \`${p[Gl].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,p),p[Gl]=m;const b=r.reduce((A,v)=>(v in A||(A[v]={}),A[v]),t),h=b[c];b[c]=p[Da],ai(b)?h!=null?b[c]=h:b[c]=p[fl]:h!=null?b[c].value=h:b[c].value=p[fl]}else!(p instanceof a)&&!ht(p)&&!l.includes(p)&&(typeof p.type=="symbol"&&l.push(p),n(p,[...r,c])&&(Ea(p)&&!Ea(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.",ot in o?o[ot]:o,c):d=!0))}),d};n(e[ot]),xl[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[oa])}),xl[e.id].clear()});const ot=Symbol("ProxyState"),Nl=Symbol("ProxyPath");function Ot(e,t={}){const l=t;let n=!1;function o(){return n||(Object.assign(l,e(l)),n=!0),l}return new Proxy(l,{get(r,d){if(d===ot)return o();const c=o()[d];return c&&typeof c=="object"&&$l in c?c[$l]:c},set(r,d,c){return o()[d]=c,!0},has(r,d){return d===ot?!0:Reflect.has(o(),d)},ownKeys(){return Reflect.ownKeys(o())},getOwnPropertyDescriptor(r,d){return n||(Object.assign(l,e(l)),n=!0),Object.getOwnPropertyDescriptor(r,d)}})}var rt=window.state=ca({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Sn=jl({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function Bn(e){return JSON.stringify(e,(t,l)=>u(l))}const Mn={get(e,t){var n;if(t===ot||t===Nl)return e[t];const l=e[ot][t];if(t!=="value"&&(ui(l)||Array.isArray(l))){if(l!==((n=e[t])==null?void 0:n[ot])){const o=[...e[Nl],t];e[t]=new Proxy({[ot]:l,[Nl]:o},Mn)}return e[t]}return l},set(e,t,l,n){if(!rt.hasNaN&&(typeof l=="number"&&isNaN(l)||l instanceof a&&(isNaN(l.sign)||isNaN(l.layer)||isNaN(l.mag)))){const o=e[ot][t];if(!(typeof o=="number"&&isNaN(o)||o instanceof a&&(isNaN(o.sign)||isNaN(o.layer)||isNaN(o.mag))))throw Sn.autosave=!1,rt.hasNaN=!0,rt.NaNPath=[...e[Nl],t],rt.NaNReceiver=n,console.error("Attempted to set NaN value",[...e[Nl],t],e[ot]),"Attempted to set NaN value. See above for details"}return e[ot][t]=l,!0},ownKeys(e){return Reflect.ownKeys(e[ot])},has(e,t){return Reflect.has(e[ot],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[ot],t)}};var de=window.player=new Proxy({[ot]:Sn,[Nl]:["player"]},Mn);function Nn(e={}){return Object.assign({id:`${He.id}-0`,name:"Default Save",tabs:He.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:He.id,modVersion:He.versionNumber,layers:{}},e)}function Jt(e){const t=ml.compressToUTF16(Bn(e!=null?e:de[ot]));return localStorage.setItem((e!=null?e:de[ot]).id,t),t}async function No(){Io();try{let e=localStorage.getItem(at.active);if(e==null){await El(Il());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=ml.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==He.id){await El(Il());return}t.id=at.active,await El(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
|
||
|
`,e),await El(Il())}}function Il(){const e=ta(),t=Nn({id:e});return Jt(t),at.saves.push(e),t}function ta(){let e,t=0;do e=`${He.id}-${t++}`;while(localStorage.getItem(e));return e}const Pa=V(!1);async function El(e){console.info("Loading save",e),Pa.value=!0;const{layers:t,removeLayer:l,addLayer:n}=await aa(()=>Promise.resolve().then(function(){return So}),void 0),{fixOldSave:o,getInitialLayers:r}=await aa(()=>Promise.resolve().then(function(){return Nr}),void 0);for(const d in t){const c=t[d];c&&l(c)}r(e).forEach(d=>n(d,e)),e=Nn(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,He.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==He.versionNumber&&(o(e.modVersion,e),e.modVersion=He.versionNumber),Object.assign(de,e),at.active=de.id,Xe.emit("onLoad")}setInterval(()=>{de.autosave&&Jt()},1e3);window.onbeforeunload=()=>{de.autosave&&Jt()};window.save=Jt;const xo=window.hardReset=async()=>{await El(Il())},Vl=jl({active:"",saves:[],showTPS:!0,theme:Ba.Nordic,unthrottled:!1});Xt(Vl,e=>{const t=ml.compressToUTF16(JSON.stringify(e));localStorage.setItem(He.id,t)},{deep:!0});var at=window.settings=Vl;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Ba.Nordic};Xe.emit("loadSettings",e),Object.assign(Vl,e),xo()};function Io(){try{let e=localStorage.getItem(He.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=ml.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(Vl,t)}Xe.emit("loadSettings",Vl)}catch{}}const xn=jl([]);function Do(e){xn.push(e)}const In=jl([]);function Po(e){In.push(e)}const To=jl([]),Fo={class:"table"},Ut=Ae({__name:"Column",setup(e){const t=f(()=>Fl[at.theme].mergeAdjacent);return(l,n)=>(k(),I("div",Fo,[g("div",{class:ct(["col",{mergeAdjacent:u(t)}])},[Qt(l.$slots,"default")],2)]))}}),Uo={class:"table"},Pl=Ae({__name:"Row",setup(e){const t=f(()=>Fl[at.theme].mergeAdjacent);return(l,n)=>(k(),I("div",Uo,[g("div",{class:ct(["row",{mergeAdjacent:u(t)}])},[Qt(l.$slots,"default")],2)]))}});function Ta(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!ni(e)}function Le(e,t="span"){return typeof e=="function"?Ae({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),Ae({template:e})):Ae({render:()=>({})}):e}function se(e){if(il(e))return typeof e=="function"?e():Le(e);const t=e[yl];return i(t,e[bl](),null)}function Ye(...e){let t;return i(Pl,null,Ta(t=e.map(se))?t:{default:()=>[t]})}function Vt(...e){let t;return i(Ut,null,Ta(t=e.map(se))?t:{default:()=>[t]})}function Bl(...e){return i("div",{class:"table-grid"},[e.map(t=>i("div",{class:{["row-grid"]:!0,mergeAdjacent:Fl[at.theme].mergeAdjacent}},[t.map(se)]))])}function zt(e){if(il(e))return typeof e=="function"?e():typeof e=="string"?i(S,null,[e]):i(e,null,null);const t=e[yl];return i(t,e[bl](),null)}function Ro(...e){let t;return i(Ut,null,Ta(t=e.map(zt))?t:{default:()=>[t]})}function il(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Ql]===!0}function Dn(e,t,l){const n=V(null),o=V(void 0);function r(p){n.value||(n.value=setInterval(c,250)),o.value=p,l&&(l.value=!0)}function d(){n.value&&(clearInterval(n.value),n.value=null),l&&(l.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(o.value)}return rn(d),{start:r,stop:d,handleHolding:c}}function Oo(e,t){const l=f(()=>e.filter(n=>u(n.visibility)===bt.Visible&&t(n)));return{firstFeature:f(()=>l.value[0]),collapsedContent:B(()=>Vt(...l.value.slice(1))),hasCollapsedContent:f(()=>l.value.length>1)}}function sa(e,t="div"){const l=$t();return qt(()=>{l.value=Le(kt(e),t)}),l}function hl(e,t="div"){const l=$t(null);return qt(()=>{const n=kt(e);l.value=n==null?null:Le(n,t)}),l}function qo(e){return f(()=>kt(e))}function kt(e){return u(u(e))}function Y(...e){return e.includes(Object)||e.push(Obj
|
||
|
<br/>
|
||
|
<br/>
|
||
|
Cost: 50 ${l.displayName}<br/>${Ee(1e11)} ${q.coal.displayName}`}})),xe=O(()=>({resource:F(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(Ze.depthMilestones[4].earned.value)})),Fe=Re(()=>({resource:F(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:B(()=>i(S,null,[s("Mine 2.5x faster. Increase ore mining amount by")," ",we(Fe.amount.value),s(" ore per operation")]))},visibility:()=>y(a.gte(Fe.amount.value,1)||a.div(r.value,c.value).plus(n.value).gte(10)),style:{width:"200px"}})),W=Re(()=>({resource:F(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:B(()=>i(S,null,[s("Automatically smelts")," ",we(a.times(W.amount.value,10)),s(" ore per second")]))},visibility:()=>y(a.gte(W.amount.value,1)||a.gte(Fe.amount.value,4)||a.gte(r.value,50)),style:{width:"200px"}})),ge=Se(!0),oe=Re(()=>({resource:q.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:B(()=>i(S,null,[s("Gain "),we(a.times(je.value,100)),s("% more metal per ore")]))},visibility:()=>y(a.gte(oe.amount.value,1)||ke.bought.value),style:{width:"200px"}})),je=f(()=>a.times(oe.amount.value,.25));Xe.on("update",he=>{T.value=a.times(he,E.value).plus(T.value);const pt=T.value.trunc();T.value=T.value.minus(pt),o.value=a.add(o.value,a.times(pt,H.value)),ge.value&&N(a.min(v.value,a.times(m.value,he)),h.value)});const[We,At]=Zt(()=>[{title:"Auto Smelt Speed",modifier:p,base:0,unit:"/s",visible(){return a.gt(W.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:b,base:1,visible(){return a.gt(h.value,1)}},{title:"Metal per Ore",modifier:d,base:.1},{title:"Ore per Mining Operation",modifier:D,base:1},{title:"Mining Speed",modifier:M,base:.1,unit:"/s"}]),ae=V(!1),ie=B(()=>i(wt,{modelValue:ae.value,"onUpdate:modelValue":he=>ae.value=he},{header:()=>i("h2",null,[e,s(" Modifiers")]),body:We})),{total:Ue,trackerDisplay:ze}=rl({resource:l,goal:25e3,name:e,day:tn,color:t,modal:{show:ae,display:ie}});return{name:e,day:tn,color:t,ore:o,bestOre:r,oreProgress:T,metal:l,bestMetal:n,totalMetal:Ue,simplePickaxe:Be,doublePickaxe:K,crucible:Ce,coalDrill:Ge,industrialFurnace:ke,efficientDrill:xe,oreDrill:Fe,industrialCrucible:W,autoSmeltEnabled:ge,hotterForge:oe,generalTabCollapsed:At,minWidth:700,display:B(()=>i(S,null,[se(ze),i(_e,null,null),i(Tt,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>i(S,null,[ge.value&&a.gte(W.amount.value,1)?`+${hn([[m.value,"smelting speed"],[me.value,"ore gain"],[a.div(q.computedCoalGain.value,A),"coal gain"]],"/s",a.mul(c.value,h.value))}`:void 0]))},null),i(_e,null,null),se(_),a.gte(W.amount.value,1)?i("div",{style:{width:"150px"}},[i(nl,{title:"Auto Smelt",modelValue:ge.value,"onUpdate:modelValue":he=>ge.value=he},null)]):void 0,i(_e,null,null),i(Tt,{resource:o,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>i(S,null,[yn(qe.value)]))},null),i(_e,null,null),i("div",null,[s("Currently mining "),Ee(H.value),s(" ore every")," ",Ee(a.recip(E.value)),s(" seconds")]),se(fe),i(_e,null,null),Ye(Be,K,Ce,Ge,ke,xe),Ye(Fe,W,oe)]))}}),hr="coal",ln=3,q=Rt(hr,function(){const e="Coal",t="#151716",l="#B2BeB5",n="var(--foreground)",o=dt(0,"coal"),r=dt(0,"ash"),d=Se(0),c=f(()=>a.times(d.value,1e3)),p=f(()=>a.times(d.value,.1)),m=f(()=>a.times(d.value,50)),b=Re(()=>({resource:ve.logs,cost(){let U=a.times(T.amount.value,u(T.cost)).plus(this.amount.value);return a.gte(U,100)&&(U=a.pow(U,2).div(100)),a.gte(U,1e4)&&(U=a.pow(U,2).div(1e4)),U=a.pow(.95,te.books.smallFireBook.amount.value).times(U),U.pow(1.5).times(1e4)},display:B(()=>i(S,null,[i("h3",null,[s("Small Fire")
|
||
|
margin: 10px 0;"/>${J}`:T,l.value=!0},onOpenLayer(){if(fe.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(de.tabs.includes(D!=null?D:"trees")){const Q=de.tabs.lastIndexOf(D!=null?D:"trees");de.tabs.splice(Q,1)}else de.tabs.push(D!=null?D:"trees"),R.minimized.value=!0;else de.tabs.splice(1,1/0,D!=null?D:"trees")},onUnlockLayer(){D&&(M.value=!0,setTimeout(()=>{var Q,me;n.value=-1,o.value=u((me=(Q=_t[D!=null?D:"trees"])==null?void 0:Q.name)!=null?me:""),r.value=T,de.devSpeed=null,l.value=!0},1e3))}}}}})}const c=[d(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Un,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:Rn,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:On,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:qn,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:Gn,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:Ln,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:Qn,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}
|
||
|
${E}`)}}return m[M]}Xt(l,M=>{M&&Object.keys(m).forEach(E=>delete m[E])});const h=f(()=>at.saves.reduce((M,E)=>(M[E]=b(E),M),{}));function A(M){let E;switch(de.id===M?E=Bn(de[ot]):E=JSON.stringify(h.value[M]),He.exportEncoding){default:console.warn(`Unknown save encoding: ${He.exportEncoding}. Defaulting to lz`);case"lz":E=ml.compressToUTF16(E);break;case"base64":E=btoa(unescape(encodeURIComponent(E)));break;case"plain":break}const T=document.createElement("textarea");T.value=E,document.body.appendChild(T),T.select(),T.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(T)}function v(M){de.id===M&&Jt();const E={...h.value[M],id:ta()};Jt(E),at.saves.push(E.id)}function _(M){at.saves=at.saves.filter(E=>E!==M),localStorage.removeItem(M),m[M]=void 0}function N(M){h.value[de.id].time=de.time,Jt(),m[de.id]=void 0,El(h.value[M]),m[M]=void 0}function D(M){if(d.value=M,_l(()=>{d.value=null}),M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=ml.decompressFromUTF16(M);else{console.warn("Unable to determine preset encoding",M);return}const E=JSON.parse(M);E.id=ta(),Jt(E),at.saves.push(E.id),N(E.id)}function H(M,E){const T=h.value[M];T&&(T.name=E,de.id===M?(de.name=E,Jt()):(Jt(T),m[M]=void 0))}return(M,E)=>(k(),ye(wt,{modelValue:l.value,"onUpdate:modelValue":E[4]||(E[4]=T=>l.value=T),ref_key:"modal",ref:n},{header:pe(()=>[Xu]),body:pe(({shown:T})=>[T?(k(),ye(u(pi),{key:0,list:u(at).saves,handle:".handle",itemKey:J=>J},{item:pe(({element:J})=>[i(zu,{save:u(h)[J],onOpen:fe=>N(J),onExport:fe=>A(J),onEditName:fe=>H(J,fe),onDuplicate:fe=>v(J),onDelete:fe=>_(J)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):G("",!0)]),footer:pe(()=>[g("div",Yu,[i(Kn,{modelValue:r.value,"onUpdate:modelValue":E[0]||(E[0]=T=>r.value=T),title:"Import Save",placeholder:"Paste your save here!",class:ct({importingFailed:o.value})},null,8,["modelValue","class"]),g("div",Zu,[ed,g("div",td,[g("button",{class:"button",onClick:E[1]||(E[1]=T=>N(u(Il)().id))},"New Game"),Object.keys(u(p)).length>0?(k(),ye(Oa,{key:0,options:u(p),modelValue:d.value,"onUpdate:modelValue":E[2]||(E[2]=T=>D(T)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):G("",!0)])]),g("div",ld,[ad,g("button",{class:"button modal-default-button",onClick:E[3]||(E[3]=T=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var zn=Qe(nd,[["__scopeId","data-v-3b9991aa"]]);const Gt=e=>(ol("data-v-8495e562"),e=e(),sl(),e),id=["src","alt"],od={key:1,class:"title"},sd=Gt(()=>g("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),rd={class:"discord"},ud={class:"discord-links"},dd={key:0},cd=["href"],pd=Gt(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),md=Gt(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),vd={href:"https://forums.moddingtree.com/",target:"_blank"},fd=Gt(()=>g("span",{class:"material-icons"},"forum",-1)),gd=Gt(()=>g("span",{class:"material-icons"},"info",-1)),hd=Gt(()=>g("span",{class:"material-icons"},"library_books",-1)),yd=Gt(()=>g("span",{class:"material-icons"},"settings",-1)),bd=Gt(()=>g("span",{class:"material-icons"},"library_books",-1)),wd=Gt(()=>g("span",{class:"material-icons"},"settings",-1)),Ad=Gt(()=>g("span",{class:"material-icons"},"info",-1)),Cd={href:"https://forums.moddingtree.com/",target:"_blank"},kd=Gt(()=>g("span",{class:"material-icons"},"forum",-1)),Ed={class:"discord"},_d={class:"discord-links"},Sd={key:0},Bd=["href"],Md=Gt(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Nd=Gt(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),xd=Ae({__name:"Nav",setup(e){const t=V(null),l=V(null),n=V(null),o=V(null),{useHeader:r,banner:d,title:c,discordName:p,discordLink:m,versionNumber:b}=He;function h(){window.open(m,"mywindow")}return(A,v)=>(k(),I(S,null,[u(r)?(k(),I("div",Sl({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 No();const{globalBus:e}=await aa(()=>Promise.resolve().then(function(){return po}),void 0),{startGameLoop:t}=await aa(()=>import("./gameLoop.4d36277a.js"),["assets/gameLoop.4d36277a.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=ri(pc);e.emit("setupVue",l),l.mount("#app"),_l(()=>{const n=cn(),{updateServiceWorker:o}=vc({onNeedRefresh(){n.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(){n.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(r){r&&setInterval(()=>r.update(),60*60*1e3)}})}),t()});export{a as D,aa as _,rt as a,He as b,Nr as c,Xe as g,Pa as l,de as p,at as s};
|