diff --git a/assets/gameLoop.985d1f90.js b/assets/gameLoop.08aa972d.js similarity index 68% rename from assets/gameLoop.985d1f90.js rename to assets/gameLoop.08aa972d.js index d9bc7da..2ceb46e 100644 --- a/assets/gameLoop.985d1f90.js +++ b/assets/gameLoop.08aa972d.js @@ -1 +1 @@ -import{_ as d,s as u,p as e,a as f,l as T,D as a,b as m,g as p}from"./index.31e3b26a.js";import"./vue.359c6955.js";import{b2 as c}from"./@vue.6f8187b0.js";/* empty css */import"./lz-string.bfbf8ec3.js";import"./nanoevents.1080beb7.js";import"./vue-next-select.68e0c605.js";import"./vuedraggable.055200e5.js";import"./sortablejs.20039f18.js";import"./vue-textarea-autosize.35804eaf.js";import"./vue-toastification.45d39007.js";let n=null,l=null;function o(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const r=i;if(f.lastTenTicks.push(r),f.lastTenTicks.length>10&&(f.lastTenTicks=f.lastTenTicks.slice(1)),!((l==null?void 0:l.value)&&!e.keepGoing)&&!f.hasNaN&&(i=Math.max(i,0),e.devSpeed!==0)){if(T.value=!1,e.offlineTime!=null){if(a.gt(e.offlineTime,m.offlineLimit*3600)&&(e.offlineTime=m.offlineLimit*3600),a.gt(e.offlineTime,0)&&e.devSpeed!==0){const s=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-s,i+=s}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||a.lt(e.offlineTime,0))&&(e.offlineTime=null)}i=Math.min(i,m.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),!a.eq(i,0)&&(e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308),p.emit("update",i,r),u.unthrottled?(requestAnimationFrame(o),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(o,50)))}}async function L(){l=(await d(()=>import("./index.31e3b26a.js").then(function(t){return t.c}),["assets/index.31e3b26a.js","assets/index.0082bab1.css","assets/@fontsource.f66d05e7.css","assets/vue.359c6955.js","assets/lz-string.bfbf8ec3.js","assets/@vue.6f8187b0.js","assets/nanoevents.1080beb7.js","assets/vue-next-select.68e0c605.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.055200e5.js","assets/sortablejs.20039f18.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-toastification.45d39007.js","assets/vue-toastification.4b5f8ac8.css"])).hasWon,c(l,t=>{t&&p.emit("gameWon")}),u.unthrottled?requestAnimationFrame(o):n=setInterval(o,50)}export{L as startGameLoop}; +import{_ as d,s as u,p as e,a as f,l as T,D as a,b as m,g as p}from"./index.1dbb5c42.js";import"./vue.8b6e16f3.js";import{b2 as c}from"./@vue.6f8187b0.js";/* empty css */import"./lz-string.bfbf8ec3.js";import"./nanoevents.1080beb7.js";import"./vue-next-select.d60d437a.js";import"./vuedraggable.56f5e1e2.js";import"./sortablejs.8abbd596.js";import"./vue-textarea-autosize.35804eaf.js";import"./vue-toastification.c011d2f2.js";let n=null,l=null;function o(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const r=i;if(f.lastTenTicks.push(r),f.lastTenTicks.length>10&&(f.lastTenTicks=f.lastTenTicks.slice(1)),!((l==null?void 0:l.value)&&!e.keepGoing)&&!f.hasNaN&&(i=Math.max(i,0),e.devSpeed!==0)){if(T.value=!1,e.offlineTime!=null){if(a.gt(e.offlineTime,m.offlineLimit*3600)&&(e.offlineTime=m.offlineLimit*3600),a.gt(e.offlineTime,0)&&e.devSpeed!==0){const s=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-s,i+=s}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||a.lt(e.offlineTime,0))&&(e.offlineTime=null)}i=Math.min(i,m.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),!a.eq(i,0)&&(e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308),p.emit("update",i,r),u.unthrottled?(requestAnimationFrame(o),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(o,50)))}}async function L(){l=(await d(()=>import("./index.1dbb5c42.js").then(function(t){return t.c}),["assets/index.1dbb5c42.js","assets/index.0082bab1.css","assets/@fontsource.f66d05e7.css","assets/vue.8b6e16f3.js","assets/lz-string.bfbf8ec3.js","assets/@vue.6f8187b0.js","assets/nanoevents.1080beb7.js","assets/vue-next-select.d60d437a.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.56f5e1e2.js","assets/sortablejs.8abbd596.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-toastification.c011d2f2.js","assets/vue-toastification.4b5f8ac8.css"])).hasWon,c(l,t=>{t&&p.emit("gameWon")}),u.unthrottled?requestAnimationFrame(o):n=setInterval(o,50)}export{L as startGameLoop}; diff --git a/assets/index.31e3b26a.js b/assets/index.1dbb5c42.js similarity index 85% rename from assets/index.31e3b26a.js rename to assets/index.1dbb5c42.js index 1c1472f..1e808c1 100644 --- a/assets/index.31e3b26a.js +++ b/assets/index.1dbb5c42.js @@ -1,18 +1,18 @@ -/* empty css */import"./vue.359c6955.js";import{q as Ye,C as u,ab as q,t as F,aF as p,a1 as _,aL as Te,bv as rt,G as ae,as as Ue,_ as P,az as lt,a2 as m,J as D,O as j,aK as Le,a0 as $,I as ge,a8 as T,a9 as y,b7 as V,aI as Ie,aG as Me,l as te,u as Ct,b2 as _e,aD as ln,w as be,b3 as Be,aH as ft,A as de,$ as L,b9 as Dt,ar as Oe,bt as Rn,bc as un,T as qn,j as An,bw as Yt,ay as Bn,aM as ze,aO as ie,z as ke,bo as Un,bs as zn,am as vt,H as Gn,y as Xt,bf as jn}from"./@vue.6f8187b0.js";import{L as Ce}from"./lz-string.bfbf8ec3.js";import{c as cn}from"./nanoevents.1080beb7.js";import{Y as Hn}from"./vue-next-select.68e0c605.js";import{D as Wn}from"./vuedraggable.055200e5.js";import{p as Jn}from"./vue-textarea-autosize.35804eaf.js";import{s as Zn,u as Kn}from"./vue-toastification.45d39007.js";import"./sortablejs.20039f18.js";const Yn=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(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 r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}};Yn();const Xn="modulepreload",Qt={},Qn="./",it=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${Qn}${r}`,r in Qt)return;Qt[r]=!0;const i=r.endsWith(".css"),s=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${s}`))return;const o=document.createElement("link");if(o.rel=i?"stylesheet":Xn,i||(o.as="script",o.crossOrigin=""),o.href=r,document.head.appendChild(o),i)return new Promise((c,d)=>{o.addEventListener("load",c),o.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())},er="./projInfo-schema.json",tr="Profectus",nr="A project made in Profectus",rr="",ir="",sr="",ar="",or="0.0",lr="Initial Commit",ur=!0,cr=!1,dr=2,fr=!0,gr=null,mr="",hr=["main"],pr=3600,vr=1,br=!0,yr="base64";var A={$schema:er,title:tr,description:nr,id:rr,author:ir,discordName:sr,discordLink:ar,versionNumber:or,versionTitle:lr,allowGoBack:ur,defaultShowSmall:cr,defaultDecimalsShown:dr,useHeader:fr,banner:gr,logo:mr,initialTabs:hr,maxTickLength:pr,offlineLimit:vr,enablePausing:br,exportEncoding:yr};const _r=Ye({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{}});var x=window.player=_r;function Lt(e){return JSON.stringify(e,(t,n)=>u(n))}var z=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n};const Nr=["onClick"],wr=q({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=F(!1),r=F(null);function i(){t("click"),r.value&&clearTimeout(r.value),n.value=!1,Ue(()=>{n.value=!0,r.value=setTimeout(()=>n.value=!1,500)})}return(s,o)=>(p(),_("button",{onClick:rt(i,["stop"]),class:ae(["feedback",{activated:n.value,left:e.left}])},[Te(s.$slots,"default",{},void 0,!0)],10,Nr))}});var Rt=z(wr,[["__scopeId","data-v-01a1b95c"]]);const kt=e=>(Ie("data-v-ac351c02"),e=e(),Me(),e),Cr={class:"error"},kr={class:"error-title"},Sr={class:"error-details",style:{"margin-top":"-10px"}},Ir={key:0},Mr={class:"instructions"},$r=["href"],xr=kt(()=>m("span",{class:"material-icons",style:{"font-size":"16px"}},"content_paste",-1)),Fr=kt(()=>m("span",{style:{"margin-left":"8px","font-size":"medium"}},"Copy Save",-1)),Tr=kt(()=>m("br",null,null,-1)),Pr={key:0,style:{"margin-top":"20px"}},Er=kt(()=>m("h3",null,"Other errors",-1)),Or=[Er],Vr={class:"error-details"},Dr={key:0,style:{"margin-top":"10px"}},Lr={key:1,style:{"margin-top":"10px"}},Rr=q({__name:"Error",props:{errors:null},setup(e){const t=e,n=P(()=>t.errors[0]),r=P(()=>t.errors.map(o=>o.stack==null?[]:o.stack.split(` +/* empty css */import"./vue.8b6e16f3.js";import{q as Ye,C as u,ab as q,t as F,aF as p,a1 as _,aL as Te,bv as rt,G as ae,as as Ue,_ as P,az as ut,a2 as m,J as D,O as j,aK as Le,a0 as $,I as ge,a8 as T,a9 as y,b7 as V,aI as Ie,aG as Me,l as te,u as kt,b2 as _e,aD as ln,w as be,b3 as Be,aH as gt,A as de,$ as L,b9 as Dt,ar as Oe,bt as Rn,bc as un,T as qn,j as An,bw as Yt,ay as Bn,aM as ze,aO as ie,z as ke,bo as Un,bs as zn,am as bt,H as Gn,y as Xt,bf as jn}from"./@vue.6f8187b0.js";import{L as Ce}from"./lz-string.bfbf8ec3.js";import{c as cn}from"./nanoevents.1080beb7.js";import{Y as Hn}from"./vue-next-select.d60d437a.js";import{D as Wn}from"./vuedraggable.56f5e1e2.js";import{p as Jn}from"./vue-textarea-autosize.35804eaf.js";import{s as Zn,u as Kn}from"./vue-toastification.c011d2f2.js";import"./sortablejs.8abbd596.js";const Yn=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(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 r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}};Yn();const Xn="modulepreload",Qt={},Qn="./",it=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${Qn}${r}`,r in Qt)return;Qt[r]=!0;const i=r.endsWith(".css"),s=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${s}`))return;const o=document.createElement("link");if(o.rel=i?"stylesheet":Xn,i||(o.as="script",o.crossOrigin=""),o.href=r,document.head.appendChild(o),i)return new Promise((c,d)=>{o.addEventListener("load",c),o.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())},er="./projInfo-schema.json",tr="Profectus",nr="A project made in Profectus",rr="",ir="",sr="",ar="",or="0.0",lr="Initial Commit",ur=!0,cr=!1,dr=2,fr=!0,gr=null,mr="",hr=["main"],pr=3600,vr=1,br=!0,yr="base64";var A={$schema:er,title:tr,description:nr,id:rr,author:ir,discordName:sr,discordLink:ar,versionNumber:or,versionTitle:lr,allowGoBack:ur,defaultShowSmall:cr,defaultDecimalsShown:dr,useHeader:fr,banner:gr,logo:mr,initialTabs:hr,maxTickLength:pr,offlineLimit:vr,enablePausing:br,exportEncoding:yr};const _r=Ye({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{}});var x=window.player=_r;function Lt(e){return JSON.stringify(e,(t,n)=>u(n))}var z=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n};const Nr=["onClick"],wr=q({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=F(!1),r=F(null);function i(){t("click"),r.value&&clearTimeout(r.value),n.value=!1,Ue(()=>{n.value=!0,r.value=setTimeout(()=>n.value=!1,500)})}return(s,o)=>(p(),_("button",{onClick:rt(i,["stop"]),class:ae(["feedback",{activated:n.value,left:e.left}])},[Te(s.$slots,"default",{},void 0,!0)],10,Nr))}});var Rt=z(wr,[["__scopeId","data-v-01a1b95c"]]);const St=e=>(Ie("data-v-ac351c02"),e=e(),Me(),e),Cr={class:"error"},kr={class:"error-title"},Sr={class:"error-details",style:{"margin-top":"-10px"}},Ir={key:0},Mr={class:"instructions"},$r=["href"],xr=St(()=>m("span",{class:"material-icons",style:{"font-size":"16px"}},"content_paste",-1)),Fr=St(()=>m("span",{style:{"margin-left":"8px","font-size":"medium"}},"Copy Save",-1)),Tr=St(()=>m("br",null,null,-1)),Pr={key:0,style:{"margin-top":"20px"}},Er=St(()=>m("h3",null,"Other errors",-1)),Or=[Er],Vr={class:"error-details"},Dr={key:0,style:{"margin-top":"10px"}},Lr={key:1,style:{"margin-top":"10px"}},Rr=q({__name:"Error",props:{errors:null},setup(e){const t=e,n=P(()=>t.errors[0]),r=P(()=>t.errors.map(o=>o.stack==null?[]:o.stack.split(` `))),i=P(()=>t.errors.map(o=>o.cause==null?[]:(typeof o.cause=="string"?o.cause:JSON.stringify(o.cause)).split(` -`)));function s(){let o=Lt(x);switch(A.exportEncoding){default:console.warn(`Unknown save encoding: ${A.exportEncoding}. Defaulting to lz`);case"lz":o=Ce.compressToUTF16(o);break;case"base64":o=btoa(unescape(encodeURIComponent(o)));break;case"plain":break}console.log(o);const c=document.createElement("textarea");c.value=o,document.body.appendChild(c),c.select(),c.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(c)}return lt(()=>{x.autosave=!1,x.devSpeed=0}),(o,c)=>(p(),_("div",Cr,[m("h1",kr,D(u(n).name)+": "+D(u(n).message),1),m("div",Sr,[u(n).cause?(p(),_("div",Ir,[(p(!0),_(j,null,Le(u(i)[0],d=>(p(),_("div",{key:d},D(d),1))),128))])):$("",!0),u(n).stack?(p(),_("div",{key:1,style:ge(u(n).cause?"margin-top: 10px":"")},[(p(!0),_(j,null,Le(u(r)[0],d=>(p(),_("div",{key:d},D(d),1))),128))],4)):$("",!0)]),m("div",Mr,[T(" Check the console for more details, and consider sharing it with the developers on "),m("a",{href:u(A).discordLink||"https://discord.gg/yJ4fjnjU54",class:"discord-link"},"discord",8,$r),T("! "),y(Rt,{onClick:s,class:"button",style:{display:"inline-flex"}},{default:V(()=>[xr,Fr]),_:1}),Tr,e.errors.length>1?(p(),_("div",Pr,Or)):$("",!0),(p(!0),_(j,null,Le(e.errors.slice(1),(d,g)=>(p(),_("div",{key:g,style:{"margin-top":"20px"}},[m("details",Vr,[m("summary",null,D(d.name)+": "+D(d.message),1),d.cause?(p(),_("div",Dr,[(p(!0),_(j,null,Le(u(i)[g+1],b=>(p(),_("div",{key:b},D(b),1))),128))])):$("",!0),d.stack?(p(),_("div",Lr,[(p(!0),_(j,null,Le(u(r)[g+1],b=>(p(),_("div",{key:b},D(b),1))),128))])):$("",!0)])]))),128))])]))}});var dn=z(Rr,[["__scopeId","data-v-ac351c02"]]);class qr{constructor(t){this.map=new Map,this.first=void 0,this.last=void 0,this.maxSize=t}get size(){return this.map.size}get(t){const n=this.map.get(t);if(n!==void 0)return n!==this.first&&(n===this.last?(this.last=n.prev,this.last.next=void 0):(n.prev.next=n.next,n.next.prev=n.prev),n.next=this.first,this.first.prev=n,this.first=n),n.value}set(t,n){if(this.maxSize<1)return;if(this.map.has(t))throw new Error("Cannot update existing keys in the cache");const r=new Ar(t,n);for(this.first===void 0?(this.first=r,this.last=r):(r.next=this.first,this.first.prev=r,this.first=r),this.map.set(t,r);this.map.size>this.maxSize;){const i=this.last;this.map.delete(i.key),this.last=i.prev,this.last.next=void 0}}}class Ar{constructor(t,n){this.next=void 0,this.prev=void 0,this.key=t,this.value=n}}const Ft=17,Br=9e15,Ur=Math.log10(9e15),zr=1/9e15,Gr=308,jr=-324,en=5,Hr=(1<<10)-1,Wr=function(){const e=[];for(let n=jr+1;n<=Gr;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),Ve=[2,Math.E,3,4,5,6,7,8,9,10],Jr=[[1,1.0891180521811203,1.1789767925673957,1.2701455431742086,1.3632090180450092,1.4587818160364217,1.5575237916251419,1.6601571006859253,1.767485818836978,1.8804192098842727,2],[1,1.1121114330934079,1.231038924931609,1.3583836963111375,1.4960519303993531,1.6463542337511945,1.8121385357018724,1.996971324618307,2.2053895545527546,2.4432574483385254,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.1670905356972596,1.3632807444991446,1.5979222279405536,1.8842640123816674,2.2416069644878687,2.69893426559423,3.3012632110403577,4.121250340630164,5.281493033448316,7],[1,1.1736630594087796,1.379783782386201,1.6292821855668218,1.9378971836180754,2.3289975651071977,2.8384347394720835,3.5232708454565906,4.478242031114584,5.868592169644505,8],[1,1.1793017514670474,1.394054150657457,1.65664127441059,1.985170999970283,2.4069682290577457,2.9647310119960752,3.7278665320924946,4.814462547283592,6.436522247411611,9],[1,1.1840100246247336,1.4061375836156955,1.6802272208863964,2.026757028388619,2.4770056063449646,3.080525271755482,3.9191964192627284,5.135152840833187,6.989961179534715,10]],Zr=[[-1,-.9194161097107025,-.8335625019330468,-.7425599821143978,-.6466611521029437,-.5462617907227869,-.4419033816638769,-.3342645487554494,-.224140440909962,-.11241087890006762,0],[-1,-.90603157029014,-.80786507256596,-.7064666939634,-.60294836853664,-.49849837513117,-.39430303318768,-.29147201034755,-.19097820800866,-.09361896280296,0],[-1,-.9021579584316141,-.8005762598234203,-.6964780623319391,-.5911906810998454,-.486050182576545,-.3823089430815083,-.28106046722897615,-.1831906535795894,-.08935809204418144,0],[-1,-.8917227442365535,-.781258746326964,-.6705130326902455,-.5612813129406509,-.4551067709033134,-.35319256652135966,-.2563741554088552,-.1651412821106526,-.0796919581982668,0],[-1,-.8843387974366064,-.7678744063886243,-.6529563724510552,-.5415870994657841,-.4352842206588936,-.33504449124791424,-.24138853420685147,-.15445285440944467,-.07409659641336663,0],[-1,-.8786709358426346,-.7577735191184886,-.6399546189952064,-.527284921869926,-.4211627631006314,-.3223479611761232,-.23107655627789858,-.1472057700818259,-.07035171210706326,0],[-1,-.8740862815291583,-.7497032990976209,-.6297119746181752,-.5161838335958787,-.41036238255751956,-.31277212146489963,-.2233976621705518,-.1418697367979619,-.06762117662323441,0],[-1,-.8702632331800649,-.7430366914122081,-.6213373075161548,-.5072025698095242,-.40171437727184167,-.30517930701410456,-.21736343968190863,-.137710238299109,-.06550774483471955,0],[-1,-.8670016295947213,-.7373984232432306,-.6143173985094293,-.49973884395492807,-.394584953527678,-.2989649949848695,-.21245647317021688,-.13434688362382652,-.0638072667348083,0],[-1,-.8641642839543857,-.732534623168535,-.6083127477059322,-.4934049257184696,-.3885773075899922,-.29376029055315767,-.2083678561173622,-.13155653399373268,-.062401588652553186,0]];let h=function(t){return l.fromValue_noAlloc(t)},O=function(e,t,n){return l.fromComponents(e,t,n)},R=function(t,n,r){return l.fromComponents_noNormalize(t,n,r)};const xe=function(t,n){const r=n+1,i=Math.ceil(Math.log10(Math.abs(t))),s=Math.round(t*Math.pow(10,r-i))*Math.pow(10,i-r);return parseFloat(s.toFixed(Math.max(r-i,0)))},Tt=function(e){return Math.sign(e)*Math.log10(Math.abs(e))},Kr=function(e){if(!isFinite(e))return e;if(e<-50)return e===Math.trunc(e)?Number.NEGATIVE_INFINITY:0;let t=1;for(;e<10;)t=t*e,++e;e-=1;let n=.9189385332046727;n=n+(e+.5)*Math.log(e),n=n-e;const r=e*e;let i=e;return n=n+1/(12*i),i=i*r,n=n+1/(360*i),i=i*r,n=n+1/(1260*i),i=i*r,n=n+1/(1680*i),i=i*r,n=n+1/(1188*i),i=i*r,n=n+691/(360360*i),i=i*r,n=n+7/(1092*i),i=i*r,n=n+3617/(122400*i),Math.exp(n)/t},fn=.5671432904097838,tn=function(e,t=1e-10){let n,r;if(!Number.isFinite(e)||e===0)return e;if(e===1)return fn;e<10?n=0:n=Math.log(e)-Math.log(Math.log(e));for(let i=0;i<100;++i){if(r=(e*Math.exp(-n)+n*n)/(n+1),Math.abs(r-n).5?1:-1;if(Math.random()*20<1)return R(t,0,1);const n=Math.floor(Math.random()*(e+1));let r=n===0?Math.random()*616-308:Math.random()*16;Math.random()>.9&&(r=Math.trunc(r));let i=Math.pow(10,r);return Math.random()>.9&&(i=Math.trunc(i)),O(t,n,i)}static affordGeometricSeries_core(e,t,n,r){const i=t.mul(n.pow(r));return f.floor(e.div(i).mul(n.sub(1)).add(1).log10().div(n.log10()))}static sumGeometricSeries_core(e,t,n,r){return t.mul(n.pow(r)).mul(f.sub(1,n.pow(e))).div(f.sub(1,n))}static affordArithmeticSeries_core(e,t,n,r){const s=t.add(r.mul(n)).sub(n.div(2)),o=s.pow(2);return s.neg().add(o.add(n.mul(e).mul(2)).sqrt()).div(n).floor()}static sumArithmeticSeries_core(e,t,n,r){const i=t.add(r.mul(n));return e.div(2).mul(i.mul(2).plus(e.sub(1).mul(n)))}static efficiencyOfPurchase_core(e,t,n){return e.div(t).add(e.div(n))}normalize(){if(this.sign===0||this.mag===0&&this.layer===0)return this.sign=0,this.mag=0,this.layer=0,this;if(this.layer===0&&this.mag<0&&(this.mag=-this.mag,this.sign=-this.sign),this.layer===0&&this.mag=Br)return this.layer+=1,this.mag=t*Math.log10(e),this;for(;e0;)this.layer-=1,this.layer===0?this.mag=Math.pow(10,this.mag):(this.mag=t*Math.pow(10,e),e=Math.abs(this.mag),t=Math.sign(this.mag));return this.layer===0&&(this.mag<0?(this.mag=-this.mag,this.sign=-this.sign):this.mag===0&&(this.sign=0)),this}fromComponents(e,t,n){return this.sign=e,this.layer=t,this.mag=n,this.normalize(),this}fromComponents_noNormalize(e,t,n){return this.sign=e,this.layer=t,this.mag=n,this}fromMantissaExponent(e,t){return this.layer=1,this.sign=Math.sign(e),e=Math.abs(e),this.mag=t+Math.log10(e),this.normalize(),this}fromMantissaExponent_noNormalize(e,t){return this.fromMantissaExponent(e,t),this}fromDecimal(e){return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}fromNumber(e){return this.mag=Math.abs(e),this.sign=Math.sign(e),this.layer=0,this.normalize(),this}fromString(e){const t=e,n=f.fromStringCache.get(t);if(n!==void 0)return this.fromDecimal(n);e=e.replace(",","");const r=e.split("^^^");if(r.length===2){const I=parseFloat(r[0]),C=parseFloat(r[1]),G=r[1].split(";");let Y=1;if(G.length===2&&(Y=parseFloat(G[1]),isFinite(Y)||(Y=1)),isFinite(I)&&isFinite(C)){const S=f.pentate(I,C,Y);return this.sign=S.sign,this.layer=S.layer,this.mag=S.mag,f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this}}const i=e.split("^^");if(i.length===2){const I=parseFloat(i[0]),C=parseFloat(i[1]),G=i[1].split(";");let Y=1;if(G.length===2&&(Y=parseFloat(G[1]),isFinite(Y)||(Y=1)),isFinite(I)&&isFinite(C)){const S=f.tetrate(I,C,Y);return this.sign=S.sign,this.layer=S.layer,this.mag=S.mag,f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this}}const s=e.split("^");if(s.length===2){const I=parseFloat(s[0]),C=parseFloat(s[1]);if(isFinite(I)&&isFinite(C)){const G=f.pow(I,C);return this.sign=G.sign,this.layer=G.layer,this.mag=G.mag,f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this}}e=e.trim().toLowerCase();let o,c,d=e.split("pt");if(d.length===2){o=10,c=parseFloat(d[0]),d[1]=d[1].replace("(",""),d[1]=d[1].replace(")","");let I=parseFloat(d[1]);if(isFinite(I)||(I=1),isFinite(o)&&isFinite(c)){const C=f.tetrate(o,c,I);return this.sign=C.sign,this.layer=C.layer,this.mag=C.mag,f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this}}if(d=e.split("p"),d.length===2){o=10,c=parseFloat(d[0]),d[1]=d[1].replace("(",""),d[1]=d[1].replace(")","");let I=parseFloat(d[1]);if(isFinite(I)||(I=1),isFinite(o)&&isFinite(c)){const C=f.tetrate(o,c,I);return this.sign=C.sign,this.layer=C.layer,this.mag=C.mag,f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this}}const g=e.split("e"),b=g.length-1;if(b===0){const I=parseFloat(e);if(isFinite(I))return this.fromNumber(I),f.fromStringCache.size>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this}else if(b===1){const I=parseFloat(e);if(isFinite(I)&&I!==0)return this.fromNumber(I),f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this}const v=e.split("e^");if(v.length===2){this.sign=1,v[0].charAt(0)=="-"&&(this.sign=-1);let I="";for(let C=0;C=43&&G<=57||G===101)I+=v[1].charAt(C);else return this.layer=parseFloat(I),this.mag=parseFloat(v[1].substr(C+1)),this.normalize(),f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this}}if(b<1)return this.sign=0,this.layer=0,this.mag=0,f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this;const N=parseFloat(g[0]);if(N===0)return this.sign=0,this.layer=0,this.mag=0,f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this;let k=parseFloat(g[g.length-1]);if(b>=2){const I=parseFloat(g[g.length-2]);isFinite(I)&&(k*=Math.sign(I),k+=Tt(I))}if(!isFinite(N))this.sign=g[0]==="-"?-1:1,this.layer=b,this.mag=k;else if(b===1)this.sign=Math.sign(N),this.layer=1,this.mag=k+Math.log10(Math.abs(N));else if(this.sign=Math.sign(N),this.layer=b,b===2){const I=f.mul(O(1,2,k),h(N));return this.sign=I.sign,this.layer=I.layer,this.mag=I.mag,f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this}else this.mag=k;return this.normalize(),f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this}fromValue(e){return e instanceof f?this.fromDecimal(e):typeof e=="number"?this.fromNumber(e):typeof e=="string"?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0,this)}toNumber(){return Number.isFinite(this.layer)?this.layer===0?this.sign*this.mag:this.layer===1?this.sign*Math.pow(10,this.mag):this.mag>0?this.sign>0?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0:Number.NaN}mantissaWithDecimalPlaces(e){return isNaN(this.m)?Number.NaN:this.m===0?0:xe(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:this.mag===0?0:xe(this.mag,e)}toString(){return isNaN(this.layer)||isNaN(this.sign)||isNaN(this.mag)?"NaN":this.mag===Number.POSITIVE_INFINITY||this.layer===Number.POSITIVE_INFINITY?this.sign===1?"Infinity":"-Infinity":this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toString():this.m+"e"+this.e:this.layer===1?this.m+"e"+this.e:this.layer<=en?(this.sign===-1?"-":"")+"e".repeat(this.layer)+this.mag:(this.sign===-1?"-":"")+"(e^"+this.layer+")"+this.mag}toExponential(e){return this.layer===0?(this.sign*this.mag).toExponential(e):this.toStringWithDecimalPlaces(e)}toFixed(e){return this.layer===0?(this.sign*this.mag).toFixed(e):this.toStringWithDecimalPlaces(e)}toPrecision(e){return this.e<=-7?this.toExponential(e-1):e>this.e?this.toFixed(e-this.exponent-1):this.toExponential(e-1)}valueOf(){return this.toString()}toJSON(){return this.toString()}toStringWithDecimalPlaces(e){return this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toFixed(e):xe(this.m,e)+"e"+xe(this.e,e):this.layer===1?xe(this.m,e)+"e"+xe(this.e,e):this.layer<=en?(this.sign===-1?"-":"")+"e".repeat(this.layer)+xe(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+xe(this.mag,e)}abs(){return R(this.sign===0?0:1,this.layer,this.mag)}neg(){return R(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?f.dZero:this.layer===0?O(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?f.dZero:this.layer===0?O(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?f.dZero:this.layer===0?O(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?f.dZero:this.layer===0?O(this.sign,0,Math.trunc(this.mag)):this}add(e){const t=h(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer)||this.sign===0)return t;if(t.sign===0)return this;if(this.sign===-t.sign&&this.layer===t.layer&&this.mag===t.mag)return R(0,0,0);let n,r;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(f.cmpabs(this,t)>0?(n=this,r=t):(n=t,r=this),n.layer===0&&r.layer===0)return f.fromNumber(n.sign*n.mag+r.sign*r.mag);const i=n.layer*Math.sign(n.mag),s=r.layer*Math.sign(r.mag);if(i-s>=2)return n;if(i===0&&s===-1){if(Math.abs(r.mag-Math.log10(n.mag))>Ft)return n;{const o=Math.pow(10,Math.log10(n.mag)-r.mag),c=r.sign+n.sign*o;return O(Math.sign(c),1,r.mag+Math.log10(Math.abs(c)))}}if(i===1&&s===0){if(Math.abs(n.mag-Math.log10(r.mag))>Ft)return n;{const o=Math.pow(10,n.mag-Math.log10(r.mag)),c=r.sign+n.sign*o;return O(Math.sign(c),1,Math.log10(r.mag)+Math.log10(Math.abs(c)))}}if(Math.abs(n.mag-r.mag)>Ft)return n;{const o=Math.pow(10,n.mag-r.mag),c=r.sign+n.sign*o;return O(Math.sign(c),1,r.mag+Math.log10(Math.abs(c)))}}plus(e){return this.add(e)}sub(e){return this.add(h(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const t=h(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer))return t;if(this.sign===0||t.sign===0)return R(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return R(this.sign*t.sign,0,1);let n,r;if(this.layer>t.layer||this.layer==t.layer&&Math.abs(this.mag)>Math.abs(t.mag)?(n=this,r=t):(n=t,r=this),n.layer===0&&r.layer===0)return f.fromNumber(n.sign*r.sign*n.mag*r.mag);if(n.layer>=3||n.layer-r.layer>=2)return O(n.sign*r.sign,n.layer,n.mag);if(n.layer===1&&r.layer===0)return O(n.sign*r.sign,1,n.mag+Math.log10(r.mag));if(n.layer===1&&r.layer===1)return O(n.sign*r.sign,1,n.mag+r.mag);if(n.layer===2&&r.layer===1){const i=O(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)).add(O(Math.sign(r.mag),r.layer-1,Math.abs(r.mag)));return O(n.sign*r.sign,i.layer+1,i.sign*i.mag)}if(n.layer===2&&r.layer===2){const i=O(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)).add(O(Math.sign(r.mag),r.layer-1,Math.abs(r.mag)));return O(n.sign*r.sign,i.layer+1,i.sign*i.mag)}throw Error("Bad arguments to mul: "+this+", "+e)}multiply(e){return this.mul(e)}times(e){return this.mul(e)}div(e){const t=h(e);return this.mul(t.recip())}divide(e){return this.div(e)}divideBy(e){return this.div(e)}dividedBy(e){return this.div(e)}recip(){return this.mag===0?f.dNaN:this.layer===0?O(this.sign,0,1/this.mag):O(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const t=h(e);return this.sign>t.sign?1:this.sign0?this.layer:-this.layer,r=t.mag>0?t.layer:-t.layer;return n>r?1:nt.mag?1:this.mag0?t:this}clamp(e,t){return this.max(e).min(t)}clampMin(e){return this.max(e)}clampMax(e){return this.min(e)}cmp_tolerance(e,t){const n=h(e);return this.eq_tolerance(n,t)?0:this.cmp(n)}compare_tolerance(e,t){return this.cmp_tolerance(e,t)}eq_tolerance(e,t){const n=h(e);if(t==null&&(t=1e-7),this.sign!==n.sign||Math.abs(this.layer-n.layer)>1)return!1;let r=this.mag,i=n.mag;return this.layer>n.layer&&(i=Tt(i)),this.layer0?O(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):O(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?f.dNaN:this.layer>0?O(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):O(this.sign,0,Math.log10(this.mag))}log(e){return e=h(e),this.sign<=0||e.sign<=0||e.sign===1&&e.layer===0&&e.mag===1?f.dNaN:this.layer===0&&e.layer===0?O(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):f.div(this.log10(),e.log10())}log2(){return this.sign<=0?f.dNaN:this.layer===0?O(this.sign,0,Math.log2(this.mag)):this.layer===1?O(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?O(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):O(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?f.dNaN:this.layer===0?O(this.sign,0,Math.log(this.mag)):this.layer===1?O(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?O(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):O(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const t=h(e),n=this,r=t;if(n.sign===0)return r.eq(0)?R(1,0,1):n;if(n.sign===1&&n.layer===0&&n.mag===1)return n;if(r.sign===0)return R(1,0,1);if(r.sign===1&&r.layer===0&&r.mag===1)return n;const i=n.absLog10().mul(r).pow10();return this.sign===-1?Math.abs(r.toNumber()%2)%2===1?i.neg():Math.abs(r.toNumber()%2)%2===0?i:f.dNaN:i}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return f.dNaN;let e=this;if(e.layer===0){const t=Math.pow(10,e.sign*e.mag);if(Number.isFinite(t)&&Math.abs(t)>=.1)return O(1,0,t);if(e.sign===0)return f.dOne;e=R(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?O(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?O(-e.sign,e.layer+1,-e.mag):f.dOne}pow_base(e){return h(e).pow(this)}root(e){const t=h(e);return this.pow(t.recip())}factorial(){return this.mag<0?this.add(1).gamma():this.layer===0?this.add(1).gamma():this.layer===1?f.exp(f.mul(this,f.ln(this).sub(1))):f.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(R(1,0,24)))return f.fromNumber(Kr(this.sign*this.mag));const e=this.mag-1;let t=.9189385332046727;t=t+(e+.5)*Math.log(e),t=t-e;const n=e*e;let r=e,i=12*r,s=1/i,o=t+s;if(o===t||(t=o,r=r*n,i=360*r,s=1/i,o=t-s,o===t))return f.exp(t);t=o,r=r*n,i=1260*r;let c=1/i;return t=t+c,r=r*n,i=1680*r,c=1/i,t=t-c,f.exp(t)}else return this.layer===1?f.exp(f.mul(this,f.ln(this).sub(1))):f.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?f.dOne:this.layer===0&&this.mag<=709.7?f.fromNumber(Math.exp(this.sign*this.mag)):this.layer===0?O(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?O(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):O(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return f.fromNumber(Math.sqrt(this.sign*this.mag));if(this.layer===1)return O(1,2,Math.log10(this.mag)-.3010299956639812);{const e=f.div(R(this.sign,this.layer-1,this.mag),R(1,0,2));return e.layer+=1,e.normalize(),e}}cube(){return this.pow(3)}cbrt(){return this.pow(1/3)}tetrate(e=2,t=R(1,0,1)){if(e===1)return f.pow(this,t);if(e===0)return new f(t);if(this.eq(f.dOne))return f.dOne;if(this.eq(-1))return f.pow(this,t);if(e===Number.POSITIVE_INFINITY){const i=this.toNumber();if(i<=1.444667861009766&&i>=.06598803584531254){if(i>1.444667861009099)return f.fromNumber(Math.E);const s=f.ln(this).neg();return s.lambertw().div(s)}else return i>1.444667861009766?f.fromNumber(Number.POSITIVE_INFINITY):f.dNaN}if(this.eq(f.dZero)){let i=Math.abs((e+1)%2);return i>1&&(i=2-i),f.fromNumber(i)}if(e<0)return f.iteratedlog(t,this,-e);t=h(t);const n=e;e=Math.trunc(e);const r=n-e;if(this.gt(f.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let i=0;i3)return R(t.sign,t.layer+(e-i-1),t.mag);if(i>1e4)return t}return t}iteratedexp(e=2,t=R(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return f.tetrate(e,-t,this);e=h(e);let n=f.fromDecimal(this);const r=t;t=Math.trunc(t);const i=r-t;if(n.layer-e.layer>3){const s=Math.min(t,n.layer-e.layer-3);t-=s,n.layer-=s}for(let s=0;s1e4)return n}return i>0&&i<1&&(e.eq(10)?n=n.layeradd10(-i):n=n.layeradd(-i,e)),n}slog(e=10,t=100){let n=.001,r=!1,i=!1,s=this.slog_internal(e).toNumber();for(let o=1;o1&&i!=d&&(r=!0),i=d,r?n/=2:n*=2,n=Math.abs(n)*(d?-1:1),s+=n,n===0)break}return f.fromNumber(s)}slog_internal(e=10){if(e=h(e),e.lte(f.dZero)||e.eq(f.dOne))return f.dNaN;if(e.lt(f.dOne))return this.eq(f.dOne)?f.dZero:this.eq(f.dZero)?f.dNegOne:f.dNaN;if(this.mag<0||this.eq(f.dZero))return f.dNegOne;let t=0,n=f.fromDecimal(this);if(n.layer-e.layer>3){const r=n.layer-e.layer-3;t+=r,n.layer-=r}for(let r=0;r<100;++r)if(n.lt(f.dZero))n=f.pow(e,n),t-=1;else{if(n.lte(f.dOne))return f.fromNumber(t+f.slog_critical(e.toNumber(),n.toNumber()));t+=1,n=f.log(n,e)}return f.fromNumber(t)}static slog_critical(e,t){return e>10?t-1:f.critical_section(e,t,Zr)}static tetrate_critical(e,t){return f.critical_section(e,t,Jr)}static critical_section(e,t,n){t*=10,t<0&&(t=0),t>10&&(t=10),e<2&&(e=2),e>10&&(e=10);let r=0,i=0;for(let o=0;oe){const c=(e-Ve[o])/(Ve[o+1]-Ve[o]);r=n[o][Math.floor(t)]*(1-c)+n[o+1][Math.floor(t)]*c,i=n[o][Math.ceil(t)]*(1-c)+n[o+1][Math.ceil(t)]*c;break}const s=t-Math.floor(t);return r<=0||i<=0?r*(1-s)+i*s:Math.pow(e,Math.log(r)/Math.log(e)*(1-s)+Math.log(i)/Math.log(e)*s)}layeradd10(e){e=f.fromValue_noAlloc(e).toNumber();const t=f.fromDecimal(this);if(e>=1){t.mag<0&&t.layer>0?(t.sign=0,t.mag=0,t.layer=0):t.sign===-1&&t.layer==0&&(t.sign=1,t.mag=-t.mag);const n=Math.trunc(e);e-=n,t.layer+=n}if(e<=-1){const n=Math.trunc(e);if(e-=n,t.layer+=n,t.layer<0)for(let r=0;r<100;++r){if(t.layer++,t.mag=Math.log10(t.mag),!isFinite(t.mag))return t.sign===0&&(t.sign=1),t.layer<0&&(t.layer=0),t.normalize();if(t.layer>=0)break}}for(;t.layer<0;)t.layer++,t.mag=Math.log10(t.mag);return t.sign===0&&(t.sign=1,t.mag===0&&t.layer>=1&&(t.layer-=1,t.mag=1)),t.normalize(),e!==0?t.layeradd(e,10):t}layeradd(e,t){const r=this.slog(t).toNumber()+e;return r>=0?f.tetrate(t,r):Number.isFinite(r)?r>=-1?f.log(f.tetrate(t,r+1),t):f.log(f.log(f.tetrate(t,r+2),t),t):f.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return f.fromNumber(tn(this.toNumber()));if(this.layer===0)return f.fromNumber(tn(this.sign*this.mag));if(this.layer===1)return nn(this);if(this.layer===2)return nn(this);if(this.layer>=3)return R(this.sign,this.layer-1,this.mag);throw new Error("Unhandled behavior in lambertw()")}ssqrt(){if(this.sign==1&&this.layer>=3)return R(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=R(1,0,1)){t=h(t);const n=e;e=Math.trunc(e);const r=n-e;r!==0&&(t.eq(f.dOne)?(++e,t=f.fromNumber(r)):this.eq(10)?t=t.layeradd10(r):t=t.layeradd(r,this));for(let i=0;i10)return t}return t}sin(){return this.mag<0?this:this.layer===0?f.fromNumber(Math.sin(this.sign*this.mag)):R(0,0,0)}cos(){return this.mag<0?f.dOne:this.layer===0?f.fromNumber(Math.cos(this.sign*this.mag)):R(0,0,0)}tan(){return this.mag<0?this:this.layer===0?f.fromNumber(Math.tan(this.sign*this.mag)):R(0,0,0)}asin(){return this.mag<0?this:this.layer===0?f.fromNumber(Math.asin(this.sign*this.mag)):R(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?f.fromNumber(Math.acos(this.toNumber())):this.layer===0?f.fromNumber(Math.acos(this.sign*this.mag)):R(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?f.fromNumber(Math.atan(this.sign*this.mag)):f.fromNumber(Math.atan(this.sign*(1/0)))}sinh(){return this.exp().sub(this.negate().exp()).div(2)}cosh(){return this.exp().add(this.negate().exp()).div(2)}tanh(){return this.sinh().div(this.cosh())}asinh(){return f.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return f.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?R(Number.NaN,Number.NaN,Number.NaN):f.ln(this.add(1).div(f.fromNumber(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(f.pow(10,e))}egg(){return this.add(9)}lessThanOrEqualTo(e){return this.cmp(e)<1}lessThan(e){return this.cmp(e)<0}greaterThanOrEqualTo(e){return this.cmp(e)>-1}greaterThan(e){return this.cmp(e)>0}};let l=f;l.fromStringCache=new qr(Hr);l.dZero=R(0,0,0);l.dOne=R(1,0,1);l.dNegOne=R(-1,0,1);l.dTwo=R(1,0,2);l.dTen=R(1,0,10);l.dNaN=R(Number.NaN,Number.NaN,Number.NaN);l.dInf=R(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);l.dNegInf=R(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);l.dNumberMax=O(1,0,Number.MAX_VALUE);l.dNumberMin=O(1,0,Number.MIN_VALUE);h=l.fromValue_noAlloc;O=l.fromComponents;R=l.fromComponents_noNormalize;l.fromMantissaExponent;l.fromMantissaExponent_noNormalize;const Yr=new l(1);function nt(e,t,n=!0){let r=l.log10(e).floor(),i=l.div(e,l.pow(10,r));i.toStringWithDecimalPlaces(t)==="10"&&(i=Yr,r=r.add(1));const s=r.gte(1e9)?pe(r,Math.max(Math.max(t,3),A.defaultDecimalsShown)):r.gte(1e4)?bt(r,0):r.toStringWithDecimalPlaces(0);return n?i.toStringWithDecimalPlaces(t)+"e"+s:"e"+s}function bt(e,t){if(e==null)return"NaN";if(e=new l(e),e.mag<.001)return 0 .toFixed(t);const r=e.toStringWithDecimalPlaces(t).split(".");return r[0]=r[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),r.length==1?r[0]:r[0]+"."+r[1]}function gn(e,t){return e==null?"NaN":(e=new l(e),e.mag<1e-4?0 .toFixed(t):(e.mag<.1&&t!==0&&(t=Math.max(Math.max(t,e.log10().negate().ceil().toNumber()),A.defaultDecimalsShown)),e.toStringWithDecimalPlaces(t)))}const Xr=new l("eeee1000"),Qr=new l("e100000"),rn=new l("e1000"),mn=new l(1e9),ei=new l(1e6),ti=new l(1e3),ni=new l(.98),ri=new l(.001),hn=new l(0);function pe(e,t,n){if(t==null&&(t=A.defaultDecimalsShown),n=n!=null?n:A.defaultShowSmall,e=new l(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if(e.sign<0)return"-"+pe(e.neg(),t);if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(Xr)){const r=e.slog();return r.gte(ei)?"F"+pe(r.floor()):l.pow(10,r.sub(r.floor())).toStringWithDecimalPlaces(3)+"F"+bt(r.floor(),0)}else{if(e.gte(Qr))return nt(e,0,!1);if(e.gte(rn))return nt(e,0);if(e.gte(mn))return nt(e,t);if(e.gte(ti))return bt(e,0);if(e.gte(ri)||!n)return gn(e,t);if(e.eq(hn))return 0 .toFixed(t)}return e=vn(e),e.lt(rn)?nt(e,t).replace(/([^(?:e|F)]*)$/,"-$1"):pe(e,t)+"\u207B\xB9"}function he(e){return e=new l(e),e.sign<0?"-"+he(e.neg()):e.gte(mn)||e.lte(ni)&&!e.eq(hn)?pe(e):pe(e,0)}function pn(e){return l.lt(e,0)?"-"+pn(l.neg(e)):l.gt(e,2**51)?pe(l.div(e,31536e3))+"y":(e=new l(e).toNumber(),e<60?pe(e)+"s":e<3600?he(Math.floor(e/60))+"m "+pe(e%60)+"s":e<86400?he(Math.floor(e/3600))+"h "+he(Math.floor(e/60)%60)+"m "+he(e%60)+"s":e<31536e3?he(Math.floor(e/84600)%365)+"d "+he(Math.floor(e/3600)%24)+"h "+he(Math.floor(e/60)%60)+"m":he(Math.floor(e/31536e3))+"y "+he(Math.floor(e/84600)%365)+"d "+he(Math.floor(e/3600)%24)+"h")}function ii(e,t,n){e=new l(e);let r=e.toStringWithDecimalPlaces(t);return new l(r).gte(n)&&(r=l.sub(n,Math.pow(.1,t)).toStringWithDecimalPlaces(t)),r}function si(e,t){return pe(e,t,!0)}function vn(e){let t=l.log10(e).ceil();const n=l.div(e,l.pow(10,t));return t=t.neg(),e=new l(10).pow(t).times(n),e}var ai=Object.freeze(Object.defineProperty({__proto__:null,default:l,exponentialFormat:nt,commaFormat:bt,regularFormat:gn,format:pe,formatWhole:he,formatTime:pn,toPlaces:ii,formatSmall:si,invertOOM:vn},Symbol.toStringTag,{value:"Module"}));const{exponentialFormat:oi,commaFormat:li,regularFormat:ui,format:Se,formatWhole:st,formatTime:St,toPlaces:ci,formatSmall:di,invertOOM:fi}=ai;window.Decimal=l;window.exponentialFormat=oi;window.commaFormat=li;window.regularFormat=ui;window.format=Se;window.formatWhole=st;window.formatTime=St;window.toPlaces=ci;window.formatSmall=di;window.invertOOM=fi;function bn(e){let t=e.replace(/([A-Z])/g," $1");return t=t.charAt(0).toUpperCase()+t.slice(1),t}function gi(e){return(e[0]+e.slice(1).replace(/[A-Z]/g,t=>`-${t}`)).toLowerCase()}function Pt(e){return typeof e=="function"}var Z=(e=>(e.Up="Up",e.Down="Down",e.Left="Left",e.Right="Right",e.Default="Up",e))(Z||{});const at=Symbol("DoNotCache");function E(e,t){const n=e[t];Pt(n)&&n.length===0&&!n[at]?e[t]=P(n.bind(e)):Pt(n)&&(e[t]=n.bind(e),e[t][at]=!0)}function Et(e){return Pt(e)&&!e[at]&&(e=P(e)),e}const Pe=Symbol("Component"),Ee=Symbol("GatherProps");let mi=0;function It(e="feature-"){return e+mi++}var Xe=(e=>(e[e.Visible=0]="Visible",e[e.Hidden=1]="Hidden",e[e.None=2]="None",e))(Xe||{});function yn(e){const t=u(e);return t!==2&&t!==!1}function _n(e){return u(e)===1}function ee(e){return e[at]=!0,e}function ce(e,t,n){e[t]===void 0&&n!=null&&(e[t]=n)}function Nn(e,...t){const n=[],r=i=>{Object.keys(i).forEach(s=>{const o=i[s];o!=null&&typeof o=="object"&&(t.includes(o.type)?n.push(o):!(o instanceof l)&&!te(o)&&r(o))})};return r(e),n}var J=window.state=Ct({lastTenTicks:[],hasNaN:!1,NaNPath:[],errors:Ye([])});const De={variables:{"--foreground":"#dfdfdf","--background":"#0f0f0f","--feature-foreground":"#0f0f0f","--tooltip-background":"rgba(0, 0, 0, 0.75)","--raised-background":"#0f0f0f","--points":"#ffffff","--locked":"#bf8f8f","--highlighted":"#333","--bought":"#77bf5f","--danger":"rgb(220, 53, 69)","--link":"#02f2f2","--outline":"#dfdfdf","--accent1":"#627a82","--accent2":"#658262","--accent3":"#7c6282","--border-radius":"15px","--modal-border":"solid 2px var(--color)","--feature-margin":"0px"},floatingTabs:!0,mergeAdjacent:!0,showPin:!0};var qt=(e=>(e.Classic="classic",e.Paper="paper",e.Nordic="nordic",e.Aqua="aqua",e))(qt||{}),At={classic:De,paper:{...De,variables:{...De.variables,"--background":"#2a323d","--feature-foreground":"#000","--raised-background":"#333c4a","--locked":"#3a3e45","--bought":"#5C8A58","--outline":"#333c4a","--border-radius":"4px","--modal-border":"","--feature-margin":"5px"},floatingTabs:!1},nordic:{...De,variables:{...De.variables,"--foreground":"#D8DEE9","--background":"#2E3440","--feature-foreground":"#000","--raised-background":"#3B4252","--points":"#E5E9F0","--locked":"#4c566a","--highlighted":"#434c5e","--bought":"#8FBCBB","--danger":"#D08770","--link":"#88C0D0","--outline":"#3B4252","--accent1":"#B48EAD","--accent2":"#A3BE8C","--accent3":"#EBCB8B","--border-radius":"4px","--modal-border":"solid 2px #3B4252","--feature-margin":"5px"},floatingTabs:!1},aqua:{...De,variables:{...De.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}};const se=cn();"fonts"in document&&(document.fonts.onloadingdone=()=>se.emit("fontsLoaded"));var hi=Object.freeze(Object.defineProperty({__proto__:null,globalBus:se},Symbol.toStringTag,{value:"Module"}));function wn(e={}){return Object.assign({id:`${A.id}-0`,name:"Default Save",tabs:A.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:A.id,modVersion:A.versionNumber,layers:{}},e)}function fe(e){const t=Ce.compressToUTF16(Lt(e!=null?e:x));return localStorage.setItem((e!=null?e:x).id,t),t}async function pi(){bi();try{let e=localStorage.getItem(ne.active);if(e==null){await qe(Je());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Ce.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==A.id){await qe(Je());return}t.id=ne.active,await qe(t)}catch(e){console.error(`Failed to load save. Falling back to new save. -`,e),await qe(Je())}}function Je(){const e=mt(),t=wn({id:e});return fe(t),ne.saves.push(e),t}function mt(){let e,t=0;do e=`${A.id}-${t++}`;while(localStorage.getItem(e)!=null);return e}const Bt=F(!1);async function qe(e){console.info("Loading save",e),Bt.value=!0;const{layers:t,removeLayer:n,addLayer:r}=await it(()=>Promise.resolve().then(function(){return ca}),void 0),{fixOldSave:i,getInitialLayers:s}=await it(()=>Promise.resolve().then(function(){return ou}),void 0);for(const o in t){const c=t[o];c&&n(c)}s(e).forEach(o=>r(o,e)),e=wn(e),e.offlineProd&&e.time!=null&&e.time&&e.devSpeed!==0&&(e.offlineTime==null&&(e.offlineTime=0),e.offlineTime+=Math.min(e.offlineTime+(Date.now()-e.time)/1e3,A.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==A.versionNumber&&(i(e.modVersion,e),e.modVersion=A.versionNumber),Object.assign(x,e),ne.active=x.id,se.emit("onLoad")}setInterval(()=>{x.autosave&&fe()},1e3);window.onbeforeunload=()=>{x.autosave&&fe()};window.save=fe;const vi=window.hardReset=async()=>{await qe(Je())};window.deleteLowerSaves=()=>{const e=Object.values(ne.saves).indexOf(x.id)+1;Object.values(ne.saves).slice(e).forEach(t=>localStorage.removeItem(t)),ne.saves=ne.saves.slice(0,e)};const ot=Ye({active:"",saves:[],showTPS:!0,theme:qt.Nordic,unthrottled:!1,alignUnits:!1});_e(ot,e=>{const t=Ce.compressToUTF16(JSON.stringify(e));localStorage.setItem(A.id,t)},{deep:!0});var ne=window.settings=ot;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:qt.Nordic,alignUnits:!1};se.emit("loadSettings",e),Object.assign(ot,e),vi()};function bi(){try{let e=localStorage.getItem(A.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Ce.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(ot,t)}se.emit("loadSettings",ot)}catch{}}const yi=Ye([]),Cn=Ye([]);function _i(e){Cn.push(e)}const Ni=Ye([]);function ue(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}`),q({template:e})):q({render:()=>({})}):e}function ut(e){if(Mt(e))return typeof e=="function"?e():ue(e);const t=e[Pe];return y(t,e[Ee](),null)}function ht(e){if(Mt(e))return typeof e=="function"?e():typeof e=="string"?y(j,null,[e]):y(e,null,null);const t=e[Pe];return y(t,e[Ee](),null)}function Mt(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[at]===!0}function kn(e,t){const n=F(null),r=F(void 0);function i(c){n.value||(n.value=setInterval(o,250)),r.value=c}function s(){n.value&&(clearInterval(n.value),n.value=null)}function o(){t&&t.value?t.value():e&&e.value&&e.value(r.value)}return ln(s),{start:i,stop:s,handleHolding:o}}function wi(e,t="div"){const n=be();return Be(()=>{n.value=ue(ye(e),t)}),n}function Qe(e,t="div"){const n=be(null);return Be(()=>{const r=ye(e);n.value=r==""||r==null?null:ue(r,t)}),n}function ye(e){return u(u(e))}function B(...e){return e.includes(Object)||e.push(Object),e}function Ci(e){return Object.keys(e).reduce((t,n)=>(t[gi(n)]=e[n],t),{})}const ki=q({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var b;const n=F({}),r=new ResizeObserver(c),i=F(null);lt(()=>{const v=i.value;v!=null&&r.observe(v)});let s=!0,o=F((b=i.value)==null?void 0:b.getBoundingClientRect());function c(){s&&(s=!1,Ue(()=>{var v;o.value=(v=i.value)==null?void 0:v.getBoundingClientRect(),Object.values(n.value).filter(N=>N).forEach(N=>N.rect=N.element.getBoundingClientRect()),t("updateNodes",n.value),s=!0}))}se.on("fontsLoaded",c);const d={attributes:!1,childList:!0,subtree:!1};ft(Ut,(v,N)=>{const k=new MutationObserver(()=>g(v));k.observe(N,d),n.value[v]={element:N,observer:k,rect:N.getBoundingClientRect()},c()}),ft(zt,v=>{var N;(N=n.value[v])==null||N.observer.disconnect(),n.value[v]=void 0,c()}),ft(Gt,n),ft(jt,o);function g(v){const N=n.value[v];N!=null&&(N.rect=N.element.getBoundingClientRect(),t("updateNodes",n.value))}return(v,N)=>(p(),_(j,null,[Te(v.$slots,"default",{},void 0,!0),m("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var Sn=z(ki,[["__scopeId","data-v-2b1dc1bc"]]);const Si=["onPointerdown"],Ii={class:"modal-wrapper"},Mi={class:"modal-container"},$i={class:"modal-header"},xi={class:"modal-body"},Fi={class:"modal-footer"},Ti=m("div",{class:"modal-default-flex-grow"},null,-1),je=q({__name:"Modal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){const i=de(e),s=P(()=>u(i.modelValue)||c.value);function o(){n("update:modelValue",!1)}const c=F(!1),d=F(null),g=P(()=>{var b,v;return(v=(b=d.value)==null?void 0:b.nodes)!=null?v:null});return t({isOpen:s,nodes:g}),(b,v)=>(p(),L(qn,{to:"#modal-root"},[y(un,{name:"modal",onBeforeEnter:v[0]||(v[0]=N=>c.value=!0),onAfterLeave:v[1]||(v[1]=N=>c.value=!1)},{default:V(()=>[Dt(m("div",Oe({class:"modal-mask",onPointerdown:rt(o,["self"])},b.$attrs),[m("div",Ii,[m("div",Mi,[m("div",$i,[Te(b.$slots,"header",{shown:u(s)},()=>[T(" default header ")])]),m("div",xi,[y(Sn,{ref_key:"contextRef",ref:d},{default:V(()=>[Te(b.$slots,"body",{shown:u(s)},()=>[T(" default body ")])]),_:3},512)]),m("div",Fi,[Te(b.$slots,"footer",{shown:u(s)},()=>[m("div",{class:"modal-default-footer"},[Ti,m("button",{class:"button modal-default-button",onClick:o}," Close ")])])])])])],16,Si),[[Rn,e.modelValue]])]),_:3})]))}}),Re=Symbol("ProxyState");function He(e,t={}){const n=t;let r=!1,i=!1;function s(){return r||(i&&console.error("Cyclical dependency detected. Cannot evaluate lazy proxy."),i=!0,Object.assign(n,e.call(n,n)),r=!0),n}return new Proxy(n,{get(o,c){if(c===Re)return s();const d=s()[c];return d!=null&&typeof d=="object"&&Fe in d?d[Fe]:d},set(o,c,d){return s()[c]=d,!0},has(o,c){return c===Re?!0:Reflect.has(s(),c)},ownKeys(){return Reflect.ownKeys(s())},getOwnPropertyDescriptor(o,c){return r||(Object.assign(n,e.call(n,n)),r=!0),Object.getOwnPropertyDescriptor(o,c)}})}const In=l.ln(10);function pt(e){return e}function tt(e,...t){const n=t.find(r=>w(r));return n==null?(console.error("Could not invert due to no input being a variable"),0):n.invert(e)}function Pi(e,t){return w(t)?t.invert(l.neg(e)):(console.error("Could not invert due to no input being a variable"),0)}function Ei(e,t){return w(t)?t.isIntegrable()?a.neg(t.getIntegralFormula(e)):(console.error("Could not integrate due to variable not being integrable"),a.constant(0)):(console.error("Could not integrate due to no input being a variable"),a.constant(0))}function Oi(e){return a.neg(e)}function Vi(e,t,n){return w(t)?t.invert(l.sub(e,K(n))):w(n)?n.invert(l.sub(e,K(t))):(console.error("Could not invert due to no input being a variable"),0)}function Di(e,t,n){var r,i;if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const s=t.getIntegralFormula(e);return a.times(n,(r=t.innermostVariable)!=null?r:0).add(s)}else if(w(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const s=n.getIntegralFormula(e);return a.times(t,(i=n.innermostVariable)!=null?i:0).add(s)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Li(e,t,n){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=t.getIntegralFormula(e);return a.add(r,n)}else if(w(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=n.getIntegralFormula(e);return a.add(r,t)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Ri(e,t,n){return w(t)?t.invert(l.add(e,K(n))):w(n)?n.invert(l.sub(K(t),e)):(console.error("Could not invert due to no input being a variable"),0)}function qi(e,t,n){var r,i;if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const s=t.getIntegralFormula(e);return a.sub(s,a.times(n,(r=t.innermostVariable)!=null?r:0))}else if(w(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const s=n.getIntegralFormula(e);return a.times(t,(i=n.innermostVariable)!=null?i:0).sub(s)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Ai(e,t,n){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=t.getIntegralFormula(e);return a.sub(r,n)}else if(w(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=n.getIntegralFormula(e);return a.sub(r,t)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Bi(e,t,n){return w(t)?t.invert(l.div(e,K(n))):w(n)?n.invert(l.div(e,K(t))):(console.error("Could not invert due to no input being a variable"),0)}function Ui(e,t,n){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=t.getIntegralFormula(e);return a.times(r,n)}else if(w(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=n.getIntegralFormula(e);return a.times(r,t)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function zi(e,t,n){return w(t)?a.div(e,n):w(n)?a.div(e,t):(console.error("Could not apply substitution due to no input being a variable"),a.constant(0))}function Gi(e,t,n){return w(t)?t.invert(l.mul(e,K(n))):w(n)?n.invert(l.div(K(t),e)):(console.error("Could not invert due to no input being a variable"),0)}function ji(e,t,n){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=t.getIntegralFormula(e);return a.div(r,n)}else if(w(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=n.getIntegralFormula(e);return a.div(t,r)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Hi(e,t,n){return w(t)?a.mul(e,n):w(n)?a.mul(e,t):(console.error("Could not apply substitution due to no input being a variable"),a.constant(0))}function Wi(e,t){return w(t)?t.invert(l.recip(e)):(console.error("Could not invert due to no input being a variable"),0)}function Ji(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.ln(n)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Zi(e,t){return w(t)?t.invert(l.pow10(e)):(console.error("Could not invert due to no input being a variable"),0)}function Ki(e){return l.ln(e).sub(1).times(e).div(In)}function Yi(e,t){if(w(t)){const n=In.times(e);return t.invert(n.div(n.div(Math.E).lambertw()))}return console.error("Could not invert due to no input being a variable"),0}function Xi(e,t){return w(t)?t.isIntegrable()?new a({inputs:[t.getIntegralFormula(e)],evaluate:Ki,invert:Yi}):(console.error("Could not integrate due to variable not being integrable"),a.constant(0)):(console.error("Could not integrate due to no input being a variable"),a.constant(0))}function Qi(e,t,n){return w(t)?t.invert(l.pow(K(n),e)):w(n)?n.invert(l.root(K(t),e)):(console.error("Could not invert due to no input being a variable"),0)}function es(e,t){return l.ln(e).sub(1).times(e).div(l.ln(t))}function ts(e,t,n){if(w(t)){const r=l.ln(K(n)).times(e);return t.invert(r.div(r.div(Math.E).lambertw()))}return console.error("Could not invert due to no input being a variable"),0}function ns(e,t,n){return w(t)?t.isIntegrable()?new a({inputs:[t.getIntegralFormula(e),n],evaluate:es,invert:ts}):(console.error("Could not integrate due to variable not being integrable"),a.constant(0)):(console.error("Could not integrate due to no input being a variable"),a.constant(0))}function rs(e,t){return w(t)?t.invert(l.pow(2,e)):(console.error("Could not invert due to no input being a variable"),0)}function is(e){return l.ln(e).sub(1).times(e).div(l.ln(2))}function ss(e,t){if(w(t)){const n=l.ln(2).times(e);return t.invert(n.div(n.div(Math.E).lambertw()))}return console.error("Could not invert due to no input being a variable"),0}function as(e,t){return w(t)?t.isIntegrable()?new a({inputs:[t.getIntegralFormula(e)],evaluate:is,invert:ss}):(console.error("Could not integrate due to variable not being integrable"),a.constant(0)):(console.error("Could not integrate due to no input being a variable"),a.constant(0))}function os(e,t){return w(t)?t.invert(l.exp(e)):(console.error("Could not invert due to no input being a variable"),0)}function ls(e){return l.ln(e).sub(1).times(e)}function us(e,t){return w(t)?t.invert(l.div(e,l.div(e,Math.E).lambertw())):(console.error("Could not invert due to no input being a variable"),0)}function cs(e,t){return w(t)?t.isIntegrable()?new a({inputs:[t.getIntegralFormula(e)],evaluate:ls,invert:us}):(console.error("Could not integrate due to variable not being integrable"),a.constant(0)):(console.error("Could not integrate due to no input being a variable"),a.constant(0))}function ds(e,t,n){return w(t)?t.invert(l.root(e,K(n))):w(n)?n.invert(l.ln(e).div(l.ln(K(t)))):(console.error("Could not invert due to no input being a variable"),0)}function fs(e,t,n){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=t.getIntegralFormula(e),i=a.add(n,1);return a.pow(r,i).div(i)}else if(w(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=n.getIntegralFormula(e);return a.pow(t,r).div(a.ln(t))}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function gs(e,t){return w(t)?t.invert(l.root(e,10)):(console.error("Could not invert due to no input being a variable"),0)}function ms(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.pow10(n).div(a.ln(10))}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function hs(e,t,n){return w(t)?t.invert(l.ln(e).div(l.ln(K(n)))):w(n)?n.invert(l.root(K(t),e)):(console.error("Could not invert due to no input being a variable"),0)}function ps(e,t,n){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=t.getIntegralFormula(e);return a.pow(n,r).div(a.ln(n))}else if(w(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=n.getIntegralFormula(e),i=a.add(t,1);return a.pow(r,i).div(i)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function vs(e,t,n){return w(t)?t.invert(l.root(e,l.recip(K(n)))):w(n)?n.invert(l.ln(K(t)).div(l.ln(e))):(console.error("Could not invert due to no input being a variable"),0)}function bs(e,t,n){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=t.getIntegralFormula(e);return a.pow(r,a.recip(n).add(1)).times(n).div(a.add(n,1))}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function ys(e,t){return w(t)?t.invert(l.ln(e)):(console.error("Could not invert due to no input being a variable"),0)}function _s(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.exp(n)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Ns(e,t=2,n=l.fromComponents_noNormalize(1,0,1)){const r=l.minabs(t,1e308).toNumber();return l.tetrate(e,r,n)}function ws(e,t,n,r){return w(t)?t.invert(l.ssqrt(e)):(console.error("Could not invert due to no input being a variable"),0)}function Cs(e,t=2,n=l.fromComponents_noNormalize(1,0,1)){const r=l.minabs(t,1e308).toNumber();return l.iteratedexp(e,r,new l(n))}function ks(e,t,n,r){return w(t)?t.invert(l.iteratedlog(e,Math.E,l.minabs(1e308,K(n)).toNumber())):(console.error("Could not invert due to no input being a variable"),0)}function Ss(e,t=10,n=2){const r=l.minabs(n,1e308).toNumber();return l.iteratedlog(e,t,r)}function Is(e,t=10){const n=l.minabs(t,1e308).toNumber();return l.slog(e,n)}function Ms(e,t,n){return w(t)?t.invert(l.tetrate(e,l.minabs(1e308,K(n)).toNumber())):(console.error("Could not invert due to no input being a variable"),0)}function $s(e,t,n){const r=l.minabs(t,1e308).toNumber();return l.layeradd(e,r,n)}function xs(e,t,n,r){return w(t)?t.invert(l.layeradd(e,l.minabs(1e308,K(n)).negate().toNumber())):(console.error("Could not invert due to no input being a variable"),0)}function Fs(e,t){return w(t)?t.invert(l.pow(Math.E,e).times(e)):(console.error("Could not invert due to no input being a variable"),0)}function Ts(e,t){return w(t)?t.invert(l.tetrate(e,2)):(console.error("Could not invert due to no input being a variable"),0)}function Ps(e,t,n){const r=l.minabs(t,1e308).toNumber();return l.pentate(e,r,n)}function Es(e,t){return w(t)?t.invert(l.asin(e)):(console.error("Could not invert due to no input being a variable"),0)}function Os(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.cos(n).neg()}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Vs(e,t){return w(t)?t.invert(l.acos(e)):(console.error("Could not invert due to no input being a variable"),0)}function Ds(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.sin(n)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Ls(e,t){return w(t)?t.invert(l.atan(e)):(console.error("Could not invert due to no input being a variable"),0)}function Rs(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.cos(n).ln().neg()}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function qs(e,t){return w(t)?t.invert(l.sin(e)):(console.error("Could not invert due to no input being a variable"),0)}function As(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.asin(n).times(n).add(a.sqrt(a.sub(1,a.pow(n,2))))}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Bs(e,t){return w(t)?t.invert(l.cos(e)):(console.error("Could not invert due to no input being a variable"),0)}function Us(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.acos(n).times(n).sub(a.sqrt(a.sub(1,a.pow(n,2))))}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function zs(e,t){return w(t)?t.invert(l.tan(e)):(console.error("Could not invert due to no input being a variable"),0)}function Gs(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.atan(n).times(n).sub(a.ln(a.pow(n,2).add(1)).div(2))}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function js(e,t){return w(t)?t.invert(l.asinh(e)):(console.error("Could not invert due to no input being a variable"),0)}function Hs(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.cosh(n)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Ws(e,t){return w(t)?t.invert(l.acosh(e)):(console.error("Could not invert due to no input being a variable"),0)}function Js(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.sinh(n)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Zs(e,t){return w(t)?t.invert(l.atanh(e)):(console.error("Could not invert due to no input being a variable"),0)}function Ks(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.cosh(n).ln()}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Ys(e,t){return w(t)?t.invert(l.sinh(e)):(console.error("Could not invert due to no input being a variable"),0)}function Xs(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.asinh(n).times(n).sub(a.pow(n,2).add(1).sqrt())}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Qs(e,t){return w(t)?t.invert(l.cosh(e)):(console.error("Could not invert due to no input being a variable"),0)}function ea(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.acosh(n).times(n).sub(a.add(n,1).sqrt().times(a.sub(n,1).sqrt()))}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function ta(e,t){return w(t)?t.invert(l.tanh(e)):(console.error("Could not invert due to no input being a variable"),0)}function na(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.atanh(n).times(n).add(a.sub(1,a.pow(n,2)).ln().div(2))}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function et(e){return(t,n)=>new a({inputs:[t,n],evaluate:e,invert:pt})}function w(e){return e instanceof H&&e.hasVariable()}function K(e,t){return e instanceof H?e.evaluate(t):u(e)}function ra(){return a.pow(this,2).div(2)}function ia(){return this}const X=class{constructor(e){this.negate=this.neg,this.negated=this.neg,this.sgn=this.sign,this.plus=this.add,this.subtract=this.sub,this.minus=this.sub,this.multiply=this.mul,this.times=this.mul,this.divide=this.div,this.divideBy=this.div,this.dividedBy=this.div,this.reciprocal=this.recip,this.reciprocate=this.recip,this.logarithm=this.log;let t;"inputs"in e&&(e.inputs=e.inputs.map(n=>typeof n=="object"&&Fe in n?n[Fe]:n)),"variable"in e?(typeof e.variable=="object"&&Fe in e.variable&&(e.variable=e.variable[Fe]),t=this.setupVariable(e)):"evaluate"in e?t=this.setupFormula(e):t=this.setupConstant(e),this.inputs=t.inputs,this.internalVariables=t.internalVariables,this.innermostVariable=t.innermostVariable,this.internalEvaluate=t.internalEvaluate,this.internalInvert=t.internalInvert,this.internalIntegrate=t.internalIntegrate,this.internalIntegrateInner=t.internalIntegrateInner,this.applySubstitution=t.applySubstitution}setupVariable({variable:e}){return{inputs:[e],internalVariables:1,innermostVariable:e,internalIntegrate:ra,internalIntegrateInner:ia,applySubstitution:pt}}setupConstant({inputs:e}){return e.length!==1&&console.error("Evaluate function is required if inputs is not length 1"),{inputs:e,internalVariables:0}}setupFormula(e){var N,k;const{inputs:t,evaluate:n,invert:r,integrate:i,integrateInner:s,applySubstitution:o}=e,c=t.reduce((I,C)=>I+(C instanceof X?C.internalVariables:0),0),d=t.find(I=>I instanceof X&&I.hasVariable()),g=c===1?d==null?void 0:d.innermostVariable:void 0,b=(N=d==null?void 0:d.isInvertible())!=null?N:!1,v=(k=d==null?void 0:d.isIntegrable())!=null?k:!1;return{inputs:t,internalEvaluate:n,internalInvert:b?r:void 0,internalIntegrate:v?i:void 0,internalIntegrateInner:s,applySubstitution:o,innermostVariable:g,internalVariables:c}}isInvertible(){return this.hasVariable()&&(this.internalInvert!=null||this.internalEvaluate==null)}isIntegrable(){return this.hasVariable()&&this.internalIntegrate!=null}isIntegralInvertible(){return this.isIntegrable()?this.getIntegralFormula().isInvertible():!1}hasVariable(){return this.internalVariables===1}evaluate(e){var t,n,r;return(r=(n=(t=this.internalEvaluate)==null?void 0:t.call(this,...this.inputs.map(i=>K(i,e))))!=null?n:this.hasVariable()?e:null)!=null?r:K(this.inputs[0])}equals(e){return this.inputs.length===e.inputs.length&&this.inputs.every((t,n)=>t instanceof X&&e.inputs[n]instanceof X?t.equals(e.inputs[n]):!(t instanceof X)&&!(e.inputs[n]instanceof X)&&l.eq(u(t),u(e.inputs[n])))&&this.internalEvaluate===e.internalEvaluate&&this.internalInvert===e.internalInvert&&this.internalIntegrate===e.internalIntegrate&&this.internalVariables===e.internalVariables}static constant(e){return new a({inputs:[e]})}static variable(e){return new a({variable:e})}static step(e,t,n){const r=n(a.variable(0)),i=Et(t);function s(c){return l.lt(c,u(i))?c:l.add(r.evaluate(l.sub(c,u(i))),u(i))}function o(c,d){return w(d)&&r.isInvertible()?(l.gt(c,u(i))&&(c=l.add(r.invert(l.sub(c,u(i))),u(i))),d.invert(c)):(console.error("Could not invert due to no input being a variable"),0)}return new a({inputs:[e],evaluate:s,invert:r.isInvertible()&&r.hasVariable()?o:void 0})}static if(e,t,n,r){const i=F(0),s=a.variable(i),o=n(s),c=r==null?void 0:r(s),d=Et(t);function g(v){return u(d)?(i.value=v,o.evaluate()):c?(i.value=v,c.evaluate()):v}function b(v,N){return!w(N)||!o.isInvertible()||c!=null&&!c.isInvertible()?(console.error("Could not invert due to no input being a variable"),0):u(d)?N.invert(o.invert(v)):c?N.invert(c.invert(v)):N.invert(v)}return new a({inputs:[e],evaluate:g,invert:o.isInvertible()&&o.hasVariable()?b:void 0})}static conditional(e,t,n,r){return a.if(e,t,n,r)}static abs(e){return new a({inputs:[e],evaluate:l.abs})}static neg(e){return new a({inputs:[e],evaluate:l.neg,invert:Pi,applySubstitution:Oi,integrate:Ei})}static sign(e){return new a({inputs:[e],evaluate:l.sign})}static round(e){return new a({inputs:[e],evaluate:l.round,invert:tt})}static floor(e){return new a({inputs:[e],evaluate:l.floor,invert:tt})}static ceil(e){return new a({inputs:[e],evaluate:l.ceil,invert:tt})}static trunc(e){return new a({inputs:[e],evaluate:l.trunc,invert:tt})}static add(e,t){return new a({inputs:[e,t],evaluate:l.add,invert:Vi,integrate:Di,integrateInner:Li,applySubstitution:pt})}static sub(e,t){return new a({inputs:[e,t],evaluate:l.sub,invert:Ri,integrate:qi,integrateInner:Ai,applySubstitution:pt})}static mul(e,t){return new a({inputs:[e,t],evaluate:l.mul,invert:Bi,integrate:Ui,applySubstitution:zi})}static div(e,t){return new a({inputs:[e,t],evaluate:l.div,invert:Gi,integrate:ji,applySubstitution:Hi})}static recip(e){return new a({inputs:[e],evaluate:l.recip,invert:Wi,integrate:Ji})}static clamp(e,t,n){return new a({inputs:[e,t,n],evaluate:l.clamp,invert:tt})}static pLog10(e){return new a({inputs:[e],evaluate:l.pLog10})}static absLog10(e){return new a({inputs:[e],evaluate:l.absLog10})}static log10(e){return new a({inputs:[e],evaluate:l.log10,invert:Zi,integrate:Xi})}static log(e,t){return new a({inputs:[e,t],evaluate:l.log,invert:Qi,integrate:ns})}static log2(e){return new a({inputs:[e],evaluate:l.log2,invert:rs,integrate:as})}static ln(e){return new a({inputs:[e],evaluate:l.ln,invert:os,integrate:cs})}static pow(e,t){return new a({inputs:[e,t],evaluate:l.pow,invert:ds,integrate:fs})}static pow10(e){return new a({inputs:[e],evaluate:l.pow10,invert:gs,integrate:ms})}static pow_base(e,t){return new a({inputs:[e,t],evaluate:l.pow_base,invert:hs,integrate:ps})}static root(e,t){return new a({inputs:[e,t],evaluate:l.root,invert:vs,integrate:bs})}static factorial(e){return new a({inputs:[e],evaluate:l.factorial})}static gamma(e){return new a({inputs:[e],evaluate:l.gamma})}static lngamma(e){return new a({inputs:[e],evaluate:l.lngamma})}static exp(e){return new a({inputs:[e],evaluate:l.exp,invert:ys,integrate:_s})}static sqr(e){return a.pow(e,2)}static sqrt(e){return a.root(e,2)}static cube(e){return a.pow(e,3)}static cbrt(e){return a.root(e,3)}static tetrate(e,t=2,n=l.fromComponents_noNormalize(1,0,1)){return new a({inputs:[e,t,n],evaluate:Ns,invert:ws})}static iteratedexp(e,t=2,n=l.fromComponents_noNormalize(1,0,1)){return new a({inputs:[e,t,n],evaluate:Cs,invert:ks})}static iteratedlog(e,t=10,n=1){return new a({inputs:[e,t,n],evaluate:Ss})}static slog(e,t=10){return new a({inputs:[e,t],evaluate:Is,invert:Ms})}static layeradd10(e,t){return new a({inputs:[e,t],evaluate:l.layeradd10})}static layeradd(e,t,n=10){return new a({inputs:[e,t,n],evaluate:$s,invert:xs})}static lambertw(e){return new a({inputs:[e],evaluate:l.lambertw,invert:Fs})}static ssqrt(e){return new a({inputs:[e],evaluate:l.ssqrt,invert:Ts})}static pentate(e,t=2,n=l.fromComponents_noNormalize(1,0,1)){return new a({inputs:[e,t,n],evaluate:Ps})}static sin(e){return new a({inputs:[e],evaluate:l.sin,invert:qs,integrate:Os})}static cos(e){return new a({inputs:[e],evaluate:l.cos,invert:Bs,integrate:Ds})}static tan(e){return new a({inputs:[e],evaluate:l.tan,invert:zs,integrate:Rs})}static asin(e){return new a({inputs:[e],evaluate:l.asin,invert:Es,integrate:As})}static acos(e){return new a({inputs:[e],evaluate:l.acos,invert:Vs,integrate:Us})}static atan(e){return new a({inputs:[e],evaluate:l.atan,invert:Ls,integrate:Gs})}static sinh(e){return new a({inputs:[e],evaluate:l.sinh,invert:Ys,integrate:Hs})}static cosh(e){return new a({inputs:[e],evaluate:l.cosh,invert:Qs,integrate:Js})}static tanh(e){return new a({inputs:[e],evaluate:l.tanh,invert:ta,integrate:Ks})}static asinh(e){return new a({inputs:[e],evaluate:l.asinh,invert:js,integrate:Xs})}static acosh(e){return new a({inputs:[e],evaluate:l.acosh,invert:Ws,integrate:ea})}static atanh(e){return new a({inputs:[e],evaluate:l.atanh,invert:Zs,integrate:na})}step(e,t){return a.step(this,e,t)}if(e,t){return a.if(this,e,t)}conditional(e,t){return a.if(this,e,t)}abs(){return a.abs(this)}neg(){return a.neg(this)}sign(){return a.sign(this)}round(){return a.round(this)}floor(){return a.floor(this)}ceil(){return a.ceil(this)}trunc(){return a.trunc(this)}add(e){return a.add(this,e)}sub(e){return a.sub(this,e)}mul(e){return a.mul(this,e)}div(e){return a.div(this,e)}recip(){return a.recip(this)}max(e){return a.max(this,e)}min(e){return a.min(this,e)}maxabs(e){return a.maxabs(this,e)}minabs(e){return a.minabs(this,e)}clamp(e,t){return a.clamp(this,e,t)}clampMin(e){return a.clampMin(this,e)}clampMax(e){return a.clampMax(this,e)}pLog10(){return a.pLog10(this)}absLog10(){return a.absLog10(this)}log10(){return a.log10(this)}log(e){return a.log(this,e)}log2(){return a.log2(this)}ln(){return a.ln(this)}pow(e){return a.pow(this,e)}pow10(){return a.pow10(this)}pow_base(e){return a.pow_base(this,e)}root(e){return a.root(this,e)}factorial(){return a.factorial(this)}gamma(){return a.gamma(this)}lngamma(){return a.lngamma(this)}exp(){return a.exp(this)}sqr(){return a.pow(this,2)}sqrt(){return a.root(this,2)}cube(){return a.pow(this,3)}cbrt(){return a.root(this,3)}tetrate(e=2,t=l.fromComponents_noNormalize(1,0,1)){return a.tetrate(this,e,t)}iteratedexp(e=2,t=l.fromComponents_noNormalize(1,0,1)){return a.iteratedexp(this,e,t)}iteratedlog(e=10,t=1){return a.iteratedlog(this,e,t)}slog(e=10){return a.slog(this,e)}layeradd10(e){return a.layeradd10(this,e)}layeradd(e,t){return a.layeradd(this,e,t)}lambertw(){return a.lambertw(this)}ssqrt(){return a.ssqrt(this)}pentate(e=2,t=l.fromComponents_noNormalize(1,0,1)){return a.pentate(this,e,t)}sin(){return a.sin(this)}cos(){return a.cos(this)}tan(){return a.tan(this)}asin(){return a.asin(this)}acos(){return a.acos(this)}atan(){return a.atan(this)}sinh(){return a.sinh(this)}cosh(){return a.cosh(this)}tanh(){return a.tanh(this)}asinh(){return a.asinh(this)}acosh(){return a.acosh(this)}atanh(){return a.atanh(this)}};let H=X;H.negate=X.neg;H.negated=X.neg;H.sgn=X.sign;H.plus=X.add;H.subtract=X.sub;H.minus=X.sub;H.multiply=X.mul;H.times=X.mul;H.divide=X.div;H.divideBy=X.div;H.dividedBy=X.div;H.reciprocal=X.recip;H.reciprocate=X.recip;H.max=et(l.max);H.min=et(l.min);H.minabs=et(l.minabs);H.maxabs=et(l.maxabs);H.clampMin=et(l.clampMin);H.clampMax=et(l.clampMax);H.logarithm=X.log;class a extends H{invert(t){return this.internalInvert&&this.hasVariable()?this.internalInvert.call(this,t,...this.inputs):this.inputs.length===1&&this.hasVariable()?t:(console.error("Cannot invert non-invertible formula"),0)}evaluateIntegral(t){return this.isIntegrable()?this.getIntegralFormula().evaluate(t):(console.error("Cannot evaluate integral of formula without integral"),0)}invertIntegral(t){return!this.isIntegrable()||!this.getIntegralFormula().isInvertible()?(console.error("Cannot invert integral of formula without invertible integral"),0):this.getIntegralFormula().invert(t)}calculateConstantOfIntegration(){const t=this.getIntegralFormula().evaluate(1),n=l.add(this.evaluate(0),this.evaluate(1)).div(2);return l.sub(n,t)}getIntegralFormula(t){if(this.integralFormula!=null&&t==null)return this.integralFormula;if(t==null){if(this.applySubstitution==null){if(t=[],this.internalIntegrate==null)return console.error("Cannot integrate formula with non-integrable operation"),a.constant(0);let n=this.internalIntegrate.call(this,t,...this.inputs);t.forEach(r=>n=r(n)),this.integralFormula=n}else if(this.internalIntegrate)this.integralFormula=this.internalIntegrate.call(this,void 0,...this.inputs);else if(this.inputs.length===1&&this.internalEvaluate==null&&this.hasVariable())this.integralFormula=this;else return console.error("Cannot integrate formula without variable"),a.constant(0);return this.integralFormula}else return this.applySubstitution==null?(console.error("Cannot have two complex operations in an integrable formula"),a.constant(0)):(t.push(n=>this.applySubstitution.call(this,n,...this.inputs)),this.internalIntegrateInner?this.internalIntegrateInner.call(this,t,...this.inputs):this.internalIntegrate?this.internalIntegrate.call(this,t,...this.inputs):this.inputs.length===1&&this.internalEvaluate==null&&this.hasVariable()?this:(console.error("Cannot integrate formula without variable"),a.constant(0)))}}const Ze=Symbol("PersistentState"),Ge=Symbol("DefaultValue"),yt=Symbol("StackTrace"),Ot=Symbol("Deleted"),Fe=Symbol("NonPersistent"),Ae=Symbol("SaveDataPath"),Vt=Symbol("SkipPersistence");function sa(){var e,t;return(t=(e=new Error().stack)==null?void 0:e.split(` +`)));function s(){let o=Lt(x);switch(A.exportEncoding){default:console.warn(`Unknown save encoding: ${A.exportEncoding}. Defaulting to lz`);case"lz":o=Ce.compressToUTF16(o);break;case"base64":o=btoa(unescape(encodeURIComponent(o)));break;case"plain":break}console.log(o);const c=document.createElement("textarea");c.value=o,document.body.appendChild(c),c.select(),c.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(c)}return ut(()=>{x.autosave=!1,x.devSpeed=0}),(o,c)=>(p(),_("div",Cr,[m("h1",kr,D(u(n).name)+": "+D(u(n).message),1),m("div",Sr,[u(n).cause?(p(),_("div",Ir,[(p(!0),_(j,null,Le(u(i)[0],d=>(p(),_("div",{key:d},D(d),1))),128))])):$("",!0),u(n).stack?(p(),_("div",{key:1,style:ge(u(n).cause?"margin-top: 10px":"")},[(p(!0),_(j,null,Le(u(r)[0],d=>(p(),_("div",{key:d},D(d),1))),128))],4)):$("",!0)]),m("div",Mr,[T(" Check the console for more details, and consider sharing it with the developers on "),m("a",{href:u(A).discordLink||"https://discord.gg/yJ4fjnjU54",class:"discord-link"},"discord",8,$r),T("! "),y(Rt,{onClick:s,class:"button",style:{display:"inline-flex"}},{default:V(()=>[xr,Fr]),_:1}),Tr,e.errors.length>1?(p(),_("div",Pr,Or)):$("",!0),(p(!0),_(j,null,Le(e.errors.slice(1),(d,g)=>(p(),_("div",{key:g,style:{"margin-top":"20px"}},[m("details",Vr,[m("summary",null,D(d.name)+": "+D(d.message),1),d.cause?(p(),_("div",Dr,[(p(!0),_(j,null,Le(u(i)[g+1],b=>(p(),_("div",{key:b},D(b),1))),128))])):$("",!0),d.stack?(p(),_("div",Lr,[(p(!0),_(j,null,Le(u(r)[g+1],b=>(p(),_("div",{key:b},D(b),1))),128))])):$("",!0)])]))),128))])]))}});var dn=z(Rr,[["__scopeId","data-v-ac351c02"]]);class qr{constructor(t){this.map=new Map,this.first=void 0,this.last=void 0,this.maxSize=t}get size(){return this.map.size}get(t){const n=this.map.get(t);if(n!==void 0)return n!==this.first&&(n===this.last?(this.last=n.prev,this.last.next=void 0):(n.prev.next=n.next,n.next.prev=n.prev),n.next=this.first,this.first.prev=n,this.first=n),n.value}set(t,n){if(this.maxSize<1)return;if(this.map.has(t))throw new Error("Cannot update existing keys in the cache");const r=new Ar(t,n);for(this.first===void 0?(this.first=r,this.last=r):(r.next=this.first,this.first.prev=r,this.first=r),this.map.set(t,r);this.map.size>this.maxSize;){const i=this.last;this.map.delete(i.key),this.last=i.prev,this.last.next=void 0}}}class Ar{constructor(t,n){this.next=void 0,this.prev=void 0,this.key=t,this.value=n}}const Ft=17,Br=9e15,Ur=Math.log10(9e15),zr=1/9e15,Gr=308,jr=-324,en=5,Hr=(1<<10)-1,Wr=function(){const e=[];for(let n=jr+1;n<=Gr;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),Ve=[2,Math.E,3,4,5,6,7,8,9,10],Jr=[[1,1.0891180521811203,1.1789767925673957,1.2701455431742086,1.3632090180450092,1.4587818160364217,1.5575237916251419,1.6601571006859253,1.767485818836978,1.8804192098842727,2],[1,1.1121114330934079,1.231038924931609,1.3583836963111375,1.4960519303993531,1.6463542337511945,1.8121385357018724,1.996971324618307,2.2053895545527546,2.4432574483385254,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.1670905356972596,1.3632807444991446,1.5979222279405536,1.8842640123816674,2.2416069644878687,2.69893426559423,3.3012632110403577,4.121250340630164,5.281493033448316,7],[1,1.1736630594087796,1.379783782386201,1.6292821855668218,1.9378971836180754,2.3289975651071977,2.8384347394720835,3.5232708454565906,4.478242031114584,5.868592169644505,8],[1,1.1793017514670474,1.394054150657457,1.65664127441059,1.985170999970283,2.4069682290577457,2.9647310119960752,3.7278665320924946,4.814462547283592,6.436522247411611,9],[1,1.1840100246247336,1.4061375836156955,1.6802272208863964,2.026757028388619,2.4770056063449646,3.080525271755482,3.9191964192627284,5.135152840833187,6.989961179534715,10]],Zr=[[-1,-.9194161097107025,-.8335625019330468,-.7425599821143978,-.6466611521029437,-.5462617907227869,-.4419033816638769,-.3342645487554494,-.224140440909962,-.11241087890006762,0],[-1,-.90603157029014,-.80786507256596,-.7064666939634,-.60294836853664,-.49849837513117,-.39430303318768,-.29147201034755,-.19097820800866,-.09361896280296,0],[-1,-.9021579584316141,-.8005762598234203,-.6964780623319391,-.5911906810998454,-.486050182576545,-.3823089430815083,-.28106046722897615,-.1831906535795894,-.08935809204418144,0],[-1,-.8917227442365535,-.781258746326964,-.6705130326902455,-.5612813129406509,-.4551067709033134,-.35319256652135966,-.2563741554088552,-.1651412821106526,-.0796919581982668,0],[-1,-.8843387974366064,-.7678744063886243,-.6529563724510552,-.5415870994657841,-.4352842206588936,-.33504449124791424,-.24138853420685147,-.15445285440944467,-.07409659641336663,0],[-1,-.8786709358426346,-.7577735191184886,-.6399546189952064,-.527284921869926,-.4211627631006314,-.3223479611761232,-.23107655627789858,-.1472057700818259,-.07035171210706326,0],[-1,-.8740862815291583,-.7497032990976209,-.6297119746181752,-.5161838335958787,-.41036238255751956,-.31277212146489963,-.2233976621705518,-.1418697367979619,-.06762117662323441,0],[-1,-.8702632331800649,-.7430366914122081,-.6213373075161548,-.5072025698095242,-.40171437727184167,-.30517930701410456,-.21736343968190863,-.137710238299109,-.06550774483471955,0],[-1,-.8670016295947213,-.7373984232432306,-.6143173985094293,-.49973884395492807,-.394584953527678,-.2989649949848695,-.21245647317021688,-.13434688362382652,-.0638072667348083,0],[-1,-.8641642839543857,-.732534623168535,-.6083127477059322,-.4934049257184696,-.3885773075899922,-.29376029055315767,-.2083678561173622,-.13155653399373268,-.062401588652553186,0]];let h=function(t){return l.fromValue_noAlloc(t)},O=function(e,t,n){return l.fromComponents(e,t,n)},R=function(t,n,r){return l.fromComponents_noNormalize(t,n,r)};const xe=function(t,n){const r=n+1,i=Math.ceil(Math.log10(Math.abs(t))),s=Math.round(t*Math.pow(10,r-i))*Math.pow(10,i-r);return parseFloat(s.toFixed(Math.max(r-i,0)))},Tt=function(e){return Math.sign(e)*Math.log10(Math.abs(e))},Kr=function(e){if(!isFinite(e))return e;if(e<-50)return e===Math.trunc(e)?Number.NEGATIVE_INFINITY:0;let t=1;for(;e<10;)t=t*e,++e;e-=1;let n=.9189385332046727;n=n+(e+.5)*Math.log(e),n=n-e;const r=e*e;let i=e;return n=n+1/(12*i),i=i*r,n=n+1/(360*i),i=i*r,n=n+1/(1260*i),i=i*r,n=n+1/(1680*i),i=i*r,n=n+1/(1188*i),i=i*r,n=n+691/(360360*i),i=i*r,n=n+7/(1092*i),i=i*r,n=n+3617/(122400*i),Math.exp(n)/t},fn=.5671432904097838,tn=function(e,t=1e-10){let n,r;if(!Number.isFinite(e)||e===0)return e;if(e===1)return fn;e<10?n=0:n=Math.log(e)-Math.log(Math.log(e));for(let i=0;i<100;++i){if(r=(e*Math.exp(-n)+n*n)/(n+1),Math.abs(r-n).5?1:-1;if(Math.random()*20<1)return R(t,0,1);const n=Math.floor(Math.random()*(e+1));let r=n===0?Math.random()*616-308:Math.random()*16;Math.random()>.9&&(r=Math.trunc(r));let i=Math.pow(10,r);return Math.random()>.9&&(i=Math.trunc(i)),O(t,n,i)}static affordGeometricSeries_core(e,t,n,r){const i=t.mul(n.pow(r));return f.floor(e.div(i).mul(n.sub(1)).add(1).log10().div(n.log10()))}static sumGeometricSeries_core(e,t,n,r){return t.mul(n.pow(r)).mul(f.sub(1,n.pow(e))).div(f.sub(1,n))}static affordArithmeticSeries_core(e,t,n,r){const s=t.add(r.mul(n)).sub(n.div(2)),o=s.pow(2);return s.neg().add(o.add(n.mul(e).mul(2)).sqrt()).div(n).floor()}static sumArithmeticSeries_core(e,t,n,r){const i=t.add(r.mul(n));return e.div(2).mul(i.mul(2).plus(e.sub(1).mul(n)))}static efficiencyOfPurchase_core(e,t,n){return e.div(t).add(e.div(n))}normalize(){if(this.sign===0||this.mag===0&&this.layer===0)return this.sign=0,this.mag=0,this.layer=0,this;if(this.layer===0&&this.mag<0&&(this.mag=-this.mag,this.sign=-this.sign),this.layer===0&&this.mag=Br)return this.layer+=1,this.mag=t*Math.log10(e),this;for(;e0;)this.layer-=1,this.layer===0?this.mag=Math.pow(10,this.mag):(this.mag=t*Math.pow(10,e),e=Math.abs(this.mag),t=Math.sign(this.mag));return this.layer===0&&(this.mag<0?(this.mag=-this.mag,this.sign=-this.sign):this.mag===0&&(this.sign=0)),this}fromComponents(e,t,n){return this.sign=e,this.layer=t,this.mag=n,this.normalize(),this}fromComponents_noNormalize(e,t,n){return this.sign=e,this.layer=t,this.mag=n,this}fromMantissaExponent(e,t){return this.layer=1,this.sign=Math.sign(e),e=Math.abs(e),this.mag=t+Math.log10(e),this.normalize(),this}fromMantissaExponent_noNormalize(e,t){return this.fromMantissaExponent(e,t),this}fromDecimal(e){return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}fromNumber(e){return this.mag=Math.abs(e),this.sign=Math.sign(e),this.layer=0,this.normalize(),this}fromString(e){const t=e,n=f.fromStringCache.get(t);if(n!==void 0)return this.fromDecimal(n);e=e.replace(",","");const r=e.split("^^^");if(r.length===2){const I=parseFloat(r[0]),C=parseFloat(r[1]),G=r[1].split(";");let Y=1;if(G.length===2&&(Y=parseFloat(G[1]),isFinite(Y)||(Y=1)),isFinite(I)&&isFinite(C)){const S=f.pentate(I,C,Y);return this.sign=S.sign,this.layer=S.layer,this.mag=S.mag,f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this}}const i=e.split("^^");if(i.length===2){const I=parseFloat(i[0]),C=parseFloat(i[1]),G=i[1].split(";");let Y=1;if(G.length===2&&(Y=parseFloat(G[1]),isFinite(Y)||(Y=1)),isFinite(I)&&isFinite(C)){const S=f.tetrate(I,C,Y);return this.sign=S.sign,this.layer=S.layer,this.mag=S.mag,f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this}}const s=e.split("^");if(s.length===2){const I=parseFloat(s[0]),C=parseFloat(s[1]);if(isFinite(I)&&isFinite(C)){const G=f.pow(I,C);return this.sign=G.sign,this.layer=G.layer,this.mag=G.mag,f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this}}e=e.trim().toLowerCase();let o,c,d=e.split("pt");if(d.length===2){o=10,c=parseFloat(d[0]),d[1]=d[1].replace("(",""),d[1]=d[1].replace(")","");let I=parseFloat(d[1]);if(isFinite(I)||(I=1),isFinite(o)&&isFinite(c)){const C=f.tetrate(o,c,I);return this.sign=C.sign,this.layer=C.layer,this.mag=C.mag,f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this}}if(d=e.split("p"),d.length===2){o=10,c=parseFloat(d[0]),d[1]=d[1].replace("(",""),d[1]=d[1].replace(")","");let I=parseFloat(d[1]);if(isFinite(I)||(I=1),isFinite(o)&&isFinite(c)){const C=f.tetrate(o,c,I);return this.sign=C.sign,this.layer=C.layer,this.mag=C.mag,f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this}}const g=e.split("e"),b=g.length-1;if(b===0){const I=parseFloat(e);if(isFinite(I))return this.fromNumber(I),f.fromStringCache.size>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this}else if(b===1){const I=parseFloat(e);if(isFinite(I)&&I!==0)return this.fromNumber(I),f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this}const v=e.split("e^");if(v.length===2){this.sign=1,v[0].charAt(0)=="-"&&(this.sign=-1);let I="";for(let C=0;C=43&&G<=57||G===101)I+=v[1].charAt(C);else return this.layer=parseFloat(I),this.mag=parseFloat(v[1].substr(C+1)),this.normalize(),f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this}}if(b<1)return this.sign=0,this.layer=0,this.mag=0,f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this;const N=parseFloat(g[0]);if(N===0)return this.sign=0,this.layer=0,this.mag=0,f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this;let k=parseFloat(g[g.length-1]);if(b>=2){const I=parseFloat(g[g.length-2]);isFinite(I)&&(k*=Math.sign(I),k+=Tt(I))}if(!isFinite(N))this.sign=g[0]==="-"?-1:1,this.layer=b,this.mag=k;else if(b===1)this.sign=Math.sign(N),this.layer=1,this.mag=k+Math.log10(Math.abs(N));else if(this.sign=Math.sign(N),this.layer=b,b===2){const I=f.mul(O(1,2,k),h(N));return this.sign=I.sign,this.layer=I.layer,this.mag=I.mag,f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this}else this.mag=k;return this.normalize(),f.fromStringCache.maxSize>=1&&f.fromStringCache.set(t,f.fromDecimal(this)),this}fromValue(e){return e instanceof f?this.fromDecimal(e):typeof e=="number"?this.fromNumber(e):typeof e=="string"?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0,this)}toNumber(){return Number.isFinite(this.layer)?this.layer===0?this.sign*this.mag:this.layer===1?this.sign*Math.pow(10,this.mag):this.mag>0?this.sign>0?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0:Number.NaN}mantissaWithDecimalPlaces(e){return isNaN(this.m)?Number.NaN:this.m===0?0:xe(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:this.mag===0?0:xe(this.mag,e)}toString(){return isNaN(this.layer)||isNaN(this.sign)||isNaN(this.mag)?"NaN":this.mag===Number.POSITIVE_INFINITY||this.layer===Number.POSITIVE_INFINITY?this.sign===1?"Infinity":"-Infinity":this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toString():this.m+"e"+this.e:this.layer===1?this.m+"e"+this.e:this.layer<=en?(this.sign===-1?"-":"")+"e".repeat(this.layer)+this.mag:(this.sign===-1?"-":"")+"(e^"+this.layer+")"+this.mag}toExponential(e){return this.layer===0?(this.sign*this.mag).toExponential(e):this.toStringWithDecimalPlaces(e)}toFixed(e){return this.layer===0?(this.sign*this.mag).toFixed(e):this.toStringWithDecimalPlaces(e)}toPrecision(e){return this.e<=-7?this.toExponential(e-1):e>this.e?this.toFixed(e-this.exponent-1):this.toExponential(e-1)}valueOf(){return this.toString()}toJSON(){return this.toString()}toStringWithDecimalPlaces(e){return this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toFixed(e):xe(this.m,e)+"e"+xe(this.e,e):this.layer===1?xe(this.m,e)+"e"+xe(this.e,e):this.layer<=en?(this.sign===-1?"-":"")+"e".repeat(this.layer)+xe(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+xe(this.mag,e)}abs(){return R(this.sign===0?0:1,this.layer,this.mag)}neg(){return R(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?f.dZero:this.layer===0?O(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?f.dZero:this.layer===0?O(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?f.dZero:this.layer===0?O(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?f.dZero:this.layer===0?O(this.sign,0,Math.trunc(this.mag)):this}add(e){const t=h(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer)||this.sign===0)return t;if(t.sign===0)return this;if(this.sign===-t.sign&&this.layer===t.layer&&this.mag===t.mag)return R(0,0,0);let n,r;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(f.cmpabs(this,t)>0?(n=this,r=t):(n=t,r=this),n.layer===0&&r.layer===0)return f.fromNumber(n.sign*n.mag+r.sign*r.mag);const i=n.layer*Math.sign(n.mag),s=r.layer*Math.sign(r.mag);if(i-s>=2)return n;if(i===0&&s===-1){if(Math.abs(r.mag-Math.log10(n.mag))>Ft)return n;{const o=Math.pow(10,Math.log10(n.mag)-r.mag),c=r.sign+n.sign*o;return O(Math.sign(c),1,r.mag+Math.log10(Math.abs(c)))}}if(i===1&&s===0){if(Math.abs(n.mag-Math.log10(r.mag))>Ft)return n;{const o=Math.pow(10,n.mag-Math.log10(r.mag)),c=r.sign+n.sign*o;return O(Math.sign(c),1,Math.log10(r.mag)+Math.log10(Math.abs(c)))}}if(Math.abs(n.mag-r.mag)>Ft)return n;{const o=Math.pow(10,n.mag-r.mag),c=r.sign+n.sign*o;return O(Math.sign(c),1,r.mag+Math.log10(Math.abs(c)))}}plus(e){return this.add(e)}sub(e){return this.add(h(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const t=h(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer))return t;if(this.sign===0||t.sign===0)return R(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return R(this.sign*t.sign,0,1);let n,r;if(this.layer>t.layer||this.layer==t.layer&&Math.abs(this.mag)>Math.abs(t.mag)?(n=this,r=t):(n=t,r=this),n.layer===0&&r.layer===0)return f.fromNumber(n.sign*r.sign*n.mag*r.mag);if(n.layer>=3||n.layer-r.layer>=2)return O(n.sign*r.sign,n.layer,n.mag);if(n.layer===1&&r.layer===0)return O(n.sign*r.sign,1,n.mag+Math.log10(r.mag));if(n.layer===1&&r.layer===1)return O(n.sign*r.sign,1,n.mag+r.mag);if(n.layer===2&&r.layer===1){const i=O(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)).add(O(Math.sign(r.mag),r.layer-1,Math.abs(r.mag)));return O(n.sign*r.sign,i.layer+1,i.sign*i.mag)}if(n.layer===2&&r.layer===2){const i=O(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)).add(O(Math.sign(r.mag),r.layer-1,Math.abs(r.mag)));return O(n.sign*r.sign,i.layer+1,i.sign*i.mag)}throw Error("Bad arguments to mul: "+this+", "+e)}multiply(e){return this.mul(e)}times(e){return this.mul(e)}div(e){const t=h(e);return this.mul(t.recip())}divide(e){return this.div(e)}divideBy(e){return this.div(e)}dividedBy(e){return this.div(e)}recip(){return this.mag===0?f.dNaN:this.layer===0?O(this.sign,0,1/this.mag):O(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const t=h(e);return this.sign>t.sign?1:this.sign0?this.layer:-this.layer,r=t.mag>0?t.layer:-t.layer;return n>r?1:nt.mag?1:this.mag0?t:this}clamp(e,t){return this.max(e).min(t)}clampMin(e){return this.max(e)}clampMax(e){return this.min(e)}cmp_tolerance(e,t){const n=h(e);return this.eq_tolerance(n,t)?0:this.cmp(n)}compare_tolerance(e,t){return this.cmp_tolerance(e,t)}eq_tolerance(e,t){const n=h(e);if(t==null&&(t=1e-7),this.sign!==n.sign||Math.abs(this.layer-n.layer)>1)return!1;let r=this.mag,i=n.mag;return this.layer>n.layer&&(i=Tt(i)),this.layer0?O(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):O(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?f.dNaN:this.layer>0?O(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):O(this.sign,0,Math.log10(this.mag))}log(e){return e=h(e),this.sign<=0||e.sign<=0||e.sign===1&&e.layer===0&&e.mag===1?f.dNaN:this.layer===0&&e.layer===0?O(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):f.div(this.log10(),e.log10())}log2(){return this.sign<=0?f.dNaN:this.layer===0?O(this.sign,0,Math.log2(this.mag)):this.layer===1?O(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?O(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):O(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?f.dNaN:this.layer===0?O(this.sign,0,Math.log(this.mag)):this.layer===1?O(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?O(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):O(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const t=h(e),n=this,r=t;if(n.sign===0)return r.eq(0)?R(1,0,1):n;if(n.sign===1&&n.layer===0&&n.mag===1)return n;if(r.sign===0)return R(1,0,1);if(r.sign===1&&r.layer===0&&r.mag===1)return n;const i=n.absLog10().mul(r).pow10();return this.sign===-1?Math.abs(r.toNumber()%2)%2===1?i.neg():Math.abs(r.toNumber()%2)%2===0?i:f.dNaN:i}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return f.dNaN;let e=this;if(e.layer===0){const t=Math.pow(10,e.sign*e.mag);if(Number.isFinite(t)&&Math.abs(t)>=.1)return O(1,0,t);if(e.sign===0)return f.dOne;e=R(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?O(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?O(-e.sign,e.layer+1,-e.mag):f.dOne}pow_base(e){return h(e).pow(this)}root(e){const t=h(e);return this.pow(t.recip())}factorial(){return this.mag<0?this.add(1).gamma():this.layer===0?this.add(1).gamma():this.layer===1?f.exp(f.mul(this,f.ln(this).sub(1))):f.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(R(1,0,24)))return f.fromNumber(Kr(this.sign*this.mag));const e=this.mag-1;let t=.9189385332046727;t=t+(e+.5)*Math.log(e),t=t-e;const n=e*e;let r=e,i=12*r,s=1/i,o=t+s;if(o===t||(t=o,r=r*n,i=360*r,s=1/i,o=t-s,o===t))return f.exp(t);t=o,r=r*n,i=1260*r;let c=1/i;return t=t+c,r=r*n,i=1680*r,c=1/i,t=t-c,f.exp(t)}else return this.layer===1?f.exp(f.mul(this,f.ln(this).sub(1))):f.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?f.dOne:this.layer===0&&this.mag<=709.7?f.fromNumber(Math.exp(this.sign*this.mag)):this.layer===0?O(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?O(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):O(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return f.fromNumber(Math.sqrt(this.sign*this.mag));if(this.layer===1)return O(1,2,Math.log10(this.mag)-.3010299956639812);{const e=f.div(R(this.sign,this.layer-1,this.mag),R(1,0,2));return e.layer+=1,e.normalize(),e}}cube(){return this.pow(3)}cbrt(){return this.pow(1/3)}tetrate(e=2,t=R(1,0,1)){if(e===1)return f.pow(this,t);if(e===0)return new f(t);if(this.eq(f.dOne))return f.dOne;if(this.eq(-1))return f.pow(this,t);if(e===Number.POSITIVE_INFINITY){const i=this.toNumber();if(i<=1.444667861009766&&i>=.06598803584531254){if(i>1.444667861009099)return f.fromNumber(Math.E);const s=f.ln(this).neg();return s.lambertw().div(s)}else return i>1.444667861009766?f.fromNumber(Number.POSITIVE_INFINITY):f.dNaN}if(this.eq(f.dZero)){let i=Math.abs((e+1)%2);return i>1&&(i=2-i),f.fromNumber(i)}if(e<0)return f.iteratedlog(t,this,-e);t=h(t);const n=e;e=Math.trunc(e);const r=n-e;if(this.gt(f.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let i=0;i3)return R(t.sign,t.layer+(e-i-1),t.mag);if(i>1e4)return t}return t}iteratedexp(e=2,t=R(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return f.tetrate(e,-t,this);e=h(e);let n=f.fromDecimal(this);const r=t;t=Math.trunc(t);const i=r-t;if(n.layer-e.layer>3){const s=Math.min(t,n.layer-e.layer-3);t-=s,n.layer-=s}for(let s=0;s1e4)return n}return i>0&&i<1&&(e.eq(10)?n=n.layeradd10(-i):n=n.layeradd(-i,e)),n}slog(e=10,t=100){let n=.001,r=!1,i=!1,s=this.slog_internal(e).toNumber();for(let o=1;o1&&i!=d&&(r=!0),i=d,r?n/=2:n*=2,n=Math.abs(n)*(d?-1:1),s+=n,n===0)break}return f.fromNumber(s)}slog_internal(e=10){if(e=h(e),e.lte(f.dZero)||e.eq(f.dOne))return f.dNaN;if(e.lt(f.dOne))return this.eq(f.dOne)?f.dZero:this.eq(f.dZero)?f.dNegOne:f.dNaN;if(this.mag<0||this.eq(f.dZero))return f.dNegOne;let t=0,n=f.fromDecimal(this);if(n.layer-e.layer>3){const r=n.layer-e.layer-3;t+=r,n.layer-=r}for(let r=0;r<100;++r)if(n.lt(f.dZero))n=f.pow(e,n),t-=1;else{if(n.lte(f.dOne))return f.fromNumber(t+f.slog_critical(e.toNumber(),n.toNumber()));t+=1,n=f.log(n,e)}return f.fromNumber(t)}static slog_critical(e,t){return e>10?t-1:f.critical_section(e,t,Zr)}static tetrate_critical(e,t){return f.critical_section(e,t,Jr)}static critical_section(e,t,n){t*=10,t<0&&(t=0),t>10&&(t=10),e<2&&(e=2),e>10&&(e=10);let r=0,i=0;for(let o=0;oe){const c=(e-Ve[o])/(Ve[o+1]-Ve[o]);r=n[o][Math.floor(t)]*(1-c)+n[o+1][Math.floor(t)]*c,i=n[o][Math.ceil(t)]*(1-c)+n[o+1][Math.ceil(t)]*c;break}const s=t-Math.floor(t);return r<=0||i<=0?r*(1-s)+i*s:Math.pow(e,Math.log(r)/Math.log(e)*(1-s)+Math.log(i)/Math.log(e)*s)}layeradd10(e){e=f.fromValue_noAlloc(e).toNumber();const t=f.fromDecimal(this);if(e>=1){t.mag<0&&t.layer>0?(t.sign=0,t.mag=0,t.layer=0):t.sign===-1&&t.layer==0&&(t.sign=1,t.mag=-t.mag);const n=Math.trunc(e);e-=n,t.layer+=n}if(e<=-1){const n=Math.trunc(e);if(e-=n,t.layer+=n,t.layer<0)for(let r=0;r<100;++r){if(t.layer++,t.mag=Math.log10(t.mag),!isFinite(t.mag))return t.sign===0&&(t.sign=1),t.layer<0&&(t.layer=0),t.normalize();if(t.layer>=0)break}}for(;t.layer<0;)t.layer++,t.mag=Math.log10(t.mag);return t.sign===0&&(t.sign=1,t.mag===0&&t.layer>=1&&(t.layer-=1,t.mag=1)),t.normalize(),e!==0?t.layeradd(e,10):t}layeradd(e,t){const r=this.slog(t).toNumber()+e;return r>=0?f.tetrate(t,r):Number.isFinite(r)?r>=-1?f.log(f.tetrate(t,r+1),t):f.log(f.log(f.tetrate(t,r+2),t),t):f.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return f.fromNumber(tn(this.toNumber()));if(this.layer===0)return f.fromNumber(tn(this.sign*this.mag));if(this.layer===1)return nn(this);if(this.layer===2)return nn(this);if(this.layer>=3)return R(this.sign,this.layer-1,this.mag);throw new Error("Unhandled behavior in lambertw()")}ssqrt(){if(this.sign==1&&this.layer>=3)return R(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=R(1,0,1)){t=h(t);const n=e;e=Math.trunc(e);const r=n-e;r!==0&&(t.eq(f.dOne)?(++e,t=f.fromNumber(r)):this.eq(10)?t=t.layeradd10(r):t=t.layeradd(r,this));for(let i=0;i10)return t}return t}sin(){return this.mag<0?this:this.layer===0?f.fromNumber(Math.sin(this.sign*this.mag)):R(0,0,0)}cos(){return this.mag<0?f.dOne:this.layer===0?f.fromNumber(Math.cos(this.sign*this.mag)):R(0,0,0)}tan(){return this.mag<0?this:this.layer===0?f.fromNumber(Math.tan(this.sign*this.mag)):R(0,0,0)}asin(){return this.mag<0?this:this.layer===0?f.fromNumber(Math.asin(this.sign*this.mag)):R(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?f.fromNumber(Math.acos(this.toNumber())):this.layer===0?f.fromNumber(Math.acos(this.sign*this.mag)):R(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?f.fromNumber(Math.atan(this.sign*this.mag)):f.fromNumber(Math.atan(this.sign*(1/0)))}sinh(){return this.exp().sub(this.negate().exp()).div(2)}cosh(){return this.exp().add(this.negate().exp()).div(2)}tanh(){return this.sinh().div(this.cosh())}asinh(){return f.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return f.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?R(Number.NaN,Number.NaN,Number.NaN):f.ln(this.add(1).div(f.fromNumber(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(f.pow(10,e))}egg(){return this.add(9)}lessThanOrEqualTo(e){return this.cmp(e)<1}lessThan(e){return this.cmp(e)<0}greaterThanOrEqualTo(e){return this.cmp(e)>-1}greaterThan(e){return this.cmp(e)>0}};let l=f;l.fromStringCache=new qr(Hr);l.dZero=R(0,0,0);l.dOne=R(1,0,1);l.dNegOne=R(-1,0,1);l.dTwo=R(1,0,2);l.dTen=R(1,0,10);l.dNaN=R(Number.NaN,Number.NaN,Number.NaN);l.dInf=R(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);l.dNegInf=R(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);l.dNumberMax=O(1,0,Number.MAX_VALUE);l.dNumberMin=O(1,0,Number.MIN_VALUE);h=l.fromValue_noAlloc;O=l.fromComponents;R=l.fromComponents_noNormalize;l.fromMantissaExponent;l.fromMantissaExponent_noNormalize;const Yr=new l(1);function nt(e,t,n=!0){let r=l.log10(e).floor(),i=l.div(e,l.pow(10,r));i.toStringWithDecimalPlaces(t)==="10"&&(i=Yr,r=r.add(1));const s=r.gte(1e9)?pe(r,Math.max(Math.max(t,3),A.defaultDecimalsShown)):r.gte(1e4)?yt(r,0):r.toStringWithDecimalPlaces(0);return n?i.toStringWithDecimalPlaces(t)+"e"+s:"e"+s}function yt(e,t){if(e==null)return"NaN";if(e=new l(e),e.mag<.001)return 0 .toFixed(t);const r=e.toStringWithDecimalPlaces(t).split(".");return r[0]=r[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),r.length==1?r[0]:r[0]+"."+r[1]}function gn(e,t){return e==null?"NaN":(e=new l(e),e.mag<1e-4?0 .toFixed(t):(e.mag<.1&&t!==0&&(t=Math.max(Math.max(t,e.log10().negate().ceil().toNumber()),A.defaultDecimalsShown)),e.toStringWithDecimalPlaces(t)))}const Xr=new l("eeee1000"),Qr=new l("e100000"),rn=new l("e1000"),mn=new l(1e9),ei=new l(1e6),ti=new l(1e3),ni=new l(.98),ri=new l(.001),hn=new l(0);function pe(e,t,n){if(t==null&&(t=A.defaultDecimalsShown),n=n!=null?n:A.defaultShowSmall,e=new l(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if(e.sign<0)return"-"+pe(e.neg(),t);if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(Xr)){const r=e.slog();return r.gte(ei)?"F"+pe(r.floor()):l.pow(10,r.sub(r.floor())).toStringWithDecimalPlaces(3)+"F"+yt(r.floor(),0)}else{if(e.gte(Qr))return nt(e,0,!1);if(e.gte(rn))return nt(e,0);if(e.gte(mn))return nt(e,t);if(e.gte(ti))return yt(e,0);if(e.gte(ri)||!n)return gn(e,t);if(e.eq(hn))return 0 .toFixed(t)}return e=vn(e),e.lt(rn)?nt(e,t).replace(/([^(?:e|F)]*)$/,"-$1"):pe(e,t)+"\u207B\xB9"}function he(e){return e=new l(e),e.sign<0?"-"+he(e.neg()):e.gte(mn)||e.lte(ni)&&!e.eq(hn)?pe(e):pe(e,0)}function pn(e){return l.lt(e,0)?"-"+pn(l.neg(e)):l.gt(e,2**51)?pe(l.div(e,31536e3))+"y":(e=new l(e).toNumber(),e<60?pe(e)+"s":e<3600?he(Math.floor(e/60))+"m "+pe(e%60)+"s":e<86400?he(Math.floor(e/3600))+"h "+he(Math.floor(e/60)%60)+"m "+he(e%60)+"s":e<31536e3?he(Math.floor(e/84600)%365)+"d "+he(Math.floor(e/3600)%24)+"h "+he(Math.floor(e/60)%60)+"m":he(Math.floor(e/31536e3))+"y "+he(Math.floor(e/84600)%365)+"d "+he(Math.floor(e/3600)%24)+"h")}function ii(e,t,n){e=new l(e);let r=e.toStringWithDecimalPlaces(t);return new l(r).gte(n)&&(r=l.sub(n,Math.pow(.1,t)).toStringWithDecimalPlaces(t)),r}function si(e,t){return pe(e,t,!0)}function vn(e){let t=l.log10(e).ceil();const n=l.div(e,l.pow(10,t));return t=t.neg(),e=new l(10).pow(t).times(n),e}var ai=Object.freeze(Object.defineProperty({__proto__:null,default:l,exponentialFormat:nt,commaFormat:yt,regularFormat:gn,format:pe,formatWhole:he,formatTime:pn,toPlaces:ii,formatSmall:si,invertOOM:vn},Symbol.toStringTag,{value:"Module"}));const{exponentialFormat:oi,commaFormat:li,regularFormat:ui,format:Se,formatWhole:st,formatTime:It,toPlaces:ci,formatSmall:di,invertOOM:fi}=ai;window.Decimal=l;window.exponentialFormat=oi;window.commaFormat=li;window.regularFormat=ui;window.format=Se;window.formatWhole=st;window.formatTime=It;window.toPlaces=ci;window.formatSmall=di;window.invertOOM=fi;function bn(e){let t=e.replace(/([A-Z])/g," $1");return t=t.charAt(0).toUpperCase()+t.slice(1),t}function gi(e){return(e[0]+e.slice(1).replace(/[A-Z]/g,t=>`-${t}`)).toLowerCase()}function Pt(e){return typeof e=="function"}var Z=(e=>(e.Up="Up",e.Down="Down",e.Left="Left",e.Right="Right",e.Default="Up",e))(Z||{});const at=Symbol("DoNotCache");function E(e,t){const n=e[t];Pt(n)&&n.length===0&&!n[at]?e[t]=P(n.bind(e)):Pt(n)&&(e[t]=n.bind(e),e[t][at]=!0)}function Et(e){return Pt(e)&&!e[at]&&(e=P(e)),e}const Pe=Symbol("Component"),Ee=Symbol("GatherProps");let mi=0;function Mt(e="feature-"){return e+mi++}var Xe=(e=>(e[e.Visible=0]="Visible",e[e.Hidden=1]="Hidden",e[e.None=2]="None",e))(Xe||{});function yn(e){const t=u(e);return t!==2&&t!==!1}function _n(e){return u(e)===1}function ee(e){return e[at]=!0,e}function ce(e,t,n){e[t]===void 0&&n!=null&&(e[t]=n)}function Nn(e,...t){const n=[],r=i=>{Object.keys(i).forEach(s=>{const o=i[s];o!=null&&typeof o=="object"&&(t.includes(o.type)?n.push(o):!(o instanceof l)&&!te(o)&&r(o))})};return r(e),n}var J=window.state=kt({lastTenTicks:[],hasNaN:!1,NaNPath:[],errors:Ye([])});const De={variables:{"--foreground":"#dfdfdf","--background":"#0f0f0f","--feature-foreground":"#0f0f0f","--tooltip-background":"rgba(0, 0, 0, 0.75)","--raised-background":"#0f0f0f","--points":"#ffffff","--locked":"#bf8f8f","--highlighted":"#333","--bought":"#77bf5f","--danger":"rgb(220, 53, 69)","--link":"#02f2f2","--outline":"#dfdfdf","--accent1":"#627a82","--accent2":"#658262","--accent3":"#7c6282","--border-radius":"15px","--modal-border":"solid 2px var(--color)","--feature-margin":"0px"},floatingTabs:!0,mergeAdjacent:!0,showPin:!0};var qt=(e=>(e.Classic="classic",e.Paper="paper",e.Nordic="nordic",e.Aqua="aqua",e))(qt||{}),At={classic:De,paper:{...De,variables:{...De.variables,"--background":"#2a323d","--feature-foreground":"#000","--raised-background":"#333c4a","--locked":"#3a3e45","--bought":"#5C8A58","--outline":"#333c4a","--border-radius":"4px","--modal-border":"","--feature-margin":"5px"},floatingTabs:!1},nordic:{...De,variables:{...De.variables,"--foreground":"#D8DEE9","--background":"#2E3440","--feature-foreground":"#000","--raised-background":"#3B4252","--points":"#E5E9F0","--locked":"#4c566a","--highlighted":"#434c5e","--bought":"#8FBCBB","--danger":"#D08770","--link":"#88C0D0","--outline":"#3B4252","--accent1":"#B48EAD","--accent2":"#A3BE8C","--accent3":"#EBCB8B","--border-radius":"4px","--modal-border":"solid 2px #3B4252","--feature-margin":"5px"},floatingTabs:!1},aqua:{...De,variables:{...De.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}};const se=cn();"fonts"in document&&(document.fonts.onloadingdone=()=>se.emit("fontsLoaded"));var hi=Object.freeze(Object.defineProperty({__proto__:null,globalBus:se},Symbol.toStringTag,{value:"Module"}));function wn(e={}){return Object.assign({id:`${A.id}-0`,name:"Default Save",tabs:A.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:A.id,modVersion:A.versionNumber,layers:{}},e)}function fe(e){const t=Ce.compressToUTF16(Lt(e!=null?e:x));return localStorage.setItem((e!=null?e:x).id,t),t}async function pi(){bi();try{let e=localStorage.getItem(ne.active);if(e==null){await qe(Je());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Ce.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==A.id){await qe(Je());return}t.id=ne.active,await qe(t)}catch(e){console.error(`Failed to load save. Falling back to new save. +`,e),await qe(Je())}}function Je(){const e=ht(),t=wn({id:e});return fe(t),ne.saves.push(e),t}function ht(){let e,t=0;do e=`${A.id}-${t++}`;while(localStorage.getItem(e)!=null);return e}const Bt=F(!1);async function qe(e){console.info("Loading save",e),Bt.value=!0;const{layers:t,removeLayer:n,addLayer:r}=await it(()=>Promise.resolve().then(function(){return ca}),void 0),{fixOldSave:i,getInitialLayers:s}=await it(()=>Promise.resolve().then(function(){return ou}),void 0);for(const o in t){const c=t[o];c&&n(c)}s(e).forEach(o=>r(o,e)),e=wn(e),e.offlineProd&&e.time!=null&&e.time&&e.devSpeed!==0&&(e.offlineTime==null&&(e.offlineTime=0),e.offlineTime+=Math.min(e.offlineTime+(Date.now()-e.time)/1e3,A.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==A.versionNumber&&(i(e.modVersion,e),e.modVersion=A.versionNumber),Object.assign(x,e),ne.active=x.id,se.emit("onLoad")}setInterval(()=>{x.autosave&&fe()},1e3);window.onbeforeunload=()=>{x.autosave&&fe()};window.save=fe;const vi=window.hardReset=async()=>{await qe(Je())};window.deleteLowerSaves=()=>{const e=Object.values(ne.saves).indexOf(x.id)+1;Object.values(ne.saves).slice(e).forEach(t=>localStorage.removeItem(t)),ne.saves=ne.saves.slice(0,e)};const ot=Ye({active:"",saves:[],showTPS:!0,theme:qt.Nordic,unthrottled:!1,alignUnits:!1});_e(ot,e=>{const t=Ce.compressToUTF16(JSON.stringify(e));localStorage.setItem(A.id,t)},{deep:!0});var ne=window.settings=ot;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:qt.Nordic,alignUnits:!1};se.emit("loadSettings",e),Object.assign(ot,e),vi()};function bi(){try{let e=localStorage.getItem(A.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Ce.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(ot,t)}se.emit("loadSettings",ot)}catch{}}const yi=Ye([]),Cn=Ye([]);function _i(e){Cn.push(e)}const Ni=Ye([]);function ue(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}`),q({template:e})):q({render:()=>({})}):e}function ct(e){if($t(e))return typeof e=="function"?e():ue(e);const t=e[Pe];return y(t,e[Ee](),null)}function pt(e){if($t(e))return typeof e=="function"?e():typeof e=="string"?y(j,null,[e]):y(e,null,null);const t=e[Pe];return y(t,e[Ee](),null)}function $t(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[at]===!0}function kn(e,t){const n=F(null),r=F(void 0);function i(c){n.value||(n.value=setInterval(o,250)),r.value=c}function s(){n.value&&(clearInterval(n.value),n.value=null)}function o(){t&&t.value?t.value():e&&e.value&&e.value(r.value)}return ln(s),{start:i,stop:s,handleHolding:o}}function wi(e,t="div"){const n=be();return Be(()=>{n.value=ue(ye(e),t)}),n}function Qe(e,t="div"){const n=be(null);return Be(()=>{const r=ye(e);n.value=r==""||r==null?null:ue(r,t)}),n}function ye(e){return u(u(e))}function B(...e){return e.includes(Object)||e.push(Object),e}function Ci(e){return Object.keys(e).reduce((t,n)=>(t[gi(n)]=e[n],t),{})}const ki=q({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var b;const n=F({}),r=new ResizeObserver(c),i=F(null);ut(()=>{const v=i.value;v!=null&&r.observe(v)});let s=!0,o=F((b=i.value)==null?void 0:b.getBoundingClientRect());function c(){s&&(s=!1,Ue(()=>{var v;o.value=(v=i.value)==null?void 0:v.getBoundingClientRect(),Object.values(n.value).filter(N=>N).forEach(N=>N.rect=N.element.getBoundingClientRect()),t("updateNodes",n.value),s=!0}))}se.on("fontsLoaded",c);const d={attributes:!1,childList:!0,subtree:!1};gt(Ut,(v,N)=>{const k=new MutationObserver(()=>g(v));k.observe(N,d),n.value[v]={element:N,observer:k,rect:N.getBoundingClientRect()},c()}),gt(zt,v=>{var N;(N=n.value[v])==null||N.observer.disconnect(),n.value[v]=void 0,c()}),gt(Gt,n),gt(jt,o);function g(v){const N=n.value[v];N!=null&&(N.rect=N.element.getBoundingClientRect(),t("updateNodes",n.value))}return(v,N)=>(p(),_(j,null,[Te(v.$slots,"default",{},void 0,!0),m("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var Sn=z(ki,[["__scopeId","data-v-2b1dc1bc"]]);const Si=["onPointerdown"],Ii={class:"modal-wrapper"},Mi={class:"modal-container"},$i={class:"modal-header"},xi={class:"modal-body"},Fi={class:"modal-footer"},Ti=m("div",{class:"modal-default-flex-grow"},null,-1),je=q({__name:"Modal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){const i=de(e),s=P(()=>u(i.modelValue)||c.value);function o(){n("update:modelValue",!1)}const c=F(!1),d=F(null),g=P(()=>{var b,v;return(v=(b=d.value)==null?void 0:b.nodes)!=null?v:null});return t({isOpen:s,nodes:g}),(b,v)=>(p(),L(qn,{to:"#modal-root"},[y(un,{name:"modal",onBeforeEnter:v[0]||(v[0]=N=>c.value=!0),onAfterLeave:v[1]||(v[1]=N=>c.value=!1)},{default:V(()=>[Dt(m("div",Oe({class:"modal-mask",onPointerdown:rt(o,["self"])},b.$attrs),[m("div",Ii,[m("div",Mi,[m("div",$i,[Te(b.$slots,"header",{shown:u(s)},()=>[T(" default header ")])]),m("div",xi,[y(Sn,{ref_key:"contextRef",ref:d},{default:V(()=>[Te(b.$slots,"body",{shown:u(s)},()=>[T(" default body ")])]),_:3},512)]),m("div",Fi,[Te(b.$slots,"footer",{shown:u(s)},()=>[m("div",{class:"modal-default-footer"},[Ti,m("button",{class:"button modal-default-button",onClick:o}," Close ")])])])])])],16,Si),[[Rn,e.modelValue]])]),_:3})]))}}),Re=Symbol("ProxyState");function He(e,t={}){const n=t;let r=!1,i=!1;function s(){return r||(i&&console.error("Cyclical dependency detected. Cannot evaluate lazy proxy."),i=!0,Object.assign(n,e.call(n,n)),r=!0),n}return new Proxy(n,{get(o,c){if(c===Re)return s();const d=s()[c];return d!=null&&typeof d=="object"&&Fe in d?d[Fe]:d},set(o,c,d){return s()[c]=d,!0},has(o,c){return c===Re?!0:Reflect.has(s(),c)},ownKeys(){return Reflect.ownKeys(s())},getOwnPropertyDescriptor(o,c){return r||(Object.assign(n,e.call(n,n)),r=!0),Object.getOwnPropertyDescriptor(o,c)}})}const In=l.ln(10);function vt(e){return e}function tt(e,...t){const n=t.find(r=>w(r));return n==null?(console.error("Could not invert due to no input being a variable"),0):n.invert(e)}function Pi(e,t){return w(t)?t.invert(l.neg(e)):(console.error("Could not invert due to no input being a variable"),0)}function Ei(e,t){return w(t)?t.isIntegrable()?a.neg(t.getIntegralFormula(e)):(console.error("Could not integrate due to variable not being integrable"),a.constant(0)):(console.error("Could not integrate due to no input being a variable"),a.constant(0))}function Oi(e){return a.neg(e)}function Vi(e,t,n){return w(t)?t.invert(l.sub(e,K(n))):w(n)?n.invert(l.sub(e,K(t))):(console.error("Could not invert due to no input being a variable"),0)}function Di(e,t,n){var r,i;if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const s=t.getIntegralFormula(e);return a.times(n,(r=t.innermostVariable)!=null?r:0).add(s)}else if(w(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const s=n.getIntegralFormula(e);return a.times(t,(i=n.innermostVariable)!=null?i:0).add(s)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Li(e,t,n){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=t.getIntegralFormula(e);return a.add(r,n)}else if(w(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=n.getIntegralFormula(e);return a.add(r,t)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Ri(e,t,n){return w(t)?t.invert(l.add(e,K(n))):w(n)?n.invert(l.sub(K(t),e)):(console.error("Could not invert due to no input being a variable"),0)}function qi(e,t,n){var r,i;if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const s=t.getIntegralFormula(e);return a.sub(s,a.times(n,(r=t.innermostVariable)!=null?r:0))}else if(w(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const s=n.getIntegralFormula(e);return a.times(t,(i=n.innermostVariable)!=null?i:0).sub(s)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Ai(e,t,n){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=t.getIntegralFormula(e);return a.sub(r,n)}else if(w(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=n.getIntegralFormula(e);return a.sub(r,t)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Bi(e,t,n){return w(t)?t.invert(l.div(e,K(n))):w(n)?n.invert(l.div(e,K(t))):(console.error("Could not invert due to no input being a variable"),0)}function Ui(e,t,n){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=t.getIntegralFormula(e);return a.times(r,n)}else if(w(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=n.getIntegralFormula(e);return a.times(r,t)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function zi(e,t,n){return w(t)?a.div(e,n):w(n)?a.div(e,t):(console.error("Could not apply substitution due to no input being a variable"),a.constant(0))}function Gi(e,t,n){return w(t)?t.invert(l.mul(e,K(n))):w(n)?n.invert(l.div(K(t),e)):(console.error("Could not invert due to no input being a variable"),0)}function ji(e,t,n){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=t.getIntegralFormula(e);return a.div(r,n)}else if(w(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=n.getIntegralFormula(e);return a.div(t,r)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Hi(e,t,n){return w(t)?a.mul(e,n):w(n)?a.mul(e,t):(console.error("Could not apply substitution due to no input being a variable"),a.constant(0))}function Wi(e,t){return w(t)?t.invert(l.recip(e)):(console.error("Could not invert due to no input being a variable"),0)}function Ji(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.ln(n)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Zi(e,t){return w(t)?t.invert(l.pow10(e)):(console.error("Could not invert due to no input being a variable"),0)}function Ki(e){return l.ln(e).sub(1).times(e).div(In)}function Yi(e,t){if(w(t)){const n=In.times(e);return t.invert(n.div(n.div(Math.E).lambertw()))}return console.error("Could not invert due to no input being a variable"),0}function Xi(e,t){return w(t)?t.isIntegrable()?new a({inputs:[t.getIntegralFormula(e)],evaluate:Ki,invert:Yi}):(console.error("Could not integrate due to variable not being integrable"),a.constant(0)):(console.error("Could not integrate due to no input being a variable"),a.constant(0))}function Qi(e,t,n){return w(t)?t.invert(l.pow(K(n),e)):w(n)?n.invert(l.root(K(t),e)):(console.error("Could not invert due to no input being a variable"),0)}function es(e,t){return l.ln(e).sub(1).times(e).div(l.ln(t))}function ts(e,t,n){if(w(t)){const r=l.ln(K(n)).times(e);return t.invert(r.div(r.div(Math.E).lambertw()))}return console.error("Could not invert due to no input being a variable"),0}function ns(e,t,n){return w(t)?t.isIntegrable()?new a({inputs:[t.getIntegralFormula(e),n],evaluate:es,invert:ts}):(console.error("Could not integrate due to variable not being integrable"),a.constant(0)):(console.error("Could not integrate due to no input being a variable"),a.constant(0))}function rs(e,t){return w(t)?t.invert(l.pow(2,e)):(console.error("Could not invert due to no input being a variable"),0)}function is(e){return l.ln(e).sub(1).times(e).div(l.ln(2))}function ss(e,t){if(w(t)){const n=l.ln(2).times(e);return t.invert(n.div(n.div(Math.E).lambertw()))}return console.error("Could not invert due to no input being a variable"),0}function as(e,t){return w(t)?t.isIntegrable()?new a({inputs:[t.getIntegralFormula(e)],evaluate:is,invert:ss}):(console.error("Could not integrate due to variable not being integrable"),a.constant(0)):(console.error("Could not integrate due to no input being a variable"),a.constant(0))}function os(e,t){return w(t)?t.invert(l.exp(e)):(console.error("Could not invert due to no input being a variable"),0)}function ls(e){return l.ln(e).sub(1).times(e)}function us(e,t){return w(t)?t.invert(l.div(e,l.div(e,Math.E).lambertw())):(console.error("Could not invert due to no input being a variable"),0)}function cs(e,t){return w(t)?t.isIntegrable()?new a({inputs:[t.getIntegralFormula(e)],evaluate:ls,invert:us}):(console.error("Could not integrate due to variable not being integrable"),a.constant(0)):(console.error("Could not integrate due to no input being a variable"),a.constant(0))}function ds(e,t,n){return w(t)?t.invert(l.root(e,K(n))):w(n)?n.invert(l.ln(e).div(l.ln(K(t)))):(console.error("Could not invert due to no input being a variable"),0)}function fs(e,t,n){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=t.getIntegralFormula(e),i=a.add(n,1);return a.pow(r,i).div(i)}else if(w(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=n.getIntegralFormula(e);return a.pow(t,r).div(a.ln(t))}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function gs(e,t){return w(t)?t.invert(l.root(e,10)):(console.error("Could not invert due to no input being a variable"),0)}function ms(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.pow10(n).div(a.ln(10))}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function hs(e,t,n){return w(t)?t.invert(l.ln(e).div(l.ln(K(n)))):w(n)?n.invert(l.root(K(t),e)):(console.error("Could not invert due to no input being a variable"),0)}function ps(e,t,n){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=t.getIntegralFormula(e);return a.pow(n,r).div(a.ln(n))}else if(w(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=n.getIntegralFormula(e),i=a.add(t,1);return a.pow(r,i).div(i)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function vs(e,t,n){return w(t)?t.invert(l.root(e,l.recip(K(n)))):w(n)?n.invert(l.ln(K(t)).div(l.ln(e))):(console.error("Could not invert due to no input being a variable"),0)}function bs(e,t,n){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const r=t.getIntegralFormula(e);return a.pow(r,a.recip(n).add(1)).times(n).div(a.add(n,1))}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function ys(e,t){return w(t)?t.invert(l.ln(e)):(console.error("Could not invert due to no input being a variable"),0)}function _s(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.exp(n)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Ns(e,t=2,n=l.fromComponents_noNormalize(1,0,1)){const r=l.minabs(t,1e308).toNumber();return l.tetrate(e,r,n)}function ws(e,t,n,r){return w(t)?t.invert(l.ssqrt(e)):(console.error("Could not invert due to no input being a variable"),0)}function Cs(e,t=2,n=l.fromComponents_noNormalize(1,0,1)){const r=l.minabs(t,1e308).toNumber();return l.iteratedexp(e,r,new l(n))}function ks(e,t,n,r){return w(t)?t.invert(l.iteratedlog(e,Math.E,l.minabs(1e308,K(n)).toNumber())):(console.error("Could not invert due to no input being a variable"),0)}function Ss(e,t=10,n=2){const r=l.minabs(n,1e308).toNumber();return l.iteratedlog(e,t,r)}function Is(e,t=10){const n=l.minabs(t,1e308).toNumber();return l.slog(e,n)}function Ms(e,t,n){return w(t)?t.invert(l.tetrate(e,l.minabs(1e308,K(n)).toNumber())):(console.error("Could not invert due to no input being a variable"),0)}function $s(e,t,n){const r=l.minabs(t,1e308).toNumber();return l.layeradd(e,r,n)}function xs(e,t,n,r){return w(t)?t.invert(l.layeradd(e,l.minabs(1e308,K(n)).negate().toNumber())):(console.error("Could not invert due to no input being a variable"),0)}function Fs(e,t){return w(t)?t.invert(l.pow(Math.E,e).times(e)):(console.error("Could not invert due to no input being a variable"),0)}function Ts(e,t){return w(t)?t.invert(l.tetrate(e,2)):(console.error("Could not invert due to no input being a variable"),0)}function Ps(e,t,n){const r=l.minabs(t,1e308).toNumber();return l.pentate(e,r,n)}function Es(e,t){return w(t)?t.invert(l.asin(e)):(console.error("Could not invert due to no input being a variable"),0)}function Os(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.cos(n).neg()}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Vs(e,t){return w(t)?t.invert(l.acos(e)):(console.error("Could not invert due to no input being a variable"),0)}function Ds(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.sin(n)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Ls(e,t){return w(t)?t.invert(l.atan(e)):(console.error("Could not invert due to no input being a variable"),0)}function Rs(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.cos(n).ln().neg()}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function qs(e,t){return w(t)?t.invert(l.sin(e)):(console.error("Could not invert due to no input being a variable"),0)}function As(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.asin(n).times(n).add(a.sqrt(a.sub(1,a.pow(n,2))))}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Bs(e,t){return w(t)?t.invert(l.cos(e)):(console.error("Could not invert due to no input being a variable"),0)}function Us(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.acos(n).times(n).sub(a.sqrt(a.sub(1,a.pow(n,2))))}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function zs(e,t){return w(t)?t.invert(l.tan(e)):(console.error("Could not invert due to no input being a variable"),0)}function Gs(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.atan(n).times(n).sub(a.ln(a.pow(n,2).add(1)).div(2))}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function js(e,t){return w(t)?t.invert(l.asinh(e)):(console.error("Could not invert due to no input being a variable"),0)}function Hs(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.cosh(n)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Ws(e,t){return w(t)?t.invert(l.acosh(e)):(console.error("Could not invert due to no input being a variable"),0)}function Js(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.sinh(n)}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Zs(e,t){return w(t)?t.invert(l.atanh(e)):(console.error("Could not invert due to no input being a variable"),0)}function Ks(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.cosh(n).ln()}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Ys(e,t){return w(t)?t.invert(l.sinh(e)):(console.error("Could not invert due to no input being a variable"),0)}function Xs(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.asinh(n).times(n).sub(a.pow(n,2).add(1).sqrt())}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function Qs(e,t){return w(t)?t.invert(l.cosh(e)):(console.error("Could not invert due to no input being a variable"),0)}function ea(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.acosh(n).times(n).sub(a.add(n,1).sqrt().times(a.sub(n,1).sqrt()))}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function ta(e,t){return w(t)?t.invert(l.tanh(e)):(console.error("Could not invert due to no input being a variable"),0)}function na(e,t){if(w(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),a.constant(0);const n=t.getIntegralFormula(e);return a.atanh(n).times(n).add(a.sub(1,a.pow(n,2)).ln().div(2))}return console.error("Could not integrate due to no input being a variable"),a.constant(0)}function et(e){return(t,n)=>new a({inputs:[t,n],evaluate:e,invert:vt})}function w(e){return e instanceof H&&e.hasVariable()}function K(e,t){return e instanceof H?e.evaluate(t):u(e)}function ra(){return a.pow(this,2).div(2)}function ia(){return this}const X=class{constructor(e){this.negate=this.neg,this.negated=this.neg,this.sgn=this.sign,this.plus=this.add,this.subtract=this.sub,this.minus=this.sub,this.multiply=this.mul,this.times=this.mul,this.divide=this.div,this.divideBy=this.div,this.dividedBy=this.div,this.reciprocal=this.recip,this.reciprocate=this.recip,this.logarithm=this.log;let t;"inputs"in e&&(e.inputs=e.inputs.map(n=>typeof n=="object"&&Fe in n?n[Fe]:n)),"variable"in e?(typeof e.variable=="object"&&Fe in e.variable&&(e.variable=e.variable[Fe]),t=this.setupVariable(e)):"evaluate"in e?t=this.setupFormula(e):t=this.setupConstant(e),this.inputs=t.inputs,this.internalVariables=t.internalVariables,this.innermostVariable=t.innermostVariable,this.internalEvaluate=t.internalEvaluate,this.internalInvert=t.internalInvert,this.internalIntegrate=t.internalIntegrate,this.internalIntegrateInner=t.internalIntegrateInner,this.applySubstitution=t.applySubstitution}setupVariable({variable:e}){return{inputs:[e],internalVariables:1,innermostVariable:e,internalIntegrate:ra,internalIntegrateInner:ia,applySubstitution:vt}}setupConstant({inputs:e}){return e.length!==1&&console.error("Evaluate function is required if inputs is not length 1"),{inputs:e,internalVariables:0}}setupFormula(e){var N,k;const{inputs:t,evaluate:n,invert:r,integrate:i,integrateInner:s,applySubstitution:o}=e,c=t.reduce((I,C)=>I+(C instanceof X?C.internalVariables:0),0),d=t.find(I=>I instanceof X&&I.hasVariable()),g=c===1?d==null?void 0:d.innermostVariable:void 0,b=(N=d==null?void 0:d.isInvertible())!=null?N:!1,v=(k=d==null?void 0:d.isIntegrable())!=null?k:!1;return{inputs:t,internalEvaluate:n,internalInvert:b?r:void 0,internalIntegrate:v?i:void 0,internalIntegrateInner:s,applySubstitution:o,innermostVariable:g,internalVariables:c}}isInvertible(){return this.hasVariable()&&(this.internalInvert!=null||this.internalEvaluate==null)}isIntegrable(){return this.hasVariable()&&this.internalIntegrate!=null}isIntegralInvertible(){return this.isIntegrable()?this.getIntegralFormula().isInvertible():!1}hasVariable(){return this.internalVariables===1}evaluate(e){var t,n,r;return(r=(n=(t=this.internalEvaluate)==null?void 0:t.call(this,...this.inputs.map(i=>K(i,e))))!=null?n:this.hasVariable()?e:null)!=null?r:K(this.inputs[0])}equals(e){return this.inputs.length===e.inputs.length&&this.inputs.every((t,n)=>t instanceof X&&e.inputs[n]instanceof X?t.equals(e.inputs[n]):!(t instanceof X)&&!(e.inputs[n]instanceof X)&&l.eq(u(t),u(e.inputs[n])))&&this.internalEvaluate===e.internalEvaluate&&this.internalInvert===e.internalInvert&&this.internalIntegrate===e.internalIntegrate&&this.internalVariables===e.internalVariables}static constant(e){return new a({inputs:[e]})}static variable(e){return new a({variable:e})}static step(e,t,n){const r=n(a.variable(0)),i=Et(t);function s(c){return l.lt(c,u(i))?c:l.add(r.evaluate(l.sub(c,u(i))),u(i))}function o(c,d){return w(d)&&r.isInvertible()?(l.gt(c,u(i))&&(c=l.add(r.invert(l.sub(c,u(i))),u(i))),d.invert(c)):(console.error("Could not invert due to no input being a variable"),0)}return new a({inputs:[e],evaluate:s,invert:r.isInvertible()&&r.hasVariable()?o:void 0})}static if(e,t,n,r){const i=F(0),s=a.variable(i),o=n(s),c=r==null?void 0:r(s),d=Et(t);function g(v){return u(d)?(i.value=v,o.evaluate()):c?(i.value=v,c.evaluate()):v}function b(v,N){return!w(N)||!o.isInvertible()||c!=null&&!c.isInvertible()?(console.error("Could not invert due to no input being a variable"),0):u(d)?N.invert(o.invert(v)):c?N.invert(c.invert(v)):N.invert(v)}return new a({inputs:[e],evaluate:g,invert:o.isInvertible()&&o.hasVariable()?b:void 0})}static conditional(e,t,n,r){return a.if(e,t,n,r)}static abs(e){return new a({inputs:[e],evaluate:l.abs})}static neg(e){return new a({inputs:[e],evaluate:l.neg,invert:Pi,applySubstitution:Oi,integrate:Ei})}static sign(e){return new a({inputs:[e],evaluate:l.sign})}static round(e){return new a({inputs:[e],evaluate:l.round,invert:tt})}static floor(e){return new a({inputs:[e],evaluate:l.floor,invert:tt})}static ceil(e){return new a({inputs:[e],evaluate:l.ceil,invert:tt})}static trunc(e){return new a({inputs:[e],evaluate:l.trunc,invert:tt})}static add(e,t){return new a({inputs:[e,t],evaluate:l.add,invert:Vi,integrate:Di,integrateInner:Li,applySubstitution:vt})}static sub(e,t){return new a({inputs:[e,t],evaluate:l.sub,invert:Ri,integrate:qi,integrateInner:Ai,applySubstitution:vt})}static mul(e,t){return new a({inputs:[e,t],evaluate:l.mul,invert:Bi,integrate:Ui,applySubstitution:zi})}static div(e,t){return new a({inputs:[e,t],evaluate:l.div,invert:Gi,integrate:ji,applySubstitution:Hi})}static recip(e){return new a({inputs:[e],evaluate:l.recip,invert:Wi,integrate:Ji})}static clamp(e,t,n){return new a({inputs:[e,t,n],evaluate:l.clamp,invert:tt})}static pLog10(e){return new a({inputs:[e],evaluate:l.pLog10})}static absLog10(e){return new a({inputs:[e],evaluate:l.absLog10})}static log10(e){return new a({inputs:[e],evaluate:l.log10,invert:Zi,integrate:Xi})}static log(e,t){return new a({inputs:[e,t],evaluate:l.log,invert:Qi,integrate:ns})}static log2(e){return new a({inputs:[e],evaluate:l.log2,invert:rs,integrate:as})}static ln(e){return new a({inputs:[e],evaluate:l.ln,invert:os,integrate:cs})}static pow(e,t){return new a({inputs:[e,t],evaluate:l.pow,invert:ds,integrate:fs})}static pow10(e){return new a({inputs:[e],evaluate:l.pow10,invert:gs,integrate:ms})}static pow_base(e,t){return new a({inputs:[e,t],evaluate:l.pow_base,invert:hs,integrate:ps})}static root(e,t){return new a({inputs:[e,t],evaluate:l.root,invert:vs,integrate:bs})}static factorial(e){return new a({inputs:[e],evaluate:l.factorial})}static gamma(e){return new a({inputs:[e],evaluate:l.gamma})}static lngamma(e){return new a({inputs:[e],evaluate:l.lngamma})}static exp(e){return new a({inputs:[e],evaluate:l.exp,invert:ys,integrate:_s})}static sqr(e){return a.pow(e,2)}static sqrt(e){return a.root(e,2)}static cube(e){return a.pow(e,3)}static cbrt(e){return a.root(e,3)}static tetrate(e,t=2,n=l.fromComponents_noNormalize(1,0,1)){return new a({inputs:[e,t,n],evaluate:Ns,invert:ws})}static iteratedexp(e,t=2,n=l.fromComponents_noNormalize(1,0,1)){return new a({inputs:[e,t,n],evaluate:Cs,invert:ks})}static iteratedlog(e,t=10,n=1){return new a({inputs:[e,t,n],evaluate:Ss})}static slog(e,t=10){return new a({inputs:[e,t],evaluate:Is,invert:Ms})}static layeradd10(e,t){return new a({inputs:[e,t],evaluate:l.layeradd10})}static layeradd(e,t,n=10){return new a({inputs:[e,t,n],evaluate:$s,invert:xs})}static lambertw(e){return new a({inputs:[e],evaluate:l.lambertw,invert:Fs})}static ssqrt(e){return new a({inputs:[e],evaluate:l.ssqrt,invert:Ts})}static pentate(e,t=2,n=l.fromComponents_noNormalize(1,0,1)){return new a({inputs:[e,t,n],evaluate:Ps})}static sin(e){return new a({inputs:[e],evaluate:l.sin,invert:qs,integrate:Os})}static cos(e){return new a({inputs:[e],evaluate:l.cos,invert:Bs,integrate:Ds})}static tan(e){return new a({inputs:[e],evaluate:l.tan,invert:zs,integrate:Rs})}static asin(e){return new a({inputs:[e],evaluate:l.asin,invert:Es,integrate:As})}static acos(e){return new a({inputs:[e],evaluate:l.acos,invert:Vs,integrate:Us})}static atan(e){return new a({inputs:[e],evaluate:l.atan,invert:Ls,integrate:Gs})}static sinh(e){return new a({inputs:[e],evaluate:l.sinh,invert:Ys,integrate:Hs})}static cosh(e){return new a({inputs:[e],evaluate:l.cosh,invert:Qs,integrate:Js})}static tanh(e){return new a({inputs:[e],evaluate:l.tanh,invert:ta,integrate:Ks})}static asinh(e){return new a({inputs:[e],evaluate:l.asinh,invert:js,integrate:Xs})}static acosh(e){return new a({inputs:[e],evaluate:l.acosh,invert:Ws,integrate:ea})}static atanh(e){return new a({inputs:[e],evaluate:l.atanh,invert:Zs,integrate:na})}step(e,t){return a.step(this,e,t)}if(e,t){return a.if(this,e,t)}conditional(e,t){return a.if(this,e,t)}abs(){return a.abs(this)}neg(){return a.neg(this)}sign(){return a.sign(this)}round(){return a.round(this)}floor(){return a.floor(this)}ceil(){return a.ceil(this)}trunc(){return a.trunc(this)}add(e){return a.add(this,e)}sub(e){return a.sub(this,e)}mul(e){return a.mul(this,e)}div(e){return a.div(this,e)}recip(){return a.recip(this)}max(e){return a.max(this,e)}min(e){return a.min(this,e)}maxabs(e){return a.maxabs(this,e)}minabs(e){return a.minabs(this,e)}clamp(e,t){return a.clamp(this,e,t)}clampMin(e){return a.clampMin(this,e)}clampMax(e){return a.clampMax(this,e)}pLog10(){return a.pLog10(this)}absLog10(){return a.absLog10(this)}log10(){return a.log10(this)}log(e){return a.log(this,e)}log2(){return a.log2(this)}ln(){return a.ln(this)}pow(e){return a.pow(this,e)}pow10(){return a.pow10(this)}pow_base(e){return a.pow_base(this,e)}root(e){return a.root(this,e)}factorial(){return a.factorial(this)}gamma(){return a.gamma(this)}lngamma(){return a.lngamma(this)}exp(){return a.exp(this)}sqr(){return a.pow(this,2)}sqrt(){return a.root(this,2)}cube(){return a.pow(this,3)}cbrt(){return a.root(this,3)}tetrate(e=2,t=l.fromComponents_noNormalize(1,0,1)){return a.tetrate(this,e,t)}iteratedexp(e=2,t=l.fromComponents_noNormalize(1,0,1)){return a.iteratedexp(this,e,t)}iteratedlog(e=10,t=1){return a.iteratedlog(this,e,t)}slog(e=10){return a.slog(this,e)}layeradd10(e){return a.layeradd10(this,e)}layeradd(e,t){return a.layeradd(this,e,t)}lambertw(){return a.lambertw(this)}ssqrt(){return a.ssqrt(this)}pentate(e=2,t=l.fromComponents_noNormalize(1,0,1)){return a.pentate(this,e,t)}sin(){return a.sin(this)}cos(){return a.cos(this)}tan(){return a.tan(this)}asin(){return a.asin(this)}acos(){return a.acos(this)}atan(){return a.atan(this)}sinh(){return a.sinh(this)}cosh(){return a.cosh(this)}tanh(){return a.tanh(this)}asinh(){return a.asinh(this)}acosh(){return a.acosh(this)}atanh(){return a.atanh(this)}};let H=X;H.negate=X.neg;H.negated=X.neg;H.sgn=X.sign;H.plus=X.add;H.subtract=X.sub;H.minus=X.sub;H.multiply=X.mul;H.times=X.mul;H.divide=X.div;H.divideBy=X.div;H.dividedBy=X.div;H.reciprocal=X.recip;H.reciprocate=X.recip;H.max=et(l.max);H.min=et(l.min);H.minabs=et(l.minabs);H.maxabs=et(l.maxabs);H.clampMin=et(l.clampMin);H.clampMax=et(l.clampMax);H.logarithm=X.log;class a extends H{invert(t){return this.internalInvert&&this.hasVariable()?this.internalInvert.call(this,t,...this.inputs):this.inputs.length===1&&this.hasVariable()?t:(console.error("Cannot invert non-invertible formula"),0)}evaluateIntegral(t){return this.isIntegrable()?this.getIntegralFormula().evaluate(t):(console.error("Cannot evaluate integral of formula without integral"),0)}invertIntegral(t){return!this.isIntegrable()||!this.getIntegralFormula().isInvertible()?(console.error("Cannot invert integral of formula without invertible integral"),0):this.getIntegralFormula().invert(t)}calculateConstantOfIntegration(){const t=this.getIntegralFormula().evaluate(1),n=l.add(this.evaluate(0),this.evaluate(1)).div(2);return l.sub(n,t)}getIntegralFormula(t){if(this.integralFormula!=null&&t==null)return this.integralFormula;if(t==null){if(this.applySubstitution==null){if(t=[],this.internalIntegrate==null)return console.error("Cannot integrate formula with non-integrable operation"),a.constant(0);let n=this.internalIntegrate.call(this,t,...this.inputs);t.forEach(r=>n=r(n)),this.integralFormula=n}else if(this.internalIntegrate)this.integralFormula=this.internalIntegrate.call(this,void 0,...this.inputs);else if(this.inputs.length===1&&this.internalEvaluate==null&&this.hasVariable())this.integralFormula=this;else return console.error("Cannot integrate formula without variable"),a.constant(0);return this.integralFormula}else return this.applySubstitution==null?(console.error("Cannot have two complex operations in an integrable formula"),a.constant(0)):(t.push(n=>this.applySubstitution.call(this,n,...this.inputs)),this.internalIntegrateInner?this.internalIntegrateInner.call(this,t,...this.inputs):this.internalIntegrate?this.internalIntegrate.call(this,t,...this.inputs):this.inputs.length===1&&this.internalEvaluate==null&&this.hasVariable()?this:(console.error("Cannot integrate formula without variable"),a.constant(0)))}}const Ze=Symbol("PersistentState"),Ge=Symbol("DefaultValue"),_t=Symbol("StackTrace"),Ot=Symbol("Deleted"),Fe=Symbol("NonPersistent"),Ae=Symbol("SaveDataPath"),Vt=Symbol("SkipPersistence");function sa(){var e,t;return(t=(e=new Error().stack)==null?void 0:e.split(` `).slice(3,5).map(n=>n.trim()).join(` -`))!=null?t:""}function sn(e,t){var n;l.isNaN(t)&&(J.hasNaN||(x.autosave=!1,J.hasNaN=!0,J.NaNPath=e[Ae],J.NaNPersistent=e),console.error(`Attempted to save NaN value to ${(n=e[Ae])==null?void 0:n.join(".")}`)),e[Ze].value=t}function ct(e,t=!0){const n=te(e)?e:F(e);te(e)&&(e=e.value);const r=P({get(){return n.value},set(s){t?sn(i,s):i[Ze].value=s}});r[Ge]=e;const i={get value(){return n.value},set value(s){t?sn(i,s):i[Ze].value=s},__v_isRef:!0,[Ze]:n,[Ge]:e,[yt]:sa(),[Ot]:!1,[Fe]:r,[Ae]:void 0};return ve.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",i,` +`))!=null?t:""}function sn(e,t){var n;l.isNaN(t)&&(J.hasNaN||(x.autosave=!1,J.hasNaN=!0,J.NaNPath=e[Ae],J.NaNPersistent=e),console.error(`Attempted to save NaN value to ${(n=e[Ae])==null?void 0:n.join(".")}`)),e[Ze].value=t}function dt(e,t=!0){const n=te(e)?e:F(e);te(e)&&(e=e.value);const r=P({get(){return n.value},set(s){t?sn(i,s):i[Ze].value=s}});r[Ge]=e;const i={get value(){return n.value},set value(s){t?sn(i,s):i[Ze].value=s},__v_isRef:!0,[Ze]:n,[Ge]:e,[_t]:sa(),[Ot]:!1,[Fe]:r,[Ae]:void 0};return ve.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",i,` Created at: -`+i[yt]):Ke[ve[ve.length-1]].add(i),i}function aa(e){return e!=null&&typeof e=="object"&&Ze in e}se.on("addLayer",(e,t)=>{const n=[],r=(i,s=[])=>{let o=!1;return Object.keys(i).forEach(c=>{let d=i[c];if(d!=null&&typeof d=="object"){if(d[Vt]===!0)return;if(Re in d&&(d=d[Re]),aa(d)){if(o=!0,d[Ot]){console.warn("Deleted persistent ref present in returned object. Ignoring...",d,` +`+i[_t]):Ke[ve[ve.length-1]].add(i),i}function aa(e){return e!=null&&typeof e=="object"&&Ze in e}se.on("addLayer",(e,t)=>{const n=[],r=(i,s=[])=>{let o=!1;return Object.keys(i).forEach(c=>{let d=i[c];if(d!=null&&typeof d=="object"){if(d[Vt]===!0)return;if(Re in d&&(d=d[Re]),aa(d)){if(o=!0,d[Ot]){console.warn("Deleted persistent ref present in returned object. Ignoring...",d,` Created at: -`+d[yt]);return}Ke[e.id].delete(d);const g=[e.id,...s,c];d[Ae]!=null&&JSON.stringify(g)!==JSON.stringify(d[Ae])&&console.error(`Persistent ref is being saved to \`${g.join(".")}\` when it's already present at \`${d[Ae].join(".")}\`.`,"This can cause unexpected behavior when loading saves between updates."),d[Ae]=g;const b=s.reduce((N,k)=>(k in N||(N[k]={}),N[k]),t),v=b[c];b[c]=d[Ze],An(b)?v!=null?b[c]=v:b[c]=d[Ge]:v!=null?b[c].value=v:b[c].value=d[Ge]}else!(d instanceof l)&&!(d instanceof a)&&!te(d)&&!n.includes(d)&&(typeof d.type=="symbol"&&n.push(d),r(d,[...s,c])&&(Yt(d)&&!Yt(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.",Re in i?i[Re]:i,c):o=!0))}}),o};r(e[Re]),Ke[e.id].forEach(i=>{i[Ot]||console.error(`Created persistent ref in ${e.id} without registering it to the layer!`,`Make sure to include everything persistent in the returned object. +`+d[_t]);return}Ke[e.id].delete(d);const g=[e.id,...s,c];d[Ae]!=null&&JSON.stringify(g)!==JSON.stringify(d[Ae])&&console.error(`Persistent ref is being saved to \`${g.join(".")}\` when it's already present at \`${d[Ae].join(".")}\`.`,"This can cause unexpected behavior when loading saves between updates."),d[Ae]=g;const b=s.reduce((N,k)=>(k in N||(N[k]={}),N[k]),t),v=b[c];b[c]=d[Ze],An(b)?v!=null?b[c]=v:b[c]=d[Ge]:v!=null?b[c].value=v:b[c].value=d[Ge]}else!(d instanceof l)&&!(d instanceof a)&&!te(d)&&!n.includes(d)&&(typeof d.type=="symbol"&&n.push(d),r(d,[...s,c])&&(Yt(d)&&!Yt(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.",Re in i?i[Re]:i,c):o=!0))}}),o};r(e[Re]),Ke[e.id].forEach(i=>{i[Ot]||console.error(`Created persistent ref in ${e.id} without registering it to the layer!`,`Make sure to include everything persistent in the returned object. Created at: -`+i[yt])}),Ke[e.id].clear()});const Ut=Symbol("RegisterNode"),zt=Symbol("UnregisterNode"),Gt=Symbol("Nodes"),jt=Symbol("Bounds"),le=Ct({});window.layers=le;const Ke={},ve=[];function Ht(e,t){return He(()=>{const n={},r=n.emitter=cn();if(n.on=r.on.bind(r),n.emit=r.emit.bind(r),n.nodes=F({}),n.id=e,ve.push(e),Ke[e]=new Set,n.minimized=ct(!1,!1),Object.assign(n,t.call(n,n)),ve[ve.length-1]==null||ve[ve.length-1]!==e)throw new Error(`Adding layers stack in invalid state. This should not happen +`+i[_t])}),Ke[e.id].clear()});const Ut=Symbol("RegisterNode"),zt=Symbol("UnregisterNode"),Gt=Symbol("Nodes"),jt=Symbol("Bounds"),le=kt({});window.layers=le;const Ke={},ve=[];function Ht(e,t){return He(()=>{const n={},r=n.emitter=cn();if(n.on=r.on.bind(r),n.emit=r.emit.bind(r),n.nodes=F({}),n.id=e,ve.push(e),Ke[e]=new Set,n.minimized=dt(!1,!1),Object.assign(n,t.call(n,n)),ve[ve.length-1]==null||ve[ve.length-1]!==e)throw new Error(`Adding layers stack in invalid state. This should not happen Stack: ${ve} -Trying to pop ${n.id}`);ve.pop(),E(n,"color"),E(n,"display"),E(n,"classes"),E(n,"style"),E(n,"name"),ce(n,"name",n.id),E(n,"minWidth"),ce(n,"minWidth",600),E(n,"minimizable"),ce(n,"minimizable",!0),E(n,"minimizedDisplay");const i=n.style;return n.style=P(()=>{var o,c;let s=u(n.minWidth);return(typeof s=="number"||!Number.isNaN(parseInt(s)))&&(s=s+"px"),[(o=u(i))!=null?o:"",(c=n.minimized)!=null&&c.value?{flexGrow:"0",flexShrink:"0",width:"60px",minWidth:"",flexBasis:"",margin:"0"}:{flexGrow:"",flexShrink:"",width:"",minWidth:s,flexBasis:s,margin:""}]}),n})}function Mn(e,t){if(console.info("Adding layer",e.id),le[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,le[e.id]);return}ce(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),le[e.id]=e,se.emit("addLayer",e,t.layers[e.id])}function oa(e){return le[e]}function $n(e){console.info("Removing layer",e.id),se.emit("removeLayer",e),le[e.id]=void 0}function la(e){$n(e),Mn(e,x)}function ua(e){const t=F(!1);return{openModal:()=>t.value=!0,modal:ee(()=>y(je,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>y("h2",null,[u(e.name)]),body:u(e.display)}))}}se.on("update",function(t){Object.values(le).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(le).forEach(n=>{n==null||n.emit("update",t)}),Object.values(le).forEach(n=>{n==null||n.emit("postUpdate",t)})});var ca=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Ut,UnregisterNodeInjectionKey:zt,NodesInjectionKey:Gt,BoundsInjectionKey:jt,layers:le,persistentRefs:Ke,addingLayers:ve,createLayer:Ht,addLayer:Mn,getLayer:oa,removeLayer:$n,reloadLayer:la,setupLayerModal:ua},Symbol.toStringTag,{value:"Module"}));const da=q({components:{Context:Sn,ErrorVue:dn},props:{index:{type:Number,required:!0},display:{type:B(Object,String,Function),required:!0},minimizedDisplay:B(Object,String,Function),minimized:{type:Object,required:!0},name:{type:B(String),required:!0},color:B(String),minimizable:B(Boolean),nodes:{type:Object,required:!0}},emits:["setMinimized"],setup(e){const{display:t,index:n,minimized:r,minimizedDisplay:i}=de(e),s=wi(t),o=Qe(i),c=P(()=>A.allowGoBack&&n.value>0&&!ye(r));function d(){x.tabs.splice(u(e.index),1/0)}function g(v){e.nodes.value=v}const b=F([]);return Bn((v,N,k)=>(console.warn(`Error caught in "${e.name}" layer`,v,N,k),b.value.push(v instanceof Error?v:new Error(JSON.stringify(v))),!1)),{component:s,minimizedComponent:o,showGoBack:c,updateNodes:g,unref:u,goBack:d,errors:b}}}),fa={key:1};function ga(e,t,n,r,i,s){const o=ze("ErrorVue"),c=ze("Context");return e.errors.length>0?(p(),L(o,{key:0,errors:e.errors},null,8,["errors"])):(p(),_("div",Oe({key:1,class:"layer-container",style:{"--layer-color":e.unref(e.color)}},e.$attrs),[e.showGoBack?(p(),_("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...d)=>e.goBack&&e.goBack(...d))},"\u274C")):$("",!0),e.unref(e.minimized)?(p(),_("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=d=>e.$emit("setMinimized",!1))},[e.minimizedComponent?(p(),L(ie(e.minimizedComponent),{key:0})):(p(),_("div",fa,D(e.unref(e.name)),1))])):(p(),_("div",{key:2,class:ae(["layer-tab",{showGoBack:e.showGoBack}])},[y(c,{onUpdateNodes:e.updateNodes},{default:V(()=>[(p(),L(ie(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(p(),_("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=d=>e.$emit("setMinimized",!0))}," \u25BC ")):$("",!0)],16))}var ma=z(da,[["render",ga],["__scopeId","data-v-a9f5b1da"]]);const xn=e=>(Ie("data-v-4b4bda40"),e=e(),Me(),e),ha=xn(()=>m("h2",null,"Changelog",-1)),pa=xn(()=>m("details",{open:""},[m("summary",null,[T("v0.0 Initial Commit - "),m("time",null,"2021-09-04")]),T(" This is the first release :D "),m("ul",null,[m("li",{class:"feature"},"Did everything"),m("li",{class:"fix"},"Had some fun"),m("li",{class:"breaking"},"Removed everything"),m("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),va=q({__name:"Changelog",setup(e,{expose:t}){const n=F(!1);return t({open(){n.value=!0}}),(r,i)=>(p(),L(je,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=s=>n.value=s)},{header:V(()=>[ha]),body:V(()=>[pa]),_:1},8,["modelValue"]))}});var ba=z(va,[["__scopeId","data-v-4b4bda40"]]),ya=q({props:{element:Object,display:{type:B(Object,String,Function),required:!0},style:B(Object,String,Array),classes:B(Object),direction:B(String),xoffset:B(String),yoffset:B(String),pinned:Object},setup(e){const{element:t,display:n,pinned:r}=de(e),i=F(!1),s=P(()=>(ye(r)||i.value)&&o.value),o=Qe(n),c=be(ue(ee(()=>{const b=ye(t);return b==null?"":ht(b)})));function d(b){const v=r;b.shiftKey&&v&&(v.value=!v.value,b.stopPropagation(),b.preventDefault())}const g=P(()=>ye(r)&&At[ne.theme].showPin);return{Direction:Z,isHovered:i,isShown:s,comp:o,elementComp:c,unref:u,togglePinned:d,showPin:g}}});const _a={key:0,class:"material-icons pinned"};function Na(e,t,n,r,i,s){return p(),_("div",{class:ae(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=o=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=o=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...o)=>e.togglePinned&&e.togglePinned(...o))},[Te(e.$slots,"default",{},void 0,!0),e.elementComp?(p(),L(ie(e.elementComp),{key:0})):$("",!0),y(un,{name:"fade"},{default:V(()=>{var o;return[e.isShown?(p(),_("div",{key:0,class:ae(["tooltip",{top:e.unref(e.direction)===e.Direction.Up,left:e.unref(e.direction)===e.Direction.Left,right:e.unref(e.direction)===e.Direction.Right,bottom:e.unref(e.direction)===e.Direction.Down,...e.unref(e.classes)}]),style:ge([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(o=e.unref(e.style))!=null?o:{}])},[e.showPin?(p(),_("span",_a,"push_pin")):$("",!0),e.comp?(p(),L(ie(e.comp),{key:1})):$("",!0)],6)):$("",!0)]}),_:1})],34)}var Q=z(ya,[["render",Na],["__scopeId","data-v-6102fa3a"]]);const We=e=>(Ie("data-v-10effbe8"),e=e(),Me(),e),wa={class:"info-modal-header"},Ca=["src","alt"],ka={class:"info-modal-title"},Sa={key:0},Ia={key:0},Ma={key:0},$a=We(()=>m("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1)),xa=We(()=>m("br",null,null,-1)),Fa=We(()=>m("br",null,null,-1)),Ta=["href"],Pa=We(()=>m("span",{class:"material-icons info-modal-discord"},"discord",-1)),Ea=We(()=>m("div",null,[m("a",{href:"https://discord.gg/yJ4fjnjU54",class:"info-modal-discord-link",target:"_blank"},[m("span",{class:"material-icons info-modal-discord"},"discord"),T(" Profectus & Friends ")])],-1)),Oa=We(()=>m("div",null,[m("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link",target:"_blank"},[m("span",{class:"material-icons info-modal-discord"},"discord"),T(" The Modding Tree ")])],-1)),Va=We(()=>m("br",null,null,-1));var Da=q({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const n=e,{title:r,logo:i,author:s,discordName:o,discordLink:c,versionNumber:d,versionTitle:g}=A,b=de(n),v=F(!1),N=P(()=>St(x.timePlayed)),k=P(()=>ue(ee(()=>y(j,null,[Cn.map(ut)]))));t({open(){v.value=!0}});function I(){var C;(C=u(b.changelog))==null||C.open()}return(C,G)=>(p(),L(je,{modelValue:v.value,"onUpdate:modelValue":G[0]||(G[0]=Y=>v.value=Y)},{header:V(()=>[m("div",wa,[u(i)?(p(),_("img",{key:0,class:"info-modal-logo",src:u(i),alt:u(r)},null,8,Ca)):$("",!0),m("div",ka,[m("h2",null,D(u(r)),1),m("h4",null,[T(" v"+D(u(d)),1),u(g)?(p(),_("span",Sa,": "+D(u(g)),1)):$("",!0)])])])]),body:V(({shown:Y})=>[Y?(p(),_("div",Ia,[u(s)?(p(),_("div",Ma,"By "+D(u(s)),1)):$("",!0),$a,xa,m("div",{class:"link",onClick:I},"Changelog"),Fa,m("div",null,[u(c)?(p(),_("a",{key:0,href:u(c),class:"info-modal-discord-link",target:"_blank"},[Pa,T(" "+D(u(o)),1)],8,Ta)):$("",!0)]),Ea,Oa,Va,m("div",null,"Time Played: "+D(u(N)),1),(p(),L(ie(u(k))))])):$("",!0)]),_:1},8,["modelValue"]))}});var La=z(Da,[["__scopeId","data-v-10effbe8"]]);const Ra={class:"field"},qa={key:0,class:"field-title"},Fn=q({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var o;const n=e,r=Qe(ke(n,"title"),"span"),i=F((o=n.options.find(c=>c.value===n.modelValue))!=null?o:null);_e(ke(n,"modelValue"),c=>{var d;ye(i)!==c&&(i.value=(d=n.options.find(g=>g.value===c))!=null?d:null)});function s(c){t("update:modelValue",c.value)}return(c,d)=>(p(),_("div",Ra,[u(r)?(p(),_("span",qa,[(p(),L(ie(u(r))))])):$("",!0),y(u(Hn),{options:e.options,modelValue:i.value,"onUpdate:modelValue":[d[0]||(d[0]=g=>i.value=g),s],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});const Aa={class:"field"},Ba=q({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=P(()=>{var s;return ue((s=u(n.title))!=null?s:"","span")}),i=P({get(){return!!n.modelValue},set(s){t("update:modelValue",s)}});return(s,o)=>(p(),_("label",Aa,[Dt(m("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":o[0]||(o[0]=c=>te(i)?i.value=c:null)},null,512),[[Un,u(i)]]),(p(),L(ie(u(r))))]))}});var we=z(Ba,[["__scopeId","data-v-11046116"]]);const Ua={class:"header"},za=m("h2",null,"Settings",-1),Ga={class:"option-tabs"},ja={key:0},Ha={key:1};var Wa=q({__name:"Options",setup(e,{expose:t}){const n=F(!1),r=F("behaviour");function i(oe){return oe==r.value}function s(oe){r.value=oe}t({isTab:i,setTab:s,save:fe,open(){n.value=!0}});const o=Object.keys(At).map(oe=>({label:bn(oe),value:oe})),c=P(()=>ue(ee(()=>y(j,null,[yi.map(ut)])))),{showTPS:d,theme:g,unthrottled:b,alignUnits:v}=de(ne),{autosave:N,offlineProd:k}=de(x),I=P({get(){return x.devSpeed===0},set(oe){x.devSpeed=oe?0:null}}),C=ee(()=>y("span",{class:"option-title"},[T("Unthrottled"),y("desc",null,[T("Allow the game to run as fast as possible. Not battery friendly.")])])),G=ee(()=>y("span",{class:"option-title"},[T("Offline Production"),y(Q,{display:"Save-specific",direction:Z.Right},{default:()=>[T("*")]}),y("desc",null,[T("Simulate production that occurs while the game is closed.")])])),Y=ee(()=>y("span",{class:"option-title"},[T("Autosave"),y(Q,{display:"Save-specific",direction:Z.Right},{default:()=>[T("*")]}),y("desc",null,[T("Automatically save the game every second or when the game is closed.")])])),S=ee(()=>y("span",{class:"option-title"},[T("Pause game"),y(Q,{display:"Save-specific",direction:Z.Right},{default:()=>[T("*")]}),y("desc",null,[T("Stop everything from moving.")])])),M=ee(()=>y("span",{class:"option-title"},[T("Theme"),y("desc",null,[T("How the game looks.")])])),U=ee(()=>y("span",{class:"option-title"},[T("Show TPS"),y("desc",null,[T("Show TPS meter at the bottom-left corner of the page.")])])),Ne=ee(()=>y("span",{class:"option-title"},[T("Align modifier units"),y("desc",null,[T("Align numbers to the beginning of the unit in modifier view.")])]));return(oe,W)=>(p(),L(je,{modelValue:n.value,"onUpdate:modelValue":W[10]||(W[10]=re=>n.value=re)},{header:V(()=>[m("div",Ua,[za,m("div",Ga,[m("button",{class:ae({selected:i("behaviour")}),onClick:W[0]||(W[0]=re=>s("behaviour"))},"Behaviour",2),m("button",{class:ae({selected:i("appearance")}),onClick:W[1]||(W[1]=re=>s("appearance"))},"Appearance",2)])])]),body:V(()=>[i("behaviour")?(p(),_("div",ja,[y(we,{title:u(C),modelValue:u(b),"onUpdate:modelValue":W[2]||(W[2]=re=>te(b)?b.value=re:null)},null,8,["title","modelValue"]),u(A).enablePausing?(p(),L(we,{key:0,title:u(S),modelValue:u(I),"onUpdate:modelValue":W[3]||(W[3]=re=>te(I)?I.value=re:null)},null,8,["title","modelValue"])):$("",!0),y(we,{title:u(G),modelValue:u(k),"onUpdate:modelValue":W[4]||(W[4]=re=>te(k)?k.value=re:null)},null,8,["title","modelValue"]),y(we,{title:u(Y),modelValue:u(N),"onUpdate:modelValue":W[5]||(W[5]=re=>te(N)?N.value=re:null)},null,8,["title","modelValue"]),u(N)?$("",!0):(p(),L(Rt,{key:1,class:"button save-button",onClick:W[6]||(W[6]=re=>u(fe)())},{default:V(()=>[T("Manually save")]),_:1}))])):$("",!0),i("appearance")?(p(),_("div",Ha,[y(Fn,{title:u(M),options:u(o),modelValue:u(g),"onUpdate:modelValue":W[7]||(W[7]=re=>te(g)?g.value=re:null)},null,8,["title","options","modelValue"]),(p(),L(ie(u(c)))),y(we,{title:u(U),modelValue:u(d),"onUpdate:modelValue":W[8]||(W[8]=re=>te(d)?d.value=re:null)},null,8,["title","modelValue"]),y(we,{title:u(Ne),modelValue:u(v),"onUpdate:modelValue":W[9]||(W[9]=re=>te(v)?v.value=re:null)},null,8,["title","modelValue"])])):$("",!0)]),_:1},8,["modelValue"]))}});const Ja=["onSubmit"],Za={class:"field"},Ka={key:0,class:"field-title"},Ya=["placeholder"],Xa=q({__name:"Text",props:{title:null,modelValue:null,textArea:{type:Boolean},placeholder:null,maxHeight:null,submitOnBlur:{type:Boolean}},emits:["update:modelValue","submit","cancel"],setup(e,{emit:t}){const n=e,r=Qe(ke(n,"title"),"span"),i=be(null);lt(()=>{var d;(d=i.value)==null||d.focus()});const s=P({get(){var d;return(d=u(n.modelValue))!=null?d:""},set(d){t("update:modelValue",d)}});function o(){t("submit")}function c(){n.submitOnBlur!==!1?t("submit"):t("cancel")}return(d,g)=>(p(),_("form",{onSubmit:rt(o,["prevent"])},[m("div",Za,[u(r)?(p(),_("span",Ka,[(p(),L(ie(u(r))))])):$("",!0),e.textArea?(p(),L(u(Jn),{key:1,modelValue:u(s),"onUpdate:modelValue":g[0]||(g[0]=b=>te(s)?s.value=b:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:c,ref_key:"field",ref:i},null,8,["modelValue","placeholder","maxHeight"])):Dt((p(),_("input",{key:2,type:"text","onUpdate:modelValue":g[1]||(g[1]=b=>te(s)?s.value=b:null),placeholder:e.placeholder,class:ae({fullWidth:!e.title}),onBlur:c,ref_key:"field",ref:i},null,42,Ya)),[[zn,u(s)]])])],40,Ja))}});var Tn=z(Xa,[["__scopeId","data-v-90bd4994"]]);const Qa={key:0},eo=["onClick","disabled"],to={key:0},no=["onClick"],ro=q({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const r=de(e),i=F(!1);_e(i,c=>{t("confirmingChanged",c)});function s(){if(u(r.skipConfirm)){t("click");return}i.value&&t("click"),i.value=!i.value}function o(){i.value=!1}return(c,d)=>(p(),_("span",{class:ae(["container",{confirming:i.value}])},[i.value?(p(),_("span",Qa,"Are you sure?")):$("",!0),m("button",{onClick:rt(s,["stop"]),class:"button danger",disabled:e.disabled},[i.value?(p(),_("span",to,"Yes")):Te(c.$slots,"default",{key:1},void 0,!0)],8,eo),i.value?(p(),_("button",{key:1,class:"button",onClick:rt(o,["stop"])},"No",8,no)):$("",!0)],2))}});var io=z(ro,[["__scopeId","data-v-2f8ef34c"]]);const $e=e=>(Ie("data-v-32313015"),e=e(),Me(),e),so=$e(()=>m("div",{class:"handle material-icons"},"drag_handle",-1)),ao={key:0,class:"actions"},oo=$e(()=>m("span",{class:"material-icons"},"content_paste",-1)),lo=$e(()=>m("span",{class:"material-icons"},"content_copy",-1)),uo=$e(()=>m("span",{class:"material-icons"},"edit",-1)),co=$e(()=>m("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),fo={key:1,class:"actions"},go=$e(()=>m("span",{class:"material-icons"},"check",-1)),mo=$e(()=>m("span",{class:"material-icons"},"close",-1)),ho={key:2,class:"details"},po={class:"save-version"},vo=$e(()=>m("br",null,null,-1)),bo={key:0},yo={key:3,class:"details"},_o={key:4,class:"details error"},No=$e(()=>m("br",null,null,-1)),wo=q({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const n=e,{save:r}=de(n),i=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),s=F(!1),o=F(!1),c=F("");_e(s,()=>{var v;return c.value=(v=r.value.name)!=null?v:""});const d=P(()=>r.value!=null&&r.value.id===x.id),g=P(()=>{var v;return d.value?x.time:(v=r.value!=null&&r.value.time)!=null?v:0});function b(){t("editName",c.value),s.value=!1}return(v,N)=>(p(),_("div",{class:ae(["save",{active:u(d)}])},[so,s.value?(p(),_("div",fo,[m("button",{onClick:b,class:"button"},[y(Q,{display:"Save",direction:u(Z).Left,class:"info"},{default:V(()=>[go]),_:1},8,["direction"])]),m("button",{onClick:N[5]||(N[5]=k=>s.value=!s.value),class:"button"},[y(Q,{display:"Cancel",direction:u(Z).Left,class:"info"},{default:V(()=>[mo]),_:1},8,["direction"])])])):(p(),_("div",ao,[u(r).error==null&&!o.value?(p(),L(Rt,{key:0,onClick:N[0]||(N[0]=k=>t("export")),class:"button",left:""},{default:V(()=>[y(Q,{display:"Export",direction:u(Z).Left,class:"info"},{default:V(()=>[oo]),_:1},8,["direction"])]),_:1})):$("",!0),u(r).error==null&&!o.value?(p(),_("button",{key:1,onClick:N[1]||(N[1]=k=>t("duplicate")),class:"button"},[y(Q,{display:"Duplicate",direction:u(Z).Left,class:"info"},{default:V(()=>[lo]),_:1},8,["direction"])])):$("",!0),u(r).error==null&&!o.value?(p(),_("button",{key:2,onClick:N[2]||(N[2]=k=>s.value=!s.value),class:"button"},[y(Q,{display:"Edit Name",direction:u(Z).Left,class:"info"},{default:V(()=>[uo]),_:1},8,["direction"])])):$("",!0),y(io,{disabled:u(d),onClick:N[3]||(N[3]=k=>t("delete")),onConfirmingChanged:N[4]||(N[4]=k=>o.value=k)},{default:V(()=>[y(Q,{display:"Delete",direction:u(Z).Left,class:"info"},{default:V(()=>[co]),_:1},8,["direction"])]),_:1},8,["disabled"])])),u(r).error==null&&!s.value?(p(),_("div",ho,[m("button",{class:"button open",onClick:N[6]||(N[6]=k=>t("open"))},[m("h3",null,D(u(r).name),1)]),m("span",po,"v"+D(u(r).modVersion),1),vo,u(g)?(p(),_("div",bo,"Last played "+D(u(i).format(u(g))),1)):$("",!0)])):u(r).error==null&&s.value?(p(),_("div",yo,[y(Tn,{modelValue:c.value,"onUpdate:modelValue":N[7]||(N[7]=k=>c.value=k),class:"editname",onSubmit:b},null,8,["modelValue"])])):(p(),_("div",_o,[T(" Error: Failed to load save with id "+D(u(r).id),1),No,T(D(u(r).error),1)]))],2))}});var Co=z(wo,[["__scopeId","data-v-32313015"]]);const Wt=e=>(Ie("data-v-2a4275be"),e=e(),Me(),e),ko=Wt(()=>m("h2",null,"Saves Manager",-1)),So={class:"modal-footer"},Io={class:"field"},Mo=Wt(()=>m("span",{class:"field-title"},"Create Save",-1)),$o={class:"field-buttons"},xo={class:"footer"},Fo=Wt(()=>m("div",{style:{"flex-grow":"1"}},null,-1)),To=q({__name:"SavesManager",setup(e,{expose:t}){const n=F(!1),r=F(null);t({open(){n.value=!0}});const i=F(!1),s=F(""),o=F(null);_e(s,S=>{S?Ue(()=>{try{if(S[0]!=="{")if(S[0]==="e")S=decodeURIComponent(escape(atob(S)));else if(S[0]==="\u1BE1")S=Ce.decompressFromUTF16(S);else{console.warn("Unable to determine preset encoding",S),i.value=!0;return}const M=JSON.parse(S);if(typeof M!="object"){i.value=!0;return}const U=mt();M.id=U,fe(M),s.value="",i.value=!1,ne.saves.push(U)}catch{i.value=!0}}):i.value=!1});let c={},d=F(Object.keys(c).reduce((S,M)=>(S.push({label:M.split("/").slice(-1)[0].slice(0,-4),value:c[M]}),S),[]));const g=Ct({});function b(S){if(g[S]==null){let M=localStorage.getItem(S);if(M==null)g[S]={error:"Save doesn't exist in localStorage",id:S};else if(M==="dW5kZWZpbmVk")g[S]={error:"Save is undefined",id:S};else try{if(M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=Ce.decompressFromUTF16(M);else return console.warn("Unable to determine preset encoding",M),i.value=!0,g[S]={error:"Unable to determine preset encoding",id:S},g[S];g[S]={...JSON.parse(M),id:S}}catch(U){g[S]={error:U,id:S},console.warn(`SavesManager: Failed to load info about save with id ${S}: +Trying to pop ${n.id}`);ve.pop(),E(n,"color"),E(n,"display"),E(n,"classes"),E(n,"style"),E(n,"name"),ce(n,"name",n.id),E(n,"minWidth"),ce(n,"minWidth",600),E(n,"minimizable"),ce(n,"minimizable",!0),E(n,"minimizedDisplay");const i=n.style;return n.style=P(()=>{var o,c;let s=u(n.minWidth);return(typeof s=="number"||!Number.isNaN(parseInt(s)))&&(s=s+"px"),[(o=u(i))!=null?o:"",(c=n.minimized)!=null&&c.value?{flexGrow:"0",flexShrink:"0",width:"60px",minWidth:"",flexBasis:"",margin:"0"}:{flexGrow:"",flexShrink:"",width:"",minWidth:s,flexBasis:s,margin:""}]}),n})}function Mn(e,t){if(console.info("Adding layer",e.id),le[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,le[e.id]);return}ce(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),le[e.id]=e,se.emit("addLayer",e,t.layers[e.id])}function oa(e){return le[e]}function $n(e){console.info("Removing layer",e.id),se.emit("removeLayer",e),le[e.id]=void 0}function la(e){$n(e),Mn(e,x)}function ua(e){const t=F(!1);return{openModal:()=>t.value=!0,modal:ee(()=>y(je,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>y("h2",null,[u(e.name)]),body:u(e.display)}))}}se.on("update",function(t){Object.values(le).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(le).forEach(n=>{n==null||n.emit("update",t)}),Object.values(le).forEach(n=>{n==null||n.emit("postUpdate",t)})});var ca=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Ut,UnregisterNodeInjectionKey:zt,NodesInjectionKey:Gt,BoundsInjectionKey:jt,layers:le,persistentRefs:Ke,addingLayers:ve,createLayer:Ht,addLayer:Mn,getLayer:oa,removeLayer:$n,reloadLayer:la,setupLayerModal:ua},Symbol.toStringTag,{value:"Module"}));const da=q({components:{Context:Sn,ErrorVue:dn},props:{index:{type:Number,required:!0},display:{type:B(Object,String,Function),required:!0},minimizedDisplay:B(Object,String,Function),minimized:{type:Object,required:!0},name:{type:B(String),required:!0},color:B(String),minimizable:B(Boolean),nodes:{type:Object,required:!0}},emits:["setMinimized"],setup(e){const{display:t,index:n,minimized:r,minimizedDisplay:i}=de(e),s=wi(t),o=Qe(i),c=P(()=>A.allowGoBack&&n.value>0&&!ye(r));function d(){x.tabs.splice(u(e.index),1/0)}function g(v){e.nodes.value=v}const b=F([]);return Bn((v,N,k)=>(console.warn(`Error caught in "${e.name}" layer`,v,N,k),b.value.push(v instanceof Error?v:new Error(JSON.stringify(v))),!1)),{component:s,minimizedComponent:o,showGoBack:c,updateNodes:g,unref:u,goBack:d,errors:b}}}),fa={key:1};function ga(e,t,n,r,i,s){const o=ze("ErrorVue"),c=ze("Context");return e.errors.length>0?(p(),L(o,{key:0,errors:e.errors},null,8,["errors"])):(p(),_("div",Oe({key:1,class:"layer-container",style:{"--layer-color":e.unref(e.color)}},e.$attrs),[e.showGoBack?(p(),_("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...d)=>e.goBack&&e.goBack(...d))},"\u274C")):$("",!0),e.unref(e.minimized)?(p(),_("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=d=>e.$emit("setMinimized",!1))},[e.minimizedComponent?(p(),L(ie(e.minimizedComponent),{key:0})):(p(),_("div",fa,D(e.unref(e.name)),1))])):(p(),_("div",{key:2,class:ae(["layer-tab",{showGoBack:e.showGoBack}])},[y(c,{onUpdateNodes:e.updateNodes},{default:V(()=>[(p(),L(ie(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(p(),_("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=d=>e.$emit("setMinimized",!0))}," \u25BC ")):$("",!0)],16))}var ma=z(da,[["render",ga],["__scopeId","data-v-a9f5b1da"]]);const xn=e=>(Ie("data-v-4b4bda40"),e=e(),Me(),e),ha=xn(()=>m("h2",null,"Changelog",-1)),pa=xn(()=>m("details",{open:""},[m("summary",null,[T("v0.0 Initial Commit - "),m("time",null,"2021-09-04")]),T(" This is the first release :D "),m("ul",null,[m("li",{class:"feature"},"Did everything"),m("li",{class:"fix"},"Had some fun"),m("li",{class:"breaking"},"Removed everything"),m("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),va=q({__name:"Changelog",setup(e,{expose:t}){const n=F(!1);return t({open(){n.value=!0}}),(r,i)=>(p(),L(je,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=s=>n.value=s)},{header:V(()=>[ha]),body:V(()=>[pa]),_:1},8,["modelValue"]))}});var ba=z(va,[["__scopeId","data-v-4b4bda40"]]),ya=q({props:{element:Object,display:{type:B(Object,String,Function),required:!0},style:B(Object,String,Array),classes:B(Object),direction:B(String),xoffset:B(String),yoffset:B(String),pinned:Object},setup(e){const{element:t,display:n,pinned:r}=de(e),i=F(!1),s=P(()=>(ye(r)||i.value)&&o.value),o=Qe(n),c=be(ue(ee(()=>{const b=ye(t);return b==null?"":pt(b)})));function d(b){const v=r;b.shiftKey&&v&&(v.value=!v.value,b.stopPropagation(),b.preventDefault())}const g=P(()=>ye(r)&&At[ne.theme].showPin);return{Direction:Z,isHovered:i,isShown:s,comp:o,elementComp:c,unref:u,togglePinned:d,showPin:g}}});const _a={key:0,class:"material-icons pinned"};function Na(e,t,n,r,i,s){return p(),_("div",{class:ae(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=o=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=o=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...o)=>e.togglePinned&&e.togglePinned(...o))},[Te(e.$slots,"default",{},void 0,!0),e.elementComp?(p(),L(ie(e.elementComp),{key:0})):$("",!0),y(un,{name:"fade"},{default:V(()=>{var o;return[e.isShown?(p(),_("div",{key:0,class:ae(["tooltip",{top:e.unref(e.direction)===e.Direction.Up,left:e.unref(e.direction)===e.Direction.Left,right:e.unref(e.direction)===e.Direction.Right,bottom:e.unref(e.direction)===e.Direction.Down,...e.unref(e.classes)}]),style:ge([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(o=e.unref(e.style))!=null?o:{}])},[e.showPin?(p(),_("span",_a,"push_pin")):$("",!0),e.comp?(p(),L(ie(e.comp),{key:1})):$("",!0)],6)):$("",!0)]}),_:1})],34)}var Q=z(ya,[["render",Na],["__scopeId","data-v-6102fa3a"]]);const We=e=>(Ie("data-v-10effbe8"),e=e(),Me(),e),wa={class:"info-modal-header"},Ca=["src","alt"],ka={class:"info-modal-title"},Sa={key:0},Ia={key:0},Ma={key:0},$a=We(()=>m("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1)),xa=We(()=>m("br",null,null,-1)),Fa=We(()=>m("br",null,null,-1)),Ta=["href"],Pa=We(()=>m("span",{class:"material-icons info-modal-discord"},"discord",-1)),Ea=We(()=>m("div",null,[m("a",{href:"https://discord.gg/yJ4fjnjU54",class:"info-modal-discord-link",target:"_blank"},[m("span",{class:"material-icons info-modal-discord"},"discord"),T(" Profectus & Friends ")])],-1)),Oa=We(()=>m("div",null,[m("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link",target:"_blank"},[m("span",{class:"material-icons info-modal-discord"},"discord"),T(" The Modding Tree ")])],-1)),Va=We(()=>m("br",null,null,-1));var Da=q({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const n=e,{title:r,logo:i,author:s,discordName:o,discordLink:c,versionNumber:d,versionTitle:g}=A,b=de(n),v=F(!1),N=P(()=>It(x.timePlayed)),k=P(()=>ue(ee(()=>y(j,null,[Cn.map(ct)]))));t({open(){v.value=!0}});function I(){var C;(C=u(b.changelog))==null||C.open()}return(C,G)=>(p(),L(je,{modelValue:v.value,"onUpdate:modelValue":G[0]||(G[0]=Y=>v.value=Y)},{header:V(()=>[m("div",wa,[u(i)?(p(),_("img",{key:0,class:"info-modal-logo",src:u(i),alt:u(r)},null,8,Ca)):$("",!0),m("div",ka,[m("h2",null,D(u(r)),1),m("h4",null,[T(" v"+D(u(d)),1),u(g)?(p(),_("span",Sa,": "+D(u(g)),1)):$("",!0)])])])]),body:V(({shown:Y})=>[Y?(p(),_("div",Ia,[u(s)?(p(),_("div",Ma,"By "+D(u(s)),1)):$("",!0),$a,xa,m("div",{class:"link",onClick:I},"Changelog"),Fa,m("div",null,[u(c)?(p(),_("a",{key:0,href:u(c),class:"info-modal-discord-link",target:"_blank"},[Pa,T(" "+D(u(o)),1)],8,Ta)):$("",!0)]),Ea,Oa,Va,m("div",null,"Time Played: "+D(u(N)),1),(p(),L(ie(u(k))))])):$("",!0)]),_:1},8,["modelValue"]))}});var La=z(Da,[["__scopeId","data-v-10effbe8"]]);const Ra={class:"field"},qa={key:0,class:"field-title"},Fn=q({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var o;const n=e,r=Qe(ke(n,"title"),"span"),i=F((o=n.options.find(c=>c.value===n.modelValue))!=null?o:null);_e(ke(n,"modelValue"),c=>{var d;ye(i)!==c&&(i.value=(d=n.options.find(g=>g.value===c))!=null?d:null)});function s(c){t("update:modelValue",c.value)}return(c,d)=>(p(),_("div",Ra,[u(r)?(p(),_("span",qa,[(p(),L(ie(u(r))))])):$("",!0),y(u(Hn),{options:e.options,modelValue:i.value,"onUpdate:modelValue":[d[0]||(d[0]=g=>i.value=g),s],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});const Aa={class:"field"},Ba=q({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=P(()=>{var s;return ue((s=u(n.title))!=null?s:"","span")}),i=P({get(){return!!n.modelValue},set(s){t("update:modelValue",s)}});return(s,o)=>(p(),_("label",Aa,[Dt(m("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":o[0]||(o[0]=c=>te(i)?i.value=c:null)},null,512),[[Un,u(i)]]),(p(),L(ie(u(r))))]))}});var we=z(Ba,[["__scopeId","data-v-11046116"]]);const Ua={class:"header"},za=m("h2",null,"Settings",-1),Ga={class:"option-tabs"},ja={key:0},Ha={key:1};var Wa=q({__name:"Options",setup(e,{expose:t}){const n=F(!1),r=F("behaviour");function i(oe){return oe==r.value}function s(oe){r.value=oe}t({isTab:i,setTab:s,save:fe,open(){n.value=!0}});const o=Object.keys(At).map(oe=>({label:bn(oe),value:oe})),c=P(()=>ue(ee(()=>y(j,null,[yi.map(ct)])))),{showTPS:d,theme:g,unthrottled:b,alignUnits:v}=de(ne),{autosave:N,offlineProd:k}=de(x),I=P({get(){return x.devSpeed===0},set(oe){x.devSpeed=oe?0:null}}),C=ee(()=>y("span",{class:"option-title"},[T("Unthrottled"),y("desc",null,[T("Allow the game to run as fast as possible. Not battery friendly.")])])),G=ee(()=>y("span",{class:"option-title"},[T("Offline Production"),y(Q,{display:"Save-specific",direction:Z.Right},{default:()=>[T("*")]}),y("desc",null,[T("Simulate production that occurs while the game is closed.")])])),Y=ee(()=>y("span",{class:"option-title"},[T("Autosave"),y(Q,{display:"Save-specific",direction:Z.Right},{default:()=>[T("*")]}),y("desc",null,[T("Automatically save the game every second or when the game is closed.")])])),S=ee(()=>y("span",{class:"option-title"},[T("Pause game"),y(Q,{display:"Save-specific",direction:Z.Right},{default:()=>[T("*")]}),y("desc",null,[T("Stop everything from moving.")])])),M=ee(()=>y("span",{class:"option-title"},[T("Theme"),y("desc",null,[T("How the game looks.")])])),U=ee(()=>y("span",{class:"option-title"},[T("Show TPS"),y("desc",null,[T("Show TPS meter at the bottom-left corner of the page.")])])),Ne=ee(()=>y("span",{class:"option-title"},[T("Align modifier units"),y("desc",null,[T("Align numbers to the beginning of the unit in modifier view.")])]));return(oe,W)=>(p(),L(je,{modelValue:n.value,"onUpdate:modelValue":W[10]||(W[10]=re=>n.value=re)},{header:V(()=>[m("div",Ua,[za,m("div",Ga,[m("button",{class:ae({selected:i("behaviour")}),onClick:W[0]||(W[0]=re=>s("behaviour"))},"Behaviour",2),m("button",{class:ae({selected:i("appearance")}),onClick:W[1]||(W[1]=re=>s("appearance"))},"Appearance",2)])])]),body:V(()=>[i("behaviour")?(p(),_("div",ja,[y(we,{title:u(C),modelValue:u(b),"onUpdate:modelValue":W[2]||(W[2]=re=>te(b)?b.value=re:null)},null,8,["title","modelValue"]),u(A).enablePausing?(p(),L(we,{key:0,title:u(S),modelValue:u(I),"onUpdate:modelValue":W[3]||(W[3]=re=>te(I)?I.value=re:null)},null,8,["title","modelValue"])):$("",!0),y(we,{title:u(G),modelValue:u(k),"onUpdate:modelValue":W[4]||(W[4]=re=>te(k)?k.value=re:null)},null,8,["title","modelValue"]),y(we,{title:u(Y),modelValue:u(N),"onUpdate:modelValue":W[5]||(W[5]=re=>te(N)?N.value=re:null)},null,8,["title","modelValue"]),u(N)?$("",!0):(p(),L(Rt,{key:1,class:"button save-button",onClick:W[6]||(W[6]=re=>u(fe)())},{default:V(()=>[T("Manually save")]),_:1}))])):$("",!0),i("appearance")?(p(),_("div",Ha,[y(Fn,{title:u(M),options:u(o),modelValue:u(g),"onUpdate:modelValue":W[7]||(W[7]=re=>te(g)?g.value=re:null)},null,8,["title","options","modelValue"]),(p(),L(ie(u(c)))),y(we,{title:u(U),modelValue:u(d),"onUpdate:modelValue":W[8]||(W[8]=re=>te(d)?d.value=re:null)},null,8,["title","modelValue"]),y(we,{title:u(Ne),modelValue:u(v),"onUpdate:modelValue":W[9]||(W[9]=re=>te(v)?v.value=re:null)},null,8,["title","modelValue"])])):$("",!0)]),_:1},8,["modelValue"]))}});const Ja=["onSubmit"],Za={class:"field"},Ka={key:0,class:"field-title"},Ya=["placeholder"],Xa=q({__name:"Text",props:{title:null,modelValue:null,textArea:{type:Boolean},placeholder:null,maxHeight:null,submitOnBlur:{type:Boolean}},emits:["update:modelValue","submit","cancel"],setup(e,{emit:t}){const n=e,r=Qe(ke(n,"title"),"span"),i=be(null);ut(()=>{var d;(d=i.value)==null||d.focus()});const s=P({get(){var d;return(d=u(n.modelValue))!=null?d:""},set(d){t("update:modelValue",d)}});function o(){t("submit")}function c(){n.submitOnBlur!==!1?t("submit"):t("cancel")}return(d,g)=>(p(),_("form",{onSubmit:rt(o,["prevent"])},[m("div",Za,[u(r)?(p(),_("span",Ka,[(p(),L(ie(u(r))))])):$("",!0),e.textArea?(p(),L(u(Jn),{key:1,modelValue:u(s),"onUpdate:modelValue":g[0]||(g[0]=b=>te(s)?s.value=b:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:c,ref_key:"field",ref:i},null,8,["modelValue","placeholder","maxHeight"])):Dt((p(),_("input",{key:2,type:"text","onUpdate:modelValue":g[1]||(g[1]=b=>te(s)?s.value=b:null),placeholder:e.placeholder,class:ae({fullWidth:!e.title}),onBlur:c,ref_key:"field",ref:i},null,42,Ya)),[[zn,u(s)]])])],40,Ja))}});var Tn=z(Xa,[["__scopeId","data-v-90bd4994"]]);const Qa={key:0},eo=["onClick","disabled"],to={key:0},no=["onClick"],ro=q({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const r=de(e),i=F(!1);_e(i,c=>{t("confirmingChanged",c)});function s(){if(u(r.skipConfirm)){t("click");return}i.value&&t("click"),i.value=!i.value}function o(){i.value=!1}return(c,d)=>(p(),_("span",{class:ae(["container",{confirming:i.value}])},[i.value?(p(),_("span",Qa,"Are you sure?")):$("",!0),m("button",{onClick:rt(s,["stop"]),class:"button danger",disabled:e.disabled},[i.value?(p(),_("span",to,"Yes")):Te(c.$slots,"default",{key:1},void 0,!0)],8,eo),i.value?(p(),_("button",{key:1,class:"button",onClick:rt(o,["stop"])},"No",8,no)):$("",!0)],2))}});var io=z(ro,[["__scopeId","data-v-2f8ef34c"]]);const $e=e=>(Ie("data-v-32313015"),e=e(),Me(),e),so=$e(()=>m("div",{class:"handle material-icons"},"drag_handle",-1)),ao={key:0,class:"actions"},oo=$e(()=>m("span",{class:"material-icons"},"content_paste",-1)),lo=$e(()=>m("span",{class:"material-icons"},"content_copy",-1)),uo=$e(()=>m("span",{class:"material-icons"},"edit",-1)),co=$e(()=>m("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),fo={key:1,class:"actions"},go=$e(()=>m("span",{class:"material-icons"},"check",-1)),mo=$e(()=>m("span",{class:"material-icons"},"close",-1)),ho={key:2,class:"details"},po={class:"save-version"},vo=$e(()=>m("br",null,null,-1)),bo={key:0},yo={key:3,class:"details"},_o={key:4,class:"details error"},No=$e(()=>m("br",null,null,-1)),wo=q({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const n=e,{save:r}=de(n),i=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),s=F(!1),o=F(!1),c=F("");_e(s,()=>{var v;return c.value=(v=r.value.name)!=null?v:""});const d=P(()=>r.value!=null&&r.value.id===x.id),g=P(()=>{var v;return d.value?x.time:(v=r.value!=null&&r.value.time)!=null?v:0});function b(){t("editName",c.value),s.value=!1}return(v,N)=>(p(),_("div",{class:ae(["save",{active:u(d)}])},[so,s.value?(p(),_("div",fo,[m("button",{onClick:b,class:"button"},[y(Q,{display:"Save",direction:u(Z).Left,class:"info"},{default:V(()=>[go]),_:1},8,["direction"])]),m("button",{onClick:N[5]||(N[5]=k=>s.value=!s.value),class:"button"},[y(Q,{display:"Cancel",direction:u(Z).Left,class:"info"},{default:V(()=>[mo]),_:1},8,["direction"])])])):(p(),_("div",ao,[u(r).error==null&&!o.value?(p(),L(Rt,{key:0,onClick:N[0]||(N[0]=k=>t("export")),class:"button",left:""},{default:V(()=>[y(Q,{display:"Export",direction:u(Z).Left,class:"info"},{default:V(()=>[oo]),_:1},8,["direction"])]),_:1})):$("",!0),u(r).error==null&&!o.value?(p(),_("button",{key:1,onClick:N[1]||(N[1]=k=>t("duplicate")),class:"button"},[y(Q,{display:"Duplicate",direction:u(Z).Left,class:"info"},{default:V(()=>[lo]),_:1},8,["direction"])])):$("",!0),u(r).error==null&&!o.value?(p(),_("button",{key:2,onClick:N[2]||(N[2]=k=>s.value=!s.value),class:"button"},[y(Q,{display:"Edit Name",direction:u(Z).Left,class:"info"},{default:V(()=>[uo]),_:1},8,["direction"])])):$("",!0),y(io,{disabled:u(d),onClick:N[3]||(N[3]=k=>t("delete")),onConfirmingChanged:N[4]||(N[4]=k=>o.value=k)},{default:V(()=>[y(Q,{display:"Delete",direction:u(Z).Left,class:"info"},{default:V(()=>[co]),_:1},8,["direction"])]),_:1},8,["disabled"])])),u(r).error==null&&!s.value?(p(),_("div",ho,[m("button",{class:"button open",onClick:N[6]||(N[6]=k=>t("open"))},[m("h3",null,D(u(r).name),1)]),m("span",po,"v"+D(u(r).modVersion),1),vo,u(g)?(p(),_("div",bo,"Last played "+D(u(i).format(u(g))),1)):$("",!0)])):u(r).error==null&&s.value?(p(),_("div",yo,[y(Tn,{modelValue:c.value,"onUpdate:modelValue":N[7]||(N[7]=k=>c.value=k),class:"editname",onSubmit:b},null,8,["modelValue"])])):(p(),_("div",_o,[T(" Error: Failed to load save with id "+D(u(r).id),1),No,T(D(u(r).error),1)]))],2))}});var Co=z(wo,[["__scopeId","data-v-32313015"]]);const Wt=e=>(Ie("data-v-2a4275be"),e=e(),Me(),e),ko=Wt(()=>m("h2",null,"Saves Manager",-1)),So={class:"modal-footer"},Io={class:"field"},Mo=Wt(()=>m("span",{class:"field-title"},"Create Save",-1)),$o={class:"field-buttons"},xo={class:"footer"},Fo=Wt(()=>m("div",{style:{"flex-grow":"1"}},null,-1)),To=q({__name:"SavesManager",setup(e,{expose:t}){const n=F(!1),r=F(null);t({open(){n.value=!0}});const i=F(!1),s=F(""),o=F(null);_e(s,S=>{S?Ue(()=>{try{if(S[0]!=="{")if(S[0]==="e")S=decodeURIComponent(escape(atob(S)));else if(S[0]==="\u1BE1")S=Ce.decompressFromUTF16(S);else{console.warn("Unable to determine preset encoding",S),i.value=!0;return}const M=JSON.parse(S);if(typeof M!="object"){i.value=!0;return}const U=ht();M.id=U,fe(M),s.value="",i.value=!1,ne.saves.push(U)}catch{i.value=!0}}):i.value=!1});let c={},d=F(Object.keys(c).reduce((S,M)=>(S.push({label:M.split("/").slice(-1)[0].slice(0,-4),value:c[M]}),S),[]));const g=kt({});function b(S){if(g[S]==null){let M=localStorage.getItem(S);if(M==null)g[S]={error:"Save doesn't exist in localStorage",id:S};else if(M==="dW5kZWZpbmVk")g[S]={error:"Save is undefined",id:S};else try{if(M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=Ce.decompressFromUTF16(M);else return console.warn("Unable to determine preset encoding",M),i.value=!0,g[S]={error:"Unable to determine preset encoding",id:S},g[S];g[S]={...JSON.parse(M),id:S}}catch(U){g[S]={error:U,id:S},console.warn(`SavesManager: Failed to load info about save with id ${S}: ${U} -${M}`)}}return g[S]}_e(n,S=>{S&&Object.keys(g).forEach(M=>delete g[M])});const v=P(()=>ne.saves.reduce((S,M)=>(S[M]=b(M),S),{}));function N(S){let M;switch(x.id===S?M=Lt(x):M=JSON.stringify(v.value[S]),A.exportEncoding){default:console.warn(`Unknown save encoding: ${A.exportEncoding}. Defaulting to lz`);case"lz":M=Ce.compressToUTF16(M);break;case"base64":M=btoa(unescape(encodeURIComponent(M)));break;case"plain":break}const U=document.createElement("textarea");U.value=M,document.body.appendChild(U),U.select(),U.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(U)}function k(S){x.id===S&&fe();const M={...v.value[S],id:mt()};fe(M),ne.saves.push(M.id)}function I(S){ne.saves=ne.saves.filter(M=>M!==S),localStorage.removeItem(S),g[S]=void 0}function C(S){v.value[x.id].time=x.time,fe(),g[x.id]=void 0,qe(v.value[S]),g[S]=void 0}function G(S){if(o.value=S,Ue(()=>{o.value=null}),S[0]!=="{")if(S[0]==="e")S=decodeURIComponent(escape(atob(S)));else if(S[0]==="\u1BE1")S=Ce.decompressFromUTF16(S);else{console.warn("Unable to determine preset encoding",S);return}const M=JSON.parse(S);M.id=mt(),fe(M),ne.saves.push(M.id),C(M.id)}function Y(S,M){const U=v.value[S];U!=null&&(U.name=M,x.id===S?(x.name=M,fe()):(fe(U),g[S]=void 0))}return(S,M)=>(p(),L(je,{modelValue:n.value,"onUpdate:modelValue":M[4]||(M[4]=U=>n.value=U),ref_key:"modal",ref:r},{header:V(()=>[ko]),body:V(({shown:U})=>[U?(p(),L(u(Wn),{key:0,list:u(ne).saves,handle:".handle",itemKey:Ne=>Ne},{item:V(({element:Ne})=>[y(Co,{save:u(v)[Ne],onOpen:oe=>C(Ne),onExport:oe=>N(Ne),onEditName:oe=>Y(Ne,oe),onDuplicate:oe=>k(Ne),onDelete:oe=>I(Ne)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):$("",!0)]),footer:V(()=>[m("div",So,[y(Tn,{modelValue:s.value,"onUpdate:modelValue":M[0]||(M[0]=U=>s.value=U),title:"Import Save",placeholder:"Paste your save here!",class:ae({importingFailed:i.value})},null,8,["modelValue","class"]),m("div",Io,[Mo,m("div",$o,[m("button",{class:"button",onClick:M[1]||(M[1]=U=>C(u(Je)().id))},"New Game"),Object.keys(u(d)).length>0?(p(),L(Fn,{key:0,options:u(d),modelValue:o.value,"onUpdate:modelValue":M[2]||(M[2]=U=>G(U)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):$("",!0)])]),m("div",xo,[Fo,m("button",{class:"button modal-default-button",onClick:M[3]||(M[3]=U=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Pn=z(To,[["__scopeId","data-v-2a4275be"]]);const me=e=>(Ie("data-v-47c54e31"),e=e(),Me(),e),Po=["src","alt"],Eo={key:1,class:"title"},Oo=me(()=>m("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),Vo={class:"discord"},Do={class:"discord-links"},Lo={key:0},Ro=["href"],qo=me(()=>m("li",null,[m("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"Profectus & Friends")],-1)),Ao=me(()=>m("li",null,[m("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Bo={href:"https://forums.moddingtree.com/",target:"_blank"},Uo=me(()=>m("span",{class:"material-icons"},"forum",-1)),zo=me(()=>m("span",{class:"material-icons"},"info",-1)),Go=me(()=>m("span",{class:"material-icons"},"library_books",-1)),jo=me(()=>m("span",{class:"material-icons"},"settings",-1)),Ho=me(()=>m("span",{class:"material-icons"},"library_books",-1)),Wo=me(()=>m("span",{class:"material-icons"},"settings",-1)),Jo=me(()=>m("span",{class:"material-icons"},"info",-1)),Zo={href:"https://forums.moddingtree.com/",target:"_blank"},Ko=me(()=>m("span",{class:"material-icons"},"forum",-1)),Yo={class:"discord"},Xo={class:"discord-links"},Qo={key:0},el=["href"],tl=me(()=>m("li",null,[m("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"Profectus & Friends")],-1)),nl=me(()=>m("li",null,[m("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),rl=q({__name:"Nav",setup(e){const t=F(null),n=F(null),r=F(null),i=F(null),{useHeader:s,banner:o,title:c,discordName:d,discordLink:g,versionNumber:b}=A;function v(){window.open(g,"mywindow")}return(N,k)=>(p(),_(j,null,[u(s)?(p(),_("div",Oe({key:0,class:"nav"},N.$attrs),[u(o)?(p(),_("img",{key:0,src:u(o),class:"banner",alt:u(c)},null,8,Po)):(p(),_("div",Eo,D(u(c)),1)),m("div",{onClick:k[0]||(k[0]=I=>{var C;return(C=i.value)==null?void 0:C.open()}),class:"version-container"},[y(Q,{display:"Changelog",direction:u(Z).Down,class:"version"},{default:V(()=>[m("span",null,"v"+D(u(b)),1)]),_:1},8,["direction"])]),Oo,m("div",Vo,[m("span",{onClick:v,class:"material-icons"},"discord"),m("ul",Do,[u(g)?(p(),_("li",Lo,[m("a",{href:u(g),target:"_blank"},D(u(d)),9,Ro)])):$("",!0),qo,Ao])]),m("div",null,[m("a",Bo,[y(Q,{display:"Forums",direction:u(Z).Down,yoffset:"5px"},{default:V(()=>[Uo]),_:1},8,["direction"])])]),m("div",{onClick:k[1]||(k[1]=I=>{var C;return(C=t.value)==null?void 0:C.open()})},[y(Q,{display:"Info",direction:u(Z).Down,class:"info"},{default:V(()=>[zo]),_:1},8,["direction"])]),m("div",{onClick:k[2]||(k[2]=I=>{var C;return(C=n.value)==null?void 0:C.open()})},[y(Q,{display:"Saves",direction:u(Z).Down,xoffset:"-20px"},{default:V(()=>[Go]),_:1},8,["direction"])]),m("div",{onClick:k[3]||(k[3]=I=>{var C;return(C=r.value)==null?void 0:C.open()})},[y(Q,{display:"Settings",direction:u(Z).Down,xoffset:"-66px"},{default:V(()=>[jo]),_:1},8,["direction"])])],16)):(p(),_("div",Oe({key:1,class:"overlay-nav"},N.$attrs),[m("div",{onClick:k[4]||(k[4]=I=>{var C;return(C=i.value)==null?void 0:C.open()}),class:"version-container"},[y(Q,{display:"Changelog",direction:u(Z).Right,xoffset:"25%",class:"version"},{default:V(()=>[m("span",null,"v"+D(u(b)),1)]),_:1},8,["direction"])]),m("div",{onClick:k[5]||(k[5]=I=>{var C;return(C=n.value)==null?void 0:C.open()})},[y(Q,{display:"Saves",direction:u(Z).Right},{default:V(()=>[Ho]),_:1},8,["direction"])]),m("div",{onClick:k[6]||(k[6]=I=>{var C;return(C=r.value)==null?void 0:C.open()})},[y(Q,{display:"Settings",direction:u(Z).Right},{default:V(()=>[Wo]),_:1},8,["direction"])]),m("div",{onClick:k[7]||(k[7]=I=>{var C;return(C=t.value)==null?void 0:C.open()})},[y(Q,{display:"Info",direction:u(Z).Right},{default:V(()=>[Jo]),_:1},8,["direction"])]),m("div",null,[m("a",Zo,[y(Q,{display:"Forums",direction:u(Z).Right,xoffset:"7px"},{default:V(()=>[Ko]),_:1},8,["direction"])])]),m("div",Yo,[m("span",{onClick:v,class:"material-icons"},"discord"),m("ul",Xo,[u(g)?(p(),_("li",Qo,[m("a",{href:u(g),target:"_blank"},D(u(d)),9,el)])):$("",!0),tl,nl])])],16)),y(La,{ref_key:"info",ref:t,changelog:i.value},null,8,["changelog"]),y(Pn,{ref_key:"savesManager",ref:n},null,512),y(Wa,{ref_key:"options",ref:r},null,512),y(ba,{ref_key:"changelog",ref:i},null,512)],64))}});var En=z(rl,[["__scopeId","data-v-47c54e31"]]);const il={class:"inner-tab"},sl=q({__name:"Game",setup(e){const t=ke(x,"tabs"),n=P(()=>Object.keys(le)),r=A.useHeader;function i(s){const{display:o,minimized:c,name:d,color:g,minimizable:b,nodes:v,minimizedDisplay:N}=s;return{display:o,minimized:c,name:d,color:g,minimizable:b,nodes:v,minimizedDisplay:N}}return(s,o)=>(p(),_("div",{class:ae(["tabs-container",{useHeader:u(r)}])},[(p(!0),_(j,null,Le(u(t),(c,d)=>{var g,b;return p(),_("div",{key:d,class:ae(["tab",u((g=u(le)[c])==null?void 0:g.classes)]),style:ge(u((b=u(le)[c])==null?void 0:b.style))},[d===0&&!u(r)?(p(),L(En,{key:0})):$("",!0),m("div",il,[u(n).includes(c)?(p(),L(ma,Oe({key:0},i(u(le)[c]),{index:d,onSetMinimized:v=>u(le)[c].minimized.value=v}),null,16,["index","onSetMinimized"])):(p(),L(ie(c),{key:1,index:d},null,8,["index"]))])],6)}),128))],2))}});var al=z(sl,[["__scopeId","data-v-dcd207b4"]]);const ol=q({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(p(),_("div",{style:ge({width:e.width,height:e.height})},null,4))}});function On(e,t="points",n=0,r=void 0){const i=te(e)?e:ct(e);if(i.displayName=t,i.precision=n,i.small=r,!te(e)){const s=i[Fe];s.displayName=t,s.precision=n,s.small=r}return i}function ll(e){const t=ct(e.value);return _e(e,n=>{Bt.value||l.gt(n,t.value)&&(t.value=n)}),t}function ul(e){const t=ct(e.value);return _e(e,(n,r)=>{Bt.value||l.gt(n,r)&&(t.value=l.add(t.value,l.sub(n,r)))}),t}const cl=new l("10^^8"),dl=new l("1e100");function fl(e,t){const n=F(0),r=F(0),i=F(0);return se.on("update",o=>{if(r.value=0,l.lte(e.value,dl)){i.value=e.value;return}let c=e.value,d=i.value;if(i.value=c,l.gt(c,d))if(l.gte(c,cl))c=l.slog(c,1e10),d=l.slog(d,1e10),n.value=c.sub(d).div(o),r.value=-1;else for(;l.div(c,d).log(10).div(o).gte("100")&&r.value<=5&&l.gt(d,0);)c=l.log10(c),d=l.log10(d),n.value=c.sub(d).div(o),r.value++}),P(()=>r.value===0?t?Se(t.value,e.precision,e.small)+" "+e.displayName+"/s":"":Se(n.value)+" OOM"+(r.value<0?"^OOM":"^"+r.value)+"s/sec")}function _t(e,t){const n=t!=null?t:e.value;return l.eq(e.precision,0)?st(e.small?n:l.floor(n)):Se(n,e.precision,e.small)}const gl=["x1","y1","x2","y2"],ml=q({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const t=e,n=de(t),r=P(()=>{const o=n.startNode.value.rect,c=n.boundingRect.value,d=c?{x:o.x+o.width/2-c.x,y:o.y+o.height/2-c.y}:{x:0,y:0};return n.link.value.offsetStart&&(d.x+=n.link.value.offsetStart.x,d.y+=n.link.value.offsetStart.y),d}),i=P(()=>{const o=n.endNode.value.rect,c=n.boundingRect.value,d=c?{x:o.x+o.width/2-c.x,y:o.y+o.height/2-c.y}:{x:0,y:0};return n.link.value.offsetEnd&&(d.x+=n.link.value.offsetEnd.x,d.y+=n.link.value.offsetEnd.y),d}),s=P(()=>Ci(t.link));return(o,c)=>(p(),_("line",Oe({"stroke-width":"15px",stroke:"white"},u(s),{x1:u(r).x,y1:u(r).y,x2:u(i).x,y2:u(i).y}),null,16,gl))}});const hl=q({__name:"Links",props:{links:null},setup(e){var d;const n=ke(e,"links"),r=F(null),i=vt(Gt,F({})),s=vt(jt,F(void 0)),o=F((d=r.value)==null?void 0:d.getBoundingClientRect());_e(s,()=>{var g;return o.value=(g=r.value)==null?void 0:g.getBoundingClientRect()}),lt(()=>{var g;return o.value=(g=r.value)==null?void 0:g.getBoundingClientRect()});const c=P(()=>{var b,v;const g=i.value;return(v=(b=n.value)==null?void 0:b.filter(N=>{var k,I;return((k=g[N.startNode.id])==null?void 0:k.rect)&&((I=g[N.startNode.id])==null?void 0:I.rect)}))!=null?v:[]});return(g,b)=>(p(),_(j,null,[u(c)?(p(),_("svg",Gn(Oe({key:0},g.$attrs)),[(p(!0),_(j,null,Le(u(c),(v,N)=>(p(),L(ml,{key:N,link:v,boundingRect:o.value,startNode:u(i)[v.startNode.id],endNode:u(i)[v.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):$("",!0),m("div",{ref_key:"resizeListener",ref:r,class:"resize-listener"},null,512)],64))}});var pl=z(hl,[["__scopeId","data-v-063f6d6b"]]),vl=q({props:{nodes:{type:B(Array),required:!0},leftSideNodes:B(Array),rightSideNodes:B(Array),branches:B(Array)},components:{Links:pl},setup(e){const{nodes:t,leftSideNodes:n,rightSideNodes:r}=de(e),i=be();Be(()=>{const c=ye(t);i.value=ue(ee(()=>y(j,null,[c.map(d=>y("span",{class:"row tree-row",style:"margin: 50px auto;"},[d.map(ht)]))])))});const s=be();Be(()=>{const c=ye(n);s.value=c?ue(ee(()=>y("span",{class:"left-side-nodes small"},[c.map(ht)]))):""});const o=be();return Be(()=>{const c=ye(r);o.value=c?ue(ee(()=>y("span",{class:"side-nodes small"},[c.map(ht)]))):""}),{unref:u,nodesComp:i,leftNodesComp:s,rightNodesComp:o}}});function bl(e,t,n,r,i,s){const o=ze("Links");return p(),_(j,null,[(p(),L(ie(e.nodesComp))),e.leftNodesComp?(p(),L(ie(e.leftNodesComp),{key:0})):$("",!0),e.rightNodesComp?(p(),L(ie(e.rightNodesComp),{key:1})):$("",!0),e.branches?(p(),L(o,{key:2,links:e.unref(e.branches)},null,8,["links"])):$("",!0)],64)}var yl=z(vl,[["render",bl],["__scopeId","data-v-39ca96d0"]]);const _l={key:0},Nl={key:0,class:"mark star"},wl=["src"],Cl=q({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(p(),_("div",_l,[e.mark===!0?(p(),_("div",Nl)):(p(),_("img",{key:1,class:"mark",src:e.mark},null,8,wl))])):$("",!0)}});var Vn=z(Cl,[["__scopeId","data-v-2207999f"]]);const kl=q({__name:"Node",props:{id:null},setup(e){const n=de(e),r=vt(Ut,()=>{}),i=vt(zt,()=>{}),s=be(null),o=P(()=>s.value&&s.value.parentElement);return _e([o,n.id],([c,d],[g,b])=>{g&&i(u(b)),c&&r(d,c)}),ln(()=>i(u(n.id))),(c,d)=>(p(),_("div",{class:"node",ref_key:"node",ref:s},null,512))}});var Dn=z(kl,[["__scopeId","data-v-a48cb382"]]);const Sl=q({props:{display:B(Object,String,Function),visibility:{type:B(Number,Boolean),required:!0},style:B(String,Object,Array),classes:B(Object),onClick:Function,onHold:Function,color:B(String),glowColor:B(String),canClick:{type:B(Boolean),required:!0},mark:B(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Vn,Node:Dn},setup(e){const{onClick:t,onHold:n,display:r}=de(e),i=Qe(r),{start:s,stop:o}=kn(t,n);return{start:s,stop:o,comp:i,unref:u,Visibility:Xe,isCoercableComponent:Mt,isVisible:yn,isHidden:_n}}});function Il(e,t,n,r,i,s){var d;const o=ze("MarkNode"),c=ze("Node");return e.isVisible(e.visibility)?(p(),_("div",{key:0,style:ge({visibility:e.isHidden(e.visibility)?"hidden":void 0}),class:ae({treeNode:!0,can:e.unref(e.canClick),...e.unref(e.classes)}),onClick:t[0]||(t[0]=(...g)=>e.onClick&&e.onClick(...g)),onMousedown:t[1]||(t[1]=(...g)=>e.start&&e.start(...g)),onMouseleave:t[2]||(t[2]=(...g)=>e.stop&&e.stop(...g)),onMouseup:t[3]||(t[3]=(...g)=>e.stop&&e.stop(...g)),onTouchstartPassive:t[4]||(t[4]=(...g)=>e.start&&e.start(...g)),onTouchendPassive:t[5]||(t[5]=(...g)=>e.stop&&e.stop(...g)),onTouchcancelPassive:t[6]||(t[6]=(...g)=>e.stop&&e.stop(...g))},[m("div",{style:ge([{backgroundColor:e.unref(e.color),boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ${e.unref(e.glowColor)}`},(d=e.unref(e.style))!=null?d:[]])},[(p(),L(ie(e.unref(e.comp))))],4),y(o,{mark:e.unref(e.mark)},null,8,["mark"]),y(c,{id:e.id},null,8,["id"])],38)):$("",!0)}var Ml=z(Sl,[["render",Il],["__scopeId","data-v-727230a6"]]);const $l=Symbol("TreeNode"),xl=Symbol("Tree");function Fl(e,...t){const n=t.reduce((r,i)=>{var s;return Object.assign(r,(s=i.getPersistentData)==null?void 0:s.call(i))},{});return He(r=>{var o,c,d;const i=(o=e==null?void 0:e.call(r,r))!=null?o:{};i.id=It("treeNode-"),i.type=$l,i[Pe]=Ml;for(const g of t)(c=g.preConstruct)==null||c.call(g,i);Object.assign(n),E(i,"visibility"),ce(i,"visibility",Xe.Visible),E(i,"canClick"),ce(i,"canClick",!0),E(i,"color"),E(i,"display"),E(i,"glowColor"),E(i,"classes"),E(i,"style"),E(i,"mark");for(const g of t)(d=g.postConstruct)==null||d.call(g,i);if(i.onClick){const g=i.onClick.bind(i);i.onClick=function(b){u(i.canClick)!==!1&&g(b)}}if(i.onHold){const g=i.onHold.bind(i);i.onHold=function(){u(i.canClick)!==!1&&g()}}const s=t.reduce((g,b)=>{var v;return Object.assign(g,(v=b.getGatheredProps)==null?void 0:v.call(b,i))},{});return i[Ee]=function(){const{display:g,visibility:b,style:v,classes:N,onClick:k,onHold:I,color:C,glowColor:G,canClick:Y,mark:S,id:M}=this;return{display:g,visibility:b,style:v,classes:N,onClick:k,onHold:I,color:C,glowColor:G,canClick:Y,mark:S,id:M,...s}},i})}function Tl(e){return He(t=>{const n=e.call(t,t);return n.id=It("tree-"),n.type=xl,n[Pe]=yl,n.isResetting=F(!1),n.resettingNode=be(null),n.reset=function(r){var s,o;const i=n;i.isResetting.value=!0,i.resettingNode.value=r,(s=i.resetPropagation)==null||s.call(i,i,r),(o=i.onReset)==null||o.call(i,r),i.isResetting.value=!1,i.resettingNode.value=null},n.links=P(()=>{var i;return(i=u(n.branches))!=null?i:[]}),E(n,"visibility"),ce(n,"visibility",Xe.Visible),E(n,"nodes"),E(n,"leftSideNodes"),E(n,"rightSideNodes"),E(n,"branches"),n[Ee]=function(){const{nodes:r,leftSideNodes:i,rightSideNodes:s,branches:o}=this;return{nodes:r,leftSideNodes:i,rightSideNodes:s,branches:o}},n})}const Pl=function(e,t){var s;const n=u(e.branches);if(n==null)return;const r=[];let i=[t];for(;i.length!=0;){const o=[];for(const c of i)for(const d of n.filter(g=>g.startNode===c))[...r,...i].includes(d.endNode)||(o.push(d.endNode),(s=d.endNode.reset)==null||s.reset());r.push(...i),i=o}};function El(e,t=null,n=0){const r=Et(n);return P(()=>t==null||l.gte(e.value,u(r))?_t(e)+" "+e.displayName:`Reach ${l.eq(t.precision,0)?st(u(r)):Se(u(r),t.precision)} ${t.displayName} to unlock (You have ${l.eq(t.precision,0)?st(t.value):Se(t.value,t.precision)})`)}function Ol(e,...t){return He(n=>{var i,s;const r=e.call(n,n);for(const o of t)(i=o.preConstruct)==null||i.call(o,r);r.formula=r.formula(a.variable(r.baseResource)),r.currentGain==null&&(r.currentGain=P(()=>{let o=l.floor(r.formula.evaluate(r.baseResource.value)).max(0);return u(r.buyMax)===!1&&(o=o.min(1)),o})),r.actualGain==null&&(r.actualGain=r.currentGain),r.currentAt==null&&(r.currentAt=P(()=>r.formula.invert(l.floor(u(r.currentGain))))),r.nextAt==null&&(r.nextAt=P(()=>r.formula.invert(l.floor(u(r.currentGain)).add(1)))),r.convert==null&&(r.convert=function(){var c;const o=u(r.currentGain);r.gainResource.value=l.add(r.gainResource.value,o),r.spend(o),(c=r.onConvert)==null||c.call(r,o)}),r.spend==null&&(r.spend=function(){r.baseResource.value=0}),E(r,"currentGain"),E(r,"actualGain"),E(r,"currentAt"),E(r,"nextAt"),E(r,"buyMax"),ce(r,"buyMax",!0);for(const o of t)(s=o.postConstruct)==null||s.call(o,r);return r})}function Vl(e){return Ol(e)}const Ln=e=>(Ie("data-v-5e2d38ce"),e=e(),Me(),e),Dl=Ln(()=>m("div",{class:"key"},"Ctrl",-1)),Ll=Ln(()=>m("div",{class:"key"},"Shift",-1)),Rl={class:"key"},ql=q({__name:"Hotkey",props:{hotkey:null},setup(e){const t=e;let n="",r=!1,i=!1,s=!1;return Be(()=>{n=t.hotkey.key,r=n.startsWith("ctrl+"),r&&(n=n.slice(5)),i=n.startsWith("shift+"),i&&(n=n.slice(6)),s=n.length==1&&n.toLowerCase()!=n.toUpperCase(),s&&(n=n.toUpperCase())}),(o,c)=>(p(),_(j,null,[u(r)?(p(),_(j,{key:0},[Dl,T("+")],64)):$("",!0),u(i)?(p(),_(j,{key:1},[Ll,T("+")],64)):$("",!0),m("div",Rl,D(u(n)),1)],64))}});var Al=z(ql,[["__scopeId","data-v-5e2d38ce"]]);const $t=Ct({}),Jt=Symbol("Hotkey"),an=[")","!","@","#","$","%","^","&","*","("];function Bl(e){return He(t=>{const n=e.call(t,t);return n.type=Jt,E(n,"enabled"),ce(n,"enabled",!0),E(n,"description"),n})}se.on("addLayer",e=>{Nn(e,Jt).forEach(t=>{$t[t.key]=t})});se.on("removeLayer",e=>{Nn(e,Jt).forEach(t=>{$t[t.key]=void 0})});document.onkeydown=function(e){var r;if(((r=e.target)==null?void 0:r.tagName)==="INPUT"||Zt.value&&!x.keepGoing)return;let t=e.key;an.includes(t)?t="shift+"+an.indexOf(t):e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const n=$t[t];n&&u(n.enabled)&&(e.preventDefault(),n.onPress())};_i(ee(()=>{const e=Object.values($t).filter(t=>u(t==null?void 0:t.enabled));return e.length===0?"":y("div",null,[y("br",null,null),y("h4",null,[T("Hotkeys")]),y("div",{style:"column-count: 2"},[e.map(t=>y("div",null,[y(Al,{hotkey:t},null),T(" "),t==null?void 0:t.description]))])])}));const Ul=Symbol("Reset");function zl(e){return He(t=>{const n=e.call(t,t);return n.id=It("reset-"),n.type=Ul,n.reset=function(){var i;const r=s=>{if(s!=null&&typeof s=="object"&&!(s instanceof l)&&!(s instanceof a)){if(Vt in s&&s[Vt]===!0)return;if(Ge in s){const o=s;o.value=o[Ge]}else!(s instanceof l)&&!te(s)&&Object.values(s).forEach(o=>r(o))}};u(n.thingsToReset).forEach(r),se.emit("reset",n),(i=n.onReset)==null||i.call(n)},E(n,"thingsToReset"),n})}const gt={};se.on("removeLayer",e=>{var t;(t=gt[e.id])==null||t.call(gt),gt[e.id]=void 0});const Gl=q({__name:"Sticky",setup(e){const t=F("0"),n=new ResizeObserver(i),r=be(null);function i(){let s=r.value;if(s==null)return;let o=0;for(;s.previousSibling;){const c=s.previousSibling;c.dataset&&"vSticky"in c.dataset&&(o+=c.offsetHeight),s=c}t.value=o+"px"}return Ue(i),document.fonts.ready.then(i),lt(()=>{var o;const s=(o=r.value)==null?void 0:o.parentElement;s&&n.observe(s)}),(s,o)=>(p(),_("div",{class:"sticky",style:ge({top:t.value}),ref_key:"element",ref:r,"data-v-sticky":""},[Te(s.$slots,"default",{},void 0,!0)],4))}});var jl=z(Gl,[["__scopeId","data-v-cccac690"]]);const Hl=q({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,n=P(()=>_t(t.resource));return(r,i)=>(p(),_("h2",{style:ge({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},D(u(n)),5))}});const Wl={class:"main-display"},Jl={key:0},Zl={key:1},Kl=q({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null},setup(e){const n=de(e),r=F(null),i=Qe(n.effectDisplay),s=P(()=>l.lt(n.resource.value,"1e1000"));return(o,c)=>(p(),L(jl,null,{default:V(()=>{var d,g,b,v;return[m("div",{class:ae(["main-display-container",(d=e.classes)!=null?d:{}]),style:ge([{height:`${((b=(g=r.value)==null?void 0:g.$el.clientHeight)!=null?b:0)+50}px`},(v=e.style)!=null?v:{}])},[m("div",Wl,[u(s)?(p(),_("span",Jl,"You have ")):$("",!0),y(Hl,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),T(" "+D(e.resource.displayName),1),u(i)?(p(),_("span",Zl,[T(", "),(p(),L(ie(u(i)),{ref_key:"effectRef",ref:r},null,512))])):$("",!0)])],6)]}),_:1}))}});function Yl(e,t){return E(t,"display"),E(t,"classes"),E(t,"style"),E(t,"direction"),ce(t,"direction",Z.Up),E(t,"xoffset"),E(t,"yoffset"),t.pinnable&&(t.pinned=ct(!1,!1)),Ue(()=>{const n=e[Pe];e[Pe]=Q;const r=e[Ee].bind(e);e[Ee]=function(){const{display:s,classes:o,style:c,direction:d,xoffset:g,yoffset:b,pinned:v}=this;return{element:{[Pe]:n,[Ee]:r},display:s,classes:o,style:u(c),direction:d,xoffset:g,yoffset:b,pinned:v}}.bind(t)}),t}var Xl=q({props:{display:{type:B(Object,String,Function),required:!0},visibility:{type:B(Number,Boolean),required:!0},style:B(Object,String,Array),classes:B(Object),onClick:Function,onHold:Function,canClick:{type:B(Boolean),required:!0},small:Boolean,mark:B(Boolean,String),id:{type:String,required:!0}},components:{Node:Dn,MarkNode:Vn},setup(e){const{display:t,onClick:n,onHold:r}=de(e),i=be("");Be(()=>{var b;const c=ye(t);if(c==null){i.value="";return}if(Mt(c)){i.value=ue(c);return}const d=ue((b=c.title)!=null?b:"","h3"),g=ue(c.description,"div");i.value=ue(ee(()=>y("span",null,[c.title!=null?y("div",null,[y(d,null,null)]):null,y(g,null,null)])))});const{start:s,stop:o}=kn(n,r);return{start:s,stop:o,comp:i,Visibility:Xe,isVisible:yn,isHidden:_n,unref:u}}});function Ql(e,t,n,r,i,s){var d;const o=ze("MarkNode"),c=ze("Node");return e.isVisible(e.visibility)?(p(),_("button",{key:0,style:ge([{visibility:e.isHidden(e.visibility)?"hidden":void 0},(d=e.unref(e.style))!=null?d:[]]),onClick:t[0]||(t[0]=(...g)=>e.onClick&&e.onClick(...g)),onMousedown:t[1]||(t[1]=(...g)=>e.start&&e.start(...g)),onMouseleave:t[2]||(t[2]=(...g)=>e.stop&&e.stop(...g)),onMouseup:t[3]||(t[3]=(...g)=>e.stop&&e.stop(...g)),onTouchstartPassive:t[4]||(t[4]=(...g)=>e.start&&e.start(...g)),onTouchendPassive:t[5]||(t[5]=(...g)=>e.stop&&e.stop(...g)),onTouchcancelPassive:t[6]||(t[6]=(...g)=>e.stop&&e.stop(...g)),class:ae({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?(p(),L(ie(e.unref(e.comp)),{key:0})):$("",!0),y(o,{mark:e.unref(e.mark)},null,8,["mark"]),y(c,{id:e.id},null,8,["id"])],38)):$("",!0)}var eu=z(Xl,[["render",Ql],["__scopeId","data-v-211328c0"]]);const tu=Symbol("Clickable");function nu(e,...t){const n=t.reduce((r,i)=>{var s;return Object.assign(r,(s=i.getPersistentData)==null?void 0:s.call(i))},{});return He(r=>{var o,c,d;const i=(o=e==null?void 0:e.call(r,r))!=null?o:{};i.id=It("clickable-"),i.type=tu,i[Pe]=eu;for(const g of t)(c=g.preConstruct)==null||c.call(g,i);if(Object.assign(i,n),E(i,"visibility"),ce(i,"visibility",Xe.Visible),E(i,"canClick"),ce(i,"canClick",!0),E(i,"classes"),E(i,"style"),E(i,"mark"),E(i,"display"),i.onClick){const g=i.onClick.bind(i);i.onClick=function(b){u(i.canClick)!==!1&&g(b)}}if(i.onHold){const g=i.onHold.bind(i);i.onHold=function(){u(i.canClick)!==!1&&g()}}for(const g of t)(d=g.postConstruct)==null||d.call(g,i);const s=t.reduce((g,b)=>{var v;return Object.assign(g,(v=b.getGatheredProps)==null?void 0:v.call(b,i))},{});return i[Ee]=function(){const{display:g,visibility:b,style:v,classes:N,onClick:k,onHold:I,canClick:C,small:G,mark:Y,id:S}=this;return{display:g,visibility:b,style:u(v),classes:N,onClick:k,onHold:I,canClick:C,small:G,mark:Y,id:S,...s}},i})}function ru(e){return nu(t=>{const n=e.call(t,t);E(n,"showNextAt"),ce(n,"showNextAt",!0),ce(n,"minimumGain",1),n.resetDescription==null?n.resetDescription=P(()=>l.lt(n.conversion.gainResource.value,1e3)?"Reset for ":""):E(n,"resetDescription"),n.display==null&&(n.display=ee(()=>y("span",null,[u(n.resetDescription),y("b",null,[_t(n.conversion.gainResource,l.max(u(n.conversion.actualGain),u(n.minimumGain)))])," ",n.conversion.gainResource.displayName,u(n.showNextAt)!=null?y("div",null,[y("br",null,null),u(n.conversion.buyMax)?"Next:":"Req:"," ",_t(n.conversion.baseResource,!u(n.conversion.buyMax)&&l.gte(u(n.conversion.actualGain),1)?u(n.conversion.currentAt):u(n.conversion.nextAt))," ",n.conversion.baseResource.displayName]):null]))),n.canClick==null&&(n.canClick=P(()=>l.gte(u(n.conversion.actualGain),u(n.minimumGain))));const r=n.onClick;return n.onClick=function(i){u(n.canClick)!==!1&&(n.conversion.convert(),n.tree.reset(n.treeNode),n.resetTime&&(n.resetTime.value=n.resetTime[Ge]),r==null||r(i))},n})}function iu(e){return Fl(t=>{const n=e.call(t,t);return ce(n,"display",bn(n.layerID)),E(n,"append"),{...n,onClick:u(n.append)?function(){if(x.tabs.includes(n.layerID)){const r=x.tabs.lastIndexOf(n.layerID);x.tabs.splice(r,1)}else x.tabs.push(n.layerID)}:function(){x.tabs.splice(1,1,n.layerID)}}})}const on="p",Nt=Ht(on,function(){const e="Prestige",t="#4BDC13",n=On(0,"prestige points"),r=Vl(()=>({formula:g=>g.div(10).sqrt(),baseResource:wt.points,gainResource:n})),i=zl(()=>({thingsToReset:()=>[Nt]})),s=iu(()=>({layerID:on,color:t,reset:i})),o=Yl(s,{display:El(n),pinnable:!0}),c=ru(()=>({conversion:r,tree:wt.tree,treeNode:s})),d=Bl(()=>({description:"Reset for prestige points",key:"p",onPress:c.onClick}));return{name:e,color:t,points:n,tooltip:o,display:ee(()=>y(j,null,[y(Kl,{resource:n,color:t},null),ut(c)])),treeNode:s,hotkey:d}}),wt=Ht("main",function(){const e=On(10),t=ll(e),n=ul(e),r=P(()=>new l(1));se.on("update",o=>{e.value=l.add(e.value,l.times(r.value,o))});const i=fl(e,r),s=Tl(()=>({nodes:[[Nt.treeNode]],branches:[],onReset(){e.value=Xt(this.resettingNode.value)===Xt(Nt.treeNode)?0:10,t.value=e.value,n.value=e.value},resetPropagation:Pl}));return{name:"Tree",links:s.links,display:ee(()=>y(j,null,[x.devSpeed===0?y("div",null,[T("Game Paused")]):null,x.devSpeed!=null&&x.devSpeed!==0&&x.devSpeed!==1?y("div",null,[T("Dev Speed: "),Se(x.devSpeed),T("x")]):null,x.offlineTime!=null&&x.offlineTime!==0?y("div",null,[T("Offline Time: "),St(x.offlineTime)]):null,y("div",null,[l.lt(e.value,"1e1000")?y("span",null,[T("You have ")]):null,y("h2",null,[Se(e.value)]),l.lt(e.value,"1e1e6")?y("span",null,[T(" points")]):null]),l.gt(r.value,0)?y("div",null,[T("("),i.value,T(")")]):null,y(ol,null,null),ut(s)])),points:e,best:t,total:n,oomps:i,tree:s}}),su=e=>[wt,Nt],Zt=P(()=>!1);function au(e,t){}var ou=Object.freeze(Object.defineProperty({__proto__:null,main:wt,getInitialLayers:su,hasWon:Zt,fixOldSave:au},Symbol.toStringTag,{value:"Module"}));const dt=e=>(Ie("data-v-4a50ce42"),e=e(),Me(),e),lu={class:"game-over-modal-header"},uu=["src","alt"],cu={class:"game-over-modal-title"},du=dt(()=>m("h2",null,"Congratulations!",-1)),fu={key:0},gu=dt(()=>m("br",null,null,-1)),mu=dt(()=>m("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),hu=dt(()=>m("br",null,null,-1)),pu=["href"],vu=dt(()=>m("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),bu=q({__name:"GameOverScreen",setup(e){const{title:t,logo:n,discordName:r,discordLink:i,versionNumber:s,versionTitle:o}=A,c=P(()=>St(x.timePlayed)),d=P(()=>Zt.value&&!x.keepGoing),g=ke(x,"autosave");function b(){x.keepGoing=!0}function v(){qe(Je())}return(N,k)=>(p(),L(je,{"model-value":u(d)},{header:V(()=>[m("div",lu,[u(n)?(p(),_("img",{key:0,class:"game-over-modal-logo",src:u(n),alt:u(t)},null,8,uu)):$("",!0),m("div",cu,[du,m("h4",null,"You've beaten "+D(u(t))+" v"+D(u(s))+": "+D(u(o)),1)])])]),body:V(({shown:I})=>[I?(p(),_("div",fu,[m("div",null,"It took you "+D(u(c))+" to beat the game.",1),gu,mu,hu,m("div",null,[m("a",{href:u(i),class:"game-over-modal-discord-link"},[vu,T(" "+D(u(r)),1)],8,pu)]),y(we,{title:"Autosave",modelValue:u(g),"onUpdate:modelValue":k[0]||(k[0]=C=>te(g)?g.value=C:null)},null,8,["modelValue"])])):$("",!0)]),footer:V(()=>[m("div",{class:"game-over-footer"},[m("button",{onClick:b,class:"button"},"Keep Going"),m("button",{onClick:v,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var yu=z(bu,[["__scopeId","data-v-4a50ce42"]]);const xt=e=>(Ie("data-v-d3bb0716"),e=e(),Me(),e),_u=xt(()=>m("div",{class:"nan-modal-header"},[m("h2",null,"NaN value detected!")],-1)),Nu={key:0},wu=xt(()=>m("br",null,null,-1)),Cu=["href"],ku=xt(()=>m("span",{class:"material-icons nan-modal-discord"},"discord",-1)),Su=xt(()=>m("br",null,null,-1)),Iu={class:"nan-footer"},Mu=q({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:n}=A,r=F(!0),i=F(!0),s=ke(J,"hasNaN"),o=F(null);_e(s,N=>{N?(r.value=x.autosave,i.value=x.devSpeed===0):(x.autosave=r.value,x.devSpeed=i.value?0:null)});const c=P(()=>{var N;return(N=J.NaNPath)==null?void 0:N.join(".")}),d=P(()=>J.NaNPersistent!=null?J.NaNPersistent.value:null);function g(){J.NaNPersistent!=null&&(J.NaNPersistent.value=new l(0),J.hasNaN=!1)}function b(){J.NaNPersistent&&(J.NaNPersistent.value=new l(1),J.hasNaN=!1)}function v(){J.NaNPersistent&&(J.NaNPersistent.value=new l(NaN),J.hasNaN=!1)}return(N,k)=>(p(),_(j,null,[y(je,Oe({modelValue:u(s),"onUpdate:modelValue":k[4]||(k[4]=I=>te(s)?s.value=I:null)},N.$attrs),{header:V(()=>[_u]),body:V(()=>[m("div",null,[T(' Attempted to assign "'+D(u(c))+'" to NaN',1),u(d)?(p(),_("span",Nu,D(" ")+"(previously "+D(u(Se)(u(d)))+")",1)):$("",!0),T(". Auto-saving has been "+D(r.value?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),wu,m("div",null,[m("a",{href:u(n)||"https://discord.gg/yJ4fjnjU54",class:"nan-modal-discord-link"},[ku,T(" "+D(u(t)||"Profectus & Friends"),1)],8,Cu)]),Su,y(we,{title:"Autosave",modelValue:r.value,"onUpdate:modelValue":k[0]||(k[0]=I=>r.value=I)},null,8,["modelValue"]),u(A).enablePausing?(p(),L(we,{key:0,title:"Pause game",modelValue:i.value,"onUpdate:modelValue":k[1]||(k[1]=I=>i.value=I)},null,8,["modelValue"])):$("",!0)]),footer:V(()=>[m("div",Iu,[m("button",{onClick:k[2]||(k[2]=I=>{var C;return(C=o.value)==null?void 0:C.open()}),class:"button"},"Open Saves Manager"),m("button",{onClick:g,class:"button"},"Set to 0"),m("button",{onClick:b,class:"button"},"Set to 1"),u(d)&&u(l).neq(u(d),0)&&u(l).neq(u(d),1)?(p(),_("button",{key:0,onClick:k[3]||(k[3]=I=>s.value=!1),class:"button"}," Set to previous ")):$("",!0),m("button",{onClick:v,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),y(Pn,{ref_key:"savesManager",ref:o},null,512)],64))}});var $u=z(Mu,[["__scopeId","data-v-d3bb0716"]]);const xu={key:0,class:"tpsDisplay"},Fu=q({__name:"TPS",setup(e){const t=P(()=>l.div(J.lastTenTicks.length,J.lastTenTicks.reduce((n,r)=>n+r,0)));return(n,r)=>u(t).isNan()?$("",!0):(p(),_("div",xu,"TPS: "+D(u(st)(u(t))),1))}});var Tu=z(Fu,[["__scopeId","data-v-89b89152"]]);var Pu=q({__name:"App",setup(e){const t=A.useHeader,n=P(()=>At[ne.theme].variables),r=ke(ne,"showTPS"),i=ke(J,"errors"),s=P(()=>ue(ee(()=>y(j,null,[Ni.map(ut)]))));return(o,c)=>u(i).length>0?(p(),_("div",{key:0,class:"error-container",style:ge(u(n))},[y(dn,{errors:u(i)},null,8,["errors"])],4)):(p(),_(j,{key:1},[m("div",{id:"modal-root",style:ge(u(n))},null,4),m("div",{class:ae(["app",{useHeader:u(t)}]),style:ge(u(n))},[u(t)?(p(),L(En,{key:0})):$("",!0),y(al),u(u(r))?(p(),L(Tu,{key:1})):$("",!0),y(yu),y($u),(p(),L(ie(u(s))))],6)],64))}});var Eu=z(Pu,[["__scopeId","data-v-bf4e22ac"]]);se.on("setupVue",e=>e.use(Zn));function Ou(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:r,onRegistered:i,onRegisteredSW:s,onRegisterError:o}=e;let c,d,g,b;const v=async(k=!0)=>{await g,k&&(c==null||c.addEventListener("controlling",I=>{I.isUpdate&&window.location.reload()})),await(b==null?void 0:b())};async function N(){if("serviceWorker"in navigator){const{Workbox:k,messageSW:I}=await it(()=>import("./workbox-window.4a8794bb.js"),[]);b=async()=>{d&&d.waiting&&await I(d.waiting,{type:"SKIP_WAITING"})},c=new k("./sw.js",{scope:"./",type:"classic"}),c.addEventListener("activated",C=>{C.isUpdate||r==null||r()});{const C=()=>{n==null||n()};c.addEventListener("waiting",C),c.addEventListener("externalwaiting",C)}c.register({immediate:t}).then(C=>{d=C,s?s("./sw.js",C):i==null||i(C)}).catch(C=>{o==null||o(C)})}}return g=N(),v}function Vu(e={}){const{immediate:t=!0,onNeedRefresh:n,onOfflineReady:r,onRegistered:i,onRegisteredSW:s,onRegisterError:o}=e,c=F(!1),d=F(!1);return{updateServiceWorker:Ou({immediate:t,onNeedRefresh(){c.value=!0,n==null||n()},onOfflineReady(){d.value=!0,r==null||r()},onRegistered:i,onRegisteredSW:s,onRegisterError:o}),offlineReady:d,needRefresh:c}}const Kt=console.error;console.error=function(...e){Kt(...e)};window.onerror=function(e,t,n,r,i){return J.errors.push(i instanceof Error?i:new Error(JSON.stringify(i))),Kt(i),!0};window.onunhandledrejection=function(e){J.errors.push(e.reason instanceof Error?e.reason:new Error(JSON.stringify(e.reason))),Kt(e.reason)};document.title=A.title;window.projInfo=A;A.id===""&&console.error("Project ID is empty!","Please select a unique ID for this project in /src/data/projInfo.json");requestAnimationFrame(async()=>{console.log(`%cMade in Profectus%c -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 pi();const{globalBus:e}=await it(()=>Promise.resolve().then(function(){return hi}),void 0),{startGameLoop:t}=await it(()=>import("./gameLoop.985d1f90.js"),["assets/gameLoop.985d1f90.js","assets/@fontsource.f66d05e7.css","assets/vue.359c6955.js","assets/lz-string.bfbf8ec3.js","assets/@vue.6f8187b0.js","assets/nanoevents.1080beb7.js","assets/vue-next-select.68e0c605.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.055200e5.js","assets/sortablejs.20039f18.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-toastification.45d39007.js","assets/vue-toastification.4b5f8ac8.css"]),n=window.vue=jn(Eu);n.config.errorHandler=function(r,i,s){console.error(r,s,i)},e.emit("setupVue",n),n.mount("#app"),Ue(()=>{const r=Kn(),{updateServiceWorker:i}=Vu({onNeedRefresh(){r.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(){i()}})},onOfflineReady(){r.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{l as D,it as _,J as a,A as b,ou as c,se as g,Bt as l,x as p,ne as s}; +${M}`)}}return g[S]}_e(n,S=>{S&&Object.keys(g).forEach(M=>delete g[M])});const v=P(()=>ne.saves.reduce((S,M)=>(S[M]=b(M),S),{}));function N(S){let M;switch(x.id===S?M=Lt(x):M=JSON.stringify(v.value[S]),A.exportEncoding){default:console.warn(`Unknown save encoding: ${A.exportEncoding}. Defaulting to lz`);case"lz":M=Ce.compressToUTF16(M);break;case"base64":M=btoa(unescape(encodeURIComponent(M)));break;case"plain":break}const U=document.createElement("textarea");U.value=M,document.body.appendChild(U),U.select(),U.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(U)}function k(S){x.id===S&&fe();const M={...v.value[S],id:ht()};fe(M),ne.saves.push(M.id)}function I(S){ne.saves=ne.saves.filter(M=>M!==S),localStorage.removeItem(S),g[S]=void 0}function C(S){v.value[x.id].time=x.time,fe(),g[x.id]=void 0,qe(v.value[S]),g[S]=void 0}function G(S){if(o.value=S,Ue(()=>{o.value=null}),S[0]!=="{")if(S[0]==="e")S=decodeURIComponent(escape(atob(S)));else if(S[0]==="\u1BE1")S=Ce.decompressFromUTF16(S);else{console.warn("Unable to determine preset encoding",S);return}const M=JSON.parse(S);M.id=ht(),fe(M),ne.saves.push(M.id),C(M.id)}function Y(S,M){const U=v.value[S];U!=null&&(U.name=M,x.id===S?(x.name=M,fe()):(fe(U),g[S]=void 0))}return(S,M)=>(p(),L(je,{modelValue:n.value,"onUpdate:modelValue":M[4]||(M[4]=U=>n.value=U),ref_key:"modal",ref:r},{header:V(()=>[ko]),body:V(({shown:U})=>[U?(p(),L(u(Wn),{key:0,list:u(ne).saves,handle:".handle",itemKey:Ne=>Ne},{item:V(({element:Ne})=>[y(Co,{save:u(v)[Ne],onOpen:oe=>C(Ne),onExport:oe=>N(Ne),onEditName:oe=>Y(Ne,oe),onDuplicate:oe=>k(Ne),onDelete:oe=>I(Ne)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):$("",!0)]),footer:V(()=>[m("div",So,[y(Tn,{modelValue:s.value,"onUpdate:modelValue":M[0]||(M[0]=U=>s.value=U),title:"Import Save",placeholder:"Paste your save here!",class:ae({importingFailed:i.value})},null,8,["modelValue","class"]),m("div",Io,[Mo,m("div",$o,[m("button",{class:"button",onClick:M[1]||(M[1]=U=>C(u(Je)().id))},"New Game"),Object.keys(u(d)).length>0?(p(),L(Fn,{key:0,options:u(d),modelValue:o.value,"onUpdate:modelValue":M[2]||(M[2]=U=>G(U)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):$("",!0)])]),m("div",xo,[Fo,m("button",{class:"button modal-default-button",onClick:M[3]||(M[3]=U=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Pn=z(To,[["__scopeId","data-v-2a4275be"]]);const me=e=>(Ie("data-v-47c54e31"),e=e(),Me(),e),Po=["src","alt"],Eo={key:1,class:"title"},Oo=me(()=>m("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),Vo={class:"discord"},Do={class:"discord-links"},Lo={key:0},Ro=["href"],qo=me(()=>m("li",null,[m("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"Profectus & Friends")],-1)),Ao=me(()=>m("li",null,[m("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Bo={href:"https://forums.moddingtree.com/",target:"_blank"},Uo=me(()=>m("span",{class:"material-icons"},"forum",-1)),zo=me(()=>m("span",{class:"material-icons"},"info",-1)),Go=me(()=>m("span",{class:"material-icons"},"library_books",-1)),jo=me(()=>m("span",{class:"material-icons"},"settings",-1)),Ho=me(()=>m("span",{class:"material-icons"},"library_books",-1)),Wo=me(()=>m("span",{class:"material-icons"},"settings",-1)),Jo=me(()=>m("span",{class:"material-icons"},"info",-1)),Zo={href:"https://forums.moddingtree.com/",target:"_blank"},Ko=me(()=>m("span",{class:"material-icons"},"forum",-1)),Yo={class:"discord"},Xo={class:"discord-links"},Qo={key:0},el=["href"],tl=me(()=>m("li",null,[m("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"Profectus & Friends")],-1)),nl=me(()=>m("li",null,[m("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),rl=q({__name:"Nav",setup(e){const t=F(null),n=F(null),r=F(null),i=F(null),{useHeader:s,banner:o,title:c,discordName:d,discordLink:g,versionNumber:b}=A;function v(){window.open(g,"mywindow")}return(N,k)=>(p(),_(j,null,[u(s)?(p(),_("div",Oe({key:0,class:"nav"},N.$attrs),[u(o)?(p(),_("img",{key:0,src:u(o),class:"banner",alt:u(c)},null,8,Po)):(p(),_("div",Eo,D(u(c)),1)),m("div",{onClick:k[0]||(k[0]=I=>{var C;return(C=i.value)==null?void 0:C.open()}),class:"version-container"},[y(Q,{display:"Changelog",direction:u(Z).Down,class:"version"},{default:V(()=>[m("span",null,"v"+D(u(b)),1)]),_:1},8,["direction"])]),Oo,m("div",Vo,[m("span",{onClick:v,class:"material-icons"},"discord"),m("ul",Do,[u(g)?(p(),_("li",Lo,[m("a",{href:u(g),target:"_blank"},D(u(d)),9,Ro)])):$("",!0),qo,Ao])]),m("div",null,[m("a",Bo,[y(Q,{display:"Forums",direction:u(Z).Down,yoffset:"5px"},{default:V(()=>[Uo]),_:1},8,["direction"])])]),m("div",{onClick:k[1]||(k[1]=I=>{var C;return(C=t.value)==null?void 0:C.open()})},[y(Q,{display:"Info",direction:u(Z).Down,class:"info"},{default:V(()=>[zo]),_:1},8,["direction"])]),m("div",{onClick:k[2]||(k[2]=I=>{var C;return(C=n.value)==null?void 0:C.open()})},[y(Q,{display:"Saves",direction:u(Z).Down,xoffset:"-20px"},{default:V(()=>[Go]),_:1},8,["direction"])]),m("div",{onClick:k[3]||(k[3]=I=>{var C;return(C=r.value)==null?void 0:C.open()})},[y(Q,{display:"Settings",direction:u(Z).Down,xoffset:"-66px"},{default:V(()=>[jo]),_:1},8,["direction"])])],16)):(p(),_("div",Oe({key:1,class:"overlay-nav"},N.$attrs),[m("div",{onClick:k[4]||(k[4]=I=>{var C;return(C=i.value)==null?void 0:C.open()}),class:"version-container"},[y(Q,{display:"Changelog",direction:u(Z).Right,xoffset:"25%",class:"version"},{default:V(()=>[m("span",null,"v"+D(u(b)),1)]),_:1},8,["direction"])]),m("div",{onClick:k[5]||(k[5]=I=>{var C;return(C=n.value)==null?void 0:C.open()})},[y(Q,{display:"Saves",direction:u(Z).Right},{default:V(()=>[Ho]),_:1},8,["direction"])]),m("div",{onClick:k[6]||(k[6]=I=>{var C;return(C=r.value)==null?void 0:C.open()})},[y(Q,{display:"Settings",direction:u(Z).Right},{default:V(()=>[Wo]),_:1},8,["direction"])]),m("div",{onClick:k[7]||(k[7]=I=>{var C;return(C=t.value)==null?void 0:C.open()})},[y(Q,{display:"Info",direction:u(Z).Right},{default:V(()=>[Jo]),_:1},8,["direction"])]),m("div",null,[m("a",Zo,[y(Q,{display:"Forums",direction:u(Z).Right,xoffset:"7px"},{default:V(()=>[Ko]),_:1},8,["direction"])])]),m("div",Yo,[m("span",{onClick:v,class:"material-icons"},"discord"),m("ul",Xo,[u(g)?(p(),_("li",Qo,[m("a",{href:u(g),target:"_blank"},D(u(d)),9,el)])):$("",!0),tl,nl])])],16)),y(La,{ref_key:"info",ref:t,changelog:i.value},null,8,["changelog"]),y(Pn,{ref_key:"savesManager",ref:n},null,512),y(Wa,{ref_key:"options",ref:r},null,512),y(ba,{ref_key:"changelog",ref:i},null,512)],64))}});var En=z(rl,[["__scopeId","data-v-47c54e31"]]);const il={class:"inner-tab"},sl=q({__name:"Game",setup(e){const t=ke(x,"tabs"),n=P(()=>Object.keys(le)),r=A.useHeader;function i(s){const{display:o,minimized:c,name:d,color:g,minimizable:b,nodes:v,minimizedDisplay:N}=s;return{display:o,minimized:c,name:d,color:g,minimizable:b,nodes:v,minimizedDisplay:N}}return(s,o)=>(p(),_("div",{class:ae(["tabs-container",{useHeader:u(r)}])},[(p(!0),_(j,null,Le(u(t),(c,d)=>{var g,b;return p(),_("div",{key:d,class:ae(["tab",u((g=u(le)[c])==null?void 0:g.classes)]),style:ge(u((b=u(le)[c])==null?void 0:b.style))},[d===0&&!u(r)?(p(),L(En,{key:0})):$("",!0),m("div",il,[u(n).includes(c)?(p(),L(ma,Oe({key:0},i(u(le)[c]),{index:d,onSetMinimized:v=>u(le)[c].minimized.value=v}),null,16,["index","onSetMinimized"])):(p(),L(ie(c),{key:1,index:d},null,8,["index"]))])],6)}),128))],2))}});var al=z(sl,[["__scopeId","data-v-dcd207b4"]]);const ol=q({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(p(),_("div",{style:ge({width:e.width,height:e.height})},null,4))}});function On(e,t="points",n=0,r=void 0){const i=te(e)?e:dt(e);if(i.displayName=t,i.precision=n,i.small=r,!te(e)){const s=i[Fe];s.displayName=t,s.precision=n,s.small=r}return i}function ll(e){const t=dt(e.value);return _e(e,n=>{Bt.value||l.gt(n,t.value)&&(t.value=n)}),t}function ul(e){const t=dt(e.value);return _e(e,(n,r)=>{Bt.value||l.gt(n,r)&&(t.value=l.add(t.value,l.sub(n,r)))}),t}const cl=new l("10^^8"),dl=new l("1e100");function fl(e,t){const n=F(0),r=F(0),i=F(0);return se.on("update",o=>{if(r.value=0,l.lte(e.value,dl)){i.value=e.value;return}let c=e.value,d=i.value;if(i.value=c,l.gt(c,d))if(l.gte(c,cl))c=l.slog(c,1e10),d=l.slog(d,1e10),n.value=c.sub(d).div(o),r.value=-1;else for(;l.div(c,d).log(10).div(o).gte("100")&&r.value<=5&&l.gt(d,0);)c=l.log10(c),d=l.log10(d),n.value=c.sub(d).div(o),r.value++}),P(()=>r.value===0?t?Se(t.value,e.precision,e.small)+" "+e.displayName+"/s":"":Se(n.value)+" OOM"+(r.value<0?"^OOM":"^"+r.value)+"s/sec")}function Nt(e,t){const n=t!=null?t:e.value;return l.eq(e.precision,0)?st(e.small?n:l.floor(n)):Se(n,e.precision,e.small)}const gl=["x1","y1","x2","y2"],ml=q({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const t=e,n=de(t),r=P(()=>{const o=n.startNode.value.rect,c=n.boundingRect.value,d=c?{x:o.x+o.width/2-c.x,y:o.y+o.height/2-c.y}:{x:0,y:0};return n.link.value.offsetStart&&(d.x+=n.link.value.offsetStart.x,d.y+=n.link.value.offsetStart.y),d}),i=P(()=>{const o=n.endNode.value.rect,c=n.boundingRect.value,d=c?{x:o.x+o.width/2-c.x,y:o.y+o.height/2-c.y}:{x:0,y:0};return n.link.value.offsetEnd&&(d.x+=n.link.value.offsetEnd.x,d.y+=n.link.value.offsetEnd.y),d}),s=P(()=>Ci(t.link));return(o,c)=>(p(),_("line",Oe({"stroke-width":"15px",stroke:"white"},u(s),{x1:u(r).x,y1:u(r).y,x2:u(i).x,y2:u(i).y}),null,16,gl))}});const hl=q({__name:"Links",props:{links:null},setup(e){var d;const n=ke(e,"links"),r=F(null),i=bt(Gt,F({})),s=bt(jt,F(void 0)),o=F((d=r.value)==null?void 0:d.getBoundingClientRect());_e(s,()=>{var g;return o.value=(g=r.value)==null?void 0:g.getBoundingClientRect()}),ut(()=>{var g;return o.value=(g=r.value)==null?void 0:g.getBoundingClientRect()});const c=P(()=>{var b,v;const g=i.value;return(v=(b=n.value)==null?void 0:b.filter(N=>{var k,I;return((k=g[N.startNode.id])==null?void 0:k.rect)&&((I=g[N.startNode.id])==null?void 0:I.rect)}))!=null?v:[]});return(g,b)=>(p(),_(j,null,[u(c)?(p(),_("svg",Gn(Oe({key:0},g.$attrs)),[(p(!0),_(j,null,Le(u(c),(v,N)=>(p(),L(ml,{key:N,link:v,boundingRect:o.value,startNode:u(i)[v.startNode.id],endNode:u(i)[v.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):$("",!0),m("div",{ref_key:"resizeListener",ref:r,class:"resize-listener"},null,512)],64))}});var pl=z(hl,[["__scopeId","data-v-063f6d6b"]]),vl=q({props:{nodes:{type:B(Array),required:!0},leftSideNodes:B(Array),rightSideNodes:B(Array),branches:B(Array)},components:{Links:pl},setup(e){const{nodes:t,leftSideNodes:n,rightSideNodes:r}=de(e),i=be();Be(()=>{const c=ye(t);i.value=ue(ee(()=>y(j,null,[c.map(d=>y("span",{class:"row tree-row",style:"margin: 50px auto;"},[d.map(pt)]))])))});const s=be();Be(()=>{const c=ye(n);s.value=c?ue(ee(()=>y("span",{class:"left-side-nodes small"},[c.map(pt)]))):""});const o=be();return Be(()=>{const c=ye(r);o.value=c?ue(ee(()=>y("span",{class:"side-nodes small"},[c.map(pt)]))):""}),{unref:u,nodesComp:i,leftNodesComp:s,rightNodesComp:o}}});function bl(e,t,n,r,i,s){const o=ze("Links");return p(),_(j,null,[(p(),L(ie(e.nodesComp))),e.leftNodesComp?(p(),L(ie(e.leftNodesComp),{key:0})):$("",!0),e.rightNodesComp?(p(),L(ie(e.rightNodesComp),{key:1})):$("",!0),e.branches?(p(),L(o,{key:2,links:e.unref(e.branches)},null,8,["links"])):$("",!0)],64)}var yl=z(vl,[["render",bl],["__scopeId","data-v-39ca96d0"]]);const _l={key:0},Nl={key:0,class:"mark star"},wl=["src"],Cl=q({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(p(),_("div",_l,[e.mark===!0?(p(),_("div",Nl)):(p(),_("img",{key:1,class:"mark",src:e.mark},null,8,wl))])):$("",!0)}});var Vn=z(Cl,[["__scopeId","data-v-2207999f"]]);const kl=q({__name:"Node",props:{id:null},setup(e){const n=de(e),r=bt(Ut,()=>{}),i=bt(zt,()=>{}),s=be(null),o=P(()=>s.value&&s.value.parentElement);return _e([o,n.id],([c,d],[g,b])=>{g&&i(u(b)),c&&r(d,c)}),ln(()=>i(u(n.id))),(c,d)=>(p(),_("div",{class:"node",ref_key:"node",ref:s},null,512))}});var Dn=z(kl,[["__scopeId","data-v-a48cb382"]]);const Sl=q({props:{display:B(Object,String,Function),visibility:{type:B(Number,Boolean),required:!0},style:B(String,Object,Array),classes:B(Object),onClick:Function,onHold:Function,color:B(String),glowColor:B(String),canClick:{type:B(Boolean),required:!0},mark:B(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Vn,Node:Dn},setup(e){const{onClick:t,onHold:n,display:r}=de(e),i=Qe(r),{start:s,stop:o}=kn(t,n);return{start:s,stop:o,comp:i,unref:u,Visibility:Xe,isCoercableComponent:$t,isVisible:yn,isHidden:_n}}});function Il(e,t,n,r,i,s){var d;const o=ze("MarkNode"),c=ze("Node");return e.isVisible(e.visibility)?(p(),_("div",{key:0,style:ge({visibility:e.isHidden(e.visibility)?"hidden":void 0}),class:ae({treeNode:!0,can:e.unref(e.canClick),...e.unref(e.classes)}),onClick:t[0]||(t[0]=(...g)=>e.onClick&&e.onClick(...g)),onMousedown:t[1]||(t[1]=(...g)=>e.start&&e.start(...g)),onMouseleave:t[2]||(t[2]=(...g)=>e.stop&&e.stop(...g)),onMouseup:t[3]||(t[3]=(...g)=>e.stop&&e.stop(...g)),onTouchstartPassive:t[4]||(t[4]=(...g)=>e.start&&e.start(...g)),onTouchendPassive:t[5]||(t[5]=(...g)=>e.stop&&e.stop(...g)),onTouchcancelPassive:t[6]||(t[6]=(...g)=>e.stop&&e.stop(...g))},[m("div",{style:ge([{backgroundColor:e.unref(e.color),boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ${e.unref(e.glowColor)}`},(d=e.unref(e.style))!=null?d:[]])},[(p(),L(ie(e.unref(e.comp))))],4),y(o,{mark:e.unref(e.mark)},null,8,["mark"]),y(c,{id:e.id},null,8,["id"])],38)):$("",!0)}var Ml=z(Sl,[["render",Il],["__scopeId","data-v-727230a6"]]);const $l=Symbol("TreeNode"),xl=Symbol("Tree");function Fl(e,...t){const n=t.reduce((r,i)=>{var s;return Object.assign(r,(s=i.getPersistentData)==null?void 0:s.call(i))},{});return He(r=>{var o,c,d;const i=(o=e==null?void 0:e.call(r,r))!=null?o:{};i.id=Mt("treeNode-"),i.type=$l,i[Pe]=Ml;for(const g of t)(c=g.preConstruct)==null||c.call(g,i);Object.assign(n),E(i,"visibility"),ce(i,"visibility",Xe.Visible),E(i,"canClick"),ce(i,"canClick",!0),E(i,"color"),E(i,"display"),E(i,"glowColor"),E(i,"classes"),E(i,"style"),E(i,"mark");for(const g of t)(d=g.postConstruct)==null||d.call(g,i);if(i.onClick){const g=i.onClick.bind(i);i.onClick=function(b){u(i.canClick)!==!1&&g(b)}}if(i.onHold){const g=i.onHold.bind(i);i.onHold=function(){u(i.canClick)!==!1&&g()}}const s=t.reduce((g,b)=>{var v;return Object.assign(g,(v=b.getGatheredProps)==null?void 0:v.call(b,i))},{});return i[Ee]=function(){const{display:g,visibility:b,style:v,classes:N,onClick:k,onHold:I,color:C,glowColor:G,canClick:Y,mark:S,id:M}=this;return{display:g,visibility:b,style:v,classes:N,onClick:k,onHold:I,color:C,glowColor:G,canClick:Y,mark:S,id:M,...s}},i})}function Tl(e){return He(t=>{const n=e.call(t,t);return n.id=Mt("tree-"),n.type=xl,n[Pe]=yl,n.isResetting=F(!1),n.resettingNode=be(null),n.reset=function(r){var s,o;const i=n;i.isResetting.value=!0,i.resettingNode.value=r,(s=i.resetPropagation)==null||s.call(i,i,r),(o=i.onReset)==null||o.call(i,r),i.isResetting.value=!1,i.resettingNode.value=null},n.links=P(()=>{var i;return(i=u(n.branches))!=null?i:[]}),E(n,"visibility"),ce(n,"visibility",Xe.Visible),E(n,"nodes"),E(n,"leftSideNodes"),E(n,"rightSideNodes"),E(n,"branches"),n[Ee]=function(){const{nodes:r,leftSideNodes:i,rightSideNodes:s,branches:o}=this;return{nodes:r,leftSideNodes:i,rightSideNodes:s,branches:o}},n})}const Pl=function(e,t){var s;const n=u(e.branches);if(n==null)return;const r=[];let i=[t];for(;i.length!=0;){const o=[];for(const c of i)for(const d of n.filter(g=>g.startNode===c))[...r,...i].includes(d.endNode)||(o.push(d.endNode),(s=d.endNode.reset)==null||s.reset());r.push(...i),i=o}};function El(e,t=null,n=0){const r=Et(n);return P(()=>t==null||l.gte(e.value,u(r))?Nt(e)+" "+e.displayName:`Reach ${l.eq(t.precision,0)?st(u(r)):Se(u(r),t.precision)} ${t.displayName} to unlock (You have ${l.eq(t.precision,0)?st(t.value):Se(t.value,t.precision)})`)}function Ol(e,...t){return He(n=>{var i,s;const r=e.call(n,n);for(const o of t)(i=o.preConstruct)==null||i.call(o,r);r.formula=r.formula(a.variable(r.baseResource)),r.currentGain==null&&(r.currentGain=P(()=>{let o=l.floor(r.formula.evaluate(r.baseResource.value)).max(0);return u(r.buyMax)===!1&&(o=o.min(1)),o})),r.actualGain==null&&(r.actualGain=r.currentGain),r.currentAt==null&&(r.currentAt=P(()=>r.formula.invert(l.floor(u(r.currentGain))))),r.nextAt==null&&(r.nextAt=P(()=>r.formula.invert(l.floor(u(r.currentGain)).add(1)))),r.convert==null&&(r.convert=function(){var c;const o=u(r.currentGain);r.gainResource.value=l.add(r.gainResource.value,o),r.spend(o),(c=r.onConvert)==null||c.call(r,o)}),r.spend==null&&(r.spend=function(){r.baseResource.value=0}),E(r,"currentGain"),E(r,"actualGain"),E(r,"currentAt"),E(r,"nextAt"),E(r,"buyMax"),ce(r,"buyMax",!0);for(const o of t)(s=o.postConstruct)==null||s.call(o,r);return r})}function Vl(e){return Ol(e)}const Ln=e=>(Ie("data-v-5e2d38ce"),e=e(),Me(),e),Dl=Ln(()=>m("div",{class:"key"},"Ctrl",-1)),Ll=Ln(()=>m("div",{class:"key"},"Shift",-1)),Rl={class:"key"},ql=q({__name:"Hotkey",props:{hotkey:null},setup(e){const t=e;let n="",r=!1,i=!1,s=!1;return Be(()=>{n=t.hotkey.key,r=n.startsWith("ctrl+"),r&&(n=n.slice(5)),i=n.startsWith("shift+"),i&&(n=n.slice(6)),s=n.length==1&&n.toLowerCase()!=n.toUpperCase(),s&&(n=n.toUpperCase())}),(o,c)=>(p(),_(j,null,[u(r)?(p(),_(j,{key:0},[Dl,T("+")],64)):$("",!0),u(i)?(p(),_(j,{key:1},[Ll,T("+")],64)):$("",!0),m("div",Rl,D(u(n)),1)],64))}});var Al=z(ql,[["__scopeId","data-v-5e2d38ce"]]);const lt=kt({}),Jt=Symbol("Hotkey"),an=[")","!","@","#","$","%","^","&","*","("];function Bl(e){return He(t=>{const n=e.call(t,t);return n.type=Jt,E(n,"enabled"),ce(n,"enabled",!0),E(n,"description"),n})}se.on("addLayer",e=>{Nn(e,Jt).forEach(t=>{lt[t.key]=t})});se.on("removeLayer",e=>{Nn(e,Jt).forEach(t=>{lt[t.key]=void 0})});document.onkeydown=function(e){var r,i;if(((r=e.target)==null?void 0:r.tagName)==="INPUT"||Zt.value&&!x.keepGoing)return;let t=e.key;an.includes(t)?t="shift+"+an.indexOf(t):e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const n=(i=lt[t])!=null?i:lt[t.toLowerCase()];n&&u(n.enabled)&&(e.preventDefault(),n.onPress())};_i(ee(()=>{const e=Object.values(lt).filter(t=>u(t==null?void 0:t.enabled));return e.length===0?"":y("div",null,[y("br",null,null),y("h4",null,[T("Hotkeys")]),y("div",{style:"column-count: 2"},[e.map(t=>y("div",null,[y(Al,{hotkey:t},null),T(" "),t==null?void 0:t.description]))])])}));const Ul=Symbol("Reset");function zl(e){return He(t=>{const n=e.call(t,t);return n.id=Mt("reset-"),n.type=Ul,n.reset=function(){var i;const r=s=>{if(s!=null&&typeof s=="object"&&!(s instanceof l)&&!(s instanceof a)){if(Vt in s&&s[Vt]===!0)return;if(Ge in s){const o=s;o.value=o[Ge]}else!(s instanceof l)&&!te(s)&&Object.values(s).forEach(o=>r(o))}};u(n.thingsToReset).forEach(r),se.emit("reset",n),(i=n.onReset)==null||i.call(n)},E(n,"thingsToReset"),n})}const mt={};se.on("removeLayer",e=>{var t;(t=mt[e.id])==null||t.call(mt),mt[e.id]=void 0});const Gl=q({__name:"Sticky",setup(e){const t=F("0"),n=new ResizeObserver(i),r=be(null);function i(){let s=r.value;if(s==null)return;let o=0;for(;s.previousSibling;){const c=s.previousSibling;c.dataset&&"vSticky"in c.dataset&&(o+=c.offsetHeight),s=c}t.value=o+"px"}return Ue(i),document.fonts.ready.then(i),ut(()=>{var o;const s=(o=r.value)==null?void 0:o.parentElement;s&&n.observe(s)}),(s,o)=>(p(),_("div",{class:"sticky",style:ge({top:t.value}),ref_key:"element",ref:r,"data-v-sticky":""},[Te(s.$slots,"default",{},void 0,!0)],4))}});var jl=z(Gl,[["__scopeId","data-v-cccac690"]]);const Hl=q({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,n=P(()=>Nt(t.resource));return(r,i)=>(p(),_("h2",{style:ge({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},D(u(n)),5))}});const Wl={class:"main-display"},Jl={key:0},Zl={key:1},Kl=q({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null},setup(e){const n=de(e),r=F(null),i=Qe(n.effectDisplay),s=P(()=>l.lt(n.resource.value,"1e1000"));return(o,c)=>(p(),L(jl,null,{default:V(()=>{var d,g,b,v;return[m("div",{class:ae(["main-display-container",(d=e.classes)!=null?d:{}]),style:ge([{height:`${((b=(g=r.value)==null?void 0:g.$el.clientHeight)!=null?b:0)+50}px`},(v=e.style)!=null?v:{}])},[m("div",Wl,[u(s)?(p(),_("span",Jl,"You have ")):$("",!0),y(Hl,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),T(" "+D(e.resource.displayName),1),u(i)?(p(),_("span",Zl,[T(", "),(p(),L(ie(u(i)),{ref_key:"effectRef",ref:r},null,512))])):$("",!0)])],6)]}),_:1}))}});function Yl(e,t){return E(t,"display"),E(t,"classes"),E(t,"style"),E(t,"direction"),ce(t,"direction",Z.Up),E(t,"xoffset"),E(t,"yoffset"),t.pinnable&&(t.pinned=dt(!1,!1)),Ue(()=>{const n=e[Pe];e[Pe]=Q;const r=e[Ee].bind(e);e[Ee]=function(){const{display:s,classes:o,style:c,direction:d,xoffset:g,yoffset:b,pinned:v}=this;return{element:{[Pe]:n,[Ee]:r},display:s,classes:o,style:u(c),direction:d,xoffset:g,yoffset:b,pinned:v}}.bind(t)}),t}var Xl=q({props:{display:{type:B(Object,String,Function),required:!0},visibility:{type:B(Number,Boolean),required:!0},style:B(Object,String,Array),classes:B(Object),onClick:Function,onHold:Function,canClick:{type:B(Boolean),required:!0},small:Boolean,mark:B(Boolean,String),id:{type:String,required:!0}},components:{Node:Dn,MarkNode:Vn},setup(e){const{display:t,onClick:n,onHold:r}=de(e),i=be("");Be(()=>{var b;const c=ye(t);if(c==null){i.value="";return}if($t(c)){i.value=ue(c);return}const d=ue((b=c.title)!=null?b:"","h3"),g=ue(c.description,"div");i.value=ue(ee(()=>y("span",null,[c.title!=null?y("div",null,[y(d,null,null)]):null,y(g,null,null)])))});const{start:s,stop:o}=kn(n,r);return{start:s,stop:o,comp:i,Visibility:Xe,isVisible:yn,isHidden:_n,unref:u}}});function Ql(e,t,n,r,i,s){var d;const o=ze("MarkNode"),c=ze("Node");return e.isVisible(e.visibility)?(p(),_("button",{key:0,style:ge([{visibility:e.isHidden(e.visibility)?"hidden":void 0},(d=e.unref(e.style))!=null?d:[]]),onClick:t[0]||(t[0]=(...g)=>e.onClick&&e.onClick(...g)),onMousedown:t[1]||(t[1]=(...g)=>e.start&&e.start(...g)),onMouseleave:t[2]||(t[2]=(...g)=>e.stop&&e.stop(...g)),onMouseup:t[3]||(t[3]=(...g)=>e.stop&&e.stop(...g)),onTouchstartPassive:t[4]||(t[4]=(...g)=>e.start&&e.start(...g)),onTouchendPassive:t[5]||(t[5]=(...g)=>e.stop&&e.stop(...g)),onTouchcancelPassive:t[6]||(t[6]=(...g)=>e.stop&&e.stop(...g)),class:ae({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?(p(),L(ie(e.unref(e.comp)),{key:0})):$("",!0),y(o,{mark:e.unref(e.mark)},null,8,["mark"]),y(c,{id:e.id},null,8,["id"])],38)):$("",!0)}var eu=z(Xl,[["render",Ql],["__scopeId","data-v-211328c0"]]);const tu=Symbol("Clickable");function nu(e,...t){const n=t.reduce((r,i)=>{var s;return Object.assign(r,(s=i.getPersistentData)==null?void 0:s.call(i))},{});return He(r=>{var o,c,d;const i=(o=e==null?void 0:e.call(r,r))!=null?o:{};i.id=Mt("clickable-"),i.type=tu,i[Pe]=eu;for(const g of t)(c=g.preConstruct)==null||c.call(g,i);if(Object.assign(i,n),E(i,"visibility"),ce(i,"visibility",Xe.Visible),E(i,"canClick"),ce(i,"canClick",!0),E(i,"classes"),E(i,"style"),E(i,"mark"),E(i,"display"),i.onClick){const g=i.onClick.bind(i);i.onClick=function(b){u(i.canClick)!==!1&&g(b)}}if(i.onHold){const g=i.onHold.bind(i);i.onHold=function(){u(i.canClick)!==!1&&g()}}for(const g of t)(d=g.postConstruct)==null||d.call(g,i);const s=t.reduce((g,b)=>{var v;return Object.assign(g,(v=b.getGatheredProps)==null?void 0:v.call(b,i))},{});return i[Ee]=function(){const{display:g,visibility:b,style:v,classes:N,onClick:k,onHold:I,canClick:C,small:G,mark:Y,id:S}=this;return{display:g,visibility:b,style:u(v),classes:N,onClick:k,onHold:I,canClick:C,small:G,mark:Y,id:S,...s}},i})}function ru(e){return nu(t=>{const n=e.call(t,t);E(n,"showNextAt"),ce(n,"showNextAt",!0),ce(n,"minimumGain",1),n.resetDescription==null?n.resetDescription=P(()=>l.lt(n.conversion.gainResource.value,1e3)?"Reset for ":""):E(n,"resetDescription"),n.display==null&&(n.display=ee(()=>y("span",null,[u(n.resetDescription),y("b",null,[Nt(n.conversion.gainResource,l.max(u(n.conversion.actualGain),u(n.minimumGain)))])," ",n.conversion.gainResource.displayName,u(n.showNextAt)!=null?y("div",null,[y("br",null,null),u(n.conversion.buyMax)?"Next:":"Req:"," ",Nt(n.conversion.baseResource,!u(n.conversion.buyMax)&&l.gte(u(n.conversion.actualGain),1)?u(n.conversion.currentAt):u(n.conversion.nextAt))," ",n.conversion.baseResource.displayName]):null]))),n.canClick==null&&(n.canClick=P(()=>l.gte(u(n.conversion.actualGain),u(n.minimumGain))));const r=n.onClick;return n.onClick=function(i){u(n.canClick)!==!1&&(n.conversion.convert(),n.tree.reset(n.treeNode),n.resetTime&&(n.resetTime.value=n.resetTime[Ge]),r==null||r(i))},n})}function iu(e){return Fl(t=>{const n=e.call(t,t);return ce(n,"display",bn(n.layerID)),E(n,"append"),{...n,onClick:u(n.append)?function(){if(x.tabs.includes(n.layerID)){const r=x.tabs.lastIndexOf(n.layerID);x.tabs.splice(r,1)}else x.tabs.push(n.layerID)}:function(){x.tabs.splice(1,1,n.layerID)}}})}const on="p",wt=Ht(on,function(){const e="Prestige",t="#4BDC13",n=On(0,"prestige points"),r=Vl(()=>({formula:g=>g.div(10).sqrt(),baseResource:Ct.points,gainResource:n})),i=zl(()=>({thingsToReset:()=>[wt]})),s=iu(()=>({layerID:on,color:t,reset:i})),o=Yl(s,{display:El(n),pinnable:!0}),c=ru(()=>({conversion:r,tree:Ct.tree,treeNode:s})),d=Bl(()=>({description:"Reset for prestige points",key:"p",onPress:c.onClick}));return{name:e,color:t,points:n,tooltip:o,display:ee(()=>y(j,null,[y(Kl,{resource:n,color:t},null),ct(c)])),treeNode:s,hotkey:d}}),Ct=Ht("main",function(){const e=On(10),t=ll(e),n=ul(e),r=P(()=>new l(1));se.on("update",o=>{e.value=l.add(e.value,l.times(r.value,o))});const i=fl(e,r),s=Tl(()=>({nodes:[[wt.treeNode]],branches:[],onReset(){e.value=Xt(this.resettingNode.value)===Xt(wt.treeNode)?0:10,t.value=e.value,n.value=e.value},resetPropagation:Pl}));return{name:"Tree",links:s.links,display:ee(()=>y(j,null,[x.devSpeed===0?y("div",null,[T("Game Paused")]):null,x.devSpeed!=null&&x.devSpeed!==0&&x.devSpeed!==1?y("div",null,[T("Dev Speed: "),Se(x.devSpeed),T("x")]):null,x.offlineTime!=null&&x.offlineTime!==0?y("div",null,[T("Offline Time: "),It(x.offlineTime)]):null,y("div",null,[l.lt(e.value,"1e1000")?y("span",null,[T("You have ")]):null,y("h2",null,[Se(e.value)]),l.lt(e.value,"1e1e6")?y("span",null,[T(" points")]):null]),l.gt(r.value,0)?y("div",null,[T("("),i.value,T(")")]):null,y(ol,null,null),ct(s)])),points:e,best:t,total:n,oomps:i,tree:s}}),su=e=>[Ct,wt],Zt=P(()=>!1);function au(e,t){}var ou=Object.freeze(Object.defineProperty({__proto__:null,main:Ct,getInitialLayers:su,hasWon:Zt,fixOldSave:au},Symbol.toStringTag,{value:"Module"}));const ft=e=>(Ie("data-v-4a50ce42"),e=e(),Me(),e),lu={class:"game-over-modal-header"},uu=["src","alt"],cu={class:"game-over-modal-title"},du=ft(()=>m("h2",null,"Congratulations!",-1)),fu={key:0},gu=ft(()=>m("br",null,null,-1)),mu=ft(()=>m("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),hu=ft(()=>m("br",null,null,-1)),pu=["href"],vu=ft(()=>m("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),bu=q({__name:"GameOverScreen",setup(e){const{title:t,logo:n,discordName:r,discordLink:i,versionNumber:s,versionTitle:o}=A,c=P(()=>It(x.timePlayed)),d=P(()=>Zt.value&&!x.keepGoing),g=ke(x,"autosave");function b(){x.keepGoing=!0}function v(){qe(Je())}return(N,k)=>(p(),L(je,{"model-value":u(d)},{header:V(()=>[m("div",lu,[u(n)?(p(),_("img",{key:0,class:"game-over-modal-logo",src:u(n),alt:u(t)},null,8,uu)):$("",!0),m("div",cu,[du,m("h4",null,"You've beaten "+D(u(t))+" v"+D(u(s))+": "+D(u(o)),1)])])]),body:V(({shown:I})=>[I?(p(),_("div",fu,[m("div",null,"It took you "+D(u(c))+" to beat the game.",1),gu,mu,hu,m("div",null,[m("a",{href:u(i),class:"game-over-modal-discord-link"},[vu,T(" "+D(u(r)),1)],8,pu)]),y(we,{title:"Autosave",modelValue:u(g),"onUpdate:modelValue":k[0]||(k[0]=C=>te(g)?g.value=C:null)},null,8,["modelValue"])])):$("",!0)]),footer:V(()=>[m("div",{class:"game-over-footer"},[m("button",{onClick:b,class:"button"},"Keep Going"),m("button",{onClick:v,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var yu=z(bu,[["__scopeId","data-v-4a50ce42"]]);const xt=e=>(Ie("data-v-d3bb0716"),e=e(),Me(),e),_u=xt(()=>m("div",{class:"nan-modal-header"},[m("h2",null,"NaN value detected!")],-1)),Nu={key:0},wu=xt(()=>m("br",null,null,-1)),Cu=["href"],ku=xt(()=>m("span",{class:"material-icons nan-modal-discord"},"discord",-1)),Su=xt(()=>m("br",null,null,-1)),Iu={class:"nan-footer"},Mu=q({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:n}=A,r=F(!0),i=F(!0),s=ke(J,"hasNaN"),o=F(null);_e(s,N=>{N?(r.value=x.autosave,i.value=x.devSpeed===0):(x.autosave=r.value,x.devSpeed=i.value?0:null)});const c=P(()=>{var N;return(N=J.NaNPath)==null?void 0:N.join(".")}),d=P(()=>J.NaNPersistent!=null?J.NaNPersistent.value:null);function g(){J.NaNPersistent!=null&&(J.NaNPersistent.value=new l(0),J.hasNaN=!1)}function b(){J.NaNPersistent&&(J.NaNPersistent.value=new l(1),J.hasNaN=!1)}function v(){J.NaNPersistent&&(J.NaNPersistent.value=new l(NaN),J.hasNaN=!1)}return(N,k)=>(p(),_(j,null,[y(je,Oe({modelValue:u(s),"onUpdate:modelValue":k[4]||(k[4]=I=>te(s)?s.value=I:null)},N.$attrs),{header:V(()=>[_u]),body:V(()=>[m("div",null,[T(' Attempted to assign "'+D(u(c))+'" to NaN',1),u(d)?(p(),_("span",Nu,D(" ")+"(previously "+D(u(Se)(u(d)))+")",1)):$("",!0),T(". Auto-saving has been "+D(r.value?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),wu,m("div",null,[m("a",{href:u(n)||"https://discord.gg/yJ4fjnjU54",class:"nan-modal-discord-link"},[ku,T(" "+D(u(t)||"Profectus & Friends"),1)],8,Cu)]),Su,y(we,{title:"Autosave",modelValue:r.value,"onUpdate:modelValue":k[0]||(k[0]=I=>r.value=I)},null,8,["modelValue"]),u(A).enablePausing?(p(),L(we,{key:0,title:"Pause game",modelValue:i.value,"onUpdate:modelValue":k[1]||(k[1]=I=>i.value=I)},null,8,["modelValue"])):$("",!0)]),footer:V(()=>[m("div",Iu,[m("button",{onClick:k[2]||(k[2]=I=>{var C;return(C=o.value)==null?void 0:C.open()}),class:"button"},"Open Saves Manager"),m("button",{onClick:g,class:"button"},"Set to 0"),m("button",{onClick:b,class:"button"},"Set to 1"),u(d)&&u(l).neq(u(d),0)&&u(l).neq(u(d),1)?(p(),_("button",{key:0,onClick:k[3]||(k[3]=I=>s.value=!1),class:"button"}," Set to previous ")):$("",!0),m("button",{onClick:v,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),y(Pn,{ref_key:"savesManager",ref:o},null,512)],64))}});var $u=z(Mu,[["__scopeId","data-v-d3bb0716"]]);const xu={key:0,class:"tpsDisplay"},Fu=q({__name:"TPS",setup(e){const t=P(()=>l.div(J.lastTenTicks.length,J.lastTenTicks.reduce((n,r)=>n+r,0)));return(n,r)=>u(t).isNan()?$("",!0):(p(),_("div",xu,"TPS: "+D(u(st)(u(t))),1))}});var Tu=z(Fu,[["__scopeId","data-v-89b89152"]]);var Pu=q({__name:"App",setup(e){const t=A.useHeader,n=P(()=>At[ne.theme].variables),r=ke(ne,"showTPS"),i=ke(J,"errors"),s=P(()=>ue(ee(()=>y(j,null,[Ni.map(ct)]))));return(o,c)=>u(i).length>0?(p(),_("div",{key:0,class:"error-container",style:ge(u(n))},[y(dn,{errors:u(i)},null,8,["errors"])],4)):(p(),_(j,{key:1},[m("div",{id:"modal-root",style:ge(u(n))},null,4),m("div",{class:ae(["app",{useHeader:u(t)}]),style:ge(u(n))},[u(t)?(p(),L(En,{key:0})):$("",!0),y(al),u(u(r))?(p(),L(Tu,{key:1})):$("",!0),y(yu),y($u),(p(),L(ie(u(s))))],6)],64))}});var Eu=z(Pu,[["__scopeId","data-v-bf4e22ac"]]);se.on("setupVue",e=>e.use(Zn));function Ou(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:r,onRegistered:i,onRegisteredSW:s,onRegisterError:o}=e;let c,d,g,b;const v=async(k=!0)=>{await g,k&&(c==null||c.addEventListener("controlling",I=>{I.isUpdate&&window.location.reload()})),await(b==null?void 0:b())};async function N(){if("serviceWorker"in navigator){const{Workbox:k,messageSW:I}=await it(()=>import("./workbox-window.4a8794bb.js"),[]);b=async()=>{d&&d.waiting&&await I(d.waiting,{type:"SKIP_WAITING"})},c=new k("./sw.js",{scope:"./",type:"classic"}),c.addEventListener("activated",C=>{C.isUpdate||r==null||r()});{const C=()=>{n==null||n()};c.addEventListener("waiting",C),c.addEventListener("externalwaiting",C)}c.register({immediate:t}).then(C=>{d=C,s?s("./sw.js",C):i==null||i(C)}).catch(C=>{o==null||o(C)})}}return g=N(),v}function Vu(e={}){const{immediate:t=!0,onNeedRefresh:n,onOfflineReady:r,onRegistered:i,onRegisteredSW:s,onRegisterError:o}=e,c=F(!1),d=F(!1);return{updateServiceWorker:Ou({immediate:t,onNeedRefresh(){c.value=!0,n==null||n()},onOfflineReady(){d.value=!0,r==null||r()},onRegistered:i,onRegisteredSW:s,onRegisterError:o}),offlineReady:d,needRefresh:c}}const Kt=console.error;console.error=function(...e){Kt(...e)};window.onerror=function(e,t,n,r,i){return J.errors.push(i instanceof Error?i:new Error(JSON.stringify(i))),Kt(i),!0};window.onunhandledrejection=function(e){J.errors.push(e.reason instanceof Error?e.reason:new Error(JSON.stringify(e.reason))),Kt(e.reason)};document.title=A.title;window.projInfo=A;A.id===""&&console.error("Project ID is empty!","Please select a unique ID for this project in /src/data/projInfo.json");requestAnimationFrame(async()=>{console.log(`%cMade in Profectus%c +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 pi();const{globalBus:e}=await it(()=>Promise.resolve().then(function(){return hi}),void 0),{startGameLoop:t}=await it(()=>import("./gameLoop.08aa972d.js"),["assets/gameLoop.08aa972d.js","assets/@fontsource.f66d05e7.css","assets/vue.8b6e16f3.js","assets/lz-string.bfbf8ec3.js","assets/@vue.6f8187b0.js","assets/nanoevents.1080beb7.js","assets/vue-next-select.d60d437a.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.56f5e1e2.js","assets/sortablejs.8abbd596.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-toastification.c011d2f2.js","assets/vue-toastification.4b5f8ac8.css"]),n=window.vue=jn(Eu);n.config.errorHandler=function(r,i,s){console.error(r,s,i)},e.emit("setupVue",n),n.mount("#app"),Ue(()=>{const r=Kn(),{updateServiceWorker:i}=Vu({onNeedRefresh(){r.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(){i()}})},onOfflineReady(){r.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{l as D,it as _,J as a,A as b,ou as c,se as g,Bt as l,x as p,ne as s}; diff --git a/assets/sortablejs.20039f18.js b/assets/sortablejs.8abbd596.js similarity index 100% rename from assets/sortablejs.20039f18.js rename to assets/sortablejs.8abbd596.js diff --git a/assets/vue-next-select.68e0c605.js b/assets/vue-next-select.d60d437a.js similarity index 99% rename from assets/vue-next-select.68e0c605.js rename to assets/vue-next-select.d60d437a.js index 1af19e0..5477d60 100644 --- a/assets/vue-next-select.68e0c605.js +++ b/assets/vue-next-select.d60d437a.js @@ -1,3 +1,3 @@ -import"./vue.359c6955.js";import{aF as b,a1 as B,aL as x,a2 as y,bu as $,bv as I,O as P,aK as ye,ar as re,ab as De,aM as J,a0 as z,a9 as X,b7 as ge,$ as Ee,b9 as Le,bt as je,t as F,az as $e,aE as ze,am as he,G as K,J as Q,q as Ue,z as Z,b3 as S,_ as h,ag as Pe,b2 as j,as as _,aH as qe}from"./@vue.6f8187b0.js";function ie(e){return(ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function me(e){return function(t){if(Array.isArray(t))return ne(t)}(e)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||be(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +import"./vue.8b6e16f3.js";import{aF as b,a1 as B,aL as x,a2 as y,bu as $,bv as I,O as P,aK as ye,ar as re,ab as De,aM as J,a0 as z,a9 as X,b7 as ge,$ as Ee,b9 as Le,bt as je,t as F,az as $e,aE as ze,am as he,G as K,J as Q,q as Ue,z as Z,b3 as S,_ as h,ag as Pe,b2 as j,as as _,aH as qe}from"./@vue.6f8187b0.js";function ie(e){return(ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function me(e){return function(t){if(Array.isArray(t))return ne(t)}(e)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||be(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function be(e,t){if(e){if(typeof e=="string")return ne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ne(e,t):void 0}}function ne(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,l=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[l++]}},e:function(s){throw s},f:g}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var m,u=!0,v=!1;return{s:function(){n=n.call(e)},n:function(){var s=n.next();return u=s.done,s},e:function(s){v=!0,m=s},f:function(){try{u||n.return==null||n.return()}finally{if(v)throw m}}}}var ae={inheritAttrs:!1,name:"vue-input",props:{autocomplete:{required:!1,type:String},modelValue:{required:!0,type:String},placeholder:{required:!0,type:String},disabled:{required:!0,type:Boolean},tabindex:{required:!0,type:Number},autofocus:{required:!0,type:Boolean},comboboxUid:{required:!0,type:Number}},emits:["update:modelValue","input","change","focus","blur","escape"],setup:function(e,t){var n=F(null);return $e(function(){e.autofocus&&n.value.focus()}),ze(function(){e.autofocus&&n.value.focus()}),{handleInput:function(l){t.emit("input",l),t.emit("update:modelValue",l.target.value)},handleChange:function(l){t.emit("change",l),t.emit("update:modelValue",l.target.value)},handleFocus:function(l){t.emit("focus",l)},handleBlur:function(l){t.emit("blur",l)},input:n,handleEscape:function(l){n.value.blur(),t.emit("escape",l)}}}},He={class:"vue-input"},_e=["autocomplete","modelValue","placeholder","disabled","tabindex","autofocus","aria-controls","aria-labelledby"];ae.render=function(e,t,n,l,g,m){return b(),B("div",He,[x(e.$slots,"prepend"),y("input",{ref:"input",autocomplete:n.autocomplete,modelValue:n.modelValue,placeholder:n.placeholder,disabled:n.disabled,onInput:t[0]||(t[0]=function(){return l.handleInput&&l.handleInput.apply(l,arguments)}),onChange:t[1]||(t[1]=function(){return l.handleChange&&l.handleChange.apply(l,arguments)}),onFocus:t[2]||(t[2]=function(){return l.handleFocus&&l.handleFocus.apply(l,arguments)}),onBlur:t[3]||(t[3]=function(){return l.handleBlur&&l.handleBlur.apply(l,arguments)}),onKeyup:t[4]||(t[4]=$(I(function(){return l.handleEscape&&l.handleEscape.apply(l,arguments)},["exact"]),["esc"])),tabindex:n.tabindex,autofocus:n.autofocus,"aria-autocomplete":"list","aria-controls":"vs".concat(n.comboboxUid,"-listbox"),"aria-labelledby":"vs".concat(n.comboboxUid,"-combobox")},null,40,_e),x(e.$slots,"append")])},ae.__file="src/components/input.vue";var le={inheritAttrs:!1,name:"vue-tags",props:{modelValue:{required:!0,type:Array,validator:function(e){return e.every(function(t){return ie(t.key)!==void 0&&t.label!==void 0&&typeof t.selected=="boolean"})}},collapseTags:{type:Boolean}},emits:["click"],setup:function(e,t){return{dataAttrs:he("dataAttrs"),handleClick:function(n){t.emit("click",n)}}}};le.render=function(e,t,n,l,g,m){return b(),B("ul",re({class:["vue-tags",{collapsed:n.collapseTags}],onMousedown:t[0]||(t[0]=I(function(){},["prevent"])),tabindex:"-1",onClick:t[1]||(t[1]=function(){return l.handleClick&&l.handleClick.apply(l,arguments)})},l.dataAttrs),[(b(!0),B(P,null,ye(n.modelValue,function(u){return b(),B(P,{key:u.key},[u.group?z("v-if",!0):(b(),B("li",{key:0,class:K(["vue-tag",{selected:u.selected}])},[x(e.$slots,"default",{option:u},function(){return[y("span",null,Q(u.label),1)]})],2))],64)}),128))],16)},le.__file="src/components/tags.vue";var oe={inheritAttrs:!1,name:"vue-dropdown",props:{modelValue:{required:!0,type:Array,validator:function(e){return e.every(function(t){return ie(t.key)!==void 0&&t.label!==void 0&&typeof t.selected=="boolean"})}},comboboxUid:{required:!0,type:Number},maxHeight:{required:!0},highlightedOriginalIndex:{required:!0}},emits:["click-item","mouseenter"],setup:function(e,t){return{dataAttrs:he("dataAttrs"),handleClickItem:function(n,l){l.disabled||t.emit("click-item",n,l)},handleMouseenter:function(n,l){t.emit("mouseenter",n,l)}}}},Re=["id","aria-multiselectable","aria-busy","aria-disabled"],We=["onClick","onMouseenter","id","aria-selected","aria-disabled"];oe.render=function(e,t,n,l,g,m){return b(),B("ul",re({class:"vue-dropdown",style:{maxHeight:n.maxHeight+"px"},onMousedown:t[0]||(t[0]=I(function(){},["prevent"]))},l.dataAttrs,{role:"listbox",id:"vs".concat(n.comboboxUid,"-listbox"),"aria-multiselectable":l.dataAttrs["data-multiple"],"aria-busy":l.dataAttrs["data-loading"],"aria-disabled":l.dataAttrs["data-disabled"]}),[(b(!0),B(P,null,ye(n.modelValue,function(u,v){return b(),B(P,{key:u.key},[u.visible&&u.hidden===!1?(b(),B("li",{key:0,onClick:function(s){return l.handleClickItem(s,u)},class:K(["vue-dropdown-item",{selected:u.selected,disabled:u.disabled,highlighted:u.originalIndex===n.highlightedOriginalIndex,group:u.group}]),onMouseenter:function(s){return l.handleMouseenter(s,u)},role:"option",id:"vs".concat(n.comboboxUid,"-option-").concat(v),"aria-selected":!!u.selected||!!u.disabled&&void 0,"aria-disabled":u.disabled},[x(e.$slots,"default",{option:u},function(){return[y("span",null,Q(u.label),1)]})],42,We)):z("v-if",!0)],64)}),128))],16,Re)},oe.__file="src/components/dropdown.vue";var Be=function(e,t,n){var l=n.valueBy;return l(e)===l(t)},U=function(e,t,n){var l=n.valueBy;return e.some(function(g){return Be(g,t,{valueBy:l})})},N=function(e,t,n){var l=n.valueBy;return e.find(function(g){return l(g)===t})},ee=function(e,t,n){var l=n.max,g=n.valueBy;return U(e,t,{valueBy:g})||e.length>=l?e:e.concat(t)},te=function(e,t,n){var l=n.min,g=n.valueBy;return U(e,t,{valueBy:g})===!1||e.length<=l?e:e.filter(function(m){return Be(m,t,{valueBy:g})===!1})},G=function(e){return h(function(){return typeof e.value=="function"?e.value:typeof e.value=="string"?function(t){return e.value.split(".").reduce(function(n,l){return n[l]},t)}:function(t){return t}})},Ze=function(e,t){var n=h(function(){return e.value.reduce(function(u,v){return Object.assign(u,(s={},c=v.originalIndex,f=v,c in s?Object.defineProperty(s,c,{value:f,enumerable:!0,configurable:!0,writable:!0}):s[c]=f,s));var s,c,f},{})}),l=function(u){var v=n.value[u];return v!==void 0&&g(v)!==!1&&(t.value=u,!0)},g=function(u){return!u.disabled&&!u.hidden&&u.visible},m=h(function(){return e.value.some(function(u){return g(u)})});return S(function(){if(m.value===!1&&(t.value=null),t.value!==null&&e.value.length<=t.value){var u,v=D(e.value.reverse());try{for(v.s();!(u=v.n()).done;){var s=u.value;if(l(s.originalIndex))break}}catch(V){v.e(V)}finally{v.f()}}if(t.value===null||g(e.value[t.value])===!1){var c,f=D(e.value);try{for(f.s();!(c=f.n()).done;){var E=c.value;if(l(E.originalIndex))break}}catch(V){f.e(V)}finally{f.f()}}}),{pointerForward:function(){if(m.value!==!1&&t.value!==null)for(var u=t.value+1,v=0;u!==t.value&&v++u.value.$el.clientHeight+u.value.$el.scrollTop&&i++n.min,"data-total-length":n.options.length,"data-multiple":e.multiple,"data-loading":e.loading,"data-disabled":e.disabled}});qe("dataAttrs",ve);var L=h(function(){return w.value.filter(function(a){return a.selected}).filter(function(a){return!a.group})}),Ce=h(function(){return e.multiple?L.value.length===0?e.placeholder:L.value.length===1?"1 option selected":L.value.length+" options selected":L.value.length===0?e.placeholder:L.value[0].label+""}),Te=h(function(){var a=L.value.map(function(o){return o.originalOption});return e.multiple?a:a[0]||l.value}),fe=F();return j(function(){return[e.openDirection,c.value]},function(){var a,o;fe.value=(o=(a=e.openDirection)!==null&&a!==void 0?a:function(){if(m.value!==void 0&&window!==void 0)return window.innerHeight-m.value.getBoundingClientRect().bottom>=e.maxHeight?"bottom":"top"}())!==null&&o!==void 0?o:"bottom"},{immediate:!0}),{instance:g,isFocusing:c,wrapper:m,dropdown:u,input:v,focus:f,blur:E,toggle:function(){c.value?E():f()},searchingInputValue:V,handleInputForInput:function(a){t.emit("search:input",a)},handleChangeForInput:function(a){t.emit("search:change",a)},handleFocusForInput:function(a){f()},handleBlurForInput:function(a){E()},optionsWithInfo:w,addOrRemoveOption:function(a,o){e.disabled||(o.group&&e.multiple?we(a,o):Me(a,o),ke(),e.closeOnSelect===!0&&(c.value=!1),e.clearOnSelect===!0&&V.value&&pe())},dataAttrs:ve,innerPlaceholder:Ce,selected:Te,highlightedOriginalIndex:R,pointerForward:function(){Fe(),_(H)},pointerBackward:function(){Ve(),_(H)},pointerFirst:function(){var a,o=D(n.options.keys());try{for(o.s();!(a=o.n()).done;){var i=a.value;if(q(i))break}}catch(r){o.e(r)}finally{o.f()}_(H)},pointerLast:function(){var a,o=D(me(n.options.keys()).reverse());try{for(o.s();!(a=o.n()).done;){var i=a.value;if(q(i))break}}catch(r){o.e(r)}finally{o.f()}_(H)},typeAhead:function(a){var o,i;if(!e.searchable){var r=!1;if(Se.test(a.key)?(W+=a.key.toLowerCase(),r=!0):a.code==="Space"&&(W+=" "),r){var M,p=D(Ae.value);try{for(p.s();!(M=p.n()).done;){var k=M.value;if(((i=(o=n.labelBy(n.options[k]))===null||o===void 0?void 0:o.toLowerCase())===null||i===void 0?void 0:i.startsWith(W))===!0&&q(k))break}}catch(C){p.e(C)}finally{p.f()}clearTimeout(se),se=setTimeout(function(){W=""},500)}}},pointerSet:q,direction:fe}},components:{VInput:ae,VTags:le,VDropdown:oe}});ue.__VERSION__="2.10.5";var Ge=["tabindex","id","role","aria-expanded","aria-owns","aria-activedescendant","aria-busy","aria-disabled"],Ke={class:"vue-select-header"},Qe={key:0,class:"vue-input"},Ye=["placeholder","autocomplete"],Je=["onClick"],Xe=y("span",{class:"icon loading"},[y("div"),y("div"),y("div")],-1),et={key:0,class:"vue-select-input-wrapper"},tt=y("span",{class:"icon loading"},[y("div"),y("div"),y("div")],-1);ue.render=function(e,t,n,l,g,m){var u=J("v-tags"),v=J("v-input"),s=J("v-dropdown");return b(),B("div",re({ref:"wrapper",class:["vue-select",["direction-".concat(e.direction)]],tabindex:e.isFocusing?-1:e.tabindex,onFocus:t[9]||(t[9]=function(){return e.focus&&e.focus.apply(e,arguments)}),onBlur:t[10]||(t[10]=function(c){return!e.searchable&&e.blur(c)})},Object.assign({},e.dataAttrs,e.$attrs),{onKeypress:t[11]||(t[11]=$(I(function(){return e.highlightedOriginalIndex!==null&&e.addOrRemoveOption(e.$event,e.optionsWithInfo[e.highlightedOriginalIndex])},["prevent","exact"]),["enter"])),onKeydown:[t[12]||(t[12]=$(I(function(){return e.pointerForward&&e.pointerForward.apply(e,arguments)},["prevent","exact"]),["down"])),t[13]||(t[13]=$(I(function(){return e.pointerBackward&&e.pointerBackward.apply(e,arguments)},["prevent","exact"]),["up"])),t[14]||(t[14]=$(I(function(){return e.pointerFirst&&e.pointerFirst.apply(e,arguments)},["prevent","exact"]),["home"])),t[15]||(t[15]=$(I(function(){return e.pointerLast&&e.pointerLast.apply(e,arguments)},["prevent","exact"]),["end"])),t[16]||(t[16]=function(){return e.typeAhead&&e.typeAhead.apply(e,arguments)})],id:"vs".concat(e.instance.uid,"-combobox"),role:e.searchable?"combobox":null,"aria-expanded":e.isFocusing,"aria-haspopup":"listbox","aria-owns":"vs".concat(e.instance.uid,"-listbox"),"aria-activedescendant":e.highlightedOriginalIndex===null?null:"vs".concat(e.instance.uid,"-option-").concat(e.highlightedOriginalIndex),"aria-busy":e.loading,"aria-disabled":e.disabled}),[y("div",Ke,[e.multiple&&e.taggable&&e.modelValue.length===0||e.searchable===!1&&e.taggable===!1?(b(),B("div",Qe,[x(e.$slots,"label",{selected:e.selected},function(){return[y("input",{placeholder:e.innerPlaceholder,autocomplete:e.autocomplete,readonly:"",onClick:t[0]||(t[0]=function(){return e.focus&&e.focus.apply(e,arguments)})},null,8,Ye)]})])):z("v-if",!0),e.multiple&&e.taggable?(b(),B(P,{key:1},[X(u,{modelValue:e.optionsWithInfo,"collapse-tags":e.collapseTags,tabindex:"-1",onClick:e.focus},{default:ge(function(c){var f=c.option;return[x(e.$slots,"tag",{option:f.originalOption,remove:function(){return e.addOrRemoveOption(e.$event,f)}},function(){return[y("span",null,Q(f.label),1),y("img",{src:"data:image/svg+xml;base64,PHN2ZyBpZD0iZGVsZXRlIiBkYXRhLW5hbWU9ImRlbGV0ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiI+PHRpdGxlPmRlbGV0ZTwvdGl0bGU+PHBhdGggZD0iTTI1NiwyNEMzODMuOSwyNCw0ODgsMTI4LjEsNDg4LDI1NlMzODMuOSw0ODgsMjU2LDQ4OCwyNC4wNiwzODMuOSwyNC4wNiwyNTYsMTI4LjEsMjQsMjU2LDI0Wk0wLDI1NkMwLDM5Ny4xNiwxMTQuODQsNTEyLDI1Niw1MTJTNTEyLDM5Ny4xNiw1MTIsMjU2LDM5Ny4xNiwwLDI1NiwwLDAsMTE0Ljg0LDAsMjU2WiIgZmlsbD0iIzViNWI1ZiIvPjxwb2x5Z29uIHBvaW50cz0iMzgyIDE3Mi43MiAzMzkuMjkgMTMwLjAxIDI1NiAyMTMuMjkgMTcyLjcyIDEzMC4wMSAxMzAuMDEgMTcyLjcyIDIxMy4yOSAyNTYgMTMwLjAxIDMzOS4yOCAxNzIuNzIgMzgyIDI1NiAyOTguNzEgMzM5LjI5IDM4MS45OSAzODIgMzM5LjI4IDI5OC43MSAyNTYgMzgyIDE3Mi43MiIgZmlsbD0iIzViNWI1ZiIvPjwvc3ZnPg==",alt:"delete tag",class:"icon delete",onClick:I(function(){return e.addOrRemoveOption(e.$event,f)},["prevent","stop"])},null,8,Je)]})]}),_:3},8,["modelValue","collapse-tags","onClick"]),x(e.$slots,"toggle",{isFocusing:e.isFocusing,toggle:e.toggle},function(){return[y("span",{class:K(["icon arrow-downward",{active:e.isFocusing}]),onClick:t[1]||(t[1]=function(){return e.toggle&&e.toggle.apply(e,arguments)}),onMousedown:t[2]||(t[2]=I(function(){},["prevent","stop"]))},null,34)]})],64)):(b(),B(P,{key:2},[e.searchable?(b(),Ee(v,{key:0,ref:"input",modelValue:e.searchingInputValue,"onUpdate:modelValue":t[3]||(t[3]=function(c){return e.searchingInputValue=c}),disabled:e.disabled,autocomplete:e.autocomplete,placeholder:e.isFocusing?e.searchPlaceholder:e.innerPlaceholder,onInput:e.handleInputForInput,onChange:e.handleChangeForInput,onFocus:e.handleFocusForInput,onBlur:e.handleBlurForInput,onEscape:e.blur,autofocus:e.autofocus||e.taggable&&e.searchable,tabindex:e.tabindex,comboboxUid:e.instance.uid},null,8,["modelValue","disabled","autocomplete","placeholder","onInput","onChange","onFocus","onBlur","onEscape","autofocus","tabindex","comboboxUid"])):z("v-if",!0),e.loading?x(e.$slots,"loading",{key:1},function(){return[Xe]}):x(e.$slots,"toggle",{key:2,isFocusing:e.isFocusing,toggle:e.toggle},function(){return[y("span",{class:K(["icon arrow-downward",{active:e.isFocusing}]),onClick:t[4]||(t[4]=function(){return e.toggle&&e.toggle.apply(e,arguments)}),onMousedown:t[5]||(t[5]=I(function(){},["prevent","stop"]))},null,34)]})],64))]),e.multiple&&e.taggable&&e.searchable?(b(),B("div",et,[Le(X(v,{ref:"input",modelValue:e.searchingInputValue,"onUpdate:modelValue":t[6]||(t[6]=function(c){return e.searchingInputValue=c}),disabled:e.disabled,autocomplete:e.autocomplete,placeholder:e.isFocusing?e.searchPlaceholder:e.innerPlaceholder,onInput:e.handleInputForInput,onChange:e.handleChangeForInput,onFocus:e.handleFocusForInput,onBlur:e.handleBlurForInput,onEscape:e.blur,autofocus:e.autofocus||e.taggable&&e.searchable,tabindex:e.tabindex,comboboxUid:e.instance.uid},null,8,["modelValue","disabled","autocomplete","placeholder","onInput","onChange","onFocus","onBlur","onEscape","autofocus","tabindex","comboboxUid"]),[[je,e.isFocusing]]),e.loading?x(e.$slots,"loading",{key:0},function(){return[tt]}):z("v-if",!0)])):z("v-if",!0),X(s,{ref:"dropdown",modelValue:e.optionsWithInfo,"onUpdate:modelValue":t[7]||(t[7]=function(c){return e.optionsWithInfo=c}),onClickItem:e.addOrRemoveOption,onMouseenter:t[8]||(t[8]=function(c,f){return e.pointerSet(f.originalIndex)}),comboboxUid:e.instance.uid,maxHeight:e.maxHeight,highlightedOriginalIndex:e.highlightedOriginalIndex},{default:ge(function(c){var f=c.option;return[x(e.$slots,"dropdown-item",{option:f.originalOption},function(){return[y("span",null,Q(f.label),1)]})]}),_:3},8,["modelValue","onClickItem","comboboxUid","maxHeight","highlightedOriginalIndex"])],16,Ge)},ue.__file="src/index.vue";export{ue as Y}; diff --git a/assets/vue-toastification.45d39007.js b/assets/vue-toastification.c011d2f2.js similarity index 99% rename from assets/vue-toastification.45d39007.js rename to assets/vue-toastification.c011d2f2.js index 81db67a..ff01934 100644 --- a/assets/vue-toastification.45d39007.js +++ b/assets/vue-toastification.c011d2f2.js @@ -1 +1 @@ -import"./vue.359c6955.js";import{ab as C,y as mt,C as pt,aF as o,a1 as u,I as X,G as b,$ as p,b7 as I,ar as V,aO as M,a8 as $,J as x,aM as y,a0 as R,a2 as _,O as N,aW as vt,bv as gt,aL as Tt,bd as Ct,aK as H,a9 as yt,ag as bt,am as Ot,as as _t,bf as St}from"./@vue.6f8187b0.js";var Et=Object.defineProperty,k=Object.getOwnPropertySymbols,Bt=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,U=(t,e,s)=>e in t?Et(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,q=(t,e)=>{for(var s in e||(e={}))Bt.call(e,s)&&U(t,s,e[s]);if(k)for(var s of k(e))It.call(e,s)&&U(t,s,e[s]);return t},D=t=>typeof t=="function",w=t=>typeof t=="string",J=t=>w(t)&&t.trim().length>0,Dt=t=>typeof t=="number",T=t=>typeof t=="undefined",O=t=>typeof t=="object"&&t!==null,wt=t=>h(t,"tag")&&J(t.tag),K=t=>window.TouchEvent&&t instanceof TouchEvent,Q=t=>h(t,"component")&&Y(t.component),Rt=t=>D(t)||O(t),Y=t=>!T(t)&&(w(t)||Rt(t)||Q(t)),z=t=>O(t)&&["height","width","right","left","top","bottom"].every(e=>Dt(t[e])),h=(t,e)=>(O(t)||D(t))&&e in t,Pt=(t=>()=>t++)(0);function P(t){return K(t)?t.targetTouches[0].clientX:t.clientX}function j(t){return K(t)?t.targetTouches[0].clientY:t.clientY}var Nt=t=>{T(t.remove)?t.parentNode&&t.parentNode.removeChild(t):t.remove()},S=t=>Q(t)?S(t.component):wt(t)?C({render(){return t}}):typeof t=="string"?t:mt(pt(t)),At=t=>{if(typeof t=="string")return t;const e=h(t,"props")&&O(t.props)?t.props:{},s=h(t,"listeners")&&O(t.listeners)?t.listeners:{};return{component:S(t),props:e,listeners:s}},Lt=()=>typeof window!="undefined",F=class{constructor(){this.allHandlers={}}getHandlers(t){return this.allHandlers[t]||[]}on(t,e){const s=this.getHandlers(t);s.push(e),this.allHandlers[t]=s}off(t,e){const s=this.getHandlers(t);s.splice(s.indexOf(e)>>>0,1)}emit(t,e){this.getHandlers(t).forEach(n=>n(e))}},Vt=t=>["on","off","emit"].every(e=>h(t,e)&&D(t[e])),i;(function(t){t.SUCCESS="success",t.ERROR="error",t.WARNING="warning",t.INFO="info",t.DEFAULT="default"})(i||(i={}));var B;(function(t){t.TOP_LEFT="top-left",t.TOP_CENTER="top-center",t.TOP_RIGHT="top-right",t.BOTTOM_LEFT="bottom-left",t.BOTTOM_CENTER="bottom-center",t.BOTTOM_RIGHT="bottom-right"})(B||(B={}));var l;(function(t){t.ADD="add",t.DISMISS="dismiss",t.UPDATE="update",t.CLEAR="clear",t.UPDATE_DEFAULTS="update_defaults"})(l||(l={}));var d="Vue-Toastification",c={type:{type:String,default:i.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},Z={type:c.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},E={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:c.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},A={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},tt={transition:{type:[Object,String],default:`${d}__bounce`}},Mt={position:{type:String,default:B.TOP_RIGHT},draggable:c.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:c.trueBoolean,pauseOnHover:c.trueBoolean,closeOnClick:c.trueBoolean,timeout:A.timeout,hideProgressBar:A.hideProgressBar,toastClassName:c.classNames,bodyClassName:c.classNames,icon:Z.customIcon,closeButton:E.component,closeButtonClassName:E.classNames,showCloseButtonOnHover:E.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new F}},$t={id:{type:[String,Number],required:!0,default:0},type:c.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},Ft={container:{type:[Object,Function],default:()=>document.body},newestOnTop:c.trueBoolean,maxToasts:{type:Number,default:20},transition:tt.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:t=>t},filterToasts:{type:Function,default:t=>t},containerClassName:c.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},f={CORE_TOAST:Mt,TOAST:$t,CONTAINER:Ft,PROGRESS_BAR:A,ICON:Z,TRANSITION:tt,CLOSE_BUTTON:E},et=C({name:"VtProgressBar",props:f.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${d}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function Ht(t,e){return o(),u("div",{style:X(t.style),class:b(t.cpClass)},null,6)}et.render=Ht;var kt=et,st=C({name:"VtCloseButton",props:f.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?S(this.component):"button"},classes(){const t=[`${d}__close-button`];return this.showOnHover&&t.push("show-on-hover"),t.concat(this.classNames)}}}),Ut=$(" \xD7 ");function zt(t,e){return o(),p(M(t.buttonComponent),V({"aria-label":t.ariaLabel,class:t.classes},t.$attrs),{default:I(()=>[Ut]),_:1},16,["aria-label","class"])}st.render=zt;var jt=st,at={},Gt={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Wt=_("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1),Xt=[Wt];function xt(t,e){return o(),u("svg",Gt,Xt)}at.render=xt;var qt=at,nt={},Jt={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Kt=_("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1),Qt=[Kt];function Yt(t,e){return o(),u("svg",Jt,Qt)}nt.render=Yt;var G=nt,ot={},Zt={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},te=_("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),ee=[te];function se(t,e){return o(),u("svg",Zt,ee)}ot.render=se;var ae=ot,rt={},ne={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},oe=_("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),re=[oe];function ie(t,e){return o(),u("svg",ne,re)}rt.render=ie;var le=rt,it=C({name:"VtIcon",props:f.ICON,computed:{customIconChildren(){return h(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return w(this.customIcon)?this.trimValue(this.customIcon):h(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return h(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:Y(this.customIcon)?S(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[i.DEFAULT]:G,[i.INFO]:G,[i.SUCCESS]:qt,[i.ERROR]:le,[i.WARNING]:ae}[this.type]},iconClasses(){const t=[`${d}__icon`];return this.hasCustomIcon?t.concat(this.customIconClass):t}},methods:{trimValue(t,e=""){return J(t)?t.trim():e}}});function ce(t,e){return o(),p(M(t.component),{class:b(t.iconClasses)},{default:I(()=>[$(x(t.customIconChildren),1)]),_:1},8,["class"])}it.render=ce;var ue=it,lt=C({name:"VtToast",components:{ProgressBar:kt,CloseButton:jt,Icon:ue},inheritAttrs:!1,props:Object.assign({},f.CORE_TOAST,f.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const t=[`${d}__toast`,`${d}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&t.push("disable-transition"),this.rtl&&t.push(`${d}__toast--rtl`),t},bodyClasses(){return[`${d}__toast-${w(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return z(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:h,getVueComponentFromObj:S,closeToast(){this.eventBus.emit(l.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const t=this.$el;t.addEventListener("touchstart",this.onDragStart,{passive:!0}),t.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const t=this.$el;t.removeEventListener("touchstart",this.onDragStart),t.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(t){this.beingDragged=!0,this.dragPos={x:P(t),y:j(t)},this.dragStart=P(t),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(t){this.beingDragged&&(t.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:P(t),y:j(t)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,z(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),de=["role"];function he(t,e){const s=y("Icon"),n=y("CloseButton"),v=y("ProgressBar");return o(),u("div",{class:b(t.classes),style:X(t.draggableStyle),onClick:e[0]||(e[0]=(...a)=>t.clickHandler&&t.clickHandler(...a)),onMouseenter:e[1]||(e[1]=(...a)=>t.hoverPause&&t.hoverPause(...a)),onMouseleave:e[2]||(e[2]=(...a)=>t.hoverPlay&&t.hoverPlay(...a))},[t.icon?(o(),p(s,{key:0,"custom-icon":t.icon,type:t.type},null,8,["custom-icon","type"])):R("v-if",!0),_("div",{role:t.accessibility.toastRole||"alert",class:b(t.bodyClasses)},[typeof t.content=="string"?(o(),u(N,{key:0},[$(x(t.content),1)],2112)):(o(),p(M(t.getVueComponentFromObj(t.content)),V({key:1,"toast-id":t.id},t.hasProp(t.content,"props")?t.content.props:{},vt(t.hasProp(t.content,"listeners")?t.content.listeners:{}),{onCloseToast:t.closeToast}),null,16,["toast-id","onCloseToast"]))],10,de),t.closeButton?(o(),p(n,{key:1,component:t.closeButton,"class-names":t.closeButtonClassName,"show-on-hover":t.showCloseButtonOnHover,"aria-label":t.accessibility.closeButtonLabel,onClick:gt(t.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):R("v-if",!0),t.timeout?(o(),p(v,{key:2,"is-running":t.isRunning,"hide-progress-bar":t.hideProgressBar,timeout:t.timeout,onCloseToast:t.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):R("v-if",!0)],38)}lt.render=he;var fe=lt,ct=C({name:"VtTransition",props:f.TRANSITION,emits:["leave"],methods:{hasProp:h,leave(t){t instanceof HTMLElement&&(t.style.left=t.offsetLeft+"px",t.style.top=t.offsetTop+"px",t.style.width=getComputedStyle(t).width,t.style.position="absolute")}}});function me(t,e){return o(),p(Ct,{tag:"div","enter-active-class":t.transition.enter?t.transition.enter:`${t.transition}-enter-active`,"move-class":t.transition.move?t.transition.move:`${t.transition}-move`,"leave-active-class":t.transition.leave?t.transition.leave:`${t.transition}-leave-active`,onLeave:t.leave},{default:I(()=>[Tt(t.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}ct.render=me;var pe=ct,ut=C({name:"VueToastification",devtools:{hide:!0},components:{Toast:fe,VtTransition:pe},props:Object.assign({},f.CORE_TOAST,f.CONTAINER,f.TRANSITION),data(){return{count:0,positions:Object.values(B),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const t=this.eventBus;t.on(l.ADD,this.addToast),t.on(l.CLEAR,this.clearToasts),t.on(l.DISMISS,this.dismissToast),t.on(l.UPDATE,this.updateToast),t.on(l.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(t){D(t)&&(t=await t()),Nt(this.$el),t.appendChild(this.$el)},setToast(t){T(t.id)||(this.toasts[t.id]=t)},addToast(t){t.content=At(t.content);const e=Object.assign({},this.defaults,t.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[t.type],t),s=this.defaults.filterBeforeCreate(e,this.toastArray);s&&this.setToast(s)},dismissToast(t){const e=this.toasts[t];!T(e)&&!T(e.onClose)&&e.onClose(),delete this.toasts[t]},clearToasts(){Object.keys(this.toasts).forEach(t=>{this.dismissToast(t)})},getPositionToasts(t){const e=this.filteredToasts.filter(s=>s.position===t).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?e.reverse():e},updateDefaults(t){T(t.container)||this.setup(t.container),this.defaults=Object.assign({},this.defaults,t)},updateToast({id:t,options:e,create:s}){this.toasts[t]?(e.timeout&&e.timeout===this.toasts[t].timeout&&e.timeout++,this.setToast(Object.assign({},this.toasts[t],e))):s&&this.addToast(Object.assign({},{id:t},e))},getClasses(t){return[`${d}__container`,t].concat(this.defaults.containerClassName)}}});function ve(t,e){const s=y("Toast"),n=y("VtTransition");return o(),u("div",null,[(o(!0),u(N,null,H(t.positions,v=>(o(),u("div",{key:v},[yt(n,{transition:t.defaults.transition,class:b(t.getClasses(v))},{default:I(()=>[(o(!0),u(N,null,H(t.getPositionToasts(v),a=>(o(),p(s,V({key:a.id},a),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}ut.render=ve;var ge=ut,W=(t={},e=!0)=>{const s=t.eventBus=t.eventBus||new F;e&&_t(()=>{const a=St(ge,q({},t)),r=a.mount(document.createElement("div")),g=t.onMounted;if(T(g)||g(r,a),t.shareAppContext){const m=t.shareAppContext;m===!0?console.warn(`[${d}] App to share context with was not provided.`):(a._context.components=m._context.components,a._context.directives=m._context.directives,a._context.mixins=m._context.mixins,a._context.provides=m._context.provides,a.config.globalProperties=m.config.globalProperties)}});const n=(a,r)=>{const g=Object.assign({},{id:Pt(),type:i.DEFAULT},r,{content:a});return s.emit(l.ADD,g),g.id};n.clear=()=>s.emit(l.CLEAR,void 0),n.updateDefaults=a=>{s.emit(l.UPDATE_DEFAULTS,a)},n.dismiss=a=>{s.emit(l.DISMISS,a)};function v(a,{content:r,options:g},m=!1){const ft=Object.assign({},g,{content:r});s.emit(l.UPDATE,{id:a,options:ft,create:m})}return n.update=v,n.success=(a,r)=>n(a,Object.assign({},r,{type:i.SUCCESS})),n.info=(a,r)=>n(a,Object.assign({},r,{type:i.INFO})),n.error=(a,r)=>n(a,Object.assign({},r,{type:i.ERROR})),n.warning=(a,r)=>n(a,Object.assign({},r,{type:i.WARNING})),n},Te=()=>{const t=()=>console.warn(`[${d}] This plugin does not support SSR!`);return new Proxy(t,{get(){return t}})};function L(t){return Lt()?Vt(t)?W({eventBus:t},!1):W(t,!0):Te()}var dt=Symbol("VueToastification"),ht=new F,Ce=(t,e)=>{(e==null?void 0:e.shareAppContext)===!0&&(e.shareAppContext=t);const s=L(q({eventBus:ht},e));t.provide(dt,s)},Oe=t=>{if(t)return L(t);const e=bt()?Ot(dt,void 0):void 0;return e||L(ht)},_e=Ce;export{_e as s,Oe as u}; +import"./vue.8b6e16f3.js";import{ab as C,y as mt,C as pt,aF as o,a1 as u,I as X,G as b,$ as p,b7 as I,ar as V,aO as M,a8 as $,J as x,aM as y,a0 as R,a2 as _,O as N,aW as vt,bv as gt,aL as Tt,bd as Ct,aK as H,a9 as yt,ag as bt,am as Ot,as as _t,bf as St}from"./@vue.6f8187b0.js";var Et=Object.defineProperty,k=Object.getOwnPropertySymbols,Bt=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,U=(t,e,s)=>e in t?Et(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,q=(t,e)=>{for(var s in e||(e={}))Bt.call(e,s)&&U(t,s,e[s]);if(k)for(var s of k(e))It.call(e,s)&&U(t,s,e[s]);return t},D=t=>typeof t=="function",w=t=>typeof t=="string",J=t=>w(t)&&t.trim().length>0,Dt=t=>typeof t=="number",T=t=>typeof t=="undefined",O=t=>typeof t=="object"&&t!==null,wt=t=>h(t,"tag")&&J(t.tag),K=t=>window.TouchEvent&&t instanceof TouchEvent,Q=t=>h(t,"component")&&Y(t.component),Rt=t=>D(t)||O(t),Y=t=>!T(t)&&(w(t)||Rt(t)||Q(t)),z=t=>O(t)&&["height","width","right","left","top","bottom"].every(e=>Dt(t[e])),h=(t,e)=>(O(t)||D(t))&&e in t,Pt=(t=>()=>t++)(0);function P(t){return K(t)?t.targetTouches[0].clientX:t.clientX}function j(t){return K(t)?t.targetTouches[0].clientY:t.clientY}var Nt=t=>{T(t.remove)?t.parentNode&&t.parentNode.removeChild(t):t.remove()},S=t=>Q(t)?S(t.component):wt(t)?C({render(){return t}}):typeof t=="string"?t:mt(pt(t)),At=t=>{if(typeof t=="string")return t;const e=h(t,"props")&&O(t.props)?t.props:{},s=h(t,"listeners")&&O(t.listeners)?t.listeners:{};return{component:S(t),props:e,listeners:s}},Lt=()=>typeof window!="undefined",F=class{constructor(){this.allHandlers={}}getHandlers(t){return this.allHandlers[t]||[]}on(t,e){const s=this.getHandlers(t);s.push(e),this.allHandlers[t]=s}off(t,e){const s=this.getHandlers(t);s.splice(s.indexOf(e)>>>0,1)}emit(t,e){this.getHandlers(t).forEach(n=>n(e))}},Vt=t=>["on","off","emit"].every(e=>h(t,e)&&D(t[e])),i;(function(t){t.SUCCESS="success",t.ERROR="error",t.WARNING="warning",t.INFO="info",t.DEFAULT="default"})(i||(i={}));var B;(function(t){t.TOP_LEFT="top-left",t.TOP_CENTER="top-center",t.TOP_RIGHT="top-right",t.BOTTOM_LEFT="bottom-left",t.BOTTOM_CENTER="bottom-center",t.BOTTOM_RIGHT="bottom-right"})(B||(B={}));var l;(function(t){t.ADD="add",t.DISMISS="dismiss",t.UPDATE="update",t.CLEAR="clear",t.UPDATE_DEFAULTS="update_defaults"})(l||(l={}));var d="Vue-Toastification",c={type:{type:String,default:i.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},Z={type:c.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},E={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:c.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},A={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},tt={transition:{type:[Object,String],default:`${d}__bounce`}},Mt={position:{type:String,default:B.TOP_RIGHT},draggable:c.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:c.trueBoolean,pauseOnHover:c.trueBoolean,closeOnClick:c.trueBoolean,timeout:A.timeout,hideProgressBar:A.hideProgressBar,toastClassName:c.classNames,bodyClassName:c.classNames,icon:Z.customIcon,closeButton:E.component,closeButtonClassName:E.classNames,showCloseButtonOnHover:E.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new F}},$t={id:{type:[String,Number],required:!0,default:0},type:c.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},Ft={container:{type:[Object,Function],default:()=>document.body},newestOnTop:c.trueBoolean,maxToasts:{type:Number,default:20},transition:tt.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:t=>t},filterToasts:{type:Function,default:t=>t},containerClassName:c.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},f={CORE_TOAST:Mt,TOAST:$t,CONTAINER:Ft,PROGRESS_BAR:A,ICON:Z,TRANSITION:tt,CLOSE_BUTTON:E},et=C({name:"VtProgressBar",props:f.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${d}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function Ht(t,e){return o(),u("div",{style:X(t.style),class:b(t.cpClass)},null,6)}et.render=Ht;var kt=et,st=C({name:"VtCloseButton",props:f.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?S(this.component):"button"},classes(){const t=[`${d}__close-button`];return this.showOnHover&&t.push("show-on-hover"),t.concat(this.classNames)}}}),Ut=$(" \xD7 ");function zt(t,e){return o(),p(M(t.buttonComponent),V({"aria-label":t.ariaLabel,class:t.classes},t.$attrs),{default:I(()=>[Ut]),_:1},16,["aria-label","class"])}st.render=zt;var jt=st,at={},Gt={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Wt=_("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1),Xt=[Wt];function xt(t,e){return o(),u("svg",Gt,Xt)}at.render=xt;var qt=at,nt={},Jt={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Kt=_("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1),Qt=[Kt];function Yt(t,e){return o(),u("svg",Jt,Qt)}nt.render=Yt;var G=nt,ot={},Zt={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},te=_("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),ee=[te];function se(t,e){return o(),u("svg",Zt,ee)}ot.render=se;var ae=ot,rt={},ne={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},oe=_("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),re=[oe];function ie(t,e){return o(),u("svg",ne,re)}rt.render=ie;var le=rt,it=C({name:"VtIcon",props:f.ICON,computed:{customIconChildren(){return h(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return w(this.customIcon)?this.trimValue(this.customIcon):h(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return h(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:Y(this.customIcon)?S(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[i.DEFAULT]:G,[i.INFO]:G,[i.SUCCESS]:qt,[i.ERROR]:le,[i.WARNING]:ae}[this.type]},iconClasses(){const t=[`${d}__icon`];return this.hasCustomIcon?t.concat(this.customIconClass):t}},methods:{trimValue(t,e=""){return J(t)?t.trim():e}}});function ce(t,e){return o(),p(M(t.component),{class:b(t.iconClasses)},{default:I(()=>[$(x(t.customIconChildren),1)]),_:1},8,["class"])}it.render=ce;var ue=it,lt=C({name:"VtToast",components:{ProgressBar:kt,CloseButton:jt,Icon:ue},inheritAttrs:!1,props:Object.assign({},f.CORE_TOAST,f.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const t=[`${d}__toast`,`${d}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&t.push("disable-transition"),this.rtl&&t.push(`${d}__toast--rtl`),t},bodyClasses(){return[`${d}__toast-${w(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return z(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:h,getVueComponentFromObj:S,closeToast(){this.eventBus.emit(l.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const t=this.$el;t.addEventListener("touchstart",this.onDragStart,{passive:!0}),t.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const t=this.$el;t.removeEventListener("touchstart",this.onDragStart),t.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(t){this.beingDragged=!0,this.dragPos={x:P(t),y:j(t)},this.dragStart=P(t),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(t){this.beingDragged&&(t.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:P(t),y:j(t)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,z(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),de=["role"];function he(t,e){const s=y("Icon"),n=y("CloseButton"),v=y("ProgressBar");return o(),u("div",{class:b(t.classes),style:X(t.draggableStyle),onClick:e[0]||(e[0]=(...a)=>t.clickHandler&&t.clickHandler(...a)),onMouseenter:e[1]||(e[1]=(...a)=>t.hoverPause&&t.hoverPause(...a)),onMouseleave:e[2]||(e[2]=(...a)=>t.hoverPlay&&t.hoverPlay(...a))},[t.icon?(o(),p(s,{key:0,"custom-icon":t.icon,type:t.type},null,8,["custom-icon","type"])):R("v-if",!0),_("div",{role:t.accessibility.toastRole||"alert",class:b(t.bodyClasses)},[typeof t.content=="string"?(o(),u(N,{key:0},[$(x(t.content),1)],2112)):(o(),p(M(t.getVueComponentFromObj(t.content)),V({key:1,"toast-id":t.id},t.hasProp(t.content,"props")?t.content.props:{},vt(t.hasProp(t.content,"listeners")?t.content.listeners:{}),{onCloseToast:t.closeToast}),null,16,["toast-id","onCloseToast"]))],10,de),t.closeButton?(o(),p(n,{key:1,component:t.closeButton,"class-names":t.closeButtonClassName,"show-on-hover":t.showCloseButtonOnHover,"aria-label":t.accessibility.closeButtonLabel,onClick:gt(t.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):R("v-if",!0),t.timeout?(o(),p(v,{key:2,"is-running":t.isRunning,"hide-progress-bar":t.hideProgressBar,timeout:t.timeout,onCloseToast:t.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):R("v-if",!0)],38)}lt.render=he;var fe=lt,ct=C({name:"VtTransition",props:f.TRANSITION,emits:["leave"],methods:{hasProp:h,leave(t){t instanceof HTMLElement&&(t.style.left=t.offsetLeft+"px",t.style.top=t.offsetTop+"px",t.style.width=getComputedStyle(t).width,t.style.position="absolute")}}});function me(t,e){return o(),p(Ct,{tag:"div","enter-active-class":t.transition.enter?t.transition.enter:`${t.transition}-enter-active`,"move-class":t.transition.move?t.transition.move:`${t.transition}-move`,"leave-active-class":t.transition.leave?t.transition.leave:`${t.transition}-leave-active`,onLeave:t.leave},{default:I(()=>[Tt(t.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}ct.render=me;var pe=ct,ut=C({name:"VueToastification",devtools:{hide:!0},components:{Toast:fe,VtTransition:pe},props:Object.assign({},f.CORE_TOAST,f.CONTAINER,f.TRANSITION),data(){return{count:0,positions:Object.values(B),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const t=this.eventBus;t.on(l.ADD,this.addToast),t.on(l.CLEAR,this.clearToasts),t.on(l.DISMISS,this.dismissToast),t.on(l.UPDATE,this.updateToast),t.on(l.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(t){D(t)&&(t=await t()),Nt(this.$el),t.appendChild(this.$el)},setToast(t){T(t.id)||(this.toasts[t.id]=t)},addToast(t){t.content=At(t.content);const e=Object.assign({},this.defaults,t.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[t.type],t),s=this.defaults.filterBeforeCreate(e,this.toastArray);s&&this.setToast(s)},dismissToast(t){const e=this.toasts[t];!T(e)&&!T(e.onClose)&&e.onClose(),delete this.toasts[t]},clearToasts(){Object.keys(this.toasts).forEach(t=>{this.dismissToast(t)})},getPositionToasts(t){const e=this.filteredToasts.filter(s=>s.position===t).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?e.reverse():e},updateDefaults(t){T(t.container)||this.setup(t.container),this.defaults=Object.assign({},this.defaults,t)},updateToast({id:t,options:e,create:s}){this.toasts[t]?(e.timeout&&e.timeout===this.toasts[t].timeout&&e.timeout++,this.setToast(Object.assign({},this.toasts[t],e))):s&&this.addToast(Object.assign({},{id:t},e))},getClasses(t){return[`${d}__container`,t].concat(this.defaults.containerClassName)}}});function ve(t,e){const s=y("Toast"),n=y("VtTransition");return o(),u("div",null,[(o(!0),u(N,null,H(t.positions,v=>(o(),u("div",{key:v},[yt(n,{transition:t.defaults.transition,class:b(t.getClasses(v))},{default:I(()=>[(o(!0),u(N,null,H(t.getPositionToasts(v),a=>(o(),p(s,V({key:a.id},a),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}ut.render=ve;var ge=ut,W=(t={},e=!0)=>{const s=t.eventBus=t.eventBus||new F;e&&_t(()=>{const a=St(ge,q({},t)),r=a.mount(document.createElement("div")),g=t.onMounted;if(T(g)||g(r,a),t.shareAppContext){const m=t.shareAppContext;m===!0?console.warn(`[${d}] App to share context with was not provided.`):(a._context.components=m._context.components,a._context.directives=m._context.directives,a._context.mixins=m._context.mixins,a._context.provides=m._context.provides,a.config.globalProperties=m.config.globalProperties)}});const n=(a,r)=>{const g=Object.assign({},{id:Pt(),type:i.DEFAULT},r,{content:a});return s.emit(l.ADD,g),g.id};n.clear=()=>s.emit(l.CLEAR,void 0),n.updateDefaults=a=>{s.emit(l.UPDATE_DEFAULTS,a)},n.dismiss=a=>{s.emit(l.DISMISS,a)};function v(a,{content:r,options:g},m=!1){const ft=Object.assign({},g,{content:r});s.emit(l.UPDATE,{id:a,options:ft,create:m})}return n.update=v,n.success=(a,r)=>n(a,Object.assign({},r,{type:i.SUCCESS})),n.info=(a,r)=>n(a,Object.assign({},r,{type:i.INFO})),n.error=(a,r)=>n(a,Object.assign({},r,{type:i.ERROR})),n.warning=(a,r)=>n(a,Object.assign({},r,{type:i.WARNING})),n},Te=()=>{const t=()=>console.warn(`[${d}] This plugin does not support SSR!`);return new Proxy(t,{get(){return t}})};function L(t){return Lt()?Vt(t)?W({eventBus:t},!1):W(t,!0):Te()}var dt=Symbol("VueToastification"),ht=new F,Ce=(t,e)=>{(e==null?void 0:e.shareAppContext)===!0&&(e.shareAppContext=t);const s=L(q({eventBus:ht},e));t.provide(dt,s)},Oe=t=>{if(t)return L(t);const e=bt()?Ot(dt,void 0):void 0;return e||L(ht)},_e=Ce;export{_e as s,Oe as u}; diff --git a/assets/vue.359c6955.js b/assets/vue.8b6e16f3.js similarity index 100% rename from assets/vue.359c6955.js rename to assets/vue.8b6e16f3.js diff --git a/assets/vuedraggable.055200e5.js b/assets/vuedraggable.56f5e1e2.js similarity index 99% rename from assets/vuedraggable.055200e5.js rename to assets/vuedraggable.56f5e1e2.js index 6fe2813..a438dc8 100644 --- a/assets/vuedraggable.055200e5.js +++ b/assets/vuedraggable.56f5e1e2.js @@ -1,4 +1,4 @@ -import{c as jt,a as Ct}from"./lz-string.bfbf8ec3.js";import{r as Lt}from"./vue.359c6955.js";import{r as Ft}from"./sortablejs.20039f18.js";var Pt={exports:{}};(function(Rt,Dt){(function(bt,o){Rt.exports=o(Lt,Ft)})(typeof self!="undefined"?self:jt,function(Tt,bt){return function(o){var g={};function t(r){if(g[r])return g[r].exports;var e=g[r]={i:r,l:!1,exports:{}};return o[r].call(e.exports,e,e.exports,t),e.l=!0,e.exports}return t.m=o,t.c=g,t.d=function(r,e,n){t.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:n})},t.r=function(r){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},t.t=function(r,e){if(e&1&&(r=t(r)),e&8||e&4&&typeof r=="object"&&r&&r.__esModule)return r;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),e&2&&typeof r!="string")for(var a in r)t.d(n,a,function(i){return r[i]}.bind(null,a));return n},t.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(e,"a",e),e},t.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},t.p="",t(t.s="fb15")}({"00ee":function(o,g,t){var r=t("b622"),e=r("toStringTag"),n={};n[e]="z",o.exports=String(n)==="[object z]"},"0366":function(o,g,t){var r=t("1c0b");o.exports=function(e,n,a){if(r(e),n===void 0)return e;switch(a){case 0:return function(){return e.call(n)};case 1:return function(i){return e.call(n,i)};case 2:return function(i,f){return e.call(n,i,f)};case 3:return function(i,f,s){return e.call(n,i,f,s)}}return function(){return e.apply(n,arguments)}}},"057f":function(o,g,t){var r=t("fc6a"),e=t("241c").f,n={}.toString,a=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],i=function(f){try{return e(f)}catch{return a.slice()}};o.exports.f=function(s){return a&&n.call(s)=="[object Window]"?i(s):e(r(s))}},"06cf":function(o,g,t){var r=t("83ab"),e=t("d1e7"),n=t("5c6c"),a=t("fc6a"),i=t("c04e"),f=t("5135"),s=t("0cfb"),u=Object.getOwnPropertyDescriptor;g.f=r?u:function(c,m){if(c=a(c),m=i(m,!0),s)try{return u(c,m)}catch{}if(f(c,m))return n(!e.f.call(c,m),c[m])}},"0cfb":function(o,g,t){var r=t("83ab"),e=t("d039"),n=t("cc12");o.exports=!r&&!e(function(){return Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a!=7})},"13d5":function(o,g,t){var r=t("23e7"),e=t("d58f").left,n=t("a640"),a=t("ae40"),i=n("reduce"),f=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!i||!f},{reduce:function(u){return e(this,u,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(o,g,t){var r=t("c6b6"),e=t("9263");o.exports=function(n,a){var i=n.exec;if(typeof i=="function"){var f=i.call(n,a);if(typeof f!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return f}if(r(n)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return e.call(n,a)}},"159b":function(o,g,t){var r=t("da84"),e=t("fdbc"),n=t("17c2"),a=t("9112");for(var i in e){var f=r[i],s=f&&f.prototype;if(s&&s.forEach!==n)try{a(s,"forEach",n)}catch{s.forEach=n}}},"17c2":function(o,g,t){var r=t("b727").forEach,e=t("a640"),n=t("ae40"),a=e("forEach"),i=n("forEach");o.exports=!a||!i?function(s){return r(this,s,arguments.length>1?arguments[1]:void 0)}:[].forEach},"1be4":function(o,g,t){var r=t("d066");o.exports=r("document","documentElement")},"1c0b":function(o,g){o.exports=function(t){if(typeof t!="function")throw TypeError(String(t)+" is not a function");return t}},"1c7e":function(o,g,t){var r=t("b622"),e=r("iterator"),n=!1;try{var a=0,i={next:function(){return{done:!!a++}},return:function(){n=!0}};i[e]=function(){return this},Array.from(i,function(){throw 2})}catch{}o.exports=function(f,s){if(!s&&!n)return!1;var u=!1;try{var l={};l[e]=function(){return{next:function(){return{done:u=!0}}}},f(l)}catch{}return u}},"1d80":function(o,g){o.exports=function(t){if(t==null)throw TypeError("Can't call method on "+t);return t}},"1dde":function(o,g,t){var r=t("d039"),e=t("b622"),n=t("2d00"),a=e("species");o.exports=function(i){return n>=51||!r(function(){var f=[],s=f.constructor={};return s[a]=function(){return{foo:1}},f[i](Boolean).foo!==1})}},"23cb":function(o,g,t){var r=t("a691"),e=Math.max,n=Math.min;o.exports=function(a,i){var f=r(a);return f<0?e(f+i,0):n(f,i)}},"23e7":function(o,g,t){var r=t("da84"),e=t("06cf").f,n=t("9112"),a=t("6eeb"),i=t("ce4e"),f=t("e893"),s=t("94ca");o.exports=function(u,l){var c=u.target,m=u.global,h=u.stat,O,E,I,p,L,F;if(m?E=r:h?E=r[c]||i(c,{}):E=(r[c]||{}).prototype,E)for(I in l){if(L=l[I],u.noTargetGet?(F=e(E,I),p=F&&F.value):p=E[I],O=s(m?I:c+(h?".":"#")+I,u.forced),!O&&p!==void 0){if(typeof L==typeof p)continue;f(L,p)}(u.sham||p&&p.sham)&&n(L,"sham",!0),a(E,I,L,u)}}},"241c":function(o,g,t){var r=t("ca84"),e=t("7839"),n=e.concat("length","prototype");g.f=Object.getOwnPropertyNames||function(i){return r(i,n)}},"25f0":function(o,g,t){var r=t("6eeb"),e=t("825a"),n=t("d039"),a=t("ad6d"),i="toString",f=RegExp.prototype,s=f[i],u=n(function(){return s.call({source:"a",flags:"b"})!="/a/b"}),l=s.name!=i;(u||l)&&r(RegExp.prototype,i,function(){var m=e(this),h=String(m.source),O=m.flags,E=String(O===void 0&&m instanceof RegExp&&!("flags"in f)?a.call(m):O);return"/"+h+"/"+E},{unsafe:!0})},"2ca0":function(o,g,t){var r=t("23e7"),e=t("06cf").f,n=t("50c4"),a=t("5a34"),i=t("1d80"),f=t("ab13"),s=t("c430"),u="".startsWith,l=Math.min,c=f("startsWith"),m=!s&&!c&&!!function(){var h=e(String.prototype,"startsWith");return h&&!h.writable}();r({target:"String",proto:!0,forced:!m&&!c},{startsWith:function(O){var E=String(i(this));a(O);var I=n(l(arguments.length>1?arguments[1]:void 0,E.length)),p=String(O);return u?u.call(E,p,I):E.slice(I,I+p.length)===p}})},"2d00":function(o,g,t){var r=t("da84"),e=t("342f"),n=r.process,a=n&&n.versions,i=a&&a.v8,f,s;i?(f=i.split("."),s=f[0]+f[1]):e&&(f=e.match(/Edge\/(\d+)/),(!f||f[1]>=74)&&(f=e.match(/Chrome\/(\d+)/),f&&(s=f[1]))),o.exports=s&&+s},"342f":function(o,g,t){var r=t("d066");o.exports=r("navigator","userAgent")||""},"35a1":function(o,g,t){var r=t("f5df"),e=t("3f8c"),n=t("b622"),a=n("iterator");o.exports=function(i){if(i!=null)return i[a]||i["@@iterator"]||e[r(i)]}},"37e8":function(o,g,t){var r=t("83ab"),e=t("9bf2"),n=t("825a"),a=t("df75");o.exports=r?Object.defineProperties:function(f,s){n(f);for(var u=a(s),l=u.length,c=0,m;l>c;)e.f(f,m=u[c++],s[m]);return f}},"3bbe":function(o,g,t){var r=t("861d");o.exports=function(e){if(!r(e)&&e!==null)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},"3ca3":function(o,g,t){var r=t("6547").charAt,e=t("69f3"),n=t("7dd0"),a="String Iterator",i=e.set,f=e.getterFor(a);n(String,"String",function(s){i(this,{type:a,string:String(s),index:0})},function(){var u=f(this),l=u.string,c=u.index,m;return c>=l.length?{value:void 0,done:!0}:(m=r(l,c),u.index+=m.length,{value:m,done:!1})})},"3f8c":function(o,g){o.exports={}},4160:function(o,g,t){var r=t("23e7"),e=t("17c2");r({target:"Array",proto:!0,forced:[].forEach!=e},{forEach:e})},"428f":function(o,g,t){var r=t("da84");o.exports=r},"44ad":function(o,g,t){var r=t("d039"),e=t("c6b6"),n="".split;o.exports=r(function(){return!Object("z").propertyIsEnumerable(0)})?function(a){return e(a)=="String"?n.call(a,""):Object(a)}:Object},"44d2":function(o,g,t){var r=t("b622"),e=t("7c73"),n=t("9bf2"),a=r("unscopables"),i=Array.prototype;i[a]==null&&n.f(i,a,{configurable:!0,value:e(null)}),o.exports=function(f){i[a][f]=!0}},"44e7":function(o,g,t){var r=t("861d"),e=t("c6b6"),n=t("b622"),a=n("match");o.exports=function(i){var f;return r(i)&&((f=i[a])!==void 0?!!f:e(i)=="RegExp")}},4930:function(o,g,t){var r=t("d039");o.exports=!!Object.getOwnPropertySymbols&&!r(function(){return!String(Symbol())})},"4d64":function(o,g,t){var r=t("fc6a"),e=t("50c4"),n=t("23cb"),a=function(i){return function(f,s,u){var l=r(f),c=e(l.length),m=n(u,c),h;if(i&&s!=s){for(;c>m;)if(h=l[m++],h!=h)return!0}else for(;c>m;m++)if((i||m in l)&&l[m]===s)return i||m||0;return!i&&-1}};o.exports={includes:a(!0),indexOf:a(!1)}},"4de4":function(o,g,t){var r=t("23e7"),e=t("b727").filter,n=t("1dde"),a=t("ae40"),i=n("filter"),f=a("filter");r({target:"Array",proto:!0,forced:!i||!f},{filter:function(u){return e(this,u,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(o,g,t){var r=t("0366"),e=t("7b0b"),n=t("9bdd"),a=t("e95a"),i=t("50c4"),f=t("8418"),s=t("35a1");o.exports=function(l){var c=e(l),m=typeof this=="function"?this:Array,h=arguments.length,O=h>1?arguments[1]:void 0,E=O!==void 0,I=s(c),p=0,L,F,S,P,C,K;if(E&&(O=r(O,h>2?arguments[2]:void 0,2)),I!=null&&!(m==Array&&a(I)))for(P=I.call(c),C=P.next,F=new m;!(S=C.call(P)).done;p++)K=E?n(P,O,[S.value,p],!0):S.value,f(F,p,K);else for(L=i(c.length),F=new m(L);L>p;p++)K=E?O(c[p],p):c[p],f(F,p,K);return F.length=p,F}},"4fad":function(o,g,t){var r=t("23e7"),e=t("6f53").entries;r({target:"Object",stat:!0},{entries:function(a){return e(a)}})},"50c4":function(o,g,t){var r=t("a691"),e=Math.min;o.exports=function(n){return n>0?e(r(n),9007199254740991):0}},5135:function(o,g){var t={}.hasOwnProperty;o.exports=function(r,e){return t.call(r,e)}},5319:function(o,g,t){var r=t("d784"),e=t("825a"),n=t("7b0b"),a=t("50c4"),i=t("a691"),f=t("1d80"),s=t("8aa5"),u=t("14c3"),l=Math.max,c=Math.min,m=Math.floor,h=/\$([$&'`]|\d\d?|<[^>]*>)/g,O=/\$([$&'`]|\d\d?)/g,E=function(I){return I===void 0?I:String(I)};r("replace",2,function(I,p,L,F){var S=F.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,P=F.REPLACE_KEEPS_$0,C=S?"$":"$0";return[function(b,G){var R=f(this),M=b==null?void 0:b[I];return M!==void 0?M.call(b,R,G):p.call(String(R),b,G)},function(T,b){if(!S&&P||typeof b=="string"&&b.indexOf(C)===-1){var G=L(p,T,this,b);if(G.done)return G.value}var R=e(T),M=String(this),W=typeof b=="function";W||(b=String(b));var z=R.global;if(z){var rt=R.unicode;R.lastIndex=0}for(var w=[];;){var Q=u(R,M);if(Q===null||(w.push(Q),!z))break;var k=String(Q[0]);k===""&&(R.lastIndex=s(M,a(R.lastIndex),rt))}for(var q="",Z=0,X=0;X=Z&&(q+=M.slice(Z,ot)+_,Z=ot+Y.length)}return q+M.slice(Z)}];function K(T,b,G,R,M,W){var z=G+T.length,rt=R.length,w=O;return M!==void 0&&(M=n(M),w=h),p.call(W,w,function(Q,k){var q;switch(k.charAt(0)){case"$":return"$";case"&":return T;case"`":return b.slice(0,G);case"'":return b.slice(z);case"<":q=M[k.slice(1,-1)];break;default:var Z=+k;if(Z===0)return Q;if(Z>rt){var X=m(Z/10);return X===0?Q:X<=rt?R[X-1]===void 0?k.charAt(1):R[X-1]+k.charAt(1):Q}q=R[Z-1]}return q===void 0?"":q})}})},5692:function(o,g,t){var r=t("c430"),e=t("c6cd");(o.exports=function(n,a){return e[n]||(e[n]=a!==void 0?a:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"\xA9 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(o,g,t){var r=t("d066"),e=t("241c"),n=t("7418"),a=t("825a");o.exports=r("Reflect","ownKeys")||function(f){var s=e.f(a(f)),u=n.f;return u?s.concat(u(f)):s}},"5a34":function(o,g,t){var r=t("44e7");o.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},"5c6c":function(o,g){o.exports=function(t,r){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:r}}},"5db7":function(o,g,t){var r=t("23e7"),e=t("a2bf"),n=t("7b0b"),a=t("50c4"),i=t("1c0b"),f=t("65f0");r({target:"Array",proto:!0},{flatMap:function(u){var l=n(this),c=a(l.length),m;return i(u),m=f(l,0),m.length=e(m,l,l,c,0,1,u,arguments.length>1?arguments[1]:void 0),m}})},6547:function(o,g,t){var r=t("a691"),e=t("1d80"),n=function(a){return function(i,f){var s=String(e(i)),u=r(f),l=s.length,c,m;return u<0||u>=l?a?"":void 0:(c=s.charCodeAt(u),c<55296||c>56319||u+1===l||(m=s.charCodeAt(u+1))<56320||m>57343?a?s.charAt(u):c:a?s.slice(u,u+2):(c-55296<<10)+(m-56320)+65536)}};o.exports={codeAt:n(!1),charAt:n(!0)}},"65f0":function(o,g,t){var r=t("861d"),e=t("e8b5"),n=t("b622"),a=n("species");o.exports=function(i,f){var s;return e(i)&&(s=i.constructor,typeof s=="function"&&(s===Array||e(s.prototype))?s=void 0:r(s)&&(s=s[a],s===null&&(s=void 0))),new(s===void 0?Array:s)(f===0?0:f)}},"69f3":function(o,g,t){var r=t("7f9a"),e=t("da84"),n=t("861d"),a=t("9112"),i=t("5135"),f=t("f772"),s=t("d012"),u=e.WeakMap,l,c,m,h=function(S){return m(S)?c(S):l(S,{})},O=function(S){return function(P){var C;if(!n(P)||(C=c(P)).type!==S)throw TypeError("Incompatible receiver, "+S+" required");return C}};if(r){var E=new u,I=E.get,p=E.has,L=E.set;l=function(S,P){return L.call(E,S,P),P},c=function(S){return I.call(E,S)||{}},m=function(S){return p.call(E,S)}}else{var F=f("state");s[F]=!0,l=function(S,P){return a(S,F,P),P},c=function(S){return i(S,F)?S[F]:{}},m=function(S){return i(S,F)}}o.exports={set:l,get:c,has:m,enforce:h,getterFor:O}},"6eeb":function(o,g,t){var r=t("da84"),e=t("9112"),n=t("5135"),a=t("ce4e"),i=t("8925"),f=t("69f3"),s=f.get,u=f.enforce,l=String(String).split("String");(o.exports=function(c,m,h,O){var E=O?!!O.unsafe:!1,I=O?!!O.enumerable:!1,p=O?!!O.noTargetGet:!1;if(typeof h=="function"&&(typeof m=="string"&&!n(h,"name")&&e(h,"name",m),u(h).source=l.join(typeof m=="string"?m:"")),c===r){I?c[m]=h:a(m,h);return}else E?!p&&c[m]&&(I=!0):delete c[m];I?c[m]=h:e(c,m,h)})(Function.prototype,"toString",function(){return typeof this=="function"&&s(this).source||i(this)})},"6f53":function(o,g,t){var r=t("83ab"),e=t("df75"),n=t("fc6a"),a=t("d1e7").f,i=function(f){return function(s){for(var u=n(s),l=e(u),c=l.length,m=0,h=[],O;c>m;)O=l[m++],(!r||a.call(u,O))&&h.push(f?[O,u[O]]:u[O]);return h}};o.exports={entries:i(!0),values:i(!1)}},"73d9":function(o,g,t){var r=t("44d2");r("flatMap")},7418:function(o,g){g.f=Object.getOwnPropertySymbols},"746f":function(o,g,t){var r=t("428f"),e=t("5135"),n=t("e538"),a=t("9bf2").f;o.exports=function(i){var f=r.Symbol||(r.Symbol={});e(f,i)||a(f,i,{value:n.f(i)})}},7839:function(o,g){o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(o,g,t){var r=t("1d80");o.exports=function(e){return Object(r(e))}},"7c73":function(o,g,t){var r=t("825a"),e=t("37e8"),n=t("7839"),a=t("d012"),i=t("1be4"),f=t("cc12"),s=t("f772"),u=">",l="<",c="prototype",m="script",h=s("IE_PROTO"),O=function(){},E=function(S){return l+m+u+S+l+"/"+m+u},I=function(S){S.write(E("")),S.close();var P=S.parentWindow.Object;return S=null,P},p=function(){var S=f("iframe"),P="java"+m+":",C;return S.style.display="none",i.appendChild(S),S.src=String(P),C=S.contentWindow.document,C.open(),C.write(E("document.F=Object")),C.close(),C.F},L,F=function(){try{L=document.domain&&new ActiveXObject("htmlfile")}catch{}F=L?I(L):p();for(var S=n.length;S--;)delete F[c][n[S]];return F()};a[h]=!0,o.exports=Object.create||function(P,C){var K;return P!==null?(O[c]=r(P),K=new O,O[c]=null,K[h]=P):K=F(),C===void 0?K:e(K,C)}},"7dd0":function(o,g,t){var r=t("23e7"),e=t("9ed3"),n=t("e163"),a=t("d2bb"),i=t("d44e"),f=t("9112"),s=t("6eeb"),u=t("b622"),l=t("c430"),c=t("3f8c"),m=t("ae93"),h=m.IteratorPrototype,O=m.BUGGY_SAFARI_ITERATORS,E=u("iterator"),I="keys",p="values",L="entries",F=function(){return this};o.exports=function(S,P,C,K,T,b,G){e(C,P,K);var R=function(X){if(X===T&&w)return w;if(!O&&X in z)return z[X];switch(X){case I:return function(){return new C(this,X)};case p:return function(){return new C(this,X)};case L:return function(){return new C(this,X)}}return function(){return new C(this)}},M=P+" Iterator",W=!1,z=S.prototype,rt=z[E]||z["@@iterator"]||T&&z[T],w=!O&&rt||R(T),Q=P=="Array"&&z.entries||rt,k,q,Z;if(Q&&(k=n(Q.call(new S)),h!==Object.prototype&&k.next&&(!l&&n(k)!==h&&(a?a(k,h):typeof k[E]!="function"&&f(k,E,F)),i(k,M,!0,!0),l&&(c[M]=F))),T==p&&rt&&rt.name!==p&&(W=!0,w=function(){return rt.call(this)}),(!l||G)&&z[E]!==w&&f(z,E,w),c[P]=w,T)if(q={values:R(p),keys:b?w:R(I),entries:R(L)},G)for(Z in q)(O||W||!(Z in z))&&s(z,Z,q[Z]);else r({target:P,proto:!0,forced:O||W},q);return q}},"7f9a":function(o,g,t){var r=t("da84"),e=t("8925"),n=r.WeakMap;o.exports=typeof n=="function"&&/native code/.test(e(n))},"825a":function(o,g,t){var r=t("861d");o.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},"83ab":function(o,g,t){var r=t("d039");o.exports=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},8418:function(o,g,t){var r=t("c04e"),e=t("9bf2"),n=t("5c6c");o.exports=function(a,i,f){var s=r(i);s in a?e.f(a,s,n(0,f)):a[s]=f}},"861d":function(o,g){o.exports=function(t){return typeof t=="object"?t!==null:typeof t=="function"}},8875:function(o,g,t){var r,e,n;(function(a,i){e=[],r=i,n=typeof r=="function"?r.apply(g,e):r,n!==void 0&&(o.exports=n)})(typeof self!="undefined"?self:this,function(){function a(){var i=Object.getOwnPropertyDescriptor(document,"currentScript");if(!i&&"currentScript"in document&&document.currentScript||i&&i.get!==a&&document.currentScript)return document.currentScript;try{throw new Error}catch(L){var f=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,s=/@([^@]*):(\d+):(\d+)\s*$/ig,u=f.exec(L.stack)||s.exec(L.stack),l=u&&u[1]||!1,c=u&&u[2]||!1,m=document.location.href.replace(document.location.hash,""),h,O,E,I=document.getElementsByTagName("script");l===m&&(h=document.documentElement.outerHTML,O=new RegExp("(?:[^\\n]+?\\n){0,"+(c-2)+"}[^<]* + - + - - - + + + - + diff --git a/sw.js b/sw.js index 0d0df4b..3a9b21d 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,r)=>{const l=e||("document"in self?document.currentScript.src:"")||location.href;if(s[l])return;let o={};const a=e=>i(e,l),u={module:{uri:l},exports:o,require:a};s[l]=Promise.all(n.map((e=>u[e]||a(e)))).then((e=>(r(...e),o)))}}define(["./workbox-7369c0e1"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"assets/@fontsource.f66d05e7.css",revision:null},{url:"assets/@vue.6f8187b0.js",revision:null},{url:"assets/gameLoop.985d1f90.js",revision:null},{url:"assets/index.0082bab1.css",revision:null},{url:"assets/index.31e3b26a.js",revision:null},{url:"assets/lz-string.bfbf8ec3.js",revision:null},{url:"assets/nanoevents.1080beb7.js",revision:null},{url:"assets/sortablejs.20039f18.js",revision:null},{url:"assets/vue-next-select.68e0c605.js",revision:null},{url:"assets/vue-next-select.9e6f4164.css",revision:null},{url:"assets/vue-textarea-autosize.35804eaf.js",revision:null},{url:"assets/vue-toastification.45d39007.js",revision:null},{url:"assets/vue-toastification.4b5f8ac8.css",revision:null},{url:"assets/vue.359c6955.js",revision:null},{url:"assets/vuedraggable.055200e5.js",revision:null},{url:"assets/workbox-window.4a8794bb.js",revision:null},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"favicon.svg",revision:"c8dd2748f1fedd25449164d7dda6aecb"},{url:"index.html",revision:"26ea659c01bcebb3f012b467b5a1fbb0"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"robots.txt",revision:"5e0bd1c281a62a380d7a948085bfe2d1"},{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"49b9cd04ee2139bfe785f8100ba3f74f"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))})); +if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,r)=>{const l=e||("document"in self?document.currentScript.src:"")||location.href;if(s[l])return;let a={};const o=e=>i(e,l),u={module:{uri:l},exports:a,require:o};s[l]=Promise.all(n.map((e=>u[e]||o(e)))).then((e=>(r(...e),a)))}}define(["./workbox-7369c0e1"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"assets/@fontsource.f66d05e7.css",revision:null},{url:"assets/@vue.6f8187b0.js",revision:null},{url:"assets/gameLoop.08aa972d.js",revision:null},{url:"assets/index.0082bab1.css",revision:null},{url:"assets/index.1dbb5c42.js",revision:null},{url:"assets/lz-string.bfbf8ec3.js",revision:null},{url:"assets/nanoevents.1080beb7.js",revision:null},{url:"assets/sortablejs.8abbd596.js",revision:null},{url:"assets/vue-next-select.9e6f4164.css",revision:null},{url:"assets/vue-next-select.d60d437a.js",revision:null},{url:"assets/vue-textarea-autosize.35804eaf.js",revision:null},{url:"assets/vue-toastification.4b5f8ac8.css",revision:null},{url:"assets/vue-toastification.c011d2f2.js",revision:null},{url:"assets/vue.8b6e16f3.js",revision:null},{url:"assets/vuedraggable.56f5e1e2.js",revision:null},{url:"assets/workbox-window.4a8794bb.js",revision:null},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"favicon.svg",revision:"c8dd2748f1fedd25449164d7dda6aecb"},{url:"index.html",revision:"ef334d49a2a9b0a610f57a5de0f910a9"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"robots.txt",revision:"5e0bd1c281a62a380d7a948085bfe2d1"},{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"49b9cd04ee2139bfe785f8100ba3f74f"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));