pages/ludwig/assets/index.43d4d036.js

15 lines
125 KiB
JavaScript

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