text: const systemComponents = {
  	'tab-buttons': {
  		props: ['layer', 'data', 'name'],
  		template: `
  			<div class="upgRow">
  				<div v-for="tab in Object.keys(data)">
  					<button v-if="data[tab].unlocked == undefined || data[tab].unlocked" v-bind:class="{tabButton: true, notify: subtabShouldNotify(layer, name, tab), resetNotify: subtabResetNotify(layer, name, tab)}"
  					style="color: black" v-bind:style="[(subtabShouldNotify(layer, name, tab) ? {'box-shadow': 'var(--hqProperty2a), 0 0 20px '  + (data[tab].glowColor || defaultGlow)} : {}), tmp[layer].componentStyles['tab-button'], data[tab].buttonStyle]"
            class="subtab btn rckt"
  						v-on:click="function(){player.subtabs[layer][name] = tab; updateTabFormats(); needCanvasUpdate = true;}">{{tab}}</button>
  				</div>
  			</div>
  		`
  	},
  
  	'tree-node': {
  		props: ['layer', 'abb', 'size', 'prev'],
  		template: `
  		<button v-if="nodeShown(layer)"
  			v-bind:id="layer"
  			v-on:click="function() {
  				if (shiftDown && options.forceTooltips) player[layer].forceTooltip = !player[layer].forceTooltip
  				else if (tmp[layer].isLayer) {
  					if (tmp[layer].leftTab) {
  						showNavTab(layer, prev)
  						showTab('none')
  					}
  					else
  						showTab(layer, prev)
  				}
  				else {run(layers[layer].onClick, layers[layer])}
  			}"
  
  
  			v-bind:class="{
  				btn: true,
  				treeNode: tmp[layer].isLayer,
  				treeButton: !tmp[layer].isLayer,
  				smallNode: size === 'small',
  				[layer]: true,
  				tooltipBox: true,
  				forceTooltip: player[layer].forceTooltip,
  				ghost: tmp[layer].layerShown == 'ghost',
  				hidden: !tmp[layer].layerShown,
  				locked: tmp[layer].isLayer ? !(player[layer].unlocked || tmp[layer].canReset) : !(tmp[layer].canClick),
  				notify: tmp[layer].notify && player[layer].unlocked,
  				resetNotify: tmp[layer].prestigeNotify,
  				can: ((player[layer].unlocked || tmp[layer].canReset) && tmp[layer].isLayer) || (!tmp[layer].isLayer && tmp[layer].canClick),
  				front: !tmp.scrolled,
  			}"
  			v-bind:style="[constructNodeStyle(layer), {'border': '1px solid '+tinycolor(tmp[layer].color).darken(4).toHexString(), 'text-shadow': '0px 1px 0px '+ tinycolor(tmp[layer].color).lighten(30).toHexString(), 'box-shadow': '3px 4px 0px 0px '+tinycolor(tmp[layer].color).darken(10).toHexString()}]">
  			<span class="nodeLabel" v-html="(abb !== '' && tmp[layer].image === undefined) ? abb : '&nbsp;'"></span>
  			<b-tooltip
        v-if="tmp[layer].tooltip != ''"
  			:text="(tmp[layer].isLayer) ? (
  				player[layer].unlocked ? (tmp[layer].tooltip ? tmp[layer].tooltip : formatWhole(player[layer].points) + ' ' + tmp[layer].resource)
  				: (tmp[layer].tooltipLocked ? tmp[layer].tooltipLocked : 'Reach ' + formatWhole(tmp[layer].requires) + ' ' + tmp[layer].baseResource + ' to unlock (You have ' + formatWhole(tmp[layer].baseAmount) + ' ' + tmp[layer].baseResource + ')')
  			)
  			: (
  				tmp[layer].canClick ? (tmp[layer].tooltip ? tmp[layer].tooltip : 'I am a button!')
  				: (tmp[layer].tooltipLocked ? tmp[layer].tooltipLocked : 'I am a button!')
  			)"></b-tooltip>
  			<node-mark :layer='layer' :data='tmp[layer].marked'></node-mark></span>
  		</button>
  		`
  	},
  
  	
  	'layer-tab': {
  		props: ['layer', 'back', 'spacing', 'embedded'],
  		template: `<div v-bind:style="[tmp[layer].style ? tmp[layer].style : {}, (tmp[layer].tabFormat && !Array.isArray(tmp[layer].tabFormat)) ? tmp[layer].tabFormat[player.subtabs[layer].mainTabs].style : {}]" class="noBackground">
      <component v-if="typeof tmp[layer].tabFormat === 'string'" :is="{ template: '<div>' + tmp[layer].tabFormat + '</div>'}"/>
  		<div v-if="!tmp[layer].tabFormat">
  			<div v-if="spacing" v-bind:style="{'height': spacing}" :key="this.$vnode.key + '-spacing'"></div>
  			<infobox v-if="tmp[layer].infoboxes" :layer="layer" :data="Object.keys(tmp[layer].infoboxes)[0]":key="this.$vnode.key + '-info'"></infobox>
  			<main-display v-bind:style="tmp[layer].componentStyles['main-display']" :layer="layer"></main-display>
  			<div v-if="tmp[layer].type !== 'none'">
  				<prestige-button v-bind:style="tmp[layer].componentStyles['prestige-button']" :layer="layer"></prestige-button>
  			</div>
  			<resource-display v-bind:style="tmp[layer].componentStyles['resource-display']" :layer="layer"></resource-display>
  			<milestones v-bind:style="tmp[layer].componentStyles.milestones" :layer="layer"></milestones>
  			<div v-if="Array.isArray(tmp[layer].midsection)">
  				<column :layer="layer" :data="tmp[layer].midsection" :key="this.$vnode.key + '-mid'"></column>
  			</div>
  			<clickables v-bind:style="tmp[layer].componentStyles['clickables']" :layer="layer"></clickables>
  			<buyables v-bind:style="tmp[layer].componentStyles.buyables" :layer="layer"></buyables>
  			<upgrades v-bind:style="tmp[layer].componentStyles['upgrades']" :layer="layer"></upgrades>
  			<challenges v-bind:style="tmp[layer].componentStyles['challenges']" :layer="layer"></challenges>
  			<achievements v-bind:style="tmp[layer].componentStyles.achievements" :layer="layer"></achievements>
  			<br><br>
  		</div>
  		<div v-if="tmp[layer].tabFormat && typeof tmp[layer].tabFormat !== 'string'">
  			<div v-if="Array.isArray(tmp[layer].tabFormat)"><div v-if="spacing" v-bind:style="{'height': spacing}"></div>
  				<column :layer="layer" :data="tmp[layer].tabFormat" :key="this.$vnode.key + '-col'"></column>
  			</div>
  			<div v-else>
  				<div class="upgTable" v-bind:style="{'padding-top': (embedded ? '0' : '25px'), 'margin-top': (embedded ? '-10px' : '0'), 'margin-bottom': '24px'}">
  					<tab-buttons v-bind:style="tmp[layer].componentStyles['tab-buttons']" :layer="layer" :data="tmp[layer].tabFormat" :name="'mainTabs'"></tab-buttons>
  				</div>
  				<layer-tab v-if="tmp[layer].tabFormat[player.subtabs[layer].mainTabs].embedLayer" :layer="tmp[layer].tabFormat[player.subtabs[layer].mainTabs].embedLayer" :embedded="true" :key="this.$vnode.key + '-' + layer"></layer-tab>
  				<column v-else :layer="layer" :data="tmp[layer].tabFormat[player.subtabs[layer].mainTabs].content" :key="this.$vnode.key + '-col'"></column>
  			</div>
  		</div></div>
  			`
  	},
  
      'info-tab': {
          template: `
          <div>
          <h2>{{modInfo.name}}</h2>
          <br>
          <h3>{{VERSION.withName}}</h3>
          <span v-if="modInfo.author">
              <br>
              Made by {{modInfo.author}}	
          </span>
          <br><br><br>
  		<div class="link" onclick="showTab('changelog-tab')">Changelog</div><br>
          <span v-if="modInfo.discordLink"><a class="link" v-bind:href="modInfo.discordLink" target="_blank">{{modInfo.discordName}}</a><br></span><br>
          <a class="link" href="http://discord.gg/wwQfgPa" target="_blank" v-bind:style="{'font-size': '16px'}">Main Distance Incremental server</a><br>
  		<br><br>
          Time Played: {{ formatTime(player.timePlayed) }}<br><br>
          <h3>Hotkeys</h3><br>
          <span v-for="key in hotkeys" v-if="player[key.layer].unlocked && tmp[key.layer].hotkeys[key.id].unlocked"><br>{{key.description}}</span></div>
      `
      },
  
      'options-tab': {
          template: `
          <table>
              <tr>
                  <td><button class="opt ob" @click="save()">Save</button></td>
                  <td><button class="opt ob" @click="toggleOpt('autosave')">Autosave: {{ options.autosave?"ON":"OFF" }}</button></td>
                  <td><button class="opt ob" @click="hardReset()">HARD RESET</button></td>
              </tr>
              <tr>
                  <td><button class="opt ob" @click="exportSave()">Export to clipboard</button></td>
                  <td><button class="opt ob" @click="importSave()">Import</button></td>
                  <td><button class="opt ob" @click="toggleOpt('offlineProd')">Offline Production: {{ options.offlineProd?"ON":"OFF" }}</button></td>
              </tr>
              <tr>
                  <td><button class="opt ob" @click="switchTheme()">Theme: {{ getThemeName() }}</button></td>
                  <td><button class="opt ob" @click="adjustMSDisp()">Show Milestones: {{ MS_DISPLAYS[MS_SETTINGS.indexOf(options.msDisplay)]}}</button></td>
                  <td><button class="opt ob" @click="toggleOpt('hqTree')">High-Quality Tree: {{ options.hqTree?"ON":"OFF" }}</button></td>
              </tr>
              <tr>
                  <td><button class="opt ob" onclick="toggleOpt('hideChallenges')">Completed Challenges: {{ options.hideChallenges?"HIDDEN":"SHOWN" }}</button></td>
  				<td><button class="opt ob" @click="toggleOpt('forceTooltips'); needsCanvasUpdate = true">Shift-Click to Toggle Tooltips: {{ options.forceTooltips?"ON":"OFF" }}</button></td>
          <td><button class="opt ob" @click="options.news = !options.news">News ticker: {{options.news ? 'ON':'OFF'}}</button></td>
          </tr>
          <tr>
  				</tr> 
          </table>
          `
      },
  
      'back-button': {
          template: `
          <button v-bind:class="back" onclick="goBack()">test</button>
          `
      },
  
  
  	'tooltip' : {
  		props: ['text'],
  		template: `<div class="tooltip"><display-text :data="text"></display-text></div>
  		`
  	},
  	'b-tooltip' : {
  		props: ['text'],
  		template: `<div class="btooltip"><display-text :data="text"></display-text></div>`
  	},
  
  	'node-mark': {
  		props: {'layer': {}, data: {}, offset: {default: 0}, scale: {default: 1}},
  		template: `<div v-if='data'>
  			<div v-if='data === true' class='star' v-bind:style='{position: "absolute", left: (offset-10) + "px", top: (offset-10) + "px", transform: "scale( " + scale||1 + ", " + scale||1 + ")"}'></div>
  			<img v-else class='mark' v-bind:style='{position: "absolute", left: (offset-22) + "px", top: (offset-15) + "px", transform: "scale( " + scale||1 + ", " + scale||1 + ")"}' v-bind:src="data"></div>
  		</div>
  		`
  	},
  
  	'particle': {
  		props: ['data', 'index'],
  		template: `<div><div class='particle instant' v-bind:style="[constructParticleStyle(data), data.style]" 
  			v-on:click="run(data.onClick, data)"  v-on:mouseenter="run(data.onMouseOver, data)" v-on:mouseleave="run(data.onMouseLeave, data)" ><span v-html="data.text"></span>
  		</div>
  		<svg version="2" v-if="data.color">
  		<mask v-bind:id="'pmask' + data.id">
          <image id="img" v-bind:href="data.image" x="0" y="0" :height="data.width" :width="data.height" />
      	</mask>
      	</svg>
  		</div>
  		`
  	},
  
  	'bg': {
  		props: ['layer'],
  		template: `<div class ="bg" v-bind:style="[tmp[layer].style ? tmp[layer].style : {}, (tmp[layer].tabFormat && !Array.isArray(tmp[layer].tabFormat)) ? tmp[layer].tabFormat[player.subtabs[layer].mainTabs].style : {}]"></div>
  		`
  	}
  
  }
  
  