pages/ludwig/assets/index.1e3ecb70.js

15 lines
127 KiB
JavaScript

/* empty css */import"./vue.f6263579.js";import{Z as z,q as it,C as u,t as I,b1 as fe,aa as G,aE as f,a0 as C,a1 as c,aK as we,G as ee,w as pe,b2 as St,a8 as A,O as re,ay as Qt,ar as Pe,aG as rt,A as ye,_ as O,b6 as T,b8 as Mt,bs as _a,aq as et,bu as tt,bb as $t,T as wa,a7 as w,u as kt,j as Ia,l as be,bv as Ct,aL as Sa,$ as Q,aN as ce,J as q,I as xe,aH as Ie,aF as Se,z as qe,br as Qa,aJ as Ma,al as Ot,aC as ka,au as Ta,bc as ot,ao as Da,bn as Ra,be as Va}from"./@vue.4ce677c2.js";import{c as ea}from"./nanoevents.1080beb7.js";import{L as _e}from"./lz-string.f2f3b7cf.js";import{D as za}from"./vuedraggable.c3acdf62.js";import{Y as Pa}from"./vue-next-select.0dc4e443.js";import{p as xa}from"./vue-textarea-autosize.35804eaf.js";import{s as qa}from"./semver.83ff78cf.js";import{l as Fa}from"./socket.io-client.79ce0df5.js";import{u as ta,s as Ga}from"./vue-toastification.b7cd620e.js";import{A as aa,T as Oa,R as Ua,B as Ya,u as Ja,E as Ut}from"./@pixi.1eac1889.js";import{v as La,n as Wa}from"./workbox-window.8d14e8b7.js";import"./earcut.b6f90e68.js";import"./sortablejs.cbae5b2d.js";import"./lru-cache.9a21e90b.js";import"./yallist.fd762fe7.js";import"./engine.io-client.58517560.js";import"./engine.io-parser.3f360695.js";import"./@socket.io.aec831e2.js";import"./socket.io-parser.544e37d1.js";import"./ismobilejs.5c6954b9.js";import"./eventemitter3.dc5195d7.js";import"./url.e51cb87b.js";import"./querystring.23ae9a54.js";const Xa=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const r of s.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function a(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 n(i){if(i.ep)return;i.ep=!0;const s=a(i);fetch(i.href,s)}};Xa();const ja="modulepreload",Yt={},Ha="./",dt=function(t,a){return!a||a.length===0?t():Promise.all(a.map(n=>{if(n=`${Ha}${n}`,n in Yt)return;Yt[n]=!0;const i=n.endsWith(".css"),s=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${s}`))return;const r=document.createElement("link");if(r.rel=i?"stylesheet":ja,i||(r.as="script",r.crossOrigin=""),r.href=n,document.head.appendChild(r),i)return new Promise((l,m)=>{r.addEventListener("load",l),r.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t())},Ka="./projInfo-schema.json",Za="Super Auto Coots",$a="A project made in Profectus",en="superautocoots",tn="thepaperpilot and crea",an="",nn="",sn="0.0.0",rn="Initial Commit",on=!1,ln=!1,An=2,un=!0,cn=null,dn="",mn=["main"],gn=3600,fn=1,hn=!0,vn="base64";var F={$schema:Ka,title:Za,description:$a,id:en,author:tn,discordName:an,discordLink:nn,versionNumber:sn,versionTitle:rn,allowGoBack:on,defaultShowSmall:ln,defaultDecimalsShown:An,useHeader:un,banner:cn,logo:dn,initialTabs:mn,maxTickLength:gn,offlineLimit:fn,enablePausing:hn,exportEncoding:vn};class pn{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 a=this.map.get(t);if(a!==void 0)return a!==this.first&&(a===this.last?(this.last=a.prev,this.last.next=void 0):(a.prev.next=a.next,a.next.prev=a.prev),a.next=this.first,this.first.prev=a,this.first=a),a.value}set(t,a){if(this.maxSize<1)return;if(this.map.has(t))throw new Error("Cannot update existing keys in the cache");const n=new yn(t,a);for(this.first===void 0?(this.first=n,this.last=n):(n.next=this.first,this.first.prev=n,this.first=n),this.map.set(t,n);this.map.size>this.maxSize;){const i=this.last;this.map.delete(i.key),this.last=i.prev,this.last.next=void 0}}}class yn{constructor(t,a){this.next=void 0,this.prev=void 0,this.key=t,this.value=a}}const bt=17,bn=9e15,Nn=Math.log10(9e15),Cn=1/9e15,En=308,Bn=-324,Jt=5,_n=(1<<10)-1,wn=function(){const e=[];for(let a=Bn+1;a<=En;a++)e.push(Number("1e"+a));const t=323;return function(a){return e[a+t]}}(),Me=[2,Math.E,3,4,5,6,7,8,9,10],In=[[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]],Sn=[[-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 d=function(t){return E.fromValue_noAlloc(t)},M=function(e,t,a){return E.fromComponents(e,t,a)},k=function(t,a,n){return E.fromComponents_noNormalize(t,a,n)};const Ee=function(t,a){const n=a+1,i=Math.ceil(Math.log10(Math.abs(t))),s=Math.round(t*Math.pow(10,n-i))*Math.pow(10,i-n);return parseFloat(s.toFixed(Math.max(n-i,0)))},Nt=function(e){return Math.sign(e)*Math.log10(Math.abs(e))},Qn=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 a=.9189385332046727;a=a+(e+.5)*Math.log(e),a=a-e;const n=e*e;let i=e;return a=a+1/(12*i),i=i*n,a=a+1/(360*i),i=i*n,a=a+1/(1260*i),i=i*n,a=a+1/(1680*i),i=i*n,a=a+1/(1188*i),i=i*n,a=a+691/(360360*i),i=i*n,a=a+7/(1092*i),i=i*n,a=a+3617/(122400*i),Math.exp(a)/t},na=.5671432904097838,Lt=function(e,t=1e-10){let a,n;if(!Number.isFinite(e)||e===0)return e;if(e===1)return na;e<10?a=0:a=Math.log(e)-Math.log(Math.log(e));for(let i=0;i<100;++i){if(n=(e*Math.exp(-a)+a*a)/(a+1),Math.abs(n-a)<t*Math.abs(n))return n;a=n}throw Error(`Iteration failed to converge: ${e.toString()}`)};function Wt(e,t=1e-10){let a,n,i,s;if(!Number.isFinite(e.mag)||e.eq(E.dZero))return e;if(e.eq(E.dOne))return E.fromNumber(na);a=E.ln(e);for(let r=0;r<100;++r){if(n=a.neg().exp(),i=a.sub(e.mul(n)),s=a.sub(i.div(a.add(1).sub(a.add(2).mul(i).div(E.mul(2,a).add(2))))),E.abs(s.sub(a)).lt(E.abs(s).mul(t)))return s;a=s}throw Error(`Iteration failed to converge: ${e.toString()}`)}const o=class{constructor(e){this.sign=0,this.mag=0,this.layer=0,e instanceof o?this.fromDecimal(e):typeof e=="number"?this.fromNumber(e):typeof e=="string"&&this.fromString(e)}get m(){if(this.sign===0)return 0;if(this.layer===0){const e=Math.floor(Math.log10(this.mag));let t;return this.mag===5e-324?t=5:t=this.mag/wn(e),this.sign*t}else if(this.layer===1){const e=this.mag-Math.floor(this.mag);return this.sign*Math.pow(10,e)}else return this.sign}set m(e){this.layer<=2?this.fromMantissaExponent(e,this.e):(this.sign=Math.sign(e),this.sign===0&&(this.layer=0,this.exponent=0))}get e(){return this.sign===0?0:this.layer===0?Math.floor(Math.log10(this.mag)):this.layer===1?Math.floor(this.mag):this.layer===2?Math.floor(Math.sign(this.mag)*Math.pow(10,Math.abs(this.mag))):this.mag*Number.POSITIVE_INFINITY}set e(e){this.fromMantissaExponent(this.m,e)}get s(){return this.sign}set s(e){e===0?(this.sign=0,this.layer=0,this.mag=0):this.sign=e}get mantissa(){return this.m}set mantissa(e){this.m=e}get exponent(){return this.e}set exponent(e){this.e=e}static fromComponents(e,t,a){return new o().fromComponents(e,t,a)}static fromComponents_noNormalize(e,t,a){return new o().fromComponents_noNormalize(e,t,a)}static fromMantissaExponent(e,t){return new o().fromMantissaExponent(e,t)}static fromMantissaExponent_noNormalize(e,t){return new o().fromMantissaExponent_noNormalize(e,t)}static fromDecimal(e){return new o().fromDecimal(e)}static fromNumber(e){return new o().fromNumber(e)}static fromString(e){return new o().fromString(e)}static fromValue(e){return new o().fromValue(e)}static fromValue_noAlloc(e){if(e instanceof o)return e;if(typeof e=="string"){const t=o.fromStringCache.get(e);return t!==void 0?t:o.fromString(e)}else return typeof e=="number"?o.fromNumber(e):o.dZero}static abs(e){return d(e).abs()}static neg(e){return d(e).neg()}static negate(e){return d(e).neg()}static negated(e){return d(e).neg()}static sign(e){return d(e).sign}static sgn(e){return d(e).sign}static round(e){return d(e).round()}static floor(e){return d(e).floor()}static ceil(e){return d(e).ceil()}static trunc(e){return d(e).trunc()}static add(e,t){return d(e).add(t)}static plus(e,t){return d(e).add(t)}static sub(e,t){return d(e).sub(t)}static subtract(e,t){return d(e).sub(t)}static minus(e,t){return d(e).sub(t)}static mul(e,t){return d(e).mul(t)}static multiply(e,t){return d(e).mul(t)}static times(e,t){return d(e).mul(t)}static div(e,t){return d(e).div(t)}static divide(e,t){return d(e).div(t)}static recip(e){return d(e).recip()}static reciprocal(e){return d(e).recip()}static reciprocate(e){return d(e).reciprocate()}static cmp(e,t){return d(e).cmp(t)}static cmpabs(e,t){return d(e).cmpabs(t)}static compare(e,t){return d(e).cmp(t)}static isNaN(e){return e=d(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag)}static isFinite(e){return e=d(e),isFinite(e.sign)&&isFinite(e.layer)&&isFinite(e.mag)}static eq(e,t){return d(e).eq(t)}static equals(e,t){return d(e).eq(t)}static neq(e,t){return d(e).neq(t)}static notEquals(e,t){return d(e).notEquals(t)}static lt(e,t){return d(e).lt(t)}static lte(e,t){return d(e).lte(t)}static gt(e,t){return d(e).gt(t)}static gte(e,t){return d(e).gte(t)}static max(e,t){return d(e).max(t)}static min(e,t){return d(e).min(t)}static minabs(e,t){return d(e).minabs(t)}static maxabs(e,t){return d(e).maxabs(t)}static clamp(e,t,a){return d(e).clamp(t,a)}static clampMin(e,t){return d(e).clampMin(t)}static clampMax(e,t){return d(e).clampMax(t)}static cmp_tolerance(e,t,a){return d(e).cmp_tolerance(t,a)}static compare_tolerance(e,t,a){return d(e).cmp_tolerance(t,a)}static eq_tolerance(e,t,a){return d(e).eq_tolerance(t,a)}static equals_tolerance(e,t,a){return d(e).eq_tolerance(t,a)}static neq_tolerance(e,t,a){return d(e).neq_tolerance(t,a)}static notEquals_tolerance(e,t,a){return d(e).notEquals_tolerance(t,a)}static lt_tolerance(e,t,a){return d(e).lt_tolerance(t,a)}static lte_tolerance(e,t,a){return d(e).lte_tolerance(t,a)}static gt_tolerance(e,t,a){return d(e).gt_tolerance(t,a)}static gte_tolerance(e,t,a){return d(e).gte_tolerance(t,a)}static pLog10(e){return d(e).pLog10()}static absLog10(e){return d(e).absLog10()}static log10(e){return d(e).log10()}static log(e,t){return d(e).log(t)}static log2(e){return d(e).log2()}static ln(e){return d(e).ln()}static logarithm(e,t){return d(e).logarithm(t)}static pow(e,t){return d(e).pow(t)}static pow10(e){return d(e).pow10()}static pow_base(e,t){return d(e).pow_base(t)}static root(e,t){return d(e).root(t)}static factorial(e,t){return d(e).factorial()}static gamma(e,t){return d(e).gamma()}static lngamma(e,t){return d(e).lngamma()}static exp(e){return d(e).exp()}static sqr(e){return d(e).sqr()}static sqrt(e){return d(e).sqrt()}static cube(e){return d(e).cube()}static cbrt(e){return d(e).cbrt()}static tetrate(e,t=2,a=k(1,0,1)){return d(e).tetrate(t,a)}static iteratedexp(e,t=2,a=k(1,0,1)){return d(e).iteratedexp(t,a)}static iteratedlog(e,t=10,a=1){return d(e).iteratedlog(t,a)}static layeradd10(e,t){return d(e).layeradd10(t)}static layeradd(e,t,a=10){return d(e).layeradd(t,a)}static slog(e,t=10){return d(e).slog(t)}static lambertw(e){return d(e).lambertw()}static ssqrt(e){return d(e).ssqrt()}static pentate(e,t=2,a=k(1,0,1)){return d(e).pentate(t,a)}static sin(e){return d(e).sin()}static cos(e){return d(e).cos()}static tan(e){return d(e).tan()}static asin(e){return d(e).asin()}static acos(e){return d(e).acos()}static atan(e){return d(e).atan()}static sinh(e){return d(e).sinh()}static cosh(e){return d(e).cosh()}static tanh(e){return d(e).tanh()}static asinh(e){return d(e).asinh()}static acosh(e){return d(e).acosh()}static atanh(e){return d(e).atanh()}static affordGeometricSeries(e,t,a,n){return this.affordGeometricSeries_core(d(e),d(t),d(a),n)}static sumGeometricSeries(e,t,a,n){return this.sumGeometricSeries_core(e,d(t),d(a),n)}static affordArithmeticSeries(e,t,a,n){return this.affordArithmeticSeries_core(d(e),d(t),d(a),d(n))}static sumArithmeticSeries(e,t,a,n){return this.sumArithmeticSeries_core(d(e),d(t),d(a),d(n))}static efficiencyOfPurchase(e,t,a){return this.efficiencyOfPurchase_core(d(e),d(t),d(a))}static randomDecimalForTesting(e){if(Math.random()*20<1)return k(0,0,0);const t=Math.random()>.5?1:-1;if(Math.random()*20<1)return k(t,0,1);const a=Math.floor(Math.random()*(e+1));let n=a===0?Math.random()*616-308:Math.random()*16;Math.random()>.9&&(n=Math.trunc(n));let i=Math.pow(10,n);return Math.random()>.9&&(i=Math.trunc(i)),M(t,a,i)}static affordGeometricSeries_core(e,t,a,n){const i=t.mul(a.pow(n));return o.floor(e.div(i).mul(a.sub(1)).add(1).log10().div(a.log10()))}static sumGeometricSeries_core(e,t,a,n){return t.mul(a.pow(n)).mul(o.sub(1,a.pow(e))).div(o.sub(1,a))}static affordArithmeticSeries_core(e,t,a,n){const s=t.add(n.mul(a)).sub(a.div(2)),r=s.pow(2);return s.neg().add(r.add(a.mul(e).mul(2)).sqrt()).div(a).floor()}static sumArithmeticSeries_core(e,t,a,n){const i=t.add(n.mul(a));return e.div(2).mul(i.mul(2).plus(e.sub(1).mul(a)))}static efficiencyOfPurchase_core(e,t,a){return e.div(t).add(e.div(a))}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<Cn)return this.layer+=1,this.mag=Math.log10(this.mag),this;let e=Math.abs(this.mag),t=Math.sign(this.mag);if(e>=bn)return this.layer+=1,this.mag=t*Math.log10(e),this;for(;e<Nn&&this.layer>0;)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,a){return this.sign=e,this.layer=t,this.mag=a,this.normalize(),this}fromComponents_noNormalize(e,t,a){return this.sign=e,this.layer=t,this.mag=a,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,a=o.fromStringCache.get(t);if(a!==void 0)return this.fromDecimal(a);e=e.replace(",","");const n=e.split("^^^");if(n.length===2){const S=parseFloat(n[0]),h=parseFloat(n[1]),Y=n[1].split(";");let j=1;if(Y.length===2&&(j=parseFloat(Y[1]),isFinite(j)||(j=1)),isFinite(S)&&isFinite(h)){const y=o.pentate(S,h,j);return this.sign=y.sign,this.layer=y.layer,this.mag=y.mag,o.fromStringCache.maxSize>=1&&o.fromStringCache.set(t,o.fromDecimal(this)),this}}const i=e.split("^^");if(i.length===2){const S=parseFloat(i[0]),h=parseFloat(i[1]),Y=i[1].split(";");let j=1;if(Y.length===2&&(j=parseFloat(Y[1]),isFinite(j)||(j=1)),isFinite(S)&&isFinite(h)){const y=o.tetrate(S,h,j);return this.sign=y.sign,this.layer=y.layer,this.mag=y.mag,o.fromStringCache.maxSize>=1&&o.fromStringCache.set(t,o.fromDecimal(this)),this}}const s=e.split("^");if(s.length===2){const S=parseFloat(s[0]),h=parseFloat(s[1]);if(isFinite(S)&&isFinite(h)){const Y=o.pow(S,h);return this.sign=Y.sign,this.layer=Y.layer,this.mag=Y.mag,o.fromStringCache.maxSize>=1&&o.fromStringCache.set(t,o.fromDecimal(this)),this}}e=e.trim().toLowerCase();let r,l,m=e.split("pt");if(m.length===2){r=10,l=parseFloat(m[0]),m[1]=m[1].replace("(",""),m[1]=m[1].replace(")","");let S=parseFloat(m[1]);if(isFinite(S)||(S=1),isFinite(r)&&isFinite(l)){const h=o.tetrate(r,l,S);return this.sign=h.sign,this.layer=h.layer,this.mag=h.mag,o.fromStringCache.maxSize>=1&&o.fromStringCache.set(t,o.fromDecimal(this)),this}}if(m=e.split("p"),m.length===2){r=10,l=parseFloat(m[0]),m[1]=m[1].replace("(",""),m[1]=m[1].replace(")","");let S=parseFloat(m[1]);if(isFinite(S)||(S=1),isFinite(r)&&isFinite(l)){const h=o.tetrate(r,l,S);return this.sign=h.sign,this.layer=h.layer,this.mag=h.mag,o.fromStringCache.maxSize>=1&&o.fromStringCache.set(t,o.fromDecimal(this)),this}}const g=e.split("e"),p=g.length-1;if(p===0){const S=parseFloat(e);if(isFinite(S))return this.fromNumber(S),o.fromStringCache.size>=1&&o.fromStringCache.set(t,o.fromDecimal(this)),this}else if(p===1){const S=parseFloat(e);if(isFinite(S)&&S!==0)return this.fromNumber(S),o.fromStringCache.maxSize>=1&&o.fromStringCache.set(t,o.fromDecimal(this)),this}const v=e.split("e^");if(v.length===2){this.sign=1,v[0].charAt(0)=="-"&&(this.sign=-1);let S="";for(let h=0;h<v[1].length;++h){const Y=v[1].charCodeAt(h);if(Y>=43&&Y<=57||Y===101)S+=v[1].charAt(h);else return this.layer=parseFloat(S),this.mag=parseFloat(v[1].substr(h+1)),this.normalize(),o.fromStringCache.maxSize>=1&&o.fromStringCache.set(t,o.fromDecimal(this)),this}}if(p<1)return this.sign=0,this.layer=0,this.mag=0,o.fromStringCache.maxSize>=1&&o.fromStringCache.set(t,o.fromDecimal(this)),this;const b=parseFloat(g[0]);if(b===0)return this.sign=0,this.layer=0,this.mag=0,o.fromStringCache.maxSize>=1&&o.fromStringCache.set(t,o.fromDecimal(this)),this;let N=parseFloat(g[g.length-1]);if(p>=2){const S=parseFloat(g[g.length-2]);isFinite(S)&&(N*=Math.sign(S),N+=Nt(S))}if(!isFinite(b))this.sign=g[0]==="-"?-1:1,this.layer=p,this.mag=N;else if(p===1)this.sign=Math.sign(b),this.layer=1,this.mag=N+Math.log10(Math.abs(b));else if(this.sign=Math.sign(b),this.layer=p,p===2){const S=o.mul(M(1,2,N),d(b));return this.sign=S.sign,this.layer=S.layer,this.mag=S.mag,o.fromStringCache.maxSize>=1&&o.fromStringCache.set(t,o.fromDecimal(this)),this}else this.mag=N;return this.normalize(),o.fromStringCache.maxSize>=1&&o.fromStringCache.set(t,o.fromDecimal(this)),this}fromValue(e){return e instanceof o?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:Ee(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:this.mag===0?0:Ee(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<=Jt?(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):Ee(this.m,e)+"e"+Ee(this.e,e):this.layer===1?Ee(this.m,e)+"e"+Ee(this.e,e):this.layer<=Jt?(this.sign===-1?"-":"")+"e".repeat(this.layer)+Ee(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+Ee(this.mag,e)}abs(){return k(this.sign===0?0:1,this.layer,this.mag)}neg(){return k(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?o.dZero:this.layer===0?M(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?o.dZero:this.layer===0?M(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?o.dZero:this.layer===0?M(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?o.dZero:this.layer===0?M(this.sign,0,Math.trunc(this.mag)):this}add(e){const t=d(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 k(0,0,0);let a,n;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(o.cmpabs(this,t)>0?(a=this,n=t):(a=t,n=this),a.layer===0&&n.layer===0)return o.fromNumber(a.sign*a.mag+n.sign*n.mag);const i=a.layer*Math.sign(a.mag),s=n.layer*Math.sign(n.mag);if(i-s>=2)return a;if(i===0&&s===-1){if(Math.abs(n.mag-Math.log10(a.mag))>bt)return a;{const r=Math.pow(10,Math.log10(a.mag)-n.mag),l=n.sign+a.sign*r;return M(Math.sign(l),1,n.mag+Math.log10(Math.abs(l)))}}if(i===1&&s===0){if(Math.abs(a.mag-Math.log10(n.mag))>bt)return a;{const r=Math.pow(10,a.mag-Math.log10(n.mag)),l=n.sign+a.sign*r;return M(Math.sign(l),1,Math.log10(n.mag)+Math.log10(Math.abs(l)))}}if(Math.abs(a.mag-n.mag)>bt)return a;{const r=Math.pow(10,a.mag-n.mag),l=n.sign+a.sign*r;return M(Math.sign(l),1,n.mag+Math.log10(Math.abs(l)))}}plus(e){return this.add(e)}sub(e){return this.add(d(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const t=d(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer))return t;if(this.sign===0||t.sign===0)return k(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return k(this.sign*t.sign,0,1);let a,n;if(this.layer>t.layer||this.layer==t.layer&&Math.abs(this.mag)>Math.abs(t.mag)?(a=this,n=t):(a=t,n=this),a.layer===0&&n.layer===0)return o.fromNumber(a.sign*n.sign*a.mag*n.mag);if(a.layer>=3||a.layer-n.layer>=2)return M(a.sign*n.sign,a.layer,a.mag);if(a.layer===1&&n.layer===0)return M(a.sign*n.sign,1,a.mag+Math.log10(n.mag));if(a.layer===1&&n.layer===1)return M(a.sign*n.sign,1,a.mag+n.mag);if(a.layer===2&&n.layer===1){const i=M(Math.sign(a.mag),a.layer-1,Math.abs(a.mag)).add(M(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)));return M(a.sign*n.sign,i.layer+1,i.sign*i.mag)}if(a.layer===2&&n.layer===2){const i=M(Math.sign(a.mag),a.layer-1,Math.abs(a.mag)).add(M(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)));return M(a.sign*n.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=d(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?o.dNaN:this.layer===0?M(this.sign,0,1/this.mag):M(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const t=d(e);return this.sign>t.sign?1:this.sign<t.sign?-1:this.sign*this.cmpabs(e)}cmpabs(e){const t=d(e),a=this.mag>0?this.layer:-this.layer,n=t.mag>0?t.layer:-t.layer;return a>n?1:a<n?-1:this.mag>t.mag?1:this.mag<t.mag?-1:0}compare(e){return this.cmp(e)}isNan(){return isNaN(this.sign)||isNaN(this.layer)||isNaN(this.mag)}isFinite(){return isFinite(this.sign)&&isFinite(this.layer)&&isFinite(this.mag)}eq(e){const t=d(e);return this.sign===t.sign&&this.layer===t.layer&&this.mag===t.mag}equals(e){return this.eq(e)}neq(e){return!this.eq(e)}notEquals(e){return this.neq(e)}lt(e){return this.cmp(e)===-1}lte(e){return!this.gt(e)}gt(e){return this.cmp(e)===1}gte(e){return!this.lt(e)}max(e){const t=d(e);return this.lt(t)?t:this}min(e){const t=d(e);return this.gt(t)?t:this}maxabs(e){const t=d(e);return this.cmpabs(t)<0?t:this}minabs(e){const t=d(e);return this.cmpabs(t)>0?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 a=d(e);return this.eq_tolerance(a,t)?0:this.cmp(a)}compare_tolerance(e,t){return this.cmp_tolerance(e,t)}eq_tolerance(e,t){const a=d(e);if(t==null&&(t=1e-7),this.sign!==a.sign||Math.abs(this.layer-a.layer)>1)return!1;let n=this.mag,i=a.mag;return this.layer>a.layer&&(i=Nt(i)),this.layer<a.layer&&(n=Nt(n)),Math.abs(n-i)<=t*Math.max(Math.abs(n),Math.abs(i))}equals_tolerance(e,t){return this.eq_tolerance(e,t)}neq_tolerance(e,t){return!this.eq_tolerance(e,t)}notEquals_tolerance(e,t){return this.neq_tolerance(e,t)}lt_tolerance(e,t){const a=d(e);return!this.eq_tolerance(a,t)&&this.lt(a)}lte_tolerance(e,t){const a=d(e);return this.eq_tolerance(a,t)||this.lt(a)}gt_tolerance(e,t){const a=d(e);return!this.eq_tolerance(a,t)&&this.gt(a)}gte_tolerance(e,t){const a=d(e);return this.eq_tolerance(a,t)||this.gt(a)}pLog10(){return this.lt(o.dZero)?o.dZero:this.log10()}absLog10(){return this.sign===0?o.dNaN:this.layer>0?M(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):M(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?o.dNaN:this.layer>0?M(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):M(this.sign,0,Math.log10(this.mag))}log(e){return e=d(e),this.sign<=0||e.sign<=0||e.sign===1&&e.layer===0&&e.mag===1?o.dNaN:this.layer===0&&e.layer===0?M(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):o.div(this.log10(),e.log10())}log2(){return this.sign<=0?o.dNaN:this.layer===0?M(this.sign,0,Math.log2(this.mag)):this.layer===1?M(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?M(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):M(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?o.dNaN:this.layer===0?M(this.sign,0,Math.log(this.mag)):this.layer===1?M(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?M(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):M(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const t=d(e),a=this,n=t;if(a.sign===0)return n.eq(0)?k(1,0,1):a;if(a.sign===1&&a.layer===0&&a.mag===1)return a;if(n.sign===0)return k(1,0,1);if(n.sign===1&&n.layer===0&&n.mag===1)return a;const i=a.absLog10().mul(n).pow10();return this.sign===-1?Math.abs(n.toNumber()%2)%2===1?i.neg():Math.abs(n.toNumber()%2)%2===0?i:o.dNaN:i}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return o.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 M(1,0,t);if(e.sign===0)return o.dOne;e=k(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?M(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?M(-e.sign,e.layer+1,-e.mag):o.dOne}pow_base(e){return d(e).pow(this)}root(e){const t=d(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?o.exp(o.mul(this,o.ln(this).sub(1))):o.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(k(1,0,24)))return o.fromNumber(Qn(this.sign*this.mag));const e=this.mag-1;let t=.9189385332046727;t=t+(e+.5)*Math.log(e),t=t-e;const a=e*e;let n=e,i=12*n,s=1/i,r=t+s;if(r===t||(t=r,n=n*a,i=360*n,s=1/i,r=t-s,r===t))return o.exp(t);t=r,n=n*a,i=1260*n;let l=1/i;return t=t+l,n=n*a,i=1680*n,l=1/i,t=t-l,o.exp(t)}else return this.layer===1?o.exp(o.mul(this,o.ln(this).sub(1))):o.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?o.dOne:this.layer===0&&this.mag<=709.7?o.fromNumber(Math.exp(this.sign*this.mag)):this.layer===0?M(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?M(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):M(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return o.fromNumber(Math.sqrt(this.sign*this.mag));if(this.layer===1)return M(1,2,Math.log10(this.mag)-.3010299956639812);{const e=o.div(k(this.sign,this.layer-1,this.mag),k(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=k(1,0,1)){if(e===1)return o.pow(this,t);if(e===0)return new o(t);if(this.eq(o.dOne))return o.dOne;if(this.eq(-1))return o.pow(this,t);if(e===Number.POSITIVE_INFINITY){const i=this.toNumber();if(i<=1.444667861009766&&i>=.06598803584531254){if(i>1.444667861009099)return o.fromNumber(Math.E);const s=o.ln(this).neg();return s.lambertw().div(s)}else return i>1.444667861009766?o.fromNumber(Number.POSITIVE_INFINITY):o.dNaN}if(this.eq(o.dZero)){let i=Math.abs((e+1)%2);return i>1&&(i=2-i),o.fromNumber(i)}if(e<0)return o.iteratedlog(t,this,-e);t=d(t);const a=e;e=Math.trunc(e);const n=a-e;if(this.gt(o.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let i=0;i<e;++i){const s=t;if(t=this.pow(t),s.eq(t))return t}if(n!=0){const i=this.pow(t);return t.mul(1-n).add(i.mul(n))}return t}n!==0&&(t.eq(o.dOne)?this.gt(10)?t=this.pow(n):(t=o.fromNumber(o.tetrate_critical(this.toNumber(),n)),this.lt(2)&&(t=t.sub(1).mul(this.minus(1)).plus(1))):this.eq(10)?t=t.layeradd10(n):t=t.layeradd(n,this));for(let i=0;i<e;++i){if(t=this.pow(t),!isFinite(t.layer)||!isFinite(t.mag))return t.normalize();if(t.layer-this.layer>3)return k(t.sign,t.layer+(e-i-1),t.mag);if(i>1e4)return t}return t}iteratedexp(e=2,t=k(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return o.tetrate(e,-t,this);e=d(e);let a=o.fromDecimal(this);const n=t;t=Math.trunc(t);const i=n-t;if(a.layer-e.layer>3){const s=Math.min(t,a.layer-e.layer-3);t-=s,a.layer-=s}for(let s=0;s<t;++s){if(a=a.log(e),!isFinite(a.layer)||!isFinite(a.mag))return a.normalize();if(s>1e4)return a}return i>0&&i<1&&(e.eq(10)?a=a.layeradd10(-i):a=a.layeradd(-i,e)),a}slog(e=10,t=100){let a=.001,n=!1,i=!1,s=this.slog_internal(e).toNumber();for(let r=1;r<t;++r){const m=new o(e).tetrate(s).gt(this);if(r>1&&i!=m&&(n=!0),i=m,n?a/=2:a*=2,a=Math.abs(a)*(m?-1:1),s+=a,a===0)break}return o.fromNumber(s)}slog_internal(e=10){if(e=d(e),e.lte(o.dZero)||e.eq(o.dOne))return o.dNaN;if(e.lt(o.dOne))return this.eq(o.dOne)?o.dZero:this.eq(o.dZero)?o.dNegOne:o.dNaN;if(this.mag<0||this.eq(o.dZero))return o.dNegOne;let t=0,a=o.fromDecimal(this);if(a.layer-e.layer>3){const n=a.layer-e.layer-3;t+=n,a.layer-=n}for(let n=0;n<100;++n)if(a.lt(o.dZero))a=o.pow(e,a),t-=1;else{if(a.lte(o.dOne))return o.fromNumber(t+o.slog_critical(e.toNumber(),a.toNumber()));t+=1,a=o.log(a,e)}return o.fromNumber(t)}static slog_critical(e,t){return e>10?t-1:o.critical_section(e,t,Sn)}static tetrate_critical(e,t){return o.critical_section(e,t,In)}static critical_section(e,t,a){t*=10,t<0&&(t=0),t>10&&(t=10),e<2&&(e=2),e>10&&(e=10);let n=0,i=0;for(let r=0;r<Me.length;++r)if(Me[r]==e){n=a[r][Math.floor(t)],i=a[r][Math.ceil(t)];break}else if(Me[r]<e&&Me[r+1]>e){const l=(e-Me[r])/(Me[r+1]-Me[r]);n=a[r][Math.floor(t)]*(1-l)+a[r+1][Math.floor(t)]*l,i=a[r][Math.ceil(t)]*(1-l)+a[r+1][Math.ceil(t)]*l;break}const s=t-Math.floor(t);return n<=0||i<=0?n*(1-s)+i*s:Math.pow(e,Math.log(n)/Math.log(e)*(1-s)+Math.log(i)/Math.log(e)*s)}layeradd10(e){e=o.fromValue_noAlloc(e).toNumber();const t=o.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 a=Math.trunc(e);e-=a,t.layer+=a}if(e<=-1){const a=Math.trunc(e);if(e-=a,t.layer+=a,t.layer<0)for(let n=0;n<100;++n){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 n=this.slog(t).toNumber()+e;return n>=0?o.tetrate(t,n):Number.isFinite(n)?n>=-1?o.log(o.tetrate(t,n+1),t):o.log(o.log(o.tetrate(t,n+2),t),t):o.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return o.fromNumber(Lt(this.toNumber()));if(this.layer===0)return o.fromNumber(Lt(this.sign*this.mag));if(this.layer===1)return Wt(this);if(this.layer===2)return Wt(this);if(this.layer>=3)return k(this.sign,this.layer-1,this.mag);throw"Unhandled behavior in lambertw()"}ssqrt(){if(this.sign==1&&this.layer>=3)return k(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=k(1,0,1)){t=d(t);const a=e;e=Math.trunc(e);const n=a-e;n!==0&&(t.eq(o.dOne)?(++e,t=o.fromNumber(n)):this.eq(10)?t=t.layeradd10(n):t=t.layeradd(n,this));for(let i=0;i<e;++i){if(t=this.tetrate(t.toNumber()),!isFinite(t.layer)||!isFinite(t.mag))return t.normalize();if(i>10)return t}return t}sin(){return this.mag<0?this:this.layer===0?o.fromNumber(Math.sin(this.sign*this.mag)):k(0,0,0)}cos(){return this.mag<0?o.dOne:this.layer===0?o.fromNumber(Math.cos(this.sign*this.mag)):k(0,0,0)}tan(){return this.mag<0?this:this.layer===0?o.fromNumber(Math.tan(this.sign*this.mag)):k(0,0,0)}asin(){return this.mag<0?this:this.layer===0?o.fromNumber(Math.asin(this.sign*this.mag)):k(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?o.fromNumber(Math.acos(this.toNumber())):this.layer===0?o.fromNumber(Math.acos(this.sign*this.mag)):k(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?o.fromNumber(Math.atan(this.sign*this.mag)):o.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 o.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return o.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?k(Number.NaN,Number.NaN,Number.NaN):o.ln(this.add(1).div(o.fromNumber(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(o.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 E=o;E.fromStringCache=new pn(_n);E.dZero=k(0,0,0);E.dOne=k(1,0,1);E.dNegOne=k(-1,0,1);E.dTwo=k(1,0,2);E.dTen=k(1,0,10);E.dNaN=k(Number.NaN,Number.NaN,Number.NaN);E.dInf=k(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);E.dNegInf=k(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);E.dNumberMax=M(1,0,Number.MAX_VALUE);E.dNumberMin=M(1,0,Number.MIN_VALUE);d=E.fromValue_noAlloc;M=E.fromComponents;k=E.fromComponents_noNormalize;E.fromMantissaExponent;E.fromMantissaExponent_noNormalize;const Mn=new E(1);function Ze(e,t,a=!0){let n=E.log10(e).floor(),i=E.div(e,E.pow(10,n));i.toStringWithDecimalPlaces(t)==="10"&&(i=Mn,n=n.add(1));const s=n.gte(1e9)?se(n,Math.max(Math.max(t,3),F.defaultDecimalsShown)):n.gte(1e4)?mt(n,0):n.toStringWithDecimalPlaces(0);return a?i.toStringWithDecimalPlaces(t)+"e"+s:"e"+s}function mt(e,t){if(e==null)return"NaN";if(e=new E(e),e.mag<.001)return 0 .toFixed(t);const n=e.toStringWithDecimalPlaces(t).split(".");return n[0]=n[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),n.length==1?n[0]:n[0]+"."+n[1]}function ia(e,t){return e==null?"NaN":(e=new E(e),e.mag<1e-4?0 .toFixed(t):(e.mag<.1&&t!==0&&(t=Math.max(Math.max(t,e.log10().negate().ceil().toNumber()),F.defaultDecimalsShown)),e.toStringWithDecimalPlaces(t)))}const kn=new E("eeee1000"),Tn=new E("e100000"),Xt=new E("e1000"),sa=new E(1e9),Dn=new E(1e6),Rn=new E(1e3),Vn=new E(.98),zn=new E(.001),ra=new E(0);function se(e,t,a){if(t==null&&(t=F.defaultDecimalsShown),a=a!=null?a:F.defaultShowSmall,e=new E(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if(e.sign<0)return"-"+se(e.neg(),t);if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(kn)){const n=e.slog();return n.gte(Dn)?"F"+se(n.floor()):E.pow(10,n.sub(n.floor())).toStringWithDecimalPlaces(3)+"F"+mt(n.floor(),0)}else{if(e.gte(Tn))return Ze(e,0,!1);if(e.gte(Xt))return Ze(e,0);if(e.gte(sa))return Ze(e,t);if(e.gte(Rn))return mt(e,0);if(e.gte(zn)||!a)return ia(e,t);if(e.eq(ra))return 0 .toFixed(t)}return e=la(e),e.lt(Xt)?Ze(e,t).replace(/([^(?:e|F)]*)$/,"-$1"):se(e,t)+"\u207B\xB9"}function ne(e){return e=new E(e),e.sign<0?"-"+ne(e.neg()):e.gte(sa)||e.lte(Vn)&&!e.eq(ra)?se(e):se(e,0)}function oa(e){return E.lt(e,0)?"-"+oa(E.neg(e)):E.gt(e,2**51)?se(E.div(e,31536e3))+"y":(e=new E(e).toNumber(),e<60?se(e)+"s":e<3600?ne(Math.floor(e/60))+"m "+se(e%60)+"s":e<86400?ne(Math.floor(e/3600))+"h "+ne(Math.floor(e/60)%60)+"m "+ne(e%60)+"s":e<31536e3?ne(Math.floor(e/84600)%365)+"d "+ne(Math.floor(e/3600)%24)+"h "+ne(Math.floor(e/60)%60)+"m":ne(Math.floor(e/31536e3))+"y "+ne(Math.floor(e/84600)%365)+"d "+ne(Math.floor(e/3600)%24)+"h")}function Pn(e,t,a){e=new E(e);let n=e.toStringWithDecimalPlaces(t);return new E(n).gte(a)&&(n=E.sub(a,Math.pow(.1,t)).toStringWithDecimalPlaces(t)),n}function xn(e,t){return se(e,t,!0)}function la(e){let t=E.log10(e).ceil();const a=E.div(e,E.pow(10,t));return t=t.neg(),e=new E(10).pow(t).times(a),e}var qn=Object.freeze(Object.defineProperty({__proto__:null,default:E,exponentialFormat:Ze,commaFormat:mt,regularFormat:ia,format:se,formatWhole:ne,formatTime:oa,toPlaces:Pn,formatSmall:xn,invertOOM:la},Symbol.toStringTag,{value:"Module"}));const{exponentialFormat:Fn,commaFormat:Gn,regularFormat:On,format:Aa,formatWhole:Et,formatTime:Tt,toPlaces:Un,formatSmall:Yn,invertOOM:Jn}=qn;window.Decimal=E;window.exponentialFormat=Fn;window.commaFormat=Gn;window.regularFormat=On;window.format=Aa;window.formatWhole=Et;window.formatTime=Tt;window.toPlaces=Un;window.formatSmall=Yn;window.invertOOM=Jn;function Ln(e){let t=e.replace(/([A-Z])/g," $1");return t=t.charAt(0).toUpperCase()+t.slice(1),t}function jt(e){return typeof e=="function"}var J=(e=>(e.Up="Up",e.Down="Down",e.Left="Left",e.Right="Right",e.Default="Up",e))(J||{});const gt=Symbol("DoNotCache");function ve(e,t){const a=e[t];jt(a)&&a.length===0&&!a[gt]?e[t]=z(a.bind(e)):jt(a)&&(e[t]=a.bind(e),e[t][gt]=!0)}const Dt=Symbol("Component"),Rt=Symbol("GatherProps");let Wn=0;function ua(e="feature-"){return e+Wn++}function K(e){return e[gt]=!0,e}function $e(e,t,a){e[t]===void 0&&a!=null&&(e[t]=a)}const ke={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 Vt=(e=>(e.Classic="classic",e.Paper="paper",e.Nordic="nordic",e.Aqua="aqua",e))(Vt||{}),ht={classic:ke,paper:{...ke,variables:{...ke.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:{...ke,variables:{...ke.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:{...ke,variables:{...ke.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}};const Z=ea();"fonts"in document&&(document.fonts.onloadingdone=()=>Z.emit("fontsLoaded"));var Xn=Object.freeze(Object.defineProperty({__proto__:null,globalBus:Z},Symbol.toStringTag,{value:"Module"}));const jn=it({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{}});var D=window.player=jn;function ca(e){return JSON.stringify(e,(t,a)=>u(a))}function da(e={}){return Object.assign({id:`${F.id}-0`,name:"Default Save",tabs:F.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:F.id,modVersion:F.versionNumber,layers:{}},e)}function ie(e){const t=_e.compressToUTF16(ca(e!=null?e:D));return localStorage.setItem((e!=null?e:D).id,t),t}async function Hn(){$n();try{let e=localStorage.getItem(x.active);if(e==null){await Re(Ye());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=_e.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==F.id){await Re(Ye());return}t.id=x.active,await Re(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
`,e),await Re(Ye())}}function Ye(){const e=ut(),t=da({id:e});return ie(t),x.saves.push(e),t}function ut(){let e,t=0;do e=`${F.id}-${t++}`;while(localStorage.getItem(e)!=null);return e}const Kn=I(!1);async function Re(e){console.info("Loading save",e),Kn.value=!0;const{layers:t,removeLayer:a,addLayer:n}=await dt(()=>Promise.resolve().then(function(){return Ci}),void 0),{fixOldSave:i,getInitialLayers:s}=await dt(()=>Promise.resolve().then(function(){return ko}),void 0);for(const r in t){const l=t[r];l&&a(l)}s(e).forEach(r=>n(r,e)),e=da(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,F.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==F.versionNumber&&(i(e.modVersion,e),e.modVersion=F.versionNumber),Object.assign(D,e),x.active=D.id,Z.emit("onLoad")}setInterval(()=>{D.autosave&&ie()},1e3);window.onbeforeunload=()=>{D.autosave&&ie()};window.save=ie;const Zn=window.hardReset=async()=>{await Re(Ye())};window.deleteLowerSaves=()=>{const e=Object.values(x.saves).indexOf(D.id)+1;Object.values(x.saves).slice(e).forEach(t=>localStorage.removeItem(t)),x.saves=x.saves.slice(0,e)};const at=it({active:"",saves:[],showTPS:!0,theme:Vt.Nordic,unthrottled:!1,alignUnits:!1,autoplay:!1,fast:!1});fe(at,e=>{const t=_e.compressToUTF16(JSON.stringify(e));localStorage.setItem(F.id,t)},{deep:!0});var x=window.settings=at;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Vt.Nordic,alignUnits:!1,autoplay:!1,fast:!1};Z.emit("loadSettings",e),Object.assign(at,e),Zn()};function $n(){try{let e=localStorage.getItem(F.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=_e.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(at,t)}Z.emit("loadSettings",at)}catch{}}const ma=it([]);function ei(e){ma.push(e)}const ti=it([]),ai=it([]),ni={class:"table"},me=G({__name:"Row",setup(e){const t=z(()=>ht[x.theme].mergeAdjacent);return(a,n)=>(f(),C("div",ni,[c("div",{class:ee(["row",{mergeAdjacent:u(t)}])},[we(a.$slots,"default")],2)]))}});function Ne(e,t="span"){return typeof e=="function"?G({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),G({template:e})):G({render:()=>({})}):e}function Je(e){if(ga(e))return typeof e=="function"?e():Ne(e);const t=e[Dt];return A(t,e[Rt](),null)}function ii(e){if(ga(e))return typeof e=="function"?e():typeof e=="string"?A(re,null,[e]):A(e,null,null);const t=e[Dt];return A(t,e[Rt](),null)}function ga(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[gt]===!0}function si(e,t="div"){const a=pe();return St(()=>{a.value=Ne(ze(e),t)}),a}function vt(e,t="div"){const a=pe(null);return St(()=>{const n=ze(e);a.value=n==""||n==null?null:Ne(n,t)}),a}function ze(e){return u(u(e))}function ae(...e){return e.includes(Object)||e.push(Object),e}var L=(e,t)=>{const a=e.__vccOpts||e;for(const[n,i]of t)a[n]=i;return a};const ri=G({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var p;const a=I({}),n=new ResizeObserver(l),i=I(null);Qt(()=>{const v=i.value;v!=null&&n.observe(v)});let s=!0,r=I((p=i.value)==null?void 0:p.getBoundingClientRect());function l(){s&&(s=!1,Pe(()=>{var v;r.value=(v=i.value)==null?void 0:v.getBoundingClientRect(),Object.values(a.value).filter(b=>b).forEach(b=>b.rect=b.element.getBoundingClientRect()),t("updateNodes",a.value),s=!0}))}Z.on("fontsLoaded",l);const m={attributes:!1,childList:!0,subtree:!1};rt(Pt,(v,b)=>{const N=new MutationObserver(()=>g(v));N.observe(b,m),a.value[v]={element:b,observer:N,rect:b.getBoundingClientRect()},l()}),rt(xt,v=>{var b;(b=a.value[v])==null||b.observer.disconnect(),a.value[v]=void 0,l()}),rt(ha,a),rt(va,r);function g(v){const b=a.value[v];b!=null&&(b.rect=b.element.getBoundingClientRect(),t("updateNodes",a.value))}return(v,b)=>(f(),C(re,null,[we(v.$slots,"default",{},void 0,!0),c("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var fa=L(ri,[["__scopeId","data-v-2b1dc1bc"]]);const oi=["onPointerdown"],li={class:"modal-wrapper"},Ai={class:"modal-container"},ui={class:"modal-header"},ci=w(" default header "),di={class:"modal-body"},mi=w(" default body "),gi={class:"modal-footer"},fi=c("div",{class:"modal-default-flex-grow"},null,-1),Fe=G({__name:"Modal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:a}){const i=ye(e),s=z(()=>u(i.modelValue)||l.value);function r(){a("update:modelValue",!1)}const l=I(!1),m=I(null),g=z(()=>{var p,v;return(v=(p=m.value)==null?void 0:p.nodes)!=null?v:null});return t({isOpen:s,nodes:g}),(p,v)=>(f(),O(wa,{to:"#modal-root"},[A($t,{name:"modal",onBeforeEnter:v[0]||(v[0]=b=>l.value=!0),onAfterLeave:v[1]||(v[1]=b=>l.value=!1)},{default:T(()=>[Mt(c("div",et({class:"modal-mask",onPointerdown:tt(r,["self"])},p.$attrs),[c("div",li,[c("div",Ai,[c("div",ui,[we(p.$slots,"header",{shown:u(s)},()=>[ci])]),c("div",di,[A(fa,{ref_key:"contextRef",ref:m},{default:T(()=>[we(p.$slots,"body",{shown:u(s)},()=>[mi])]),_:3},512)]),c("div",gi,[we(p.$slots,"footer",{shown:u(s)},()=>[c("div",{class:"modal-default-footer"},[fi,c("button",{class:"button modal-default-button",onClick:r}," Close ")])])])])])],16,oi),[[_a,e.modelValue]])]),_:3})]))}}),De=Symbol("ProxyState");function zt(e,t={}){const a=t;let n=!1;function i(){return n||(Object.assign(a,e(a)),n=!0),a}return new Proxy(a,{get(s,r){if(r===De)return i();const l=i()[r];return l!=null&&typeof l=="object"&&_t in l?l[_t]:l},set(s,r,l){return i()[r]=l,!0},has(s,r){return r===De?!0:Reflect.has(i(),r)},ownKeys(){return Reflect.ownKeys(i())},getOwnPropertyDescriptor(s,r){return n||(Object.assign(a,e(a)),n=!0),Object.getOwnPropertyDescriptor(s,r)}})}var H=window.state=kt({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const pt=Symbol("PersistentState"),Xe=Symbol("DefaultValue"),ft=Symbol("StackTrace"),Bt=Symbol("Deleted"),_t=Symbol("NonPersistent"),Ve=Symbol("SaveDataPath");function hi(){var e,t;return(t=(e=new Error().stack)==null?void 0:e.split(`
`).slice(3,5).map(a=>a.trim()).join(`
`))!=null?t:""}function Ht(e,t){var a;if(E.isNaN(t))throw H.hasNaN||(D.autosave=!1,H.hasNaN=!0,H.NaNPath=e[Ve],H.NaNPersistent=e),console.error("Attempted to save NaN value to",(a=e[Ve])==null?void 0:a.join("."),e),"Attempted to set NaN value. See above for details";e[pt].value=t}function vi(e){const t=be(e)?e:I(e);be(e)&&(e=e.value);const a=z({get(){return t.value},set(i){Ht(n,i)}});a[Xe]=e;const n={get value(){return t.value},set value(i){Ht(n,i)},__v_isRef:!0,[pt]:t,[Xe]:e,[ft]:hi(),[Bt]:!1,[_t]:a,[Ve]:void 0};return Ae.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",n,`
Created at:
`+n[ft]):Le[Ae[Ae.length-1]].add(n),n}function pi(e){return e!=null&&typeof e=="object"&&pt in e}Z.on("addLayer",(e,t)=>{const a=[],n=(i,s=[])=>{let r=!1;return Object.keys(i).forEach(l=>{let m=i[l];if(m!=null&&typeof m=="object")if(De in m&&(m=m[De]),pi(m)){if(r=!0,m[Bt]){console.warn("Deleted persistent ref present in returned object. Ignoring...",m,`
Created at:
`+m[ft]);return}Le[e.id].delete(m);const g=[e.id,...s,l];m[Ve]!=null&&JSON.stringify(g)!==JSON.stringify(m[Ve])&&console.error(`Persistent ref is being saved to \`${g.join(".")}\` when it's already present at \`${m[Ve].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,m),m[Ve]=g;const p=s.reduce((b,N)=>(N in b||(b[N]={}),b[N]),t),v=p[l];p[l]=m[pt],Ia(p)?v!=null?p[l]=v:p[l]=m[Xe]:v!=null?p[l].value=v:p[l].value=m[Xe]}else!(m instanceof E)&&!be(m)&&!a.includes(m)&&(typeof m.type=="symbol"&&a.push(m),n(m,[...s,l])&&(Ct(m)&&!Ct(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.",De in i?i[De]:i,l):r=!0))}),r};n(e[De]),Le[e.id].forEach(i=>{i[Bt]||console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,i,`
Created at:
`+i[ft])}),Le[e.id].clear()});const Pt=Symbol("RegisterNode"),xt=Symbol("UnregisterNode"),ha=Symbol("Nodes"),va=Symbol("Bounds"),$=kt({});window.layers=$;const Le={},Ae=[];function pa(e,t){return zt(()=>{const a={},n=a.emitter=ea();if(a.on=n.on.bind(n),a.emit=n.emit.bind(n),a.nodes=I({}),a.id=e,Ae.push(e),Le[e]=new Set,a.minimized=vi(!1),Object.assign(a,t.call(a)),Ae[Ae.length-1]==null||Ae[Ae.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen
Stack: ${Ae}
Trying to pop ${a.id}`;Ae.pop(),ve(a,"color"),ve(a,"display"),ve(a,"classes"),ve(a,"style"),ve(a,"name"),$e(a,"name",a.id),ve(a,"minWidth"),$e(a,"minWidth",600),ve(a,"minimizable"),$e(a,"minimizable",!0),ve(a,"minimizedDisplay");const i=a.style;return a.style=z(()=>{var r,l;let s=u(a.minWidth);return(typeof s=="number"||!Number.isNaN(parseInt(s)))&&(s=s+"px"),[(r=u(i))!=null?r:"",(l=a.minimized)!=null&&l.value?{flexGrow:"0",flexShrink:"0",width:"60px",minWidth:"",flexBasis:"",margin:"0"}:{flexGrow:"",flexShrink:"",width:"",minWidth:s,flexBasis:s,margin:""}]}),a})}function ya(e,t){if(console.info("Adding layer",e.id),$[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,$[e.id]);return}$e(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),$[e.id]=e,Z.emit("addLayer",e,t.layers[e.id])}function yi(e){return $[e]}function ba(e){console.info("Removing layer",e.id),Z.emit("removeLayer",e),$[e.id]=void 0}function bi(e){ba(e),ya(e,D)}function Ni(e){const t=I(!1);return{openModal:()=>t.value=!0,modal:K(()=>A(Fe,{modelValue:t.value,"onUpdate:modelValue":a=>t.value=a},{header:()=>A("h2",null,[u(e.name)]),body:u(e.display)}))}}Z.on("update",function(t){Object.values($).forEach(a=>{a==null||a.emit("preUpdate",t)}),Object.values($).forEach(a=>{a==null||a.emit("update",t)}),Object.values($).forEach(a=>{a==null||a.emit("postUpdate",t)})});var Ci=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Pt,UnregisterNodeInjectionKey:xt,NodesInjectionKey:ha,BoundsInjectionKey:va,layers:$,persistentRefs:Le,addingLayers:Ae,createLayer:pa,addLayer:ya,getLayer:yi,removeLayer:ba,reloadLayer:bi,setupLayerModal:Ni},Symbol.toStringTag,{value:"Module"}));const Ei=G({components:{Context:fa},props:{index:{type:Number,required:!0},display:{type:ae(Object,String,Function),required:!0},minimizedDisplay:ae(Object,String,Function),minimized:{type:Object,required:!0},name:{type:ae(String),required:!0},color:ae(String),minimizable:ae(Boolean),nodes:{type:Object,required:!0}},emits:["setMinimized"],setup(e){const{display:t,index:a,minimized:n,minimizedDisplay:i}=ye(e),s=si(t),r=vt(i),l=z(()=>F.allowGoBack&&a.value>0&&!ze(n));function m(){D.tabs.splice(u(e.index),1/0)}function g(p){e.nodes.value=p}return{component:s,minimizedComponent:r,showGoBack:l,updateNodes:g,unref:u,goBack:m}}}),Bi={key:1};function _i(e,t,a,n,i,s){const r=Sa("Context");return f(),C("div",{class:"layer-container",style:xe({"--layer-color":e.unref(e.color)})},[e.showGoBack?(f(),C("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...l)=>e.goBack&&e.goBack(...l))},"\u274C")):Q("",!0),e.unref(e.minimized)?(f(),C("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=l=>e.$emit("setMinimized",!1))},[e.minimizedComponent?(f(),O(ce(e.minimizedComponent),{key:0})):(f(),C("div",Bi,q(e.unref(e.name)),1))])):(f(),C("div",{key:2,class:ee(["layer-tab",{showGoBack:e.showGoBack}])},[A(r,{onUpdateNodes:e.updateNodes},{default:T(()=>[(f(),O(ce(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(f(),C("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=l=>e.$emit("setMinimized",!0))}," \u25BC ")):Q("",!0)],4)}var wi=L(Ei,[["render",_i],["__scopeId","data-v-a592996e"]]);const Na=e=>(Ie("data-v-4b4bda40"),e=e(),Se(),e),Ii=Na(()=>c("h2",null,"Changelog",-1)),Si=Na(()=>c("details",{open:""},[c("summary",null,[w("v0.0 Initial Commit - "),c("time",null,"2021-09-04")]),w(" This is the first release :D "),c("ul",null,[c("li",{class:"feature"},"Did everything"),c("li",{class:"fix"},"Had some fun"),c("li",{class:"breaking"},"Removed everything"),c("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),Qi=G({__name:"Changelog",setup(e,{expose:t}){const a=I(!1);return t({open(){a.value=!0}}),(n,i)=>(f(),O(Fe,{modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=s=>a.value=s)},{header:T(()=>[Ii]),body:T(()=>[Si]),_:1},8,["modelValue"]))}});var Mi=L(Qi,[["__scopeId","data-v-4b4bda40"]]),ki=G({props:{element:Object,display:{type:ae(Object,String,Function),required:!0},style:ae(Object,String,Array),classes:ae(Object),direction:ae(String),xoffset:ae(String),yoffset:ae(String),pinned:Object},setup(e){const{element:t,display:a,pinned:n}=ye(e),i=I(!1),s=z(()=>(ze(n)||i.value)&&r.value),r=vt(a),l=pe(Ne(K(()=>{const p=ze(t);return p==null?"":ii(p)})));function m(p){const v=n;p.shiftKey&&v&&(v.value=!v.value,p.stopPropagation(),p.preventDefault())}const g=z(()=>ze(n)&&ht[x.theme].showPin);return{Direction:J,isHovered:i,isShown:s,comp:r,elementComp:l,unref:u,togglePinned:m,showPin:g}}});const Ti={key:0,class:"material-icons pinned"};function Di(e,t,a,n,i,s){return f(),C("div",{class:ee(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=r=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=r=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...r)=>e.togglePinned&&e.togglePinned(...r))},[we(e.$slots,"default",{},void 0,!0),e.elementComp?(f(),O(ce(e.elementComp),{key:0})):Q("",!0),A($t,{name:"fade",css:!!e.comp},{default:T(()=>{var r;return[e.isShown?(f(),C("div",{key:0,class:ee(["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:xe([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(r=e.unref(e.style))!=null?r:{}])},[e.showPin?(f(),C("span",Ti,"push_pin")):Q("",!0),e.comp?(f(),O(ce(e.comp),{key:1})):Q("",!0)],6)):Q("",!0)]}),_:1},8,["css"])],34)}var X=L(ki,[["render",Di],["__scopeId","data-v-638848c0"]]);const Ge=e=>(Ie("data-v-5d3cb6f4"),e=e(),Se(),e),Ri={class:"info-modal-header"},Vi=["src","alt"],zi={class:"info-modal-title"},Pi={key:0},xi={key:0},qi={key:0},Fi=Ge(()=>c("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1)),Gi=Ge(()=>c("br",null,null,-1)),Oi=Ge(()=>c("br",null,null,-1)),Ui=["href"],Yi=Ge(()=>c("span",{class:"material-icons info-modal-discord"},"discord",-1)),Ji=Ge(()=>c("div",null,[c("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[c("span",{class:"material-icons info-modal-discord"},"discord"),w(" The Paper Pilot Community ")])],-1)),Li=Ge(()=>c("div",null,[c("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link",target:"_blank"},[c("span",{class:"material-icons info-modal-discord"},"discord"),w(" The Modding Tree ")])],-1)),Wi=Ge(()=>c("br",null,null,-1));var Xi=G({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const a=e,{title:n,logo:i,author:s,discordName:r,discordLink:l,versionNumber:m,versionTitle:g}=F,p=ye(a),v=I(!1),b=z(()=>Tt(D.timePlayed)),N=z(()=>Ne(K(()=>A(re,null,[ti.map(Je)]))));t({open(){v.value=!0}});function S(){var h;(h=u(p.changelog))==null||h.open()}return(h,Y)=>(f(),O(Fe,{modelValue:v.value,"onUpdate:modelValue":Y[0]||(Y[0]=j=>v.value=j)},{header:T(()=>[c("div",Ri,[u(i)?(f(),C("img",{key:0,class:"info-modal-logo",src:u(i),alt:u(n)},null,8,Vi)):Q("",!0),c("div",zi,[c("h2",null,q(u(n)),1),c("h4",null,[w(" v"+q(u(m)),1),u(g)?(f(),C("span",Pi,": "+q(u(g)),1)):Q("",!0)])])])]),body:T(({shown:j})=>[j?(f(),C("div",xi,[u(s)?(f(),C("div",qi,"By "+q(u(s)),1)):Q("",!0),Fi,Gi,c("div",{class:"link",onClick:S},"Changelog"),Oi,c("div",null,[u(l)?(f(),C("a",{key:0,href:u(l),class:"info-modal-discord-link",target:"_blank"},[Yi,w(" "+q(u(r)),1)],8,Ui)):Q("",!0)]),Ji,Li,Wi,c("div",null,"Time Played: "+q(u(b)),1),(f(),O(ce(u(N))))])):Q("",!0)]),_:1},8,["modelValue"]))}});var ji=L(Xi,[["__scopeId","data-v-5d3cb6f4"]]);const Hi=c("h2",null,"Settings",-1);var Ki=G({__name:"Options",setup(e,{expose:t}){const a=I(!1),n=I("behaviour");function i(l){return l==n.value}function s(l){n.value=l}t({isTab:i,setTab:s,save:ie,open(){a.value=!0}}),Object.keys(ht).map(l=>({label:Ln(l),value:l}));const r=z(()=>Ne(K(()=>A(re,null,[ma.map(Je)]))));return ye(x),ye(D),z({get(){return D.devSpeed===0},set(l){D.devSpeed=l?0:null}}),K(()=>A("span",{class:"option-title"},[w("Unthrottled"),A("desc",null,[w("Allow the game to run as fast as possible. Not battery friendly.")])])),K(()=>A("span",{class:"option-title"},[w("Offline Production"),A(X,{display:"Save-specific",direction:J.Right},{default:()=>[w("*")]}),A("desc",null,[w("Simulate production that occurs while the game is closed.")])])),K(()=>A("span",{class:"option-title"},[w("Autosave"),A(X,{display:"Save-specific",direction:J.Right},{default:()=>[w("*")]}),A("desc",null,[w("Automatically save the game every second or when the game is closed.")])])),K(()=>A("span",{class:"option-title"},[w("Pause game"),A(X,{display:"Save-specific",direction:J.Right},{default:()=>[w("*")]}),A("desc",null,[w("Stop everything from moving.")])])),K(()=>A("span",{class:"option-title"},[w("Theme"),A("desc",null,[w("How the game looks.")])])),K(()=>A("span",{class:"option-title"},[w("Show TPS"),A("desc",null,[w("Show TPS meter at the bottom-left corner of the page.")])])),K(()=>A("span",{class:"option-title"},[w("Align modifier units"),A("desc",null,[w("Align numbers to the beginning of the unit in modifier view.")])])),(l,m)=>(f(),O(Fe,{modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=g=>a.value=g)},{header:T(()=>[Hi]),body:T(()=>[(f(),O(ce(u(r))))]),_:1},8,["modelValue"]))}});const Zi={class:"field"},$i={key:0,class:"field-title"},es=G({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var r;const a=e,n=vt(qe(a,"title"),"span"),i=I((r=a.options.find(l=>l.value===a.modelValue))!=null?r:null);fe(qe(a,"modelValue"),l=>{var m;ze(i)!==l&&(i.value=(m=a.options.find(g=>g.value===l))!=null?m:null)});function s(l){t("update:modelValue",l.value)}return(l,m)=>(f(),C("div",Zi,[u(n)?(f(),C("span",$i,[(f(),O(ce(u(n))))])):Q("",!0),A(u(Pa),{options:e.options,modelValue:i.value,"onUpdate:modelValue":[m[0]||(m[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 ts=["onSubmit"],as={class:"field"},ns={key:0,class:"field-title"},is=["placeholder"],ss=G({__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 a=e,n=vt(qe(a,"title"),"span"),i=pe(null);Qt(()=>{var m;(m=i.value)==null||m.focus()});const s=z({get(){var m;return(m=u(a.modelValue))!=null?m:""},set(m){t("update:modelValue",m)}});function r(){t("submit")}function l(){a.submitOnBlur!==!1?t("submit"):t("cancel")}return(m,g)=>(f(),C("form",{onSubmit:tt(r,["prevent"])},[c("div",as,[u(n)?(f(),C("span",ns,[(f(),O(ce(u(n))))])):Q("",!0),e.textArea?(f(),O(u(xa),{key:1,modelValue:u(s),"onUpdate:modelValue":g[0]||(g[0]=p=>be(s)?s.value=p:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:l,ref_key:"field",ref:i},null,8,["modelValue","placeholder","maxHeight"])):Mt((f(),C("input",{key:2,type:"text","onUpdate:modelValue":g[1]||(g[1]=p=>be(s)?s.value=p:null),placeholder:e.placeholder,class:ee({fullWidth:!e.title}),onBlur:l,ref_key:"field",ref:i},null,42,is)),[[Qa,u(s)]])])],40,ts))}});var qt=L(ss,[["__scopeId","data-v-90bd4994"]]);const rs={key:0},os=["onClick","disabled"],ls={key:0},As=["onClick"],us=G({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const n=ye(e),i=I(!1);fe(i,l=>{t("confirmingChanged",l)});function s(){if(u(n.skipConfirm)){t("click");return}i.value&&t("click"),i.value=!i.value}function r(){i.value=!1}return(l,m)=>(f(),C("span",{class:ee(["container",{confirming:i.value}])},[i.value?(f(),C("span",rs,"Are you sure?")):Q("",!0),c("button",{onClick:tt(s,["stop"]),class:"button danger",disabled:e.disabled},[i.value?(f(),C("span",ls,"Yes")):we(l.$slots,"default",{key:1},void 0,!0)],8,os),i.value?(f(),C("button",{key:1,class:"button",onClick:tt(r,["stop"])},"No",8,As)):Q("",!0)],2))}});var cs=L(us,[["__scopeId","data-v-2f8ef34c"]]);const ds=["onClick"],ms=G({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const a=I(!1),n=I(null);function i(){t("click"),n.value&&clearTimeout(n.value),a.value=!1,Pe(()=>{a.value=!0,n.value=setTimeout(()=>a.value=!1,500)})}return(s,r)=>(f(),C("button",{onClick:tt(i,["stop"]),class:ee(["feedback",{activated:a.value,left:e.left}])},[we(s.$slots,"default",{},void 0,!0)],10,ds))}});var gs=L(ms,[["__scopeId","data-v-01a1b95c"]]);const Ce=e=>(Ie("data-v-c3447434"),e=e(),Se(),e),fs=Ce(()=>c("div",{class:"handle material-icons"},"drag_handle",-1)),hs={key:0,class:"actions"},vs=Ce(()=>c("span",{class:"material-icons"},"content_paste",-1)),ps=Ce(()=>c("span",{class:"material-icons"},"content_copy",-1)),ys=Ce(()=>c("span",{class:"material-icons"},"edit",-1)),bs=Ce(()=>c("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),Ns={key:1,class:"actions"},Cs=Ce(()=>c("span",{class:"material-icons"},"check",-1)),Es=Ce(()=>c("span",{class:"material-icons"},"close",-1)),Bs={key:2,class:"details"},_s={class:"save-version"},ws=Ce(()=>c("br",null,null,-1)),Is={key:0},Ss={key:3,class:"details"},Qs={key:4,class:"details error"},Ms=Ce(()=>c("br",null,null,-1)),ks=G({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const a=e,{save:n}=ye(a),i=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),s=I(!1),r=I(!1),l=I("");fe(s,()=>{var v;return l.value=(v=n.value.name)!=null?v:""});const m=z(()=>n.value!=null&&n.value.id===D.id),g=z(()=>{var v;return m.value?D.time:(v=n.value!=null&&n.value.time)!=null?v:0});function p(){t("editName",l.value),s.value=!1}return(v,b)=>(f(),C("div",{class:ee(["save",{active:u(m)}])},[fs,s.value?(f(),C("div",Ns,[c("button",{onClick:p,class:"button"},[A(X,{display:"Save",direction:u(J).Left,class:"info"},{default:T(()=>[Cs]),_:1},8,["direction"])]),c("button",{onClick:b[5]||(b[5]=N=>s.value=!s.value),class:"button"},[A(X,{display:"Cancel",direction:u(J).Left,class:"info"},{default:T(()=>[Es]),_:1},8,["direction"])])])):(f(),C("div",hs,[u(n).error==null&&!r.value?(f(),O(gs,{key:0,onClick:b[0]||(b[0]=N=>t("export")),class:"button",left:""},{default:T(()=>[A(X,{display:"Export",direction:u(J).Left,class:"info"},{default:T(()=>[vs]),_:1},8,["direction"])]),_:1})):Q("",!0),u(n).error==null&&!r.value?(f(),C("button",{key:1,onClick:b[1]||(b[1]=N=>t("duplicate")),class:"button"},[A(X,{display:"Duplicate",direction:u(J).Left,class:"info"},{default:T(()=>[ps]),_:1},8,["direction"])])):Q("",!0),u(n).error==null&&!r.value?(f(),C("button",{key:2,onClick:b[2]||(b[2]=N=>s.value=!s.value),class:"button"},[A(X,{display:"Edit Name",direction:u(J).Left,class:"info"},{default:T(()=>[ys]),_:1},8,["direction"])])):Q("",!0),A(cs,{disabled:u(m),onClick:b[3]||(b[3]=N=>t("delete")),onConfirmingChanged:b[4]||(b[4]=N=>r.value=N)},{default:T(()=>[A(X,{display:"Delete",direction:u(J).Left,class:"info"},{default:T(()=>[bs]),_:1},8,["direction"])]),_:1},8,["disabled"])])),u(n).error==null&&!s.value?(f(),C("div",Bs,[c("button",{class:"button open",onClick:b[6]||(b[6]=N=>t("open"))},[c("h3",null,q(u(n).name),1)]),c("span",_s,"v"+q(u(n).modVersion),1),ws,u(g)?(f(),C("div",Is,"Last played "+q(u(i).format(u(g))),1)):Q("",!0)])):u(n).error==null&&s.value?(f(),C("div",Ss,[A(qt,{modelValue:l.value,"onUpdate:modelValue":b[7]||(b[7]=N=>l.value=N),class:"editname",onSubmit:p},null,8,["modelValue"])])):(f(),C("div",Qs,[w(" Error: Failed to load save with id "+q(u(n).id),1),Ms,w(q(u(n).error),1)]))],2))}});var Ts=L(ks,[["__scopeId","data-v-c3447434"]]);const Ft=e=>(Ie("data-v-5b5b1604"),e=e(),Se(),e),Ds=Ft(()=>c("h2",null,"Saves Manager",-1)),Rs={class:"modal-footer"},Vs={class:"field"},zs=Ft(()=>c("span",{class:"field-title"},"Create Save",-1)),Ps={class:"field-buttons"},xs={class:"footer"},qs=Ft(()=>c("div",{style:{"flex-grow":"1"}},null,-1)),Fs=G({__name:"SavesManager",setup(e,{expose:t}){const a=I(!1),n=I(null);t({open(){a.value=!0}});const i=I(!1),s=I(""),r=I(null);fe(s,y=>{y?Pe(()=>{try{if(y[0]!=="{")if(y[0]==="e")y=decodeURIComponent(escape(atob(y)));else if(y[0]==="\u1BE1")y=_e.decompressFromUTF16(y);else{console.warn("Unable to determine preset encoding",y),i.value=!0;return}const _=JSON.parse(y);if(typeof _!="object"){i.value=!0;return}const V=ut();_.id=V,ie(_),s.value="",i.value=!1,x.saves.push(V)}catch{i.value=!0}}):i.value=!1});let l={},m=I(Object.keys(l).reduce((y,_)=>(y.push({label:_.split("/").slice(-1)[0].slice(0,-4),value:l[_]}),y),[]));const g=kt({});function p(y){if(g[y]==null){let _=localStorage.getItem(y);if(_==null)g[y]={error:"Save doesn't exist in localStorage",id:y};else if(_==="dW5kZWZpbmVk")g[y]={error:"Save is undefined",id:y};else try{if(_[0]!=="{")if(_[0]==="e")_=decodeURIComponent(escape(atob(_)));else if(_[0]==="\u1BE1")_=_e.decompressFromUTF16(_);else return console.warn("Unable to determine preset encoding",_),i.value=!0,g[y]={error:"Unable to determine preset encoding",id:y},g[y];g[y]={...JSON.parse(_),id:y}}catch(V){g[y]={error:V,id:y},console.warn(`SavesManager: Failed to load info about save with id ${y}:
${V}
${_}`)}}return g[y]}fe(a,y=>{y&&Object.keys(g).forEach(_=>delete g[_])});const v=z(()=>x.saves.reduce((y,_)=>(y[_]=p(_),y),{}));function b(y){let _;switch(D.id===y?_=ca(D):_=JSON.stringify(v.value[y]),F.exportEncoding){default:console.warn(`Unknown save encoding: ${F.exportEncoding}. Defaulting to lz`);case"lz":_=_e.compressToUTF16(_);break;case"base64":_=btoa(unescape(encodeURIComponent(_)));break;case"plain":break}const V=document.createElement("textarea");V.value=_,document.body.appendChild(V),V.select(),V.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(V)}function N(y){D.id===y&&ie();const _={...v.value[y],id:ut()};ie(_),x.saves.push(_.id)}function S(y){x.saves=x.saves.filter(_=>_!==y),localStorage.removeItem(y),g[y]=void 0}function h(y){v.value[D.id].time=D.time,ie(),g[D.id]=void 0,Re(v.value[y]),g[y]=void 0}function Y(y){if(r.value=y,Pe(()=>{r.value=null}),y[0]!=="{")if(y[0]==="e")y=decodeURIComponent(escape(atob(y)));else if(y[0]==="\u1BE1")y=_e.decompressFromUTF16(y);else{console.warn("Unable to determine preset encoding",y);return}const _=JSON.parse(y);_.id=ut(),ie(_),x.saves.push(_.id),h(_.id)}function j(y,_){const V=v.value[y];V!=null&&(V.name=_,D.id===y?(D.name=_,ie()):(ie(V),g[y]=void 0))}return(y,_)=>(f(),O(Fe,{modelValue:a.value,"onUpdate:modelValue":_[4]||(_[4]=V=>a.value=V),ref_key:"modal",ref:n},{header:T(()=>[Ds]),body:T(({shown:V})=>[V?(f(),O(u(za),{key:0,list:u(x).saves,handle:".handle",itemKey:te=>te},{item:T(({element:te})=>[A(Ts,{save:u(v)[te],onOpen:W=>h(te),onExport:W=>b(te),onEditName:W=>j(te,W),onDuplicate:W=>N(te),onDelete:W=>S(te)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):Q("",!0)]),footer:T(()=>[c("div",Rs,[A(qt,{modelValue:s.value,"onUpdate:modelValue":_[0]||(_[0]=V=>s.value=V),title:"Import Save",placeholder:"Paste your save here!",class:ee({importingFailed:i.value})},null,8,["modelValue","class"]),c("div",Vs,[zs,c("div",Ps,[c("button",{class:"button",onClick:_[1]||(_[1]=V=>h(u(Ye)().id))},"New Game"),Object.keys(u(m)).length>0?(f(),O(es,{key:0,options:u(m),modelValue:r.value,"onUpdate:modelValue":_[2]||(_[2]=V=>Y(V)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):Q("",!0)])]),c("div",xs,[qs,c("button",{class:"button modal-default-button",onClick:_[3]||(_[3]=V=>a.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Ca=L(Fs,[["__scopeId","data-v-5b5b1604"]]);const de=e=>(Ie("data-v-269f7a94"),e=e(),Se(),e),Gs=["src","alt"],Os={key:1,class:"title"},Us=de(()=>c("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),Ys={class:"discord"},Js={class:"discord-links"},Ls={key:0},Ws=["href"],Xs=de(()=>c("li",null,[c("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),js=de(()=>c("li",null,[c("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Hs={href:"https://forums.moddingtree.com/",target:"_blank"},Ks=de(()=>c("span",{class:"material-icons"},"forum",-1)),Zs=de(()=>c("span",{class:"material-icons"},"info",-1)),$s=de(()=>c("span",{class:"material-icons"},"settings",-1)),er=de(()=>c("span",{class:"material-icons"},"settings",-1)),tr=de(()=>c("span",{class:"material-icons"},"info",-1)),ar={href:"https://forums.moddingtree.com/",target:"_blank"},nr=de(()=>c("span",{class:"material-icons"},"forum",-1)),ir={class:"discord"},sr={class:"discord-links"},rr={key:0},or=["href"],lr=de(()=>c("li",null,[c("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Ar=de(()=>c("li",null,[c("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),ur=G({__name:"Nav",setup(e){const t=I(null),a=I(null),n=I(null),i=I(null),{useHeader:s,banner:r,title:l,discordName:m,discordLink:g,versionNumber:p}=F;function v(){window.open(g,"mywindow")}return(b,N)=>(f(),C(re,null,[u(s)?(f(),C("div",et({key:0,class:"nav"},b.$attrs),[u(r)?(f(),C("img",{key:0,src:u(r),class:"banner",alt:u(l)},null,8,Gs)):(f(),C("div",Os,q(u(l)),1)),c("div",{onClick:N[0]||(N[0]=S=>{var h;return(h=i.value)==null?void 0:h.open()}),class:"version-container"},[A(X,{display:"Changelog",direction:u(J).Down,class:"version"},{default:T(()=>[c("span",null,"v"+q(u(p)),1)]),_:1},8,["direction"])]),Us,c("div",Ys,[c("span",{onClick:v,class:"material-icons"},"discord"),c("ul",Js,[u(g)?(f(),C("li",Ls,[c("a",{href:u(g),target:"_blank"},q(u(m)),9,Ws)])):Q("",!0),Xs,js])]),c("div",null,[c("a",Hs,[A(X,{display:"Forums",direction:u(J).Down,yoffset:"5px"},{default:T(()=>[Ks]),_:1},8,["direction"])])]),c("div",{onClick:N[1]||(N[1]=S=>{var h;return(h=t.value)==null?void 0:h.open()})},[A(X,{display:"Info",direction:u(J).Down,class:"info"},{default:T(()=>[Zs]),_:1},8,["direction"])]),c("div",{onClick:N[2]||(N[2]=S=>{var h;return(h=n.value)==null?void 0:h.open()})},[A(X,{display:"Settings",direction:u(J).Down,xoffset:"-66px"},{default:T(()=>[$s]),_:1},8,["direction"])])],16)):(f(),C("div",et({key:1,class:"overlay-nav"},b.$attrs),[c("div",{onClick:N[3]||(N[3]=S=>{var h;return(h=i.value)==null?void 0:h.open()}),class:"version-container"},[A(X,{display:"Changelog",direction:u(J).Right,xoffset:"25%",class:"version"},{default:T(()=>[c("span",null,"v"+q(u(p)),1)]),_:1},8,["direction"])]),c("div",{onClick:N[4]||(N[4]=S=>{var h;return(h=n.value)==null?void 0:h.open()})},[A(X,{display:"Settings",direction:u(J).Right},{default:T(()=>[er]),_:1},8,["direction"])]),c("div",{onClick:N[5]||(N[5]=S=>{var h;return(h=t.value)==null?void 0:h.open()})},[A(X,{display:"Info",direction:u(J).Right},{default:T(()=>[tr]),_:1},8,["direction"])]),c("div",null,[c("a",ar,[A(X,{display:"Forums",direction:u(J).Right,xoffset:"7px"},{default:T(()=>[nr]),_:1},8,["direction"])])]),c("div",ir,[c("span",{onClick:v,class:"material-icons"},"discord"),c("ul",sr,[u(g)?(f(),C("li",rr,[c("a",{href:u(g),target:"_blank"},q(u(m)),9,or)])):Q("",!0),lr,Ar])])],16)),A(ji,{ref_key:"info",ref:t,changelog:i.value},null,8,["changelog"]),A(Ca,{ref_key:"savesManager",ref:a},null,512),A(Ki,{ref_key:"options",ref:n},null,512),A(Mi,{ref_key:"changelog",ref:i},null,512)],64))}});var Ea=L(ur,[["__scopeId","data-v-269f7a94"]]);const cr={class:"inner-tab"},dr=G({__name:"Game",setup(e){const t=qe(D,"tabs"),a=z(()=>Object.keys($)),n=F.useHeader;function i(s){const{display:r,minimized:l,name:m,color:g,minimizable:p,nodes:v,minimizedDisplay:b}=s;return{display:r,minimized:l,name:m,color:g,minimizable:p,nodes:v,minimizedDisplay:b}}return(s,r)=>(f(),C("div",{class:ee(["tabs-container",{useHeader:u(n)}])},[(f(!0),C(re,null,Ma(u(t),(l,m)=>{var g,p;return f(),C("div",{key:m,class:ee(["tab",u((g=u($)[l])==null?void 0:g.classes)]),style:xe(u((p=u($)[l])==null?void 0:p.style))},[m===0&&!u(n)?(f(),O(Ea,{key:0})):Q("",!0),c("div",cr,[u(a).includes(l)?(f(),O(wi,et({key:0},i(u($)[l]),{index:m,onSetMinimized:v=>u($)[l].minimized.value=v}),null,16,["index","onSetMinimized"])):(f(),O(ce(l),{key:1,index:m},null,8,["index"]))])],6)}),128))],2))}});var mr=L(dr,[["__scopeId","data-v-3e0f1aab"]]);const gr=G({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,a)=>(f(),C("div",{style:xe({width:e.width,height:e.height})},null,4))}});const fr=G({__name:"Node",props:{id:null},setup(e){const a=ye(e),n=Ot(Pt,()=>{}),i=Ot(xt,()=>{}),s=pe(null),r=z(()=>s.value&&s.value.parentElement);return fe([r,a.id],([l,m],[g,p])=>{g&&i(u(p)),l&&n(m,l)}),ka(()=>i(u(a.id))),(l,m)=>(f(),C("div",{class:"node",ref_key:"node",ref:s},null,512))}});var hr=L(fr,[["__scopeId","data-v-a48cb382"]]),ct="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAYAAABS3GwHAAAAAXNSR0IArs4c6QAAAqhJREFUeJzt3LFqFFEYBeBdERGJCaKgESUWCsZCTG0dbSyCZTp9B0ufxMJu38EHsA5YCDaiKGihiCxYuhZp7x254e6O6/m+8me4M1k4/HCYzGQCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkGg69gOs2mLxbbHM86fTS8XfdKz7MuzU2A8AYxIAogkA0QSAaAJAtNNjP8Cy1FqX+zceRt1XOzTMBiCaABBNAIgmAEQTAKKtfQvU2rrsb10tzu9t/i7O9y5sF+dHP74U5w92D4rzZ9evNJ1fU7tv7e/VDg2zAYgmAEQTAKIJANEEgGhr3wL10tr21Ly4dbvLObXrq63Rp69N53PMBiCaABBNAIgmAEQTAKLFtUCff30vzl9+LF//ZKdPO1TT2vb0ui/HbACiCQDRBIBoAkA0ASBaXAt07dzF4rzWDk0ml4vTXi1N6zneBerLBiCaABBNAIgmAEQTAKL9t9+G6fW9oFo79Hz3TnHe692e2vWHb46K89cfXhXnvv8zzAYgmgAQTQCIJgBEEwCixTUE69IOaXtWwwYgmgAQTQCIJgBEEwCixTUHGxubxfl8/n6Udujpu7fF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W+2Xeqs9aLUWrVbkyaPPi+ujZ2Cq7Up1/7vTy/KeRjp7f7K4Xv2eZ2uHnABEEwCiCQDRBIBoAkC0g3kv0JdXHxfXzy8eL65XW5pWm1FtpVpa+99sltuV0e6++bC4/uDF8pNrb0+Xr1Od0ZqNE4BoAkA0ASCaABBNAIg2XQtUbWN2m1o71FJte9qtDofECUA0ASCaABBNAIgmAEQ7mCfCzu58G7qf3dfbUfftpbX/VpvniTCYiAAQTQCIJgBEEwCiDf9FXm171lKdQTr0+/bivUBwwASAaAJANAEgmgAQbbpZIPgfvdokJwDRBIBoAkA0ASCaABBtqrkM/qjOUM32NubR/1DfUm2HnABEEwCiCQDRBIBoAkC06d4OzXHo1UqNbr2cAEQTAKIJANEEgGgCQDQt0JGrtiijW5fqjNDoGScnANEEgGgCQDQBIJoAEE0LxJWqtjpmgWAgASCaABBNAIgmAETTAh2J0TM/vT5fZRYIBhIAogkA0QSAaAJANG+HnpT/UPs7/xEGHQgA0QSAaAJANAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAK7ILzj6vECOPLAcAAAAAElFTkSuQmCC";const Gt=e=>(Ie("data-v-310e9657"),e=e(),Se(),e),Er=["ondragstart","ondragend","ondragenter","ondragleave","ondragover","ondrop"],Br={key:0,class:"move-indicator"},_r=Gt(()=>c("span",{class:"material-icons"},"straight",-1)),wr=[_r],Ir={key:1,class:"move-indicator"},Sr=Gt(()=>c("span",{class:"material-icons"},"merge",-1)),Qr=[Sr],Mr={key:2,class:"character-display"},kr=["src"],Tr={key:3,class:"relevancy-display"},Dr=["src"],Rr={key:4,class:"presence-display"},Vr=Gt(()=>c("span",{class:"material-icons"}," extension ",-1)),zr={key:5,class:"level-display"},Pr=["src"],xr=["src"],qr=["src"],Fr=["src"],Gr=["src"],Or=["src"],Ur={key:6,class:"frozen"};var Yr=G({__name:"CharacterSlot",props:{id:null,character:null,isSelected:{type:Boolean},isShop:{type:Boolean},isDragging:{type:Boolean},selected:null,shake:{type:Boolean},frozen:{type:Boolean}},emits:["dragstart","dragend","drop"],setup(e,{emit:t}){const a=e,n=I(!1),i=I(!1);fe(n,r=>{t(r?"dragstart":"dragend")});const s=pe("");return St(()=>{if(a.character==null||a.selected!=null||n.value){s.value="";return}const r=Ne(ue[a.character.type].abilityDescription);s.value=K(()=>A(re,null,[A("b",null,[ue[a.character.type].nickname]),A("br",null,null),A(r,null,null)]))}),(r,l)=>(f(),O(X,{display:u(s),direction:u(J).Up},{default:T(()=>{var m,g,p;return[c("div",{class:ee(["character",{selected:e.isSelected,empty:e.character==null&&e.selected==null,dragging:n.value,isDragging:e.isDragging,draggingOver:i.value,shake:e.shake}]),draggable:"true",ondragstart:()=>n.value=!0,ondragend:()=>n.value=!1,ondragenter:()=>i.value=!0,ondragleave:()=>i.value=!1,ondragover:v=>{var b;e.selected!=null&&!e.isShop&&(((b=e.character)==null?void 0:b.type)!==e.selected.type||e.isSelected)&&v.preventDefault(),e.character!=null&&e.selected!=null&&!e.isSelected&&e.character.type===e.selected.type&&e.character.exp<6&&v.preventDefault()},ondrop:()=>{i.value=!1,t("drop")}},[e.selected!=null&&!e.isShop&&(((m=e.character)==null?void 0:m.type)!==e.selected.type||e.isSelected)&&n.value===!1?(f(),C("span",Br,wr)):Q("",!0),e.character!=null&&e.selected!=null&&!e.isSelected&&e.character.type===e.selected.type&&e.character.exp<6?(f(),C("span",Ir,Qr)):Q("",!0),e.character!=null?(f(),C("span",Mr,[c("img",{src:u(ue)[e.character.type].display},null,8,kr)])):Q("",!0),e.character!=null?(f(),C("span",Tr,[c("img",{src:u(ct)},null,8,Dr),c("span",null,q((g=e.character)==null?void 0:g.relevancy),1)])):Q("",!0),e.character!=null?(f(),C("span",Rr,[Vr,c("span",null,q((p=e.character)==null?void 0:p.presence),1)])):Q("",!0),e.character!=null?(f(),C("span",zr,[e.character.exp===1?(f(),C("img",{key:0,src:u(vr)},null,8,Pr)):Q("",!0),e.character.exp===2?(f(),C("img",{key:1,src:u(pr)},null,8,xr)):Q("",!0),e.character.exp===3?(f(),C("img",{key:2,src:u(yr)},null,8,qr)):Q("",!0),e.character.exp===4?(f(),C("img",{key:3,src:u(br)},null,8,Fr)):Q("",!0),e.character.exp===5?(f(),C("img",{key:4,src:u(Nr)},null,8,Gr)):Q("",!0),e.character.exp===6?(f(),C("img",{key:5,src:u(Cr)},null,8,Or)):Q("",!0)])):Q("",!0),e.frozen?(f(),C("div",Ur)):Q("",!0),e.id?(f(),O(hr,{key:7,id:e.id},null,8,["id"])):Q("",!0)],10,Er)]}),_:1},8,["display","direction"]))}});var Be=L(Yr,[["__scopeId","data-v-310e9657"]]);const Jr={min:.25,max:.5},Lr=[{s:0,cp:.329,e:.548},{s:.548,cp:.767,e:.876},{s:.876,cp:.985,e:1}],Wr=.01,Xr=.1,jr=100,Hr=!0,Kr={x:0,y:0},Zr=!1,$r=[{type:"alpha",config:{alpha:{list:[{time:0,value:.74},{time:1,value:0}]}}},{type:"moveSpeed",config:{speed:{list:[{time:0,value:100},{time:1,value:0}]},minMult:1}},{type:"scale",config:{scale:{list:[{time:0,value:2},{time:1,value:.5}]},minMult:1}},{type:"color",config:{color:{list:[{time:0,value:"#FFC000"},{time:1,value:"#FFDF00"}]}}},{type:"rotation",config:{accel:0,minSpeed:0,maxSpeed:200,minStart:0,maxStart:360}},{type:"textureRandom",config:{textures:["/particle.png"]}},{type:"spawnShape",config:{type:"torus",data:{radius:100,x:0,y:0}}}];var eo={lifetime:Jr,ease:Lr,frequency:Wr,emitterLifetime:Xr,maxParticles:jr,addAtBack:Hr,pos:Kr,emit:Zr,behaviors:$r};const nt=I(!1),wt=I(""),Kt=ta(),Ue=I(),We=I("");function ge(e,...t){var a;!nt.value||(a=Ue.value)==null||a.emit(e,...t)}Z.on("loadSettings",e=>{$e(e,"server","https://Super-Auto-Coots.thepaperpilot.repl.co"),fe(()=>e.server,t=>{Ue.value&&Ue.value.close(),Ue.value=Fa(t),to(Ue.value),nt.value=!1,We.value="",Ue.value.connect()},{immediate:!0}),ei(K(()=>A(re,null,[A(qt,{title:"Server URL","onUpdate:modelValue":t=>e.server=t,modelValue:e.server},null),A("div",{style:"font-style: italic; font-size: small; margin-top: -10px;"},[nt.value?A("span",null,[w("Connected!")]):We.value?A("span",{style:"color: red"},[We.value]):A("span",null,[w("Connecting...")])])])))});function he(e){var n;const t=B.particles.boundingRect.value;if(!t)return;const a=(n=B.nodes.value[e])==null?void 0:n.rect;a&&B.particles.addEmitter(eo).then(i=>{i.updateOwnerPos(a.x+a.width/2-t.x,a.y+a.height/2-t.y),i.playOnceAndDestroy()})}function to(e){e.on("connect",()=>{We.value="",nt.value=!0,B.reset.reset()}),e.on("connect_error",t=>{We.value=`${t.name}: ${t.message}`}),e.on("disconnect",(t,a)=>{var n;We.value=a instanceof Error?`${a.name}: ${a.message}`:(n=a==null?void 0:a.description)!=null?n:t,nt.value=!1}),e.on("server version",t=>{qa(F.versionNumber,t)||(Kt.info("Server only accepts game versions in range: "+t),e.disconnect())}),e.on("info",t=>{Kt.info(t),t==="Failed to start streaming"&&(B.findingMatch.value=!1)}),e.on("nickname",t=>{wt.value=t}),e.on("newTurn",t=>{B.gold.value=10,B.turn.value++,B.battle.value=null,B.shop.value=t.map(a=>({type:a,relevancy:ue[a].initialRelevancy,presence:ue[a].initialPresence,exp:1})),setTimeout(()=>{t.forEach((a,n)=>he(`shop-char-${n}`))},0)}),e.on("reroll",t=>{B.gold.value--,B.shop.value=t.map(a=>({type:a,relevancy:ue[a].initialRelevancy,presence:ue[a].initialPresence,exp:1})),B.frozen.value=B.frozen.value.map((a,n)=>n),setTimeout(()=>{t.forEach((a,n)=>he(`shop-char-${n}`))},0)}),e.on("buy",(t,a,n)=>{B.team.value[a]=n,B.shop.value[t]=null,B.gold.value-=3,he(`shop-char-${t}`),he(`team-char-${a}`)}),e.on("move",(t,a)=>{const n=B.team.value[t];B.team.value[t]=B.team.value[a],B.team.value[a]=n,he(`team-char-${t}`),he(`team-char-${a}`)}),e.on("merge",(t,a,n)=>{B.team.value[t]=null,B.team.value[a]=n,he(`team-char-${t}`),he(`team-char-${a}`)}),e.on("stream",(t,a)=>{B.findingMatch.value=!1,B.battle.value={team:JSON.parse(JSON.stringify(B.team.value.filter(n=>n!=null))),streamers:[],enemyTeam:t.team,enemyStreamers:[],enemyNickname:t.nickname,enemyLives:t.lives,enemyWins:t.wins,enemyTurn:t.turn},B.outcome.value=a,B.showingOutcome.value=!1,B.playClicked.value=!1,setTimeout(B.prepareMove,1e3)}),e.on("sell",t=>{const a=B.team.value[t];let n;a.exp>=6?n=3:a.exp>=3?n=2:n=1,B.gold.value+=n,B.team.value[t]=null,he(`team-char-${t}`)}),e.on("freeze",t=>{B.frozen.value.includes(t)?B.frozen.value=B.frozen.value.filter(a=>a!==t):B.frozen.value.push(t)})}var ao="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAYAAABS3GwHAAAAAXNSR0IArs4c6QAABTlJREFUeJzt3U2oVVUYBuBjFIQNopCopCAsxElhcANREsISMpCoQcOI0okOGhlUIwsSGgQ5EsuGDYp+yMCSIEmC7kCqUZkIhRUiQYN+oIFNHK7v1qp9PGef93mG392sve69vCz2x9prTyYAAAAAAAAAAAAAAAAAjMOqWU9g3l28eOHirOfwf6xatcb/eAVXzHoCMEsCQDQBIJoAEE0AiHblrCdwufV2dZbWPjytqVwWvb9vWtfICkA0ASCaABBNAIgmAERb2C5Q1f3o7eosnzk2yHxmZWnt9q7rq7/bonaHrABEEwCiCQDRBIBoAkC00TzZD7WHZ+xdnWlbWtfuGi2fe6dZH3t3yApANAEgmgAQTQCIJgBEm7u9QEPt4RnK+bOnm/UbbrvjMs9kZWOZ57yxAhBNAIgmAEQTAKIJANFmto+jt9tz9PjBZr3qclR7Wiq9449F1R3asW1Ps76oe34qVgCiCQDRBIBoAkA0ASDa3O0FqvR2Y6o3v6ruUO/4h3c/1aw/894HzfqFn3/qGr/XmhtvatZf2vnQVO87dlYAogkA0QSAaAJANAEg2mi6QL2qbs8rr+5t1k9+2O7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Oft7vXny7eke7F9ef/FION761GhmAFgjALBGAGCNAMAaAYC1shZIaX2OkJLdmZW9b7adyL7JvUq2Lenb78U7woCGCACsEQBYIwCwRgBgrXkLpGTbhizVHijZ+1a1K61VtSVd/V5Vz68wA8AaAYA1AgBrBADWCACsddYCKVVtSbY9yN63dTsxFF39XlWYAWCNAMAaAYA1AgBrBADW/gYSpT1chMivagAAAABJRU5ErkJggg==",uo="./assets/start stream.dd66a6ec.png";const co=Symbol("Reset");function mo(e){return zt(()=>{const t=e();return t.id=ua("reset-"),t.type=co,t.reset=function(){var i;const a=s=>{if(s!=null&&typeof s=="object")if(Xe in s){const r=s;r.value=r[Xe]}else!(s instanceof E)&&!be(s)&&Object.values(s).forEach(r=>a(r))},n=u(t.thingsToReset);Ct(n)?n.forEach(a):a(n),Z.emit("reset",t),(i=t.onReset)==null||i.call(t)},ve(t,"thingsToReset"),t})}const lt={};Z.on("removeLayer",e=>{var t;(t=lt[e.id])==null||t.call(lt),lt[e.id]=void 0});aa.registerPlugin(Oa);Ua.registerPlugin("batch",Ya);var go=G({props:{style:ae(String,Object,Array),classes:ae(Object),onInit:{type:Function,required:!0},id:{type:String,required:!0},onContainerResized:Function,onHotReload:Function},setup(e){const t=pe(null),a=new ResizeObserver(s),n=pe(null);Qt(()=>{var l,m;const r=n.value;r!=null&&(a.observe(r),t.value=new aa({resizeTo:r,backgroundAlpha:0}),(l=n.value)==null||l.appendChild(t.value.view),(m=e.onInit)==null||m.call(e,t.value)),s(),e.onHotReload&&Pe(e.onHotReload)}),Ta(()=>{var r;(r=t.value)==null||r.destroy()});let i=!0;function s(){i&&(i=!1,Pe(()=>{var r;n.value!=null&&((r=e.onContainerResized)==null||r.call(e,n.value.getBoundingClientRect())),i=!0}))}return Z.on("fontsLoaded",s),{unref:u,resizeListener:n}}});function fo(e,t,a,n,i,s){return f(),C("div",{ref:"resizeListener",class:ee(["resize-listener",e.unref(e.classes)]),style:xe(e.unref(e.style))},null,6)}var ho=L(go,[["render",fo],["__scopeId","data-v-0b99a6fc"]]);const vo=Symbol("Particles");function po(e){return zt(()=>{var i,s;const t=(i=e==null?void 0:e())!=null?i:{};t.id=ua("particles-"),t.type=vo,t[Dt]=ho,t.app=pe(null),t.addEmitter=r=>{const l=t;return l.app.value?Promise.resolve(new Ut(l.app.value.stage,r)):new Promise(m=>{a.push({resolve:m,config:r})})};let a=[];function n(r){const l=t;l.app.value=r,a.forEach(({resolve:m,config:g})=>m(new Ut(r.stage,g))),a=[]}return t.onContainerResized=(s=t.onContainerResized)==null?void 0:s.bind(t),t[Rt]=function(){const{id:r,style:l,classes:m,onContainerResized:g,onHotReload:p}=this;return{id:r,style:u(l),classes:m,onContainerResized:g,onHotReload:p,onInit:n}},t})}window.upgradeConfig=Ja;const yo={min:1.5,max:2.5},bo=[{s:0,cp:.329,e:.548},{s:.548,cp:.767,e:.876},{s:.876,cp:.985,e:1}],No=.001,Co=.1,Eo=100,Bo=!0,_o={x:0,y:0},wo=!1,Io=[{type:"alpha",config:{alpha:{list:[{time:0,value:.74},{time:1,value:0}]}}},{type:"moveAcceleration",config:{accel:{x:0,y:2e3},minStart:600,maxStart:600,rotate:!0}},{type:"scale",config:{scale:{list:[{time:0,value:.5},{time:1,value:.25}]},minMult:1}},{type:"color",config:{color:{list:[{time:0,value:"#962121"},{time:.5,value:"#214a96"},{time:1,value:"#4c2196"}]}}},{type:"rotation",config:{accel:0,minSpeed:0,maxSpeed:200,minStart:0,maxStart:360}},{type:"textureRandom",config:{textures:["/particle.png"]}},{type:"spawnShape",config:{type:"torus",data:{radius:100,x:0,y:0}}}];var So={lifetime:yo,ease:bo,frequency:No,emitterLifetime:Co,maxParticles:Eo,addAtBack:Bo,pos:_o,emit:wo,behaviors:Io};function Te(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Da(e)}const ue={coots:{nickname:"Coots",initialRelevancy:1,initialPresence:1,display:ro,abilityType:"LivestreamJoined",abilityDescription:"Do nothing",performAbility(){}},ludwig:{nickname:"Ludwig Coots",initialRelevancy:1,initialPresence:1,display:ao,abilityType:"LivestreamJoined",abilityDescription:"Do nothing",performAbility(){}},qt:{nickname:"Qt Coots",initialRelevancy:1,initialPresence:1,display:oo,abilityType:"LivestreamJoined",abilityDescription:K(()=>A(re,null,[A("i",null,[w("Livestream joined")]),w(": Set both stats to 100")])),performAbility(e){e.presence=100,e.relevancy=100}},maid:{nickname:"Maid Coots",initialRelevancy:1,initialPresence:1,display:no,abilityType:"LivestreamJoined",abilityDescription:"Do nothing",performAbility(){}},mail:{nickname:"Mogul Mail Coots",initialRelevancy:1,initialPresence:1,display:io,abilityType:"LivestreamJoined",abilityDescription:"Do nothing",performAbility(){}},stanz:{nickname:"Stanz Coots",initialRelevancy:1,initialPresence:1,display:lo,abilityType:"LivestreamJoined",abilityDescription:"Do nothing",performAbility(){}},money:{nickname:"Mogul Money Coots",initialRelevancy:1,initialPresence:1,display:so,abilityType:"LivestreamJoined",abilityDescription:"Do nothing",performAbility(){}},vespa:{nickname:"Vespa Coots",initialRelevancy:1,initialPresence:1,display:Ao,abilityType:"LivestreamJoined",abilityDescription:"Do nothing",performAbility(){}}},B=pa("main",function(){const e=I(3),t=I(0),a=I(0),n=I(0),i=I([null,null,null]),s=I([]),r=I(null),l=I(null),m=I(!1),g=I(""),p=I(!1),v=I(!1),b=I(!1),N=I([]),S=I([]),h=I(null),Y=z(()=>h.value==null?0:h.value.streamers.reduce((W,P)=>W+Math.max(0,P.presence)*Math.max(0,P.relevancy),0)*100),j=z(()=>h.value==null?0:h.value.enemyStreamers.reduce((W,P)=>W+Math.max(0,P.presence)*Math.max(0,P.relevancy),0)*100),y=mo(()=>({onReset(){e.value=3,t.value=0,a.value=0,n.value=0,i.value=[null,null,null],s.value=[],r.value=null,l.value=null,m.value=!1,h.value=null,g.value="",p.value=!1,b.value=!1,N.value=[],S.value=[]}})),_=I(!1);function V(){var W,P;if(h.value==null)throw"Preparing move while not in battle";if(N.value.length===0&&h.value.team.length===0&&h.value.enemyTeam.length===0){g.value==="Victory"?t.value++:g.value==="Defeat"&&e.value--,p.value=!0;return}if(N.value.length===0?N.value.push({action:"join"}):N.value.length>1&&(N.value=N.value.sort((R,U)=>R.action!==U.action?1:R.target!=null&&U.target!=null?U.target.relevancy-R.target.relevancy:0)),x.autoplay===!1&&b.value===!1)v.value=!0;else{v.value=!1;const R=N.value.shift();switch(R.action){case"join":if(((W=h.value.team.length)!=null?W:0)>0){const U=h.value.team.pop();h.value.streamers.push(U),ue[U.type].abilityType==="LivestreamJoined"&&N.value.unshift({action:"LivestreamJoined",target:U})}if(((P=h.value.enemyTeam.length)!=null?P:0)>0){const U=h.value.enemyTeam.pop();h.value.enemyStreamers.push(U),ue[U.type].abilityType==="LivestreamJoined"&&N.value.unshift({action:"LivestreamJoined",target:U})}break;default:if(R.target==null){console.error("Invalid action",R);break}ue[R.target.type].performAbility(R.target);break}b.value=!1,setTimeout(V,x.fast?750:1250)}}const te=po(()=>({fullscreen:!1,zIndex:10,boundingRect:I(null),onContainerResized(W){this.boundingRect.value=W}}));return{name:"Game",minimizable:!1,display:K(()=>{let W;if(t.value>=5){let P;return A("div",{class:"total-outcome-container"},[A("span",{class:"total-outcome"},[w("You Won!")]),A("span",{class:"smiley"},[w("\u{1F603}")]),A(me,null,Te(P=new Array(3).fill(0).map((R,U)=>A(Be,{character:i.value[U]},null)))?P:{default:()=>[P]}),A("button",{class:"button",onClick:()=>location.reload()},[w("Play again")]),Je(te)])}if(e.value<=0){let P;return A("div",{class:"total-outcome-container"},[A("span",{class:"total-outcome"},[w("You ran out of lives!")]),A("span",{class:"smiley"},[w("\u{1F630}")]),A(me,null,Te(P=new Array(3).fill(0).map((R,U)=>A(Be,{character:i.value[U]},null)))?P:{default:()=>[P]}),A("button",{class:"button",onClick:()=>location.reload()},[w("Play again")]),Je(te)])}if(h.value!=null){let P,R,U,Oe;return A("div",{class:{["battle-container"]:!0,fast:x.fast}},[A("div",{class:"battle-controls"},[A("button",{class:"button",onClick:()=>{b.value=!0,V()}},[A("span",{class:"material-icons"},[w("play_arrow")]),A("span",null,[w("Play")])]),A("button",{class:{button:!0,active:x.autoplay},onClick:()=>{x.autoplay=!x.autoplay,v.value&&V()}},[A("span",{class:"material-icons"},[w("all_inclusive")]),A("span",null,[w("Autoplay")])]),A("button",{class:{button:!0,active:x.fast},onClick:()=>x.fast=!x.fast},[A("span",{class:"material-icons"},[w("fast_forward")]),A("span",null,[w("Fast")])])]),A("div",{class:"teams-container",style:p.value?"pointer-events: none;":""},[A("div",{class:"team-container"},[A("div",{class:"stream-container"},[A("div",{class:"stream-details",style:"left: 1vmin"},[A("span",{style:"margin-left: 0"},[wt.value,w(" (YOU)")]),A("div",{class:"stats",style:"margin-left: 0"},[A("div",{class:"resource-box"},[A("img",{src:ct},null),A("span",null,[e.value])]),A("div",{class:"resource-box"},[A("span",{class:"material-icons"},[w("emoji_events")]),A("span",null,[t.value,w("/5")])])])]),A("div",{class:"view-counter",style:"right: 1vmin"},[Et(Y.value),w(" Views")]),A(me,{class:"streamers-container"},{default:()=>[A(ot,{name:"character-transition"},Te(P=h.value.streamers.slice().reverse().map((oe,Qe)=>{var le;return A(Be,{key:h.value.streamers.length-Qe,character:oe,shake:v.value&&((le=N.value[0])==null?void 0:le.target)===oe},null)}))?P:{default:()=>[P]})]})]),A(me,{class:"members-container",style:"margin-left: 0"},{default:()=>[A(ot,{name:"character-transition"},Te(R=h.value.team.map((oe,Qe)=>{var le,je,He,Ke;return A(Be,{character:oe,key:Qe,shake:v.value&&((le=N.value[0])==null?void 0:le.action)==="join"&&oe===((Ke=h.value)==null?void 0:Ke.team[((He=(je=h.value)==null?void 0:je.team.length)!=null?He:0)-1])},null)}))?R:{default:()=>[R]})]})]),A("div",{class:"team-container"},[A("div",{class:"stream-container"},[A("div",{class:"stream-details",style:"right: 1vmin"},[A("span",{style:"margin-right: 0"},[h.value.enemyNickname]),A("div",{class:"stats",style:"margin-right: 0"},[A("div",{class:"resource-box"},[A("img",{src:ct},null),A("span",null,[h.value.enemyLives])]),A("div",{class:"resource-box"},[A("span",{class:"material-icons"},[w("emoji_events")]),A("span",null,[h.value.enemyWins,w("/5")])])])]),A("div",{class:"view-counter",style:"left: 1vmin"},[Et(j.value),w(" Views")]),A(me,{class:"streamers-container"},{default:()=>[A(ot,{name:"character-transition"},Te(U=h.value.enemyStreamers.map((oe,Qe)=>{var le;return A(Be,{key:Qe,character:oe,shake:v.value&&((le=N.value[0])==null?void 0:le.target)===oe},null)}))?U:{default:()=>[U]})]})]),A(me,{class:"members-container",style:"margin-right: 0"},{default:()=>[A(ot,{name:"character-transition"},Te(Oe=h.value.enemyTeam.slice().reverse().map((oe,Qe)=>{var le,je,He,Ke;return A(Be,{character:oe,key:h.value.enemyStreamers.length+Qe,shake:v.value&&((le=N.value[0])==null?void 0:le.action)==="join"&&oe===((Ke=h.value)==null?void 0:Ke.enemyTeam[((He=(je=h.value)==null?void 0:je.enemyTeam.length)!=null?He:0)-1])},null)}))?Oe:{default:()=>[Oe]})]})])]),p.value?A("div",{class:"outcome",onClick:()=>ge("newTurn")},[A("span",null,[g.value]),A("span",{style:"font-size: 2vmin"},[w("Next Turn")])]):null])}return A("div",{class:"game-container",style:m.value?"pointer-events: none":"",onClick:()=>{r.value=null,l.value=null}},[A(me,{style:"position: absolute; top: 10px; left: -5px"},{default:()=>[A("div",{class:"resource-box"},[A("span",{class:"material-icons"},[w("credit_card")]),n.value]),A("div",{class:"resource-box"},[A("img",{src:ct},null),e.value]),A("div",{class:"resource-box"},[A("span",{class:"material-icons"},[w("emoji_events")]),t.value,w("/5")])]}),A("h2",{style:"font-size: 3vmin"},[wt.value]),A(me,{style:"margin-top: 10vh"},Te(W=new Array(3).fill(0).map((P,R)=>{var U,Oe;return A(Be,{id:`team-char-${R}`,character:i.value[R],isSelected:r.value===R,selected:r.value==null?l.value==null||i.value[R]!=null&&((U=s.value[l.value])==null?void 0:U.type)!==((Oe=i.value[R])==null?void 0:Oe.type)||n.value<3?null:s.value[l.value]:i.value[r.value],isDragging:_.value,onClick:Zt(R),onDragstart:()=>{_.value=!0,r.value=R,l.value=null},onDragend:()=>{_.value=!1,r.value=null,l.value=null},onDrop:()=>Zt(R)()},null)}))?W:{default:()=>[W]}),A(me,{style:"margin-top: 10vh"},{default:()=>[A("div",{class:"reroll",style:n.value>0?"":"color: var(--locked); cursor: not-allowed",onClick:()=>{n.value>0&&ge("reroll")}},[A("span",{class:"material-icons",style:"font-size: 8vmin"},[w("casino")]),A("span",{style:"font-size: 2vmin"},[w("Roll")])]),s.value.map((P,R)=>A(Be,{id:`shop-char-${R}`,frozen:S.value.includes(R),character:P==null?void 0:P,isSelected:l.value===R,isShop:!0,isDragging:_.value,onClick:U=>{P!=null&&(l.value=l.value===R?null:R,r.value=null,U.stopPropagation())},onDragstart:()=>{_.value=!0,r.value=null,l.value=R},onDragend:()=>{_.value=!1,r.value=null,l.value=null}},null))]}),A(gr,{height:"4vh"},null),m.value?A("div",{class:"waiting"},[w("Finding opposing team...")]):A(me,{class:"bottom-row"},{default:()=>[r.value==null?null:A("button",{class:"button",onDragover:P=>P.preventDefault(),onClick:()=>ge("sell",r.value),onDrop:()=>ge("sell",r.value)},[w("Sell")]),l.value==null?null:A("button",{class:"button",onDragover:P=>P.preventDefault(),onClick:()=>ge("freeze",l.value),onDrop:()=>ge("freeze",l.value)},[w("Freeze")]),A("div",{style:"flex-grow: 1"},null),A("img",{class:"startStream",draggable:"false",onClick:()=>{ge("stream"),m.value=!0},src:uo},null)]}),Je(te)])}),lives:e,wins:t,turn:a,gold:n,team:i,shop:s,selectedCharacter:r,selectedShopItem:l,findingMatch:m,showingOutcome:p,outcome:g,reset:y,battle:h,frozen:S,playClicked:b,prepareMove:V,particles:te}});let At=0;Z.on("update",e=>{if(B.wins.value>=5){if(At+=e,At>=1){At=0;const t=B.particles.boundingRect.value;if(!t)return;B.particles.addEmitter(So).then(a=>{a.updateOwnerPos(Math.random()*t.width,Math.random()*t.height),console.log(a),a.playOnceAndDestroy()})}}else At=0});function Zt(e){return t=>{var a,n,i,s,r,l,m;B.selectedCharacter.value!=null&&B.selectedCharacter.value!==e?((a=B.team.value[B.selectedCharacter.value])==null?void 0:a.type)===((n=B.team.value[e])==null?void 0:n.type)&&((s=(i=B.team.value[B.selectedCharacter.value])==null?void 0:i.exp)!=null?s:0)<6&&((l=(r=B.team.value[e])==null?void 0:r.exp)!=null?l:0)<6?(ge("merge",B.selectedCharacter.value,e),B.selectedCharacter.value=null):(ge("move",B.selectedCharacter.value,e),B.selectedCharacter.value=null):B.selectedCharacter.value===e?B.selectedCharacter.value=null:B.selectedShopItem.value!==null?((B.team.value[e]==null||B.team.value[e].type===((m=B.shop.value[B.selectedShopItem.value])==null?void 0:m.type)&&B.team.value[e].exp<6)&&B.gold.value>=3&&ge("buy",B.selectedShopItem.value,e),B.selectedShopItem.value=null):B.selectedCharacter.value=e,t==null||t.stopPropagation()}}const Qo=e=>[B],Ba=z(()=>!1);function Mo(e,t){}var ko=Object.freeze(Object.defineProperty({__proto__:null,characters:ue,main:B,getInitialLayers:Qo,hasWon:Ba,fixOldSave:Mo},Symbol.toStringTag,{value:"Module"}));const To={class:"field"},Do=G({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=z(()=>{var s;return Ne((s=u(a.title))!=null?s:"<span></span>","span")}),i=z({get(){return!!a.modelValue},set(s){t("update:modelValue",s)}});return(s,r)=>(f(),C("label",To,[Mt(c("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":r[0]||(r[0]=l=>be(i)?i.value=l:null)},null,512),[[Ra,u(i)]]),(f(),O(ce(u(n))))]))}});var It=L(Do,[["__scopeId","data-v-11046116"]]);const st=e=>(Ie("data-v-4a50ce42"),e=e(),Se(),e),Ro={class:"game-over-modal-header"},Vo=["src","alt"],zo={class:"game-over-modal-title"},Po=st(()=>c("h2",null,"Congratulations!",-1)),xo={key:0},qo=st(()=>c("br",null,null,-1)),Fo=st(()=>c("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),Go=st(()=>c("br",null,null,-1)),Oo=["href"],Uo=st(()=>c("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),Yo=G({__name:"GameOverScreen",setup(e){const{title:t,logo:a,discordName:n,discordLink:i,versionNumber:s,versionTitle:r}=F,l=z(()=>Tt(D.timePlayed)),m=z(()=>Ba.value&&!D.keepGoing),g=qe(D,"autosave");function p(){D.keepGoing=!0}function v(){Re(Ye())}return(b,N)=>(f(),O(Fe,{"model-value":u(m)},{header:T(()=>[c("div",Ro,[u(a)?(f(),C("img",{key:0,class:"game-over-modal-logo",src:u(a),alt:u(t)},null,8,Vo)):Q("",!0),c("div",zo,[Po,c("h4",null,"You've beaten "+q(u(t))+" v"+q(u(s))+": "+q(u(r)),1)])])]),body:T(({shown:S})=>[S?(f(),C("div",xo,[c("div",null,"It took you "+q(u(l))+" to beat the game.",1),qo,Fo,Go,c("div",null,[c("a",{href:u(i),class:"game-over-modal-discord-link"},[Uo,w(" "+q(u(n)),1)],8,Oo)]),A(It,{title:"Autosave",modelValue:u(g),"onUpdate:modelValue":N[0]||(N[0]=h=>be(g)?g.value=h:null)},null,8,["modelValue"])])):Q("",!0)]),footer:T(()=>[c("div",{class:"game-over-footer"},[c("button",{onClick:p,class:"button"},"Keep Going"),c("button",{onClick:v,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var Jo=L(Yo,[["__scopeId","data-v-4a50ce42"]]);const yt=e=>(Ie("data-v-336bf74f"),e=e(),Se(),e),Lo=yt(()=>c("div",{class:"nan-modal-header"},[c("h2",null,"NaN value detected!")],-1)),Wo={key:0},Xo=yt(()=>c("br",null,null,-1)),jo=["href"],Ho=yt(()=>c("span",{class:"material-icons nan-modal-discord"},"discord",-1)),Ko=yt(()=>c("br",null,null,-1)),Zo={class:"nan-footer"},$o=G({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:a}=F,n=I(!0),i=I(!0),s=qe(H,"hasNaN"),r=I(null);fe(s,b=>{b?(n.value=D.autosave,i.value=D.devSpeed===0):(D.autosave=n.value,D.devSpeed=i.value?0:null)});const l=z(()=>{var b;return(b=H.NaNPath)==null?void 0:b.join(".")}),m=z(()=>H.NaNPersistent!=null?H.NaNPersistent.value:null);function g(){H.NaNPersistent!=null&&(H.NaNPersistent.value=new E(0),H.hasNaN=!1)}function p(){H.NaNPersistent&&(H.NaNPersistent.value=new E(1),H.hasNaN=!1)}function v(){H.NaNPersistent&&(H.NaNPersistent.value=new E(NaN),H.hasNaN=!1)}return(b,N)=>(f(),C(re,null,[A(Fe,et({modelValue:u(s),"onUpdate:modelValue":N[4]||(N[4]=S=>be(s)?s.value=S:null)},b.$attrs),{header:T(()=>[Lo]),body:T(()=>[c("div",null,[w(' Attempted to assign "'+q(u(l))+'" to NaN',1),u(m)?(f(),C("span",Wo,q(" ")+"(previously "+q(u(Aa)(u(m)))+")",1)):Q("",!0),w(". Auto-saving has been "+q(n.value?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),Xo,c("div",null,[c("a",{href:u(a)||"https://discord.gg/WzejVAx",class:"nan-modal-discord-link"},[Ho,w(" "+q(u(t)||"The Paper Pilot Community"),1)],8,jo)]),Ko,A(It,{title:"Autosave",modelValue:n.value,"onUpdate:modelValue":N[0]||(N[0]=S=>n.value=S)},null,8,["modelValue"]),u(F).enablePausing?(f(),O(It,{key:0,title:"Pause game",modelValue:i.value,"onUpdate:modelValue":N[1]||(N[1]=S=>i.value=S)},null,8,["modelValue"])):Q("",!0)]),footer:T(()=>[c("div",Zo,[c("button",{onClick:N[2]||(N[2]=S=>{var h;return(h=r.value)==null?void 0:h.open()}),class:"button"},"Open Saves Manager"),c("button",{onClick:g,class:"button"},"Set to 0"),c("button",{onClick:p,class:"button"},"Set to 1"),u(m)&&u(E).neq(u(m),0)&&u(E).neq(u(m),1)?(f(),C("button",{key:0,onClick:N[3]||(N[3]=S=>s.value=!1),class:"button"}," Set to previous ")):Q("",!0),c("button",{onClick:v,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),A(Ca,{ref_key:"savesManager",ref:r},null,512)],64))}});var el=L($o,[["__scopeId","data-v-336bf74f"]]);var tl=G({__name:"App",setup(e){const t=F.useHeader,a=z(()=>ht[x.theme].variables);qe(x,"showTPS");const n=z(()=>Ne(K(()=>A(re,null,[ai.map(Je)]))));return(i,s)=>(f(),C(re,null,[c("div",{id:"modal-root",style:xe(u(a))},null,4),c("div",{class:ee(["app",{useHeader:u(t)}]),style:xe(u(a))},[u(t)?(f(),O(Ea,{key:0})):Q("",!0),A(mr),A(Jo),A(el),(f(),O(ce(u(n))))],6)],64))}});var al=L(tl,[["__scopeId","data-v-ff7f8b84"]]);Z.on("setupVue",e=>e.use(Ga));function nl(e={}){const{immediate:t=!1,onNeedRefresh:a,onOfflineReady:n,onRegistered:i,onRegisterError:s}=e;let r,l;const m=async(g=!0)=>{g&&(r==null||r.addEventListener("controlling",p=>{p.isUpdate&&window.location.reload()})),l&&l.waiting&&await Wa(l.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){r=new La("./sw.js",{scope:"./",type:"classic"}),r.addEventListener("activated",g=>{g.isUpdate||n==null||n()});{const g=()=>{a==null||a()};r.addEventListener("waiting",g),r.addEventListener("externalwaiting",g)}r.register({immediate:t}).then(g=>{l=g,i==null||i(g)}).catch(g=>{s==null||s(g)})}return m}function il(e={}){const{immediate:t=!0,onNeedRefresh:a,onOfflineReady:n,onRegistered:i,onRegisterError:s}=e,r=I(!1),l=I(!1);return{updateServiceWorker:nl({immediate:t,onNeedRefresh(){r.value=!0,a==null||a()},onOfflineReady(){l.value=!0,n==null||n()},onRegistered:i,onRegisterError:s}),offlineReady:l,needRefresh:r}}document.title=F.title;window.projInfo=F;if(F.id==="")throw"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 Hn();const{globalBus:e}=await dt(()=>Promise.resolve().then(function(){return Xn}),void 0),{startGameLoop:t}=await dt(()=>import("./gameLoop.953d3e69.js"),["assets/gameLoop.953d3e69.js","assets/@fontsource.f66d05e7.css","assets/vue.f6263579.js","assets/earcut.b6f90e68.js","assets/@vue.4ce677c2.js","assets/nanoevents.1080beb7.js","assets/lz-string.f2f3b7cf.js","assets/vuedraggable.c3acdf62.js","assets/sortablejs.cbae5b2d.js","assets/vue-next-select.0dc4e443.js","assets/vue-next-select.9e6f4164.css","assets/vue-textarea-autosize.35804eaf.js","assets/semver.83ff78cf.js","assets/lru-cache.9a21e90b.js","assets/yallist.fd762fe7.js","assets/socket.io-client.79ce0df5.js","assets/engine.io-client.58517560.js","assets/engine.io-parser.3f360695.js","assets/@socket.io.aec831e2.js","assets/socket.io-parser.544e37d1.js","assets/vue-toastification.b7cd620e.js","assets/vue-toastification.4b5f8ac8.css","assets/@pixi.1eac1889.js","assets/ismobilejs.5c6954b9.js","assets/eventemitter3.dc5195d7.js","assets/url.e51cb87b.js","assets/querystring.23ae9a54.js","assets/workbox-window.8d14e8b7.js"]),a=window.vue=Va(al);e.emit("setupVue",a),a.mount("#app"),Pe(()=>{const n=ta(),{updateServiceWorker:i}=il({onNeedRefresh(){n.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){i()}})},onOfflineReady(){n.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{E as D,dt as _,H as a,F as b,ko as c,Z as g,Kn as l,D as p,x as s};